Computer Science · Cryptography
Codes & Ciphers Lab
Turn a cipher wheel, set up an Enigma, crack codes by counting letters, then break a toy RSA key.
Also on your phone · Learn Cryptography
The course
4 worlds · 20 lessons

World 1 · Substitution
FREESwap every letter for another- 01The Caesar shiftEvery letter moves the same distance · 6 min
- 02ROT13: the shift that undoes itselfHalf the alphabet, twice · 5 min
- 03Atbash: the mirrored alphabetA becomes Z, B becomes Y · 5 min
- 04Affine: multiply, then shiftE(x) = a·x + b (mod 26) · 7 min
- 05Keyword substitutionAny shuffle of the alphabet · 7 min

World 2 · Many alphabets & shuffles
PROVigenère, rail fence, columnar, Playfair- 01Vigenère: many Caesars at onceA keyword sets a different shift for every letter · 8 minPRO
- 02Autokey & BeaufortTwo twists on the same idea · 7 minPRO
- 03Rail fence: letters on the moveTransposition keeps every letter but changes its place · 6 minPRO
- 04Columnar transpositionWrite in rows, read in keyword order · 7 minPRO
- 05Playfair: letters in pairsA 5×5 square defeats single-letter counts · 8 minPRO

World 3 · Codebreaking & machines
PROFrequency analysis, Kasiski, Enigma- 01Frequency analysisE is the most common letter in English · 7 minPRO
- 02Cracking a substitutionCounts, short words and patterns · 12 minPRO
- 03Breaking VigenèreFind the key length, then crack each column · 10 minPRO
- 04The Enigma machineRotors that turn with every key · 10 minPRO
- 05Breaking EnigmaCribs and the double step · 10 minPRO

World 4 · Modern cryptography
PROHashes, public keys and key sizes- 01Hash functionsA fingerprint for any data · 7 minPRO
- 02The avalanche effectOne bit in, half the bits out · 5 minPRO
- 03Passwords and guessingWhy length beats cleverness · 6 minPRO
- 04Public keys and RSAA lock anyone can close, only you can open · 10 minPRO
- 05Why key size mattersFactor n and the key falls · 8 minPRO
