Trait ark_ff::fields::PrimeField[][src]

pub trait PrimeField: Field<BasePrimeField = Self> + FftField<FftParams = Self::Params> + FromStr + From<Self::BigInt> + Into<Self::BigInt> {
    type Params: FpParameters<BigInt = Self::BigInt>;
    type BigInt: BigInteger;
    fn from_repr(repr: Self::BigInt) -> Option<Self>;
fn into_repr(&self) -> Self::BigInt; fn from_be_bytes_mod_order(bytes: &[u8]) -> Self { ... }
fn from_le_bytes_mod_order(bytes: &[u8]) -> Self { ... }
fn qnr_to_t() -> Self { ... }
fn size_in_bits() -> usize { ... }
fn trace() -> Self::BigInt { ... }
fn trace_minus_one_div_two() -> Self::BigInt { ... }
fn modulus_minus_one_div_two() -> Self::BigInt { ... } }

The interface for a prime field.

Associated Types

Loading content...

Required methods

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

Returns a prime field element from its underlying representation.

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

Returns the underlying representation of the prime field element.

Loading content...

Provided methods

fn from_be_bytes_mod_order(bytes: &[u8]) -> Self[src]

Reads bytes in big-endian, and converts them to a field element. If the bytes are larger than the modulus, it will reduce them.

fn from_le_bytes_mod_order(bytes: &[u8]) -> Self[src]

Reads bytes in little-endian, and converts them to a field element. If the bytes are larger than the modulus, it will reduce them.

fn qnr_to_t() -> Self[src]

Return the QNR^t, for t defined by 2^s * t = MODULUS - 1, and t coprime to 2.

fn size_in_bits() -> usize[src]

Returns the field size in bits.

fn trace() -> Self::BigInt[src]

Returns the trace.

fn trace_minus_one_div_two() -> Self::BigInt[src]

Returns the trace minus one divided by two.

fn modulus_minus_one_div_two() -> Self::BigInt[src]

Returns the modulus minus one divided by two.

Loading content...

Implementors

Loading content...