[][src]Trait snarkvm_models::curves::primefield::PrimeField

pub trait PrimeField: Field + FromStr {
    type Parameters: FpParameters<BigInteger = Self::BigInteger>;
    type BigInteger: BigInteger;
    pub fn from_repr(repr: Self::BigInteger) -> Option<Self>;
pub fn into_repr(&self) -> Self::BigInteger;
pub fn from_repr_raw(repr: Self::BigInteger) -> Self;
pub fn into_repr_raw(&self) -> Self::BigInteger;
pub fn multiplicative_generator() -> Self;
pub fn root_of_unity() -> Self; pub fn qnr_to_t() -> Self { ... }
pub fn size_in_bits() -> usize { ... }
pub fn trace() -> Self::BigInteger { ... }
pub fn trace_minus_one_div_two() -> Self::BigInteger { ... }
pub fn modulus_minus_one_div_two() -> Self::BigInteger { ... } }

The interface for a prime field.

Associated Types

Loading content...

Required methods

pub fn from_repr(repr: Self::BigInteger) -> Option<Self>[src]

Returns a prime field element from its underlying representation.

pub fn into_repr(&self) -> Self::BigInteger[src]

Returns the underlying representation of the prime field element.

pub fn from_repr_raw(repr: Self::BigInteger) -> Self[src]

Returns a prime field element from its underlying raw representation.

pub fn into_repr_raw(&self) -> Self::BigInteger[src]

Returns the underlying raw representation of the prime field element.

pub fn multiplicative_generator() -> Self[src]

Returns the multiplicative generator of char() - 1 order.

pub fn root_of_unity() -> Self[src]

Returns the 2^s root of unity.

Loading content...

Provided methods

pub fn qnr_to_t() -> Self[src]

Return the a QNR^T

pub fn size_in_bits() -> usize[src]

Returns the field size in bits.

pub fn trace() -> Self::BigInteger[src]

Returns the trace.

pub fn trace_minus_one_div_two() -> Self::BigInteger[src]

Returns the trace minus one divided by two.

pub fn modulus_minus_one_div_two() -> Self::BigInteger[src]

Returns the modulus minus one divided by two.

Loading content...

Implementors

impl<P: Fp256Parameters> PrimeField for Fp256<P>[src]

type BigInteger = BigInteger

type Parameters = P

impl<P: Fp320Parameters> PrimeField for Fp320<P>[src]

type BigInteger = BigInteger

type Parameters = P

impl<P: Fp384Parameters> PrimeField for Fp384<P>[src]

type BigInteger = BigInteger

type Parameters = P

impl<P: Fp768Parameters> PrimeField for Fp768<P>[src]

impl<P: Fp832Parameters> PrimeField for Fp832<P>[src]

Loading content...