- Overview
- Ciphers
- Enigma Machine
- Examples
Enigma Machine Examples & Tutorials
Learn how the Enigma machine works through step-by-step examples covering rotor mechanics, the double-stepping anomaly, plugboard configuration, and historical WWII messages.
Step-by-Step: Encrypting the Letter "A"
Using the default configuration (Rotors I-II-III, Reflector UKW-B, positions A-A-A, no plugboard):
Input: A → Output: B
Verify this yourself: with default settings, typing AAAA produces BDZG.
The Double-Stepping Anomaly
The most fascinating mechanical quirk of the Enigma machine. When the middle rotor reaches its notch position, it steps again on the very next keypress — stepping twice in succession. This "double stepping" was a mechanical artifact that reduced the theoretical period of the machine.
Frequently Asked Questions
How does rotor stepping work in the Enigma machine?
The right rotor steps before every keypress. The middle rotor steps when the right rotor reaches its notch position. The left rotor steps when the middle rotor reaches its notch position. This creates the double-stepping anomaly where the middle rotor can advance on two consecutive keypresses.
What is the double-stepping anomaly?
Double stepping occurs when the middle rotor is at its notch position. The mechanical pawl engages and causes the middle rotor to step again when the left rotor advances, making it move on two consecutive keypresses instead of one. This slightly reduces the cipher's period.
Why can't a letter encrypt to itself on the Enigma?
The reflector pairs up all 26 letters and sends the signal back through the rotors. Since the reflector connects each letter to a different letter, the signal always returns as a different letter. This property was exploited by Alan Turing's Bombe machine to eliminate impossible configurations.
What were cribs in Enigma codebreaking?
Cribs were known or guessed plaintext segments. Codebreakers at Bletchley Park knew that German messages often contained predictable phrases like 'WETTERBERICHT' (weather report) or 'KEINEBESONDERENEREIGNISSE' (nothing special to report). These cribs were used to test possible Enigma settings.
Enigma Machine Examples - Learn Step by Step
Master the Enigma machine through comprehensive step-by-step examples that cover rotor mechanics, plugboard configuration, and historical messages. These examples progress from basic concepts to authentic WWII operational procedures. All examples can be verified using our Enigma machine simulator.
Example 1: Basic Encryption Without Plugboard
This foundational example demonstrates how the Enigma encrypts a single letter through the rotor assembly, without any plugboard connections.
Configuration
- Rotors: I, II, III (left to right)
- Positions: A, A, A
- Ring settings: 1, 1, 1 (default)
- Reflector: UKW-B
- Plugboard: No connections
Encrypting "A"
Step 1: Before pressing any key, the right rotor (III) steps forward from A to B.
Step 2: The signal for "A" travels through:
- Entry wheel: A (position 0)
- Right rotor (III at position B): substitution through rotor III wiring
- Middle rotor (II at position A): substitution through rotor II wiring
- Left rotor (I at position A): substitution through rotor I wiring
- Reflector UKW-B: pairs letters and reflects the signal back
- Left rotor (I) reverse: inverse substitution
- Middle rotor (II) reverse: inverse substitution
- Right rotor (III) reverse: inverse substitution
- Output lamp illuminates
Key insight: Because the right rotor steps before encryption, the first letter is encrypted with position AAB, not AAA. This is important for reproducing historical results.
Example 2: The Reciprocal Property
The Enigma's reflector ensures that encryption and decryption are the same operation. This example demonstrates this critical property.
Configuration
- Rotors: II, IV, V
- Positions: B, L, A
- Ring settings: 2, 21, 12
- Reflector: UKW-B
- Plugboard: AV, BS, CG, DL, FU, HZ, IN, KM, OW, RX
Demonstration
- Encrypt "HELLO" with the settings above. Result: a 5-letter ciphertext (try it in the simulator).
- Reset the rotor positions back to B, L, A.
- Enter the ciphertext from step 1. The output is "HELLO".
This reciprocal property was both a feature (operators only needed one procedure) and a vulnerability (it constrained the mathematical structure of the cipher).
Example 3: Double Stepping in Action
The double-stepping anomaly occurs when the middle rotor is at its notch position, causing it to step on two consecutive keypresses.
Configuration
- Rotors: I, II, III
- Reflector: UKW-B
- Plugboard: None
Setup for Observing Double Step
Set positions to A, D, U (left, middle, right). Rotor III has its notch at V, and rotor II has its notch at E.
Watch the rotor positions as you type:
| Keypress | Positions Before Step | Positions After Step | Notes |
|---|---|---|---|
| 1st | A, D, U | A, D, V | Right rotor steps normally |
| 2nd | A, D, V | A, E, W | Right rotor at notch (V), middle steps too |
| 3rd | A, E, W | B, F, X | Middle at its notch (E), double step! Both middle AND left step |
| 4th | B, F, X | B, F, Y | Normal stepping resumes |
The double step on keypress 3 is the anomaly: the middle rotor moves on two consecutive presses (keypresses 2 and 3). This reduces the theoretical period of the machine.
Example 4: Historical Context - Operation Barbarossa
During the German invasion of the Soviet Union (Operation Barbarossa, June 1941), Enigma-encrypted messages coordinated the massive three-pronged attack. Here is how a typical military message might have been structured:
Typical Message Format
German military Enigma messages followed a strict format:
- Message key: Operator chose three random letters, encrypted them using the day's settings, and transmitted them at the start
- Message body: The actual content, encrypted with the message key
- Standard phrases: Messages often began with predictable phrases, which codebreakers exploited as "cribs"
Common Cribs Used by Bletchley Park
- WETTERBERICHT ("weather report") — Weather messages sent at regular times
- KEINEBESONDERENEREIGNISSE ("nothing special to report") — Routine status messages
- ANXX ("to" followed by recipient) — Message addressing format
- OBERKOMMANDODERWEHRMACHT — High command signature
These predictable patterns were essential for the Bombe machines to narrow down possible daily settings.
Example 5: Preset Configurations
The simulator includes several preset configurations that demonstrate different operational scenarios:
Default Wehrmacht Configuration
The standard military starting point with commonly used rotor selections and plugboard pairs. This represents a typical daily setting that would have been distributed in codebooks.
U-Boat Configuration
The Kriegsmarine (German Navy) used a more complex variant with additional rotors. Naval Enigma was particularly important because breaking it helped the Allies win the Battle of the Atlantic.
Afrika Korps Configuration
Field configurations used by Rommel's forces in North Africa. Desert operations required reliable communications across vast distances.
Try each preset in the simulator to see how different configurations produce completely different ciphertext from the same plaintext.