[][src]Struct zerocaf::edwards::AffinePoint

pub struct AffinePoint {
    pub X: FieldElement,
    pub Y: FieldElement,
}

An AffinePoint represents a point on the Sonny Curve expressed over the Twisted Edwards Affine Coordinates also known as cartesian coordinates: (X, Y).

This Twisted Edwards coordinates are ONLY implemented for equalty testing, since all of the Point operations defined over them are much slower than the same ones defined over Extended or Projective coordinates.

Fields

X: FieldElementY: FieldElement

Trait Implementations

impl ConstantTimeEq for AffinePoint[src]

impl Debug for AffinePoint[src]

impl Default for AffinePoint[src]

fn default() -> AffinePoint[src]

Returns the default Twisted Edwards AffinePoint Coordinates: (0, 1).

impl Eq for AffinePoint[src]

impl From<AffinePoint> for EdwardsPoint[src]

fn from(point: AffinePoint) -> EdwardsPoint[src]

In affine form, each elliptic curve point has 2 coordinates, like (x,y). In the new projective form, each point will have 3 coordinates, like (X,Y,Z), with the restriction that Z is never zero.

The forward mapping is given by (X,Y)→(XZ,YZ,Z), for any non-zero z (usually chosen to be 1 for convenience).

After this is done, we move from Projective to Extended by setting the new coordinate T = X * Y.

impl From<AffinePoint> for ProjectivePoint[src]

fn from(point: AffinePoint) -> ProjectivePoint[src]

The key idea of projective coordinates is that instead of performing every division immediately, we defer the divisions by multiplying them into a denominator.

In affine form, each elliptic curve point has 2 coordinates, like (x,y). In the new projective form, each point will have 3 coordinates, like (X,Y,Z), with the restriction that Z is never zero.

The forward mapping is given by (x,y)→(xz,yz,z), for any non-zero z (usually chosen to be 1 for convenience).

impl From<EdwardsPoint> for AffinePoint[src]

fn from(point: EdwardsPoint) -> AffinePoint[src]

Given (X:Y:Z:T) in εε, passing to affine can be performed in 3M+ 1I by computing:

First, move to Projective Coordinates by removing T.

Then, reduce the point from Projective to Affine coordinates computing: (XZinv, YZinv, Z*Zinv).

And once Z coord = 1 we can simply remove it.

Twisted Edwards Curves Revisited - Huseyin Hisil, Kenneth Koon-Ho Wong, Gary Carter, and Ed Dawson.

impl From<ProjectivePoint> for AffinePoint[src]

fn from(point: ProjectivePoint) -> AffinePoint[src]

Reduce the point from Projective to Affine coordinates computing: (XZinv, YZinv, Z*Zinv).

And once the Z coord = 1 we can simply remove it.

Twisted Edwards Curves Revisited - Huseyin Hisil, Kenneth Koon-Ho Wong, Gary Carter, and Ed Dawson.

impl Identity for AffinePoint[src]

fn identity() -> AffinePoint[src]

Returns the Edwards Point identity value = (0, 1).

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

type Output = AffinePoint

The resulting type after applying the - operator.

fn neg(self) -> AffinePoint[src]

Negates an AffinePoint giving it as a result. Since the negative of a point is (-X:Y), it gives as a result: (-X, Y).

impl Neg for AffinePoint[src]

type Output = AffinePoint

The resulting type after applying the - operator.

fn neg(self) -> AffinePoint[src]

Negates an AffinePoint giving it as a result. Since the negative of a point is (-X:Y), it gives as a result: (-X, Y).

impl PartialEq<AffinePoint> for AffinePoint[src]

impl ValidityCheck for AffinePoint[src]

fn is_valid(&self) -> Choice[src]

Verifies if the curve equation holds given the (X, Y) coordinates of a point in Affine Coordinates.

Auto Trait Implementations

impl RefUnwindSafe for AffinePoint

impl Send for AffinePoint

impl Sync for AffinePoint

impl Unpin for AffinePoint

impl UnwindSafe for AffinePoint

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> Clear for T where
    T: InitializableFromZeroed + ?Sized

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

impl<T> InitializableFromZeroed for T where
    T: Default

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