What Exactly Is an Enigma Code?
The term “Enigma code” is widely used but often misunderstood. It does not refer to a single secret password or a fixed cipher alphabet. Rather, it refers to any encrypted message produced by the Enigma machine — and every message was encrypted differently, even if two operators transmitted the same plaintext on the same day.
Technically, Enigma codes are polyalphabetic substitution ciphers. In a simple substitution cipher — the kind used in newspaper puzzles — A always maps to X, B always maps to Q, and so on. The mapping is fixed, which means frequency analysis can crack it quickly. Enigma was fundamentally different: each letter in the plaintext mapped to a ciphertext letter determined by the machine's rotor positions at that exact moment. After every keypress, at least one rotor advanced one step, changing the substitution alphabet for the next letter.
The practical consequence was striking. If you typed the letter E five times in a row, you might get five completely different ciphertext letters: Q, A, Z, T, M. The same plaintext letter produced a different output each time — and this single property made Enigma incomparably harder to crack than anything that had come before it.
To understand the machines that generated these codes, see our companion article What Is an Enigma Machine.
How an Enigma Message Was Structured
Enigma messages were transmitted by radio as groups of four or five letters — a format that looked identical to random noise to anyone listening in. A typical intercept might read: BCMQL FVBSE DQHQF XVHLE YNRPQ. Without the day's key settings, these groups were meaningless.
Each message followed a structured preamble before the encrypted body. The preamble contained:
- The date and time of transmission
- The operator's discriminant — a code identifying which network the message belonged to (Army, Luftwaffe, Naval, etc.)
- The message length in letters, so the recipient knew when the body ended
- The message indicator — the encrypted message key that told the recipient how to set their own rotors before decrypting
The message key system worked as follows. The sending operator chose a random three-letter key — say, QCK. Using the day's ground settings, they encrypted that key twice in succession (so QCKQCK was encrypted, producing six ciphertext letters). They then set their rotors to QCK and encrypted the message body.
This double-encryption of the message key was intended as a security measure — a safeguard against transmission errors. In practice, it became one of the most important cryptographic weaknesses in the entire system, because it meant two positions in the ciphertext were always encryptions of the same underlying letter, just with the rotors in two predictable positions. Polish cryptanalysts exploited precisely this pattern to reconstruct the Enigma wiring in the early 1930s. The German Navy eliminated double-encryption in 1938; the Army followed in 1940 — too late to prevent the initial breakthroughs.
The Daily Key — Tagesschlüssel
Every 24 hours, every Enigma operator on a given network received a new Tagesschlüssel— the daily key. These were printed on monthly key sheets, distributed physically to all stations in advance. At midnight, operators switched to the new settings. Yesterday's key was useless.
Each daily key specified:
- Rotor selection and order — which three rotors (from a set of five, later eight) to insert into the machine, and in what left-to-right sequence
- Ring settings (Ringstellung) — the offset of each rotor's internal wiring relative to its external alphabet ring, adding another layer of variation
- Plugboard connections (Steckerbrett) — typically 10 pairs of letters were swapped before and after the rotor scrambling, dramatically expanding the keyspace
- Ground settings — the starting rotor positions used to encrypt the message key indicator
Because all operators on the same network used identical settings, any operator could decrypt any message sent on that network that day. The system was elegant and robust — provided the key sheets never fell into enemy hands.
Why Enigma Codes Seemed Unbreakable
German signals officers were genuinely confident the Enigma cipher was beyond attack. Their confidence was not irrational. The arithmetic was staggering.
Consider just the Army Enigma (three rotors from five): there were 60 possible rotor selections and orderings, 26³ = 17,576 rotor starting positions, and a plugboard with 10 pairs swapping 20 of 26 letters — contributing roughly 150 trillion possible plugboard arrangements alone. Combined with ring settings, the total keyspace reached approximately 1.59 × 10²⁰ configurations.
Even if a codebreaker could test one million settings per second without rest, exhausting every possibility would take longer than the age of the universe. And the settings reset every midnight. Even brute force was hopeless — the codebreakers needed a smarter approach entirely.
To understand how Enigma compares with other historical ciphers, see our guide to the Vigenère cipher — Enigma's most direct predecessor in the polyalphabetic tradition.
How Enigma Codes Were Broken
The breaking of Enigma was not a single event — it was a decade-long, multi-national effort built on mathematics, espionage, and engineering.
The Polish Breakthrough (1932)
In December 1932, the Polish mathematician Marian Rejewski — working at the Biuro Szyfrów (Cipher Bureau) in Warsaw alongside colleagues Jerzy Różycki and Henryk Zygalski — became the first person to reconstruct the internal wiring of the Enigma machine mathematically. He used group theory to analyse the double-encrypted message keys, combined with actual Enigma operating manuals and key sheets that a German spy named Hans-Thilo Schmidt had sold to French intelligence, who passed copies to Poland.
Rejewski and his team built mechanical devices called bomby (cyclometers) to search through rotor settings. For six years they read significant portions of German Enigma traffic — a fact the Germans never suspected. In July 1939, just weeks before Germany invaded Poland, the Polish team shared all their methods and reconstructed machines with their British and French counterparts at a meeting near Warsaw. This handover gave Bletchley Park the foundation it needed.
The Fundamental Flaw — No Letter Encrypts to Itself
Enigma's designers included a reflector (Umkehrwalze) — a component that routed the electrical signal back through the rotors — to make the machine self-reciprocal: the same settings that encrypted a message would also decrypt it. The reflector introduced an absolute constraint: no letter could ever encrypt to itself. Press A, and the output was guaranteed to be something other than A.
This seemingly minor property became the cipher's Achilles heel. Codebreakers could test whether a proposed piece of known plaintext — called a crib — fit a particular position in the ciphertext by simply checking that no letter in the crib aligned with the same letter in the ciphertext at that position. Any alignment of identical letters proved the crib was wrongly placed; only alignments with no matching letters were potentially correct.
The Bombe at Bletchley Park
Building on the Polish bomby, Alan Turing and Gordon Welchman at Bletchley Park designed an improved electromechanical machine called the Bombe. It tested thousands of rotor positions per minute, eliminating settings that violated the no-self-encryption rule. Welchman's crucial addition — the diagonal board— dramatically increased the machine's efficiency by propagating the logical consequences of each tested position simultaneously across all plugboard pairs.
Common cribs were essential. Stereotyped phrases appeared repeatedly in German military traffic: weather reports always began with WETTER (weather) at a predictable position; status reports frequently ended with KEINE BESONDEREN EREIGNISSE (nothing to report); and some operators obligingly sent a string of Ls at the start of a session — which always encrypted to something other than L, providing cribs that were pure gold.
By late 1942, Bletchley Park had multiple Bombes running around the clock and was decrypting the majority of Luftwaffe and Army Enigma traffic, often within hours of interception.
Notable Enigma Operations and Captures
Naval Enigma (the Shark key used by U-boats) was a separate and harder problem. U-boats used a four-rotor Enigma that the three-rotor Bombes could not attack directly. Breaking Naval Enigma required physical capture of key materials.
- May 1941 — U-110: HMS Bulldog captured the German submarine U-110 in the North Atlantic. A boarding party retrieved an intact Enigma machine, the Naval short weather cipher book, and crucially the Naval Enigma key settings for several upcoming days — materials that Bletchley Park used to break back into Naval traffic.
- May–August 1941 — Weather ships: The Royal Navy captured German weather ships München and Lauenburg specifically to obtain their Enigma key books. Both operations were conducted under tight secrecy to prevent Germany from realising their codes were compromised.
- ULTRA intelligence: The collective intelligence product of Enigma decrypts was code-named ULTRA. It contributed to Allied decisions in North Africa (exposing Rommel's supply lines), the Battle of the Atlantic (routing convoys away from U-boat wolf packs), and the D-Day deception — where ULTRA revealed that Hitler believed the main Allied invasion would come at Pas-de-Calais rather than Normandy.
Key Dates in the Breaking of Enigma
| Date | Event |
|---|---|
| Dec 1932 | Marian Rejewski breaks Enigma mathematically using group theory and intercepted key sheets |
| Jul 1939 | Poland shares its Enigma breakthroughs with Britain and France at a meeting near Warsaw |
| Sep 1939 | Germany invades Poland; Bletchley Park officially opens as Britain's codebreaking centre |
| Mar 1940 | First British Bombe (designed by Turing) installed at Bletchley Park |
| May 1941 | HMS Bulldog captures U-110 with intact Enigma machine and Naval key materials |
| Aug 1941 | Weather ship Lauenburg captured, yielding Naval Enigma key books |
| Dec 1942 | Naval Enigma (Shark) broken; multiple Bombes operational at Bletchley Park |
| Jun 1944 | ULTRA intelligence from Enigma decrypts contributes to D-Day planning and execution |
| Apr 1945 | Germany surrenders; Enigma used operationally until the final weeks of the war |
Frequently Asked Questions
What is an Enigma code?
An Enigma code is a ciphertext message produced by the Enigma machine — a German electro-mechanical cipher device used throughout World War II. Each message was encrypted using a unique combination of rotor positions, plugboard settings, and a randomly chosen message key, making it a polyalphabetic substitution cipher where the same plaintext letter produced different ciphertext letters each time it was typed.
How was an Enigma message different from a simple substitution cipher?
In a simple substitution cipher, every A is always encoded as the same letter — say, X — throughout the entire message. Frequency analysis can crack this in minutes. In an Enigma message, the rotor advanced after every keypress, so the same letter produced a different output each time. There was no stable letter-to-letter mapping to exploit.
Who first broke the Enigma code?
Polish mathematician Marian Rejewski, working with colleagues Jerzy Różycki and Henryk Zygalski, was the first to mathematically reconstruct Enigma's internal wiring and break Enigma traffic, in December 1932. British codebreakers at Bletchley Park — most famously Alan Turing — later extended these methods and industrialised them with the Bombe machine.
What was the Bombe machine?
The Bombe was an electromechanical machine designed by Alan Turing and Gordon Welchman at Bletchley Park. It tested thousands of Enigma rotor settings per minute, eliminating configurations that violated the constraint that no letter could encrypt to itself. Given a crib — a piece of probable plaintext — the Bombe could narrow down valid settings from billions to a manageable few within hours.
How many Enigma configurations were there?
For the standard three-rotor Army Enigma, the total keyspace was approximately 1.59 × 10²⁰ — around 159 quintillion configurations. This figure combines the choices of rotor selection and order (60 possibilities), rotor starting positions (17,576), ring settings, and plugboard wiring (roughly 150 trillion arrangements for 10 pairs). Brute-force attack was computationally impossible.
Explore Further
On this site
Vigenère Cipher Decoder →Enigma's polyalphabetic predecessor — how it works and how to crack it
External resource
Encode text with a virtual Enigma machine at Cryptii →Live Enigma encoder with configurable rotors and plugboard
External resource
Practice Enigma code-breaking at Boxentriq →Interactive Enigma puzzles and code-breaking tools
