pub trait FieldExt: SqrtRatio + From<bool> + Ord + Group<Scalar = Self> {
    const MODULUS: &'static str;
    const ROOT_OF_UNITY_INV: Self;
    const DELTA: Self;
    const TWO_INV: Self;
    const ZETA: Self;

    fn from_u128(v: u128) -> Self;
    fn from_bytes_wide(bytes: &[u8; 64]) -> Self;
    fn get_lower_128(&self) -> u128;

    fn pow(&self, by: &[u64; 4]) -> Self { ... }
}
Expand description

This trait is a common interface for dealing with elements of a finite field.

Required Associated Constants

Modulus of the field written as a string for display purposes

Inverse of PrimeField::root_of_unity()

Generator of the $t-order$ multiplicative subgroup

Inverse of $2$ in the field.

Element of multiplicative order $3$.

Required Methods

Obtains a field element congruent to the integer v.

Obtains a field element that is congruent to the provided little endian byte representation of an integer.

Gets the lower 128 bits of this field element when expressed canonically.

Provided Methods

Exponentiates self by by, where by is a little-endian order integer exponent.

Implementors