Primes, Euler's Totient, Fermat's and Euler's Theorems
The number-theory foundation of asymmetric cryptography: how we find large primes and why they provide security.
Loading slides…
Open the PDF file
Summary
Students learn why primes and the fundamental theorem of arithmetic underpin the security of RSA, Diffie-Hellman and ElGamal. The lecture covers the distribution of primes (π(x) ≈ x/ln x), primality tests (trial division, the Fermat test, Carmichael numbers, Miller-Rabin) and the practical scheme for generating a 1024-bit prime. It then develops Euler's totient φ(n), Fermat's little theorem and Euler's theorem (the core of RSA correctness) and the discrete logarithm problem, with Python code.
Key terms
tub son
arifmetikaning asosiy teoremasi
π(x)
sinov bo'lish
Ferma testi
Karmaykl sonlari
Miller-Rabin
Eyler funksiyasi φ(n)
kichik Ferma teoremasi
Eyler teoremasi
diskret logarifm
φ(pq) = (p-1)(q-1)
Lecture outline
- Primes and the fundamental theorem of arithmetic
- Distribution of primes: π(x) and the “one in ~710” rule
- Trial division and the Fermat test; Carmichael numbers
- Miller-Rabin test: witnesses and the 4^(-k) error bound
- Generating a large prime: the practical scheme (1024 bits)
- Euler's totient φ(n) and its properties
- Fermat's little theorem and Euler's theorem — proofs and checks
- The discrete logarithm problem
- Python practice: Miller-Rabin and φ(n); summary