Struct salty::MontgomeryPoint[][src]

pub struct MontgomeryPoint(pub FieldElement);
Expand description

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

Implementations

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

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

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.

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 !=.

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.