Okay, welcome to the dead microphone. Turn it on. Thank you. I've actually got some on the A.B. booth, which is kind of a nice, pleasant change. My name is G. Mark, G. Mark Hardy. I'm here to tell you about Tales from the Crypto. Ooh. By the way, I brought all kinds of really cool schwag here, so if you like anything from 4B, and I've asked you a question, you can give me a reasonably intelligent answer. Come on up, grab something. I've got playing cards. I've got the regular playing cards, the unclass. And I've got the red ones, the classified. You're only allowed to look at one at a time. Time. Beer glasses, shot glasses, all kinds of really good stuff. So, without further ado, let's begin. Now, I can tell you all about stories you can look up in the library, or I can tell you how to win crypto contests. Want to learn how to make money and win contests and impress people and, like, get the badge that says Ninja Party Unlocked? Things like that? Okay, so, want to buy a beer tonight? I'll tell you stories about World War II crypto, American cyphers, Japanese cyphers, German cyphers. You'll find a lot of times that cryptography has been present. Throughout history, it's usually been the determinant about who wins wars. This is not miscellaneous, sideline stuff. This is key. This is important. And we look at the early days of crypto to the point that we figured out how to do asymmetric cryptography. And now, what do we have? We've got online commerce with all the great security of SSL. But wait, let's go a little bit down to basics first. Because what I want to show you is kind of the basic moves in which you'll need to learn cryptography. All the crypto contests that I've got and everything you might see out there, for the most part, don't involve using software to go ahead and brute force gigantic numbers. Okay, that's fine and that's great, but that's fun for the computer. What's fun for you? Figuring out all the different components, what makes cryptography work. So, I'm going to talk to you about transposition ciphers, where you kind of move things around. Substitution ciphers, where you change one thing for another. And product and expo-notiation ciphers, which is in the 102 talk, which we are not doing today. But remember, there is always beer. So, on a transposition cipher, what are we talking about? If I've got, let's say, a message attack at dawn, and I want to disguise this thing in a not-so-terribly-difficult code, but I want to make it in such a way that it is relatively difficult for somebody who's intoxicated to figure out, I will go ahead and map that thing across, let's say, four different columns. I could do three, I could do five, I could pick whatever number that makes me happy. And then what would you think the key would be if I'm going to go ahead and put things into four different columns and scramble them? Number four? No. Four-digit number? What's specific about that four-digit number? The order they're in. Come on up, grab something. So your key in this case would be one, two, three, four, which is a pretty bad key. But nonetheless, it works. You can get attack at dawn because you grab the first column, then this one. Anybody ever see the shirts that Bill Brain used to do with Not the Fed? N-O-T-T-H-E-F-E-D going down this way? Oh, no, some light bulbs are going, oh, that's what they mean. Okay, so all we've done is just transposed things. So transposition cipher means what you're going to do is just simply reorder them. And they can bring it back out. You can take it with a different key. The point is, what is preserved in a transposition cipher? The plain text is preserved, and also what is preserved? The letter frequency. Okay, I need a frequent and a plain text up here. I don't want a frequent. If I throw a deck of cards, someone's going to get hurt. I will throw them one at a time, but come on up and grab something. Anyway, honor system, only one piece. So, substitution cipher, probably one of the earliest ciphers that was out there, is known as the Caesar cipher. Why? Who do you think first used it? All right, that's not worth anything. But it turned out that back then in the days of the ancient Romans, that being able to come up with a thing that was written was pretty good cryptography. Why? Because 99% of the known world was illiterate. So if you write it down, you win. Yeah, and it's in Latin, too. Non carborundum illegitimis, right? Don't let the bastards grind you down. So, that's what I got to show for three years of Latin. So anyway, what Caesar cipher did is he said, let's take it and shift it over by a period of three letters. And so now what we do is we'll say A goes to D, B goes to E, C goes to F, and it runs. It rotates around the end, so Z doesn't go off into the universe. It does come back in A, B, and C. So that is starting to give you an idea of the whole key concept of a lot of cryptography, which is modular arithmetic. So what module are we looking at right here? Mod 26. So you can count either from 1 to 26, or if you're C programming, 0 to 25. But there's never a 27th letter. And so no matter how big that number gets, if you wrap around the end, you just knock off 26 until you get back down within the range. And so now if we take attack at dawn, and we put it in just a straightforward Caesar cipher, what do you get? Glyndiff and Glykgydzch, which you might also hear tonight at some of the parties. But there's nothing magic about that particular Caesar cipher. In fact, this is probably the simplest case of a substitution cipher. Because what we're doing here is how many possible Caesar ciphers are there? Who said 25? Come on up and get something. Because 26 is a singularity. It collapses back on itself, right? Well, your key is 0. A maps to A, B maps to C. And then you better hope that you go back in ancient Rome again, where most people are illiterate. Well, if you try to go ahead and do other substitution ciphers, you can come up with lots of different ways to do things. Because a visionary cipher says, well, hey, we kind of like this idea of a Caesar cipher, but just having one single key doesn't help a whole lot because you've got 25 attempts to try it. And oh, by the way, it also, as I said, someone said it preserves not only the plain text, but it preserves the frequency information. In the English language, what's the most frequent letter ever used? E, followed by T, A, O, N, I, R, S, H, all the way down to Q, X, and Z. And you can go back and read some books that have talked about cryptography, and you can look at frequency charts, but by and large, that tends to be what you see. By the way, what's the most common character in printed text? The space key, yes. That wasn't a crypto question. That was just a general knowledge, so no goodies for you. But hang in there, you'll get something. So anyway, a visionary cipher says, let's go ahead and pick multiple keys. And then we will encrypt every third or every fourth or every fifth letter with the same Caesar cipher. So you can see that key of A would take A to B, because A plus A is B. Think modular arithmetic. A plus P is Q. A plus Y is Z. And then, of course, you get B plus Y. It wraps around to A again, and you can start to see that this thing fits into a nice 26 by 26. And so here, if we use those things like P-A-R-T-Y, attack at dawn tomorrow, we break it up into groups of five. And this is something that you often saw back in World War II because the old Haslund machines, the decoders, would break code up into five character groups. Because how is this usually transmitted? By Morse code. Da-da-da-da-da-da-da-da. So what you're going to do is you're going to be sending that, and you're going to send it in groups long enough time that the guy will write down the answer and write down what he's getting. So now we'll take attack at dawn, and we're going to encrypt it with a recurring key. Party, party, party, party, party. What does that sound? That sounds like a good idea, right? So A plus P is what? No, it's not the Alexis Park. It is Q. And T plus A? U. Yeah, okay. And then we go right down the line. We find out that we can add these things right up there. And you get . And then that is a more robust form of encryption. Now, note what's happened here. We don't have the original plaintext anymore. Do we have the same frequency distribution of the letters as we started in the beginning? Anywhere is there the same frequency distribution as in the beginning? Pardon? Every fifth letter. Come on up here. Every fifth letter is going to be encrypted with the same key. So if your message is long enough, you can go ahead and use something smart like saying, wow, let's take every fifth letter and see if I can map it to a histogram. A histogram of the English language. Looking for the peak at E, then T, then A. Well, it's not going to land on that letter, but you're going to see peaks and valleys. And the more information content that's in your message, the more likely it is that they use a really bad encryption scheme. Because then you say, hey, the most frequently one is E, and then the least frequently one would be Z, and go from there. Usually you don't care about the low ones because you might not even have a Q, X, or Z in your message. So by going ahead and using the most common ones, you can start to make guesses. Now, you see the cryptogram that's in the daily newspaper in a lot of cities today, right? How many possible keys are that? It's a simple substitution cipher. Well, A can map to how many other letters? 25. So B can map to any of the remaining 24, 23, 22. So 25 factorial combinations, which is a number that I think is actually bigger than our federal deficit this week. But yet, trying to brute force billions and billions of keys is not the way most people solve that puzzle over a coffee in the morning. How do you do it? You eliminate a lot of those possibilities by looking at the histogram, by looking at the recurring patterns. And so for people who tell you, or vendors that tell you, our cryptography is better because we have a bigger key space than they do, the answer is, so what? Your key space might stink because your algorithm is no good, and so you can, with a pen and a pencil and a cup of coffee, crack something from trillions and zillions of keys. That's not where the security lies. The security lies in the actual cryptography itself, and the fact that you've got a large key space just means that somebody can't kind of look at it and go, oh, yeah, I bet this is this, this is this, this is this, etc. There's another cipher. And again, I'm giving you all these basic primitives because you're going to see these things in crypto contests and find ways to make stuff. Who here has won one of my crypto contests before? All right, a couple of folks. So you're here on my nickel, right, coming out here from East Coast? Yes. All right. I give away plane tickets. I fly too much, and so I give away round-trip plane tickets to people who solve my puzzles. I've given out seven of them, by the way. Southwest, anywhere they fly in the U.S., good for a year. It's best if you use them coming to a hacker conference. Very good. But a Playfair cipher, or sometimes what I call don't cheat, and oh, by the way, anybody go to the Ninja Network party last year? We'll talk about that badge in a minute. You might see something that looks like this. What it involved is taking all 26 letters and putting them into a 25-square grid. Okay. Which letter do you think we ought to leave out? Q. Q. Yeah, it happens to me. Some places, they'll leave out C. Some places, they'll leave other things. This is not too different, as you see it here, from what was called the TAP code. Anybody remember where the TAP code was used? Yeah, the POWs in Vietnam. What happened in Hanoi is that if you're a prisoner, they kept you isolated from all the other prisoners. So you weren't allowed to talk to them. You weren't allowed to communicate with them. They'd beat you if they found out. Well, pretty quickly, they developed a TAP code that apparently the North Vietnamese never quite figured it out. And what it involved is just giving row and column. You're basically setting an index on this particular grid. So if you want to greet somebody, like hello, the first one is a two down, three across, then first row, five, H-E, and then hello and things like that. Pretty basic, but that's sort of one of those encryption things that is just this, what type would you call that? Substitution, right? You're substituting TAPs for particular letters. Pretty straightforward. And so in this particular case, if we use a key of Hacker Jeopardy needs more crypto, for example, another cheap plug for Hacker Jeopardy, what we're going to do is we're going to start to populate those letters until we see a repeat. And then we'll skip it because we can't use it more than once, right? And so there's H for hacker, H-A-C-K-E-R. And I thought I had this on automatic, but it's not. Jeopardy, J, we already used E, so we can't use it again, right? The Z is already up there. So we skip it and go to the O. And then P-A-R-D-Y. And then needs more crypto. And now you're going to find out that you just fill in the last of the letters at the end. So just about every time a Playfair cipher is going to end in the bottom right corner with a Z, unless there's a Z in your key. And you say, well, is that a weakness? Potentially. Is there a problem here? Well, now that I've got this weird-looking grid, how do I use it? What I say with a Playfair cipher is that it's, again, it's pretty simple. There's only three rules. And so what the three rules are is that if you have two letters that are in the same row, like I'm trying to encrypt, you know, R-O. I would just simply say R and O are in the same row, so I go to the right one click, J and P. If I'm trying to encrypt a pair of letters S-T, where do you think it goes? M-Y. M-Y. It wraps around. All right? So just think of this thing as like a cylinder that wraps back on itself. If I want to encrypt the letter pairs F-I, they go to G-L. And if I want to encrypt the letter pairs like C-E, it would go to K-H. So in a row, it's pretty straightforward. But you're noticing what I'm doing. I'm breaking it up into two-letter groups. Why? Because when I look on my particular grid, I need to have like a start and an end point. But wait, there's more. What if they're in a column? What if I try to encrypt the letter pair A-N? What do you think the result would be? J-F. Yeah, you just go down one. If I encrypted S-W, S goes to G, W goes to C. See how that works? That's rule two. And what's the last possibility? If they're not both in the same row or they're not both in the same column, they're in different rows and columns. Is that a problem? Not at all. So if I want to encrypt the letter pair H and S, I just kind of make a little... Opposite corners. H goes to C, S goes to Y. If I encrypt J and I, it would go J goes over the same column I as it becomes a P. I goes back over to J's column, it's an F. Do I ever have to worry about wrapping around when I'm doing something like that? No, I don't. Because it's not going to wrap around. So the wrap around is only going to get you if you're both in the same row or the same column. So it's like an infinite thing here, infinite thing here. But the opposite corners work. So. With those three simple rules, I can now take the... Now is the time for all, you know, good men to come to the edge of their country. And I'll break it up into two-letter pairs. Now, here's the problem. If I've got the letter LL at the end for all, what do I do with LL? Where does LL go to? Well, LL goes to LL. It collapses onto itself. Is that a good crypto? No, it's not. So one of the first rules about a Playfair cipher is it can't encrypt a pair of letters that are the same. So what do you do? You shove a filler in there. How about we put it in a queue? Would that work? Because you're not using it. All right. Because then you don't know what to do with it. It won't process through your encryption algorithm. So what do you think we ought to do with it? We'll stick an X in there. Why not? X marks the spot. So you can look at we've padded the LL at the end and put an X after each one. So now that pair of LL becomes LXLX. So now is the time for all becomes the following. We take that grid and now the N and the O, if we look at it, there it is. Third row, second column. NO becomes SJ. WI, we look in there and it becomes XG. And if you look at each pair and take a moment to look at the grid, it's pretty straightforward. Well, you can code this thing or if you had to, you could do it by hand. Seeing as this came from the 19th century, I would say it's a pretty good job that it was done by hand. Initially. In fact, a lot of these things can be done that way. When I run crypto contests, I found people looking for, hey, I got to go download something, get a little JavaScript. Do it yourself. Think through it. Don't let somebody else do your thinking for you. The reason being is that as we look at cryptography, it becomes the backbone of a lot of things we do in our society. It's also our protection for privacy and security. But it's based on some real simple moves. Probably the most secure cryptography ever invented by man is what's called the Burnham cipher or one time pad. What do you think one time pad means? Use it once and throw it away. And so how long do you think the key has to be? The same length as the message. And all I'm going to do is I'm going to XOR them to the bit by bit. So XOR works really nice. Zero exclusive or zero is zero. Zero XOR one is one. One XOR zero is one. And one XOR zero is zero. What mathematical function does XOR look like? Modules. It's not a integer addition but a mathematical operation. That's not something that something in fifth grade would know. Pardon? Not division. Can't divide by zero. Well, yeah, but that's not a simple. How about a not equal sign? Okay. Is zero not equal to zero? No, it's not. Zero being false. Is zero not equal to one? Sure, it's not equal. So that's interesting. If we do not equal, if anything is not equal to zero or if anything is not equal to itself. So if anything is not equal to itself, what collapses what? A string of zeros, right? So if we encrypt a message with the key and then we re-encrypt the message with the same key, what happens to the key? It goes away and you get just the message back. That's a not equal sign. And so now if we go ahead and we do some basic zero one one zero math, there's no carry in exclusive or, which is great. You don't have to think. You just do one bit at a time. Hardware likes one bit at a time. You don't have to worry about carrying. And so this is very, very fast. And this type of stuff is what you're going to see implemented in hardware most of the time. Now, if you want to encrypt it, by the way, so substitution cipher, one time pad, you can substitute with or without a one time pad. But the cool thing about a one time pad is it usually wants to throw it out. Now banking used to use that back in the 60s and 70s down in South America. But the problem was they were reusing the keys. Now the problem was they said if you reuse the key, what happens? Something plus itself adds to all zeros. And if I exclusive or zero to zero, I get zero. And if I put zero to one, I get one. So exclusive or-ing zero to a message gives me the message. And so now what was happening is you'd intercept one encrypted message. You'd intercept another encrypted message. You'd XOR them together. And now you have one message encrypting the other message. But guess what? Those keys have patterns. The letter E. Encrypting E is the most common thing you're going to see. And you're going to see spikes and valleys. And now you can break that apart. And once you crack that, you've reverse engineered it. Then you pull out the key. And now you can break every banking message. And you can empty the bank. That's why you can't use keys over like that. So let's think. If you want to win crypto contests, how do you do it? Helps to think like the person that developed them. Anybody who's doing a loss challenge this year? Yeah, you're all, everybody. Yeah, a couple guys back there. It's like, well, why aren't you actually hacking with the hardware? Did you figure out what is on the badge yet that has to do with lost? Yeah, okay. So you're trying to try to think of that guy. If you listen to his talk at 101 yesterday, he's got some really weird ideas. But it gets you thinking outside the box. Anybody go to the Ninja Network party last year? We had this really cool badge. And if you played around with it and read it around, it finally said Ninja Party. And if you went ahead and played with it, it was a game of Simon. And when you got all the way to the end, it said, don't cheat. Play Fair Cipher. Hmm, Play Fair Cipher. Yeah, won it. And that up there in the substrate is a particular set of paired letters. Looks an awful lot like a Play Fair, doesn't it? And now you've kind of eliminated all the other possibilities of what it might be and you can start cryptanalyzing that and going after it. Play Fair, by the way, 676 different combinations. You know, there's a lot of things you got to worry about in some of these big grid things. But you don't have billions of keys. So there's some ways you can come up with some patterns and things like that. And that's what was out there on that particular thing. Okay, so let me tell you about a couple of crypto contests that I gave you because I got one for this year for DEF CON. And if I give you an idea to get you inside my head, you folks who have already won my contest, you're going to understand a little bit about how these things are put together. All right, so it was just after Mardi Gras a couple of years ago. I went down with my wife to New Orleans and she's a fairly good-looking lady. And so, like, she didn't even have to show anything. They were just throwing her piles of beads. Well, she thought, this is great. Well, what am I going to do with beads? We got back to the hotel room and there's, like, this massive amount of beads. We have to take, like, making runs to it. So I was like, I want to keep them. Why? Well, I can't throw them out. Yes, dear. So I went across the street to Walgreens, like, one in the morning and get this, like, big box. Started loading up with beads. Well, it's getting heavy. You figure, what's your weight limit before they start charging you? 50 pounds. So what do you got in the hotel room? Bathroom scale. Put the box on the bathroom scale and weigh it. What's the problem? Box is bigger than the bathroom scale. You can't see the readout. So how do you solve the problem? Think like a hacker. Yeah, weigh yourself. But is that how I did it? I figured rather than hold this box, trying to look, because then how are you going to see it, right? Put the garbage can on that scale, which weighs maybe one pound. Then put the box on the garbage can. And so I checked in with a 49.5-pound bag, a box. And the lady was saying, you're going to charge extra. She says, weigh it. And she's like, no, put your hand up. You can't charge me. It's exactly right. And so these things came home. I didn't want to kick around the house for about 10 years. So I figured, OK, a couple weeks, we've got ShmooCon coming up. So this is what any normal person would do, right? If you had a whole bunch of beads sitting in your front hall, you'd invent a crypto contest. So I also have friends with Too Much Free Time. And so they develop all kinds of, like, really cool graphics that they're handing things out and posting it on. This is Mardi Gras. That was fun. She's also into cats. And your beads break in your ciphers. Pretty cute, OK? So even cats get crypto. So what I did is I took all these beads. I randomly placed these things in the reg packets, because Bruce and Heidi are friends. And what we did is I unloaded a bunch of these things, purple, gold, green, and pink. Well, what's the three colors of Mardi Gras? Purple, gold, and green. Where does the pink come from? I'm not sure, but I had a bunch of them. So Lost was helping with that. This one, Mouse, was out there. Kay and I, we wore red beads. So we're like four people wearing red beads. Everybody else had these other different colors. So what do we do? We had extra strings of red beads, because if somebody solved the problem, we'd give them a red bead. Well, what does that do now? Now the other person who you're competing against now has administrator privilege. They look like a judge. They got a red bead. So you can walk up to somebody who's got red beads on and say, have I got the answer? And they might have the answer, but they could say, no. So you had to work around the social engineer problem. So then I put a whole bunch of messages in the other packets. These are the plain text. Congratulations on your opportunity to join our first ShmooCon Crypto Conundrum. And you'll obtain an important hint that will assist in solving the first round. What's unusual about that text? Who said that? Come on down. You got some good stuff waiting for you. No letter E. That was a little bit tough, so I couldn't say the word red, so I had to have like a string that is the color of blood. But it turns out, and those are also the same length of text, the plain text didn't have the letter E. The guy from Google who was working on this thing came up to me like on the second day, and he said, you are evil. Because he had tried everything he could think of, and he couldn't come up with it. Why? Because you're looking for where E maps to, and it wouldn't map to anything. Because what I did is I took these things, which is, by the way, it's called a lipogram. There is a book out there called Gadsby, which I think Lost used a couple years ago as one of the keys. It was a lookup as part of his puzzle. And you had to go find that book, and the entire story of over 50,000 words was written without using the letter E. Imagine that. So the padded plain text, we go ahead, and notice what I've stuck in the middle, that letter Z again. You might see that again. In the military, when the instructor said something would be on the final exam, they would kick the podium so you'd be aware of it. That's also what you found out sometimes in the military back in World War II. If you wanted breaks between words, you put Zs in there, because there weren't too many Zs out there. And if you had, go to the zoo, and you had ZZ, you'd figure it out. So, I used five Caesar ciphers. Seven, 13, one, 18, 11. What does that sequence spell out, by the way, in terms of index from the alphabet? Gbark. Yeah, you already got stuff. You want some NSA swag though? No, you got plenty. Okay. Yeah, he works there. The pad. So what I did is just encrypt each one of them to this type of cipher text. Pretty straightforward. Each one, commonality. So, if my GMA, so the third one, if this, if the, you're gonna see a lot of repeating letters, but look at the, the stuff that you find there. And in fact, if you look at the last letter of each cipher text, because that was the letter Z, remember I had to pad Zs at the end to make them all the right length? That's a weakness in my system, because look at the last character in each row. G-M-A-R-K. Now, these are actually separate, so I forced people to actually socialize. You had to talk to at least four other people to go ahead and come up with these, because I wouldn't be able to give them all to one person. And they also had clues like this. They said, shmoo, shmoo, shmoo, shmoo, shmoo. Actually, wait a minute. Yeah, I guess I did put them all in the same thing. I got a drink. So, six variants to talk about the equate. And a few turns figured out. And by the way, I put little, like, sayings down there. Like, it's, if you do not shmoo, it's too bad for you. And then, the greatest good you do for another is not to just share your riches, but to reveal to him his own. They had nothing to do with the contest. It is amazing the way it works here. Bunnyhole. For stuff like that. So, you got that? You got this thing. Again, for my friend who has more time to do than she knows what she's talking about. Anybody can read that? Can you try the first line? Come on, I only got 50 minutes. Red E, four more. A short visit to see. In this case, was a hacker. Looks past 50. Talked that year. And it is a, what? Well, no, not quite. That's the word operation missing the letters P-A-I-N-N. It's a painless operation. So, this is, that's the way lost things. I don't think this way. But, so my friend did this. So, ready for that? And, here you go. And so, if you came to my talk, a hacker looks past 50, you got new clues. That got you from the first stage, second stage, and here we go. And I handed out cards. Admit one. Must be present to win. So, I used to do random drawings and we pick stuff like this here. I'm just looking for smart people, which is better. And it had at the bottom of each one, some little text field down there. Now, these cards are original. They're from my mom's attic. I had them from an old job deck from the 1970s. Mom never throws anything out. She's lived in the same home for over 50 years. Thank goodness for that. If you want old stuff, tough for you when she passes away because we got to go through all that attic. But meanwhile, it's great for getting old 50 column cards. So, that was that. And if you look at all these things at the bottom, you'll see all these letters down there. PS, QC, FY. Well, we did a Playfair. And the Playfair cipher was the key. A hacker looks past 50. Ah, why not? That's the name of the talk. So, again, we populate the squares using the things that we talked about before. And there we go. And that then becomes the encryption scheme. We take these messages and these are the four messages that I put out there. Go ahead and email martygarage schmoo con dot info. Who owns defcon dot info? Me. Why? It was 99 cents at GoDaddy. Bruce didn't grab it. He didn't care about the dot info. So, why not? I think defcon dot info is probably long gone. But, you can think of these things early enough. It's first come, first served. Quick side story. Back in 1995, when I was first poking around on the internet domain list, two letter domains, aa.com, ab.com. How many possible two character domains are there? Well, six, seven, six of the letters I got thrown in the numbers, but who wants like, you know, zero x unless there's something after it. Well, it turned out that what percentage of those domain names were not in use? About 88% of them. It turned out that there were only about 80 of those domains were registered. And, it could have had any of them. But, back then, the ethic that we had was you don't take stuff you don't need. It was like seashells on the seashore. You see one you like, take it. You don't see one you don't like, just leave it. And so, we just kind of left them go. So, anyway, you can email. Go to a website. Make a phone call. And then, interact with humans is the scariest part of all. We pad that for encryption. Squished them down together. Note the presence of a couple x's in there, like shmoo-con on the top row. S-H-M-O-X-O-C-O-N. You only have to worry about the double letter in a Playfair if they happen to be in odd numbers. So, in a Playfair they're not even positions. Because, if they're in even odd, they stretch across the pair and they won't affect each other. But, there was an error that one of the teams made that they discounted the whole thing because they found some letter pairs. Because, if you go ahead and you encrypt it with the Playfair cipher, it looks like this. But, then you find out there's a bunch of letter pairs. If you're careful though, you notice that R-R-M-M-I-I-K-K-A-A, they're not part of the same pair. It's the last of one and the first of another. And, one team spent half a day, correctly, that this is going to be a pair of letters. So, you got to count. Because, you can't have double letters in the same position. In this case, it was kind of delivered on my part. You notice you throw little curve balls in here just to make it fun. And so, if you do each task, here's what happened. If you auto-responder, I have it set up from martygrachvucon.info and you got back an email. Tango, Alpha, Whiskey, Sierra, Alpha, Edge, Golf, Kilo, we'll be given to you. I think I've been reading Dr. Seuss recently. If you went to the website, and it turned out that if you went to the first website that I have, you couldn't traverse, you know, schmucon.info. That was just a subdomain on mine. You couldn't traverse to schmucon.info. You had to go up to gmark and back down again. That was a basic web traversal challenge. But, it was in there. Hats off to you. You solved the puzzle too. And, here's some more information. And, the third clue, I was working out in Hawaii on my cell phone. So, I just gave you a voice message. Well, if you took those first three together, and you added them all together, what you would get is the first three rows. And, then again, go column wise. The magic words to say to gmark are, give me white beads. Well, what is this 571428 thing? That was that fourth clue. Here's the fourth piece of four, so you need to look no more. So, wait a minute. This is like cart before the horse. No, not really. Because the first three rows are 571428. 571428. What's significant about 571428 in that sequence? No, it's not the firing order of a V6. That's two extra cylinders. Four sevens. Yes. Come on up. Grab something. 142857. 142857. Repeating irrational number. Rational number. Whatever. It's been a while. So, if you get that fourth one, it gave you the last set of stuff. Go for it. Did you get this with ease or use the force of a brute? Why? Because you could brute force all six-digit combinations, right? And eventually, you'd get an autoresponder after you got hammered into this poor website. And so, you got the information. So, if someone came up to me and said, give me white beads, you got white beads. Well, the first team to do that, I got a call from a guy who says, hey, we solved your puzzle. Could you give me white beads? He said, great. Come on, meet me in the lobby. And four people come down. Anybody here? No, they're off doing the loss puzzle again. So, exactly, Jolly and Matt had all solved this thing and they said, now I'm up this creek because I was going to give one winner one round-trip ticket but four people won. So, what should I do? What would you do? Give them all. Why not? So, I gave them all to it. And then, they spent their time then, like this year, trying to solve the loss puzzle. So, we're sitting there at the closing ceremony and Jolly's saying, like, the 2008 DEFCON puzzle remains unsolved because I had a DEFCON puzzle that was like this. That was with the cards I gave out. Except, there's a rather smart person in here who solved it. There you are. You don't have to identify yourself if you don't want to, but you could. You want to stand up? Somebody else wanted to stand up, right? Going? Going? You don't have to do this anymore? Somebody else. No, somebody else did not get it. Oh, wait a minute. I'm going to let you G-Mark, but I've just got to say that Dan Kaminsky had one of the best talks of all time. What can I say? All right, I think somebody just advanced when we were on the scavenger hunt. So, anyway, this fine gentleman went ahead and solved that thing, so he's out here on my dime as well. So, you can create your own crypto, but be careful. It's like packing a parachute. Unless you know what you're doing, you can really screw it up. One of my first jobs, when I started my business in 1988, National Security Corporation sounded like a pretty cool name. Why? I wanted to go work for the National Security Agency, if you heard my previous talks, and found out that in the Navy, I couldn't convince the detailer to send me there. They said, the Navy has no need for computer security. You need to go back out to sea. This is true. It's 1984. So, I was like, well, what do I do? I want to do this, I want to do that. So, I left active duty, went to the reserves, and then decided to go ahead and do security on the outside. Why? Because I went to the Fort Meade. After three years, I have to go look for a job. So, I couldn't work for the National Security Agency, so I started National Security Corporation. So, first company I had, they had some crypto. And they encrypted a whole big database of corporations around America with credit histories. I can't mention their client name even today. And they said, we're going to have this newfangled invention in the late 80s called a CD-ROM. So, the entire database and then creating mailing lists and then doing stuff because what they used to do, seriously, back in the 80s is every year this thing would come out and people would hire a boiler room full of people just bang, bang, bang, bang, and retype that stuff in there. They didn't have scanners. So, they want to do this. I said, okay, fine, we're going to hire you. We're going to give you 80 hours to go ahead and prove that our crypto is good. What are you going to do? We'll just give you a sample of it. Well, I had a client and he had a pretty good recovery. He said, Mr. Baker, don't worry about it. We were just checking this young man out to make sure that he was actually pretty good. So, it turned out that he was using the decoy cryptography and he did very well. So, he's going to solve now the real crypto. And by the way, kid, you don't get any more time. So, in the remaining 40 hours, I cracked the other crypto. And I assembled a mailing list which is their greatest nightmare. And I presented that to them. And I said, you know, you really should use something called the data encryption standard because back then it was only, by the way, you just embarrassed me a second time before my boss. So, we'll figure it out ourselves. So, I went back there a little bit later, like a month later, trying to do a sales call. It's like, well, how's it going? Oh, yeah, we got this code. We're implementing this. It's great. Where are you storing the key? Ah, we figured that out. We got like a 4,000 character block. We just stored it in there somewhere. No one's going to find it. I said, you ever hear anything about bit parity? Because DES keys have that parity bit in there. So, I have to look for eight bytes of 16, expected value eight. Eight tries, I'll crack your crypto every time. Sure you don't want some help. No, no, no, we got it. So, best I know, they're still doing that. So, ShmooCon last year went over to Bruce and Heidi's house and if you went to there, I don't know, anybody do the East Coast trips? East Coast. East Coast. All right. Yeah, I got my goon. So, that's good. So, anyway, put Morse code on the rim of each of the badges as well as a barcode would be cool and so they figured, why don't we do all these barcodes and so everything had a barcode. So, the problem is because it was printed at an angle and it's a digital image, guess what happened to the barcodes? And most of the really high-res scanners wouldn't figure it out. If you had a low-res scanner, it scanned very nicely. But if you crack the Morse code and that little red X, by the way, I made a mistake. Nobody caught it but I didn't eventually but it was too late, the badges got printed. Actually, somebody did catch that. This was the left border, that was the right border and that's the barcode. Who here is good at reading barcodes? What does that first barcode say? Anybody look at the program and look at the CD? Well, what it does, I'll spare you the work, is, this is what it wrote into. So, you had, left border was Mooseltoe, and then Moosel Defense and Chocolate Moose and Moosketeers and Room with a Moose and Be Anonymous. Moosey Fate and Moose Nugget and these barcodes. Well, the first column looks like what? Well, one through eight. Helps you get them in order just in case you can't. How many possible orders are there of eight different badges if you didn't have that? How many possible ways can you arrange eight things? Eight factorial. Not eight factorial. Sixty. How about two to the eighth? No, two to the eighth. No, I'll just go shwag for you. And these things are actually legitimate check sums from the barcode, but what's that in the middle? What's this one, one, two, three, five, eight, one, three, two, one? What's that look like? Fibonacci. So many people said that. I don't have enough shwag for you. So. Somebody raise hands. I'll throw it in the general direction. If your hand's not up, don't keep it. All right. Fibonacci Sequence. What's unique about the Fibonacci Sequence for those who didn't study math or were asleep in it? is two, plus one is three, plus two is five, plus three is eight, plus five and eight are thirteen, eight and thirteen are twenty-one, and so on, and it builds up, and there's lots of different things you can do with that. But it tells you something, that there ought to be something going on in there. So if we look at the table of values that I created, and we just go ahead and we transcribe all eight badges, again, note the common element. You've got to socialize here. You have to roll around and look at other people's badges. And you get people coming in and staring at your chest, and it's like, are you looking at my badge or what? Well, okay. And you end up with all these different combinations. But what's this stuff on the right? Well, it's just padding, right? It doesn't matter. But, look, there's G-Mark. But guess who else showed up in here? That was not planned, honestly. That just, that came up and it's like, oh, wow, this is pretty neat. It's a sign. It's a great puzzle. And, yeah, so that, he appeared in the middle of my crypto puzzle. So what we had at the end is like the telomeres. What's a telomere? Enter your DNA. That's all the stuff that when the telomere starts to unravel because it's like the padding at the end, it's a slack space in your file. Telomere is gone. What happens? Well, not die immediately. You start to reproduce your cells incorrectly. They turn into cancer cells. They get bigger. Then you die. So if you keep your telomeres long, you can live a lot longer. That's the current theory. Looking left to right on these telomeres, there's some stuff in there. I've had Bruce and Heidi and I put an X and O in there, but I spelled Heidi's name wrong. I didn't have to, but I did. It was stupid. And so then there's things that are left. How many letters are left? Who's good at counting? Sixteen letters are left. And how could that be significant? I don't know. Let's go back here. How many columns have I got? Sixteen columns. What am I going to do with those Fibonacci numbers? Maybe they're offsets. Think of a shift register. It's the first eight terms. There are eight badges. There are eight indices. What to do with them? Again, a lot of commonality. When you see the same numbers show up over and over again, it's usually not a coincidence. The only coincidence that ever came in here was the appearance of Jesus in my puzzle. So what we do is we take these things and let's start shifting them. The first row, we'll leave 1, 1, 2, 3, 5, 8, 13, and 21. And if we have that as a starting position up top, and then modulo 16, so 21 becomes moderator mod 16. Yep, that's five. And we shift these things over a little bit, and this guy wraps all the way around and then you get this. And now, if we take out the G mark, and then Bruce and Heidi, you see one extra letter per column. Why do you think that just happened to distribute perfectly into 1, E, F, L, 6, 8, 8, 9, 10? And me and per column because they probably needed something to get there right each column gets a spare letter so what do you think I might do with a column come on this is some goodies up here anyone Bueller Bueller anyone as a pattern but it's pad I already pad that's what do I do with it now that's padded come on you guys got a lot of in crypto puzzles you gotta think like a cryptographer oh it's they already aligned we already realign them we padded it and we're ready to go ahead and yeah solve it okay give me $20 that's a negative puzzle steganography no it's not steganography we go ahead we turn them into numbers so we can then do what to the numbers add them together who said that all right come on up and help yourself to some really cool NSA swag because letters don't add very well in your head but numbers add pretty nice nicely and so if we add by column what do you think we get well we get big numbers like these have problems making decisions well yes or no okay so we add up all these columns we get 16 different columns we get all these answers well what do we do with this sum they're too big what's the hundred and thirteenth letter of the alphabet we don't have one so what do you think we do with them rock 26 my 26 them and now we go ahead and get these numbers all right what do we do with those numbers turn them back into letters wow we're doing great okay this is like a really tough code so take all those numbers terminal letters and this became the final pig Latin puzzle they're the person who came up with a solution they won a round-trip ticket to come out here. By the way, the very lame ShmooCon badge puzzle, which was weird because it involved like a PDP-8 paper tape punch and you had to assemble it and you ran the program on a PDP-8 simulator, you had to take the output run it through like some enigma simulator and then you got some answer and they gave you a 8 gig memory stick. It's like, dude, do my puzzles, they pay better. Who kind of sick mind, this was at Bruce and Heidi's paper, squared paper here. Actually they didn't have any, asked if they had any graph paper, he went out and he downloaded graph paper off the internet. And that's what we get. So that's coming up with the puzzle, there's the original notes. It's not too tough, but you want to make it interesting, you want to put enough phases and stages in there and things like that. So anyway, the same sick mind that came up with that, came up with this one. Today's puzzle for today, tomorrow and Sunday, to see if you can win it. It's a DEFCON level challenge. So anyway, the same sick mind that came up with that, came up with this one. Today's puzzle for today, tomorrow and Sunday, to see if you can win it. It's a DEFCON level challenge. So anyway, the same sick mind that came up with that, came up with this one. Today's puzzle for today, tomorrow and Sunday, to see if you can win it. It's a DEFCON level challenge. But it's a good one, it's an easy one and you know as you make progress because all of a sudden, like a tumbler, a click it unlocks. It's not like you have to get all the pins before all of a sudden you figure it out, like my ninja badge. But you'll get there from here. And so here's the first important hint, look for gold on the DCCD. I think everybody knows what I'm talking about, right? What's a DCCD? Anyone? Anyone? All right, good, so you're not asleep. I got mine on here somewhere. So look for gold on it. That'll get you going. I'm going first, you don't have a laptop, that's a little bit of a tough puzzle, but anyway, I'm sure you could borrow one. Don't they have the hotel, the little lobby where you can go ahead and use your computer to book things like that? They don't really care if you put a DEFCON CD in there. But what I am doing is I'm going to go ahead and start posting clues on Twitter. So G under bar mark, by the way, if anybody can get the guy in Japan who owns G mark to give me his CD, I'm going to go ahead and start posting clues on Twitter. So G under bar mark, by the way, if anybody can get the guy in Japan who owns G mark to give me his Twitter account without getting me in legal trouble, let me know. I'll be very thankful for it, but there's some guy who just keeps tweeting over there and he doesn't want to swap out accounts. But follow me at G under bar mark and I'll go ahead and give you clues for this. Quag Con, anybody go to that? Up in Rhode Island. I didn't go to it, I couldn't make it, I was triple booked that weekend. So I came with a puzzle for him. Figure Rhode Island, a lot of water, nautical flags, Navy guys. Navy puzzle! Anybody know, read signs, read flags? That major diagonal left to right, on the left, what do you think that spells? Take a guess. No, it's nine letters long and the diagonal. Drink. Q U A H O G C O N. Quag Con, around here and around there. And on the back page of the program you had all those different flags. Well, what am I going to do with the stuff on the left? How does that help solve the thing on the right? Okay, I turn the flags into letters and then what do I do? Turn them into numbers and then what do I do? I want to add them because I got a lot of blank spaces. Don't you ever read the paper? What do you do with the nine-by-nine grid when you've got some spaces with numbers and some don't have numbers? Oh, wow, how about that? Then what happens if you think you add those two together? You get a message. See, it's pretty easy. By the way, nobody got it at the con. Somebody had to solve it. They raced against Dave at home. Where are you? Over there. Yeah, this guy sitting home said, it took me an extra hour, I had to go feed the baby. It's like, lame, but he got it. So, these things are a lot of fun. ShmooCon this year. Here's what we did. Lots of badges. Anybody went to ShmooCon? You saw these four tuples of numbers. Up to six decimal points, six decimal points, integer, integer. What do you think these might be? How often do you see numbers to six decimal points? What do you think that might be? Coordinates, right. What kind of coordinates? Yeah, Latin long, GPS. So, you take that. What about the next one? Three, four, five, one, one, four. What could those possibly be? It could be area codes, but one, one, four is not an area code, so drink. Could be flight number, room number. It could also be what? Direction. Yeah, exactly. A compass direction. The last one is, well, the distance in miles, nautical miles. Fell off the end of the map here. And so, it turns out that if you go ahead and you take all these things and you look at the Latin long, you happen to find, doing Google Maps, an airport at each of those locations. And if you travel in the direction and speed from that to the next airport, it takes you to the next airport. So, it helps you a lot. It helps you a lot. It helps you a lot. It helps you a lot. It helps you get them in the right order. And if you look at the three-letter airport codes, you string it all together, it makes a message. And so, you win. So, you don't have to go yet because we got two more minutes and we'll get you out of here on time. So, anyway, I'm going to be here. I'll answer questions for you for the next couple of minutes. Get ready for the next one. But I want to thank you for Tales for the Crypto. Go follow me at G under bar mark. Basic maneuvers are all here. Look for gold on the DCCD and go ahead and win some of my plane tickets, just like you can win Ben Stein's money. Thank you very much. Hope you have a great time. Thank you.