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
type Params: FpParameters<BigInt = Self::BigInt>
[src]type BigInt: BigInteger
[src]Required methods
Returns a prime field element from its underlying representation.
Provided methods
fn from_be_bytes_mod_order(bytes: &[u8]) -> Self
[src]
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]
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.
Return the QNR^t, for t defined by
2^s * t = MODULUS - 1
, and t coprime to 2.
fn size_in_bits() -> usize
[src]
fn size_in_bits() -> usize
[src]Returns the field size in bits.
fn trace_minus_one_div_two() -> Self::BigInt
[src]
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]
fn modulus_minus_one_div_two() -> Self::BigInt
[src]Returns the modulus minus one divided by two.
Implementors
type Params = P
type BigInt = BigInteger64
type Params = P
type BigInt = BigInteger256
type Params = P
type BigInt = BigInteger320
type Params = P
type BigInt = BigInteger384
type Params = P
type BigInt = BigInteger448
type Params = P
type BigInt = BigInteger768
type Params = P
type BigInt = BigInteger832