Module rsa_cortex_m4::arithmetic [β][src]
Modular arithmetic (for moduli that are either Convenient
or word-sized powers-of-two).
For Modular
, we use incompletely reduced representations internally
(which can be implemented on a word-level), offering a complete reduction
for external use (which needs to be implemented on a bit-level).
For Wrapping<Unsigned>
, we implement operations "",
that is, dropping all carries and borrows.
This case does indeed have practical use, for instance, to calculate via Arazi's Lemma.
Structs
Modular | Modular integer, corresponds to the residue class "modulo modulus". |
ModularField | |
ModularRing | |
Montgomery | Montgomery representation of , as . |
PrimeModular | |
Wrapping | Intentionally-wrapped arithmetic. |
Type Definitions
LongModular | |
ShortModular | |
ShortMontgomery |