Cracking the Enigma Code

Apple | Spotify | Amazon | Player.FM | TuneIn
Castbox | Podurama | Podcast Republic | RSS | Patreon

Podcast Transcript

During the Second World War, the Germans used what they thought to be an uncrackable encryption system. 

It was a really good encryption system, and for the longest time, the Allies had a difficult time cracking the code. 

However, thanks to brilliant code breakers, a powerful computing machine, and German mistakes, the Allies were finally able to break the code. 

Learn more about the Enigma Code and how it was broken on this episode of Everything Everywhere Daily.

Codes and ciphers have always been an important part of warfare. 

Commanders needed to give orders to units that couldn’t fall into the hands of enemies. 

If you remember back to my episode on cryptography, cipher systems of some sort have been used since ancient history.  There is evidence of some sort of encrypted writing in ancient Mesopotamia, India, Greece, and Rome.

For most of history, encryption was tied to a physical document. You could hide or conceal a document so the enemy wouldn’t even know there was a document. 

However, with the advent of wireless radio communications, things changed. You could send communications quickly over long distances, but the communication could be picked up by anyone who was listening. 

When you knew the enemy was going to have access to your encrypted communications, you needed an extremely robust encryption system. 

There is a system that is extremely secure, known as a one-time pad. A one-time pad is a system of random characters that are shared between two parties. This system is 100% unbreakable. 

However, there’s a catch. You can only use it once, and you really can’t use it with multiple parties.  If a central command wanted to communicate with multiple distributed units, if you gave everyone the same one-time pads, if one fell into the hands of the enemy, then they would be able to decrypt everything. 

What you wanted was a system that was difficult to crack, and if a message was cracked, it didn’t mean you could crack any previous or subsequent messages. 

Such a system was developed in 1918 by the German electrical engineer Arthur Scherbius. It was an electrical machine that could encrypt messages. He received a patent for his invention and sold it under the name Enigma. 

The Enigma machine was an extremely clever device. 

At its core was the oldest method of encryption in the world, letter substitution. 

Letter substitution systems systems are extremely simple. Just take a letter of the alphabet and replace it with another letter, then write the code using the replaced letters. 

The problem is these systems are also very easy to crack. They can be done almost instantly with a computer, and they can even be done rather easily by hand. They are easy enough to crack that they are often used as puzzles in newspapers. 

What was brilliant about the enigma system was that it changed the substitution after every letter. 

To have an understanding of how it worked, let me describe a basic Engima machine. There were several different versions of the machine, but this basic description would apply to all the versions. 

An enigma machine was about the size of a small cash register. At the bottom was a keyboard. Above the keyboard were rotors. Each rotor had 26 possible settings, which must be set before encrypting or decrypting a message. 

Depending on the version of the machine, there could be anywhere from three to eight rotors. The rotors could have been selected from a larger number of rotors, such as three of a possible eight. 

In some machines, there was also an electrical plugboard on the front, just below the keyboard. For versions with the plugboard, each plug corresponded to a letter of the alphabet, and multiple cables would connect multiple letters of the alphabet together.

At the top, there was a set of lights that also corresponded to each letter of the alphabet. 

When a message was to be encoded, the rotors were set to whatever the predetermined settings were for that day. Likewise, if there were a plugboard, those would have to be set to the preordained settings as well.

The sender would type a key, which would then light up one of the letters at the top. However, every time a key was pressed, it would turn the rotors, creating, in effect, a brand-new letter substitution for every single character. 

The plug board added an extra layer of encryption by electronically switching letters before it was sent to the rotors. 

If you had a three-rotor Enigma machine, taken from a set of five rotors and ten letter pairs connected in the plugboard, there would be almost 159 quintillion possible settings for the device. 

Decrypting the device would be doing the exact opposite. You would set the machine to that day’s settings, then type in the encrypted letter, which would light up the decrypted letter at the top. 

Every day, the rotor settings would be changed according to a set schedule. So, even if you could somehow decrypt a given message, it would be useless the next day because the rotors would create a whole new system. 

If you wanted to decrypt a message, you needed an Enigma machine with the right rotors, and you had to know the settings for that message. 

The Germans were extremely confident in their Enigma machines. They were used at all levels of the German military and were used to transmit secrets with the highest classification. 

Needless to say, the protection of Enigma devices and the daily settings was a top priority. In the German Navy, the settings were printed with water-soluble ink that be erased if a ship were to sink. 

In the event that a ship was to be captured, the rotors were to be taken out and thrown overboard as the ship was abandoned.

The first version of the Enigma machines were in use by the German government as early as 1923, well before the Nazi Party came to power. Over the years, various versions of the machine were rolled out to be used by various branches of the military. 

Attempts to break the Enigma code began well before the war started. It was truly a monumental task, given the strength of the Enigma system.

The British cryptographers have gotten much of the attention, more on that in a bit, but the Polish Cipher Bureau actually conducted the original work in the early 1930s.

Poland had a greater and earlier incentive to crack the German code before any other European country did.

Not surprisingly, the Poles had a great deal of difficulty cracking the code. A Polish mathematician named Marian Rejewski made huge strides in understanding how it worked and weaknesses in the system. 

One of the things he realized was that there were flaws in the German procedures. First, they used a single setting for all of the messages on a given day. Second, they put a 6-letter indicator with a message key at the top of each message.

This was an encrypted command to tell the decrypting operator how to set their rotors. This was done by the Germans up until 1938.

This and other errors made by German operators made it possible for Rejewski to decrypt some messages without ever knowing the initial settings of the device. 

The Poles made many other advancements in cryptography in attempting to break the Enigma code and also developed one of the first machines that could work on decryption. It was called a cryptologic bomb or a bomba.

The bomba was a brute force attempt to solve the rotors. 

However, a general solution to the Enigma code eluded them, and things got worse when the Germans added two more rotors that could be used to make up the three rotors. This increased the number of rotor combinations from six to sixty.

In 1939, when it looked like war with Germany was inevitable, the Poles shared what they had learned with Britain and France. 

When Germany invaded, the Polish Cipher Bureau destroyed their machines and documents and evacuated the team to the south into Romania. They wound up in France, at a site called PC Bruno, where they continued their work. 

British cryptographers from the British cryptoanalysis center in Bletchley Park visited PC Bruno. In January 1940, one researcher by the name of Alan Turing came to PC Bruno to work with the Polish and French cryptographers. 

PC Bruno and Bletchley Park worked closely together and had their own secure telegraph cable to communicate with each other.

When the Germans invaded France, many of the PC Bruno team managed to flee to Britain, but some were captured. After the war, it was determined that none of the cryptographers had disclosed anything they knew.

I want to stress the work done by Polish cryptographers because much of the story of cracking the Enigma Code focuses on Alan Turing and the team at Bletchley Park. While they do deserve a great deal of credit, as the team at Bletchley themselves recognized, their work wouldn’t have been possible without the trail that the Poles blazed in the years before the war.

After the invasion of France, the job of cracking the Enigma code now fell to Bletchley Park and the team led by Alan Turing. 

Turing created their own version of a cryptographic bombe. This, like the previous Polish version, would try to brute-force all 17,576 possible positions for a set of wheel orders. 

The Bombe wasn’t a computer as we think of it today. It was electrical, but it was mechanical. 

The problem was they had to do this every day with a fresh new set of intercepted codes. They couldn’t guarantee that they could break the code every day.

What they needed was a shortcut. Some phrase that they knew in advance that they could use to cut down on the number of possible combinations.

The eureka moment came when they realized that almost every message sent by the Germans ended in the exact same two words: Heil Hitler. 

This seemingly innocuous phrase was the Achilles’ heel that allowed the Enigma code to be broken. 

Solving the known phrase “Heil Hitler” allowed them to decrypt the code for the day and read everything quickly. 

The Americans were eventually let in on the project. The Americans eventually built their own bombe, which was much faster than the British one. 

Keeping the fact that they had cracked the Enigma Code a secret was difficult. They couldn’t simply act on every bit of intelligence they had or else it would give away the fact that they had cracked it. They used just enough information to make the Germans think that they had gained the information from other sources: either RADAR or spying. 

Today, there are several original Enigma machines that can be found in museums around the world and in the hands of private collectors. Enigma devices have been sold at auction for as much as US$547,500. There are even replica Enigma machines for sale. 

If you are like me, you might be curious how quickly the Enigma Code could be solved using modern computers. In 2017, an artificial intelligence program managed to crack the Enigma Code in 12 minutes in 50 seconds. To do it that fast required the use of 2000 cloud servers. 

Alan Turing today is celebrated on the 50-pound note in the UK, and the Turing Award, given out by the Association for Computing Machinery, is considered to be the Nobel Prize in computer science.

Breaking the Enigma Code was one of the most important strategic breakthroughs of the Second World War. The public wasn’t even made aware of it until the 1970s. 

But since it became public knowledge, the breaking of the Enigma code has become one of the most celebrated chapters in the history of the war, and the story has been told in books, movies, and on television. Some historians believe cracking the Enigma Code may have shortened the war by two years and saved 14 million lives. 

The work done on breaking the code didn’t just help win the war, but it helped lay the foundations for modern computing and cryptography.

It was all because a group of British and Polish code breakers managed to break a code that was considered to be unbreakable.

The Executive Producer of Everything Everywhere Daily is Charles Daniel.

The associate producers are Peter Bennett and Cameron Kieffer.

Today’s review comes from listener Lunar 1290 over on Apple Podcasts in the United States. They write:

Good job

Information is really helpful, especially at school. When I start learning it, I’m going to be the only person who knows what happened when I listen to the episodes, and I’m working my way from the bottom up???

Thanks, Lunar! You will indeed find school much easier by listening to this podcast. Just make sure not to give the other student a hard time because you are so far ahead.

Remember, if you leave a review or send me a boostagram, you too can have it read on the show.