This is cryptography 101. Don't expect me to get into all of the crazy algorithms and math that's involved in cryptography and tell you how it's used. First of all, we'll start with cryptography. Essentially cryptography, you're taking something that everyone can see, standard message, picture, data, whatever you want to have and you're taking it and you're going to pass it through a bunch of equations and you're going to get out jarbled text that nobody knows what to do with. That's pretty much the essence of cryptography and you do the reverse to decrypt something and come back with the standard message. A little bit of where it started, cryptography started out a long, long time ago and some of the earlier crypto methods were transposition. So you can see here that what they did is they moved a bunch of characters around and you can do that. To get transposition cryptography. The other one I'm sure you've all seen on the back of cereal boxes and, you know, whatever, you know, gummy fruit that you may or may not eat. You see substitution and that's just pretty much lining up letters by letters and substituting for one another. So then the computer era allowed us to take data, you know, represented as ones and zeroes and things like that and pass those through those equations that we talked about and alluded to earlier and use a share function. So that's kind of how cryptography came about. So cryptography is a shared key to encrypt that data into unusable text for anybody. Some of the common algorithms that are used for this. I know this is a wall of text so this is pretty much as proof that there are thousands and thousands of different crypto types out there. The most common ones are up there. Some of the ones you may come across and some of the programs you may or may not use are up there and then there's even more of that. Typically, though, you want what's considered good crypto, cryptos that stood the test of time. That's open. You can actually see the mathematical equations in it. AES and blowfish and the ones listed up top are all open, people can see them. They've proved the test of time. People have tried to crack them and you know, you'll see lots and lots of talks here at DEF CON and people who are circumventing crypto and things like that. But not one of them is about actually breaking the math on crypto. So just know that most of the time when people are talking about breaking crypto, they're not actually breaking the math on crypto. They're actually because the math behind crypto was made by really, really smart people. Much smarter than I. All right. So get back to, you know, people. Crypto does rule. It absolutely rocks. Like I said, the math behind it is amazing. But by definition, crypto, you know, if you have a 128-bit key, it should take two to the 227th tries on average to crack it. So no supercomputer is going to be doing that. That takes forever. So people like to argue about how big of keys we should use, 128-bit, 256, 512, you know, all the way up to 4096. That's all great. But you're getting into a battle there of, like, well, how high should we make this fence? Should we make this fence two miles high, four miles high, eight miles high? Well, it comes a point where the attack vector is not going to be the fence any longer. If you have the crypto, you're not going to be able to do that. If you have the crypto, and the fence is built, people are probably going to try to go around the fence or under the fence. You know, the same analogy, if you had a box and it was made out of cardboard, you're not going to buy one of those awesome locks and expect someone to just start picking the lock. They're just going to tear through the cardboard. So those are a lot of people wonder, like, well, how much crypto should I use and things like that. So it's analogous to these pictures here where, yeah, you can lock things up, but you can also fail at locking things up. Should you encrypt everything? Just remember the data that you have and what you're trying to protect and who you're trying to protect it from. Those all come with the info sec mind and what people are here learning about. Yeah, this is going on further with that. The other attack vectors do exist. You know, the perfect example is that of that here. You can protect the heck out of something, but other ways people will find to get to your data. So now onto steganography. Steganography, essentially you're hiding one message within another. There's lots of different forms of steganography. It's a good example here. It started out a long time ago. A lot of kings and higher-ups in armies and things like that would tattoo messages in the backs of people's heads or on their heads after they shaved them and let the hair grow out and send them to somebody else and they could shave their head and read the message. Which is great and all. However, that takes time. Lots and lots of time for people's hair to grow. It grows at a different rate. Then moved into some things called micro dots. That was a big thing in like World War II. I don't know if you've seen the movie Paycheck, but in Paycheck there's a good example of that there. The guy has the extra stamp on the envelope and he gets under the microscope, zooms in on the eye and there's headlines from other disasters that are to come. If you haven't seen Paycheck, go see Paycheck. Semigram. These are analogous to what you guys would look at as hylographics. There are other ways to present them. But Semigram is really cool because you can have a picture and you will, unbeknownst to anybody else, that there's actually a message in that picture like, oh, the crow flying over the field means that the British are coming or something. Null ciphers. They moved into null ciphers. Those are really cool, too. But one of the bad parts about null ciphers is that you have to have a lot of text just to get a lot of text. So you have to have a lot of text to get a little message. I'm sure you've all seen on the Internet where somebody takes some form of null cipher, like the first line, and Rickrolls somebody in a paper, things like that, and you'll see the never going to let you down thing on the left-hand side. But like again, those are long, long papers that make a lot of sense, but you may not be knowing that there's actually a secret smaller message within. Anamorphosis. Try saying that ten times fast. That's an image that you can look at from one angle and can be one thing. Look at it from another angle. It can mean something totally different. This is a good example of that here where you have a mirrored cylinder and you can see them, you know, talking around what looks like some sort of beverage or food. Type spacing and offsetting. Again, this is a lot like the null cipher. You have to have a really, really long message in order to get out a really short message. So you have to have a really, really short message. So those are the shortcomings involved there. You'll end up with a really long message and you translate all the way across into something and you get something as simple as high. So modern steganography, a lot of people use that today. You guys probably use it and don't even know it. Metadata and all of your MP3s and things like that, that's technically steganography. If you didn't know it was there, it is definitely steganography, but it's all intended messages now, so you guys all know it's there. A lot of the things that what they do to hide that is, you know, in current things like metadata, they actually just add on to the data. And so it doesn't hurt the integrity of the actual file. But when you're hiding it and you don't want people to know it, what they'll do is hide it in the lowest bits, noisy bits, some things that are beyond the scope of what you would hear in an MP3 or view in a movie file or picture. But where it comes in is that that also creates entropy and that's how it can be detected. So you kind of have to be careful for that type of thing. So that's one of the things if you actually are hiding messages and things like that, there are ways that people will find it. So as you can see down there, you can see right here and here, these two, they don't fit in with the standard entropy of the whole data pallet or image pallet there. And they're stored in the lower bits. So let's combine them together. And as you can see, we took, you know, Darth Sidious encrypted the message, hid it in Senator Palpatine and you have Senator Palpatine. I tried to think really long and hard about what's a real life example that you guys would have seen of this. I thought long and hard and the best thing I could come up with was the movie Contact. So, you know, she hears the noise from the aliens, the vegans, and within that there is a message that's being broadcast and within that broadcasted message there is these plans and then within those plans there is a cipher or a primer and they use that primer and cipher to put together the plans for the space ship. When I encrypt, I like to use Ducrypt. That has good crypto in it. If we have time in a second, I'll get to the data on that. And then there's some cool ways to do steganography. A good free tool out there is Steghide. It does have the encryption piece into it so you can actually encrypt. And then there's a lot of other ways to do steganography and hide things within images on the fly right away. And we'll get into those in just a second. Let me hook up this mouse. So these are all freely available under the public license. So feel free to download them, use them. But pretty much Ducrypt is great. I'm just going to run through here to create a quick volume. Default settings are usually pretty good on this. Let's make it 2 gigs. And we'll make it password. Use good passwords. Oh, really? Good eye. Sorry, the angle that I have is really bad. I'm using password for my password. So if I forget, you can come up, right? You can use key files, too. So you can go ahead and ‑‑ oh. It will warn you that your password sucks. And that takes a second. It will format a volume for you. And then they'll put it out here. You guys can see. Well, that's good. Let's go ahead and do one ‑‑ let's go ahead and do one. That's pretty cool. Hopefully we don't have anything incriminating on here. Oh, crap. I'm being winded. Live demos suck, by the way. All right. And then you can put your output file in there. My super secrets.jpg. Done. So then, to the unbeknownst person, it just looks like Professor Zoiberg having a blast. But to us, if we want to ‑‑ oh, true. Great. We can extract it and browse, go to the desktop. Oh, my super secrets output file. We'll call it secrets.txt. And what was my password? I didn't? All right. Yay. There you go. So there's the text file for the secrets. Oh, I didn't set one. You're right. All right. That was true that I didn't set that one on. So, yeah, you can password protect them, too. I recommend that. All right. So as you can see ‑‑ oh, where did it create it? Yeah, it creates a new volume, but it wasn't mounted automatically. It's called secrets. Okay. Cool. All right. So then you can mount one. Set it as K. And then it's mounted as there. All right. And then it's mounted as there. You can go to your computer. And there she is. And you can go ahead and, you know, take all of your stuff and put it inside of it. And then it's encrypted and you can unmount it from there. That's a good way ‑‑ I know there's a lot of talks about, you know, how to circumvent a lot of security and things like that. But I figured a quick one‑on‑one on how to protect yourself from people who are trying to circumvent the security would probably be helpful for some of the people out there. Does anyone have any questions? Comments? Concerns? They're open and they've stood the test of time is pretty much the quick dirty answer to that question. There's high rewards out for people who can circumvent those ‑‑ that math. Like if you can crack that security, a lot of people will pay big money for that. If you want to do it yourself. If you want to find it, you want to sell it to the highest bidder. It's the exact size unless you use compression. You'll see in the tool there, this is my personal favorite one. I did not write it. But the guy who did is a bad‑ass. You can see that you can actually do the compression level here. So it's the exact size of the file unless you do that. Which comes into play when you want to make sure that you hide things in bigger files. So if you don't have enough lower level bits, then you obviously can't hide things inside of it. And you run out of bits to hide them in. And it becomes really apparent to people that you are, you know, doing steganography. In the back in the hat. I'm sorry. . . It's just what, the data? . Confiscating the data? . Yeah, I mean, that's how it started out and then it moved further and further into this. That's just what's considered early cryptography. I mean, in light of that, it's changed a lot over the years. And I would ‑‑ one would say that that's not really cryptography but you're just obscuring the data exactly. But, I mean, it's considered, you know, the roots of where this was founded. . I love two factor authentication. . Yeah. . I wouldn't, I mean, there are, again, like it comes into the things of what are you securing. I mean, if you don't need two factor authentication, you don't need it. But, I mean, if you really want that, then use it. . What's that? . You can use a key file as well. So you can have both. Like you have a shared key and a file that you would have to share with others. . . What's that? . No. Actually, it's a new, it's a total new date time stamp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .