In WW2, the Germans used a sophisticated system for encoding documents and radio transmissions. This system used a device called the Enigma machine. The mathematics behind this electro mechanical computing system were such that it created what the Germans thought to be an unbreakable code. To encode a message, the operator set up initial configuration values on the machine, and typed in the message to be encoded using a typewriter like keyboard. For each letter entered, the encoded value for that character would light up on a corresponding array of lettered lights on the machine. Those letters could be written on a paper message to be passed by courier, or transmitted via morse code on a wireless set. The decision about which rotors to use, which order to place them in, and what the inital rotor settings would be for a message was determined by a pre-shared code sheet that documented the settings to use on any given day.
This site contains a simulator of a Type 1 Enigma machine, and is compatible with original physical Type 1 Enigma machines and M3 machines using the single notch rotors (I - V).
Try the Enigma Simulator here
A model 1 Enigma machine has a set of 5 rotors numbered I,II,III,IV,V. Of these rotors, 3 are in use at any one time. Rotor encoding is order dependent, so there are 60 possible combinations and orders of those rotors. Messages were composed using only the letters A-Z, with spaces replaced by X, and numerical digits spelled out. Each of these standard rotors contains a mapping between the characters A-Z to translate the input message as it passes from one rotor to the next. Each time an input key is pressed, the right most (least significant digit) rotor advances one position. Once each revolution of the rotor, the next rotor is advanced one position, and that process also occurs when the second rotor causes the third rotor to also advance one position. Imagine a car odometer advancing the next digit. The point where a rotor caused the next rotor to advance is not at letter Z / Position 26 like you would imagine for an odometer type gear, but it varied depending on the rotor that was selected. For example, the turnover notich on rotor number I was in position 18 (Letter R), but for rotor II it was in position 6 (letter F).
Each rotor has an initial setting between 1 and 26 (sometimes marked A-Z), so the number of possible initial settings of the rotors is 26*26*26=17,576. Each rotor also had a ring that could be rotated that further added to the complexity. Advancing the ring 1 position was similar to just advancing the rotor one position, so a starting point of A would instead be a starting point of B. This by itself would not increase complexity, BUT, advancing the ring did NOT advance the notch that caused the tripping of the next rotor. So in effect, it advanced the point where the next rotor would be tripped. This might not show up for the first few characters of a message, but it would show up within 26 characters on the first rotor. The effect might not show up at all on rotor 2 in a short message, and the third rotor does not affect the rotation of any other rotor, so it's ring setting does not influence complexity at all. So lets just assume that this increases the complexity just by one factor (26) instead of two factors (26*26) for typical messages, so 17,576*26=456,976.
For brevity, I'll omit discussion of the "double stepping" bug. But suffice to say, there is a bug/feature of the Enigma that causes the center rotor to advance it's position two key strokes in a row instead of waiting for the right rotor to completely cycle. This article discusses that behavior.
Each machine also has a different type of rotor, called a reflector, which wraps the inputs around and sends them back through the rotors a second time. This round trip is what provides the symmetrical encoding for clear text input to encoded output. Example, ABCD might encode to EZHI, and EZHI encodes to ABCD. The Type 1 Enigma machine has 3 possible different reflectors, which multiples the possible combinations by 3. So, if an opponent had a working encryption machine with a complete set of rotors, the number of different settings using rotors and reflectors is: 60 * 456,976 * 3 = 82,255,680.
All these different methods of introducing complexity are confusing, but operational practices made it more organized. For instance, a rotor selection and ring selection change would be done at the same time since both involved taking the rotors out of the machine. A plugboard change might be done at a different schedule. And the most easily changed setting, the initial rotor setting might be changed several times in the same day. In fact, one technique was to set the machine to an initial AAA rotor position, and send the next rotor setting to as the first 6 letters of the message. (3 letters, repeated once for cross check). Then change the rotor settings to the indicated value before sending the actual message. New plug board settings could be sent in similar manner by removing all plugs so that it was in a neutral A=A, B=B, etc mode, and sending the new pairs to use for the actual message.
This was too much for a manual brute force attack, but was within reach for cracking with 1940s electro mechanical computing. However, there is one more setting feature that dramatically increases the complexity. Each Enigma machine has a set of 26 connectors and up to 13 connector wires that allow for a user settable mapping between pairs of characters. (10 were typically used) For instance, if the letters A and B are connected, all As in the input are first translated to B, and vice Versa. If there is no translation specified for a character, input proceeds without change. Whereas each of the 5 rotors in the set had their own fixed translation mapping, the plugboard is essentially a 4th user programmed translation rotor, but one that does not increment as the hard wired rotors do. Because the plugboard was not hard coded, it increased the complexity of the encoding by a much higher factor than a would be done by an additional hardcoded rotor.
The math for this is a somewhat complicated combinatorial calculation, and it creates a surprisingly large number of possible combinations if all 13 possible wires were used: 532,985,208,200,576, or over 532 trillion combinations. This, when multiplied by the over 3 million combinations available using the rotors and reflectors alone, you get over 41,496,000,000,000,000,000,000 combinations, or about 41.5 sextillion combinations. Keep in mind that a sextillion is equal to a billion trillions. A modern PC can perform approximately 1 trillion calculations per second, which means a single conventional PC would require 825 years to try all possible brute force combinations for a 1939 Model 1 Enigma machine. Even if the Allies had reverse engineered the Enigma, or captured a working machine, the number of possible setings were viewed as an impossible obstacle to overcome. One can understand why the Germans were perhaps overconfident in the security of the Enigma code. This caused them to make operational mistakes, and those mistakes plus pattern recognition by the code breakers made it possible for WW2 Polish, British, and American teams to crack the WW2 Enigma code using 1940s electro mechanical computing machine technology. The Germans modified their procedures and created more complicated Enigma machines througout the course of the war, which resulted in a continuing battle of code makers vs code breakers.
For more information:
Back | Copyright 2025 Curio and Relic | Last Modified: Jan 2025 |