VeritasiumYouTube

The Insane Real Engineering of the Nazi Enigma Machine

47:34English180 segments8,340 words · 42 min read

Search inside any video

SavedThat transcribes your saved videos and lets you search across all of them instantly. Save this video and find any moment.

TL;DR

This video explores the workings of the Nazi Enigma machine and the efforts of British intelligence to decrypt its messages during World War II.

Nazi Enigma machineWorld War II encryptionBritish intelligence codebreakingBletchley Park operationsAlan Turing contributionsGerman military encryption methodsEnigma machine mechanicsdecrypting Enigma messages

Chapters

  1. 0:00Introduction to the Enigma Machine
    01
  2. 1:00How Encryption Works with Enigma
    02
  3. 2:00The Complexity of Decrypting Messages
    03
  4. 3:00The Role of British Intelligence
    04
  5. 4:00Bletchley Park's Codebreaking Efforts
    05
  6. 5:00The Mechanics of the Enigma Machine
    06
  7. 6:00Daily Key Settings and Their Importance
    07
  8. 7:00Conclusion and Impact on the War
    08

Transcript

0:00

This is the Enigma, the encryption machine used by the Nazis in World War two. I see that there is a sigil from the Nazi Party on this one, so it must be the real thing. Yes. This was used by the Germans in World War II. Someone asked me the other day, did Hitler use this machine? And I said, I don't know, but Benedict Cumberbatch and Keira Knightley did.

0:16

And I said, I don't know, but Benedict Cumberbatch and Keira Knightley did. Woah, no way! Could we try encrypting a word? Yeah. - I have just a word for us. You'd never guess what it is. - So that's our plaintext. That is our plaintext. So we need to press the keys. And look at the lamps that light up, which will give us our ciphertext.

0:31

And look at the lamps that light up, which will give us our ciphertext. So the first one is V. We have a J. Okay. Then an E. - F - Then an R. We have an M. That is an L.

0:46

That is an L. Now for someone to decrypt this message they need to type this text into another Enigma machine. But not just any enigma. Their machine has to be set up in the exact same way as the one that encrypted the message. So we need to turn these rotors back to the initial setting.

1:01

So we need to turn these rotors back to the initial setting. That means adjusting a series of rotors and wires to exactly one of trillions of possible combinations. If you get it right.... Finally, the L gives us: - Veritasium It worked. Yeah. The message appears, but if just a single setting

1:15

It worked. Yeah. The message appears, but if just a single setting is out of place, well, then the encryption remains unbroken. I can see how decrypting such a thing would get very complicated very quickly. This is exactly what the Nazis relied on. Hitler had come into power in Germany and the Nazi Party had taken over.

1:30

Hitler had come into power in Germany and the Nazi Party had taken over. Today we rule Germany. Tomorrow the world. By 1939, they were sending hundreds of encrypted messages across Europe every day. With the allies desperately trying to guess the Enigma settings.

1:45

With the allies desperately trying to guess the Enigma settings. But even if they sometimes got lucky and cracked a message each day at midnight, the Germans would change the settings on all their Enigma machines, so none of it would help them read the next day's messages. That's why British intelligence assembled a team of the country's greatest minds:

2:01

That's why British intelligence assembled a team of the country's greatest minds: chess players, crossword fanatics and university academics including Alan Turing, along with hundreds of women from the Royal Navy. And bit by bit, they looked for flaws hidden deep within the machine. But they also searched for subtle mistakes made by German operators.

2:18

But they also searched for subtle mistakes made by German operators. At its peak, around 9000 men and women were executing the most secret code breaking operations in the world. Out of an unsuspecting mansion in the English countryside. This is a video about the incredible methods and machines that broke the enigma.

2:31

This is a video about the incredible methods and machines that broke the enigma. Let's start with how the Enigma works. And I think the first thing you need to know about the Enigma is that it wasn't invented by the Nazis. It was patented in 1918 by a guy called Arthur Scherbius. He was a German inventor who wanted to encrypt messages

2:49

He was a German inventor who wanted to encrypt messages for banks and businesses. Were Enigma machines readily available? Could you, like, buy one in Germany, or were they kept a secret anyways? This, by the way, is Sir Dermot Turing. He's Alan Turing's nephew. The company that was making Enigma machines was really trying to find a market for them,

3:04

The company that was making Enigma machines was really trying to find a market for them, so you could definitely go out and buy them. And lots of countries did. So Poland bought one, the British bought one, the Russians bought one, you name it. And there's one thing in particular that made Enigma superior to other encryption methods. And you only need to play around

3:21

to other encryption methods. And you only need to play around with it for a bit to figure that out. I'm going to press the L key. And when I do that, you'll see that one of the lamps on the lamp board lights up. The Y. That means that the plaintext letter L

3:36

That means that the plaintext letter L has been encrypted as a Y. If I press the L again, what do you think might light up? Maybe the Y again? - Maybe the Y. So let's press it again and see what happens. And what has lit up there. Well that's an H not a Y.

3:51

And what has lit up there. Well that's an H not a Y. So it's not a Y. So it's changed. Okay, so with every key press the substitution is different. - Yes. This is what separates the enigma from the most famous encryption methods that came before, the Caesar cipher or simple substitution ciphers.

4:05

that came before, the Caesar cipher or simple substitution ciphers. These all encrypt according to a fixed rule. Enigma changes that rule with every single letter you type. And for the reason for that, we need to open the box even further and see what's happening inside. Yeah, that'd be great. Okay, so I'm going to open this up.

4:22

Yeah, that'd be great. Okay, so I'm going to open this up. Inside the Enigma there are three rotors. Each rotor has 26 metal contacts on either side, one for each letter of the alphabet. So when you slot them into the machine, current flows from one rotor to the next, the wiring between the contacts is totally scrambled.

4:38

the wiring between the contacts is totally scrambled. So for example, when you type a Y current flows down the Y wire to the first rotor, where it first gets switched to an H, and then in the second rotor, the H gets swapped to a B, and in the third rotor the B gets swapped to a q. Then a component called the reflector directs

4:55

Then a component called the reflector directs the current back through the rotors by a completely different path, ending up as a letter E. The current then goes up to the lamps above the keyboard and illuminates the letter E, indicating how the Y has been enciphered. I just want to say a big thanks to Jared Owen, who made the 3D model of the Enigma for his YouTube

5:10

I just want to say a big thanks to Jared Owen, who made the 3D model of the Enigma for his YouTube channel and has kindly let us use it here. So check out the link in the description for his original video. Now, the moment you type a letter into the Enigma, the rotor on the right rotates. And that's how a rotor encryption machine works,

5:25

And that's how a rotor encryption machine works, that it moves the rotor when you press the keys. So if you type the same letter again, it will follow a completely different path through the machine, which means you'll get a different letter each time you press the key. So here you can see the rotors in position. Yes.

5:43

So here you can see the rotors in position. Yes. And when I press the key you can at the back see levers which push up against the rotors. Could you press the button? , I see. There we go. There's three levers. And they are set to the right hand

5:57

There's three levers. And they are set to the right hand side of each rotor. So there's one for each rotor trying to push the three rotors around. But it's only the first rotor that turns every time you press a key. Right. Yeah. The second rotor will only turn when the first rotor

6:11

Right. Yeah. The second rotor will only turn when the first rotor reaches a certain position. There's a notch that's connected to the ring. That notch will allow the lever at the back to drop. And then connect with the ratchet on the next rotor along.

6:25

And then connect with the ratchet on the next rotor along. So this rotor turns until the notch comes into the turnover position. When it does so that allows the second lever to drop in and engage with the ratchet on the second rotor, which will then allow the second rotor to turn.

6:42

which will then allow the second rotor to turn. You'll see as the rotors turn the second rotor turned at the same time. So after 26 rotations of the first rotor, the second one turns once. - Yes. And then after 26 rotations of the second rotor, the third one turns once? - Yes. Absolutely.

6:59

the third one turns once? - Yes. Absolutely. Yes. So the third one turns very rarely. Yes. Okay. The operator can slot the three rotors into the machine in any order. That's three times two times one equals six possible permutations. Then there's the starting position of each rotor, which is shown in the window

7:14

Then there's the starting position of each rotor, which is shown in the window before the operator starts typing. This is called the window setting. There are 26 numbers on each rotor, so that's 26 cubed possibilities. Multiply that by six possible rotor orders. And that's over 100,000 ways to set up this commercial Enigma machine.

7:28

And that's over 100,000 ways to set up this commercial Enigma machine. But what the Germans did was they not only bought them, but they said we're going to modify them. We're going to modify them in a way that nobody else knows what we've done. There were a few ways that they did this. So if I undo this clasp here,

7:45

So if I undo this clasp here, I can turn the ring round. And that changes the relationship between the letter that appears at the top and the fixed wiring of the rotor. I see. So rotating the ring does two things.

7:59

I see. So rotating the ring does two things. First, it offsets the letters from the rotors internal wiring for example at first this rotor connects 1 to 4. So it changes A to D. But rotate the ring by one. And that same wire now connects 2 to 5. So it changes B to E instead.

8:15

So it changes B to E instead. And second it changes the position where turnover occurs on the adjacent ring. But there was another vastly more complex upgrade. There is another part of the machine that we haven't looked at yet, and this was a part of the machine that was added by the German military.

8:32

of the machine that was added by the German military. It's called the plug board. Each of the keys is connected by a wire to the plug board. So the plug board has a letter for each of the keys, because it means that you can substitute the letter, say the first one we have here,

8:48

substitute the letter, say the first one we have here, which is Q and that's plugged into R. The Q coming from the keyboard will go into the entry wheel into the first rotor as an R,

9:03

into the first rotor as an R, but if there's nothing plugged in it will carry straight through. Now let's consider how this impacts the number of ways messages can be encrypted. This is also known as the key space. The revolvable rings change the position where the second two rings would turn over. So that's 26 squared possibilities.

9:21

So that's 26 squared possibilities. And then on the plug board, if you swapped just one pair of letters, that would introduce 325 more possibilities. But in the late 1930s, the Nazis typically swapped around six letters. And that's 100 billion possibilities.

9:36

And that's 100 billion possibilities. Overall that brings the grand total for the key space to over seven times ten to the power of 18. But as long as the machine is set up exactly how it was at the start of the encryption, you can type in the ciphertext and get out the original message intact.

9:53

and get out the original message intact. This is also called the plain text. If both machines are in the correct settings and I press an E, it will encode to a k going through the complicated set of wires. But if I press the K under the same settings, it'll go back to an E. So it's like a closed loop of electricity.

10:10

So it's like a closed loop of electricity. So we have a k. , it seems to be working! E. The way the Germans ensured that all enigmas on a particular network were set up in the same way was by sending out prearranged instructions for each day of the month.

10:27

prearranged instructions for each day of the month. These were called the key sheets. So each morning when the operator sent their first message, they would reconfigure their machine to the new daily settings, and that would allow them to encrypt and decrypt messages to other Enigma operators. But what if you didn't have the key sheets?

10:45

But what if you didn't have the key sheets? Well, then you would have to figure it out from scratch. By the end of the 1930s this problem had become urgent. As Nazi Germany grew more powerful, British intelligence could sense that war was becoming increasingly likely, and they knew that Enigma messages could reveal what German forces were planning,

11:03

that Enigma messages could reveal what German forces were planning, but only if the messages could be deciphered in time. So British intelligence assembled a secret workforce focused on doing just that. We're at Bletchley Park. This was Britain's most important codebreaking operation

11:17

This was Britain's most important codebreaking operation during World War Two. Bletchley was an unremarkable town, but it was situated conveniently between London and the country's two most prestigious universities, Oxford and Cambridge, which is where the British intelligence sought their new recruits. And alongside these academics, Bletchley Park

11:32

British intelligence sought their new recruits. And alongside these academics, Bletchley Park also recruited women from the Royal Navy known as Wrens, and the whole operation was kept as secret as possible. To give you an idea of the secrecy, here is something that the code breakers at Bletchley Park had to follow.

11:47

that the code breakers at Bletchley Park had to follow. Some of the rules: do not talk at meals or in transport or traveling. Do not talk by your own fireside. Be careful even in your own hut. All in all, seems like a very secretive place to work. Together this group of around 150 people started trying to break the enigma.

12:07

And here was their plan. First listening stations would intercept German radio messages and send them to Bletchley Park. Second, codebreakers would analyze the day's traffic, looking for patterns and weaknesses in the encryption. And third, they would use those clues to try and guess the settings, and then they would put those settings

12:21

they would use those clues to try and guess the settings, and then they would put those settings into their own enigmas, finally cracking the messages. But all this rested on one key component the British needed a working version of the Nazi Enigma machine to figure out the settings, but they didn't have one. See, on top of adding revolving rings and the plug board.

12:38

See, on top of adding revolving rings and the plug board. The Nazis had made another upgrade. They had also changed the wiring inside each rotor. That meant the Nazi rotors scrambled the letters in a completely different way from the commercial Enigma, and without knowing the wiring of the Nazi rotors, it was impossible to determine the settings the Nazis were using each day.

12:56

to determine the settings the Nazis were using each day. So the codebreakers were stuck. So it was completely hopeless. And that was the situation at the beginning of July 1939. They really hadn't made any progress at all. But what the British and the Germans didn't know was that years earlier, another country

13:09

But what the British and the Germans didn't know was that years earlier, another country had already launched a secret effort to break Enigma. In 1931, an employee at the German Armies cipher office made contact with French intelligence, offering to sell secrets about the Enigma in exchange for a handsome fee.

13:25

to sell secrets about the Enigma in exchange for a handsome fee. He handed over operating procedures, sample messages, and even key sheets. Now, the French didn't know what to do with them, so they shared them with their Polish allies, and the Polish gave the sheets to their codebreaking team of mathematicians, who spotted a vulnerability.

13:40

team of mathematicians, who spotted a vulnerability. After an officer set up his enigma for the day. He had to choose three random letters before sending a message, for example GEX. Then he would transmit these three letters, encrypted on the day's default settings, and he'd do it twice, just in case of a bad signal.

13:55

default settings, and he'd do it twice, just in case of a bad signal. For example, the encrypted letters would come out as ASDEIW. After that, he would move his rotors such that these same three letters GEX would appear in his window up here. These were the so-called window settings. And finally he would be able to type out the rest of the message.

Keep reading - 126 more segments

Sign in free to read the full transcript, save this video, and search inside everything you save.

Sign in to continue reading

Prefer the original? Watch the video

Are you the creator or rights holder of this video? Request removal of this transcript.

Related Transcripts

Never lose a moment again

Save videos from YouTube, Instagram, and TikTok. Search everything that was said, and jump to the second.

Start Saving Videos - It's Free