Struct salty::CompressedY [−][src]
pub struct CompressedY(pub [u8; 32]);
Expand description
“Compressed” form of a EdwardsPoint
, whereby
the sign of the x-coordinate is stuffed in a
spare bit of the y-coordinate
Implementations
This is rather tricky: to get the x-coordinate,
and not just its sign, need to calculate the square
root of u/v := (y**2 - 1)/(dy**2 + 1)
. Moreover, we want
to detect whether our compressed Y actually corresponds
to a point on the curve! The original sources are
the Tweet NaCl paper, section 5 and
the ed25519 paper, also section 5.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.