James Grime: Enigma Machine

James Grime: Enigma Machine

How many secrets weigh 1500 pounds, cost $100m, and travel at 600 mph? Only one that we can think of. Acclaimed actor Jason Isaacs and host Alice Loxton take us inside the cockpit of Northrop Grumman’s legendary B-2 Spirit - the iconic stealth bomber that epitomized late Cold War ingenuity.
Read the transcript →

James Grime: Enigma Machine

NARRATOR: What are the forgotten tools of tradecraft? Which objects might unlock the hidden history of espionage? I’m Alice Loxton, and this is A History of the World in Spy Objects. Walk into the coding department of any startup in the world and you’re sure to meet a lot of left-brain techie types: mathematicians, programmers, engineers. But well into the 20th Century, codebreaking fell under the domain of linguistics. People who were naturally good at learning languages were typically the ones recruited to translate coded messages into intelligible information. That all changed between the two World Wars, thanks to one vastly powerful spy object, a complex, secure, seemingly unbreakable cipher machine that changed the encryption game forever.

JAMES GRIME: Enigma is one of the most famous code machines of all time. It was used by the German military in World War II to send their secret messages to each other. If the Allies can break that German code in World War II, they'll be able to read all those German secrets, which is going to be very important.

NARRATOR: With the introduction of the Enigma machine in the 1920s, cracking codes was no longer considered a matter of translation. Suddenly, codebreaking was a job for mathematicians. Which is why, to introduce this extraordinary historical object, we’ve turned to an expert who’s particularly good with numbers.

JAMES GRIME: Hi, I'm Dr. James Grime and I am a speaker of mathematics, and I go around the world and tell everyone about how codes and codebreaking work. Codebreaking is one of the most exciting uses of mathematics. So when I want to tell people about mathematics, it's one of the more exciting, exotic uses, and it touches on every aspect of maths at some point.

NARRATOR: Years ago, Cambridge University tasked James with running an initiative called the Enigma Project. James would go out on the road with a borrowed Enigma machine to illustrate the practical importance of learning mathematics. A decade on, he’s still quite often found with an Enigma by his side: an unassuming brown wooden box that opens up to reveal something that looks a bit like an old-fashioned typewriter.

JAMES GRIME: So it has a keyboard, first of all, where you can type your messages. And then above the keyboard where you would normally have the paper and the carriage of a typewriter, there is another set of letters. And that's where your code letters light up. So that's lighting up instead of printing on paper. 

NARRATOR: Well, part typewriter, part Wurlitzer organ. 

JAMES GRIME: And then above that second set of letters are three wheels at the top of the machine. And those three wheels move as you type, and that's making your code for you.

NARRATOR: Inside the Enigma machine is a battery and a web of simple circuitry. With each press of a key, a new circuit is formed, and a new letter lights up - meaning, a new piece of code is generated.

JAMES GRIME: So if I press A, then the letter K might light up on the code machine. Well, that just means that A is connected to K, so K lights up. Now, when I press the button again, the rotors will move one place forward. So when I press it again, a different code letter will light up this time. The wiring turns forward one place and the battery gets connected to a different light, and you get a different code letter each time. 

NARRATOR: So, press A and you might get the letter K or the letter G or the letter X. It’ll be different every time, because there are so many possibilities and so many different ways to set the machine, which the Germans did, during World War II, every morning.

JAMES GRIME: There are three wheels inside the Enigma machine. You actually had a box of five to pick from. So you're picking three wheels from a choice of five. You put those into the machine. Each wheel has 26 starting positions. And at the front of the machine, is something called the plug board. So the plug board is like an old-fashioned telephone switchboard, if you've ever seen one. And so we have 10 wires at the front of the machine, and if you move the position of those wires, that changes the code as well. 

NARRATOR: Alright, James. Crunch the numbers for us.

JAMES GRIME: Altogether, the total number of ways of setting up the Enigma is 158 million, million, million possibilities. By which I mean it's 158 with another 18 zeros after it. That's more possibilities than there are grains of sand on Earth. It's a ridiculous number. Far too many to check.

NARRATOR: That’s the genius of the Enigma - seemingly infinite possibilities, and no discernible pattern. That’s what made the code nearly impossible to crack. But the Enigma only remained enigmatic for so long.

JAMES GRIME: Strangely, Enigma is so famous because it was broken.

NARRATOR: Long before World War II even started, Poland had been chipping away at coded German communication. And - way before a certain English codebreaker ever got his hands on the puzzle - Polish mathematician Marian Rejewski cracked the Enigma code back in 1932. He did so by finding and exploiting a procedural flaw in the way the Germans were transmitting their messages. Five weeks before the country was invaded, Poland’s codebreakers sent their findings on to the British. They, in turn, made a discovery that would prove invaluable to the Allied powers - even as the Germans continued to adjust their ways of working. It wasn’t just that there was a flaw in the procedure.

JAMES GRIME: There is a flaw in the machine. So, if I was just pressing the same letter repeatedly, like if I pressed the letter A over and over, it would keep changing the code letter. That's what makes it so clever. But there is one letter that it can't become, and it can't become itself. So an A would never become an A in the code, or B is never a B in the code. That's your clue.

NARRATOR: During the Second World War, the codebreakers at Britain’s Government Code and Cypher School, housed at Bletchley Park, honed in on this Achilles’ heel. 

JAMES GRIME: What they would try to do is guess a word or a phrase that might be in this coded Enigma message that they've intercepted. So they might try - I don't know, Heil Hitler - because they would end messages with Heil Hitler. Heil Hitler is 10 letters. Maybe near the end of the message, it says: Heil Hitler. Okay, I'm going to take 10 letters of the code, somewhere near the end. I'm going to guess it says Heil Hitler.

NARRATOR: Imagine those 10 letters written out on a piece of paper in front of you. Now imagine 10 other letters - scrambled code letters - on another piece of paper. If you slip the second line of letters beneath the first, two H’s cannot line up. Neither can two E’s or two I’s.

JAMES GRIME: I'm trying to find a position where I have no matching letters. If I find that, I'm going to guess that bit of code says Heil Hitler. And then that's when they designed these large code-breaking machines so that they could eliminate all the wrong possibilities and find the correct positions, the correct Enigma positions that make that bit of code say Heil Hitler.

NARRATOR: And who do we have to thank for those code-breaking machines? A chap you might have heard of called Alan Turing.

JAMES GRIME: He designed these large code-breaking machines called the Bombe. And these were the code-breaking machines that were used for the rest of the war. By reading these Enigma messages, we knew where the German ships were, which allowed us to get supplies across from America. Now that was a big deal because historians say that by getting our supplies across, we were able to shorten the war by two years. And that's because D-Day could happen two years earlier than otherwise.

NARRATOR: With Enigma cracked open, Bletchley Park codebreakers were able to read fully 10 percent of all German communications, a vast trove of information, with massively positive implications for the Allies. And for Dr. James Grime, the story of how the Enigma code was cracked holds great personal significance as well.

JAMES GRIME: For me, it's not often that the mathematicians get to be the hero of the story and these people saved lives. And these aren't soldiers. They're not fighting around the world like other people were. It's these mathematicians using their brains to save lives. And this is something that we can still do today. 

 NARRATOR: I’m Alice Loxton. More secrets from the archives await in A History of the World in Spy Objects. Explore them at your leisure.

Guest Bio

Dr. James Grime is a mathematician who runs the Enigma Project and travels the world giving public talks. He has a passion for the promotion of mathematics in schools and to the general public.

No items found.
No items found.