Part of the World War II Cryptographic Simulation

German point of view:
The primary encryption device for the German military is the standard, three wheel, Enigma. In addition to this different branches of our military and government use variations on the basic Enigma. Our navy uses a four rotor variant with eight standard rotors, 2 'gamma' and 'beta' rotors and different reflectors from the standard enigma. In addition to this there is the Abwher Enigma which does lacks a plugboard but compensates for this with heavily notched rotors.

The Enigma works on the same principle of rotors developed by Edward Herbern of the United States. The machine uses a series of 'rotors', which you can think of as gears, to heavily scramble a message. Each rotor has 26 contacts, each representing a letter of the alphabet, on one side. These contacts are then connected in a scrambled manner to another contact on the other side. Here is the wiring used in the first rotor of the Enigma:



So the effect is that if the contact for A receives a 'live' current it is then transformed to the contact for E. This is the basic principle of monoalphabetic substitution that has been used for centuries. The Enigma takes this to an incredible degree of complexity. It uses three regular rotors to perform substitutions as above, and a reflecting rotor that sends it back through the first three rotors again. By itself this would offer very little security. What makes the Enigma so secure is that on each key press the first rotor rotates. When the first rotor reaches it's 'notched' position the middle rotor rotates and so on. This means that when the first rotor is in the 'B' position, the letter sent to the 'A' contact is received at the 'Z' contact, an offset of 1. A simple change such as this completely changes the route the current takes, resulting in a wildly different encrypted letter. The 'alphabet ring' on the outer side of the rotor can also be rotated, this is called the 'ring setting'. If this was rotated forward two positions it would mean that when the rotor indicator reads 'A' it in fact mean 'Y'. In addition, changing the 'ring setting' would also change the position of the notch.

In addition to this basic rotor encipherment, the military Enigma has two additional features which make it quite safe. Once the current goes through the first three rotors it is transformed one more time by a 'reflecting' rotor and then sent backwards through the first three rotors. There is also a 'plugboard' on the bottom of the machine that the current goes through both before and after the rotors. The plugboard has 26 different plugs, each representing a letter of the alphabet. The operator can connect these plugs together with a standard set of 10 wires. If the letters 'D' and 'H' were connected and the operator typed a 'D' it would first be transformed into an 'H' before continuing to the rotors. In addition, if the rotors produced an 'H' it would be transformed into a 'D' before going to the lightboard.

As an example. if the letter A were typed:
A -> plugboard
On the plugboard A is connected to D so the current is changed to D
D -> rotors
Now, before going to the first rotor the offset of the rotor must be compensated. If the rotor is at the 'C' position then the input will arrive three positions before.
B -> rotor 1
Rotor1 scrambles it, it is then adjusted for the offset of rotor2
Rotor2 scrambles it, adjusted for rotor3
Rotor3 scrambles it, adjusted for reflector
reflector scrambles it, adjusted for rotor3
rotor3 scrambles, adjusted for rotor2
rotor2 scrambles, adjusted for rotor1
rotor1 scrambles, adjusted for output
If we now have the letter 'A' it then goes through the plugboard one more time and comes out as 'D'

Messages can be decrypted by simply typing in the text with the same settings because the reflector makes it seem that the message is being forced back the other way.

The Enigma is operated by first consulting a keybook for the daily key. This specifies the rotor order (the order the rotors are put in the machine) the ring-settings of each rotor and the plugs that are to be connected. The operator then types a random 'indicator setting', changes his rotors to that setting, and types the rest of the message. The receiver can then decipher the first three letters and change his machine to the same settings to decipher the message. At the beginning of the war we enciphered our indicators twice; however, we soon quit this practice realizing the advantage it would give an enemy.

United Kingdom point of view:
The Germans use a variation on a commercial machine called the Enigma that was sold prior to the war. They have developed their own rotor wirings and, most importantly, implemented a 'plugboard' that provides a great deal more protection. Hitler and his commanders believe that this system is unbreakable. They are wrong. Before our Polish comrades fell at the hands of the fascists in 1939, they had broken the Enigma. Seeing their downfall approaching, they sent us their work. Where we had previously failed, the Poles succeeded. They recreated (reverse engineered!) a military Enigma from their knowledge of the commercial machine and encrypted messages. They built an electric-mechanical device, that they called a 'Bomby' (probably because of the ticking sounds they made,) to figure out the daily settings of the Enigma. We took this work and flew with it. Our headquarters in Bletchley Park is now generating sheaths of daily intercepts, called ULTRA intelligence, that has benefitted our war efforts beyond measure.

Perhaps our greatest cryptologist, Alan Turing, has taken the Polish bomby to a new level with the Turing bombe. This machine relies on the mathematical principal of reductio ad absurdum. Essentially the machine tests every possible rotor setting to see if it will generate a given cipher text from a given crib of plaintext. Each time the machine reaches a situation it thinks can generate the necessary plaintext, it stops all activity and produces a 'drop'. This drop is then recorded by a technician, tested, and (if false) the machine will continue to run. The plugboard on the Enigma further complicated things, producing a large number of false drops. Fortunately, another one of our cryptologists, Gordon Welchman, has developed an addition the the Turing Bombe called the 'Diagonal Board'. The Diagonal Board contains an array of 26 plugs by 26 plugs. This allows each drop to be tested against all possible plugboard combinations to see if it is accurate.

The bombe operates by using 60 groups of 4 disks each. Unlike the real Enigma, each disk has two concentric rings of 26 contacts, one for forward encryption and one for backward encryption. This was because the Bombe needed to test the electrical state at each point of encryption; one set of contacts operating for both sides of encryption would not work. There are 60 groups for the 60 possible combinations and positions of the five availailable rotors in the standard Enigma. Each offset and ring setting is then checked until a working drop is delivered. To go through all the possible combinations the machine usually takes 12 hours.