Struct curve25519_dalek::curve::ExtendedPoint [] [src]

pub struct ExtendedPoint {
    pub X: FieldElement,
    pub Y: FieldElement,
    pub Z: FieldElement,
    pub T: FieldElement,
}

An ExtendedPoint is a point on the curve in 𝗣³(𝔽ₚ). A point (x,y) in the affine model corresponds to (x:y:1:xy).

Fields

Methods

impl ExtendedPoint
[src]

Convert to a ProjectiveNielsPoint

Dehomogenize to a AffineNielsPoint. Mainly for testing.

Compress this point to CompressedEdwardsY format.

Convert this point to a CompressedMontgomeryU. Note that this discards the sign.

Return

  • None if self is the identity point;
  • Some(CompressedMontgomeryU) otherwise.

impl ExtendedPoint
[src]

Add this point to itself.

impl ExtendedPoint
[src]

Multiply by the cofactor: compute 8 * self.

Convenience wrapper around mult_by_pow_2.

Compute 2^k * self by successive doublings. Requires k > 0.

Determine if this point is of small order.

The order of the group of points on the curve Ɛ is |Ɛ| = 8q. Thus, to check if a point P is of small order, we multiply by 8 and then test if the result is equal to the identity.

Return

True if it is of small order; false otherwise.

impl ExtendedPoint
[src]

Use Elligator2 to try to convert self to a uniformly random string.

Returns Some<[u8;32]> if self is in the image of the Elligator2 map. For a random point on the curve, this happens with probability 1/2. Otherwise, returns None.

Use Elligator2 to convert a uniformly random string to a curve point.

Trait Implementations

impl Copy for ExtendedPoint
[src]

impl Clone for ExtendedPoint
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Identity for ExtendedPoint
[src]

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

impl ValidityCheck for ExtendedPoint
[src]

Checks whether the point is on the curve. Not CT.

impl CTAssignable for ExtendedPoint
[src]

If choice == 1u8, assign other to self. Otherwise, leave self unchanged. Executes in constant time. Read more

impl CTEq for ExtendedPoint
[src]

Determine if two items are equal in constant time. Read more

impl<'a, 'b> Add<&'b ProjectiveNielsPoint> for &'a ExtendedPoint
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b> Sub<&'b ProjectiveNielsPoint> for &'a ExtendedPoint
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b> Add<&'b AffineNielsPoint> for &'a ExtendedPoint
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b> Sub<&'b AffineNielsPoint> for &'a ExtendedPoint
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b> Add<&'b ExtendedPoint> for &'a ExtendedPoint
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'b> AddAssign<&'b ExtendedPoint> for ExtendedPoint
[src]

The method for the += operator

impl<'a, 'b> Sub<&'b ExtendedPoint> for &'a ExtendedPoint
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'b> SubAssign<&'b ExtendedPoint> for ExtendedPoint
[src]

The method for the -= operator

impl<'a> Neg for &'a ExtendedPoint
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'b> MulAssign<&'b Scalar> for ExtendedPoint
[src]

The method for the *= operator

impl<'a, 'b> Mul<&'b Scalar> for &'a ExtendedPoint
[src]

The resulting type after applying the * operator

Scalar multiplication: compute scalar * self.

Uses a window of size 4. Note: for scalar multiplication of the basepoint, basepoint_mult is approximately 4x faster.

impl Debug for ExtendedPoint
[src]

Formats the value using the given formatter.