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

Lessons

  1. 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. 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

Module quiz

1. What is gcd(84, 36)?
2. What is 23 mod 5?
3. Up to which divisor must you test to decide whether 97 is prime?
4. When does a have an inverse modulo m?
5. Which modular computation is fast even for a 1000-digit exponent?
6. Why is RSA hard to break?

‹ Counting and recurrencesGraphs and graph search ›