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:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

E K M F L G D Q V Z N T O W Y H X U S P A I B R C J

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