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):

1
Step Rotors:The right rotor advances one position (A→B) before the signal enters.
2
Plugboard (Input):Letter A passes through the plugboard. With no pairs set, A remains A.
3
Right Rotor (Forward):The signal enters rotor III from the right side, following the wiring from contact A through the scrambled alphabet.
4
Middle Rotor (Forward):The signal continues through rotor II, getting further scrambled.
5
Left Rotor (Forward):The signal passes through rotor I, the third and final rotor.
6
Reflector:The reflector (UKW-B) bounces the signal back through the rotors via a different path. Crucially, no letter maps to itself.
7
Rotors (Reverse):The signal travels back through all three rotors in reverse order (I → II → III), using the inverse wiring at each stage.
8
Plugboard (Output):The signal passes through the plugboard one final time.
9
Output:The lamp lights up showing the encrypted letter B. The letter A can never encrypt to itself.

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

  1. Encrypt "HELLO" with the settings above. Result: a 5-letter ciphertext (try it in the simulator).
  2. Reset the rotor positions back to B, L, A.
  3. 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:

KeypressPositions Before StepPositions After StepNotes
1stA, D, UA, D, VRight rotor steps normally
2ndA, D, VA, E, WRight rotor at notch (V), middle steps too
3rdA, E, WB, F, XMiddle at its notch (E), double step! Both middle AND left step
4thB, F, XB, F, YNormal 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:

  1. Message key: Operator chose three random letters, encrypted them using the day's settings, and transmitted them at the start
  2. Message body: The actual content, encrypted with the message key
  3. 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.