Vous êtes sur la page 1sur 6

Klinkhamer 1

Tresha Klinkhamer
Dr. Manuel Welhan
Math 415
Final Project
The Enigma
Although the Enigma machine was used mainly in the Second World War, and sparsely
for thirty or so years after, its origins lie in the end of the First World War. Most messages
during that time sent were via radio, which allowed for faster communication, but also enabled
messages to be more readily intercepted by the enemy. Such messages then had to be encrypted,
however the more complex the encryption system was, the more likely those encrypting could
commit an error with potentially disastrous results. With that in mind, after the war, Arthur
Scherbius created the Enigma encryption machine, which he finished in 1923.
The original machine created was the civilian version of the machine. It contained: a
slightly augmented keyboard which swapped the positions of Z and Y, and moved the P down to
the bottom row; three rotors, each with twenty-six possible settings and a single notch which
signified the rotation of the next rotor when the letter it was at passed the encryption spot; a
reversing drum (or reflector, depending on the text you use), which had twenty-six spring loaded
contacts connected in pairs; and a set of twenty-six glowlamps, set up the same as the augmented
keyboard. When complete, the machine weighed somewhere around thirty pounds. The military
version of the machine included a plugboard, but sources vary on the number of connections
available for the plugboard; some suggest there were six, others ten, others thirteen, but it was
known that each plug connected a pair of letter. The addition of the plugboard meant that if the

Klinkhamer 2
letter A was wired to the letter B, that when A was typed, it went into the Enigma as a B, and
vice versa.
The rotors function much the same way as an odometer in a car. The first rotor rotates
with each letter entered into the machine, and when the notch passed the spot of encryption, the
second rotor rotated which meant the first time the second rotor moved was likely to occur
before the twenty-sixth letter of the message was encrypted, it just depended on the location of
the notch. Then, the third rotor rotated when the notch on the second rotor passed the encryption
The way the machine functioned was, when a letter of the plaintext was typed on the
keyboard, the first rotor rotated, then electricity traveled through each individual rotor, then into
the reversing drum, then back through the rotors in a different path than before, and the
electricity then lit the glowlamp that corresponded with the ciphertext letter. This setup had each
individual letter changing a total of nine times before the ciphertext letter was outputted. The
military version of the same machine had each letter change eleven times because of the addition
of the plugboard. Later, the number of rotors was increased from three to five. The idea here was
that, while the machine still only used three rotors, there were five rotors to choose from. The
German navy had four rotors to use up until the transition, when it upgraded to eight possible
The machine implemented a combination of the substitution cipher and the affine cipher
when encrypting. With three rotors, the Enigma had a total of 105456 initial settings (26 possible
initial settings for all three rotors and six possible arrangements for the rotors in the machine.)
For the five rotor version, there were 1054560 initial settings for the machine (where the three
rotors only have six possible arrangements, the five rotors have sixty possible arrangements, thus

Klinkhamer 3
the four rotors would allow for twenty-four possible combinations and the eight rotors would
allow for three hundred and thirty-six possible combinations.) All total, with the possible settings
of the plugboard, the reversing drum, and the rotors, the machine had trillions of possible setups
to use, so its understandable why the Germans believed the machine secure enough to use.
The security for the Enigma relies heavily on keeping the initial arrangement and initial
settings of the rotors, the settings of the plugs on the plugboard, and the internal wiring of the
reversing drum secret. One feature of the Enigma is that, if an X was encrypted as a Y, the Y
could be decrypted as an X at the exact same setting of all components. So, if the one decrypting
the message used the exact same initial position as the one who encrypted the message, all that
person then had to do was type the ciphertext into the machine and the output would be the
The cracking of the system of the Enigma came with deductions based on captured
ciphertexts, however, since the rotation of the rotors changed the substitution for each character
of the message much like an affine cipher would, frequency analysis of the ciphertexts would not
work. It was also possible for cryptoanalysts to eliminate several possibilities for decryption
since it was not possible for a letter to be encrypted as itself.
It was in 1932 that the civilian version of the Enigma was cracked by three Polish
cryptologists: Marian Rejewski, Henryk Zygalski, and Jerzy Rycki. They used the fact that, in
the German Navy, the operator of the machine chose a sequence of three letters as a key for the
initial settings of the rotors, and typed them twice using a default initial setup gotten from a
guide (the German Army and Air Force simply used the default settings instead of using the key
system since the defaults changed every day and the guide changed every month) that listed the
default setup for each day, before setting the rotors to the positions of the key and encrypting the

Klinkhamer 4
message from there. (The German Navy had copies of this guide with water soluble ink so if the
ship went down, the guide couldnt be salvaged by the Allies.) The idea was, that the one
decrypting the message would know the default initial setup, and use that to get the key, which
would then be used to decrypt the actual message. It was, however, the double typing of the key
that allowed the three cryptologists to crack the Enigma.
The duplication of the key allowed for a sort of frequency analysis using permutations. If
the key was encrypted as ABCDEF, the cryptoanalysts would then pair up the permutations as
AD, BE, and CF. So, for example, if the letter X coded to Y for permutation A and Z for
permutation D, then you would have the permutations XY and XZ which would carry Y to Z
giving you YZ. With enough data, the rotations of each rotor could be broken up into a set of
disjoint cycles of the alphabet, so for the example, the first two entries of one cycle would by YZ
which then allowed them to find the cycle lengths for each of the rotors, as well as allowing them
to know what the rotors would encrypt each letter to using the permutations and cycles. It has
been noted by the original cryptologists that when a cycle length appears, it will appear an even
number of times. So if there is a cycle length of five, there will be another cycle length of five as
Using this method, the three cryptologists completed a catalog of all 105456 possible
initial settings and included all possible cycle lengths for the corresponding permutations for AD,
BE, and CF. With this catalog, ciphertexts for a given day could be used to deduce cycle lengths,
which in turn narrowed the possible initial settings for the rotors to a small number. Then, with
the correct initial settings for the rotor, the plugboard became nothing more an easily broken
substitution cipher.

Klinkhamer 5
In 1938, the Germans adopted a modified method of transmitting the keys, inserting
dummy letters to make it harder for the key to be found, however, it only took a modification of
the previous technique to break that as well.
It was this information and techniques used that was transferred to the British in 1939,
two months before the German invasion of Poland. Then, a man by the name of Alan Turing
created a machine called the bombe (named after a Polish machine called the bomba which
functioned differently and could not break German naval codes thought it could break army and
air force codes) which was used to find the daily keys and the plugboard orientation and could do
so in about two hours. It found the daily keys using the permutation way mentioned above, but it
found the plugboard orientation through a process of elimination, so it assumed one connection
then deduced the next and the next that would follow after until it came up with a contradiction,
then all the ones it had gone through would be cancelled as possibilities and it would try again.
The reason this worked is because the Allies were able to find words that would likely be used in
messages, such as the fact the Germans sent out a weather report every morning, and the
machine was able to use those words in to find the plugboard orientation.
The Germans, as well as upping the amount of rotors used in the machine, began rewiring
the plugboards once and day until 1944, when they were forced to begin rewiring it three times a
day for the sake of security.
Once the war was over, the British sold Enigma machines to many of its former colonies,
since the knowledge of it being cracked was not known. It wasnt until nearly thirty years later
that it became known that the system had been cracked, at which time Im assuming people
stopped using that particular machine.

Klinkhamer 6
Works Cited
158,962,555,217,826,360,000. Dir. Numberphile. YouTube.com. N.p., 10 Jan. 2013. Web. 15
Dec. 2014.
Churchhouse, Robert. Codes and Ciphers. Port Chester, NY, USA: Cambridge University Press,
2002. ProQuest ebrary. Web. 16 December 2014.
Flaw in the Enigma Code. Dir. Numberphile. YouTube.com. N.p., 14 Jan. 2013. Web. 15 Dec.
Trappe, Wade, and Lawrence C. Washington. "Enigma." Introduction to Cryptography: With
Coding Theory. 2nd ed. Upper Saddle River, NJ: Pearson Prentice Hall, 2006. 50-55.