Speaker 1: Get in touch with technology with tech Stuff from how
Speaker 1: stuff Works dot Com. Hey there, and welcome to tech Stuff.
Speaker 1: I'm your host, Jonathan Strickland. I'm an executive producer with
Speaker 1: How Stuff Works in love all things tech, and today
Speaker 1: is a Friday. We gotta get down on Friday. As
Speaker 1: Rebecca Black would say. But this is not an episode
Speaker 1: about Rebecca Black, who I would argue is an Enigma. Instead,
Speaker 1: this is an episode about the Enigma, the Enigma coding machine,
Speaker 1: and we originally published this classic episode on October nineteenth,
Speaker 1: two thousand eleven. Chris Poulette and I talked about the
Speaker 1: Enigma machine, what it was, and what it took to
Speaker 1: break the code. I hope you enjoy, and I'll talk
Speaker 1: to you again in just a moment. Today we're gonna
Speaker 1: talk about um, something that actually came to mind when
Speaker 1: during the process of recording our episode on quantum computers
Speaker 1: sort of led to a discussion of quantum cryptography and
Speaker 1: cryptography is something that actually fascinates probably just about all
Speaker 1: of how stuff works dot Com considering um, and it
Speaker 1: also comes to play it touches on another podcast topic
Speaker 1: that we tackled months and months ago. Mr Turing Oh Yes,
Speaker 1: Alan Touring is gonna come up in this very important
Speaker 1: in this discussion as well. We're talking about the specifically
Speaker 1: the Enigma machine, which was a cipher machine used by
Speaker 1: Germany during World War Two. Yeah. The funny thing is, UM,
Speaker 1: if you've watched any history or read any history about
Speaker 1: World War two and uh specifically the war between Germany
Speaker 1: and the Allies, UM, you have a sense of what
Speaker 1: this machine meant to the German war effort. But the
Speaker 1: thing is, what I don't think comes across in a
Speaker 1: lot of those um discussions is that there's no one
Speaker 1: Enigma machine, and it certainly wasn't unknown to the world
Speaker 1: before that because the the Enigma goes back years before
Speaker 1: the start of World War Two. It was actually a
Speaker 1: commercial machine used to encrypt messages. And in fact, because
Speaker 1: it was a commercial machine, it gave some people a
Speaker 1: leg up on on figuring out how to crack the
Speaker 1: code because it was generally considered to be a practically
Speaker 1: uncrackable code if you were to follow the most careful
Speaker 1: security procedures possible. And we'll get into why that is.
Speaker 1: But before, I think, before we jump into what the
Speaker 1: machine did and what how it did it, we need
Speaker 1: to talk a little bit just about cipher's in general. Please. Alright,
Speaker 1: So a cipher really, and in this case, we're talking
Speaker 1: about creating a coded message, and uh, there are different
Speaker 1: ways of doing this, lots of different ways. You can
Speaker 1: create a new alphabet, you can try and hide things
Speaker 1: and images. That's called agraphy right where. What you can
Speaker 1: also do it is hide messages within a file, like
Speaker 1: like the code for a file. So I could send
Speaker 1: a seemingly harmless file to Chris, but if you were
Speaker 1: to actually look into the code of that file, hidden there,
Speaker 1: not displayed in any form of executable function, might be
Speaker 1: a message. So there are lots of different ways of
Speaker 1: getting secret messages across, but a very common one is
Speaker 1: using a cipher where you replace one letter of the
Speaker 1: alphabet with another. All right, So the very basic version
Speaker 1: of that is a mono alphabetic substitution cipher. In height,
Speaker 1: it means you're using just the one alphabet and that
Speaker 1: one letter is always going to represent another letter always
Speaker 1: in that cipher. Oh yeah, my friends and I used
Speaker 1: to do this back in grade school. Yeah, you know
Speaker 1: we we would say, okay, so every letter, you know,
Speaker 1: the letter A is represented by the letter D, and
Speaker 1: it just goes down the alphabet like that. You've just
Speaker 1: shifted the alphabet to the to the right a couple
Speaker 1: of places, sure like that, and then you just go
Speaker 1: from there. And so in order to to decode this,
Speaker 1: if you're not just trying to crack it, I mean,
Speaker 1: if you're actually coding it, like you're the person who
Speaker 1: is supposed to receive this message, you would need to
Speaker 1: know which letter you know, how far over did the
Speaker 1: alphabet shift, right, So if if A is B and
Speaker 1: bs C and C is D, then you know, all right,
Speaker 1: well it's a. It shifted one place, and so I
Speaker 1: know to shift all these letters back a spot so
Speaker 1: that I can decode this. All right, that's your very
Speaker 1: basic mono alphabetic substitution. Now those are easy to crack.
Speaker 1: It's easy for anyone to crack, yes, all right, as
Speaker 1: long as you know some basic u rules and and
Speaker 1: tendencies in your native language, you can crack these. For example,
Speaker 1: you can start looking for two letters that are like
Speaker 1: letters that are are doubled up. You start looking at those,
Speaker 1: and then you think, okay, which letters in the English
Speaker 1: language are the most frequently paired together, Like two T
Speaker 1: s would be an example. Oh, two teas happen a lot,
Speaker 1: so that that letter there could represent a T. Let
Speaker 1: me see if that starts to fit other things. You
Speaker 1: look for patterns, and you find these patterns, and you
Speaker 1: can decode things. You can make this a little more difficult,
Speaker 1: actually a lot more difficult, depending on how sophisticated you
Speaker 1: get using a polyalphabetic substitution. All right, so there's this
Speaker 1: one kind of cipher called a Vignier cipher. Uh, this
Speaker 1: is a little more complex now and a Vineer cipher.
Speaker 1: You've got a grid. It's twenty six boxes across in
Speaker 1: twenty six boxes tall. All right. On that top level
Speaker 1: of the grid, you have the alphabet spelled out normally A, B, C,
Speaker 1: D all the way to Z, and then on the
Speaker 1: next one you shift that letter over once, so now
Speaker 1: it's B through A. So the last the last one
Speaker 1: is gonna be A. And then you go the next
Speaker 1: lay up level down you shift it over against. Now
Speaker 1: it's C through B and you do this all the
Speaker 1: way down until you get to Z to A at
Speaker 1: the very bottom, all right, or not zo a zero
Speaker 1: of zo y um. I'm sitting here, I'm I'm mixing
Speaker 1: myself up now the way Vinnier cipher's because you would
Speaker 1: have a key phrase or keyword. Okay, so it's something
Speaker 1: that you and the person you're writing to have both
Speaker 1: agreed upon in advance. So let's say that, for for
Speaker 1: Chris and I, would we sit there and we decay
Speaker 1: text stuff is our key phrase. You would look at
Speaker 1: your grid and you would go down that first column.
Speaker 1: You go all the way down to the T column,
Speaker 1: the column that starts the alphabet begins with the letter T.
Speaker 1: And then let's say that my first word is to
Speaker 1: Chris is going to be uh, howdy. I then look
Speaker 1: across the top of that grid for the H on
Speaker 1: the very top row. All right, So I've got my
Speaker 1: finger on the t row based on the first column,
Speaker 1: and I'm looking at the H column in the top row,
Speaker 1: and I find the intersection of those two so where
Speaker 1: the t row and the H column meet, and then
Speaker 1: that let represents H. And then for oh, I go
Speaker 1: because my key phrases tech stuff, I go to the
Speaker 1: E column or E row on the first column. So
Speaker 1: I look at that first column, which is again in
Speaker 1: alphabetical order, so it's A B, C, D E. So
Speaker 1: I go to the E row, and then I look
Speaker 1: for the O in the top row, and I find
Speaker 1: the intersection of those, uh, the column of O and
Speaker 1: the row of E and that and that becomes my
Speaker 1: Oh so Chris, because he knows that the key phrases
Speaker 1: tech stuff, he knows which road to look at, and
Speaker 1: then he looks at the encoded letter. He finds that
Speaker 1: in the in within that row, looks up to see
Speaker 1: what column it is, and that's the letter it it
Speaker 1: decodes into. Now this might sound really complex. That's kind
Speaker 1: of the point. Well, you don't want the enemy to
Speaker 1: decipher your code, because then it will learn what you're
Speaker 1: up to, and the element of surprise is lost. So
Speaker 1: this um this method becomes less useful if you are
Speaker 1: starting to encode longer and longer messages, because that increases
Speaker 1: the chance that the enemy or someone who is not
Speaker 1: meant to read the code can figure out your key
Speaker 1: phrase or keyword. And if they figure out that keyword,
Speaker 1: then they've unlocked everything. That's all they need. They just
Speaker 1: need to create a vinyer cipher graph or chart and
Speaker 1: then use that key phrase to decode what you've said. Now,
Speaker 1: the enigment machine takes and a similar approach to the
Speaker 1: Vignier cipher and complicates it on a massive scale and
Speaker 1: also automates it. Yeah, because um, you know with any
Speaker 1: of these codes that the key, uh is probably the
Speaker 1: most important part. Um. If you intercept a coded transmission
Speaker 1: and you have no idea how it has been enciphered,
Speaker 1: it's going to take you much longer should try to
Speaker 1: break that code. Um. Whereas if somebody on the other
Speaker 1: end has the key to it, they'll be able to
Speaker 1: decipher it in no time or a little bit more
Speaker 1: than no time. Um. So that's that's one of the
Speaker 1: tricky parts, is I mean you can uh you know,
Speaker 1: during wor War two, they were there were all kinds
Speaker 1: of different ways to send messages, including things like one
Speaker 1: time pads, which is a a pad used of paper
Speaker 1: used with a particular code this is the one for
Speaker 1: this message. And uh. This would be used out in
Speaker 1: the field by agents who couldn't carry something like a
Speaker 1: rotor machine like the Enigma with them. Uh you know.
Speaker 1: And the thing is if the if you lose, if
Speaker 1: the person on the other end loses the key for
Speaker 1: that particular pad, um, it's just gonna take forever. But
Speaker 1: the Enigma was a way to to automate this UM.
Speaker 1: This process, and this machine, which was first patented N
Speaker 1: ended up being pivotal UH in World War Two, both
Speaker 1: for the Germans and well act really the the axis
Speaker 1: because they did have a Japanese version that they used, UM,
Speaker 1: but also for the Allies when they were able to
Speaker 1: figure out how the machine worked, and because it does
Speaker 1: have its own flaws. UM. So let's let's talk about
Speaker 1: what was in an Enigma machine and what it looked
Speaker 1: like and and how it encoded letters UM. Each of
Speaker 1: the machines, going back to the very first one, the
Speaker 1: Enigma A had rotor wheels UM and a keyboard. It
Speaker 1: looks a little uh if you've never seen one of
Speaker 1: these machines, and they all look a little different there,
Speaker 1: Like I said, uh, several different types of machines that
Speaker 1: evolved over time, but all of them had a keyboard
Speaker 1: on it, UM arranged in more of a well at
Speaker 1: first it was an alphabetic fashion and then turned into
Speaker 1: more of the uh German keyboard style, but so kind
Speaker 1: of like a typewriter. Yeah. And the very first one
Speaker 1: looked a little bit like one of the old timey
Speaker 1: cash registers. It was so big, UM. But yeah, I
Speaker 1: mean these had rotor wheels, and so you would type
Speaker 1: a letter, let's say A, and depending on the way
Speaker 1: the rotor wheels were set, it would produce a completely
Speaker 1: different letter. Yeah. And the way it would produce it
Speaker 1: as it had lamps twenty six lamps, each one marked
Speaker 1: with a letter, and the lamp that lit up would
Speaker 1: be the encoded letter for that particular key press. Yeah.
Speaker 1: These were the ones used in World War Two. The
Speaker 1: earlier ones did not have lamps. UM. But yeah, I
Speaker 1: mean the ones that we're talking about, specifically around World
Speaker 1: War two. That made it easier for the operator to
Speaker 1: identify which letter was being used because these most of
Speaker 1: these machines had no printer. Yeah. Usually you would have
Speaker 1: two people working on both sides of this, both the
Speaker 1: encoding and decoding side. You would have one person who
Speaker 1: would be pressing the keys and another person who would
Speaker 1: either be writing down the letter um the encoded letter,
Speaker 1: or writing down the decoded letter. Because an important part
Speaker 1: of the Enigma machine, and actually one of the reasons
Speaker 1: why it was eventually broken, was that it was a
Speaker 1: device that if if you if you type the let's
Speaker 1: let's just say for for argument's sake, that if I
Speaker 1: type the letter A, the letter Q comes up on
Speaker 1: the lamp. Well, if I were to take a second
Speaker 1: Enigma machine that was that was configured the same way
Speaker 1: as the first one, and that's really important. We'll talk
Speaker 1: more about why that is in a minute. And I
Speaker 1: typed the letter Q, the letter A would light up,
Speaker 1: and then all I would have to do, essentially, is
Speaker 1: take my coded message that was sent to me, type
Speaker 1: it out on my Enigma machine that is configured the
Speaker 1: same way that the encoded message machines was configured, and
Speaker 1: then have someone else write down which lamps let up
Speaker 1: and I have the decoded message, except that the people
Speaker 1: in England were saying, no, this is gibberish, it's new useless,
Speaker 1: and someone says, no, you idiots in German. Anyway, the
Speaker 1: I thought I would make you laughing. I thought about
Speaker 1: that last night and I was just waiting to unleash it.
Speaker 1: We have more to say about the Enigma machine and
Speaker 1: how it worked, but first let's take a quick break
Speaker 1: to thank our sponsor. The cool thing here is that,
Speaker 1: all right, So imagine that each of these roters think
Speaker 1: of it like a cylinder. Okay, so imagine a cylinder
Speaker 1: and on the on the ends of the cylinder are
Speaker 1: rods and contact points. So there's rods on one side
Speaker 1: and contact points on the other. Right, Okay, this is
Speaker 1: where an electrical current can flow through. Now there are
Speaker 1: twenty six rods and twenty six contact points, so there's
Speaker 1: one for each of the letters the alphabet. Now, if
Speaker 1: you were silly, you would just wire these straight across,
Speaker 1: so a would all Position one would would also would
Speaker 1: be a straight wire from the rod to the contact
Speaker 1: and position one. Now, of course that's not the way
Speaker 1: the Enigma machine works. What happened was they wired it
Speaker 1: so that position one would go to a different contact
Speaker 1: on the other side. So position one might go to
Speaker 1: Rod one might go to contact twelve. Rod two might
Speaker 1: go to contact twenty three. Rod three might go to
Speaker 1: contact one. That kind of thing. And you had this
Speaker 1: massive wires inside the rotor that determine which ones went
Speaker 1: to what. And then the rotor would fit inside the
Speaker 1: Enigma machine, which would uh electricity from a battery would
Speaker 1: come through, and depending on what key you pressed, that
Speaker 1: would allow the pathway to go through to a certain rod.
Speaker 1: The the electricity would go through the wire in the
Speaker 1: rotor come out the side of the contact that again
Speaker 1: is not directly across from the position of the rod.
Speaker 1: And that's the basic idea of how it would substitute
Speaker 1: a letter. Now if it if the rotor did not turn,
Speaker 1: or if there were not more rotors, you would just
Speaker 1: have a mono alphabetic substitution, like every time you type A,
Speaker 1: the letter Q would light up if nothing else changed,
Speaker 1: if that's all it did, in which case it would
Speaker 1: have been a useless machine. But because people would have
Speaker 1: been able to break that without ever having to spend
Speaker 1: more than a couple of hours on a on a
Speaker 1: on a message. Now, a lot of the machines, UM,
Speaker 1: we're using three rotors. UM. Now here's here's where this
Speaker 1: makes it more complex. Uh, these machines came with five
Speaker 1: rotors uh named numbered with Roman numerals UM and every
Speaker 1: here here again, here's part of the key. UM. The
Speaker 1: German command would send out the monthly use of wheels.
Speaker 1: So you might put the wheels in for one two,
Speaker 1: so four would be in the leftmost position, one would
Speaker 1: be in the middle, two would be in the right
Speaker 1: most position. And every time the operator presses a letter,
Speaker 1: let's say J the third. Actually, think of this if
Speaker 1: you've ever seen a car odometer that measures the distance.
Speaker 1: The rotor on the right moves one notch every time
Speaker 1: the operator presses a button. So the operator press is J,
Speaker 1: the rotor on the right turns one notch. The operator
Speaker 1: presses in, the rotor turns one notch, and then the
Speaker 1: middle um. Every so often, the middle rotor moves one notch,
Speaker 1: and then again with the leftmost the final it moves
Speaker 1: more slowly right, so as the operators typing the message out,
Speaker 1: the rotors are turning to incipher the message more thoroughly.
Speaker 1: The idea being that you're not repeating the same alphabet
Speaker 1: to frequently. In fact, you it would take you, it
Speaker 1: would take you an incredibly long message to be able
Speaker 1: to repeat pete such an alphabet ah. And that's one
Speaker 1: of the tricks. Eventually it could happen, which is why
Speaker 1: the Germans limited their message length to two fifty characters.
Speaker 1: So to to explain this even further, if I press
Speaker 1: let's say that I just have the one rotor in there,
Speaker 1: just for simplicity sakes, So I've got one rotor in there,
Speaker 1: and if I press the letter A, the letter Q
Speaker 1: lights up. Because that's just the way the wiring is
Speaker 1: that rotor. After I pressed the letter A, the rotor
Speaker 1: turns one notch. I pressed the letter A. Well, Q
Speaker 1: is not gonna light up because what's just happened is
Speaker 1: that there's a new rod where the electricity makes contact
Speaker 1: with that rod. It's in position and you know A,
Speaker 1: the first rod was in position one. Now that the
Speaker 1: rotor has turned one notch, the rotor, the rod that's
Speaker 1: in position for the letter A is rod too. So
Speaker 1: instead of Q lighting up, maybe J lights up. So
Speaker 1: you could just keep pressing A and a different letter
Speaker 1: is going to light up every time, except for one
Speaker 1: other exception we should point out, which was again something
Speaker 1: that helped the Allies break the Enigma code. They the
Speaker 1: Germans had decided foolishly, as it turns out, that no
Speaker 1: letter would ever incipher to itself, so B can never
Speaker 1: b B. Yes, so if you saw the letter B
Speaker 1: in a message, you automatically knew it wasn't B. So
Speaker 1: you've just you've just and that sounds like it's minuscule
Speaker 1: that you've only eliminated one option, but that was huge.
Speaker 1: I mean, without that, it would have been so much
Speaker 1: harder to to decode these messages now when you add
Speaker 1: that second rotor in uh so, let's say that again,
Speaker 1: we're gonna go with the positions. So the so we
Speaker 1: have the rods in the twenty six positions and the
Speaker 1: contacts on the other side of the cylinder in twenty
Speaker 1: six positions. Intristy comes in through rod one and it's
Speaker 1: going out through contact twelve. Then you have your second rotors.
Speaker 1: So the second rotor, Rod twelve is accepting the electricity,
Speaker 1: but it's contact that the second rotors, Rod twelve is
Speaker 1: connected to contact uh seven. So you've got now something
Speaker 1: that's going in through contact or Rod one and coming
Speaker 1: out contact seven. Once it gets through the second rotor,
Speaker 1: you had a third rotor in. That makes it even
Speaker 1: more complicated. So it's like you've just added a huge
Speaker 1: mass of wires to this device and it gets even
Speaker 1: more complex. I'm sorry, did you say huge massive wires? Yeah,
Speaker 1: like the Stekker Brett. Yes, So here's where the massive
Speaker 1: wires also comes in. There was a plugboard that came
Speaker 1: with many of these Enigma machines, not all, but many. Yeah.
Speaker 1: Do you remember if you think back to images you've
Speaker 1: seen of old telephone operators when they had to connect
Speaker 1: a call. They would physically take a wire and connect
Speaker 1: one person and plug it into the slot for the
Speaker 1: other person to make the connection. Well. On the Enigma machine,
Speaker 1: uh they had wires and plugs that went from that
Speaker 1: basically connected the letters. Yeah. So in other words, you
Speaker 1: might connect the letter A and the letter J together
Speaker 1: with A with a wire, which means every time you
Speaker 1: press the letter A, it's acting as if you press
Speaker 1: the letter J. So that add added yet another layer
Speaker 1: of of encryption on top of this device. Uh So, No,
Speaker 1: you're no longer sending a message to contact one because
Speaker 1: as that would be the one for A, you're sending
Speaker 1: it to different or not contact but Rod, you're seeing
Speaker 1: it to a different Rod. Uh so, Sterling. Maybe so
Speaker 1: by setting the alphabet position on each rotor, setting the
Speaker 1: rotors in the particular order, choosing you know which rotor
Speaker 1: you want. Because these rotors, by the way, we're not
Speaker 1: um alpha. They if you were to look at a
Speaker 1: rotor and turn it and it had the letters on it,
Speaker 1: it would not be an alphabetical order. They mixed up
Speaker 1: the order of the letters too. They wanted to make
Speaker 1: it as complex as possible, so depending upon the the
Speaker 1: rotors you choose the order you put them in and
Speaker 1: the plugs that you plug into the plugboard. That would
Speaker 1: determine what would happen if you pressed any particular key
Speaker 1: at any particular time. Plus, it's in German and you're
Speaker 1: probably transmitting it in morse code, so that's the level
Speaker 1: that you have to get through in order to get
Speaker 1: to that original message. In addition, UM, the Germans tended
Speaker 1: to break up messages into regular patterns of UM five
Speaker 1: characters at a time, so you know, a F B
Speaker 1: Q G space, you know, so the message wasn't written out,
Speaker 1: and so you wouldn't say, okay, well this this word
Speaker 1: has three letters and they're only you know, yeah, there's
Speaker 1: only so many word German that would have three letters.
Speaker 1: They broke it up so that once, you know, there
Speaker 1: was really no way to tell how long the word was.
Speaker 1: So a single word and remember this is German, so
Speaker 1: these words could be you know, characters long. So a
Speaker 1: single word might might spend multiple five letters segments, so
Speaker 1: you know, it might begin on letter four of this
Speaker 1: five letter group and then finish three groups later down
Speaker 1: the line. And that might have just been the word
Speaker 1: for I don't know, like car um so, uh, yeah,
Speaker 1: it just made it made it more difficult, obvious, skated
Speaker 1: the meaning of the original phrase as much as possible.
Speaker 1: So how would you ever decode such a message? Now?
Speaker 1: If you've got it really set up so that everyone
Speaker 1: knows how the how to set up their own particular
Speaker 1: Enigma machine based upon a codebook, you would have to
Speaker 1: have like a codebook that was um given out by leadership. Right,
Speaker 1: you'd have to have someone in charge saying, on this day,
Speaker 1: for all messages that we send out, this is the
Speaker 1: configuration you have to use, because if you didn't have it,
Speaker 1: you wouldn't be able to decode it. Right. The German
Speaker 1: command would specify the wheel order and the ring setting,
Speaker 1: and the the steckering the cross plugging. Stecker means plug,
Speaker 1: so they called it a plug board. It was Stecker
Speaker 1: brett um. But the thing is the cipher clerk would
Speaker 1: uh would basically turn the three wheels to a position
Speaker 1: at random whatever he wanted it to be, and then
Speaker 1: they would twice put in the own randomly random text
Speaker 1: setting or message setting UM. And this was the indicator,
Speaker 1: which is six letter character UM. And then you set
Speaker 1: your wheels at that three letter text setting and it
Speaker 1: would give you the UM, the the code that the
Speaker 1: person who would on the other side is supposed to
Speaker 1: know to get through it. Um. The thing is it
Speaker 1: would always have This is another thing that that boggles
Speaker 1: in mind to me. UM, with something with a device
Speaker 1: this capable. UM. They would transmit some things in clear text,
Speaker 1: like the preamble basically say the time of day, the
Speaker 1: number of letters in the text, and things like that
Speaker 1: that was sent and clear. I guess it was necessary,
Speaker 1: but it made it easier to figure out exactly what
Speaker 1: was going on and when it was set. And that
Speaker 1: turned out to be important later. Um. And they would
Speaker 1: tell you, you you know, certain things, um, you know, and
Speaker 1: everything came out in five letter groups and the indicator
Speaker 1: which was in six letters. They changed that later, which
Speaker 1: made it more difficult for the Allies, but still at
Speaker 1: that point it was too late. Yeah. And Uh. It
Speaker 1: also didn't help that, you know, the Allies new to
Speaker 1: look for certain words that would be used over and
Speaker 1: over again in messages. They called them cribs. Yes, they
Speaker 1: would look for these cribs are possible cribs and uh,
Speaker 1: based upon just letter groupings, and they could, you know,
Speaker 1: eliminate cribs from certain groups of letters. Again, because if
Speaker 1: a certain letter appeared at a certain part of a
Speaker 1: word and it was the same letter that should have been,
Speaker 1: you knew it wasn't that word, right, because of course
Speaker 1: I letters never going encode as itself using an Enigma machine.
Speaker 1: So um yeah, using these basic rules, it sounds like
Speaker 1: it's astronomical, like the number of things you would have
Speaker 1: to eliminate, and really it is pretty it's a pretty
Speaker 1: big number. But that's where folks like Touring came in.
Speaker 1: They they knew a bit about the Enigma machine already
Speaker 1: because the Enigma, the whole rotor based cryptography device, as
Speaker 1: Chris said, predated World War Two. Yeah, it's not that
Speaker 1: the trick is not getting your hands on a machine.
Speaker 1: It's figure out how what settings the machine is being
Speaker 1: used to encode so that you can break the message.
Speaker 1: Although it did help because if you got your hands
Speaker 1: on the machine, you could at least find out what
Speaker 1: the wiring was, yes, and you could you could then
Speaker 1: start to eliminate various combinations because you're going to say, okay,
Speaker 1: if it's if it's a Roman numeral one rotor, then
Speaker 1: this position is always going to map to this contact
Speaker 1: and you could start to eliminate things that way. Uh.
Speaker 1: They they over in Poland there were cryptographers who are
Speaker 1: breaking these codes before World War two broke out, Yes, unfortunate,
Speaker 1: and they had a machine that they would use to
Speaker 1: do that called the bomba yep and uh and someone
Speaker 1: set them up the bomba yeah. Actually they when war
Speaker 1: broke out and it became obvious that things were uh,
Speaker 1: that it was going to be discovered that they were
Speaker 1: able to do this, the machine was destroyed, which is
Speaker 1: some of the Some of the code breakers made their
Speaker 1: way over to England and helped the English code breakers
Speaker 1: by adding to the level of knowledge about what the
Speaker 1: Enigma machine was and how it worked. They also had
Speaker 1: some breakthroughs that stemmed just from from luck and and
Speaker 1: uh and bravery really because we're talking about uh times
Speaker 1: where where Allies captured a German group that had an
Speaker 1: Enigma machine, often something like a submarine. Um, they would
Speaker 1: capture that and if they were able to they could
Speaker 1: get the machine and the codebook, which would essentially tell
Speaker 1: them pretty much everything they needed to know. But uh,
Speaker 1: meanwhile Touring was working on his own BOMBA. Yes, he was, um. Yeah,
Speaker 1: before we go into uh into that I want to
Speaker 1: point out that we left out there. There's more to
Speaker 1: the Enigma machines UM than we really went into, and
Speaker 1: I would recommend if you're interested in learning more UM,
Speaker 1: there's a website for UH, the Crypto Museum, which is
Speaker 1: in the Netherlands. It's a virtual museum, but crypto museum
Speaker 1: dot com. UM. We'll tell you probably everything you ever
Speaker 1: wanted to know about the Enigma machines and UH and more.
Speaker 1: Have you guys cracked the code yet? Yes, there was
Speaker 1: a code hidden in this episode. Think it over while
Speaker 1: we take a break to thank our sponsor. The Navy,
Speaker 1: by the way, that was the three rotor machine was
Speaker 1: the one used by the Army Air Force. The Navy
Speaker 1: had a four wheel machine, yes, which was even more complex,
Speaker 1: and the the Secret Service, UH, the people who were
Speaker 1: in the the high intelligence groups used a completely different machine.
Speaker 1: We're not completely different, but UH used even more difficult
Speaker 1: machine to crack UM than that, and they all had
Speaker 1: different variations on that. And in general, the Navy tended
Speaker 1: to practice better security measures and UH made it. It
Speaker 1: made it much more challenging to break that code. The
Speaker 1: Army and Air Force, by contrast, were not as as
Speaker 1: careful and so their codes were broken faster than the
Speaker 1: Navy's UM. It's you know, part of part of decoding
Speaker 1: the the Enigma machine came into figuring out the wiring
Speaker 1: of the system, and part of it came from, you know,
Speaker 1: more traditional cryptographic approaches where you're looking for patterns and
Speaker 1: you're looking for a key phrases, and you're looking for
Speaker 1: uh things that could indicate that um that you've stumbled
Speaker 1: onto something. So if you if you receive several coded messages,
Speaker 1: I think a lot of problems is that we think
Speaker 1: of of decoding as you get one message and you're
Speaker 1: trying to figure it all out based on that one message.
Speaker 1: There were hundreds of messages sent. So if you have
Speaker 1: hundreds of messages sent and you're working under the assumption
Speaker 1: that everyone has is using the same basic layout for
Speaker 1: their Enigma machine, you start looking for patterns, and if
Speaker 1: you find enough patterns, you might say, oh, all right, well,
Speaker 1: look these these two messages here start with the same
Speaker 1: essentially the same uh patterns, So that may suggest that
Speaker 1: they're both starting with the same word. So let's start
Speaker 1: working back. And it may even be when I'm talking
Speaker 1: about patterns, I'm not even necessarily talking about the same
Speaker 1: ciphered letters, because again if if if German A has
Speaker 1: set the rotors to a certain alphabet setting to start off,
Speaker 1: and German B has chosen a totally different set, Uh,
Speaker 1: you're looking again at the actual pattern of of letter occurrence,
Speaker 1: not which letters they are. You know, it also helps
Speaker 1: to have a thorough knowledge of German, much more than
Speaker 1: my one year and Kyle in high school enabled me
Speaker 1: to UH fake my way through that greeting. UM. No.
Speaker 1: They also look at contact analysis, which is basically how
Speaker 1: frequently one letter will be next to another in a language.
Speaker 1: So if you know UH German, then you're able to
Speaker 1: know certain things about the way uh certain words are
Speaker 1: more common than other certain letter formations. So I think
Speaker 1: in in a lot of ways, UM, until the Allies
Speaker 1: were able to get ahold of UH, you know more
Speaker 1: thorough um code cracking materials. I think the traditional code
Speaker 1: breaking tools like cribs and UH and contact analysis were
Speaker 1: probably very helpful to them. UM. But what's really funny
Speaker 1: to me is in in doing my research, I was
Speaker 1: reading about John Harribl Uh, the Cambridge mathematician. He was
Speaker 1: twenty one years old, UM, and he was looking to
Speaker 1: UH to get into the cipher known as red um
Speaker 1: that the Germans had used. And what's funny to me
Speaker 1: is he actually stumbled upon something that we look at
Speaker 1: on that we've actually sort of talked about on the show.
Speaker 1: We've talked about passwords UM. He figured that at some
Speaker 1: point UH they were gonna get lazy and stop changing
Speaker 1: things and stop changing the keys that people would use
Speaker 1: for their uh UM, the codes that they would use
Speaker 1: at the beginning of the message to tell you which
Speaker 1: rotor settings. Basically, people would start using UH the name
Speaker 1: of their dog or their girlfriend to start encoding the messages,
Speaker 1: and they were going to start leaving it there. Once
Speaker 1: the first message of the day was sent. They're not
Speaker 1: going to change it for every message anymore because they're
Speaker 1: in a hurry or they're lazy, and they're not going
Speaker 1: to change it. And at first UM apparently this didn't
Speaker 1: They were abiding by the rules, they were doing things
Speaker 1: the way they were supposed to. But as soon as
Speaker 1: people became complacent and started leaving that setting throughout the day,
Speaker 1: once they had cracked the first message of the day,
Speaker 1: they were set and they were able to they could
Speaker 1: identify this and they basically asked for all the messages
Speaker 1: sent across all of the machines for the first one
Speaker 1: of the day. And once they were able to do that, um,
Speaker 1: they were able to crack read and basically identify what
Speaker 1: was going on for the entire days communications. And that
Speaker 1: happened around or so um, which was fairly early four.
Speaker 1: I mean it was before the Americans got involved, but
Speaker 1: of course Europe had been embroiled in war for a
Speaker 1: while at that point. Um. But that's a pretty that's
Speaker 1: one of those things where we tell you not to
Speaker 1: be careless with your passwords, and you know, even back then,
Speaker 1: it's just sort of ironic to me. Yeah, it's interesting. Um.
Speaker 1: The you know, it's you're talking about a device that
Speaker 1: once you start to encode the message, that's a very
Speaker 1: time consuming process, you know, setting your device the proper
Speaker 1: way and then starting to actually encode it and to
Speaker 1: confirm that you know, you that the letters you are
Speaker 1: writing down are indeed the correct ones based upon that configuration.
Speaker 1: It's the longer the messages, the longer is going to
Speaker 1: take to encode. And that means that the greater the
Speaker 1: span of time between when the message was written and
Speaker 1: when the message is received becomes and that that all
Speaker 1: of that I think leads to that sort of lazy
Speaker 1: behavior because you don't want to uh uh, you know,
Speaker 1: suffer problems because you were too slow. So yeah, I
Speaker 1: mean there were a lot of different reasons why this happened,
Speaker 1: and I think a part of it was just because
Speaker 1: it's such a huge pain in the butt. But that's
Speaker 1: the point. I mean, if cryptography wasn't a pain in
Speaker 1: the butt, then there will be no secrecy there. You
Speaker 1: have to make it difficult enough so that the message
Speaker 1: remains safe. So once we started getting tired of going
Speaker 1: to those pains, there's no more safety, yea yea um.
Speaker 1: But yeah, we we talked about Alan turing Um and
Speaker 1: he invented a machine known as the the van Barismus Um,
Speaker 1: which I don't know why I called it that, um,
Speaker 1: but yeah, basically it was able to identify patterns in
Speaker 1: the text messages and that just made it faster for
Speaker 1: the allies to be able to track things down. Yeah.
Speaker 1: I think his machine was capable of decoding a Enigma
Speaker 1: message within something like fifteen hours, which sounds like it's
Speaker 1: a long time, but when you're talking about eliminating all
Speaker 1: those possibilities. It's pretty incredible, especially you're talking. You know,
Speaker 1: this is this, these are the developments that led into computers,
Speaker 1: and that this predates computers, but these devices sort of
Speaker 1: became the precursor to the computer. And you know, it's
Speaker 1: one of the reasons why we talked about touring being
Speaker 1: a father of of computing and computer science, because it's
Speaker 1: this sort of stuff that that led to computers in
Speaker 1: the first place. Yeah, they I think Also one of
Speaker 1: the misconceptions is that that the machine known as Colossus
Speaker 1: was used in breaking the Enigma ciphers, and that actually
Speaker 1: is not true. UM. Colossus is frequently referred to as
Speaker 1: one of the first electronic computers UM, but it was
Speaker 1: actually used to break the Lorenz cipher system, which is
Speaker 1: another a different machine UM that was used by the
Speaker 1: German Army High Command UM and Lorenz is the name
Speaker 1: of a company and they basically UH had been working
Speaker 1: on a completely different type of machine UM that did
Speaker 1: not use the Enigma codes. But yeah, they used UM
Speaker 1: the British used Colossus to UH figure out the Lorenz system. UM.
Speaker 1: But yeah, that that actually is the machine that we
Speaker 1: talked about back in our UM chip Tunes podcast. When
Speaker 1: pixel Hate was had been allowed into the Bletchley Park
Speaker 1: Museum to record the mechanical relays. And of course, uh
Speaker 1: today's computers uh as in terms of processing power could
Speaker 1: do the work that these machines did in scant a
Speaker 1: fraction of what the time needed to do that then,
Speaker 1: but and can more thoroughly encrypt messages. I mean, even
Speaker 1: the freeware tools that you can get now to ENCRYPTI
Speaker 1: Neil are more thorough than than these machines were. But
Speaker 1: it's still very fascinating stuff. Yeah, yeah, and um yeah,
Speaker 1: it was really I would love to actually get a
Speaker 1: chance to to see one of these devices, and there
Speaker 1: aren't quite a few of them, many many in the
Speaker 1: museums and things like that. Um, but I've never actually,
Speaker 1: I mean I've seen plenty of pictures, but I've never
Speaker 1: actually seen one of these devices. Uh you know, kind
Speaker 1: of curious one to play with one. And that wraps
Speaker 1: up another classic episode. Hey you know that thing I
Speaker 1: said about a secret code in the episode, I lied,
Speaker 1: there's no secret code. I I just wanted to seem
Speaker 1: cool for just a second. It's all I have. But
Speaker 1: if you guys have something, you know, like an idea
Speaker 1: for a future episode of tech Stuff, something that in
Speaker 1: the far future can become a classic episode of tech Stuff.
Speaker 1: Let me know. Send me an email. My address is
Speaker 1: tech stuff at how stuff works dot com, or draw
Speaker 1: me a line on Facebook or Twitter. The handle for
Speaker 1: both of those is text stuff HS double you head
Speaker 1: on over to our merchandise store over at t public
Speaker 1: dot com slash tech Stuff. There you can buy tote bags, stickers,
Speaker 1: t shirts, all sorts of cool stuff with tech Stuff
Speaker 1: logos and and more on it. And every single purchase
Speaker 1: you make goes to help the show, so we appreciate it.
Speaker 1: And don't forget to follow us on Instagram and I'll
Speaker 1: talk to you again really soon for more on this
Speaker 1: and thousands of other topics. Is that how stuff works
Speaker 1: dot com.