SlideShare a Scribd company logo
1 of 19
To What Extent did the Design
of the Enigma Machine Lead to
its Decryption?
Extended Project Qualification
Thomas Bower | Spring 2015
PAGE 1
Table of Contents
Introduction.................................................................................................................... 2
What is Cryptography? ................................................................................................. 2
Where Did Cryptography Begin?................................................................................... 2
Where to Begin?........................................................................................................... 3
The Birth of Cryptanalysis................................................................................................ 3
What is Frequency Analysis?......................................................................................... 4
The Never-ending Race................................................................................................. 5
World War I and the Dawn of the Enigma Cipher............................................................. 5
Arthur Scherbius .......................................................................................................... 5
How the Enigma Machine Worked...................................................................................6
The Keyboard and Light Board......................................................................................6
The Rotors....................................................................................................................6
Alberti’s Rotors..........................................................................................................6
Scherbius’ Rotors ....................................................................................................... 7
The Reflector................................................................................................................8
The Plug Board.............................................................................................................8
Putting it all Together...................................................................................................8
Cracking the Enigma........................................................................................................9
The Poles......................................................................................................................9
Corruption and a New Lead .........................................................................................10
A Different Kind of Key.................................................................................................11
The Germans Fight Back.............................................................................................. 12
The British Take Control.............................................................................................. 12
What Happened Next?.................................................................................................... 14
Appendix........................................................................................................................16
Bibliography ................................................................................................................... 17
PAGE 2
Introduction
What is Cryptography?
Many people may have heard of the battle for information that took place at Bletchley Park
in the Second World War, or know a little about the public-key encryption that takes place
behind-the-scenes when purchasing products online2, but it’s likely that very few people
actually know what cryptography is. Before the main topic of this paper can be addressed,
the basic principles and origins of cryptography must first be outlined.
Derivingfrom the Greek words ‘kryptos’ and‘graphein’ which togethermean hidden writing3,
cryptography, in layman’s terms, is the study concerned with message secrecy – that is,
getting a message (potentially containing sensitive information) from the sender to the
recipient without it being intercepted along the way.
Where Did Cryptography Begin?
The earliest known evidence of ancient cryptography used for the purpose of confidentiality
can be seen inscribed on a cuneiform stone tablet found close to the Tigris River in modern-
day Turkey4, dating to around 1500BC5; it contains a secret formula for glazing pottery and
is likely the earliest example of a trade secret. This particular artefact is known as a code
which means that entire words or phrases are exchanged for other words or phrases. For
example, inEnglish, “Attack at dawn” might be replacedwith the more inconspicuous phrase
“Feed the ducks” in all instances where it is used. This is distinct from a cipher which is
concerned with replacementand substitutionof individualletters, rather than whole words6.
One of the earliest and most famous examples of a
cipher can be traced back to the Romans and is known
as the Caesar shift, aptly named after Julius Caesar who
is noted to have used it to communicate with his
generals in the field. Caesar simply replaced each letter
in his unencrypted message (called the plaintext) with
a letter shifted three places further down the
alphabet7 which produced an encrypted message
(the ciphertext). In the English alphabet, an ‘A’ would become ‘D’, ‘B’ would become ‘E’ and
so on. ‘Z’ would become ‘C’ since the letters loop back round once you reach the end. For the
generals to be able to understand Caesar’s communications, they would simply reverse the
process he used and replace each letter with the equivalent letter three places further back
in the alphabet. This type of decryption would take mere milliseconds using modern
1 (Maher, 2001)
2 (Arthur, 2013)
3 (Damico, 2009)
4 (Mollin, 2001)
5 (Maher, 2001)
6 (New World, 2015)
7 (Singh, 2000)
Figure 1 - Caesar Shiftcipher
PAGE 3
computers however during Caesar’s reign, illiteracy was common and often, a message
simply beingwritten down – evenin plaintext –was goodenoughprotection for mostthings8.
Additionally, those who could read would simply assume that the message was written in a
different language andignore it9, making the Caesarcipher relatively robust during its prime.
Where to Begin?
Cryptography is a diverse and rich area of study which has been around for almost as long
as human civilization10 . It is an ever-developing art and a good ‘litmus test’ for our
development through the ages as a species. To explore the entirety of cryptography and its
consequences would take far too long and is beyond the scope of this paper. Instead, I will
focus on one of the most famous cipher machines ever to exist – the Enigma Cipher. It was
objectively a very strongcipher, butit was ultimately doomed and was eventually decrypted.
In this paper, I will explore the necessity for many parts of the Enigma cipher, and to what
extent its design contributed to its decryption.
The Birth of Cryptanalysis
Ever since rulers and their armies began to utilize the power and versatility of cryptography
to achieve privacy, there have been others working against them on the opposing side who
attempt to analyse, deconstruct and reverse-engineer their messages without having any
knowledge of exactly how they were encrypted11. The goal ultimately is to be able to decrypt
and view material that is not intended to be seen by them – this is the study better known
as cryptanalysis12.
The birthplace of cryptanalysis lies in 8th century Arabia, when Islamic culture and
civilization was thriving. In some areas, vast administration networks were in operation13
which also required encryption to ensure data did not fall into the wrong hands. The earliest
evidence of an Arabic contribution to cryptology dates to AD 725 when one Arab scholar
managed to deduce the first few letters of a Greek cryptogram that was sent to him by
making educated assumptions about what the plaintext message might begin with (based
on unencrypted Greek messages of a similar nature) 14. From these assumptions, he went on
to decrypt the entire message. Later, in the 9th century, al-Kindi – an author – began to
analyse and count the words used in the Qur’an in an attempt to create a chronological
timeline of events. His reasoning went that if a certain passage had a high concentration of
new words, then it was likely that this event was documented by an author from a later time
period, hence the event must have occurred later on, as well15. It may not be immediately
obvious, but this was an early example of a fundamental cryptanalysis technique known as
frequency analysis.
8 (Pfleeger, 2012)
9 (Pieprzyk, 2003)
10 (Maher, 2001)
11 (NSA, 2009)
12 (Singh, 2000)
13 (Singh, 2000)
14 (Mollin, 2001)
15 (Mollin, 2001)
PAGE 4
What is Frequency Analysis?
To explain frequency analysis
simply, consider how often each
letter is used in English. In the
previous two paragraphs, there are
143 instances of the letter “e”, but
zero instances of the letter “j”, for
example. As it turns out, each letter
has an ‘identity’ of sorts, and the
frequency of each letter stays fairly
constant in English when any
passage of reasonable length is
analysed – like a book. The same
effect can be seen in most languages,
of course including Arabic and
Greek. Figure 2 shows the relative
frequencies of letters in English with “e” and
“t” being the most frequent two letters, and “q” and “z” being the least frequent16.
For a monoalphabetic cipher like the Caesar cipher (whereby one letter in the plaintext
alphabet is mapped to another letter in the ciphertext alphabet throughout 17 ), the
frequencies of letters will be preserved since the letters are simply swapped consistently
throughout. In a way, it is like we have justchanged howto write the letters. To demonstrate,
consider the following ciphertext:
AI GER GSRWMHIV XLMW WEQTPI WIRXIRGI ALMGL WLSYPH JSPPSA XLI VIKYPEV J
VIUYIRGMIW WIIR MR IRKPMWL.
If we perform a frequency analysis on this sample, “I” appears to be the most frequent letter.
Since the frequencies should be preserved, it seems likely that the “I” in ciphertext
corresponds to the most frequent letter in English, “e”. For simplicity’s sake, we can also
assume here that the cipher is both monoalphabetic and is a Caesar shift. This would mean
that each letter is shifted by four places (e → f → g → h → i). So to ‘undo’ this effect, we
might try moving each letter back four places (i → h → g → f → e). If we do, we end up with:
We can consider this sample sentence which should follow the regular
frequencies seen in English.
As you can see, in this case we have yielded understandable English – the cryptanalysis and
subsequent decryption has been a success. Of course, this is a very simple example and in
many cases we would have to consider the frequencies of the other letters too, since for very
small samples like above, the frequencies do not always match up perfectly – the technique
works best for longer specimens. Another rather more important issue is that the type of
cipher used will almost neverbe a Caesar shift nowadays since it is antiquatedandextremely
easy to decrypt – even by manual brute force.
There are other ways of trying to decrypt a ciphertext apart from just inspecting each letter
individually. It is often worthwhile to analyse how each letter relates to all the other letters
16 (Kahn, 1997)
17 (Singh, 2000)
Figure 2 - Relative frequencies of letters in English
PAGE 5
– for example, many letters often come in clusters with other letters such as “Q” and “U”
which are often found as a pair in modern English18. So, for a monoalphabetic cipher, if two
letter routinely appear next to each other, then it likely represents a common grouping like
“nd” or “th”.
The Never-ending Race
With the birth of cryptanalysis, the race between cryptographers and cryptanalysists began.
As cryptanalysists spotted more patterns in ciphertexts and developed more sophisticated
decryption techniques, they began to unravel more and more messages, which consequently
promptedthe productionof increasingly more secure ciphers. We now skip severalcenturies
into the future, arriving at the 20th Century and the dawn of the Enigma cipher.
World War I and the Dawn of the Enigma Cipher
The adoption of radio communications in the First World War is said to have changed the
face of warfare forever19 – it is true that without radio, communications with tanks,
aeroplanes and other moving forces would’ve been close to
impossible. Wireless communication was vital for directing
military forces spread across the globe20. Of course, if a message
could be read by anyone with the technology to receive it,
secret information like orders and plans of attack would have
to be transmitted as ciphertext to ensure it would not land in
the wrong hands 21 . In response, many countries and their
militaries, including the United Kingdom and Germany, had
established secretive cryptanalysis divisions to gather
intelligence from the enemy by intercepting radio
communications such as the British ‘Room 40’22.
Even after the First World War had ended with a German
defeat, British intelligence was still closely monitoring and
decrypting mostGerman radio communications23. On February
9th 192624 however, they began to intercept messages from the German navy that could not
be decrypted by conventional means. It was on this day that the Enigma cipher had been
rolled out.
Arthur Scherbius
Arthur Scherbius, born 1878, was a German engineer 25 . In 1918, Scherbius founded an
engineering company with his friend that made a variety of different products. After
examining the issues faced with ciphers in the War just a year earlier and ciphers that
18 (Kahn, 1997)
19 (Dubenskij, 2014)
20 (National Museum of the U.S. Air Force, 2014)
21 (National Museum of the U.S. Air Force, 2014)
22 (Singh, 2000)
23 (Singh, 2000)
24 (National Cryptologic Museum Foundation, 2015)
25 (Kahn, 1991)
Figure 3 - Arthur Scherbius
PAGE 6
spannedeven further back, Scherbius invented an electro-mechanical cipher machine which
he dubbed ‘Enigma’ 26 . Initially designed as a way for businesses to receive and send
encrypted information,27 it was later adapted for use in the German military.
How the Enigma Machine Worked
Seeing how other machines and ciphers had failed to be completely unbreakable, Scherbius
sought to create the ultimate and most advanced cipher of its time. He also aimed to make
it quick and easy for radio operators to use, as
previously they often had the very time
consuming task of encrypting and decrypting
messages sent via the radio manually, so
streamlining this process could shave vital
time off the back-and-forth communications
between difference branches28.
The outer body of the device contained a
keyboard, a light board, and a plug board.
Inside there was as a set of rotors and a
reflector29.
The Keyboard and Light Board
The keyboard was what the operator used to
input the ciphertext or plaintext into the
machine. They would be able to transcribe
this from a radio message or perhaps a
written communication. The light board,
situated directly above the keyboard was
what displayed the output. If the operator
had entered a letter of the ciphertext using
the keyboard, the corresponding plaintext letter would light up (provided, of course, that
the correct settings had been used)30. The machine looked similar to a typewriter31, which
Scherbius likely took inspiration from.
The Rotors
Alberti’s Rotors
The concept of a rotor in a cipher was not a new concept in 1918. Leon Battista Alberti, an
Italian Renaissance Man, had previously described in 1467 what is now known as the ‘Alberti
cipher disk’. This is regarded as the first polyalphabetic cipher32, meaning that one letter in
26 (Singh, 2000)
27 (Bukowski, 2013)
28 (Singh, 2000)
29 (Count On, 2006)
30 (Hern, 2014)
31 (Hern, 2014)
32 (Servos, 2010)
Figure 4 - An Enigma machine
PAGE 7
plaintext could be represented by a variety of letters in ciphertext, which would render the
technique of frequency analysis (see page 4) useless.
His cipher disc took two separate discs of varying size,
with the alphabet around the edge of both33, connected
together with a needle through the centre of them. The
smaller, inner disc could be aligned with the outer disc
depending on a predetermined key (e.g. m corresponds
to A), which would then map plaintext letters on the
inner ring with ciphertext letters on the outer ring.
Without movingthe disc around, you would essentially
end up with a simple monoalphabetic Caesar cipher34,
as described onpage 2. This is easy to see because if you
never moved the inner ring, each time you wanted to
use a letter, you would meet the same corresponding
ciphertext letter each time. The ‘trick’ came with moving
the disc around periodically, which could be done by both parties deciding on a keyword
that would require the disc to be rotated35, or rotating after a set amount of letters.
Scherbius’ Rotors
It is possible thatScherbius drew inspirationfrom Alberti when he designedthis component
of the Enigma machine. Inside the casing sat three physical rotors that formed part of the
Enigma’s scrambling mechanism, and one of the most fundamental parts of the entire
machine36. Each of the rotors had 26 contacts on either side – that is, one contact to
represent every letter of the alphabet uniquely. The contacts would be able to pass electrical
current through them, essentially creating a circuit. The contacts of the first wheel would be
connected to the secondwheel, and so on. Itis worth mentioningat this point thatthe rotors
would feature the alphabet in a random arrangement and each one would be different in its
internal wiring; a connection entering at the top of the wheel might exit near the bottom,
yet this may not be the case for a different rotor37.
After a letter was pressed on the keyboard, the first wheel would move round by one notch.
Once the first wheel had rotated a full revolution (or 26 ‘notches’), it would trigger the
second wheel to rotate by one notch38. The second wheel would only rotate again after
another 26 turns of the first wheel. The third wheel behaved in the same way but it only
turned after the second wheel had turned 26 times – it would therefore take 676 turns of the
first wheel for the third wheel to trigger just once. As the wheels move, their internal wiring
also moves, and so the contacts meet with different letters each time. This means that each
letter is encoded corresponding to a different cipher alphabet, and it would take 17,576 key
presses to return back to the initial configuration (see Appendix A).
33 (Singh, 2000)
34 (Servos, 2010)
35 (Servos, 2010)
36 (Singh, 2000)
37 (Sale, 2001)
38 (Hern, 2014)
Figure 5 - Alberti Cipher Disk
PAGE 8
The Reflector
The reflector (or Umkehrwalze39) was a component Scherbius added in his machine that
reduced the amount of equipment needed to both encrypt and decrypt messages. It was
placed after the three discs, and did not rotate. Instead, it contained wiring that would send
the signal back through the wheels but through a different route (by linking letters together
in pairs). This was ingenious because it meant that encrypting and decrypting were mirror
processes40. In other words, given that the starting conditions are identical (the rotors are in
the same positions and orientations etc.), inputting the plaintext would yield the ciphertext,
but entering the ciphertext would also result in the plaintext being outputted.
It is important to realise that the addition of a reflector meant that a letter could never be
represented by itself in the ciphertext since no letter mapped to itself inside the internal
wiring of the reflector. This was a huge vulnerability for the cipher.
The Plug Board
17,576 combinations may sound like a lot, but a modern computer could brute force a
solution in a matter of seconds, and a dedicated team of humans – such as the military
cryptanalysis organisations – would be able to find the correct combination in not much
longer. Scherbius knew of this fault, so when he adapted the Enigma for military use, he
added the plug board (or Steckerbrett)41. It was not a rotor but rather a panel with holes on
it where youcould swap letters for one another – so a “y” might be exchanged for an “f” using
cabling. This is static, however, so the same substitution will be made throughout the entire
ciphertext. Early machines had six cables, allowing for six pairs of letters to be swapped (or
Steckered)42, though later designs allowed for up to 13 swaps 43. The number of possible
combinations for six letter swaps is a staggering 100,391,791,50044 (see Appendix B).
Putting it all Together
The combined effect of all these components meant that the Enigma machine had over ten
quadrillion different starting configurations and indeed, Scherbius – perhaps naïvely –
thought that it was truly secure45. It was primarily the plug board that gave the machine its
vast number of configurations, and the rotors that made the device impossible to decipher
via a trivial frequency analysis. The reflector was simply a convenience for the device’s
operators. The beauty of having such a large number of configurations meant that it was
likely that an interceptor would never find the correct arrangement, and thus be unable to
crack the message.
Before moving on, observe the following diagram which depicts a simplified and two-
dimensional version of an Enigma machine in action.
39 (Crypto Museum, 2014)
40 (Singh, 2000)
41 (Sale, 2001)
42 (Singh, 2000)
43 (Crypto Museum, 2014)
44 (Crypto Museum, 2014)
45 (Singh, 2000)
PAGE 9
Figure 6 - Simplified diagram of an Enigma Machine46
The “T” button has been pressed on the keyboard, so current flows down to the plug board
where the letter “T” has been steckered with the letter “K”. Ignoring the static wheel which
is unimportant (it simply converts the wires into metallic contacts 47), the current flows
through to the first wheel labelled Wheel III. It can be seen that the letter K in this wheel is
wired to the letterU on Wheel II, so the contacts betweenthe two wheels transfer the current.
The same thing happens for Wheel I. Once the current flow reaches the reflector, the H
coming from the final rotor is wired with the D and passes back through all three wheels.
Recall that the reflector is stationary and the internal wiring never changes. Once out of the
three wheels, the letter “W” is being powered. This then goes back through the plug board,
which maps the letter “W” to the letter “G”. Finally, this then powers the bulb corresponding
to the letter “G”, which the operator could then make a note of. It is left as an exercise for
the reader to verify that for these same starting conditions, pressing the G on the keyboard
would result in the T lighting up on the light board, illustrating the symmetric nature of the
machine. Remember that after this button has been pressed, the first rotor will turn round
by one notch, meaning that the next time “T” is pressed, a different letter will illuminate.
Cracking the Enigma
The Poles
Sandwiched between the Soviet Union and Germany, Poland quickly saw the need to
become a world leader in cryptanalysis and codebreaking so that they could stay one step
ahead of their enemies that bordered them. In 1926, the German military began using the
Enigma machines and the Poles encountered it for the very first time48.
46 (Dade, 2006)
47 (Dade, 2006)
48 (Bukowski, 2013)
PAGE 10
By 1928, any attempts by the Polish to decipher the Enigma had failed49. Maksymilian Ciezki,
the Polish captain in charge of decrypting German ciphers at the Biuro Szyfrów (Cipher
Bureau), had obtained a commercial version of an Enigma machine, but it was too dissimilar
to the military variant to be used for decryption. He was growing restless, even resorting to
clairvoyance in search of answers50. In 1929, the Biuro organised a cryptology course at the
University of Poznań to find intelligent, young Poles to assist with the codebreaking effort51.
By the end of the course, only three men remained, including the talented mathematician
Marian Rejewski. In 1932, these three men were transferred to Warsaw and invited to join
the Biuro Szyfrów to help crack the Enigma cipher.
Corruption and a New Lead
Hans-Thilo Schmidt was a German and younger brother of Rudolf Schmidt, a German
military official. After being
removed from the German
army, Hans-Thilo managed to
get a job at the Chiffrierstelle in
Berlin thanks to the powerful
position of his brother52. This
was where all Enigma
communications were based
and contained lots of top-secret
information. Feelingrejectedby
his own country and with
nowhere to go after his owned
business collapsed 53 , Hans-
Thilo resorted to treachery and
routinely sold top-secret documents taken from the Chiffrierstelle to the French at covert
locations54. His first two stolen documents were operating instructions for how to use the
military versionof the machine, and they evenhinted at the wiring inside the rotors – a great
first step for attempting to decipher the Enigma. The French saw no worth in this
breakthrough however, so the information was given to the Polish, who had a treaty with
the French to share such intelligence55.
Back in Warsaw, Rejewski – one of the students scouted to work at the Biuro Szyfrów – was
hard at work using the newly revealed information from the French. He discovered that
every day at midnight, every Enigma machine was configured to an identical base setting56.
The base settings changed every day and could be found in a keysheet or codebook which
would be distributed months in advance to every operator and contained the keys for every
day for several months57. These configurations formed what is called the day key, and would
49 (Bukowski, 2013)
50 (Singh, 2000)
51 (Bukowski, 2013)
52 (Sebag-Montefiore, 2000)
53 (Sebag-Montefiore, 2000)
54 (Sebag-Montefiore, 2000)
55 (Singh, 2000)
56 (Singh, 2000)
57 (Bukowski, 2013)
Figure 7 - A German codebook containing Enigma configurations
PAGE 11
provide the operatorwith the day’s plug boardsettings, the rotorarrangement, and the rotor
starting positions.
Changing the key every day was something the Germans did in order to make their ciphers
more secure. If they used the same key for too long, cryptanalysists would begin to notice
patterns in different ciphertexts, which is extremely bad because it gives them a starting
point to try to decrypt the message. Changing the key daily minimises this risk as the chance
of repetitionbecomes less. Evenso, withpotentially hundreds of similar messages beingsent
per day (such as weather reports, and general conversation between operators), it was
possible that patterns could arise. The German’s had thought of this, though their solution
was less than ideal…
A Different Kind of Key
Rejewski noticed that for every intercepted German message, there were two three-letter
strings at the very beginning:
LSA BVD EDPUD NRGYS ZRCXN UYTPO MRMBO FKTBZ REZKM LXLVE FGUEY SIOZV EQ
This was a breakthrough, as he realised that at the beginning of each message was what is
called the “message key” – three random letters typed twice58. The receiver would use the
day key to read the contents of the message key, then adjust the rotors corresponding to this
new key, decrypting the rest of the communication using the message key instead. The
Germans believed that by typing the key twice, the communication would be more secure.
Messages were broadcast using Morse code, so if an operator mistyped or misheard one of
the letters due to poor radio connections, they would be able to see that the two groups of
three letters were not identical, and that there had been a mistake somewhere along the
communication chain59. In essence, it was a primitive form of error-checking60.
What, exactly, this message key should be was not important. Operators were meant to
choose a randomstring thoughoften they had ‘favourite’combinations such as their family’s
initials, or simply overused an easy-to-type combination61.
Recall that any repetition in cryptography is bad – it allows a weakness for attackers to
exploit. Whilst the Germans thought that their message key made their messages extra
secure, Rejewski realised the potential it had for cracking the cipher once and for all. In the
above example, if the letters have been repeated, you can deduce that the 1st and 4th letters
refer to the same plaintext letter, and the same for the 2nd and 5th, and 3rd and 6th letters.
Combining the discovery of message keys with the information extracted from the German
traitor Schmidt, Rejewski developed a series of equations and formulae in an attempt to
uncover the secrets of the Enigma cipher. Astonishingly, in just three few months, Rejewski
had found successful formulae, and solved how the Enigma machine worked using
theoretical mathematics, reverse engineering, and a small amount of treachery. Using his
newly discovered techniques, he could now establish the entire day key, and hence read any
58 (Count On, 2006)
59 (Bukowski, 2013)
60 (Sale, 2001)
61 (Singh, 2000)
PAGE 12
German message 62 . Following his breakthrough, the Biuro Szyfrów commissioned the
creation of several replicas of military Enigma machines63.
Rejewski devised a machine, dubbed a bombe, that could sort through all 17,576
permutations of the rotors mechanically to find the day key quickly. Togetherwith a method
of finding the key using a series of perforated sheets that Rejewski’s colleague Zygalski had
pioneered, the Polish could find the correct day key in just two hours64. Since there were 6
different combinations of rotors, six bombes were commissioned to work in parallel which
proved to be an extreme success. In fact, by 1938, the Biuro Szyfrów could read over 75% of
intercepted messages – all without the Germans knowing65.
The Germans Fight Back
In December 1938, the German military introduced two new rotors to the existing three
(page 6) in an effort to increase security66. This meant that the number of possible rotors
combinations rose from 6 to 60 – a tenfold increase. The Polish simply did not have the
resources for this huge increase. In fact, to build 60 of Rejewski’s bombes would’ve cost
fifteen times the entire annual equipment budget for the Biuro Szyfrów67. To make matters
worse, the Germans also altered how many letters got swapped on the plug board from just
six pairs to 10.
Realising that they could no longer decrypt the Enigma by themselves, and with Hitler’s
regime threatening an imminent invasion of Poland, the Polish had no choice but to share
their breakthroughs with the French and British. At a meeting in a secretive location just
south of Warsaw in 193968, the French and British were shown the work of Rejewski and
Zygalski, and given copies of the German Enigma to take back andwork on69. Just two weeks
after this meeting, on 1st September 1939, the Germans invaded Poland, and World War II
began70.
The British Take Control
The intelligence and progress made by the Biuro Szyfrów made its way into the hands of the
newly formed Government Code & Cypher School (GC&CS, now known as GCHQ) at
Bletchley Park in Buckinghamshire, England71. Bletchley Park had many times more staff
and resources than the Polish cipher bureau, which meant they could cope with the large
amount of bombes now required to crack the Enigma with five possible rotors72.
As well as utilising the methods developed by the Polish, the British began to develop their
own methods of streamlining the process. For example, the predictability of some message
keys (see page 11) was discovered in one of the huts outside the Bletchley Park building. An
62 (Singh, 2000)
63 (Bukowski, 2013)
64 (Singh, 2000)
65 (Sale, 2001)
66 (Sale, 2001)
67 (Singh, 2000)
68 (Bukowski, 2013)
69 (Sale, 2001)
70 (Bukowski, 2013)
71 (Sale, 2001)
72 (Bukowski, 2013)
PAGE 13
Enigma operatormight justtype “QWE” (from the German QWERTZ keyboardlayout)since
it was convenientto type. The cryptanalysists atBletchley Park nicknamed these predictable
message keys ‘cillies’73. The cryptanalysists would often try the known cillies first, and
occasionally would be successful, shaving a large amount of time off the decryption.
Another issue was thatthe Germans who wrote the codebooks were reluctant to have a rotor
in the same position for two days running. So, if Monday’s configuration was 351, they could
not use 253 the following day, since the five is in the same position for two days running.
They did this to try and make the positioning ‘more random’, but by doing so they actually
eliminated a lot of possibilities, making the job of the cryptanalysist easier74. There were
other rules regarding the plug boardthatalso eliminatedmany possibilities to do with which
letters could be steckered with each other.
In 1939, GC&CS was recruiting many intelligent young Brits from around the country to help
with the decryption at Bletchley Park. One student who had been identified as a skilled
candidate for codebreaking was the now-famous Cambridge mathematician Alan Turing75.
He was invited to put his university career onhold, and work as a cryptanalysistfor GC&CS76.
Turing had been considering different ways in which he might be able to exploit Enigma,
and his primary idea was to do with the fact that many transmissions from the Germans
were likely to contain certain passages that were predictable. Turing nicknamed these
passages “cribs”, and an example might be an excerpt from a weather report77. It would have
been highly likely that the message would include “Wetter”, the German word for weather.
One of the ways in which you could guess where this word would arise was by using the fact
that a letter couldn’t be encrypted as itself. So, if you compared the plaintext crib with the
ciphertext message and one letter was mapped to itself, then you would know that it was an
impossible position for that word to be in.
Plaintext: WETTER
Ciphertext: EDPUDNRGYSZRCXNUYTPOMRMBOFKTBZREZKMLXLVEFGUEYSIOZVEQ
Above, you can see that the word ‘Wetter’ could not be placed in that position since the final
‘R’ would be mapped to an ‘R’ in the
ciphertext – an impossible result. By
shifting the word up and down until
you found a potential match, you
could take educated guesses at where
words might be. Of course, many
messages followed a rigid structure78,
so this would not always be as difficult
as it sounds.
Turing devised a plan which is out of the scope of this paper, but he essentially looked for
pairs of letters that had been encrypted as each other. So, for a known (or guessed) plaintext
a “C” might have beenencrypted as an “F”, and an“F” in plaintextmight have beenencrypted
73 (Singh, 2000)
74 (Singh, 2000)
75 (Sale, 2001)
76 (Singh, 2000)
77 (Sale, 2001)
78 (Singh, 2000)
Figure 8 - A crib loop
PAGE 14
as a “C” in the ciphertext79. The concept couldbe taken one step further, by looking for entire
loops or letters that encrypted to each other in a cyclic fashion80. For example “R” to “N”, “N”
to “S”, and “S” to “R”, forming a complete ‘loop’. By connecting three Enigma machines
together, it becomes possible to find a solution for the rotor settings, since the circuit
between the three machines will only be complete when the correct combination and
arrangement of rotors is found. This ingeniously ‘cancels out’the effects of the plugboards81,
which vastly decreases the time taken to find the key.
To automate Turing’s breakthrough discovery, Bletchley Park put £100,000 towards building
machines Turing had designed called bombes, perhaps in reference to Rejewski’s earlier
bombes.
On 1st May 1940, the Germans changed their protocol, and decided to only send their
message key once per message, in comparison to the usual two82. This caused a sharp drop
in the amount of decrypted message coming out of Bletchley Park for some time as it was
one of the main weaknesses thatcouldbe exploited. However, on8th August, Turing’s bombe
had been produced and was put into action83. In just 18 months, there were 15 more bombes
put into action, methodically going through every possible configuration to try and find a
potential match. It proved to be extremely successful and the amount of decrypted German
messages rose sharply again.
What Happened Next?
There was still the problem of the Naval Enigma that used a different, more complicated
protocol to the regular Enigma. In fact, there were many different procedures and protocols
used in the military. As far as the Naval Enigma is concerned, the decryption success at
Bletchley lay simply in the capture ofsome of the Nazi’s confidential codebooks84 containing
day keys which could then be used to unravel what they had been saying.
The decryption of the Enigma cipher by both the British and the Polish was a remarkable
achievement, though it would go unknown for 30 years until the secrets were released by
the government in the 1970s.
To What Extentdid the Design of the Enigma Machine Lead to
its Decryption?
Throughout this paper, we have seen how the cipher that was once thought impregnable by
many was exploited and decrypted.
It wouldbe wrong to discredit the designof the Enigma cipher because it was extremely well
thought out and masterminded; the rotors were a clever technique for ensuring that the
79 (Sale, 2001)
80 (Sale, 2001)
81 (Singh, 2000)
82 (Weierud, 2003)
83 (Singh, 2000)
84 (Singh, 2000)
PAGE 15
device was secure against frequency analysis, and the plug board was a good solution for
giving the device a large amount of potential keys. In terms of design, the reflector traded
convenience for security by not allowing for a letter to be encrypted as itself. This fact gave
cryptanalysists the upper hand and allowed for millions of possible keys to be discarded.
There were other minor cryptographic weaknesses in the design, but nothing else worthy of
mention.
Instead, the decryption of the Enigma was largely down to its misuse by the Germans.
Message keys were a good idea in theory, though by typing it twice they created a
vulnerability that was perhaps bigger than the problem they were trying to solve in the first
place. Repeated message keys gave the cryptanalysists something that they could work with
and depend upon.
Codebooks were also a goodidea, meaningthat every day youwouldencounter a fresh series
of encryptions which would minimise the chance of finding patterns. Despite that, the
authors of the codebooks actually hindered the randomness of the configurations by
discounting certain patterns from occurring together, again making work easier for those
looking for weaknesses. Furthermore, the logistics of distributing such a document to every
German radio operator around Europe was difficult – especially at a time of war – and it is
true that some were eventually captured by the enemy (such as one of the Naval Enigma
codebooks) which would instantly make their entire communication network transparent
to the enemy.
The use of rigid and similar message structures by the Germans was also a bad practice and
resulted in Turing and the team at Bletchley Park taking advantage of the predictability in
order to solve the key.
Finally, the Polish were helped massively by the documents provided by Schmidt, and it
might’ve taken them much longer to make progress without the intelligence he supplied
through his acts of treason, if at all.
To conclude, the design of the Enigma machine was – in general – very strong with
quadrillions of different key combinations that could be used. If you started trying every key
combination at the beginning of the universe, checking one per second, it is likely that you
still wouldn’t have found the correct key. Instead, the decryption of the Enigma was
primarily thanks to a series of mistakes by the Germans, such as lazy operators choosing
predictable keys, flaws in the procedure of sending and receiving messages, and using the
same protocols and techniques for far too long. All of these faults by the German’s, rather
than the few designweaknesses ofthe Enigma machine itself, severely weakenedthe Enigma
cipher to the point where it was almost trivial to decrypt.
PAGE 16
Appendix
A. Number of Different Rotor Arrangements
We get to the result of 17,576 different arrangements of the rotors using simple
combinatorics. There are 26 possible values in the first rotor, 26 values in the
second rotor, and 26 in the third rotor. To find the number of total permutations,
we simply multiple the numbers of possibilities by each other.
B. Number of Possible Letter Swaps on the Plugboard
The mathematics behind this calculation is more complex than the number of
different rotor arrangements. The formula that is used is:
Where n is the number of different swaps we make. So, for the standard six swaps,
simply entering n = 6 into the above equation and the result 100,391,791,500 should
appear. It turns out that the optimum number of swaps is 11 which gives a
staggering 205,552,193,100,000 combinations85 – several magnitudes more than just
six swaps. The formula arises from the fact that you can’t swap anything with itself
and you can’t have more than 13 swaps.
85 (Crypto Museum, 2014)
PAGE 17
Bibliography
"1926: Enigma Introduced into German Navy as Radio Key C." National Cryptologic
Museum Foundation. National Cryptologic Museum Foundation, 9 Feb. 2015.
Web. 27 Feb. 2015.
Arthur, Charles. "How Internet Encryption Works." The Guardian. 5 Sept. 2013. Web. 25
Jan. 2015.
Bukowski, Marianna, prod. "Cracking Enigma: The Untold Story." Heroes of War: Poland.
Dir. Stuart Rose. History Channel. 2013. Television.
"Codebreaking - The Enigma Cipher." Count On. Tribal Group, 2006. Web. 25 Jan. 2015.
<http://www.counton.org/explorer/codebreaking/enigma-cipher.php>.
"Cryptanalysis/Signals Analysis." Careers in Cryptanalysis and Signals Analysis at National
Security Agency (NSA). NSA, 15 Jan. 2009. Web. 8 Feb. 2015.
"Cryptography." New World Encyclopedia. Web. 25 Jan. 2015.
Dade, Louise. "How Enigma Machines Work." How Enigma Machines Work. 2006. Web. 27
Feb. 2015.
Dade, Louise. Simplified two-dimensional diagram of an Enigma machine. Digital image.
Enigma Machine Emulator. 2006. Web. 28 Feb. 2015.
Damico, Tony M. "A Brief History of Cryptography." Weblog post. Student Pulse. 2009.
Web. 25 Jan. 2015.
Dubenskij, Charlotte. "World War One: How Radio Crackled into Life in Conflict." BBC
News. BBC, 18 June 2014. Web. 27 Feb. 2015.
"Enigma." Crypto Museum. Crypto Museum, 31 May 2014. Web. 27 Feb. 2015.
Hern, Alex. "How Did the Enigma Machine Work?" The Guardian. The Guardian, 14 Nov.
2014. Web. 27 Feb. 2015.
PAGE 18
Kahn, David. The Codebreakers: The Comprehensive History of Secret Communication From
Ancient Times to the Internet. New York: Scribner's and Sons, 1997. Print.
Kahn, David. Seizingthe Enigma: The Race to Break the German U-boat Codes, 1939-1943.
Boston: Houghton Mifflin, 1991. Print.
Maher, Adrian. "Codes." Modern Marvels. History Channel. 21 May 2001. AShort History of
Cryptography - A Brief History of Cryptography. Web. 25 Jan. 2015.
<https://www.youtube.com/watch?v=H9Cu36Qj3dQ>.
Mollin, Richard A. An Introduction to Cryptography. Boca Raton: Chapman & Hall/CRC,
2001. Print.
Pfleeger, Charles P., and Shari Lawrence. Pfleeger. AnalyzingComputer Security: A
Threat/Vulnerability/Countermeasure Approach. Upper Saddle River, NJ:
Prentice Hall, 2012. Print.
Pieprzyk, Josef. Fundamentals of Computer Security. Berlin: Springer, 2003. Print.
Sale, Tony. "The Components of the Enigma Machine." Codes and Ciphers. 2001. Web. 27
Feb. 2015.
Sebag-Montefiore, Hugh. Enigma: The Battle for the Code. London: Weidenfeld & Nicolson,
2000. Print.
Servos, William. "The Alberti Cipher." The Alberti Cipher. Trinity College Cambridge, 24
Apr. 2010. Web. 27 Feb. 2015.
Singh, Simon. The Code Book: The Secret History of Codes and Code-breaking. London:
Fourth Estate, 2000. Print.
"War of Secrets: Cryptology in WWII." National Museum of the U.S. Air Force. National
Museum of the U.S. Air Force, 17 Oct. 2014. Web. 22 Jan. 2015.
Weierud, Frode. "Enigma Machine." Frode Weierud's CryptoCellar. 2003. Web. 20 Jan. 2015.

More Related Content

Similar to Draft 6

cryptography presentation this about how cryptography works
cryptography presentation this about how  cryptography workscryptography presentation this about how  cryptography works
cryptography presentation this about how cryptography worksvimalguptaofficial
 
Tales From the Crypt(ography)
Tales From the Crypt(ography)Tales From the Crypt(ography)
Tales From the Crypt(ography)Jeremiah Jackson
 
Security Systems for Digital Data - Paper
Security Systems for Digital Data - PaperSecurity Systems for Digital Data - Paper
Security Systems for Digital Data - PaperBernhard Hofer
 
Arabic Origin of Scientific Terms.pdf
Arabic Origin of Scientific Terms.pdfArabic Origin of Scientific Terms.pdf
Arabic Origin of Scientific Terms.pdfErin Taylor
 
CRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETY
CRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETYCRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETY
CRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETYijcisjournal
 
O Level English Blog How To Teach Writing Descriptiv
O Level English Blog How To Teach Writing DescriptivO Level English Blog How To Teach Writing Descriptiv
O Level English Blog How To Teach Writing DescriptivAriana Davis
 
An Essay Describing A Person.pdf
An Essay Describing A Person.pdfAn Essay Describing A Person.pdf
An Essay Describing A Person.pdfWendy Bolden
 
Cryptograph yreport 2003
Cryptograph yreport 2003Cryptograph yreport 2003
Cryptograph yreport 2003keyurbz
 
Computer Security Chapter III.pdf
Computer Security Chapter III.pdfComputer Security Chapter III.pdf
Computer Security Chapter III.pdfHarrisentertainment
 
Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...
Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...
Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...Mari Howard
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityBikramjit Sarkar, Ph.D.
 
HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)
HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)
HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)Razorpoint Security
 
How Spies Communicate – Mocomi.com
How Spies Communicate – Mocomi.comHow Spies Communicate – Mocomi.com
How Spies Communicate – Mocomi.comMocomi Kids
 
Sample Of A Persuasive Essay. Persuasive Essay Examples
Sample Of A Persuasive Essay. Persuasive Essay ExamplesSample Of A Persuasive Essay. Persuasive Essay Examples
Sample Of A Persuasive Essay. Persuasive Essay ExamplesMonica Clark
 
Cryptography
CryptographyCryptography
CryptographyEmaSushan
 

Similar to Draft 6 (20)

cryptography presentation this about how cryptography works
cryptography presentation this about how  cryptography workscryptography presentation this about how  cryptography works
cryptography presentation this about how cryptography works
 
Tales From the Crypt(ography)
Tales From the Crypt(ography)Tales From the Crypt(ography)
Tales From the Crypt(ography)
 
Security Systems for Digital Data - Paper
Security Systems for Digital Data - PaperSecurity Systems for Digital Data - Paper
Security Systems for Digital Data - Paper
 
Arabic Origin of Scientific Terms.pdf
Arabic Origin of Scientific Terms.pdfArabic Origin of Scientific Terms.pdf
Arabic Origin of Scientific Terms.pdf
 
CRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETY
CRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETYCRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETY
CRYPTOLOGY AND INFORMATION SECURITY - PAST, PRESENT, AND FUTURE ROLE IN SOCIETY
 
O Level English Blog How To Teach Writing Descriptiv
O Level English Blog How To Teach Writing DescriptivO Level English Blog How To Teach Writing Descriptiv
O Level English Blog How To Teach Writing Descriptiv
 
An Essay Describing A Person.pdf
An Essay Describing A Person.pdfAn Essay Describing A Person.pdf
An Essay Describing A Person.pdf
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Maths and language
Maths and languageMaths and language
Maths and language
 
Cryptograph yreport 2003
Cryptograph yreport 2003Cryptograph yreport 2003
Cryptograph yreport 2003
 
Edward Schaefer
Edward SchaeferEdward Schaefer
Edward Schaefer
 
Computer Security Chapter III.pdf
Computer Security Chapter III.pdfComputer Security Chapter III.pdf
Computer Security Chapter III.pdf
 
Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...
Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...
Example Of A Process Analysis Essay. FREE 10 Sample Analysis Essay Templates ...
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information Security
 
HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)
HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)
HOW I BROKE THE CONFEDERATE CODE (137 YEARS TOO LATE)
 
How Spies Communicate – Mocomi.com
How Spies Communicate – Mocomi.comHow Spies Communicate – Mocomi.com
How Spies Communicate – Mocomi.com
 
Sample Of A Persuasive Essay. Persuasive Essay Examples
Sample Of A Persuasive Essay. Persuasive Essay ExamplesSample Of A Persuasive Essay. Persuasive Essay Examples
Sample Of A Persuasive Essay. Persuasive Essay Examples
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryp Essay
Cryp EssayCryp Essay
Cryp Essay
 

Draft 6

  • 1. To What Extent did the Design of the Enigma Machine Lead to its Decryption? Extended Project Qualification Thomas Bower | Spring 2015
  • 2. PAGE 1 Table of Contents Introduction.................................................................................................................... 2 What is Cryptography? ................................................................................................. 2 Where Did Cryptography Begin?................................................................................... 2 Where to Begin?........................................................................................................... 3 The Birth of Cryptanalysis................................................................................................ 3 What is Frequency Analysis?......................................................................................... 4 The Never-ending Race................................................................................................. 5 World War I and the Dawn of the Enigma Cipher............................................................. 5 Arthur Scherbius .......................................................................................................... 5 How the Enigma Machine Worked...................................................................................6 The Keyboard and Light Board......................................................................................6 The Rotors....................................................................................................................6 Alberti’s Rotors..........................................................................................................6 Scherbius’ Rotors ....................................................................................................... 7 The Reflector................................................................................................................8 The Plug Board.............................................................................................................8 Putting it all Together...................................................................................................8 Cracking the Enigma........................................................................................................9 The Poles......................................................................................................................9 Corruption and a New Lead .........................................................................................10 A Different Kind of Key.................................................................................................11 The Germans Fight Back.............................................................................................. 12 The British Take Control.............................................................................................. 12 What Happened Next?.................................................................................................... 14 Appendix........................................................................................................................16 Bibliography ................................................................................................................... 17
  • 3. PAGE 2 Introduction What is Cryptography? Many people may have heard of the battle for information that took place at Bletchley Park in the Second World War, or know a little about the public-key encryption that takes place behind-the-scenes when purchasing products online2, but it’s likely that very few people actually know what cryptography is. Before the main topic of this paper can be addressed, the basic principles and origins of cryptography must first be outlined. Derivingfrom the Greek words ‘kryptos’ and‘graphein’ which togethermean hidden writing3, cryptography, in layman’s terms, is the study concerned with message secrecy – that is, getting a message (potentially containing sensitive information) from the sender to the recipient without it being intercepted along the way. Where Did Cryptography Begin? The earliest known evidence of ancient cryptography used for the purpose of confidentiality can be seen inscribed on a cuneiform stone tablet found close to the Tigris River in modern- day Turkey4, dating to around 1500BC5; it contains a secret formula for glazing pottery and is likely the earliest example of a trade secret. This particular artefact is known as a code which means that entire words or phrases are exchanged for other words or phrases. For example, inEnglish, “Attack at dawn” might be replacedwith the more inconspicuous phrase “Feed the ducks” in all instances where it is used. This is distinct from a cipher which is concerned with replacementand substitutionof individualletters, rather than whole words6. One of the earliest and most famous examples of a cipher can be traced back to the Romans and is known as the Caesar shift, aptly named after Julius Caesar who is noted to have used it to communicate with his generals in the field. Caesar simply replaced each letter in his unencrypted message (called the plaintext) with a letter shifted three places further down the alphabet7 which produced an encrypted message (the ciphertext). In the English alphabet, an ‘A’ would become ‘D’, ‘B’ would become ‘E’ and so on. ‘Z’ would become ‘C’ since the letters loop back round once you reach the end. For the generals to be able to understand Caesar’s communications, they would simply reverse the process he used and replace each letter with the equivalent letter three places further back in the alphabet. This type of decryption would take mere milliseconds using modern 1 (Maher, 2001) 2 (Arthur, 2013) 3 (Damico, 2009) 4 (Mollin, 2001) 5 (Maher, 2001) 6 (New World, 2015) 7 (Singh, 2000) Figure 1 - Caesar Shiftcipher
  • 4. PAGE 3 computers however during Caesar’s reign, illiteracy was common and often, a message simply beingwritten down – evenin plaintext –was goodenoughprotection for mostthings8. Additionally, those who could read would simply assume that the message was written in a different language andignore it9, making the Caesarcipher relatively robust during its prime. Where to Begin? Cryptography is a diverse and rich area of study which has been around for almost as long as human civilization10 . It is an ever-developing art and a good ‘litmus test’ for our development through the ages as a species. To explore the entirety of cryptography and its consequences would take far too long and is beyond the scope of this paper. Instead, I will focus on one of the most famous cipher machines ever to exist – the Enigma Cipher. It was objectively a very strongcipher, butit was ultimately doomed and was eventually decrypted. In this paper, I will explore the necessity for many parts of the Enigma cipher, and to what extent its design contributed to its decryption. The Birth of Cryptanalysis Ever since rulers and their armies began to utilize the power and versatility of cryptography to achieve privacy, there have been others working against them on the opposing side who attempt to analyse, deconstruct and reverse-engineer their messages without having any knowledge of exactly how they were encrypted11. The goal ultimately is to be able to decrypt and view material that is not intended to be seen by them – this is the study better known as cryptanalysis12. The birthplace of cryptanalysis lies in 8th century Arabia, when Islamic culture and civilization was thriving. In some areas, vast administration networks were in operation13 which also required encryption to ensure data did not fall into the wrong hands. The earliest evidence of an Arabic contribution to cryptology dates to AD 725 when one Arab scholar managed to deduce the first few letters of a Greek cryptogram that was sent to him by making educated assumptions about what the plaintext message might begin with (based on unencrypted Greek messages of a similar nature) 14. From these assumptions, he went on to decrypt the entire message. Later, in the 9th century, al-Kindi – an author – began to analyse and count the words used in the Qur’an in an attempt to create a chronological timeline of events. His reasoning went that if a certain passage had a high concentration of new words, then it was likely that this event was documented by an author from a later time period, hence the event must have occurred later on, as well15. It may not be immediately obvious, but this was an early example of a fundamental cryptanalysis technique known as frequency analysis. 8 (Pfleeger, 2012) 9 (Pieprzyk, 2003) 10 (Maher, 2001) 11 (NSA, 2009) 12 (Singh, 2000) 13 (Singh, 2000) 14 (Mollin, 2001) 15 (Mollin, 2001)
  • 5. PAGE 4 What is Frequency Analysis? To explain frequency analysis simply, consider how often each letter is used in English. In the previous two paragraphs, there are 143 instances of the letter “e”, but zero instances of the letter “j”, for example. As it turns out, each letter has an ‘identity’ of sorts, and the frequency of each letter stays fairly constant in English when any passage of reasonable length is analysed – like a book. The same effect can be seen in most languages, of course including Arabic and Greek. Figure 2 shows the relative frequencies of letters in English with “e” and “t” being the most frequent two letters, and “q” and “z” being the least frequent16. For a monoalphabetic cipher like the Caesar cipher (whereby one letter in the plaintext alphabet is mapped to another letter in the ciphertext alphabet throughout 17 ), the frequencies of letters will be preserved since the letters are simply swapped consistently throughout. In a way, it is like we have justchanged howto write the letters. To demonstrate, consider the following ciphertext: AI GER GSRWMHIV XLMW WEQTPI WIRXIRGI ALMGL WLSYPH JSPPSA XLI VIKYPEV J VIUYIRGMIW WIIR MR IRKPMWL. If we perform a frequency analysis on this sample, “I” appears to be the most frequent letter. Since the frequencies should be preserved, it seems likely that the “I” in ciphertext corresponds to the most frequent letter in English, “e”. For simplicity’s sake, we can also assume here that the cipher is both monoalphabetic and is a Caesar shift. This would mean that each letter is shifted by four places (e → f → g → h → i). So to ‘undo’ this effect, we might try moving each letter back four places (i → h → g → f → e). If we do, we end up with: We can consider this sample sentence which should follow the regular frequencies seen in English. As you can see, in this case we have yielded understandable English – the cryptanalysis and subsequent decryption has been a success. Of course, this is a very simple example and in many cases we would have to consider the frequencies of the other letters too, since for very small samples like above, the frequencies do not always match up perfectly – the technique works best for longer specimens. Another rather more important issue is that the type of cipher used will almost neverbe a Caesar shift nowadays since it is antiquatedandextremely easy to decrypt – even by manual brute force. There are other ways of trying to decrypt a ciphertext apart from just inspecting each letter individually. It is often worthwhile to analyse how each letter relates to all the other letters 16 (Kahn, 1997) 17 (Singh, 2000) Figure 2 - Relative frequencies of letters in English
  • 6. PAGE 5 – for example, many letters often come in clusters with other letters such as “Q” and “U” which are often found as a pair in modern English18. So, for a monoalphabetic cipher, if two letter routinely appear next to each other, then it likely represents a common grouping like “nd” or “th”. The Never-ending Race With the birth of cryptanalysis, the race between cryptographers and cryptanalysists began. As cryptanalysists spotted more patterns in ciphertexts and developed more sophisticated decryption techniques, they began to unravel more and more messages, which consequently promptedthe productionof increasingly more secure ciphers. We now skip severalcenturies into the future, arriving at the 20th Century and the dawn of the Enigma cipher. World War I and the Dawn of the Enigma Cipher The adoption of radio communications in the First World War is said to have changed the face of warfare forever19 – it is true that without radio, communications with tanks, aeroplanes and other moving forces would’ve been close to impossible. Wireless communication was vital for directing military forces spread across the globe20. Of course, if a message could be read by anyone with the technology to receive it, secret information like orders and plans of attack would have to be transmitted as ciphertext to ensure it would not land in the wrong hands 21 . In response, many countries and their militaries, including the United Kingdom and Germany, had established secretive cryptanalysis divisions to gather intelligence from the enemy by intercepting radio communications such as the British ‘Room 40’22. Even after the First World War had ended with a German defeat, British intelligence was still closely monitoring and decrypting mostGerman radio communications23. On February 9th 192624 however, they began to intercept messages from the German navy that could not be decrypted by conventional means. It was on this day that the Enigma cipher had been rolled out. Arthur Scherbius Arthur Scherbius, born 1878, was a German engineer 25 . In 1918, Scherbius founded an engineering company with his friend that made a variety of different products. After examining the issues faced with ciphers in the War just a year earlier and ciphers that 18 (Kahn, 1997) 19 (Dubenskij, 2014) 20 (National Museum of the U.S. Air Force, 2014) 21 (National Museum of the U.S. Air Force, 2014) 22 (Singh, 2000) 23 (Singh, 2000) 24 (National Cryptologic Museum Foundation, 2015) 25 (Kahn, 1991) Figure 3 - Arthur Scherbius
  • 7. PAGE 6 spannedeven further back, Scherbius invented an electro-mechanical cipher machine which he dubbed ‘Enigma’ 26 . Initially designed as a way for businesses to receive and send encrypted information,27 it was later adapted for use in the German military. How the Enigma Machine Worked Seeing how other machines and ciphers had failed to be completely unbreakable, Scherbius sought to create the ultimate and most advanced cipher of its time. He also aimed to make it quick and easy for radio operators to use, as previously they often had the very time consuming task of encrypting and decrypting messages sent via the radio manually, so streamlining this process could shave vital time off the back-and-forth communications between difference branches28. The outer body of the device contained a keyboard, a light board, and a plug board. Inside there was as a set of rotors and a reflector29. The Keyboard and Light Board The keyboard was what the operator used to input the ciphertext or plaintext into the machine. They would be able to transcribe this from a radio message or perhaps a written communication. The light board, situated directly above the keyboard was what displayed the output. If the operator had entered a letter of the ciphertext using the keyboard, the corresponding plaintext letter would light up (provided, of course, that the correct settings had been used)30. The machine looked similar to a typewriter31, which Scherbius likely took inspiration from. The Rotors Alberti’s Rotors The concept of a rotor in a cipher was not a new concept in 1918. Leon Battista Alberti, an Italian Renaissance Man, had previously described in 1467 what is now known as the ‘Alberti cipher disk’. This is regarded as the first polyalphabetic cipher32, meaning that one letter in 26 (Singh, 2000) 27 (Bukowski, 2013) 28 (Singh, 2000) 29 (Count On, 2006) 30 (Hern, 2014) 31 (Hern, 2014) 32 (Servos, 2010) Figure 4 - An Enigma machine
  • 8. PAGE 7 plaintext could be represented by a variety of letters in ciphertext, which would render the technique of frequency analysis (see page 4) useless. His cipher disc took two separate discs of varying size, with the alphabet around the edge of both33, connected together with a needle through the centre of them. The smaller, inner disc could be aligned with the outer disc depending on a predetermined key (e.g. m corresponds to A), which would then map plaintext letters on the inner ring with ciphertext letters on the outer ring. Without movingthe disc around, you would essentially end up with a simple monoalphabetic Caesar cipher34, as described onpage 2. This is easy to see because if you never moved the inner ring, each time you wanted to use a letter, you would meet the same corresponding ciphertext letter each time. The ‘trick’ came with moving the disc around periodically, which could be done by both parties deciding on a keyword that would require the disc to be rotated35, or rotating after a set amount of letters. Scherbius’ Rotors It is possible thatScherbius drew inspirationfrom Alberti when he designedthis component of the Enigma machine. Inside the casing sat three physical rotors that formed part of the Enigma’s scrambling mechanism, and one of the most fundamental parts of the entire machine36. Each of the rotors had 26 contacts on either side – that is, one contact to represent every letter of the alphabet uniquely. The contacts would be able to pass electrical current through them, essentially creating a circuit. The contacts of the first wheel would be connected to the secondwheel, and so on. Itis worth mentioningat this point thatthe rotors would feature the alphabet in a random arrangement and each one would be different in its internal wiring; a connection entering at the top of the wheel might exit near the bottom, yet this may not be the case for a different rotor37. After a letter was pressed on the keyboard, the first wheel would move round by one notch. Once the first wheel had rotated a full revolution (or 26 ‘notches’), it would trigger the second wheel to rotate by one notch38. The second wheel would only rotate again after another 26 turns of the first wheel. The third wheel behaved in the same way but it only turned after the second wheel had turned 26 times – it would therefore take 676 turns of the first wheel for the third wheel to trigger just once. As the wheels move, their internal wiring also moves, and so the contacts meet with different letters each time. This means that each letter is encoded corresponding to a different cipher alphabet, and it would take 17,576 key presses to return back to the initial configuration (see Appendix A). 33 (Singh, 2000) 34 (Servos, 2010) 35 (Servos, 2010) 36 (Singh, 2000) 37 (Sale, 2001) 38 (Hern, 2014) Figure 5 - Alberti Cipher Disk
  • 9. PAGE 8 The Reflector The reflector (or Umkehrwalze39) was a component Scherbius added in his machine that reduced the amount of equipment needed to both encrypt and decrypt messages. It was placed after the three discs, and did not rotate. Instead, it contained wiring that would send the signal back through the wheels but through a different route (by linking letters together in pairs). This was ingenious because it meant that encrypting and decrypting were mirror processes40. In other words, given that the starting conditions are identical (the rotors are in the same positions and orientations etc.), inputting the plaintext would yield the ciphertext, but entering the ciphertext would also result in the plaintext being outputted. It is important to realise that the addition of a reflector meant that a letter could never be represented by itself in the ciphertext since no letter mapped to itself inside the internal wiring of the reflector. This was a huge vulnerability for the cipher. The Plug Board 17,576 combinations may sound like a lot, but a modern computer could brute force a solution in a matter of seconds, and a dedicated team of humans – such as the military cryptanalysis organisations – would be able to find the correct combination in not much longer. Scherbius knew of this fault, so when he adapted the Enigma for military use, he added the plug board (or Steckerbrett)41. It was not a rotor but rather a panel with holes on it where youcould swap letters for one another – so a “y” might be exchanged for an “f” using cabling. This is static, however, so the same substitution will be made throughout the entire ciphertext. Early machines had six cables, allowing for six pairs of letters to be swapped (or Steckered)42, though later designs allowed for up to 13 swaps 43. The number of possible combinations for six letter swaps is a staggering 100,391,791,50044 (see Appendix B). Putting it all Together The combined effect of all these components meant that the Enigma machine had over ten quadrillion different starting configurations and indeed, Scherbius – perhaps naïvely – thought that it was truly secure45. It was primarily the plug board that gave the machine its vast number of configurations, and the rotors that made the device impossible to decipher via a trivial frequency analysis. The reflector was simply a convenience for the device’s operators. The beauty of having such a large number of configurations meant that it was likely that an interceptor would never find the correct arrangement, and thus be unable to crack the message. Before moving on, observe the following diagram which depicts a simplified and two- dimensional version of an Enigma machine in action. 39 (Crypto Museum, 2014) 40 (Singh, 2000) 41 (Sale, 2001) 42 (Singh, 2000) 43 (Crypto Museum, 2014) 44 (Crypto Museum, 2014) 45 (Singh, 2000)
  • 10. PAGE 9 Figure 6 - Simplified diagram of an Enigma Machine46 The “T” button has been pressed on the keyboard, so current flows down to the plug board where the letter “T” has been steckered with the letter “K”. Ignoring the static wheel which is unimportant (it simply converts the wires into metallic contacts 47), the current flows through to the first wheel labelled Wheel III. It can be seen that the letter K in this wheel is wired to the letterU on Wheel II, so the contacts betweenthe two wheels transfer the current. The same thing happens for Wheel I. Once the current flow reaches the reflector, the H coming from the final rotor is wired with the D and passes back through all three wheels. Recall that the reflector is stationary and the internal wiring never changes. Once out of the three wheels, the letter “W” is being powered. This then goes back through the plug board, which maps the letter “W” to the letter “G”. Finally, this then powers the bulb corresponding to the letter “G”, which the operator could then make a note of. It is left as an exercise for the reader to verify that for these same starting conditions, pressing the G on the keyboard would result in the T lighting up on the light board, illustrating the symmetric nature of the machine. Remember that after this button has been pressed, the first rotor will turn round by one notch, meaning that the next time “T” is pressed, a different letter will illuminate. Cracking the Enigma The Poles Sandwiched between the Soviet Union and Germany, Poland quickly saw the need to become a world leader in cryptanalysis and codebreaking so that they could stay one step ahead of their enemies that bordered them. In 1926, the German military began using the Enigma machines and the Poles encountered it for the very first time48. 46 (Dade, 2006) 47 (Dade, 2006) 48 (Bukowski, 2013)
  • 11. PAGE 10 By 1928, any attempts by the Polish to decipher the Enigma had failed49. Maksymilian Ciezki, the Polish captain in charge of decrypting German ciphers at the Biuro Szyfrów (Cipher Bureau), had obtained a commercial version of an Enigma machine, but it was too dissimilar to the military variant to be used for decryption. He was growing restless, even resorting to clairvoyance in search of answers50. In 1929, the Biuro organised a cryptology course at the University of Poznań to find intelligent, young Poles to assist with the codebreaking effort51. By the end of the course, only three men remained, including the talented mathematician Marian Rejewski. In 1932, these three men were transferred to Warsaw and invited to join the Biuro Szyfrów to help crack the Enigma cipher. Corruption and a New Lead Hans-Thilo Schmidt was a German and younger brother of Rudolf Schmidt, a German military official. After being removed from the German army, Hans-Thilo managed to get a job at the Chiffrierstelle in Berlin thanks to the powerful position of his brother52. This was where all Enigma communications were based and contained lots of top-secret information. Feelingrejectedby his own country and with nowhere to go after his owned business collapsed 53 , Hans- Thilo resorted to treachery and routinely sold top-secret documents taken from the Chiffrierstelle to the French at covert locations54. His first two stolen documents were operating instructions for how to use the military versionof the machine, and they evenhinted at the wiring inside the rotors – a great first step for attempting to decipher the Enigma. The French saw no worth in this breakthrough however, so the information was given to the Polish, who had a treaty with the French to share such intelligence55. Back in Warsaw, Rejewski – one of the students scouted to work at the Biuro Szyfrów – was hard at work using the newly revealed information from the French. He discovered that every day at midnight, every Enigma machine was configured to an identical base setting56. The base settings changed every day and could be found in a keysheet or codebook which would be distributed months in advance to every operator and contained the keys for every day for several months57. These configurations formed what is called the day key, and would 49 (Bukowski, 2013) 50 (Singh, 2000) 51 (Bukowski, 2013) 52 (Sebag-Montefiore, 2000) 53 (Sebag-Montefiore, 2000) 54 (Sebag-Montefiore, 2000) 55 (Singh, 2000) 56 (Singh, 2000) 57 (Bukowski, 2013) Figure 7 - A German codebook containing Enigma configurations
  • 12. PAGE 11 provide the operatorwith the day’s plug boardsettings, the rotorarrangement, and the rotor starting positions. Changing the key every day was something the Germans did in order to make their ciphers more secure. If they used the same key for too long, cryptanalysists would begin to notice patterns in different ciphertexts, which is extremely bad because it gives them a starting point to try to decrypt the message. Changing the key daily minimises this risk as the chance of repetitionbecomes less. Evenso, withpotentially hundreds of similar messages beingsent per day (such as weather reports, and general conversation between operators), it was possible that patterns could arise. The German’s had thought of this, though their solution was less than ideal… A Different Kind of Key Rejewski noticed that for every intercepted German message, there were two three-letter strings at the very beginning: LSA BVD EDPUD NRGYS ZRCXN UYTPO MRMBO FKTBZ REZKM LXLVE FGUEY SIOZV EQ This was a breakthrough, as he realised that at the beginning of each message was what is called the “message key” – three random letters typed twice58. The receiver would use the day key to read the contents of the message key, then adjust the rotors corresponding to this new key, decrypting the rest of the communication using the message key instead. The Germans believed that by typing the key twice, the communication would be more secure. Messages were broadcast using Morse code, so if an operator mistyped or misheard one of the letters due to poor radio connections, they would be able to see that the two groups of three letters were not identical, and that there had been a mistake somewhere along the communication chain59. In essence, it was a primitive form of error-checking60. What, exactly, this message key should be was not important. Operators were meant to choose a randomstring thoughoften they had ‘favourite’combinations such as their family’s initials, or simply overused an easy-to-type combination61. Recall that any repetition in cryptography is bad – it allows a weakness for attackers to exploit. Whilst the Germans thought that their message key made their messages extra secure, Rejewski realised the potential it had for cracking the cipher once and for all. In the above example, if the letters have been repeated, you can deduce that the 1st and 4th letters refer to the same plaintext letter, and the same for the 2nd and 5th, and 3rd and 6th letters. Combining the discovery of message keys with the information extracted from the German traitor Schmidt, Rejewski developed a series of equations and formulae in an attempt to uncover the secrets of the Enigma cipher. Astonishingly, in just three few months, Rejewski had found successful formulae, and solved how the Enigma machine worked using theoretical mathematics, reverse engineering, and a small amount of treachery. Using his newly discovered techniques, he could now establish the entire day key, and hence read any 58 (Count On, 2006) 59 (Bukowski, 2013) 60 (Sale, 2001) 61 (Singh, 2000)
  • 13. PAGE 12 German message 62 . Following his breakthrough, the Biuro Szyfrów commissioned the creation of several replicas of military Enigma machines63. Rejewski devised a machine, dubbed a bombe, that could sort through all 17,576 permutations of the rotors mechanically to find the day key quickly. Togetherwith a method of finding the key using a series of perforated sheets that Rejewski’s colleague Zygalski had pioneered, the Polish could find the correct day key in just two hours64. Since there were 6 different combinations of rotors, six bombes were commissioned to work in parallel which proved to be an extreme success. In fact, by 1938, the Biuro Szyfrów could read over 75% of intercepted messages – all without the Germans knowing65. The Germans Fight Back In December 1938, the German military introduced two new rotors to the existing three (page 6) in an effort to increase security66. This meant that the number of possible rotors combinations rose from 6 to 60 – a tenfold increase. The Polish simply did not have the resources for this huge increase. In fact, to build 60 of Rejewski’s bombes would’ve cost fifteen times the entire annual equipment budget for the Biuro Szyfrów67. To make matters worse, the Germans also altered how many letters got swapped on the plug board from just six pairs to 10. Realising that they could no longer decrypt the Enigma by themselves, and with Hitler’s regime threatening an imminent invasion of Poland, the Polish had no choice but to share their breakthroughs with the French and British. At a meeting in a secretive location just south of Warsaw in 193968, the French and British were shown the work of Rejewski and Zygalski, and given copies of the German Enigma to take back andwork on69. Just two weeks after this meeting, on 1st September 1939, the Germans invaded Poland, and World War II began70. The British Take Control The intelligence and progress made by the Biuro Szyfrów made its way into the hands of the newly formed Government Code & Cypher School (GC&CS, now known as GCHQ) at Bletchley Park in Buckinghamshire, England71. Bletchley Park had many times more staff and resources than the Polish cipher bureau, which meant they could cope with the large amount of bombes now required to crack the Enigma with five possible rotors72. As well as utilising the methods developed by the Polish, the British began to develop their own methods of streamlining the process. For example, the predictability of some message keys (see page 11) was discovered in one of the huts outside the Bletchley Park building. An 62 (Singh, 2000) 63 (Bukowski, 2013) 64 (Singh, 2000) 65 (Sale, 2001) 66 (Sale, 2001) 67 (Singh, 2000) 68 (Bukowski, 2013) 69 (Sale, 2001) 70 (Bukowski, 2013) 71 (Sale, 2001) 72 (Bukowski, 2013)
  • 14. PAGE 13 Enigma operatormight justtype “QWE” (from the German QWERTZ keyboardlayout)since it was convenientto type. The cryptanalysists atBletchley Park nicknamed these predictable message keys ‘cillies’73. The cryptanalysists would often try the known cillies first, and occasionally would be successful, shaving a large amount of time off the decryption. Another issue was thatthe Germans who wrote the codebooks were reluctant to have a rotor in the same position for two days running. So, if Monday’s configuration was 351, they could not use 253 the following day, since the five is in the same position for two days running. They did this to try and make the positioning ‘more random’, but by doing so they actually eliminated a lot of possibilities, making the job of the cryptanalysist easier74. There were other rules regarding the plug boardthatalso eliminatedmany possibilities to do with which letters could be steckered with each other. In 1939, GC&CS was recruiting many intelligent young Brits from around the country to help with the decryption at Bletchley Park. One student who had been identified as a skilled candidate for codebreaking was the now-famous Cambridge mathematician Alan Turing75. He was invited to put his university career onhold, and work as a cryptanalysistfor GC&CS76. Turing had been considering different ways in which he might be able to exploit Enigma, and his primary idea was to do with the fact that many transmissions from the Germans were likely to contain certain passages that were predictable. Turing nicknamed these passages “cribs”, and an example might be an excerpt from a weather report77. It would have been highly likely that the message would include “Wetter”, the German word for weather. One of the ways in which you could guess where this word would arise was by using the fact that a letter couldn’t be encrypted as itself. So, if you compared the plaintext crib with the ciphertext message and one letter was mapped to itself, then you would know that it was an impossible position for that word to be in. Plaintext: WETTER Ciphertext: EDPUDNRGYSZRCXNUYTPOMRMBOFKTBZREZKMLXLVEFGUEYSIOZVEQ Above, you can see that the word ‘Wetter’ could not be placed in that position since the final ‘R’ would be mapped to an ‘R’ in the ciphertext – an impossible result. By shifting the word up and down until you found a potential match, you could take educated guesses at where words might be. Of course, many messages followed a rigid structure78, so this would not always be as difficult as it sounds. Turing devised a plan which is out of the scope of this paper, but he essentially looked for pairs of letters that had been encrypted as each other. So, for a known (or guessed) plaintext a “C” might have beenencrypted as an “F”, and an“F” in plaintextmight have beenencrypted 73 (Singh, 2000) 74 (Singh, 2000) 75 (Sale, 2001) 76 (Singh, 2000) 77 (Sale, 2001) 78 (Singh, 2000) Figure 8 - A crib loop
  • 15. PAGE 14 as a “C” in the ciphertext79. The concept couldbe taken one step further, by looking for entire loops or letters that encrypted to each other in a cyclic fashion80. For example “R” to “N”, “N” to “S”, and “S” to “R”, forming a complete ‘loop’. By connecting three Enigma machines together, it becomes possible to find a solution for the rotor settings, since the circuit between the three machines will only be complete when the correct combination and arrangement of rotors is found. This ingeniously ‘cancels out’the effects of the plugboards81, which vastly decreases the time taken to find the key. To automate Turing’s breakthrough discovery, Bletchley Park put £100,000 towards building machines Turing had designed called bombes, perhaps in reference to Rejewski’s earlier bombes. On 1st May 1940, the Germans changed their protocol, and decided to only send their message key once per message, in comparison to the usual two82. This caused a sharp drop in the amount of decrypted message coming out of Bletchley Park for some time as it was one of the main weaknesses thatcouldbe exploited. However, on8th August, Turing’s bombe had been produced and was put into action83. In just 18 months, there were 15 more bombes put into action, methodically going through every possible configuration to try and find a potential match. It proved to be extremely successful and the amount of decrypted German messages rose sharply again. What Happened Next? There was still the problem of the Naval Enigma that used a different, more complicated protocol to the regular Enigma. In fact, there were many different procedures and protocols used in the military. As far as the Naval Enigma is concerned, the decryption success at Bletchley lay simply in the capture ofsome of the Nazi’s confidential codebooks84 containing day keys which could then be used to unravel what they had been saying. The decryption of the Enigma cipher by both the British and the Polish was a remarkable achievement, though it would go unknown for 30 years until the secrets were released by the government in the 1970s. To What Extentdid the Design of the Enigma Machine Lead to its Decryption? Throughout this paper, we have seen how the cipher that was once thought impregnable by many was exploited and decrypted. It wouldbe wrong to discredit the designof the Enigma cipher because it was extremely well thought out and masterminded; the rotors were a clever technique for ensuring that the 79 (Sale, 2001) 80 (Sale, 2001) 81 (Singh, 2000) 82 (Weierud, 2003) 83 (Singh, 2000) 84 (Singh, 2000)
  • 16. PAGE 15 device was secure against frequency analysis, and the plug board was a good solution for giving the device a large amount of potential keys. In terms of design, the reflector traded convenience for security by not allowing for a letter to be encrypted as itself. This fact gave cryptanalysists the upper hand and allowed for millions of possible keys to be discarded. There were other minor cryptographic weaknesses in the design, but nothing else worthy of mention. Instead, the decryption of the Enigma was largely down to its misuse by the Germans. Message keys were a good idea in theory, though by typing it twice they created a vulnerability that was perhaps bigger than the problem they were trying to solve in the first place. Repeated message keys gave the cryptanalysists something that they could work with and depend upon. Codebooks were also a goodidea, meaningthat every day youwouldencounter a fresh series of encryptions which would minimise the chance of finding patterns. Despite that, the authors of the codebooks actually hindered the randomness of the configurations by discounting certain patterns from occurring together, again making work easier for those looking for weaknesses. Furthermore, the logistics of distributing such a document to every German radio operator around Europe was difficult – especially at a time of war – and it is true that some were eventually captured by the enemy (such as one of the Naval Enigma codebooks) which would instantly make their entire communication network transparent to the enemy. The use of rigid and similar message structures by the Germans was also a bad practice and resulted in Turing and the team at Bletchley Park taking advantage of the predictability in order to solve the key. Finally, the Polish were helped massively by the documents provided by Schmidt, and it might’ve taken them much longer to make progress without the intelligence he supplied through his acts of treason, if at all. To conclude, the design of the Enigma machine was – in general – very strong with quadrillions of different key combinations that could be used. If you started trying every key combination at the beginning of the universe, checking one per second, it is likely that you still wouldn’t have found the correct key. Instead, the decryption of the Enigma was primarily thanks to a series of mistakes by the Germans, such as lazy operators choosing predictable keys, flaws in the procedure of sending and receiving messages, and using the same protocols and techniques for far too long. All of these faults by the German’s, rather than the few designweaknesses ofthe Enigma machine itself, severely weakenedthe Enigma cipher to the point where it was almost trivial to decrypt.
  • 17. PAGE 16 Appendix A. Number of Different Rotor Arrangements We get to the result of 17,576 different arrangements of the rotors using simple combinatorics. There are 26 possible values in the first rotor, 26 values in the second rotor, and 26 in the third rotor. To find the number of total permutations, we simply multiple the numbers of possibilities by each other. B. Number of Possible Letter Swaps on the Plugboard The mathematics behind this calculation is more complex than the number of different rotor arrangements. The formula that is used is: Where n is the number of different swaps we make. So, for the standard six swaps, simply entering n = 6 into the above equation and the result 100,391,791,500 should appear. It turns out that the optimum number of swaps is 11 which gives a staggering 205,552,193,100,000 combinations85 – several magnitudes more than just six swaps. The formula arises from the fact that you can’t swap anything with itself and you can’t have more than 13 swaps. 85 (Crypto Museum, 2014)
  • 18. PAGE 17 Bibliography "1926: Enigma Introduced into German Navy as Radio Key C." National Cryptologic Museum Foundation. National Cryptologic Museum Foundation, 9 Feb. 2015. Web. 27 Feb. 2015. Arthur, Charles. "How Internet Encryption Works." The Guardian. 5 Sept. 2013. Web. 25 Jan. 2015. Bukowski, Marianna, prod. "Cracking Enigma: The Untold Story." Heroes of War: Poland. Dir. Stuart Rose. History Channel. 2013. Television. "Codebreaking - The Enigma Cipher." Count On. Tribal Group, 2006. Web. 25 Jan. 2015. <http://www.counton.org/explorer/codebreaking/enigma-cipher.php>. "Cryptanalysis/Signals Analysis." Careers in Cryptanalysis and Signals Analysis at National Security Agency (NSA). NSA, 15 Jan. 2009. Web. 8 Feb. 2015. "Cryptography." New World Encyclopedia. Web. 25 Jan. 2015. Dade, Louise. "How Enigma Machines Work." How Enigma Machines Work. 2006. Web. 27 Feb. 2015. Dade, Louise. Simplified two-dimensional diagram of an Enigma machine. Digital image. Enigma Machine Emulator. 2006. Web. 28 Feb. 2015. Damico, Tony M. "A Brief History of Cryptography." Weblog post. Student Pulse. 2009. Web. 25 Jan. 2015. Dubenskij, Charlotte. "World War One: How Radio Crackled into Life in Conflict." BBC News. BBC, 18 June 2014. Web. 27 Feb. 2015. "Enigma." Crypto Museum. Crypto Museum, 31 May 2014. Web. 27 Feb. 2015. Hern, Alex. "How Did the Enigma Machine Work?" The Guardian. The Guardian, 14 Nov. 2014. Web. 27 Feb. 2015.
  • 19. PAGE 18 Kahn, David. The Codebreakers: The Comprehensive History of Secret Communication From Ancient Times to the Internet. New York: Scribner's and Sons, 1997. Print. Kahn, David. Seizingthe Enigma: The Race to Break the German U-boat Codes, 1939-1943. Boston: Houghton Mifflin, 1991. Print. Maher, Adrian. "Codes." Modern Marvels. History Channel. 21 May 2001. AShort History of Cryptography - A Brief History of Cryptography. Web. 25 Jan. 2015. <https://www.youtube.com/watch?v=H9Cu36Qj3dQ>. Mollin, Richard A. An Introduction to Cryptography. Boca Raton: Chapman & Hall/CRC, 2001. Print. Pfleeger, Charles P., and Shari Lawrence. Pfleeger. AnalyzingComputer Security: A Threat/Vulnerability/Countermeasure Approach. Upper Saddle River, NJ: Prentice Hall, 2012. Print. Pieprzyk, Josef. Fundamentals of Computer Security. Berlin: Springer, 2003. Print. Sale, Tony. "The Components of the Enigma Machine." Codes and Ciphers. 2001. Web. 27 Feb. 2015. Sebag-Montefiore, Hugh. Enigma: The Battle for the Code. London: Weidenfeld & Nicolson, 2000. Print. Servos, William. "The Alberti Cipher." The Alberti Cipher. Trinity College Cambridge, 24 Apr. 2010. Web. 27 Feb. 2015. Singh, Simon. The Code Book: The Secret History of Codes and Code-breaking. London: Fourth Estate, 2000. Print. "War of Secrets: Cryptology in WWII." National Museum of the U.S. Air Force. National Museum of the U.S. Air Force, 17 Oct. 2014. Web. 22 Jan. 2015. Weierud, Frode. "Enigma Machine." Frode Weierud's CryptoCellar. 2003. Web. 20 Jan. 2015.