
This page
provides the technical details of the Wehrmacht
and Luftwaffe Enigma, and the Kriegsmarine Enigma
M4. You can view all images in a higher
resolution by clicking them. All images
copyrighted by D RijmenantsContent 


The Enigma machine is an electromechanical device. It consists of a keyboard (German QWERTZ layout), a lamp panel, representing the alphabet, and three or four rotors. One or more rotors move on each key stroke. The rotors and plugboard translate the depressed key into a burning lamp, representing the encoded letter. The machine has a compartment for a 4 volt battery. Some versions have a switch to select between internal battery and external power supply. Other versions have a transformer to connect the machine to the AC mains.

The picture above shows the wiring. To simplify the example, only four of each of the components are shown. In reality, there are 26 lamps, keys, plugboard sockets and wiring connections inside the rotors. The current flows from the battery [1] through the depressed bidirectional letterswitch [2] to the plugboard [3]. The plugboard allows rewiring the connections between keyboard [2] and fixed entry wheel [4]. Next, the current proceeds through the  unused, and therefore closed  socket [3] via the entry wheel [4] through the crosswirings of the three (Wehrmacht Enigma) or four (Kriegmarine M4) rotors [5] and enters the reflector [6]. The reflector returns the current, via a different path, back through the rotors [5] and entry wheel [4], and proceeds through the plugboard again and through the plug 'S' connected with a cable [8] to plug 'D', and another bidirectional switch [9] to lightup the lamp.
Note that depressing a key will first step the rotors and then the sent the current through the rotors en the light bulb. If the key is released the lamp will no longer light up. Therefore, when no key is depressed, the rotor position of the previous encrypted letter is visible!
The picture below shows the mechanical setup of the Enigma, seen from the right side, with more or less the same wiring diagram as above.
The rotors (Walzen in German) are the most important elements of the machine. These round disks [9], approximately 4 inch in diameter, are made from metal or bakelite and have a core with 26 springloaded contacts [6] on the right side, scramble wired [5] to 26 flat contacts [4] on the left side, with a hollow axle in the center [8]. On the outside of the wiring core there's a movable ring [3] with 26 numbers or letters and a notch [1]. This ring is rotatable and is locked with a sprinloaded pin (Wehrmacht) [7] or two springloaded arcs (Kriegmarine) into any of the 26 positions. Changing the position of the ring will change the position of the notch and alphabet, relative to the internal wiring. This setting is called the ring setting or Ringstellung and its position is visible by a dot marking [2]. Each rotor has on its left a notch [1] and on its right a ratchet [10]. These are used by the stepping mechanism to advance the rotors. The internal wiring is different for each rotor. This wiring represents a substitution encryption. The combination of several rotors, in everchanging positions relative to each other, is what makes the encryption so complex.
The machine was introduced with three
rotors. In 1939 the set was extended to five rotors,
marked with Roman numerals I, II, III, IV and V, all with
a single notch. The Kriegmarine extended this set of
rotors with another three rotors called VI, VII and VIII,
each with two notches. In 1942, the Kriegsmarine M4
introduced a fourth rotor. To achieve this, the wide B
and C reflectors from the three rotor version were
replaced by thin B and C reflectors, leaving room for the
special fourth rotor. The fourth rotors were of two
configurations, named Beta and Gamma, with springloaded
contacts on both sides, making them incompatible with the
other eight rotors.






Additional rotors
used by Kriegsmarine M3 and M4 only:
The special fourth rotors, also called Zusatzwalzen or Greek rotors. Used on the Kriegsmarine M4 with thin reflectors only:
The reflector (Umkehrwalze or UKW in German) is a unique feature of the Enigma machine. On the normal rotors, each letter can be wired with any other letter. An 'A' could be wired to 'F', while the 'F' is wired to 'K'. In the reflector, the connections are made in loop pairs. In the case of the wide B reflector, the 'A' is wired to the 'Y' which means that the 'Y' is also wired to the 'A', resulting in a reciprocal encryption. The advantage of this design is that encryption and decryption are possible with the same machine setting and wiring. Unfortunately, a letter can never be encrypted into itself, a property that opened the door to cryptanalysis, making the job easier to the codebreakers. Default wide reflectors Wehrmacht and Luftwaffe:
Thin reflectors, Kriegsmarine M4 only:
The wirings as described here, are for the rotors for Wehrmacht (Heer and Luftwaffe) and Kriegsmarine Enigma's only. The rotors for other versions of the Enigma machine had other internal wirings.


Rotor  Notch  Window  next left rotor steps when rotor steps from/to 
I II III IV V VI VII VIII 
Y M D R H H + U 
Q E V J Z Z and M 
Q > R E > F V > W J > K Z > A Z > A and M > N 
The three pawls on their axle, resting on the pads. The pawl axle is fixed to the stepping bar (silver L shape). At the right of the pawls you can see the fixed entry rotor. 
Gear type advance mechanisme of the rare predecessor of the Enigma G. Notice the normal rotor contact placement instead of the later Enigma G rotors with special zigzag placed contacts. 
Important note on the Stepping Sequence
The rotors appear to work as a normal odometer, with the rightmost rotor always stepping on each key stroke and the other rotors stepping after a complete cycle of the previous rotor, but there is an important difference due to the system of pawls and teeth. The middle rotor will advance on the next step of the first rotor a second time in a row, if the middle rotor is in its own turnover position. This is called the doublestep. Below and example of such a sequence when the rotors III – II  I are used:
KDO KDP, KDQ, KER, LFS, LFT, LFU…
As you can observe, stepping from Q to R advances the middle rotor, and on the next step that middle rotor steps again, advancing the third rotor also. This is caused by the mechanical design of pawls and ratchets. There are three pawls that are all three activated on every key stroke. Each pawl is half positioned on the index ring (carrying a notch) of the rotor on its right, and half positioned above the 26 teeth of the rotor on its left (viewed from the point of the operator). A rotor’s ring prevents the pawl from pushing into the teeth of the nextleft rotor. When a notch occurs in a ring, the pawl can drop into that notch and push into the teeth of the nextleft rotor. Since the rightmost pawl is not above an index ring it will continuously advance the rightmost rotor.
Once the rightmost rotor has stepped and the middle (springloaded) pawl can drop down in the right rotor's notch, it will engage the middle rotor's teeth, pushing the middle rotor one step. An identical event will take place when the middle rotor's notch enables the third pawl to drive the teeth of the leftmost rotor. A rotor will not only advance if its teeth are catched, but also when a pawl pushes into its notch. This situation creates a doublestep of the middle rotor: the right rotor steps and the middle pawl takes the middle rotor one step further. If the middle rotor has moved by this step into its own notch position, then, on the next step, the leftmost pawl catches the teeth of the leftmost rotor, but the same pawl also pushes in the middle rotor's notch, moving it a second time in a row. Note that a double notched rotor in the middle position will also have two double steps.
The stepping mechanism, as explained above, is used on the Wehrmacht and Kriegsmarine Enigma. The fourrotor Kriegsmarine M4 is derived from the three rotor version without changing the rotor advance mechanism or adding a fourth pawl. Therefore the fourth rotor doesn't move and can only be adjusted manually. The EnigmaG, used by the Abwehr (German Intelligence) has a different mechanism. The EnigmaG has a rotating reflector and three rotors with multiple notches, rotated by a gear box.


To calculate the mathematical security we have to find all possible different settings of the machine. Therefore, we need to look at the following properties of the machine: the selection and order of the rotors, their wiring, the ring setting on each of the rotors, the startposition of these rotors at the beginning of the message, the reflector and the plugboard settings. Now, there are different ways to calculate a grand total of this. In this NSA publication, all possible variations of wiring in each of the rotors and the reflector was included. This results in an astronomical 3 x 10^{114}. However, these misleading figures represent all theoretically possible variations of the machine.
Unfortunately for the Germans, the Allied codebreakers knew the machine, the rotors and the internal wiring of these rotors. Therefore, they only had to take in account the actual possible ways you could set the machine, the actual key settings or key space. This is what we call the practical security, which is far less than the theoretical security in the case of Enigma. For the German cryptologists, a single rotor could be wired in 4 x 10^{26} different ways. Combining three rotors and a reflector quickly gives you astronomical figures. For the Allied codebreakers, who knew the wring of the rotors, there were only 26 different variations for a single rotor, that is, the 26 positions it could have in the machine. They didn't have to search through the immense number of possible wirings. The German cryptologists made a critical mistake by ignoring Auguste Kerckhoff's law that the security of a device may never depend on the secrecy of the system (i.e. rotor wiring, design), which will be compromised sooner or later anyhow, but only on the secrecy of the key (i.e. rotor selection and plugboard). In the interesting R.A. Ratcliff paper for Cryptologia you can read how dangerous it is to rely on theoritical security.
Let us look at all the things we can actually set in the machine and are unknown to the codebreaker. In our example, we take the threerotor Wehrmacht Enigma with default B reflector and selection out of 5 rotors. We use 10 plug cables on the plugboard, the default number of cables, issued with the machine (don't ask me why they didn't provide 11 cables, which gave far more possible combinations)
To select 3 rotors out of a possible 5, there are 60 combinations (5 x 4 x 3). Each rotor, in other words its internal wiring, can be set in any of 26 positions. Therefore, with 3 rotors there are 17,576 different rotor positions (26 x 26 x 26). The ring on each rotor holds the rotor labeling (which doesn't matter here) and a notch that affects the stepping of the nextleft rotor. Each ring can be set in any of 26 positions. As there is no rotor to the left of the third (mostleft) rotor, only the rings of the mostright and middle rotor affect the calculation. This gives 676 ring combinations (26 x 26).
The plugboard provides the largest chunk of possible different settings. For the first cable, one side can have any of the 26 positions and its other side any of the 25 remaining positions. However, since a combination and its reverse are identical (AB is the same as BA) we have to ignore all doubles in all possible combinations for one cable, giving (26 x 25) / (1! x 2^{1}) or 325 unique ways to set one cable. For two cables, we have (26 x 25) for the first cable and, since two sockets are already used, (24 x 23) for the second cable. We now have to take in account the doubles for two cables, giving (26 x 25 x 24 x 23) / (2! x 2^{2}) = 44,850 unique ways to set two cables. For three cables we have (26 x 25 x 24 x 23 x 22 x 21) / (3! x 2^{3}) = 3,453,450 combinations, and so on. Thus, with the default 10 cables we have 150,738,274,937,250 different combinations. The formula, with n as the number of cables, is 26! / (26  2n)! · n! · 2^{n}
In total, this gives: 60 x 17,576 x 676 x 150,738,274,937,250 = 107,458,687,327,250,619,360,000 or 1.07 x 10^{23}
So, in real life, the Wehrmacht Enigma machine could be set in 1.07 x 10^{23} different ways, which is comparable with a 77 bit key.
There are some comments we should add to this number. In reality, the maximum period of the rotors  the number of steps before the machine repeats itself  is slightly less than 17,576. This is caused by the doublestep feature of the stepping mechanism. The actual period depends on the type of rotor. The three doublenotched Naval rotors will have an even smaller period than the Wehrmacht rotors as they produce more double steps of the middle rotor. The maximum period however is no part of the variables that can be set and therefore do not influence the key space. The Wehrmacht machine could be equipped with either the B or C reflector. In general, radio nets always used the same reflector, as the use of different reflectors created logistical, procedural and practical problems. If nonetheless taken in account, the choice between B and C reflector would only double the key space.
The adding of a fourth rotor for the Naval Enigma M4 to improve its security was a nice but useless addition. The nonmoving fourth rotor complicated the machine only by a factor 26 and, together with the thin reflector, could be considered as a settable reflector with 26 positions, of which the Allies quickly found the wiring (after 10 months of panic). The introduction of 8 naval rotors on the Kriegsmarine M3 and later on the fourrotor M4 was a far better approach. They increased the rotor combinations from 60 to 336, and brought in additional complexity with 3 multiple notched naval rotors VI VII and VIII.
Let us now calculate the practical key size of the fourrotor Kriegsmarine Enigma M4. This machine uses 3 normal rotors, selected from a set of 8 (of which three with double notches). This gives 336 rotor combinations (8 x 7 x 6). The M4 also has a special fourth rotor called Beta or Gamma (without a ring), which gives us 2 choices. These are not compatible with the other rotors and are only suitable as fourth (most left) rotor. The 4 rotors can be set in any of 456,976 positions (26 x 26 x 26 x 26). The M4 had a smaller B or C reflector, to enable the placement of the fourth rotor. We don't include the choice of reflector as it was generally never changed. Again, only two rings were involved, as the third rotor didn't step the never moving fourth rotor. The M4 was also issued with 10 plug cables.
In total, this gives: 336 x 2 x 456,976 x 676 x 150,738,274,937,250 = 31,291,969,749,695,380,357,632,000 or 3.1 x 10^{25}, comparable with a 84 bit key.
This is about 291 times stronger than the Wehrmacht machine. This is due to the increased choice of rotors (already available on the M3 before the war) and the possible initial positions for 4 rotors instead of 3. However, although the fourth rotor did increase the key size, it failed to add to the complexity of the encryption itself, since it couldn't move during the enciphering proccess. A better solution would have been to completely rewire some of the rotors on a regular basis. A single variable rotor wiring would multiply the key space with no less than 4 x 10^{26}, which is far more than a settable reflector with its 7.8 x 10^{12} possible variations. A single practical, daily changed, rewireable rotor, which has 4 x 10^{26} possible settings, would have been much more effective than the overestimated daily notmoving plugboard setting with only 2 x 10^{14} variations (the plugboard was always in pairs). The use of such rotor, for instance in conjunction with a thin M4like reflector and two out of four normal rotors, would be a true disaster for the codebreakers. However, introducing rewireable rotors during wartime would be cumbersome and present a logistical and financial nightmare, just as the rewireable D reflector proved to be. Too little too late. The D reflector did scare the codebreakers initially, until they realized that the D reflector was used simultaniously with the default reflectors in the same radio nets, due to practical considerations. This dual use made it possible to break it even by hand. More about the D reflector and other attempts on the Enigma history page.
Any cryptoexpert would also discard the 17,576 ring combinations. Even with completely wrong ring settings, you will initially start with a correct plain text. As soon as you get garbled text, you adjust the ring of the mostright rotor (a 1/26 chance you're right) and if you're lucky you have no more trouble for the next 676 characters. If less lucky, you had to adjust the ring of the middle rotor after 26 letters. All done onthefly. Unfortunately for the Germans, the ingenious Turing Bombe design, with mirrored identical rotor packs, avoided the need to search through the immense number of plugboard settings, taking a factor 2 x 10^{14} shortcut on the linking of their cribs (known piece of plain and ciphertext) to a given rotor setting.
Breaking the Enigma traffic was nonetheless an enormous challenge with a key setting that was extraordinary in the electromechanical era of those days. An exhaustive search on 1.07 x 10^{23} settings was impossible in the 1940s and its comparable 77 bit key is even huge for today's computer standards. To give you an idea of the size of that number, with 1.07 x 10^{23} sheets of paper (0.0039 inch each) you can build roughly 70,000,000 stacks of paper, each of them reaching from the Earth to the Sun. Also, 1.07 x 10^{23} inches equals 288,500 lightyear. A pretty big number! The Germans were correct in assuming that the Enigma was theoretically unbreakable. However, codebreaking is more than keys sizes and numbers, theoretical security and searching for the right combination. More on the how the Allies broke Enigma on this page.
© Copyright 2004  2016 Dirk Rijmenants
Home Menu History Procedures Technical details Enigma Simulator 