The Enigma machine, key by key
The Enigma turned every key press into a different substitution: its rotors stepped before each letter, so a message of a hundred letters used a hundred different alphabets. Press keys on this rotor machine, modelled on the German army's Enigma I, and follow the current from the key through the plugboard, the three rotors and the reflector back to a lamp. Set the rotors, rings and plugs, watch the double step, and decrypt a real message from 1941. A rotor machine like the German Enigma I. Press a key on the picture or on your keyboard: first the rotors turn, then the current runs from the key through the plugboard, the right, middle and left rotor, the reflector and back through the rotors and the plugboard to a lamp, which lights the cipher letter. The diagram beside the machine draws that path with the letter at every stage. Play types the message key by key. Because the rotors turn at every key, the same letter comes out differently each time, yet no letter ever becomes itself, and the machine is its own inverse: Decrypt with the same settings types the result back in and gives the message again. The right rotor turns at every key; when it passes its notch the middle rotor turns, and when the middle rotor reaches its own notch it turns again at the next key and takes the left rotor along: the double step. Choose the rotors, their ring settings (Ringstellung) and start positions, and reflector B or C. Click a rotor window to turn its start position, the reflector to swap B and C, two sockets of the plugboard to connect them with a cable, and a plugged socket to pull its cable. Save image, record a video with the clack of the keys and the ratchet of the rotors, or open the picture in the photo editor with the pencil, where the case, the rotors, the plugboard, the keys, the lamps, the path and the names are layers of their own.
Як це працює
- Press Play: HELLO WORLD is typed key by key, the rotors turning in their windows before each letter, the lamp of the cipher letter lighting and the current's path drawn through every stage with its letter.
- Press keys on the picture or on your keyboard: pressing A again and again gives a different letter each time, but never A, and at the same position the lamp's letter gives the key's letter back.
- Choose the double-step example and step slowly: ADU, ADV, AEW, BFX, the middle rotor turning twice in a row and taking the left rotor with it.
- Change the rotors, ring settings, start positions, reflector and plugboard cables (click two sockets), then press Decrypt with the same settings to type the result back in and get your message again.
Rotors, reflector and plugboard
Each rotor is a disc with 26 contacts on each face, wired across in a scrambled order: rotor I sends A to E, B to K, C to M and so on. The current from a key first passes the plugboard, where cables swap pairs of letters, then the right, middle and left rotors, then the reflector, which sends it back through the rotors by a different route and through the plugboard again to a lamp. The ring setting turns the wiring against the letters on the rotor's rim, and the start position is the letter shown in its window when the operator begins.
The rotors step, and the double step
Before the current flows, the right rotor turns one place. When it moves past its notch letter (Q for rotor I, E for II, V for III, J for IV, Z for V), it turns the middle rotor as well. The pawl that does this also catches the middle rotor's own notch: when the middle rotor reaches its notch, it turns again at the next key press and carries the left rotor along. So the middle rotor steps twice in a row, as in ADU, ADV, AEW, BFX with rotors I-II-III. Without the double step the rotors would repeat after 26 × 26 × 26 = 17,576 key presses; with it, after 26 × 25 × 26 = 16,900.
Its own inverse, and never itself
The reflector joins the 26 contacts in 13 pairs, so the current always returns by a different path than it came. Two things follow. If A lights B at some position, then B lights A at the same position, so the same settings decrypt: the operator typed the ciphertext and read the plaintext off the lamps. And no letter can ever encrypt to itself. The designers saw convenience; the codebreakers saw a weakness, because it ruled out every placement of a guessed word (a crib) where any letter would meet itself.
How Enigma was broken
Polish mathematicians Marian Rejewski, Jerzy Różycki and Henryk Zygalski broke the army Enigma in 1932, using permutation theory and the doubled message keys, and gave their methods to Britain and France in July 1939. At Bletchley Park, Alan Turing and Gordon Welchman designed the bombe, an electromechanical machine that tested rotor orders and positions against a crib and used the rule that no letter encrypts to itself. Procedural mistakes, captured key sheets and weather reports with predictable words did the rest; the intelligence, called Ultra, shortened the war.
Поширені запитання
How does the Enigma machine encrypt a letter?
When a key is pressed, the rotors first turn, then a current flows from the key through the plugboard, the right, middle and left rotor and the reflector, and back through the three rotors and the plugboard to one of 26 lamps. The lit lamp is the cipher letter. Because the rotors turn at every key press, the wiring is different for every letter of the message.
Why can a letter never be encrypted as itself?
The reflector connects the letters in pairs and never connects a letter to itself, so the current must come back on a different wire than it went in. This made the machine reciprocal, but it was a serious flaw: codebreakers could slide a guessed word along the ciphertext and discard every position where a letter would match itself.
How do you decrypt an Enigma message?
Set the machine exactly as the sender did, with the same rotors in the same order, the same ring settings, plugboard cables and start position, and type the ciphertext. Because the machine is its own inverse, the lamps spell out the plaintext. In the app, Decrypt with the same settings types the result back in for you.
What is the double step?
The middle rotor turns when the right rotor passes its notch, but the same pawl also pushes the middle rotor when it sits at its own notch. So when the middle rotor reaches its notch it turns again at the very next key press, taking the left rotor with it: it steps on two key presses in a row. With rotors I-II-III starting at ADU, the windows show ADV, AEW, BFX.
How many settings did the Enigma I have?
Choosing three of five rotors in order gives 60 rotor orders, the start positions give 26³ = 17,576 more, and ten plugboard cables can be placed in about 150 million million ways: about 1.6 × 10²⁰ combinations, before counting the ring settings. The codebreakers never tried them all; they attacked the parts separately.
Can I use the picture?
Yes. Save gives a PNG at the size you choose, Save JSON writes the settings, the message, the result and the path of every key press, Record films the machine typing with the clack of the keys and the ratchet of the rotors, and the pencil opens the picture in the PictorX photo editor with the case, the rotors, the plugboard, the keyboard, the lampboard, the current's path and the names on layers of their own. In the editor itself it is under Apps ▸ Science ▸ Computing ▸ Enigma Machine. Everything runs in your browser; your messages are not sent anywhere.
Enigma Machine: як записати відео?
Натисніть червону кнопку «Запис» на панелі відтворення: вона знімає те, що показує сцена. Натисніть її ще раз, щоб зупинити, і відео збережеться на вашому пристрої. Запис безкоштовний, потрібно лише увійти. Без підписки на відео в куті буде невеликий логотип PictorX. Кнопка поруч із «Запис» відкриває параметри відео: формат (як показано, квадрат, сторіз 9:16 або широкий 16:9), тривалість (доки ви не зупините, або 5, 10, 15 чи 30 секунд для соцмереж) і файл: MP4, WebM або анімований GIF. Для звуку виберіть власні звуки застосунку або одну з трьох музичних доріжок: спокійну, яскраву чи ритмічну.
Готові спробувати?
Відкрийте PictorX у браузері — без встановлення і без кредитної картки.
Перейти до редактора