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