The Enigma machine explained
The Enigma looked like a typewriter in a wooden box, and it gave the German armed forces what they believed was an unbreakable cipher. Its secret was motion: rotors that turned at every key press, so that each letter of a message was enciphered with a different alphabet. Its story is one of clever engineering, small design flaws, and the mathematicians and engineers who turned those flaws into a way in.
From a typewriter to a cipher machine
The German engineer Arthur Scherbius patented a rotor cipher machine in 1918 and sold the first Enigmas to businesses in the 1920s. The German navy adopted it in 1926 and the army in 1928, and the Enigma I, with its plugboard, became the standard machine of the army and the air force. Tens of thousands were built. One operator typed the plaintext letter by letter while a second wrote down the letters that lit up on the lampboard; the ciphertext was then sent by radio in Morse code.
The rotors
A rotor is a disc with 26 electrical contacts on each side, joined by 26 wires in a scrambled order, so on its own it is a simple substitution: rotor I sends A to E, B to K and C to M. Three rotors sit side by side, chosen from a box of five and placed in any order. Before each letter the right rotor turns one place, so the substitution it performs shifts: the same wiring, met at a different angle, gives a different alphabet. Inside the machine the letters between the stages are those of the fixed contacts of the entry wheel; through a rotor at position p with ring setting r, contact x comes out at f(x + p − r) − (p − r), modulo 26.
Ring settings, start positions and the daily key
Each rotor carries a ring with the alphabet, which can be turned against the wiring: the ring setting, or Ringstellung. The letter showing in the window is the rotor's position, set by hand at the start of a message. The day's key, printed on monthly key sheets, gave the rotor order, the ring settings and the plugboard connections; the operator then chose a start position for each message and sent it, enciphered, at the head of the message. With 60 rotor orders, 17,576 start positions and about 150 million million ways to place ten plugboard cables, the machine had about 1.6 × 10²⁰ settings before even counting the rings.
The plugboard and the reflector
The plugboard (Steckerbrett) at the front swaps pairs of letters with cables, once on the way in and once on the way out; ten cables were usual, which multiplied the number of keys enormously. At the far end, the reflector (Umkehrwalze) joins the contacts in 13 pairs and sends the current back through all three rotors by another route. The reflector made the machine its own inverse: with the same settings, typing the ciphertext lights the plaintext, so one procedure served for both. It also meant that no letter could ever be enciphered as itself.
The double step
The rotors move like an odometer, but not quite. Each rotor has a notch at one letter (Q, E, V, J and Z for rotors I to V). When the right rotor moves on from its notch letter, a pawl pushes the middle rotor one place. That same pawl rests against the middle rotor's own notch, so when the middle rotor arrives at its notch it is pushed again at the next key press, and carries the left rotor with it. The middle rotor thus steps twice in a row: with rotors I-II-III, ADU becomes ADV, then AEW, then BFX. The double step shortens the machine's period from 17,576 to 16,900 key presses.
Polish codebreakers
In 1932 the Polish Cipher Bureau gave the young mathematician Marian Rejewski the problem. Using the theory of permutations, a few pages of operating instructions obtained by French intelligence, and the German habit of enciphering each message key twice, he worked out the wiring of the rotors without ever seeing a machine. With Jerzy Różycki and Henryk Zygalski he built replicas, a catalogue of patterns, perforated sheets and the cryptologic bomb to find the daily keys. In July 1939, weeks before the invasion of Poland, they handed everything to the British and the French.
Bletchley Park and the bombe
At Bletchley Park in England, Alan Turing designed a new machine, the bombe, improved by Gordon Welchman's diagonal board. It needed a crib, a guess at a piece of plaintext such as WETTERBERICHT (weather report), and the place where it lay; because no letter encrypts to itself, many places could be ruled out at once. The bombe then ran through rotor orders and positions, rejecting those that contradicted the crib, until a few candidates remained to be tested by hand. Hundreds of bombes were running by 1945, and the intelligence they produced, code-named Ultra, helped to win the Battle of the Atlantic.
Explore it
Open the Enigma machine to type on a working model of the Enigma I. Watch the rotors turn and the current run through every stage with its letter, press the same key again and again, step through the double step, plug cables into the plugboard, and decrypt a real army message from July 1941 with its published settings.
Поширені запитання
Was the Enigma cipher unbreakable?
Not in practice. The machine was strong for its time, but its design had weaknesses, chiefly that no letter could encrypt to itself, and its operators made mistakes such as doubled message keys, predictable messages and lazy start positions. Polish mathematicians broke it before the war, and Bletchley Park read much of the traffic during it.
What is the difference between the Enigma and a Caesar or Vigenère cipher?
A Caesar cipher uses one shifted alphabet and a Vigenère cipher cycles through a few, set by a keyword. The Enigma changes its whole scrambled alphabet at every letter and only repeats after 16,900 letters, far longer than any message, so the letter frequencies that break the older ciphers are flattened. It was broken by attacking its settings, not its letter counts.
What were the naval Enigma's extra rotors?
The German navy's M3 had eight rotors to choose from, adding VI, VII and VIII with two notches each, and the four-rotor M4 of 1942 added a thin fourth rotor beside a thin reflector. The M4 shut Bletchley Park out of the U-boat messages for most of 1942. The app models the army and air force Enigma I with rotors I to V.
Why were messages sent in groups of five letters?
It hid the word lengths, which would otherwise help a codebreaker guess words, and it made counting and checking letters easy for the radio operators. The Enigma had no space key: words were run together, X often stood for a full stop, and numbers were spelled out.
Готові спробувати?
Відкрийте PictorX у браузері — без встановлення і без кредитної картки.
Open the Enigma machine