CRYPTO

Enigma

A working Enigma machine. Type on the keyboard and watch the lamps. Set up the same machine on both ends, and the same keystrokes that encrypt a message will decrypt it.

Rotors and ring settings, left to right

Swaps letters before and after the rotors. Wartime keys used 10 pairs.

In
Out

Encrypt a block of text

Runs the text through the machine from the start positions shown in the rotor windows.

How it works

Each key press sends a current through the plugboard, then through three rotors from right to left, into the reflector, and back out through the rotors and plugboard to a lamp. Each rotor is a scrambled wiring of the alphabet.

Before the current flows, the right rotor turns one step. When it passes its notch it turns the middle rotor, and the middle rotor turns the left rotor the same way. The middle rotor also turns itself a second time when it moves the left rotor. This quirk is called the double step. Because the rotors move on every key, typing the same letter twice rarely gives the same result.

The reflector sends the current back the way it came, which makes the machine its own inverse: with the same settings, typing the ciphertext gives you the plaintext. It also means a letter can never encrypt to itself, a weakness Allied codebreakers at Bletchley Park used to rule out possible keys.

The ring setting turns the wiring against the letters on a rotor's rim, and the start positions are the letters showing in the windows. The M4, used by U-boats from 1942, added a fourth rotor (Beta or Gamma) that never turns, alongside a thin reflector.

To try a real message, load the settings for a German Army message from 7 July 1941 and paste this under “Encrypt a block of text”: EDPUD NRGYS ZRCXN UYTPO MRMBO FKTBZ REZKM LXLVE FGUEY SIOZV EQMIK UBPMM YLKLT TDEIS MDICA GYKUA CTCDO MOHWX MUUIA UBSTS LRNBZ SZWNR FXWFY SSXJZ VIJHI DISHP RKLKA YUPAD TXQSP INQMA TLPIF SVKDA SCTAC DPBOP VHJK