Expand description
Implements ConstMontyForms, supporting modular arithmetic with a constant modulus.
Modulesยง
- add ๐
- Additions between integers in Montgomery form with a constant modulus.
- ct ๐
- Constant-time support: impls of
Ct*traits and constant-timeconst fnoperations. - invert ๐
- Multiplicative inverses of integers in Montgomery form with a constant modulus.
- lincomb ๐
- Linear combinations of integers n Montgomery form with a constant modulus.
- macros ๐
- Macros to remove the boilerplate code when dealing with constant moduli.
ConstMontyForm/ConstMontyParamssupport macros. - mod_
symbol ๐ - Modular symbol calculation for integers in Montgomery form with a constant modulus.
- mul ๐
- Multiplications between integers in Montgomery form with a constant modulus.
- neg ๐
- Negations of integers in Montgomery form with a constant modulus.
- pow ๐
- Exponentiation of integers in Montgomery form with a constant modulus.
- reduce ๐
- sqrt ๐
- sub ๐
- Subtractions between integers in Montgomery form with a constant modulus.
Structsยง
- Const
Monty Form - An integer in Montgomery form modulo
MOD, represented usingLIMBSlimbs. The modulus is constant, so it cannot be set at runtime.
Traitsยง
- Const
Monty Params - Trait representing a modulus and its associated constants for converting in and out of Montgomery form.
- Const
Prime Monty Params - Trait representing a prime modulus and its associated constants for converting in and out of Montgomery form.