Module fp

Source

Macros§

MontFp
Construct a Fp<MontBackend<T, N>, N> element from a literal string. This should be used primarily for constructing constant field elements; in a non-const context, Fp::from_str is preferable.

Structs§

Fp
Represents an element of the prime field F_p, where p == P::MODULUS. This type can represent elements in any field of size at most N * 64 bits.
MontBackend

Traits§

FpConfig
A trait that specifies the configuration of a prime field. Also specifies how to perform arithmetic on field elements.
MontConfig
A trait that specifies the constants and arithmetic procedures for Montgomery arithmetic over the prime field defined by MODULUS.

Functions§

can_use_no_carry_mul_optimization
can_use_no_carry_square_optimization
inv
Compute -M^{-1} mod 2^64.
modulus_has_spare_bit
sqrt_precomputation

Type Aliases§

Fp64
Fp128
Fp192
Fp256
Fp320
Fp384
Fp448
Fp512
Fp576
Fp640
Fp704
Fp768
Fp832

Derive Macros§

MontConfig
Derive the MontConfig trait.