I don't think you'd meet too many people out there any more 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 e-mail 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 I love Mike Meyers network
plus. 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 this Caesar cipher.
We're basically we just take a ring and there's the alphabet on one side the alphabet 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 I love Mike Meyers network plus 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 the 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 and put this back to the what we call the plaintext or clear text.
And when 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 3 2 1 6 7 5 9 4.
So really what we're doing here is we're creating Mike'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
0 and 9.
OK.
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.
If it doesn't quite fit on the end who cares.
So now we've got our clear text and directly underneath that 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 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 Mike 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.
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 web page.
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. Oh it's done. And then we get ciphertext.
So all algorithms work this way.
You're going to have clear text ciphertext 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, oops left it running, and then you take your ciphertext
you run it through the same algorithm with the same key
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 decryption
is extremely common.
For example anybody who uses wireless networks you're using either RC4 or AES encryption.
You're not doing it but your wireless is doing this for you automatically.
And they take care of all of this for you and it's done.
It is an automatic process.
So remember when we're talking about encryption
you're going to have clear text ciphertext some form of algorithm and a key.