[−][src]Trait wagyu_zcash::librustzcash::algebra::field::Field
This trait represents an element of a field.
Required methods
fn random<R: RngCore>(rng: &mut R) -> Self
Returns an element chosen uniformly at random using a user-provided RNG.
fn zero() -> Self
Returns the zero element of the field, the additive identity.
fn one() -> Self
Returns the one element of the field, the multiplicative identity.
fn is_zero(&self) -> bool
Returns true iff this element is zero.
fn square(&mut self)
Squares this element.
fn double(&mut self)
Doubles this element.
fn negate(&mut self)
Negates this element.
fn add_assign(&mut self, other: &Self)
Adds another element to this element.
fn sub_assign(&mut self, other: &Self)
Subtracts another element from this element.
fn mul_assign(&mut self, other: &Self)
Multiplies another element by this element.
fn inverse(&self) -> Option<Self>
Computes the multiplicative inverse of this element, if nonzero.
fn frobenius_map(&mut self, power: usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism.
Provided methods
fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self
Exponentiates this element by a number represented with u64
limbs,
least significant digit first.
Implementors
impl Field for Fq
[src]
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
Computes a uniformly random element using rejection sampling.
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn add_assign(&mut self, other: &Fq)
[src]
fn double(&mut self)
[src]
fn sub_assign(&mut self, other: &Fq)
[src]
fn negate(&mut self)
[src]
fn inverse(&self) -> Option<Self>
[src]
fn frobenius_map(&mut self, _: usize)
[src]
fn mul_assign(&mut self, other: &Fq)
[src]
fn square(&mut self)
[src]
impl Field for Fq12
[src]
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn double(&mut self)
[src]
fn negate(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn sub_assign(&mut self, other: &Self)
[src]
fn frobenius_map(&mut self, power: usize)
[src]
fn square(&mut self)
[src]
fn mul_assign(&mut self, other: &Self)
[src]
fn inverse(&self) -> Option<Self>
[src]
impl Field for Fq2
[src]
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn square(&mut self)
[src]
fn double(&mut self)
[src]
fn negate(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn sub_assign(&mut self, other: &Self)
[src]
fn mul_assign(&mut self, other: &Self)
[src]
fn inverse(&self) -> Option<Self>
[src]
fn frobenius_map(&mut self, power: usize)
[src]
impl Field for Fq6
[src]
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn double(&mut self)
[src]
fn negate(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn sub_assign(&mut self, other: &Self)
[src]
fn frobenius_map(&mut self, power: usize)
[src]
fn square(&mut self)
[src]
fn mul_assign(&mut self, other: &Self)
[src]
fn inverse(&self) -> Option<Self>
[src]
impl Field for Fr
[src]
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
Computes a uniformly random element using rejection sampling.