The Enigma Cipher

Authors: Brain Hart '99 and Michelle Lombard '98

The Enigma Cipher

The Enigma cipher is most well known for its contributions to World War II on the Germans' side. They developed what came to be known as The Enigma Machine. The machine was based on a system of three rotors that substituted cipher text letters for plain text letters. The rotors would spin in conjunction with each other, thus performing varying substitutions much like the Caeser Shift. When a letter was typed on the keyboard of the machine, it was first sent through the first rotor, which would shift the letter according to its present setting. The new letter would then pass through the second rotor, where it would be replaced by a substitution according to the present setting of the second rotor. This new letter would in turn pass through the third rotor, again being substituted accordingly. Next, this new letter would be bounced off of a reflector, and back through the three rotors in reverse order. The trick that made Enigma so powerful for its time though, was the spinning of the rotors. As the plain text letter passed through the first rotor, the first rotor would rotate one position. The other two rotors would remain stationary until the first rotor had rotated 26 times (the number of letters in the alphabet and therefore, one full rotation). Then the second rotor would rotate one position. After the second rotor had rotated 26 times (26X26 letters, since the first rotor has to rotate 26 times for every time the second rotor rotates), the third rotor would rotate one position. The cycle would continue like this for the entire length of the message. The result was a shifting shift. In other words, an s could be encoded as a b in the first part of the message, and then as an m later in the message. This principle of the shifting rotors allowed for 26X26X26 = 17576 possible positions of the rotors.

The following diagram was taken from Alan Turing: The Enigma; Simon and Schuster; 1983, by Andrew Hodges. It gives a graphical explanation of what happened when a key was pressed on the Enigma Machine. For the sake of simplicity, it only uses an eight letter alphabet, whereas the real machine used all 26 letters. In the example below, the cipher clerk typed a b, and the machine outputed a d:

In order for the recipient to decode the message, they would need to know the initial settings of the rotors, and then put the cipher text through the machine to find the plain text. The Germans devised a system by which all of the recipients would set their rotors to predetermined settings according to the date. Each clerk had a book detailing the settings for each day. This presented a major weakness in the system though. Obviously, if anyone could figure out what the settings of the rotors were for a particular day, they would be able to decode that day's messages, assuming they had an Enigma Machine themselves.

The Enigma cipher was eventually broken by Alan Turing and a group of scientists at a later date during the war. The breaking of this code led to the Allies' ability to intercept and decode the Germans' messages, which had wonderous effects on the outcome of the war. Some people speculate that the war might have turned out much differently had the Enigma cipher not been broken.

For Further Study and Enjoyment

  • Information for this page was obtained from Alan Turing: The Enigma; Simon and Schuster; 1983, by Andrew Hodges, who has a nice page on Alan Turing .