Cryptography is the discipline of writing messages so that only the intended reader can understand them. Its sister art, cryptanalysis, is the discipline of reading those messages without permission. Together they form the longest-running adversarial competition in human history. Every cipher in this course is a snapshot of where that competition stood at one moment in time. Every one of them was eventually broken, and every break drove the next invention.
The ciphers below are arranged in roughly chronological order. The Caesar cipher, brutally simple, served Roman generals well enough until everyone figured out the trick. The general substitution cipher fixed Caesar's tiny key space but left letter frequencies untouched, and that flaw doomed it to a ninth-century Arab scholar with a tally sheet. The Vigenère cipher, called le chiffre indéchiffrable for three centuries, finally fell to Charles Babbage and a Prussian infantry officer working independently. The Enigma machine, discussed later in the course, was the industrialization of this same idea, and breaking it changed the course of a world war.
What you should take from this collection is not nostalgia. It is a working understanding of how cryptographic systems fail. Modern algorithms are far stronger than these classical ones, but they fail for the same reasons: predictable keys, reused state, leaked structure, mathematics that turned out to be easier than its inventors hoped. The puzzles below are training, not tourism.
The simplest substitution cipher there is. Pick a number from 1 to 25, slide every letter forward that many positions, wrap around at Z. There are only 25 possible keys, so brute force solves it instantly. Useful for one thing only: building intuition.
Each letter maps to a different letter according to a fixed but arbitrary table. The key space explodes to 26! (about 4 × 10²⁶ keys), so brute force is hopeless. But the cipher preserves letter frequencies, and that one structural leak is enough to break it with a tally chart and patience.
A polyalphabetic cipher: every plaintext letter is shifted by a different amount, controlled by a repeating keyword. Frequency analysis fails because the shift changes underneath you. Called le chiffre indéchiffrable for three centuries, until Babbage and Kasiski found that the repetition itself is the weakness.
The Enigma machine takes the Vigenère idea and grinds it through hardware. Three (later four) rotating wheels, each implementing a substitution alphabet, advance with every keypress. A plugboard adds another layer of swapping before and after the rotors. The effective key space climbs into the quintillions.
Used by the German military throughout the Second World War, Enigma seemed unbreakable from the outside. From the inside, it leaked. Polish cryptanalysts (Marian Rejewski, Jerzy Różycki, Henryk Zygalski) made the first mathematical breaks in the 1930s. The British team at Bletchley Park, led informally by Alan Turing, industrialized the attack with electromechanical machines called Bombes. Historians estimate the resulting intelligence shortened the war in Europe by two years.
Enigma is the bridge between the classical ciphers above and the modern algorithms that follow. We will return to it in a later lecture and break it together.
▸ Module IV · Enter the MachineEvery cipher in the games above violates this principle to some degree. The Caesar cipher's algorithm is its key, and once you know it shifts letters you have already won. The substitution cipher does better, but its structural transparency to frequency analysis means the algorithm itself leaks information. Vigenère hides more, but the repetition of the keyword leaves a periodic signature in the ciphertext. Modern algorithms like AES are designed under Kerckhoffs's discipline: the algorithm is published, peer-reviewed, attacked for decades, and only the key is secret. That is the standard we will hold the rest of the course's cryptography to.