Alan Turing & Enigma
π΅οΈββοΈ The Enigma Machine & Bletchley Park
The Enigma machine was a cipher device used by the German military during World War II for secure communication. Its complexity made it a formidable challenge for Allied cryptanalysts, most famously at Bletchley Park. The story of its decryption is central to the movie The Imitation Game, which features Alan Turing and Joan Clarke.
Alan Turing was a pivotal figure at the Government Code and Cipher Centre (GC&CS) at Bletchley Park from 1939 to 1945. Before the war, in 1938-1939, while returning from research at Princeton with Alonzo Church, Turing was already consulting with GC&CS, becoming familiar with the challenges posed by German ciphers created by the Enigma machine. A key reference for understanding Turing's work and the Enigma is Andrew Hodges' book, Alan Turing: The Enigma.
π Origins of Enigma
Initially, the Enigma was a commercial cipher machine before its adoption by the German Armed Forces. It offered a reasonable level of security, designed primarily to discourage casual snooping rather than to withstand dedicated efforts from expert cryptologists. Its fundamental design, however, contained a significant flaw that eventually aided its decryption.
βοΈ Enigma Machine Components
The Enigma machine, at first glance, resembles a typewriter. It features a standard typewriter keyboard layout. However, above the keys, instead of more keys, there are 26 lamps, each corresponding to a letter of the alphabet. When a key is pressed, a different letter's lamp lights up, indicating the enciphered character. For example, pressing 'T' might illuminate the 'G' lamp.
The core of the Enigma's encryption mechanism lies in a series of rotors and other components:
π Rotors (Scramblers)
Physical Structure: Each rotor is a disk with 26 alphabetic letters (or numbers 0-25) engraved around its circumference.
Internal Wiring: Inside each rotor, there's a complex cross-wiring mechanism. An input stud on one side is wired to a different output stud on the other side. For instance, 'A' might be cross-wired to 'J', 'B' to 'Q', and so on.
Display: When the machine's lid is closed, the uppermost letter of three rotors is visible through three windows, indicating their current position.
Movement Mechanism: The rotors operate like an old-fashioned car odometer.
The rightmost rotor moves the fastest, advancing one position with each key press.
After completing a full rotation (e.g., from 'A' back to 'A'), it nudges the middle rotor to advance one position.
The middle rotor in turn nudges the leftmost rotor after its own full rotation.
The leftmost rotor is the slowest moving.
Initially, Enigma machines typically used three types of rotor wheels (numbered I, II, III), each with unique internal cross-wirings. The order of these three rotors on the spindle could be arranged in 3 factorial (6) different ways, significantly increasing the number of possible settings.
π Reflector (Reverser)
Function: After the electrical signal passes through the three rotors, it reaches a component called the reflector (or reverser in German). This component returns the signal back through the rotors via a different path.
Fixed Wiring (Early Models): In early three-rotor Enigmas, the reflector had fixed cross-wirings that were identical across all machines. For example, 'A' might always be cross-wired to 'W' in the reflector.
The "Never Encipher Itself" Flaw: The reflector's design was the source of Enigma's most significant security flaw: a letter could never be enciphered as itself. This is because the reflector was designed such that an incoming signal (e.g., on stud 'A') would always be reflected to a different stud (e.g., 'W'), preventing it from returning through the same path it entered. This crucial detail provided a significant "way in" for cryptanalysts.
π Plugboard (Steckerbrett)
Introduction: As the German Armed Forces sought to enhance Enigma's security, particularly for military use, they introduced the plugboard as a crucial addition.
Mechanism: The plugboard is located at the input and output of the machine. It consists of sockets for each letter (A-Z). Operators would use cables to cross-wire pairs of letters. For instance, linking 'A' to 'J' meant any 'A' pressed on the keyboard would enter the rotor mechanism as a 'J', and any 'J' would enter as an 'A'.
Configuration: Typically, 10 out of 13 possible pairs (20 letters) would be cross-wired. Unwired letters passed through unchanged (e.g., 'Q' maps to 'Q' if not plugged).
Impact: The plugboard significantly increased the complexity, as it added another layer of scrambling before and after the rotor mechanism.
π Evolution and Increased Complexity
The German military continuously sought to improve Enigma's security:
βοΈ Army and Air Force Enigma (3 from 5 Rotors)
Rotor Expansion: Instead of just three rotors, they introduced two additional rotor types (Rotors IV and V), bringing the total to five.
Selection and Arrangement: Operators would now choose any three of these five available rotors. The number of ways to pick three from five is 10. For each selection, there were still 6 ways to arrange them on the spindle. This resulted in 60 possible rotor configurations (10 selections * 6 arrangements), a substantial increase in complexity.
β Naval Enigma (3 from 8 Rotors)
Naval Demands: The German Navy, led by Admiral Karl DΓΆnitz, was particularly concerned about security and suspected Allied decryption efforts. They demanded an even more robust Enigma.
Further Rotor Expansion: The Navy version used three rotors chosen from a pool of eight available types (including Rotors VI, VII, VIII).
Increased Combinations: The number of ways to pick three from eight, multiplied by the 6 possible arrangements, resulted in 336 possible rotor configurations (8 * 7 * 6 / (3 * 2 * 1) = 56 selections * 6 arrangements = 336), making it significantly harder to crack.
βοΈ Ring Settings (Offsetting Mechanism)
A lesser-known but critical layer of complexity was the ring setting:
Rotor Rings: Each rotor has a physical ring with letters (A-Z) on its circumference. There's a small paint blob or indicator showing the standard 'A' position.
Offsetting: Operators could rotate this ring independently of the rotor's core wiring. If 'A' was usually aligned with the paint blob, they could rotate the ring so that 'B' or 'C' was aligned instead.
Effect: This effectively offsets the internal wiring of the rotor. If 'A' normally mapped to 'E', and the ring was offset by one position (so 'B' was at the 'A' position), then pressing 'A' would now behave as if 'B' was pressed in the standard configuration, mapping to 'K' instead of 'E'.
Purpose: Ring settings provided an initial offset that subtly changed the mapping, adding another layer of variability to the machine's daily setup.
π Turnover Points (Notches)
Another sophisticated feature was the varying turnover points of the rotors:
Standard Turnover: In a simple odometer, the rightmost wheel turns over at '9' and nudges the next wheel. Similarly, early Enigma rotors typically turned over at 'Z' (or '0'), advancing the next rotor.
Variable Turnover: Some "bright sparks" in the German military introduced rotors with different turnover points. For example, a rotor might advance the next rotor not just at 'Z' but also at 'M' (mid-alphabet).
Security Flaw: This variability, while intended to increase security, paradoxically created a cryptanalytic weakness. If a cryptanalyst suspected a certain rotor type was in use and observed an unusual turnover (e.g., the middle rotor advancing when the rightmost was at 'Q' instead of 'Z'), it provided a "signature" that could help identify the rotor types in play. This non-uniformity, rather than enhancing security, offered clues to the Enigma's internal settings.
π Daily Settings & Decryption Requirements
To decrypt an Enigma cipher stream, cryptanalysts needed to know several critical daily settings:
Which rotor wheels are in use? (e.g., Rotor I, III, V)
What is the ordering (left-to-right) of those rotor wheels? (e.g., V-III-I)
What is the ring setting for each rotor wheel? (The offset of the internal wiring)
What is the message setting? (Each message had a unique starting position for the rotors, chosen by the operator, to further enhance security beyond just the daily ring settings.)
What are the plugboard cross-connections? (Which pairs of letters are swapped by the plugboard)
π¨ The "Pinch" and Cryptanalysis
In the very early days of the war, Bletchley Park sometimes benefited from a "pinch" β the capture of German code tables. If agents or military personnel could obtain these tables, cryptanalysis was not needed, as the daily settings would be revealed directly. However, such luck was rare and short-lived, as the Germans would quickly change codebooks if they suspected a compromise.
Without these direct captures, cryptanalysts faced the monumental task of determining the daily settings. Early, simpler Enigmas (three fixed rotors, no plugboard) saw success from the Polish Cipher Bureau using manual methods and basic machines. However, with the introduction of more rotors, plugboards, and complex turnover mechanisms, manual decryption became impossible due to the sheer volume of cipher traffic and the astronomical number of possible settings. This necessitated the development of electromechanical machines, like the Bombe, to automate the search for settings.
The internal wiring of the commercial Enigma rotors (I, II, III) was eventually known. However, when the German military introduced new rotors (IV, V, VI, VII, VIII), their internal wiring was initially unknown to the Allies. Cryptanalysts had to deduce these wirings from first principles, using advanced group theory, mathematics, and analysis of known plaintext and ciphertext.
π₯ Further Resources
For a hands-on understanding of the Enigma machine, resources like James Grime's videos on Numberphile are highly recommended. These videos often feature a real Enigma machine and demonstrate key concepts, including the critical flaw that a letter can never encipher itself.

Ask anything
We've read this whole study set, so questions about it get the best answers.