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 a copy of the value. Read more

Performs copy-assignment from source. Read more

Determine if two items are equal. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.