Skip to main content

Module constant_mod

Module constant_mod 

Expand description

Implements Residues, supporting modular arithmetic with a constant modulus.

Structs§

Residue
A residue mod MOD, represented using LIMBS limbs. The modulus of this residue is constant, so it cannot be set at runtime. Internally, the value is stored in Montgomery form (multiplied by MOD::R) until it is retrieved.

Traits§

ResidueParams
The parameters to efficiently go to and from the Montgomery form for a given odd modulus. An easy way to generate these parameters is using the impl_modulus! macro. These parameters are constant, so they cannot be set at runtime.