Struct pairing::bls12_381::Fr
[−]
[src]
pub struct Fr(_);
Trait Implementations
impl Copy for Fr
[src]
impl Clone for Fr
[src]
fn clone(&self) -> Fr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Fr
[src]
fn eq(&self, __arg_0: &Fr) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fr) -> bool
This method tests for !=
.
impl Eq for Fr
[src]
impl Debug for Fr
[src]
impl Display for Fr
[src]
impl Rand for Fr
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
Generates a random instance of this type using the specified source of randomness. Read more
impl PrimeField for Fr
[src]
type Repr = FrRepr
The prime field can be converted back and forth into this biginteger representation. Read more
fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
fn into_repr(&self) -> FrRepr
Convert a biginteger reprensentation into a prime field element, if the number is an element of the field. Read more
fn char() -> FrRepr
Returns the field characteristic; the modulus.
fn num_bits() -> u32
Returns how many bits are needed to represent an element of this field. Read more
fn capacity() -> u32
Returns how many bits of information can be reliably stored in the field element. Read more
fn multiplicative_generator() -> Self
Returns the multiplicative generator of char()
- 1 order. This element must also be quadratic nonresidue. Read more
fn s() -> usize
Returns s such that 2s * t = char()
- 1 with t odd.
fn root_of_unity() -> Self
Returns the 2s root of unity computed by exponentiating the multiplicative_generator()
by t. Read more
impl Field for Fr
[src]
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 add_assign(&mut self, other: &Fr)
Adds another element to this element.
fn double(&mut self)
Doubles this element.
fn sub_assign(&mut self, other: &Fr)
Subtracts another element from this element.
fn negate(&mut self)
Negates this element.
fn inverse(&self) -> Option<Self>
Computes the multiplicative inverse of this element, if nonzero.
fn frobenius_map(&mut self, _: usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
fn mul_assign(&mut self, other: &Fr)
Multiplies another element by this element.
fn square(&mut self)
Squares this element.
fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self
Exponentiates this element by a number represented with u64
limbs, least significant digit first. Read more