Two classical theorems are the arithmetic heart of RSA: Fermat’s one for prime moduli and its generalisation due to Euler for arbitrary moduli.
Theorem — Fermat's little theorem
If is prime and , then
Theorem — Euler
Let be the number of integers in coprime with (Euler’s totient function). If , then
For a historical re-reading of Fermat and Euler on modular residues see Stillwell (ch. 3).
Computing . If with distinct primes, . Example: .
Links
Topics: Distribuzioni probabilita
Concepts: Aritmetica modulare · Funzione di eulero
Skills: Usare formule
People: Leonhard Euler (Eulero) · Pierre de Fermat