Cryptography in World War II

Author: Aatmesh. Learner at The Integral School, Hyderabad.  This is a self directed independent project exploring the use of cryptography in the World War II.

Introduction 

Cryptography is the art of creating and solving codes. It is derived from the Greek words kryptos, meaning hidden and graphy meaning writing, therefore it is hidden writing.

The first known practice of some sort of cryptography dates back to the year 1900 BC in ancient Egypt. This early form of cryptography did not involve hiding a message, and substituted ordinary hieroglyphs with unusual ones. The process of substitution cannot be defined as cryptography, but it was the first instance of replacing a known alphabet with something relatively unknown. It can be said as the origin or inspiration for cryptography. The next documented use of cryptography was in ancient Rome, almost 1800 years later.

Following the discovery of substitution, in around 100 BC, Julius Caesar used cryptography to issue secret orders to his generals. He (Caesar) developed one of the simplest algorithms (a process or set of rules to be followed in calculations or other problem-solving operations) in cryptography, called the Caesar cipher. The Caesar cipher moved each letter of the alphabet by three places from their original spots. For example, the letter ‘A’ would move three places (‘B’,’C’,’D’) and turn into ‘D’, the letter ‘X’ would become (‘Y’,’Z’,’A’) ‘A’, the letter ‘Q’ would become ‘T’ and so on. Therefore, the word ‘one’ would be written under the Caesar cipher as ‘rqh’. This cipher is simple to interpret if one knows what to replace letters with, but if Caesar’s enemies ever got hold of these letters, they would be nothing but gibberish. This is exactly how cryptography works, allowing people who know the pattern to understand the message. It is often used in conveying war strategies, government secrets and other covert messages. This essay is about cryptography with regard to the second world war. It will explore the importance of cryptography in the war (encryption and decryption), the most significant encryption device and how it was used with regards to the war.

Importance of cryptography in WWII 

As with any war, communication between allies (and within countries) is key. The second world war was waged between two groups, the allies and the axis powers. The allies consisted of the U.S.A, France, Poland, England and many (at that time) English colonies (Australia, New Zealand etc.) and the axis powers were made up of Germany, Italy, Hungary, Japan, Bulgaria and Romania. World war two took place between 1935 and 1945. At that time there was  already radio communication and other such technology. During the war, communication occurred almost entirely by wireless radio transmissions. For each transmission, both sides used different ciphers to protect their information. Massive amounts of resources were put into attempting to decrypt enemy ciphers in order to know what they would do next and in turn control the war. In the field of encryption Germany possessed a machine that was considered impossible to decipher, the enigma machine.

The Enigma machine – The enigma machine was invented in world war one by a German scientist, but used throughout most of world war two (with improvements being made) due to its effectiveness. The enigma machine Used several layers of substitution to encrypt messages. Instead of substituting a letter once or even twice, it substituted a letter multiple times, thus increasing the possibilities of that particular letter and making it harder to crack.

The enigma machine had the appearance of an ordinary typewriter, but consisted of a keyboard which sent electric signals through multiple scramblers. To begin the process of encryption, the required letter would be typed on the keyboard. The keyboard was connected to a plugboard (an extra level of encryption that wasn’t always used) which would would change the original letter (e.g ‘B’ the letter typed into the keyboard) to any other letter of the alphabet (excluding ‘B’ itself). All the letters in the alphabet would have correspondent letters on the plugboard. To make the code even more complex, the corresponding letters could be switched. For example, if the plug from ‘B’ was connected to the letter ‘Q’, one could unplug it from ‘Q’, unplug another letter’s correspondent and switch them around. Now ‘B’ might become ‘F’ and another letter would become ‘Q”. This process had to be done manually.

plugboard-400

After being changed by the plugboard, the signal  would be transferred to three rotating discs or rotors. The signal would first pass through a static board which didn’t alter the letter, but allowed the signal to flow between rotors and the plugboard. Each rotor contained all the twenty six letters of the alphabet, which had to be set at the start. For example, each rotor had to start with a certain letter (which the Germans co-ordinated), like rotor one with ‘C’ rotor two with ‘W’ and rotor three with ‘M’. This meant that signal would end up changing when it passed through each rotor. All three rotors were connected to one spindle and moved at the same time with regard to each other. If all three rotors were set to the letter ‘C’, it would be useless as it would have the effect of only one rotor. Each of the rotors had twenty six teeth by which they were connected and passed on the signal. After the signal reached the third rotor, it was reflected back through all three rotors, adding another level of scrambling. With each click of the keyboard, the rotors moved by 1/26th of their total circumference, meaning that if the letter ‘W’ was pressed twice, the second substitution of ‘W’ would differ from the first.

installed-rotors-400

Once the signal had passed through all three rotors and been reflected back, it would go through another plugboard (not always used, identical to the first one) and then finally end its journey at the lightboard. The lighboard was displayed the new encrypted letters using alphabets that had lights underneath them. Once a letter was encrypted, it would shine on the lightboard (in its encrypted form).

Following the lengthy encryption, the (encrypted form of) message would be relayed to other Germans. Even if the message was intercepted by the allies, it would be impossible to understand. All the germans had to do to decrypt the message, was type it into one of their own enigma machines (identical in structure to the one which did the encryption), with knowledge of the rotor’s starting position and plugboard connection. The correct message could not be derived if these specifications were not given.

Totally, the enigma machine could substitute each letter ten times, and had 150,738,274,937,250 possibilities, which is why it is considered one of the greatest encryption machines of all time.

For communication, the Germans relied almost entirely upon the enigma machine. If the allies could find a way to crack the machine’s code, they would have access to all of Germany’s secrets. Which is why they spent massive amounts of time and money on decrypting the machine.

Decrypting the enigma machine – Decrypting the machine began, when Polish mathematicians got their hands on information about the workings of it. They made an educated guess, that each individual layer of encryption was in alphabetical order. After that, they discovered that the enigma machine was designed to make sure that the original letter was not the same as the encrypted one. This cut down the possibilities narrowly. With other mechanical information, the allies (the Polish mathematicians shared the information) were able to reverse engineer the enigma machine. Even with a copy of the machine, the allies could not interpret messages correctly. The Poles actually cracked the code, but that made no difference (until later). The reason for that was in the rotors.

Figuring out the key, or which letter the rotors were set to was essential in order to understand the messages. The Germans changed the key everyday, so the allies always had only twenty four hours to decrypt a message before the key changed. The next breakthrough was discovered by the British. A group of their finest deciphering minds were set the task of finding out German messages within twenty four hours. Since they had the information from the Poles, all they had to do was crack they key. They got to work cracking the key, by building a gigantic machine called the bombe.

The bombe was a deciphering monster. It was composed of many enigma machines, all of which worked simultaneously on different keys. It was in essence a large eliminating machine, that was extremely powerful, allowing it to work out the key which the Germans were using. Once that was done, the group of codebreakers had to interpret the message. This worked perfectly for the allies as they knew every move before it would happen and could counter accordingly. The bombe is credited with reducing the war by two whole years.

The world was never the same after the war. From the bombe sprung forth the first supercomputers, capable of processing unimaginable amounts of data. Following the enigma machine, many other encryption devices were created, that have learned from the mistakes of their predecessor.

Afterword 

All in all, the level, techniques and innovation in the art of cryptography skyrocketed during second world war. Deciphering and encrypting was a matter of millions of lives (or deaths) and was treated as a means to win the war. The greatest inventions and discoveries often rise out of, or are developed due to necessity, which is why cryptography progressed as much as it did.

The interesting thing about WWII, was that it was fought with artillery, tanks, troops etc. but it was fought on the basis of information that came about due to cryptography. The mathematics behind cryptography were so advanced that for the first time, math was used as an instrument of war. The cause for WWII end can be attributed to mathematics and cryptography.

One Comment Add yours

  1. Mohit says:

    Very informative Aatmesh. Great research.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s