YouTube2Text

How did the Enigma Machine work? — Transcript

by Jared Owen · 3,291 words · 425 segments · language en · Watch on YouTube

Full transcript

  1. 0:01- [Jared] This is the Enigma machine.
  2. 0:03It looks like a typewriter but it has
  3. 0:05a very different purpose.
  4. 0:07During World War II it was used to keep messages secret
  5. 0:09or in other words encrypted.
  6. 0:12In this video, we'll look at why the Enigma machine exists,
  7. 0:17how it was used and then we'll take a look at the inside
  8. 0:19to see how the mechanism works.
  9. 0:22(electricity buzzes)
  10. 0:28This video is sponsored by Brilliant,
  11. 0:30a fun and interactive way to learn math and science.
  12. 0:33Towards the end of this video
  13. 0:34we'll take a closer look at their website and app.
  14. 0:39While making this video I had a lot of help
  15. 0:41from enigmamuseum.com.
  16. 0:43These guys took a part in actual enigma machine
  17. 0:45and showed me what's on the inside,
  18. 0:47behind the panels, all the inside wiring
  19. 0:50and how each mechanical piece works.
  20. 0:53This would have taken a lot longer to 3D model
  21. 0:55and animate without their help.
  22. 0:57So big thanks to enigmamuseum.com
  23. 0:59and now let's get to some animation.
  24. 1:02To really understand the Enigma machine
  25. 1:03we need to understand something called encryption.
  26. 1:06Let's use an example.
  27. 1:08Say we have two friends, Alice and Bob.
  28. 1:11Alice wants to send a message to Bob
  29. 1:13however, Alice doesn't want anyone else
  30. 1:15to be able to read this message such as Eve.
  31. 1:18Just as an example we'll keep the message really simple.
  32. 1:21Alice will need to scramble the contents of the message.
  33. 1:24This is called encryption.
  34. 1:27It looks like a bunch of random letters
  35. 1:29and if Eve gets a hold of it then she won't be able
  36. 1:31to understand it.
  37. 1:33When the message gets to Bob he needs
  38. 1:35to unscramble the message.
  39. 1:36This is called decryption.
  40. 1:38Now he can read the original message.
  41. 1:40Alice and Bob need to agree on a way
  42. 1:42to encrypt and decrypt their messages.
  43. 1:45A real simple way to do this is called a Caesar cipher.
  44. 1:48This involves shifting all the letters in the message
  45. 1:52three spaces to the right in the alphabet
  46. 1:54so an H becomes a K, an E becomes an H,
  47. 1:58an L becomes an O, an L becomes another O,
  48. 2:02and an O becomes an R.
  49. 2:05Now the message looks like gibberish,
  50. 2:07A bunch of random letters.
  51. 2:09When Bob gets the message all he has to do
  52. 2:11is take each letter and move it back three spaces.
  53. 2:15This will give him the original message
  54. 2:17so he can read it again.
  55. 2:19Now Eve in the middle, as long as she doesn't know
  56. 2:21how the messages were encrypted
  57. 2:23she won't be able to read any one of them.
  58. 2:26During war encryption is extremely important.
  59. 2:29Commanding officers need to be able to get messages out
  60. 2:32to the troops on the battlefield
  61. 2:33but they don't want the enemy to be able
  62. 2:35to understand these messages.
  63. 2:37Nowadays encryption is performed by computers
  64. 2:40but this wasn't always the case.
  65. 2:43The Enigma machine was used to encrypt and decrypt messages.
  66. 2:47You can think of this as a very sophisticated
  67. 2:49letter scrambler.
  68. 2:51It was invented in the early 1900s
  69. 2:52and then most famously, it was used
  70. 2:55by the German military in the 1930s
  71. 2:57and throughout World War II.
  72. 3:02This is the keyboard with 26 letters.
  73. 3:05And this is the lamp board which also has 26 letters
  74. 3:09but these letters can light up.
  75. 3:11Each time you press a letter on the keyboard,
  76. 3:14a letter on the lamp board lights up,
  77. 3:16but it will always be a different letter
  78. 3:18than the one that was pressed.
  79. 3:20There are usually two people involved
  80. 3:22when the machine is used, one person to type in the letters
  81. 3:24and another person to write down the letters
  82. 3:27that appear on the lamp board.
  83. 3:29Let's use our example from earlier.
  84. 3:31Type in each letter and write down the letters
  85. 3:34that appear on the lamp board.
  86. 3:36Now we have our encrypted message,
  87. 3:38the scrambled letters that nobody can read.
  88. 3:40This message is sent usually by radio using morse code.
  89. 3:44The person who receives this message also
  90. 3:46has their own Enigma machine.
  91. 3:48To decrypt the message or unscramble it
  92. 3:51they type in the letters on the keyboard
  93. 3:52and write down which letters appear
  94. 3:54on the lamp board and out comes the original message.
  95. 3:57The Enigma machine was used for both
  96. 4:00encryption and decryption.
  97. 4:03The person sending the message needs a machine
  98. 4:05and the person receiving the message
  99. 4:07also needs a machine to be able to read it again.
  100. 4:11So how does the Enigma machine know which letters
  101. 4:13to give you?
  102. 4:14Maybe you press an A and outcomes an H.
  103. 4:18How does it do that?
  104. 4:20Well, part of the answer is electricity.
  105. 4:22Let me show you a simple example.
  106. 4:25We have a battery, some wires, and then something
  107. 4:28that uses electricity in this case, a light bulb.
  108. 4:31This is called a circuit.
  109. 4:32It's a closed loop for the electricity to flow.
  110. 4:35But if there's a break in the wire,
  111. 4:37then the light bulb turns off.
  112. 4:39If we put a switch in here, now we can easily turn
  113. 4:42the light bulb on or off.
  114. 4:44There has to be a complete path for the electricity to flow.
  115. 4:48Now let's add another path, one more switch,
  116. 4:50and a light bulb.
  117. 4:51Now we can turn on two different light bulbs
  118. 4:54depending on which switch we turn on,
  119. 4:56there's a different path through the wires.
  120. 4:58We could expand this even more,
  121. 5:00more switches and more light bulbs.
  122. 5:03Now, this is predictable.
  123. 5:05We know which switch goes to which light bulb,
  124. 5:08but what if we scramble these wires?
  125. 5:11Now the switch for the letter A turns on
  126. 5:13the letter C light bulb and the C switch
  127. 5:15turns on the B light bulb.
  128. 5:18This idea of scrambling the wires,
  129. 5:21that's how the Enigma machine works.
  130. 5:24Let me show you on the real thing.
  131. 5:26The battery is inside in the top right-hand corner
  132. 5:29of the machine.
  133. 5:31The keyboard has 26 keys.
  134. 5:33When you press one of them it connects a circuit
  135. 5:36which will then turn on one of these 26 light bulbs.
  136. 5:40The light bulbs will then illuminate the letter
  137. 5:42that's directly above it on the lamp board.
  138. 5:44When you release the key, the circuit
  139. 5:46is disconnected and the light bulb turns off.
  140. 5:49Each key connects a different path
  141. 5:51which means a different light bulb.
  142. 5:53Okay, this is the challenging part of the video
  143. 5:56understanding the circuit or the path
  144. 5:58that the electricity follows throughout the Enigma machine.
  145. 6:01Maybe pause the video, get your degree
  146. 6:03in electrical engineering and then let's do this.
  147. 6:07The three main parts that we need to understand
  148. 6:09are the rotors, the keyboard mechanism, and the plugboard.
  149. 6:15Let's start up here with the rotors.
  150. 6:17This machine has three of them.
  151. 6:19This is where the letters get scrambled.
  152. 6:22Let's take a look at one of the rotors.
  153. 6:24You have the numbers one through 26 for all the letters.
  154. 6:28So one is for A, two is for B, three is for C
  155. 6:31and all the way around until 26 for Z.
  156. 6:36On the side you'll see 26 metal contact points.
  157. 6:39There are also 26 on the other side too.
  158. 6:44When you put two of these rotors together
  159. 6:46the metal contacts connect, making it possible
  160. 6:48for electricity to pass through.
  161. 6:51On the inside of these three rotors
  162. 6:52you'll find lots of wires that connects the two sides,
  163. 6:55but as you can see, it's all scrambled.
  164. 6:58So let's go through the pin for the number one.
  165. 7:01Follow the wire through and it comes out the pin
  166. 7:06for the number four.
  167. 7:08So in this case an A was changed to a D.
  168. 7:11When electricity travels through one rotor
  169. 7:14it changes the letter once.
  170. 7:15But remember, we have three of these rotors
  171. 7:18and they each have different wirings on the inside.
  172. 7:21When electricity travels through all three of them
  173. 7:24it changes the letter three times.
  174. 7:26Then at the end, we have the reflector.
  175. 7:30This also has 26 metal contacts.
  176. 7:34Inside is more wiring that connects the letters in pairs.
  177. 7:38So it goes in as one letter and then comes out
  178. 7:41as another letter.
  179. 7:44To the right of here is the input wheel.
  180. 7:46It has 26 wires that go in and connects
  181. 7:49to the 26 metal contacts.
  182. 7:53Let's put this all together.
  183. 7:54Electricity flows through one of the 26 wires,
  184. 7:57let's say the wire for the letter Y.
  185. 8:00Then it gets changed to a different letter
  186. 8:02at all three rotors.
  187. 8:04Then it hits the reflector, which again, changes the letter.
  188. 8:07And then it goes back through the rotors again
  189. 8:09which changes the letter three more times.
  190. 8:12And it comes back out on a wire that represents
  191. 8:14a completely different letter.
  192. 8:16And if you were counting, this means the letter
  193. 8:18was changed seven times.
  194. 8:21Now, this is just an example of how the letters
  195. 8:24could get scrambled, but the path can and will change.
  196. 8:30Each of these three rotors can rotate
  197. 8:31to 26 different positions.
  198. 8:34When any one of the rotors changes positions
  199. 8:35this will also change the path of electricity
  200. 8:38making it very difficult to predict which letters
  201. 8:41are going to come out.
  202. 8:45The 26 wires from the input will travel down the right side
  203. 8:48of the machine to the plugboard in the very front.
  204. 8:52Now the plugboard was yet another way
  205. 8:54that the letters could be around specifically,
  206. 8:56you could swap two letters.
  207. 8:57So let's say we wanna switch the W and the J.
  208. 9:01You could take one of these cables here
  209. 9:03with plugs at each end and put one of them into the W spot
  210. 9:07and the other one in the J spot.
  211. 9:10On the back side of the plugboard,
  212. 9:12you can see the individual wires going
  213. 9:14to the tops of each socket, and then out to the bottom
  214. 9:17of each socket.
  215. 9:19Let's take a closer look.
  216. 9:20This is the plugboard socket for the letter O.
  217. 9:23If nothing is plugged into it the electricity flows in
  218. 9:26through the top, then through the shorting bar
  219. 9:30and then out through the bottom.
  220. 9:32This means that the plugboard didn't change the letter.
  221. 9:34It came in as the letter O and then it came out
  222. 9:36as the letter O.
  223. 9:38When a plug is inserted, it pushes up the shorting bar
  224. 9:41so it doesn't connect anymore.
  225. 9:43Now the electricity flows in through the top,
  226. 9:46out through the top pin of the plug,
  227. 9:49then through the cable and out through the bottom.
  228. 9:52On the other side.
  229. 9:53What came in as an O now it comes out as an E.
  230. 9:59Often times, they would use up to 10 of these cables.
  231. 10:03Notice how a few of these letters are still left
  232. 10:05without a plug.
  233. 10:09Let's take a look at the keyboard mechanism.
  234. 10:11Each of these keys is connected to a long stem beneath it.
  235. 10:15They have springs that push them back up
  236. 10:17when you release the key.
  237. 10:19the last row of keys have the springs connected at the top.
  238. 10:23Right next to all of these keys
  239. 10:25most of the space is taken up.
  240. 10:27These are the 26 key switches.
  241. 10:30These switches are a little bit more complex
  242. 10:32than just the on-off switches that we saw earlier.
  243. 10:35Let's take a look at just one of the switches.
  244. 10:37This one is for the letter P.
  245. 10:39The switch has three different copper colored tabs.
  246. 10:42The wires are connected back here,
  247. 10:45and the flow of electricity is controlled
  248. 10:47from the other end.
  249. 10:49When a key is pressed it comes down
  250. 10:51and hits the rubber end of the middle tab.
  251. 10:53What this does is changes where the electricity can flow.
  252. 10:57Before a key is pressed the top two tabs are connected,
  253. 11:00and after the key is pressed, the bottom
  254. 11:03two tabs are connected.
  255. 11:06There are 26 key switches and here's all the wires
  256. 11:11that are connected to them.
  257. 11:13The top tabs are connected to the light bulbs.
  258. 11:16The wires go to the left and up to the corresponding
  259. 11:1926 light bulbs.
  260. 11:24The middle tabs connect to the plugboard.
  261. 11:27They go through the wires to the right side of the machine
  262. 11:30and down to the corresponding letters on the plugboard.
  263. 11:35A wire from the battery goes directly
  264. 11:37into the bottom tabs of each key switch.
  265. 11:42So each switch has three different tabs
  266. 11:44and three different places where they are connected to.
  267. 11:49Before a key is pressed the bottom tab
  268. 11:51isn't connected to anything so the electricity
  269. 11:53has nowhere to go.
  270. 11:55This is true for all 26 key switches.
  271. 11:59No circuit, which means all the light bulbs are off.
  272. 12:03Now let's say we press the X key.
  273. 12:07The battery and the plugboard are now connected.
  274. 12:09This completes a circuit but it's not as simple
  275. 12:12as this circuit we saw earlier.
  276. 12:15Let me show you a quick overview of the path of electricity.
  277. 12:18Don't worry if you can't keep up quite yet,
  278. 12:20we're gonna go over each part one by one.
  279. 12:23(mellow music)
  280. 12:28Let's take a closer look at each step.
  281. 12:31Electricity flows from the battery to the bottom
  282. 12:34and then middle tab on the switch for the letter X.
  283. 12:38Then it goes directly to the plugboard.
  284. 12:42And in this case there's nothing plugged in
  285. 12:44for the letter X so it comes back out as the letter X,
  286. 12:47up the side and into the input wheel.
  287. 12:50Then through three rotors, the reflector,
  288. 12:53and then back through the rotors again,
  289. 12:55changing letters at each step of the way.
  290. 12:58What started as the letter X is now the letter K.
  291. 13:03Now we come back to the plugboard for the second time.
  292. 13:06The letter K is swapped with a C.
  293. 13:10So in through the letter K, through the cord,
  294. 13:14and then out for the letter C.
  295. 13:17Then travels from the plugboard back
  296. 13:19to the middle tab on the letter C key switch.
  297. 13:22Remember we started as the letter X
  298. 13:25but then came back in as the letter C.
  299. 13:29Then it goes out the wire of the top tab
  300. 13:31and up to the letter C light bulb.
  301. 13:36Then the current flows through the metal light bulb plate
  302. 13:39to this tiny wire which connects back to the battery.
  303. 13:43This completes our circuit.
  304. 13:45As soon as the key is released no more circuit
  305. 13:48and the light bulb turns off.
  306. 13:50So just to recap, once a key is pressed
  307. 13:53electricity goes from the battery
  308. 13:55to whichever key switch was pressed.
  309. 13:58Then the plugboard, rotors, then back to the plugboard,
  310. 14:02then the key switch for our new scrambled letter,
  311. 14:05then the corresponding light bulb
  312. 14:08and then back to the battery.
  313. 14:10The letter has changed seven times at the rotors,
  314. 14:14and then possibly two more times at the plugboard.
  315. 14:20Remember that the letter isn't always changed
  316. 14:23when it goes to the plugboard.
  317. 14:28Okay, the electric circuit was the hard part of the video.
  318. 14:31If you made it this far, we're doing good,
  319. 14:33but there's a little bit more that I wanna show you.
  320. 14:38Each time a key is pressed you'll notice that at least one
  321. 14:40of these three rotors will turn.
  322. 14:43Press a key rotor turns, press a key rotor turns.
  323. 14:48This means that if you press a key twice
  324. 14:49you'll get two different letters.
  325. 14:52In fact, if you keep pressing the same letter
  326. 14:55a different light turns on every time.
  327. 14:58This is what made Enigma so powerful.
  328. 15:00The code was always changing so it was hard to predict
  329. 15:02which letters were going to come out.
  330. 15:05The way these rotor spin is completely mechanical.
  331. 15:07No electricity needed for this.
  332. 15:09Even if the battery was taken out,
  333. 15:11pressing one of these keys would still turn the rotor.
  334. 15:14On the bottom of the machine is a large metal plate
  335. 15:17called the actuator bar.
  336. 15:19It works like a seesaw or a teeter-totter.
  337. 15:23Pressing any of the keys pushes it down on this side,
  338. 15:26which pushes it up on the other side.
  339. 15:29Around the backside is where the magic happens.
  340. 15:34This uses a ratchet and pawl mechanism.
  341. 15:38This is the ratchet gear.
  342. 15:40And this small piece is the pawl.
  343. 15:43When the pawl is pushed up it spins the rotor
  344. 15:46and then comes back down.
  345. 15:48You can see how this would spin it in only one direction.
  346. 15:51This up and down motion will keep spinning the rotors
  347. 15:54one slot each time.
  348. 15:56The next two rotors work a little different.
  349. 15:58Let's take a look at the second one.
  350. 16:00Most of the time the pawl can't make contact
  351. 16:02with the ratchet gear teeth.
  352. 16:04It's blocked by an edge around here on the first rotor.
  353. 16:07The first rotor has a tiny notch around the side here.
  354. 16:12When the rotor spins the notch travels around the edge.
  355. 16:15Watch what happens when it comes up again
  356. 16:17on the other side.
  357. 16:19The pawl will fit right into the notch
  358. 16:21and the second rotor is allowed to spin, but just once.
  359. 16:24The next time it will be blocked again
  360. 16:26and only the first rotor is allowed to spin.
  361. 16:29That edge on the first rotor has to go all the way
  362. 16:32around before the second rotor is allowed to spin again.
  363. 16:35This will happen once every 26 key presses.
  364. 16:38The same thing with the third rotor.
  365. 16:40There's another edge on the second rotor
  366. 16:42that has to go all the way around
  367. 16:43before the third one is allowed to spin.
  368. 16:46Last but not least we have the three levers
  369. 16:50on the very back with index wheels at the very end.
  370. 16:54They ride along the outside of the rotor gear teeth.
  371. 16:57This means that the rotors always stop spinning
  372. 16:59at the next number.
  373. 17:00This is important so that the electrical contacts
  374. 17:02always line up between the rotors.
  375. 17:07Before you use the Enigma machine,
  376. 17:09it would need to be configured with the right settings.
  377. 17:12There are four of these settings to go through.
  378. 17:16First is the rotor order.
  379. 17:18Each Enigma machine came with a set of five rotors.
  380. 17:21Choose three of them and then choose which order
  381. 17:25to put them in.
  382. 17:27Then there's the ring setting for each rotor
  383. 17:29which is basically the shifting of these number wheels
  384. 17:32but that also includes the notch on the side.
  385. 17:37This means this will change when the leftmost rotors
  386. 17:40can be advanced to the next number.
  387. 17:42Then there's the starting position for each rotor.
  388. 17:45You can set this to the tiny windows up here.
  389. 17:50And the final setting is the configuration
  390. 17:52of the plugboard at the very front.
  391. 17:56So everyone in the German army had these settings
  392. 17:59in advance.
  393. 18:00They were distributed out by paper
  394. 18:01so they would know which settings to use
  395. 18:03on which day of the month.
  396. 18:05Even if the opposing side has their own Enigma machine,
  397. 18:08they won't be able to read the messages
  398. 18:10unless they know the settings that were in use that day.
  399. 18:14Some of the ideas behind the Enigma machine
  400. 18:16are complex and sometimes difficult to understand.
  401. 18:19However, it may come easier to those
  402. 18:21that increase their ability to do math and science.
  403. 18:25brilliant.org is a problem solving website
  404. 18:27and app that has over 60 courses in mathematics,
  405. 18:30science and computer science.
  406. 18:33The idea here is to learn by doing.
  407. 18:35They teach you a concept and then immediately you get to try
  408. 18:38it out in a fun and engaging way.
  409. 18:41You can use Brilliant to help you as a student in school
  410. 18:43or as a professional or anyone who wants
  411. 18:46to keep their skills sharp.
  412. 18:48There's a wide range of content
  413. 18:49and they're even adding new courses from time to time.
  414. 18:52Instead of just learning a formula and blindly plugging
  415. 18:55in the numbers, you get to visually see why
  416. 18:57that formula works.
  417. 18:59There's nothing quite so satisfying
  418. 19:01as when that light bulb goes off in your brain.
  419. 19:04I like Brilliant because it shows
  420. 19:05that learning can and should be fun.
  421. 19:08You can sign up for free by going
  422. 19:09to brilliant.org/jaredowen.
  423. 19:11Also the first 200 people will get 20% off
  424. 19:14their annual premium membership.
  425. 19:16(mellow music)

About this transcript

This page contains the full transcript of How did the Enigma Machine work? by Jared Owen, generated from the public captions YouTube serves with the video. The transcript has 3,291 words across 425 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.