0.7: The Enigma Machine
The Enigma machine, used by the Germans leading up to and during
the Second World War, performed a complex polyalphabetic
substitution cipher.
The Enigma machine had several components: a keyboard, a light board, a
plugboard, and several rotors (or wheels). An operator entering a
message would
type on the keyboard portion of the machine. The encrypted
letter for each plaintext letter would light up on the lightboard.
The receiving operator would do the reverse: they would type in the
ciphertext letters and the corresponding plaintext letters would light up
on the lightboard.
This
picture,
from the NSA's National Cryptologic Museum,
shows an Enigma machine. Viewed from the top down, the components are the
rotors, lightboard, keyboard, and plugboard.
It is important to note that the following description of the wiring and
setup of the enigma is the most commonly discussed, but not the only one
in use during WWII. Different
branches of the German military set up their enigma machines in various ways
and modifications were made during the conflict.
Technical Details of the Machine
The main cryptographic functionality of the machine was provided by
3 rotors.
There were 5 different rotors from which these 3 could be
chosen and placed in any order. This gives a total of 5 · 4
· 3 = 60 choices for the wheel order. Each wheel is labelled
with the letters A-Z so there are 26 possible initial settings for
each wheel. This gives a further 26 · 26 · 26 = 17576
permutations, for a total of 17576 · 60 = 1, 054, 560 possibilities.
The rotors connected various electrical circuits in the machine. As
they turned, different connections between the keyboard and lightboard
would be made and thus, different ciphertext letters would be chosen
for the plaintext letters typed.
Each wheel had 26 notches associated with the letters and they turned at
different rates. The rightmost wheel would turn every time a letter was typed.
The middle wheel would turn one notch when the right wheel had done a full
revolution, that is, every 26th letter typed.
The leftmost wheel would
turn a notch when the middle wheel had completed a full revolution, that is,
every 676th letter typed.
The plugboard consisted of 26 pairs of plugs, which allowed for pairs of
letters to be swapped adding a
monoalphabetic substitution cipher component to the cryptographic scheme.
This gives 26! = 403, 291, 461, 126, 605, 635, 584, 000, 000 possible swapping patterns.
Along with the rotor settings, it produced a
total number of possible keys of about 159 million million million.
On sending a message, the operator would set up the rotors and plugboard
in a pre-arranged fashion, usually changed every day. Then the operator
would type a three letter message setting twice (e.g. CTGCTG)
which would be encrypted (e.g.FUTGNP) using the daily setting. Then,
the operator would set the wheels at this message setting (CTG) for the
actual message text. Two security problems arose from this method.
Firstly, the operator chose the message setting and consequently, it
was not very random. Usually, the three letters would be very close
on the keyboard. Secondly, the repetition of the message setting was
a valuable clue to cryptanalysts. The Germans must have realised this
second problem as the procedure was changed May 1, 1940 to only
send the setting once.
NSA's National Cryptologic Museum: http://www.nsa.gov/museum/enigma.html
How the Enigma Works: http://www.pbs.org/wgbh/nova/decoding/enigma.html
NEXT PAGE