The Enigma cipher was a family of electromechanical rotor cipher machines used by Germany from the late 1920s through the end of World War II to encrypt military and diplomatic communications. Its security relied on a combination of rotating cipher wheels, a plugboard, and a daily changing key setting. Despite initial confidence in its invincibility, the Enigma was systematically broken by Allied cryptanalysts—most notably at Bletchley Park in the United Kingdom—a feat that significantly influenced the course of the war and the development of modern computing.

1.1 Rotor Mechanism

1.1.1 Rotor Wiring and Position

Each rotor was a disc approximately 10 cm in diameter, containing 26 electrical contacts on each face, one for each letter of the alphabet. The internal wiring connected each contact on one side to a scrambled contact on the other. When a key was pressed, an electrical current passed through the rotors in sequence, with the exact path determined by the rotor order and the starting positions. The rotors could be set to any of 26 positions, and each rotor had a unique internal wiring pattern. Standard Enigma sets included three or four rotors chosen from a larger pool.

1.1.2 Notch and Stepping System

Each rotor had a movable ring with a notch. As a rotor turned, the notch could engage a pawl that advanced the adjacent rotor one step. This created a type of odometer-like stepping. The rightmost rotor advanced one step with each key press; after it completed a full revolution, its notch would cause the middle rotor to step. The leftmost rotor advanced much less frequently. This irregular stepping prevented simple repeated sequences and increased the effective period of the cipher.

1.2 Reflector Circuit

1.2.1 Function of the Reflector

After passing through the rotors, the electrical signal reached a stationary reflector (Umkehrwalze) at the left end. The reflector had 13 pairs of contacts wired together, sending the signal back through the rotors in the reverse direction. This design ensured that encryption and decryption were the same operation: typing the ciphertext would produce the original plaintext when the machine was set identically.

1.2.2 Absence of Reciprocal Encryption

Because the reflector always paired letters (e.g., A was wired to G, meaning A encrypted to G and G encrypted to A), the Enigma could never encrypt a letter to itself. This property was a crucial flaw. It gave cryptanalysts a known regularity: no ciphertext letter could represent the same plaintext letter. This became a fundamental constraint used in codebreaking.

1.3 Plugboard (Steckerbrett)

1.3.1 Wiring Pairs

The plugboard on the front panel allowed an operator to connect up to 13 pairs of letters using patch cables. When a pair was connected, the signal for those letters was swapped before entering the rotors and again after exiting them (on the return path through the reflector). This increased the complexity but also introduced an additional layer of substitution that could be exploited.

1.3.2 Effect on Keyspace

The plugboard dramatically expanded the theoretical number of possible keys. With 10 typical plugboard connections (using 20 letters), the number of possible wiring patterns exceeded 150 million billion. Combined with choice of rotors (from a set of 5, then 8 for naval models) and starting positions, the full keyspace was astronomically large. However, the plugboard was a simple substitution that was independent of the rotor motion, which ultimately made it vulnerable to attacks that could eliminate its effect.

2.1 Key Settings and Daily Procedures

2.1.1 Grundstellung vs. Spruchschlüssel

Operators used two types of rotor settings. The Grundstellung (basic setting) was a daily, widely distributed initial rotor position. The operator would then choose a random Spruchschlüssel (message key) for each individual message, encrypting it twice (a redundancy that later aided cryptanalysis) and sending it in the message header. After receiving the message key, both sender and receiver would set their rotors to it and then encrypt or decrypt the main text.

2.1.2 Key Distribution Handbooks

The daily key settings were distributed in printed codebooks, often printed in water-soluble ink to facilitate destruction if captured. These handbooks specified which rotors to use, their ring settings, the plugboard connections, and the Grundstellung for that date. The security of the entire system depended on these documents not falling into enemy hands.

2.2 Variants and Models

2.2.1 Enigma I (Wehrmacht)

The Enigma I, used by the German Army and Air Force, was a three-rotor machine with a plugboard. It was the most widely deployed version, with an estimated 50,000 units produced. Its design was relatively compact and robust, suitable for field use.

2.2.2 Enigma M3 and M4 (Kriegsmarine)

The German Navy (Kriegsmarine) used the Enigma M3, identical to the Enigma I except for a different set of rotors and a more weatherproof casing. Later, the M4 introduced a fourth rotor, specifically for naval use, which greatly increased security. The M4 had a thinner fourth rotor (the “Greek” rotor) that could be set to one of two positions. Breaking the M4 was one of the greatest challenges faced at Bletchley Park.

2.2.3 Enigma G and Abwehr Models

The Abwehr (German military intelligence) used a slightly different model known as the Enigma G, which lacked a plugboard but had an extra rotor and a different stepping mechanism. Other intelligence services within Germany used simpler versions, such as the Enigma D, a commercial model without a plugboard.

2.3 Security Assumptions

2.3.1 Operator Errors and Procedural Weaknesses

German confidence in the Enigma was partly undermined by operator mistakes. Common errors included using predictable message keys (e.g., “AAA” or “XYZ”), repeating the same key for multiple messages, or failing to reset the rotors after a transmission. Such mistakes gave Allied cryptanalysts “cribs”—known or guessed plaintext segments that could be used to reconstruct the key settings.

2.3.2 German Confidence in the Machine

Throughout the war, German high command largely believed the Enigma to be unbreakable. This confidence was reinforced by periodic security reviews that found no evidence of compromised messages—though the Allies were careful not to act on every decrypted intelligence. The Enigma’s enormous keyspace and the theoretical security of its rotor design convinced most German leaders that it was safe.

3.1 Polish Breakthrough (1932–1939)

3.1.1 Marian Rejewski and the Cypher Bureau

The first systematic break came from the Polish Cipher Bureau (Biuro Szyfrów). Mathematician Marian Rejewski, using mathematical group theory and information from a French spy, reconstructed the internal wiring of the Enigma rotors in 1932. He developed a method based on the properties of the permutations produced by the machine.

3.1.2 Bomba and the Card Catalog

Rejewski and his colleagues built an electromechanical device called the *Bomba* (Polish for “bomb”) that could test possible rotor settings by exploiting the repetition of the message key. They also created a card catalog of daily settings. By 1938, the Polish team could read a significant portion of German Enigma traffic.

3.1.3 Transfer to British and French Allies

In July 1939, as war with Germany approached, the Poles shared their knowledge with British and French intelligence. They presented reconstructed Enigma machines and detailed cryptanalytic methods at a meeting near Warsaw. This transfer was critical to the subsequent British effort.

3.2 British Work at Bletchley Park

3.2.1 Alan Turing’s Bombe

At Bletchley Park in England, Alan Turing designed an improved version of the Polish Bomba, called the *Bombe*. The Bombe used an electromechanical circuit to simulate multiple Enigma rotors in parallel, testing possible settings by searching for contradictions in the plugboard connections. With the help of known plaintext “cribs,” the Bombe could find the daily key in a matter of hours.

3.2.2 Hut 8 and Naval Enigma

The team in Hut 8, led by Alan Turing and later by Hugh Alexander, focused on the German naval Enigma, which was the most complex due to the four-rotor M4 and additional security measures. Through capture of codebooks and meticulous analysis, they eventually broke the naval cipher in 1941. This allowed the Allies to track U-boat movements and greatly reduce shipping losses.

3.2.3 Ultra Intelligence and its Dissemination

Decrypts from Bletchley Park were codenamed “Ultra.” They were handled with extreme secrecy, distributed only to a small number of high-level commanders. Ultra intelligence was used to plan the North Africa campaign, anticipate German defenses before D-Day, and counter the V-1 flying bomb attacks. The Allies took great care not to reveal the source of their knowledge, sometimes by staging “coincidental” sightings or fake reconnaissance.

3.3 Later Attacks and Allied Countermeasures

3.3.1 Capture of Enigma Machines

Physical captures of Enigma machines and codebooks were vital. The seizure of the German submarine U-110 in 1941 yielded an intact Enigma M3 and its codebooks. Other captures off Norway and in the Mediterranean provided additional materials. These allowed Bletchley Park to reconstruct daily keys more rapidly.

3.3.2 US Navy Codebreakers

American cryptanalysts, particularly in the US Navy’s OP‑20‑G, also worked on the Enigma, especially after the United States entered the war. They developed improved Bombes and cooperated closely with British colleagues. By 1943, the US Navy was producing more Bombes than the British, and joint liaison enabled faster processing of naval Enigma traffic.

3.3.3 The End of Enigma’s Secrecy

As the war neared its end, German communications became increasingly readable. The Enigma’s security was permanently compromised, though the Germans did not fully realize it. After the war, captured Enigma machines were studied by the Allies, and the story of the codebreaking emerged only gradually in the decades that followed.

4.1 Immediate Post‑War Secrecy

After World War II, the Allies kept the Enigma cryptanalysis secret for many years. Captured machines were destroyed or distributed as trophies, and the work at Bletchley Park remained classified until the 1970s. This secrecy delayed public recognition of the Polish and British achievements and meant that the lessons learned were not immediately applied to peacetime cryptography.

4.2 Influence on Cryptography and Computing

4.2.1 Early Digital Computers

The need to process large volumes of decrypted traffic and to run the Bombes led to advancements in electromechanical and early electronic computing. Colossus, the first programmable electronic computer, was built at Bletchley Park for a different cipher (the Lorenz). The Enigma work also fostered the careers of pioneers such as Alan Turing, whose theoretical concepts (e.g., the Turing machine) were later foundational to computer science.

4.2.2 Public‑Key Cryptography Concepts

The Enigma demonstrated that a large keyspace alone does not guarantee security; the design of the cipher algorithm is equally important. This lesson influenced the development of modern cryptography, particularly the need for rigorous mathematical proof of security. Some historians argue that the Enigma experience directly inspired the notion of public‑key cryptography, where the key used for encryption can be publicly known without compromising decryption.

4.3.1 Literature and Films

The Enigma story has been the subject of numerous books, documentaries, and films. Notable examples include the novel *Enigma* by Robert Harris (1995), later adapted into a film (2001), and the movie *The Imitation Game* (2014), which focused on Alan Turing’s life and Bletchley Park. These works have sometimes taken dramatic liberties but have sparked wide public interest.

4.3.2 Museum Exhibits and Replicas

Today, original Enigma machines are prized museum pieces, displayed at institutions such as the Bletchley Park Museum in England, the National Cryptologic Museum in the United States, and the Deutsches Museum in Germany. Many accurate replicas are also available for collectors and educators, and the machine remains a tangible symbol of the early days of cryptology and the race between encryption and codebreaking.