Introduction to Security · Cryptography and Network Security

Rotor Machines

Watch lectures

Rotor Machines

1. What a Rotor Machine Does

Rotor machines (Wiry, Enigma 1920s–40s) mechanized polyalphabetic substitution: each keystroke advances rotors, so the same plaintext letter maps differently every position — key period of 263=17,57626^3 = 17{,}576 (3 rotors) instead of Vigenère's short key. Passing current through wired rotors implements a monoalphabetic map that changes per keystroke:

Keyboard → Plugboard → Rotor R → Rotor M → Rotor L → Reflector
    → back through rotors → Plugboard → Lampboard

Current enters at plaintext letter, exits at ciphertext letter; rotors step like an odometer (right rotor every key, middle every 26, left every 26226^2).

2. Enigma Components (Exam Diagram Labels)

Part Function Key contribution
Rotors (Walzen) I–V, choice + order Each a wired permutation (26!26!) + ring setting (Ringstellung) Rotor choice/order: 5×4×3=605 \times 4 \times 3 = 60; positions 26326^3; rings 26226^2 effective
Reflector (Umkehrwalze) B/C Fixed involution sending current back — makes encryption = decryption (reciprocal) but NO letter ever maps to itself (crib flaw!) Thin/betatable variants
Plugboard (Steckerbrett) 10 patch cables swapping letter pairs before/after rotors (2620)×\binom{26}{20} \times pairings ≈1.5×1014\approx 1.5 \times 10^{14} — biggest key chunk
Ring setting + start position (Grundstellung) Offsets wiring vs stepping Daily key sheet entries

Total key space ≈1016×1014≈1023\approx 10^{16} \times 10^{14} \approx 10^{23} (2762^{76}-ish) — brute force impossible in 1930s; broken by procedure + mathematics, not key size.

3. How Encryption Stepping Works (Worked Trace Logic)

Press A: right rotor advances; circuit A → plugboard (say A↔M, so M) → rotor R map → M map → L map → reflector → back reversed → plugboard → lamp (say D). Press A again: rotor positions differ → new circuit → different lamp (say Q). Same input, different output — polyalphabetic with huge period. Decrypt: reset rotors to same start, type ciphertext — reflector's reciprocity returns plaintext (operator never flips a switch).

Numerical habit: given rotor I wiring "EKMFLGDQVZNTOWYHXUSPAIBRCJ", position offsets shift the mapping: output =W(p+pos)−pos mod 26= W(p + pos) - pos \bmod 26 per rotor — exams ask one-rotor traces, not full Enigma.

4. Cryptanalysis: Why Enigma Fell

  1. Procedural flaws: daily keys + message indicators sent twice (early war) → Polish bomba chained indicator relations to recover rotors (Rejewski, permutational math).
  2. Cribs + no-self-encryption: Turing's bombe tested rotor positions against guessed plaintext ("WETTERBERICHT"); reflector guarantees $P_i
    e C_i$, killing positions where crib letter equals ciphertext — massive pruning.
  3. Operator errors (Cillies, Herivel tip): lazy ring/position choices shrank key space.
  4. Capture + Hollerith: key sheets, rotors from U-boats; mechanized search at Bletchley scaled rejection.

Lesson (links Topics 5–6, Module 2): big key space ≠ security — protocol/procedure flaws and a single structural regularity (reflector involution) defeat the machine. Modern ciphers demand no exploitable structure (avalanche, differential resistance) plus sound key management.

Exam Points

  • Labelled current-path diagram + odometer stepping — 5-mark diagram core.
  • Key-space contributors (60 orders, 26326^3 positions, plugboard ∼1014\sim 10^{14}) — 2–3 mark numerical.
  • Reflector: reciprocal encryption + never-self flaw — favourite justification.
  • Break chain: indicators → bomba; cribs + bombe; operator errors.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Cryptography and Network Security modules