One of the big problems with symmetric encryption is that in order for somebody to decrypt your encrypted
data they have to have a copy of the key.
So in a symmetric encryption environment keys are passed around through whatever the internet the wireless
whatever it might be and that can cause potential problems.
Because if somebody can get their hands on the key and the encrypted text Well they can pretty much
hack it.
So three guys a longtime ago called Rivest Shamir and Adleman created a new methodology for encryption
that they called asymmetric encryption.
Now asymmetric encryption is very very interesting.
And in order for me to show you how it works I'm going to have to enlist some help from my buddy Mike
Jones. I'm Mike Jones.
Ok not the rapper but why not.
He's from Houston.
The big difference between asymmetric and symmetric encryption is that with asymmetric encryption you
don't have one key.
You've got two.
So you have what's called a public key and then you have what's called a private key.
Now this is kind of cool because public key will be blue here. If you have a public key and you put it
into your algorithm
the only thing this guy could do the moment that public key is in there is encrypt.
That's it.
Equally if I put in a private key
the only thing this guy can do is decrypt.
Now if you think about this for a minute it's actually pretty cool because what can take place is I
can generate a public and a private key and we actually have something built into the algorithm that generates
these keys.
And what I do is I will send my public key to Mike Jones. Now that I've got Mike Myers public key
I'm going to go ahead and send him my public key.
So this process of exchanging keys is known as a ta-da key exchange. With a key exchange
either of us can encrypt data and then the encrypted data is sent over the wire.
And then we use our private keys to decrypt the data.
The nice thing about asymmetric encryption is that we don't worry about keys too much. In particular
nobody can really do much with a public key other than encrypt something and if they don't send it to
the right person who has the right private key they're not really going to be able to do too much.
We do tend to protect our private keys and we'll lock them down in some form of encrypted folders or something
like that on our hard drives.
And also we tend to have a lot of public keys that we get from a bunch of people so if I ever want to
send Mike Jones any more encrypted stuff I need to keep his public key around as well as a bunch of
other folks.
And those tend to be stored in some kind of local storage or sometimes an online storage for public
keys at least where we can access them easily.
The important thing to remember about public keys is that you're always going to have a key pair: the
public key encrypts and the private key decrypts.