Trait snarkvm_wasm::PrimeField [−][src]
pub trait PrimeField: Field + FromStr { type Parameters: FieldParameters; type BigInteger: BigInteger; fn from_repr(repr: Self::BigInteger) -> Option<Self>; fn into_repr(&self) -> Self::BigInteger; fn from_repr_raw(repr: Self::BigInteger) -> Self; fn into_repr_raw(&self) -> Self::BigInteger; fn multiplicative_generator() -> Self; fn root_of_unity() -> Self; fn qnr_to_t() -> Self { ... } fn size_in_bits() -> usize { ... } fn trace() -> Self::BigInteger { ... } fn trace_minus_one_div_two() -> Self::BigInteger { ... } fn modulus_minus_one_div_two() -> Self::BigInteger { ... } }
Expand description
The interface for a prime field.
Associated Types
type Parameters: FieldParameters[src]
type BigInteger: BigInteger[src]
Required methods
fn from_repr(repr: Self::BigInteger) -> Option<Self>[src]
fn from_repr(repr: Self::BigInteger) -> Option<Self>[src]Returns a prime field element from its underlying representation.
fn into_repr(&self) -> Self::BigInteger[src]
fn into_repr(&self) -> Self::BigInteger[src]Returns the underlying representation of the prime field element.
fn from_repr_raw(repr: Self::BigInteger) -> Self[src]
fn from_repr_raw(repr: Self::BigInteger) -> Self[src]Returns a prime field element from its underlying raw representation.
fn into_repr_raw(&self) -> Self::BigInteger[src]
fn into_repr_raw(&self) -> Self::BigInteger[src]Returns the underlying raw representation of the prime field element.
fn multiplicative_generator() -> Self[src]
fn multiplicative_generator() -> Self[src]Returns the multiplicative generator of char() - 1 order.
fn root_of_unity() -> Self[src]
fn root_of_unity() -> Self[src]Returns the 2^s root of unity.
Provided methods
fn size_in_bits() -> usize[src]
fn size_in_bits() -> usize[src]Returns the field size in bits.
fn trace() -> Self::BigInteger[src]
fn trace() -> Self::BigInteger[src]Returns the trace.
fn trace_minus_one_div_two() -> Self::BigInteger[src]
fn trace_minus_one_div_two() -> Self::BigInteger[src]Returns the trace minus one divided by two.
fn modulus_minus_one_div_two() -> Self::BigInteger[src]
fn modulus_minus_one_div_two() -> Self::BigInteger[src]Returns the modulus minus one divided by two.
Implementors
impl<P> PrimeField for Fp256<P> where
P: Fp256Parameters, [src]
impl<P> PrimeField for Fp256<P> where
P: Fp256Parameters, [src]type BigInteger = BigInteger256
type Parameters = P
pub fn from_repr(r: BigInteger256) -> Option<Fp256<P>>[src]
pub fn into_repr(&self) -> BigInteger256[src]
pub fn from_repr_raw(r: BigInteger256) -> Fp256<P>[src]
pub fn into_repr_raw(&self) -> BigInteger256[src]
pub fn multiplicative_generator() -> Fp256<P>[src]
pub fn root_of_unity() -> Fp256<P>[src]
impl<P> PrimeField for Fp320<P> where
P: Fp320Parameters, [src]
impl<P> PrimeField for Fp320<P> where
P: Fp320Parameters, [src]type BigInteger = BigInteger320
type Parameters = P
pub fn from_repr(r: BigInteger320) -> Option<Fp320<P>>[src]
pub fn into_repr(&self) -> BigInteger320[src]
pub fn from_repr_raw(r: BigInteger320) -> Fp320<P>[src]
pub fn into_repr_raw(&self) -> BigInteger320[src]
pub fn multiplicative_generator() -> Fp320<P>[src]
pub fn root_of_unity() -> Fp320<P>[src]
impl<P> PrimeField for Fp384<P> where
P: Fp384Parameters, [src]
impl<P> PrimeField for Fp384<P> where
P: Fp384Parameters, [src]type BigInteger = BigInteger384
type Parameters = P
pub fn from_repr(r: BigInteger384) -> Option<Fp384<P>>[src]
pub fn into_repr(&self) -> BigInteger384[src]
pub fn from_repr_raw(r: BigInteger384) -> Fp384<P>[src]
pub fn into_repr_raw(&self) -> BigInteger384[src]
pub fn multiplicative_generator() -> Fp384<P>[src]
pub fn root_of_unity() -> Fp384<P>[src]
impl<P> PrimeField for Fp768<P> where
P: Fp768Parameters, [src]
impl<P> PrimeField for Fp768<P> where
P: Fp768Parameters, [src]type BigInteger = BigInteger768
type Parameters = P
pub fn from_repr(r: BigInteger768) -> Option<Fp768<P>>[src]
pub fn into_repr(&self) -> BigInteger768[src]
pub fn from_repr_raw(r: BigInteger768) -> Fp768<P>[src]
pub fn into_repr_raw(&self) -> BigInteger768[src]
pub fn multiplicative_generator() -> Fp768<P>[src]
pub fn root_of_unity() -> Fp768<P>[src]
pub fn size_in_bits() -> usize[src]
pub fn trace() -> BigInteger768[src]
pub fn trace_minus_one_div_two() -> BigInteger768[src]
pub fn modulus_minus_one_div_two() -> BigInteger768[src]
impl<P> PrimeField for Fp832<P> where
P: Fp832Parameters, [src]
impl<P> PrimeField for Fp832<P> where
P: Fp832Parameters, [src]