NODE 734 — TERMINAL RELAY

machine-to-machine cipher relay · decode to create

1 2 3 4 5 6 7
difficulty levels — click green to claim

> TURING'S BOMBE

bombe difficulty: 4–7 also known as: Bomba (Polish), Turing-Welchman Bombe

The idea in plain English: Imagine you have a 3-digit combination lock, but some letters on the dial have been secretly swapped — and the lock changes its wiring every day. The Enigma machine was like that: three rotors with 26 positions each, and the internal wiring of the rotors was a complex substitution alphabet. To read a message, you needed to know which rotors were in play, what order they were installed, and what starting positions they were set to. That's 1,054,560 possible combinations — and the Germans reset them every 24 hours.

The Bombe was an electromechanical brute-force machine designed by Alan Turing (with refinements by Gordon Welchman). It didn't try every rotor setting blindly. Instead, it used a crib — a known or guessed plaintext fragment — to eliminate impossible rotor positions at lightning speed. A typical Bombe run eliminated all but a handful of candidates in about 15–20 minutes.

Why this really exists: The Bombe is arguably the most important machine in the history of computing. It was the first large-scale electromechanical device designed specifically to break a cipher by logical deduction. The intelligence it produced — codenamed ULTRA — is estimated to have shortened WWII by 2–4 years. Today, a restored Bombe runs at Bletchley Park museum in the UK, and it's considered the direct ancestor of modern special-purpose cryptanalytic hardware.

▸ What Is a Crib?

A crib is a known plaintext fragment that you suspect appears in the encrypted message. Bletchley Park codebreakers guessed these from context: messages often began with "KEIN BESONDERE EREIGNISSE" (no special events) or contained predictable weather reports. If you had a 10-letter crib, you could line it up against the ciphertext and deduce what the rotor wiring must look like at each position.

Ciphertext: HUK XFT QLZ MDF ABW
Crib guess: WEATHERTODAY (aligned at position 4)

HUK XFT QLZ MDF ABW
    WEATHERTODAY

The Bombe electrically simulates each rotor position and checks whether the crib→cipher mapping is consistent with the known rotor wirings.

💡 A good crib needs to be at least 8–10 letters. Shorter cribs produce too many false positives. Longer = faster elimination.

▸ The Brute-Force Problem — By the Numbers

Here's how the search space explodes as you add rotors. Each rotor has 26 possible starting positions (A–Z), and the wiring itself is a fixed secret (but there were 5 possible rotors to choose from in the Enigma I):

Config Rotor Positions Rotor Choices Total Combos Brute-Force Time (1 check/ms)
1 rotor 26 5 130 0.13 seconds
2 rotors 26² = 676 5×4 = 20 13,520 13.5 seconds
3 rotors (Enigma I) 26³ = 17,576 5×4×3 = 60 1,054,560 ~17.6 minutes
+ plugboard (10 pairs) ~150 trillion ~1.5×10¹⁴ millions of years

Notice the jump when the plugboard is added. The Bombe exploited the fact that the plugboard could be deduced after the rotor settings were found, reducing the effective search space back to the 1 million range.

▸ How the Bombe Worked (Simplified)

1. A menu is drawn — a diagram showing how crib letters connect to ciphertext letters through the hypothetical rotor wiring

2. The Bombe is wired with physical cables representing each letter of the alphabet (26 wires) connected through the menu's connections

3. Rotors spin continuously (at ~60 RPM), electrically testing each starting position

4. When a contradiction is detected (e.g., A→D and A→E simultaneously), the Bombe stops and skips that position instantly

5. When no contradiction exists, the Bombe stops — a candidate rotor setting has been found

6. Operators then check the candidate by decrypting a small test message on a replica Enigma

▸ Testing a Rotor Setting in Code

Here's a minimal Python snippet that checks whether a given rotor order and starting position produces the expected crib-to-ciphertext mapping:

# Enigma I rotor wirings (simplified)
ROTORS = {
  "I": "EKMFLGDQVZNTOWYHXUSPAIBRCJ",
  "II": "AJDKSIRUXBLHWTMCQGZNPYFVOE",
  "III":"BDFHJLCPRTXVZNYEIWGAKMUSQO",
  "IV": "ESOVPZJAYQUIRHXLNFTGKDCMWB",
  "V": "VZBRGITYUPSDNHLXAWMJQOFECK",
}

def check_setting(rotors, positions, crib, cipher, offset=0):
  """Returns True if this rotor+position combo is consistent."""
  for i, (c, p) in enumerate(zip(crib, cipher[offset:])):
    # Simulate one character through the rotors
    letter = ord(c) - 65
    for r, pos in zip(rotors, positions):
      shift = (letter + (i + pos)) % 26
      letter = ord(ROTORS[r][shift]) - 65
    # (reflector and reverse pass omitted for brevity)
    if chr(letter + 65) != cipher[offset + i]:
      return False
  return True

# Test a candidate:
rotors = ["III", "II", "I"]
positions = [5, 12, 18]
result = check_setting(rotors, positions,
                   "WEATHER", cipher)
print(f"Match: {result}") # True if this setting works

💡 The real Bombe ran thousands of these checks in parallel using electrical circuits instead of software. Each Bombe checked ~18,000 rotor positions per hour.

▸ Real-World Applications

  • Bletchley Park Museum — A fully restored Bombe is on display and runs daily demonstrations. You can watch it click through rotor positions just as it did in 1944.
  • Modern cryptanalysis — The Bombe's "known-plaintext attack" is still used today. It's why we use random initialization vectors (IVs) in modern encryption — to prevent cribs.
  • FPGA/ASIC brute-forcers — Today's password hash crackers (like those used for Bitcoin mining ASICs) work on the same principle: massively parallel specialized hardware for one task.
  • History of computing — The Bombe and Colossus (a later British codebreaking computer) are direct ancestors of every modern CPU. They proved that machines could make logical deductions — not just arithmetic calculations.

← Back to all ciphers