logo
pub struct CompressedEdwardsY(pub [u8; 32]);
Expand description

In “Edwards y” / “Ed25519” format, the curve point \((x,y)\) is determined by the \(y\)-coordinate and the sign of \(x\).

The first 255 bits of a CompressedEdwardsY represent the \(y\)-coordinate. The high bit of the 32nd byte gives the sign of \(x\).

Tuple Fields

0: [u8; 32]

Implementations

View this CompressedEdwardsY as an array of bytes.

Copy this CompressedEdwardsY to an array of bytes.

Attempt to decompress to an EdwardsPoint.

Returns None if the input is not the \(y\)-coordinate of a curve point.

Construct a CompressedEdwardsY from a slice of bytes.

Panics

If the input bytes slice does not have a length of 32.

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

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Returns the identity element of the curve. Can be used as a constructor. Read more

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

This method tests for !=.

Reset this CompressedEdwardsY to the compressed form of the identity element.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Return true if this element is the identity element of the curve.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.