[−][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]
T: Rng + CryptoRng,
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]
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
[src]
fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
impl ConstantTimeEq for FieldElement
[src]
fn ct_eq(&self, other: &FieldElement) -> Choice
[src]
Test equality between two FieldElement
s. Since the
internal representation is not canonical, the field elements
are normalized to wire format before comparison.