Benjamin Italiaander / Topics / Prime numbers

Primes, clock arithmetic and the number theory that RSA, Diffie–Hellman and elliptic curves are built on.

Math / Public Key Cryptography
Practise modular arithmetic step by step: remainders, negative numbers, inverses, the extended Euclidean algorithm, solving equations, Fermat's little theorem, and where you already use it (weekdays, IBAN, ISBN).
Math / Public Key Cryptography
Play both sides of a Diffie–Hellman exchange, see why the group must have a large prime order, run a man-in-the-middle attack and a small-subgroup attack with real numbers, take a discrete log apart with Pohlig–Hellman, and see which groups real protocols use.
Math / Public Key Cryptography
Sign and verify with Schnorr and ECDSA on a small curve, see why Schnorr is secure (identification and Fiat–Shamir), extract a private key from a reused nonce in both schemes, and see how Ed25519 makes that impossible.
Math / Public Key Cryptography
Practise the one-way functions behind public-key cryptography: square-and-multiply by hand, discrete logarithms, generators, baby-step giant-step, and factoring (and why primes that are close together are a disaster).
Math / Public Key Cryptography
Build RSA keys by hand, encrypt, decrypt and sign, see the full proof of why it works, speed it up with the Chinese remainder theorem, break textbook RSA in five different ways, and read a real OpenSSL key.
Math / Public Key Cryptography
Derive the point-addition formulas yourself, find every point on a curve by hand, compute with double-and-add, do ECDH on two small curves, and see how Curve25519, X25519, the Montgomery ladder and Edwards curves turn this into the key exchange in every SSH and HTTPS connection.
Math / Public Key Cryptography
What prime numbers are, why there are infinitely many, how many there are, Euler's φ and Fermat's little theorem with proofs, how computers test whether a 300-digit number is prime, and the special primes used in real cryptography. With exercises.
Math / Public Key Cryptography
Where the 77 digits of Curve25519 and the 925 digits of an RSA-3072 key come from, what 128-bit security means, why RSA needs twelve times more digits than an elliptic curve, why we don't simply use bigger numbers, and what quantum computers change.

Other topics

All topics and genres →