[][src]Type Definition zerocaf::field::FieldElement

type FieldElement = FieldElement;

A FieldElement represents an element of the field 2^252 + 27742317777372353535851937790883648493

The FieldElement type is an alias for one of the platform-specific implementations.

Methods

impl FieldElement[src]

pub fn random<T>(rand: &mut T) -> FieldElement where
    T: Rng + CryptoRng
[src]

Generate a valid FieldElement choosen uniformly using user- provided rng.

By rng we mean any Rng that implements: Rng + CryptoRng.

Trait Implementations

impl ConditionallySelectable for FieldElement[src]

impl ConstantTimeEq for FieldElement[src]

fn ct_eq(&self, other: &FieldElement) -> Choice[src]

Test equality between two FieldElements. Since the internal representation is not canonical, the field elements are normalized to wire format before comparison.

impl<'_> Into<Scalar> for &'_ FieldElement[src]

impl PartialEq<FieldElement> for FieldElement[src]