Trait snarkvm_fields::FieldParameters [−][src]
A trait that defines parameters for a prime field.
Associated Types
type BigInteger: BigInteger
[src]
Associated Constants
const MODULUS: Self::BigInteger
[src]
The modulus of the field.
const MODULUS_BITS: u32
[src]
The number of bits needed to represent the Self::MODULUS
.
const REPR_SHAVE_BITS: u32
[src]
The number of bits that must be shaved from the beginning of the representation when randomly sampling.
const R: Self::BigInteger
[src]
R = 2^256 % Self::MODULUS
const R2: Self::BigInteger
[src]
R2 = R^2 % Self::MODULUS
const INV: u64
[src]
INV = -(MODULUS^{-1} mod MODULUS) mod MODULUS
const GENERATOR: Self::BigInteger
[src]
A multiplicative generator that is also a quadratic nonresidue.
Self::GENERATOR
is an element having multiplicative order
Self::MODULUS - 1
.
There also does not exist x
such that Self::GENERATOR = x^2 % Self::MODULUS
const CAPACITY: u32
[src]
The number of bits that can be reliably stored.
(Should equal SELF::MODULUS_BITS - 1
)
const TWO_ADICITY: u32
[src]
2^s * t = MODULUS - 1 with t odd. This is the two-adicity of the prime.
const ROOT_OF_UNITY: Self::BigInteger
[src]
2^s root of unity computed by GENERATOR^t
const T: Self::BigInteger
[src]
t for 2^s * t = MODULUS - 1
const T_MINUS_ONE_DIV_TWO: Self::BigInteger
[src]
(t - 1) / 2
const MODULUS_MINUS_ONE_DIV_TWO: Self::BigInteger
[src]
(Self::MODULUS - 1) / 2