00:04

So when it comes to encrypting and decrypting our data, we have two major types of encryption types. We have something called symmetric encryption, and we have something called asymmetric Encryption.

00:15

Symmetric encryption is when we use the same shared key to in crypt in decrypt data. So our algorithm that we talked about earlier in our previous example we had our key of 10 We when we use that shared key, we use that same shared key to encrypt the data plus 10

00:34

as we did when we decrypted the data

00:36

minus 10. So it's the same shared Kiefer encrypting the data and decrypting the data.

00:43

some problems that symmetric encryption presents is that we must trust the other party that we're sending the data to and that we're sending the pre shared key to because anyone who has that key of 10 could impersonate anyone else. If we send, Appreciate if everyone is encrypting their data with

01:03

or everyone is encrypting their data with 10 and they all know that. Okay, I'm gonna decrypt this data with 10 then they know. Okay, this is a pre shared key. That means that I can encrypt this data with plus 10 to, so they could encrypt their data with 10 and then say, Oh, yes, I'm Anthony. I know the encryption algorithm to encrypt his password.

01:26

If everyone knows if everyone knows the pre shared key for a symmetric encryption, then there's no non repudiation.

01:34

That means anyone with the pre shared key can be Impersonating anyone else. There's no there's no there's no non repudiation. There's no proving that one person that there's no way you can send encrypted data using symmetric encryption without giving them the same key that you used to encrypt. That data

01:55

you are giving them the same is you're giving them the master key,

01:57

the same key that you used to encrypt the data there, decrypting the data with. So if you trust them enough to give them the decryption key, then you're trusting them to pretend that they argue

02:08

so, so symmetric. Encryption is is not useful for situations where we need to have non repudiation situations where we need to make sure that we meet that we may not 100% trust the other person yet, so we need another way that we can encrypt and decrypt data,

02:31

is asymmetric encryption. Now, asymmetric encryption algorithms are typically we have, ah, a bit more complex. Mathematically, then our standards symmetric. Encryption algorithms,

02:45

asymmetric encryption algorithms are different encryption and decryption keys.

02:52

what that means is we use a different key to encrypt that we use a different key to lock up the data and encrypt it.

03:00

Then we do to unlock the data and decrypted.

03:02

Now what does the pope? What's the purpose of this? Why does this help us? Well, it's the basis of P k I. R P K. I set up. That's the basis of our public key infrastructure. Our public key infrastructure is what allows us to offense is allows us to authenticate users and

03:21

against us particular server. It allows us to encrypt data and send it to a user, and only they can be cryptic. It allows us to connect to an https Web server and make sure that they are who they say they are so public. He Our public key infrastructure is a very important aspect

03:39

of modern encryption in modern authentication.

03:45

So with asymmetric it with asymmetric encryption, we have two keys

03:50

we have a public key and we have a private key.

03:54

Our public key is the key that is widely distributed and given out to whoever needs it.

04:02

This is the key that is, eight that is going to be used to publicly encrypt our data when it's say, actually sent to us.

04:15

let's say we have Alison, Bob

04:20

are sending messages back and forth.

04:24

Alice has Bob's public key,

04:28

and by using Bob's Public Key, she's able to encrypt an email to him.

04:33

So Alice takes Alice, takes an email. And remember all data. All computer data is just numbers. So this email is just a bunch of numbers in data.

04:46

She takes all those numbers,

04:47

puts it into the algorithm, and then remember, our key is a component of that algorithm.

04:54

So then he puts in that key,

04:57

puts it into the algorithm, and then this data becomes encrypted in transit.

05:01

So when it's being sent over the Internet, it's encrypted,

05:06

and it's encrypted with Bob's public key.

05:11

and Bob, when we encrypt data with a public key, the only thing that can un encrypt that data

05:19

The private KIIS secret. You don't tell anybody else your private key other than yourself,

05:26

but you don't need to tell yourself because you would know it.

05:28

And your private key is secret.

05:31

So Bob receives this email that was scrambled up and encrypted,

05:42

and he knows that it was encrypted with his public key.

05:46

Remember, the encryption has a public. He in a private key.

05:48

The public he is given to everyone.

05:51

Private Key is just for you.

05:54

Using his private key, he is able to decrypt this data

05:59

so he gets this email. It's encrypted with his public key, and he's able to decrypt it with his private key. He's able to you. It's the same algorithm, but it's or it is out of the same algorithm. But it's a different key. So different Key is used to decrypt the data than encrypted,

06:14

so he receives it, and he's able to decrypt it with his private key.

06:18

So no matter who sends Bob e mails, if they as long as they're encrypting them with Bob's public key, he is the only one who can decrypt them.

06:30

The public. When we generate a public and a private key in an asymmetric encryption. They're linked. They're mathematically linked together.

06:38

Are we generate that we generate the public key and private key. And they're just really, really big long prime numbers. And there's really, really big, long prime numbers we use put in our encryption. And they're mathematically linked together so that our public so that our private key can decrypt our public key whatever, whatever our public key and Chris

07:00

a little bit of a complex, little bit of a complex idea. So let's talk. Let's talk through this a little bit more.

07:06

we've taken this public key. We've given it to everybody. Anyone is able to encrypt e mails to Bob, but only he can decrypt them with his private key.

07:16

Now Bob wants to send an email to Alice.

07:24

that he wants to send Alice,

07:27

but he can't, and he isn't gonna encrypt it with his public key.

07:30

Well, why not? Why can't you just encrypt with his public E?

07:33

Well, he's the only one with his private key,

07:38

and anything encrypted with a public key can only be open with his private key.

07:44

So it's sort of like, Whoa, it would only really work if he was sending it to himself.

07:50

The awesome thing and the very mathematically amazing thing about asymmetric encryptions

07:57

is Bob can actually encrypt this packet or encrypt this email with his private key,

08:05

and it can be opened

08:09

and the pure and simple fact that that Alice is able to decrypt this data with Bob's public. He means that it was created with his private key,

08:22

so because they're mathematically linked and because the public key is given to everybody and the private key is only given to one person, Asymmetric encryption provides for non repudiation.

08:33

If you receive an encrypted packet and you're able to decrypt it with your private key, that means it was encrypted with your public key.

08:41

If you send a packet of somebody and it's able to be decrypted with the public key, that means it was encrypted with the private key there mathematically linked, and they work together to encrypt and decrypt data so that you don't have to give everybody the same shared key.

08:58

That way we can provide for non repudiation. That way we know that the person sending something is who they say they are.

09:05

So in this situation, Bob wouldn't at actually would not be. Wood

09:11

would hopefully not be sending it with his private key, but would actually be sending it with his own. He would be sending with Alice's public key. He could encrypt it with Alice's public key, and that way she can open the data with her with her with her private key. Or it could send it with Alice consented with her private key, and Bob could open it with

09:30

his public key for her, whichever the case may be.

09:33

But essentially the things to remember right now on the thing to get out of this right now is that an asymmetric encryption? We use different keys for encrypting and decrypting the data.

09:46

Whatever key you encrypt the data with the other key has to decrypt it.

09:50

The public key. If you decrypt a message with a public key, the public, he can't decrypt it,

09:56

it'll just encrypted all. It'll just you'll just get a whole bunch of mess of message. You won't get the actual message by decrypting the data with the same key that you encrypted with.

10:07

If you encrypt the data with your private key. You can't decrypt it again with your private key, but because your public he is common knowledge. It's no big deal if if you don't, if you lost your public key as long as it's common knowledge, you just get it again and you decrypt that data. Your private key is that the one you don't want to lose because it's the other side of that key pair.

10:26

They're the two pairs of keys into this relationship, the public in the private key.

10:33

that is the are asymmetric encryption is the basis of our p k I. R. Public infrastructure, and we have our public key in our private key. If you don't get it, if you aren't quite getting it just yet, it's okay. Next we're gonna talk about hashing and hashing is gonna give us a little bit more information

10:52

and will give us a little bit more insight into our public. E r P k are public key infrastructure