CHIFFRIERMASCHINE · 1923 — 1945

The · Enigma · Machine

A polyalphabetic cipher mechanized in steel and bakelite — and the cryptanalytic effort that broke it.

MODULE IV · INTERACTIVE
A Machine for Secrets

How · Enigma · Works

Enigma is a Vigenère cipher with the keyword changing on every keystroke. Three rotating wheels — chosen from a set of five, in any order — each carry a fixed but scrambled wiring. A current flows from the pressed key, through the plugboard, through the three rotors in sequence, into a reflector, back through the rotors in reverse order, through the plugboard again, and out to a lamp. The lamp that lights is the ciphertext letter.

Every keypress, the right-hand rotor steps once. After 26 steps it nudges the middle rotor, which after 26 of its own steps nudges the left rotor. The wiring relationships shift continuously. Type AAAAA and the lamps spell five different letters.

The operator's daily key is short: which rotors, in what order, with what ring settings, what plugboard pairs, and what starting positions. That five-line key choice expands into roughly 1023 possible machine states — a number the Germans believed was unbreakable. They were wrong, but for reasons they never anticipated.

Try It

The · M3 Wehrmacht · Simulator

Configure the rotors and plugboard, then type. The machine simulates the Wehrmacht three-rotor Enigma with the historical reflector B.

Heeres-Chiffriermaschine
Enigma · M3
Werk Nr. Rolling Thunder Security-270-IV
Walzenlage — Rotor Order & Rings
Steckerbrett — Plugboard
Pairs of letters, separated by spaces. Each letter at most once. Up to 10 pairs (historical).
Umkehrwalze — Reflector
REFLECTOR
B
II
A
ring A
I
A
ring A
III
A
ring A
ETW
Lampboard — Output
Tastatur — Press a Key
Press a letter on the keyboard, or type below.
Klartext — Input
Geheimtext — Output
Anatomy

The · Pieces

Rotor
Walze
A wired disc with 26 contacts on each face. Each rotor implements a fixed permutation. Five rotors (I-V) are available; the operator picks three. I through V each have different internal wirings and different turnover notches.
Reflector
Umkehrwalze
A fixed half-wired wheel that pairs every letter with another. It guarantees the machine is its own inverse — the same setup decrypts what it encrypted — and also that no letter ever encrypts to itself. That fact alone gave cryptanalysts a foothold.
Plugboard
Steckerbrett
Ten cables on the front panel swap pairs of letters before and after the rotor stack. Adds about 1014 combinations to the key space — the bulk of Enigma's strength came from here, not the rotors.
Ring Setting
Ringstellung
An offset between each rotor's internal wiring and its external alphabet ring. Two rotors with the same wiring but different ring settings produce different ciphertexts. Easily overlooked, easily fatal.
Stepping
Schaltung
The right rotor advances every keypress. When it crosses its notch, the middle rotor steps. A quirk — the middle rotor double-steps when it triggers the left — produces an irregular period that lengthens, but does not eliminate, the cycle.
Daily Key
Tagesschlüssel
Distributed monthly as a printed sheet: rotor choice, rotor order, ring settings, plugboard pairs. Operators chose a per-message starting position on top of that. A captured key sheet broke a day's traffic.
How It Fell

Breaking · Enigma

Pyry, Poland · 25 July 1939
Rejewski, Różycki, Zygalski

Six years before the war, three Polish mathematicians under Biuro Szyfrów reconstructed the entire internal wiring of an Enigma rotor from intercepted traffic alone — a feat the Germans believed impossible. Marian Rejewski exploited a procedural flaw: operators encrypted the per-message key twice at the start of every message, creating predictable permutations between letter 1 and letter 4, 2 and 5, 3 and 6. Rejewski turned those permutations into equations and solved them.

They built electromechanical devices called bomby to search the daily key. When Poland was about to fall, they handed everything — technique, machines, working clones — to British and French liaison officers in a forest south of Warsaw.

Bletchley Park, Buckinghamshire · 1940 — 1945
Turing, Welchman, and ten thousand staff

Alan Turing and Gordon Welchman generalized the Polish attack into a machine that did not depend on the indicator flaw — the Germans patched that in 1940. Their Bombe ran a crib: a guessed fragment of plaintext (e.g. "WETTERVORHERSAGE" — weather forecast — reliably appearing at 06:00 every day) against ciphertext, hunting for rotor positions that made the crib consistent.

The reflector guaranteed no letter mapped to itself, and Welchman's diagonal board propagated contradictions across the search tree, collapsing the run-time from impossible to hours. By 1943 Bletchley was breaking 84,000 messages a month. The intelligence — codenamed Ultra — reshaped the war in the Atlantic, in North Africa, and on D-Day.

The Lesson · for cryptographers
Why Enigma Failed

The mathematics of Enigma were sound for its day. Its destruction came from operational mistakes: the doubled indicator; the predictable cribs (weather reports, sign-offs, propaganda phrases); the rule that no letter could encrypt to itself; the operator who used "BERLIN" as a key; the captured codebooks from sunken U-boats. Kerckhoffs's principle — assume the algorithm is public, hide only the key — was honored, but the key procedure itself leaked information every day.

Modern ciphers are designed against the threat model Enigma's designers refused to take seriously: that the adversary knows the algorithm, captures equipment, observes ciphertexts in bulk, and exploits any procedural slip. AES, the symmetric cipher we will study next, has been public since 2001 and reviewed by tens of thousands of cryptanalysts. Its key — not its mechanism — is the secret. That is the discipline Enigma forced cryptography to learn.