The History and Mathematics of Codes and Code Breaking

Tag: Turing

How was the German cipher deciphered in World War II?

At the Brechley Manor, in addition to Knox, the deciphering community, there is also a mathematics wizard, Turing. He graduated from Cambridge University and relied on his research on cryptography after the war. He became one of the pioneers in the era of electronic computing.

First of all, they started with the development of a machine that can imitate or explain every “dummy mystery” of the German Defence Force, so that it can launch all the coding procedures that are frequently changed when the main command of the German army is issued day and night, and when the adult orders are issued. After a difficult attack, the British finally made the machine with the above functions and named it “bomb.”

At the end of 1939, the “bomb” deciphered the German code, and the British were ecstatic. Since then, the German secret plan and action plan has been continuously transmitted from the Brenchley Manor to Colonel Menzies, and then directly to Churchill’s desk. In fact, most of the German actions during the “World War II” failed to win the British, but the British have always concealed the source of intelligence, and have never caused doubts from opponents.

On July 2, 1940, Hitler released the first “Sea Lion” combat plan, which is also the British local landing operations plan. At the beginning of the campaign, Churchill and the Air Force staff learned most of the German Air Force – sometimes even all of them – through “super secrets”.

In response to the command of the German Air Force Commander Goring to seize the air superiority, the Royal Air Force has developed a plan to concentrate its superiority against the enemy. Since the number of aircraft of the British Air Force is not much in Germany, the fighter squadron and the main defensive forces can only be concentrated at the appropriate time, in the right place and at the appropriate height to deal with the enemy’s main attack power. Relying on early warning radars and deciphered German military intelligence, the Royal Air Force can always take advantage of the arrival of the Nazi Air Force to accurately intercept the interception, without the need for time and space patrols to guard against German raids – the British Air Force has greatly reduced the pilot’s physical consumption and gasoline Wait for strategic material consumption.

On August 13, 1940, over Sussex and Kent, 80 German “Donil 17” bombers, and a larger number of “Junker 88” dive bombers, flew to the British hinterland and coastline to carry out bombing missions. Due to the dense clouds in the sky, the German escort fighters could not take off as planned, and the bombers had to attack alone.

The British Air Force Command had already known the German action plan in advance. When the German plane was found on the radar, it immediately launched an operational plan that was already ready. In this confrontation, the German Air Force lost a total of 47 aircraft and more than 80 were injured. The British Air Force lost only 13 aircraft.

So actually in the WW1, the cipher of the German military should not be posted. It directly results in that the cipher of WW2 is deciphered.

Why did the Allies succeed in cracking the Enigma?

While most people only credit Alan Turing for cracking of the Enigma, it is important to recognize the critical role that Marian Rejewski in paving the way for the Allies’ success.

In the early days of the war, Rejewski along with the Polish Cipher Bureau were able to identify that each letter in the ciphertext was linked to a chain of letters, thus allowing them to deduce that a relationship lied between the letters. This discovery removed the mystery surrounding the aptly named Enigma as they could now discern a pattern. If a pattern is present, then it can be concluded that there was a process taken to produce that which also means that, armed with logic and a lot of hard work, the steps in that process can be deduced. Had Rejewski not made this discovery, it can be argued that Turing would never have been able to crack the Enigma as it gave him a direction to pursue and a starting position of where to do that from.

In addition to this, Rejewski’s creation of the first bomba allowed Turing to understand the importance of mechanizing the cryptanalysis of the Enigma. By using a computer to solve the Enigma, it allowed the Allies to be more efficient. And so, when Turing was finally able to crack the Enigma, due to the time saved, the information deciphered was still useful and so they were able to anticipate and prepare for Germany’s attacks.

Although Singh argues that German overconfidence is the primary reason that the Allies were able to crack the Enigma, the principal reason for the Allies success was because of Rejewski. His creativity and innovative thinking was the breakthrough that allowed the Allies to ultimately break the Enigma.

Human Error and Forced Flaws

Photo Credit: “Chiffriermaschine ‘Enigma’ ” by Walther licensed by Wikimedia Commons under Creative Commons

The Enigma Machine was practically impregnable if all of its information was kept secret and all its operators worked without human error. With billions and billions of possible settings, it would have taken cryptanalysts an obscene amount of time to sort through all of the possible keys. Additionally, with an ever changing pattern and shifting scramblers it would be incredibly hard to find a method to deduce the plaintext if all one had was pure ciphertext, even with if the most brilliant minds in Britain working on a solution. Essentially, cracking the Enigma required some sort of “crib”, some insight into how the code was working on a specific day that would take out some of the possible Enigma settings.  Because of this, the cryptanalysts would not have had the success that they did without the help of two things; German cryptographer’s mistakes in using the code and the espionage and tricks of the Allied forces.

A clue into the how the code was being run a certain day was often acquired from the mistakes of the Germans. For example, when German operators were picking keys they would often choose “three consecutive letters from the Enigma keyboard” or even use the same key as they had used previously (Singh, p.164). These mistakes, known as cillies, became vital to Bletchley Park’s decoding of the Enigma machine. Because they knew that some keys were more likely to show up than others, they could try their hunches first and would save valuable time if they were proven correct. Basically, the Enigma machine was still doing its job; it’s just that the operators proved to be too predictable. In addition, the Germans took efforts to make the Enigma machine more secure that often backfired and lessened the impregnability of the cipher. For instance, they decided that a scrambler couldn’t stay in the same position for two days in a row (Singh, p.164). This may seem to make it more random, but it actually excluded many of the possible scrambler arrangements that British cryptanalysts had to weed through.

When all else failed, however, and German mistakes and bright Bletchley park minds didn’t produce a crib, espionage and trickery became key. When they couldn’t find a crib, it seemed, British cryptographers would create one. By manufacturing situations where the German U-Boats would have to send messages with a specific location in the cipher, the British cryptanalysts could gain insight into the way the cipher was working. Because they knew the location of whatever the U-Boats had sighted (be it a convoy or a mine), the British had a bit of plaintext to work with. With this plaintext, they could employ Turing’s loop method and decrypt the scrambler and plug board settings of the day. All in all, using the openings found in the Germans operational mistakes and those created by Allied operations, the cryptanalysts at Bletchley Park could decrypt the Enigma, collecting valuable information that would help them win the war.

Understanding the Enigma

Cryptonomicon by Neal Stephenson is an interesting and informative novel tying together different generations of cryptography.   A passage I found most interesting was in the chapter ‘Cycles’.  In this chapter, Stephenson expands on the fundamental mathematics behind the Enigma machine: modular arithmetic.

Stephenson compares modular arithmetic to Turing’s bike.  For some reason, Turing’s bike has a rear wheel with one bent spoke and a weak chain link.  When the spoke comes into contact with the chain at a certain position the chain will fall apart.  The mathematical take on this occurring utilizes a series of variables.  We assume that the spoke is at a degree of 0 (Θ=0) and the position of the chain (C) is at C=0, when the spoke can break the chain.  The weak link is numbered 0, and follows, with I equaling the total number of links in the chain. The sprocket has n teeth, and after one full revolution of the wheel C=n (after two revolutions Θ =0 but now C=2n).  With these variables, Stephenson draws an incredible connection to modular arithmetic.  While C increases infinitely, the number of links does not, and at C=I the chain returns to C=0.  According to Stephenson’s example, if there are 100 links (I=100) and 135 links have passed, C will equal 35 instead of 135.  To put this into mathematical terms, C = 135 mod 100.  In this way, Turing’s bicycle offers an interesting connection to the way an Enigma machine works.  According to the period of an individual cycle within the machine, the difficulty in cracking a code increases.  This period is similar to how Turing’s bicycle returns to Θ=0 and C=0.  How exactly does this help determine when the chain will fall apart? According to Stephenson, this will happen when a multiple of n is also a multiple of I.  This perspective provided me with a better understanding of modular arithmetic and showed how complex the Enigma machine can be when the period increases.

Image: “Hydroelectric Turbine,” by Guy Mason, Flickr (CC)

Powered by WordPress & Theme by Anders Norén