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

pub trait PrimeField: Field<BasePrimeField = Self> + FftField<FftParams = Self::Params> + FromStr + From<Self::BigInt> + Into<Self::BigInt> + From<BigUint> + Into<BigUint> {
    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 { ... } }
Expand description

The interface for a prime field.

Associated Types

Required methods

Returns a prime field element from its underlying representation.

Returns the underlying representation of the prime field element.

Provided methods

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

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

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

Returns the field size in bits.

Returns the trace.

Returns the trace minus one divided by two.

Returns the modulus minus one divided by two.

Implementors