Section 4.2 Enigma Mechanics
The Enigma machine is one of the most famous cipher machines. It was invented in 1918 by German inventor and electrical engineer, Arthur Scherbius. The original invention was adapted by the German military and used extensively during World War II. The German navy began using the Enigma machine in 1926 and the German army began using the Enigma machine in 1928.
An Enigma machine consists of a keyboard, a plugboard, a scambling unit consisting of 3-4 rotors and a reflector, and a display board. The plaintext is entered on the keyboard. When the keyboard letter is pressed, it creates an electrical circuit which travels through the plugboard, the scrambling unit, and then back through the plugboard to light a lamp on the display board giving the ciphertext letter. We will examine each of these parts of the machine in detail, but first the brief video below shows an Enigma machine in action.
The keyboard is where the plaintext letter is entered and operates similarly to a typewriter. It contains only the 26 letters of the alphabet and has no options for numbers or spaces. Pressing the keyboard moves as least one of the rotors and initiates an electric current.
The plugboard or steckerboard was located in the front of the machine and had switches for each of the 26 letters of the alphabet. This was similar to a telephone switchboard at the time. Cables (or steckers) were used to connect switches that produced a corresponding swap of two letters. The number of cables that were used varied at different times during the war. The plugboard was not present in the commerical version of Enigma designed by Scherbius but was added for the military version.
The scrambling unit consisted of 3-4 rotors depending on the type of Enigma machine and a reflector. Army and air force Enigma machines used three rotors, and eventually naval Enigma machines used four rotors. We will primarily discuss how the three rotor machines worked.
For the scrambling unit portion of the Enigma machine, if viewed from the front of the machine, the current passes through
the rightmost rotor
the middle rotor
the leftmost rotor
back through the leftmost rotor
back through the middle rotor
back through the rightmost rotor
Each rotor consisted of 26 nodes on each side (one side has pin contacts and the other side has flat contacts). These two sets of nodes have wires connecting one to the other. This wiring created a one-to-one switching of letters in the alphabet (that is, a permutation of the alphabet). For detailed images of how to wire a rotor, see http://enigmamuseum.com/replica/#rotorwiring.
On the right hand side of each rotor was a cogwheel with 26 teeth. On the left hand side of each rotor there is a metal ring with either the numbers (1-26) or the letters (A-Z). This metal ring could be shifted relative to the wiring by means of a clip. This clip specifies the ring setting of each rotor. Each rotor would be placed into the machine with one of these numbers of letters showing in a display board. The letters for all of the rotors in the machine is often called the indicator setting. This doesn't create additional initial settings, but rather disguises the displayed rotor setting.
The rotors were connected together and placed into the machine as a unit of three or four rotors. Each rotor was then rotated to a given starting letter. For three rotor machines, the rotors could be arranged in any order. For four rotor machines, three of the rotors could be placed in any order, but the fourth rotor was limited. (Special fourth rotors and thinner reflectors were designed to take the place of the entire reflector.)
The reflector consisted of 26 nodes with wires that swapped thirteen pairs of letters and sent them back through the rotors in reverse. For the three rotor machines, the reflector was a fixed part of the machine and could not be changed. More details on the scrambling unit is below.
The last part of the enigma machine was the display board or lampboard. Pressing the letter on the keyboard initiated a current which traveled through the keyboard, plugboard, and scrambling unit to light up a letter in the lampboard. Enigma operators would record this letter as the ciphertext for the plaintext letter they entered on the keyboard.
The important part of the scrambling unit is that every time a letter is pressed on the keyboard a stepping action changes the location of at least one rotor, so that the next letter is encrypted in a very different way. Note this stepping action occurs when the key is pressed and before the current is sent through the circuit. The mechanics of the stepping action are very interesting and sometimes produced an unexpected stepping of the middle rotor. Pressing a letter on the keyboard moves three levers connected to each rotor.
The first lever is on the outside of the rotor 1 (to the right of rotor 1 if viewed from the front of the machine). It is connected to a gear on the rotor with 26 teeth. Thus, this lever moves the rotor to the next node every time a letter is pressed on the keyboard.
The second lever is located between the first and second rotors. It is wider than lever 1, and is connected to both a gear with 26 teeth and the edge of rotor 1 which has a notch in only one position. This lever becomes active only when it engages the single notch on rotor 1. When engaged it moves rotor 1 (via the notch) and rotor 2 (via the gear). Rotor 1 is moved by lever 1 at every step, so this additional effect of movement by lever 2 is not noticable.
Lever 3 is similar to lever 2 but located between rotor 2 and rotor 3. When lever 3 hits the notch on rotor 2, it moves rotor 2 and rotor 3. Since rotor 2 is not moving at every step this produces an additional stepping of rotor 2.
This is easier to see in action in the video below. Note, the levers are at the back of the rotors so this shows the action from the rear of the machine. Thus, the levers are to the left of a rotor rather than the to the right of a rotor.
In order to use the Enigma to exchange messages, two machines had to be set up in exactly the same way. This required choosing
- three (or four) rotors from the set of rotors
- the ring setting for each rotor
- the order the rotors went into the machine
- the indicator setting for all three (or four) rotors
The total number of rotors that could be chosen from varied throughout the war and by type of traffic. Air force and army machines initially had a set of three rotors but it was expanded to a set of five rotors by the end of the war. Naval Enigma machines had as many as eight different rotors to choose from (not including the special fourth rotor). To communicate these settings code books with the settings for an entire month were used as in Figure 4.2.9.
The combined action of the keyboard, plugboard, rotors and reflector is illustrated in a simpler form in the sage code below. It illustrates a mini-enigma with 6 letters per rotor and a plugboard with 2 cables to swap letters is illustrated in the sage code below. The red dot indicates the position of the notch which moves the next rotor. The notch would be present on the third rotor, but it wouldn't have an effect when the rotor was in that position so it is not shown.
Sage Computation 4.2.10. Mini Enigma Simulator.
Note that the reflector serves two very important roles. First, it creates a reciprocal cipher. That is, if A is encrypted as B, then B is encrypted as A. This always happens because the reflector swaps letters. This is very important in terms of ease of use because it means the setup for encryption and decryption are the same. The second important feature is that a letter can never be encrypted as itself. This information was very helpful to cryptanalysts.
The Enigma machine is quite complicated. To get a feel for how this works we will start with a simpler model and a paper Enigma machine. This simpler version does not have a plugboard.
Time for you to explore how the Enigma machine works with a paper Enigma model in Investigation: The Paper Enigma.
From Investigation: The Paper Enigma you should start to be getting a feel for how the Enigma machine works and the number of possible initial settings. We next want to see how the addition of the plugboard adds to the complexity of the machine and impacts the number of initial settings.
Time for you to explore how the plugboard on works in Investigation: Understanding the Plugboard.