[][src]Trait zerocaf::traits::Identity

pub trait Identity {
#[must_use]
    fn identity() -> Self;
}

Gives the Identity element for the type which it has been implemented on.

This trait is implemented following the rules that mandate over the Type that is being implemented.

Required methods

#[must_use] fn identity() -> Self

Returns the identity element for the implemented type, following it's mathematical rules.

Loading content...

Implementors

impl Identity for FieldElement[src]

fn identity() -> FieldElement[src]

Returns the Identity element over the finite field modulo 2^252 + 27742317777372353535851937790883648493.

It is defined as 1 on FieldElement format, and is therefore written as: [1, 0, 0, 0, 0].

impl Identity for Scalar[src]

fn identity() -> Scalar[src]

Returns the Identity element for Scalar which equals 1 (mod l).

impl Identity for AffinePoint[src]

fn identity() -> AffinePoint[src]

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

impl Identity for CompressedEdwardsY[src]

fn identity() -> CompressedEdwardsY[src]

Returns the CompressedEdwardsY identity point value that corresponds to 1 (mod l) with the x-sign bit setted to 0.

impl Identity for EdwardsPoint[src]

fn identity() -> EdwardsPoint[src]

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

impl Identity for ProjectivePoint[src]

fn identity() -> ProjectivePoint[src]

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

impl Identity for CompressedRistretto[src]

fn identity() -> CompressedRistretto[src]

Returns the Identity point on CompressedRistretto format.

impl Identity for RistrettoPoint[src]

fn identity() -> RistrettoPoint[src]

Gives back the Identity point for the Extended Edwards Coordinates which is endoded as a RistrettoPoint with coordinates: (X, Y, Z, T) = (0, 1, 1, 0).

Loading content...