Enigma looks like a typewriter and behaves like a box of wired mathematics. This page walks through the four mechanisms that make it turn a letter into another letter — and each one is a control on thesimulator, so you can follow along on the machine.

What happens when you press a key

Nothing on the machine is electronic and nothing is stored. Pressing a key sends an electrical impulse into the wiring and the lamp that lights is wherever the impulse came out. The path it takes is the whole cipher:

  1. The current enters through the plugboard, which can swap it for another letter before anything else happens.
  2. It passes through the three rotors, right to left. Each one rewires the letter, and each one turns one stepbefore doing it.
  3. It goes through the reflector, which rewires it once more and sends it back.
  4. It returns through the rotors — which have already turned, so the substitution is not the same one undone — and through the plugboard again.
  5. It lights the lampboard. The lampboard is wired identically to the keyboard, so the letter that lights is the letter you would type to get the original one back.

The last point is the one people notice first: on a machine withA plugged to B, pressing A lightsB. You can watch that happen on the simulator without knowing anything else about the machine.

The rotors

Each rotor is a stack of 26 insulated wires in scrambled order: the letter you put in leaves as a different letter. That alone is a substitution cipher, and a static one would be breakable in seconds. The rotors turn, which is what makes the substitution different for every keypress.

The ring setting (Ringstellung) is a second rotation: the wiring turns inside the casing while the letter window stays put. It changes which letter the wiring is indexed at, so two operators with the same rotors in the same positions can still disagree — which is why the ring is one of the four things a settings file has to carry.

The reflector

The reflector (Umkehrwalze) sits in the middle, rewires the letter once, and sends it back through the rotors in reverse. It does not turn, and it cannot swap a letter for itself — there is no straight wire through it.

It is what makes Enigma reciprocal: the same machine, in the same setting, turns ciphertext back into plaintext. Encrypting with a partner is just decrypting. On most machines the reflector's own wiring is deliberately crossed on B, so a plugboard swap ofA for B shows up on the lampboard asA for Y — the swap is visible on the lamp, which is how cryptanalysts could work on it.

The plugboard

In front of everything is a board of 26 sockets where an operator can swap pairs of letters — up to ten on the Army machine, more on naval ones. The swap happens on the way in and again on the way out, which is equivalent to swapping once.

The wiring was written down: a daily key sheet listed the rotors, the ring settings, the starting positions and the plugboard pairs, and the operator set the machine to match. This is also where the machine's weakness starts — a key that was reused all day was one key protecting thousands of letters. That story is on thenext page.

Where to go next