[][src]Struct curve25519_dalek::edwards::CompressedEdwardsY

pub struct CompressedEdwardsY(pub [u8; 32]);

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\).

Methods

impl CompressedEdwardsY[src]

pub fn as_bytes(&self) -> &[u8; 32][src]

View this CompressedEdwardsY as an array of bytes.

pub fn to_bytes(&self) -> [u8; 32][src]

Copy this CompressedEdwardsY to an array of bytes.

pub fn decompress(&self) -> Option<EdwardsPoint>[src]

Attempt to decompress to an EdwardsPoint.

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

impl CompressedEdwardsY[src]

pub fn from_slice(bytes: &[u8]) -> CompressedEdwardsY[src]

Construct a CompressedEdwardsY from a slice of bytes.

Panics

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

Trait Implementations

impl Identity for CompressedEdwardsY[src]

impl Copy for CompressedEdwardsY[src]

impl Clone for CompressedEdwardsY[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<CompressedEdwardsY> for CompressedEdwardsY[src]

impl Eq for CompressedEdwardsY[src]

impl Debug for CompressedEdwardsY[src]

impl Default for CompressedEdwardsY[src]

impl ConstantTimeEq for CompressedEdwardsY[src]

Auto Trait Implementations

Blanket Implementations

impl<T> IsIdentity for T where
    T: ConstantTimeEq + Identity
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> FromCast for T[src]

impl<T, U> Cast for T where
    U: FromCast<T>, 
[src]

impl<T, U> IntoBits for T where
    U: FromBits<T>, 
[src]

impl<T> FromBits for T[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized
[src]

impl<T> InitializableFromZeroed for T where
    T: Default
[src]

impl<T> Same for T

type Output = T

Should always be Self