How the Enigma code-machines worked


With the release of the Alan Turing biopic "The Imitation Game," interest in the Enigma cipher used by the Axis powers and broken by Turing and the exiled Polish mathematicians at Bletchley Park has been revived.

The Guardian's infographic and accompanying text explaining Enigma encryption is as clear an explanation as you could ask for.

Inside the box, the system is built around three physical rotors. Each takes in a letter and outputs it as a different one. That letter passes through all three rotors, bounces off a "reflector" at the end, and passes back through all three rotors in the other direction.

The board lights up to show the encrypted output, and the first of the three rotors clicks round one position – changing the output even if the second letter input is the same as the first one.

When the first rotor has turned through all 26 positions, the second rotor clicks round, and when that's made it round all the way, the third does the same, leading to more than 17,000 different combinations before the encryption process repeats itself. Adding to the scrambling was a plugboard, sitting between the main rotors and the input and output, which swapped pairs of letters. In the earliest machines, up to six pairs could be swapped in that way; later models pushed it to 10, and added a fourth rotor.

How did the Enigma machine work? [Alex Hern/Guardian]

(via IO9)