[][src]Struct dusk_jubjub::AffinePoint

pub struct AffinePoint { /* fields omitted */ }

This represents a Jubjub point in the affine (x, y) coordinates.

Implementations

impl AffinePoint[src]

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

Constructs the neutral element (0, 1).

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

Multiplies this point by the cofactor, producing an ExtendedPoint

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 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 to_bytes(&self) -> [u8; 32][src]

Converts this element into its byte representation.

pub fn from_bytes(b: [u8; 32]) -> CtOption<Self>[src]

Attempts to interpret a byte representation of an affine point, failing if the element is not on the curve or non-canonical.

pub fn get_x(&self) -> Fq[src]

Returns the x-coordinate of this point.

pub fn get_y(&self) -> Fq[src]

Returns the y-coordinate of this point.

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

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

pub const fn from_raw_unchecked(x: Fq, y: Fq) -> AffinePoint[src]

Constructs an AffinePoint given x and y without checking that the point is on the curve.

Trait Implementations

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> 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<'b> AddAssign<&'b AffinePoint> for ExtendedPoint[src]

impl AddAssign<AffinePoint> for ExtendedPoint[src]

impl Clone for AffinePoint[src]

impl ConditionallySelectable for AffinePoint[src]

impl ConstantTimeEq for AffinePoint[src]

impl Copy for AffinePoint[src]

impl Debug for AffinePoint[src]

impl Default for AffinePoint[src]

fn default() -> AffinePoint[src]

Returns the identity.

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 (X, Y, Z, T1, T2) => (XZ, Y/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 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 (x, y) => (x, y, 1, x, y).

impl From<ExtendedPoint> for AffinePoint[src]

impl Neg for AffinePoint[src]

type Output = AffinePoint

The resulting type after applying the - operator.

fn neg(self) -> AffinePoint[src]

This computes the negation of a point P = (x, y) as -P = (-x, y).

impl PartialEq<AffinePoint> for AffinePoint[src]

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> 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<'b> SubAssign<&'b AffinePoint> for ExtendedPoint[src]

impl SubAssign<AffinePoint> 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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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>,