handy.moe

All tools / Hacker kit

An old 8mm film camera

Enigma machine

A faithful simulator of the German Enigma: the Army and Air Force Enigma I, the Navy's M3, and the four-rotor U-boat M4. Set the rotors, rings and plugboard, type, and watch the lamps. Load a real intercepted message to see it come out in German.

Runs in your browser. Nothing you type is sent anywhere.

How to use it

  1. Pick a machine, then the reflector, rotors, ring settings and start letters, and the plugboard pairs.
  2. Type into the box. Each letter lights a lamp and the rotors turn.
  3. To decrypt, set the same settings and type the ciphertext: Enigma is its own inverse.
  4. Or choose Load a real message to decrypt a genuine wartime signal.

Accurate to the letter

The simulator uses the wiring of every rotor and reflector as recorded by the Crypto Museum, and models the famous double step of the middle rotor. We tested it against two published messages: German Wikipedia's worked Enigma I example (“Aachen ist gerettet…”), and the 1942 signal from U-264 that the M4 Project broke in 2006. Both decrypt to the letter, along with the textbook check that AAAAA becomes BDZGO on rotors I-II-III at AAA.

How Enigma worked

Each key press sent current through the plugboard, three rotors (four in the M4), a reflector, and back through the rotors and plugboard to a lamp. The right rotor turned on every press and carried the others like an odometer, so the same letter almost never encrypted the same way twice. The reflector made the machine its own inverse, and also meant no letter could ever encrypt to itself. Codebreakers at Bletchley Park built on Polish work to exploit exactly that flaw.

Questions

Which Enigma models does it cover?

Enigma I (rotors I–V, reflectors A, B, C), the Navy M3 (rotors I–VIII) and the four-rotor M4 (thin reflectors B and C with the Beta or Gamma wheel). The M3 and Enigma I share wiring, so messages for either decrypt the same way.

What are ring settings?

The Ringstellung turns a rotor's wiring against its alphabet ring. It changes both the output and the point where the next rotor steps.

Why can't a letter encrypt to itself?

The reflector sends the signal back by a different path, so the lamp is always a different letter from the key. That was one of the flaws Bletchley Park used.

Can I use it for real secrets?

No. Enigma was broken in the 1930s and 1940s, and is far weaker than modern encryption.