Modular arithmetic and RSA: how public-key codes use primes
12 steps · about 4 h 2 min · Intermediate
- Modular Arithmetic - Clock Math to RSA Cryptography (article, AllTools, 15 min)
It starts with clock arithmetic and remainders, the base idea for everything after it.
- Public Key Cryptography - Computerphile (video, Computerphile (YouTube), 10 min)
It explains what public and private keys are for before any maths is introduced.
- The Euclidean algorithm (article, Khan Academy, 20 min)
The GCD tool is needed to check that numbers are coprime and to find modular inverses.
- Modular inverses (article, Khan Academy, 20 min)
The private key is a modular inverse, so this is the central skill for RSA.
- Prime Numbers & RSA Encryption Algorithm - Computerphile (video, Computerphile (YouTube), 15 min)
It shows how large primes feed into RSA, and makes the earlier maths concrete.
- The RSA Encryption Algorithm (Eddie Woo): generating the keys (video, Eddie Woo (YouTube), 15 min)
A classroom walk-through of choosing p, q, e and d.
- The RSA Encryption Algorithm (Eddie Woo): computing an example (video, Eddie Woo (YouTube), 15 min)
A full numeric encrypt and decrypt example to copy before you try your own.
- Cryptography for the Everyday Developer: Modular Arithmetic (article, Kevin Sookocheff, 20 min)
It connects the by-hand steps to how RSA, Diffie-Hellman and other public-key systems are used.
- Powers in Modular Arithmetic, and RSA Public Key Cryptography (article, University of Utah (ACCESS 2013), 30 min)
Small primes (p=3, q=5) and Fermat's little theorem show why decryption works.
- Cryptography: RSA: Mathematics (article, Paj's Home, 30 min)
It gives the full correctness proof once the pieces are familiar.
- Breaking RSA - Computerphile (video, Computerphile (YouTube), 12 min)
It shows how poorly chosen primes break RSA, which is why factoring matters for security.
- CS5431 Lecture 4: RSA (reference, Cornell University, 40 min)
University-level notes cover practical details such as fast exponentiation and the CRT speed-up.