File 03 · Under the lid

How It Works

Enigma is really four tricks stacked on top of each other — plus one tiny flaw that brought the whole thing down. Let's build it up one trick at a time.

Step 0 · The old waySwapping letters

The simplest secret code is over 2,000 years old: swap every letter for another one, always the same way. Julius Caesar used it — he just shifted the alphabet a few places. Shift by 3 and A becomes D, B becomes E, and HELLO becomes KHOOR.

Try it · Caesar's cipher
shift 3

Here's the problem: this code is easy to smash. In English, the letter E shows up more than any other. So a spy just counts which symbol appears most in your secret message — that's probably E. Then the next most common — probably T. Like a jigsaw, the whole thing falls apart in minutes. Codebreakers call this frequency analysis, and it kills every "always the same swap" code.

Trick 1 · The rotorA code that changes every letter

Enigma's first trick destroys frequency counting. Inside the machine sits a rotor: a wheel with 26 electrical contacts on each side and a secret tangle of wires between them. Electricity goes in at one letter and comes out at a different one. So far, that's just a fancy swap.

The genius part: every time you press a key, the rotor turns one notch before the current flows. The whole scrambling pattern shifts. Press A and you might get B. Press A again — the wheel has turned — now you get D. Again: Z. The "same swap" never happens twice in a row, so counting letters tells a spy nothing.

Try it · Press the same key

Press A over and over. Watch the rotor windows turn — and watch the answer change every single time.

AAA  

Trick 2 · Three rotorsThe odometer

One turning rotor repeats its pattern after 26 letters. Not good enough. So Enigma stacks three rotors side by side, working like a car's odometer (the little wheel counter for kilometres): the right rotor turns on every keypress; when it finishes a full lap, it nudges the middle rotor one notch; when the middle one finishes its lap, it nudges the left one.

That's 26 × 26 × 26 = 17,576 different scrambling patterns before the machine repeats itself — far longer than any message. And the operator can also choose which three rotors to use out of five, and in what order, and how each one's inner ring is rotated. The numbers start exploding.

In plain words

One rotor = a code wheel that keeps turning. Three rotors = a combination lock the size of a galaxy. You saw the three windows turning in the demo above — that's the odometer in action.

Trick 3 · The reflectorThe mirror that makes it magic

At the far left of the rotors sits the reflector — a half-wheel that catches the electric current and bounces it back through all three rotors again by a different path. So each keypress actually scrambles the letter seven times: three rotors in, the reflector, three rotors back out.

The reflector is what makes Enigma so easy to use. Because the current goes out and back through the same wheels, the machine is perfectly reversible: if pressing H lights Q today at this position, then pressing Q lights H. Encrypting and decrypting are the same action. No separate "decoder" needed — just an identical machine with identical settings.

Try it · The mirror trick

Type a short word. Machine 1 scrambles it. Then an identical Machine 2 takes the gibberish and — same settings, same keys — unscrambles it.

  

Trick 4 · The plugboardThe final tangle

The German military added one more layer on the front of the machine: the plugboard. It looks like an old telephone switchboard — sockets for all 26 letters, and up to about ten cables. Plug a cable between A and M, and those two letters swap places before and after the rotors do their work.

It sounds simple, but it's the plugboard that pumps the number of possible setups to that famous 158 million million million. Most of Enigma's strength lives in those little cables.

The flawThe letter that could never be itself

Now the twist in the tale. The reflector always bounces the current back on a different wire than it came in on. Follow the consequence: the current can never travel back out to the very key you're holding down. In other words —

On Enigma, a letter can never encrypt to itself. Press E, and you can get every letter of the alphabet except E. The flaw that helped break the machine
Try it · Hunt for the missing letter

Pick a letter and press it 60 times. Every letter that lights up gets marked below. One letter will never light up…

Why did this matter so much? Suppose codebreakers guess a message contains the word WETTERBERICHT (weather report). They slide that guess along the gibberish, position by position. Anywhere a guessed letter would line up with an identical letter in the gibberish is impossible — Enigma can't do that — so it's crossed out instantly. The few positions that survive get fed to the Bombe machine. One tiny engineering shortcut, and it became the crack that the whole codebreaking effort was levered through.

In plain words

Enigma's designers made it never do something (encrypt a letter to itself) because that seemed extra-safe. But "never" is information too! A perfect scrambler should sometimes leave a letter unchanged, just by chance. Being too tidy gave the game away.

Ready? → Drive the Machine yourself