From the course: CompTIA Network+ (N10-009) Cert Prep

Symmetric encryption

- I don't think you'd meet too many people out there anymore who don't appreciate that sometimes data needs to be encrypted. Now we do encryption all over the place in the computer world, everywhere from encrypting hard drives to encrypting email, to encrypting video. There's a lot of kinds of encryption going on. Now what I want to do at this point in the game is make sure we understand what encryption really means. So to do this, let's go ahead and start off with a string of text. So how about, I don't know, ilovemikemeyersnetworkplus. How does that look? Now, what we're going to do here is we're going to encrypt this text. Now to encrypt it, I'm going to start off with an oldie goldie, and anybody who's ever messed with a secret decoder ring knows about the Caesar Cipher, where basically we just take a ring, and there's the alphabet on one side, the alphabet on the other, and we turn it and then that increments each value. So what I'm going to do for starters here is I'm going to increment each position in the alphabet for each letter by three. So if we do that, all of a sudden ilovemikemeyersnetworkplus turns into something that looks something like this. Now, this is certainly encrypted, but the problem with an encryption like this is that anybody who buys crossword puzzle books for a living could probably hack this in about 12 seconds. So one of the cool things we have is that when we're working with a computer, we have the ability to really make very, very complicated algorithms. That's the process that stirs up the values. So, one of the things all of these algorithms have in common is something called a key. So let's go ahead and put this back to what we call the plain text, or clear text, and what I'm going to do this time is I'm going to pick an arbitrary value, which we're going to call the key. In this particular example, I want to use the number 32167594, so really what we're doing here is we're creating MIC's algorithm for encryption. So I'm going to say that the key always has to be eight characters, and it has to be a number between zero and nine. Okay? Now, what we're going to do is we're going to take that key, and we're going to keep repeating it underneath the clear text, so we just keep putting it in and keep putting it in, and if it doesn't quite fit on the end, who cares. So now we've got our clear text, and directly underneath it we have the key that's being repeated until it covers all of the clear text. So now I want to still use the Caesar Cipher, but instead of incrementing everybody by one common value, we'll use the value of the key. Now by doing that, we get a much more encrypted value that looks something like this. Now I'm not saying this isn't hackable, it is, but it's going to be a lot harder to hack than that simple Caesar Cipher we just saw, so the MIC algorithm is fantastic. Now, the important thing to appreciate is that in order for someone to be able to encrypt it, we need two things. We're going to need an algorithm and we're going to need a key value. So to help you understand the process, I brought in an algorithm machine. (laughs) So the secret to the algorithm machine is basically this. We start off with a piece of clear text. Now keep in mind this clear text could be anything, it doesn't even really have to be text, we just use the term clear text, but this could be a phone conversation, this could be a Microsoft Word document, it could be a webpage. I don't care what it is. The important thing is that it's in the clear, and based on whatever application we're using, it's legible and we can understand it. So the idea is that in order to encrypt something, we have to generate a key, we put the key into the algorithm, we run the clear text through the algorithm, (wheel turning) oop, it's done, and then we get cipher text. So, all algorithms work this way. You're going to have clear text, cipher text, some form of algorithm, and a key. Now, there's a couple of things you need to appreciate here. In this particular example, we're using what's known as Symmetric Encryption. So basically you take the exact same key, you put it in, oop, left it running, and then you take your cipher text, you run it through the same algorithm with the same key, (wheel turning) and you get clear text. This is important, because if I'm going to send you encrypted text, I can assume that you have the right algorithm box, but without the right key, you're not going to be able to decrypt this particular value. So that's one challenge. Whenever we send symmetrically encrypted data, you always have to have a key with it. Symmetric encryption is extremely common. For example, anybody who uses wireless networks, you're using either RC4 or AES encryption, well, you're not doing it but your wireless is doing this for you automatically, and they take care of all this for you, and it's done as an automatic process. So, remember, when we're talking about encryption, you're going to have clear text, cipher text, some form of algorithm, and a key.

Contents