Struct curve25519_dalek::montgomery::MontgomeryPoint[][src]

pub struct MontgomeryPoint(pub [u8; 32]);
Expand description

Holds the \(u\)-coordinate of a point on the Montgomery form of Curve25519 or its twist.

Implementations

View this MontgomeryPoint as an array of bytes.

Convert this MontgomeryPoint to an array of bytes.

Attempt to convert to an EdwardsPoint, using the supplied choice of sign for the EdwardsPoint.

Inputs

  • sign: a u8 donating the desired sign of the resulting EdwardsPoint. 0 denotes positive and 1 negative.

Return

  • Some(EdwardsPoint) if self is the \(u\)-coordinate of a point on (the Montgomery form of) Curve25519;

  • None if self is the \(u\)-coordinate of a point on the twist of (the Montgomery form of) Curve25519;

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Equality of MontgomeryPoints is defined mod p.

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

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Multiply this MontgomeryPoint by a Scalar.

Given self \( = u_0(P) \), and a Scalar \(n\), return \( u_0([n]P) \).

The resulting type after applying the * operator.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

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

This method tests for !=.

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

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

Numeric cast from self to T.

Performs the conversion.

Safe lossless bitwise transmute from T to Self.

Numeric cast from T to Self.

Performs the conversion.

Safe lossless bitwise transmute from self to T.

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)

recently added

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.