[][src]Struct jubjub::ExtendedPoint

pub struct ExtendedPoint { /* fields omitted */ }

This represents an extended point (U, V, Z, T1, T2) with Z nonzero, corresponding to the affine point (U/Z, V/Z). We always have T1 * T2 = UV/Z.

You can do the following things with a point in this form:

  • Convert it into a point in the affine form.
  • Add it to an ExtendedPoint, AffineNielsPoint or ExtendedNielsPoint.
  • Double it using double().
  • Compare it with another extended point using PartialEq or ct_eq().

Implementations

impl ExtendedPoint[src]

pub const fn identity() -> Self[src]

Constructs an extended point from the neutral element (0, 1).

pub fn is_identity(&self) -> Choice[src]

Determines if this point is the identity.

pub fn is_small_order(&self) -> Choice[src]

Determines if this point is of small order.

pub fn is_torsion_free(&self) -> Choice[src]

Determines if this point is torsion free and so is contained in the prime order subgroup.

pub fn is_prime_order(&self) -> Choice[src]

Determines if this point is prime order, or in other words that the smallest scalar multiplied by this point that produces the identity is r. This is equivalent to checking that the point is both torsion free and not the identity.

pub fn mul_by_cofactor(&self) -> ExtendedPoint[src]

Multiplies this element by the cofactor 8.

pub fn to_niels(&self) -> ExtendedNielsPoint[src]

Performs a pre-processing step that produces an ExtendedNielsPoint for use in multiple additions.

pub fn double(&self) -> ExtendedPoint[src]

Computes the doubling of a point more efficiently than a point can be added to itself.

Trait Implementations

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

impl Add<AffineNielsPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

impl Add<AffinePoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

impl Add<ExtendedNielsPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

impl Add<ExtendedPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

type Output = ExtendedPoint

The resulting type after applying the + operator.

impl Add<SubgroupPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the + operator.

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

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

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

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

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

impl AddAssign<AffineNielsPoint> for ExtendedPoint[src]

impl AddAssign<AffinePoint> for ExtendedPoint[src]

impl AddAssign<ExtendedNielsPoint> for ExtendedPoint[src]

impl AddAssign<ExtendedPoint> for ExtendedPoint[src]

impl AddAssign<SubgroupPoint> for ExtendedPoint[src]

impl Clone for ExtendedPoint[src]

impl CofactorCurve for ExtendedPoint[src]

impl CofactorGroup for ExtendedPoint[src]

type Subgroup = SubgroupPoint

The large prime-order subgroup in which cryptographic operations are performed. If Self implements PrimeGroup, then Self::Subgroup may be Self. Read more

impl ConditionallySelectable for ExtendedPoint[src]

impl ConstantTimeEq for ExtendedPoint[src]

impl Copy for ExtendedPoint[src]

impl Curve for ExtendedPoint[src]

type AffineRepr = AffinePoint

The affine representation for this elliptic curve.

impl Debug for ExtendedPoint[src]

impl Default for ExtendedPoint[src]

fn default() -> ExtendedPoint[src]

Returns the identity.

impl Display for ExtendedPoint[src]

impl Eq for ExtendedPoint[src]

impl<'a> From<&'a ExtendedPoint> for AffinePoint[src]

fn from(extended: &'a ExtendedPoint) -> AffinePoint[src]

Constructs an affine point from an extended point using the map (U, V, Z, T1, T2) => (U/Z, V/Z) as Z is always nonzero. This requires a field inversion and so it is recommended to perform these in a batch using batch_normalize instead.

impl<'a> From<&'a SubgroupPoint> for &'a ExtendedPoint[src]

impl From<AffinePoint> for ExtendedPoint[src]

fn from(affine: AffinePoint) -> ExtendedPoint[src]

Constructs an extended point (with Z = 1) from an affine point using the map (u, v) => (u, v, 1, u, v).

impl From<ExtendedPoint> for AffinePoint[src]

impl From<SubgroupPoint> for ExtendedPoint[src]

impl Group for ExtendedPoint[src]

type Scalar = Fr

Scalars modulo the order of this group's scalar field.

impl GroupEncoding for ExtendedPoint[src]

type Repr = [u8; 32]

The encoding of group elements. Read more

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

type Output = ExtendedPoint

The resulting type after applying the * operator.

impl<'b> Mul<&'b Fr> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the * operator.

impl<'a> Mul<Fr> for &'a ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the * operator.

impl Mul<Fr> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the * operator.

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

impl MulAssign<Fr> for ExtendedPoint[src]

impl Neg for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the - operator.

fn neg(self) -> ExtendedPoint[src]

Computes the negation of a point P = (U, V, Z, T) as -P = (-U, V, Z, -T1, T2). The choice of T1 is made without loss of generality.

impl PartialEq<ExtendedPoint> for ExtendedPoint[src]

impl StructuralEq for ExtendedPoint[src]

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

impl Sub<AffineNielsPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

impl Sub<AffinePoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

impl Sub<ExtendedNielsPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

impl Sub<ExtendedPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

type Output = ExtendedPoint

The resulting type after applying the - operator.

impl Sub<SubgroupPoint> for ExtendedPoint[src]

type Output = ExtendedPoint

The resulting type after applying the - operator.

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

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

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

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

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

impl SubAssign<AffineNielsPoint> for ExtendedPoint[src]

impl SubAssign<AffinePoint> for ExtendedPoint[src]

impl SubAssign<ExtendedNielsPoint> for ExtendedPoint[src]

impl SubAssign<ExtendedPoint> for ExtendedPoint[src]

impl SubAssign<SubgroupPoint> for ExtendedPoint[src]

impl<T> Sum<T> for ExtendedPoint where
    T: Borrow<ExtendedPoint>, 
[src]

impl WnafGroup for ExtendedPoint[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T where
    T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>, 
[src]

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T where
    T: for<'r> GroupOps<&'r Rhs, Output>, 
[src]

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

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T where
    T: Mul<Rhs, Output = Output> + MulAssign<Rhs>, 
[src]

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T where
    T: for<'r> ScalarMul<&'r Rhs, Output>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,