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
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Fr
[src]
fn eq(&self, __arg_0: &Fr) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fr) -> bool
[src]
This method tests for !=
.
impl Eq for Fr
[src]
impl Debug for Fr
[src]
impl Display for Fr
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Rand for Fr
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
[src]
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>
[src]
Convert this prime field element into a biginteger representation.
fn into_repr(&self) -> FrRepr
[src]
Convert a biginteger representation into a prime field element, if the number is an element of the field. Read more
fn char() -> FrRepr
[src]
Returns the field characteristic; the modulus.
const NUM_BITS: u32
NUM_BITS: u32 = MODULUS_BITS
How many bits are needed to represent an element of this field.
const CAPACITY: u32
CAPACITY: u32 = <Self>::NUM_BITS - 1
How many bits of information can be reliably stored in the field element.
fn multiplicative_generator() -> Self
[src]
Returns the multiplicative generator of char()
- 1 order. This element must also be quadratic nonresidue. Read more
const S: u32
S: u32 = S
2s * t = char()
- 1 with t odd.
fn root_of_unity() -> Self
[src]
Returns the 2s root of unity computed by exponentiating the multiplicative_generator()
by t. Read more
fn from_str(s: &str) -> Option<Self>
[src]
Interpret a string of numbers as a (congruent) prime field element. Does not accept unnecessary leading zeroes or a blank string. Read more
impl Field for Fr
[src]
fn zero() -> Self
[src]
Returns the zero element of the field, the additive identity.
fn one() -> Self
[src]
Returns the one element of the field, the multiplicative identity.
fn is_zero(&self) -> bool
[src]
Returns true iff this element is zero.
fn add_assign(&mut self, other: &Fr)
[src]
Adds another element to this element.
fn double(&mut self)
[src]
Doubles this element.
fn sub_assign(&mut self, other: &Fr)
[src]
Subtracts another element from this element.
fn negate(&mut self)
[src]
Negates this element.
fn inverse(&self) -> Option<Self>
[src]
Computes the multiplicative inverse of this element, if nonzero.
fn frobenius_map(&mut self, _: usize)
[src]
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
fn mul_assign(&mut self, other: &Fr)
[src]
Multiplies another element by this element.
fn square(&mut self)
[src]
Squares this element.
fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self
[src]
Exponentiates this element by a number represented with u64
limbs, least significant digit first. Read more