Add a note about canonicity of ephemeral public keys.

This commit is contained in:
Kris Nuttycombe 2021-04-15 15:32:45 -06:00
parent b2b3efd4c2
commit 3434cc8b6a
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@ pub struct SaplingDomain<P: consensus::Parameters> {
impl<P: consensus::Parameters> Domain for SaplingDomain<P> {
type EphemeralSecretKey = jubjub::Scalar;
// It is acceptable for this to be a point because we enforce by consensus that
// points must not be small-order, and all points with non-canonical serialization
// are small-order.
type EphemeralPublicKey = jubjub::ExtendedPoint;
type SharedSecret = jubjub::SubgroupPoint;
type SymmetricKey = Blake2bHash;