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 "$\text{mod } 2^{32(D + E)}$",
that is, dropping all carries and borrows.
This case does indeed have practical use, for instance, to calculate $65537^{-1} \text{ mod }(p - 1)$ via Arazi's Lemma.
Structs
| Modular | Modular integer, corresponds to the residue class "modulo modulus". |
| ModularField | |
| ModularRing | |
| Montgomery | Montgomery representation of $[x]_{n} := x\text{ }(\text{mod }n)$, as $[x \cdot 2^{-32L}]_n$. |
| PrimeModular | |
| Wrapping | Intentionally-wrapped arithmetic. |
Type Definitions
| LongModular | |
| ShortModular | |
| ShortMontgomery |