Struct threshold_crypto::Fr
source · pub struct Fr(_);
Trait Implementations§
source§impl Field for Fr
impl Field for Fr
source§fn add_assign(&mut self, other: &Fr)
fn add_assign(&mut self, other: &Fr)
Adds another element to this element.
source§fn sub_assign(&mut self, other: &Fr)
fn sub_assign(&mut self, other: &Fr)
Subtracts another element from this element.
source§fn inverse(&self) -> Option<Fr>
fn inverse(&self) -> Option<Fr>
Computes the multiplicative inverse of this element, if nonzero.
source§fn frobenius_map(&mut self, _: usize)
fn frobenius_map(&mut self, _: usize)
Exponentiates this element by a power of the base prime modulus via
the Frobenius automorphism. Read more
source§fn mul_assign(&mut self, other: &Fr)
fn mul_assign(&mut self, other: &Fr)
Multiplies another element by this element.
source§impl MulAssign<Fr> for Poly
impl MulAssign<Fr> for Poly
source§fn mul_assign(&mut self, rhs: Fr)
fn mul_assign(&mut self, rhs: Fr)
Performs the
*=
operation. Read moresource§impl PrimeField for Fr
impl PrimeField for Fr
§type Repr = FrRepr
type Repr = FrRepr
The prime field can be converted back and forth into this biginteger
representation. Read more
source§fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
source§fn into_repr(&self) -> FrRepr
fn into_repr(&self) -> FrRepr
Convert a biginteger representation into a prime field element, if
the number is an element of the field. Read more
source§const CAPACITY: u32 = 254u32
const CAPACITY: u32 = 254u32
How many bits of information can be reliably stored in the field element.
source§fn multiplicative_generator() -> Fr
fn multiplicative_generator() -> Fr
Returns the multiplicative generator of
char()
- 1 order. This element
must also be quadratic nonresidue. Read moresource§fn root_of_unity() -> Fr
fn root_of_unity() -> Fr
Returns the 2^s root of unity computed by exponentiating the
multiplicative_generator()
by t. Read more