Module constant_mod
Expand description
Implements Residues, supporting modular arithmetic with a constant modulus.
Structs§
- Residue
- A residue mod
MOD, represented usingLIMBSlimbs. 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§
- Residue
Params - 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.