Desktop copy. This is one file: keep it anywhere and double-click it, no internet needed. The newest version and the other machines are at lambright.com/enigma.
ENIGMA I
Die Wehrmacht-Enigma: drei Walzen, wie die echte.
The three-rotor cipher machine of the German armed forces, simulated wire by wire. Type on the keys below (or on your keyboard). The right rotor steps first, the lamp shows the coded letter, and the diagram at the bottom traces the current through the real wiring. Click a rotor window and type letters to set it.
Lampenfeld (lamp board)
Walzen (rotors, left to right): click a window, then type letters to set it
Tastatur (keyboard)
Steckerbrett (click two sockets to connect them; up to 10 cables)
Papierstreifen (paper tape)
IN
OUT
Remember and share this setup
The picture shows the rotors, start letters, ring settings, reflector and plugboard. The settings link rebuilds the same setup when someone opens it; your typed text is never in the link. “Post to X” and “Share on Facebook” each open a small window with the post already written (“Learn to encrypt with frens” and the link to the page you are on); you press Post there. To add your settings picture, use “Save settings picture” and attach it yourself.
Each rotor can be used once; picking one already in use swaps it with the slot that had it. Changing any setting clears the tape. You can also set the start letters by clicking a rotor window and typing.
Encode a whole message at once
Current path through the wiring
■ Red: current from the key through the plugboard and all three rotors (right to left) to the reflector. ■ Blue: current returning through the rotors (left to right) to the lamp. Grey lines are each rotor's wiring in its present position; they move as the rotor turns. On a narrow screen, scroll sideways.
Why no space bar?
That is how the real machine worked. The Enigma had 26 letter keys and nothing else: no space, digits or punctuation. Operators ran words together, spelled numbers out, and commonly used X for a space or full stop. Tick the box in Settings and the space bar types X for you.
Die Zahlen: how big is the secret?
Counting only what an enemy would have to guess (rotor order, start positions and a ten-cable plugboard), the Enigma I had about possible settings. Ring settings and the choice of reflector add more. Size is not security, though: the Enigma was beaten by finding patterns in its output, such as the fact that it never codes a letter as itself, not by trying every setting.
How it works
Key press: the right rotor always steps one letter first, then the current flows. The middle rotor steps when the right rotor is at its turnover notch, and the left rotor steps when the middle one is. The middle rotor also steps with the left one in the famous “double step”.
Path: keyboard, plugboard, entry wheel, right, middle and left rotors, the reflector (which sends the current back), left, middle and right rotors again, plugboard, lamp.
Two properties: a letter is never coded as itself, and the machine is reciprocal: set it to the same start and type the coded text to get the original back.
Wiring used: Wehrmacht rotors I to V (turnover notches Q, E, V, J, Z) and reflectors A, B and C, as listed by the Crypto Museum. The Navy's four-rotor M4 and the imaginary eight- and thirty-rotor machines are linked at the top.
Checks: with rotors I, II, III, reflector B, rings AAA and start AAA, typing AAAAA gives BDZGO, and 26 A's give BDZGOWCXLTKSBTMCDLPBMUQOFX. Add ?test=1 to this page's address to run the self-test in your browser.
Nothing you type leaves your browser. A teaching toy: do not use it to protect real secrets; the real Enigma was broken in World War II. Built by Wayne Lambright.