Number theory and RSA
Divisibility, primes and the gcd, then modular arithmetic, inverses and fast powers, ending with how RSA encryption works.
About 6 hours of study
Learning objectives
- Compute quotients, remainders, gcd and lcm
- Find modular inverses and fast modular powers
- Walk through RSA key generation and encryption
Lessons
- 1
Divisibility, primes and the gcd
Division with remainder, primes and the sieve of Eratosthenes, unique factorization, the greatest common divisor by Euclid's algorithm, and the lcm.
- 2
Modular arithmetic and RSA Advanced
Congruences and clock arithmetic, modular inverses with the extended Euclidean algorithm, fast modular powers, Fermat's little theorem, and how RSA encryption works.
Module practice
- gcd and lcmEasy
- Prime factorizationMedium
- Divisors, sums and perfect numbersHard
- Clock arithmeticEasy
- Modular inverseMedium
- A tiny RSAHard