1 - Cryptography Basics

CBTVid
18 Jan 202115:22

Summary

TLDRThis script delves into the world of cryptography, a practice as old as communication itself. It explains the fundamental need for secure messaging and introduces the concept of transforming readable messages into unreadable 'ciphertext' to prevent unauthorized access. The script covers encryption and decryption algorithms, distinguishing between symmetric and asymmetric methods, and highlights the importance of key sizes in security. It also explores hashing algorithms, emphasizing their role in ensuring message integrity rather than confidentiality, and explains the use of HMAC for user authentication in secure communications.

Takeaways

  • 🔒 Cryptography is an ancient concept, designed to secure messages from unauthorized access.
  • 📜 The core of cryptography is transforming readable plain text into unreadable cipher text to ensure security during transmission.
  • 🔄 The process involves both encryption, converting plain text to cipher text, and decryption, converting cipher text back to plain text.
  • 🔑 Keys are essential in cryptography, used in conjunction with algorithms to encrypt and decrypt messages, ensuring that only authorized parties can read the content.
  • 🔒🔑 Symmetric algorithms use the same key for both encryption and decryption, while asymmetric algorithms use a pair of keys, one for each process.
  • 🔑🔑 Asymmetric algorithms, like RSA, have larger key sizes and require more computational resources, making them slower but also more secure.
  • 🔐 Advanced Encryption Standard (AES) is considered a highly secure symmetric algorithm, with variable key sizes up to 256 bits.
  • 🔎 Hashing algorithms are one-way functions that create a digital fingerprint of data, ensuring the integrity but not the confidentiality of the message.
  • 📈 Different hashing algorithms, such as MD5, SHA-1, and SHA-2, have varying levels of security and generate hash files of different lengths.
  • 🔒🔍 Hashed Message Authentication Code (HMAC) combines hashing with a secret key to verify both the integrity and authenticity of a message.
  • 🌐 HMAC is used in protocols like SSL to ensure secure communication, demonstrating the practical applications of cryptographic techniques.

Q & A

  • What is the fundamental purpose of cryptography?

    -The fundamental purpose of cryptography is to transform a message into a secure form so that unauthorized individuals cannot read the content of the message.

  • What is the difference between plaintext and ciphertext?

    -Plaintext is a readable message, while ciphertext is the result of an encryption process that makes the message unreadable to anyone without the decryption key.

  • What is an encryption algorithm?

    -An encryption algorithm is a process used to convert plaintext into ciphertext, ensuring the message is secure from unauthorized access.

  • Why is a key necessary in the encryption process?

    -A key is necessary to ensure that only those with the correct key can decrypt the ciphertext back into plaintext, thus maintaining the confidentiality of the message.

  • What are the two main types of encryption algorithms?

    -The two main types of encryption algorithms are symmetric algorithms, which use a single key for both encryption and decryption, and asymmetric algorithms, which use a pair of keys, one for encryption and one for decryption.

  • What is the difference between symmetric and asymmetric encryption algorithms?

    -In symmetric encryption, the same key is used for both encryption and decryption, while in asymmetric encryption, a public key is used for encryption and a private key, known only to the recipient, is used for decryption.

  • What is the Advanced Encryption Standard (AES)?

    -The Advanced Encryption Standard (AES) is a widely used symmetric encryption algorithm that can work with multiple key sizes, such as 128, 192, or 256 bits, making it highly secure.

  • Why are larger key sizes in encryption algorithms considered more secure?

    -Larger key sizes make it computationally more difficult for unauthorized individuals to crack the encryption through brute force methods, thus enhancing the security of the encryption.

  • What is a hashing algorithm and how does it differ from encryption algorithms?

    -A hashing algorithm is a one-way function that converts an input message into a fixed-size output called a hash or digest. Unlike encryption, it is not meant to be decrypted; it is used to verify the integrity of the message.

  • What is the purpose of a hashing algorithm in the context of message integrity?

    -The purpose of a hashing algorithm is to ensure that the message has not been altered in any way during transmission. The recipient can verify the integrity by generating a hash of the received message and comparing it with the hash provided by the sender.

  • What is Hashed Message Authentication Code (HMAC) and how is it used for message authentication?

    -HMAC is a technique that combines a hashing algorithm with a secret key to provide an additional layer of security and authentication. It ensures that the message came from the claimed sender and has not been tampered with during transmission.

  • Why might asymmetric encryption be slower than symmetric encryption?

    -Asymmetric encryption might be slower than symmetric encryption because it requires more computational power to handle the larger key sizes and the more complex mathematical operations involved in the encryption and decryption processes.

Outlines

00:00

🔒 Cryptography: The Art of Secure Communication

This paragraph introduces the fundamental concept of cryptography, which has been in existence for thousands of years to address the concern of unauthorized access to messages. It explains that cryptography is the practice of transforming readable messages (plain text) into a non-readable form (cipher text) to prevent unauthorized reading. The process involves using an encryption algorithm along with a key to encode the message, and the same key is required to decode it back to plain text. The paragraph also distinguishes between symmetric and asymmetric encryption algorithms, highlighting the use of a single key in symmetric algorithms like DES and triple DES, and two different keys in asymmetric algorithms like RSA. It concludes by emphasizing the importance of the key in maintaining the security of the message.

05:00

🗝️ Key Sizes and Encryption Strength

The second paragraph delves into the importance of key size in encryption algorithms, illustrating how larger keys contribute to stronger encryption. It mentions the Data Encryption Standard (DES) with a 56-bit key and the Advanced Encryption Standard (AES), which supports variable key sizes of 128 or 256 bits. The paragraph also discusses the trade-offs between symmetric and asymmetric algorithms, noting that while asymmetric algorithms offer larger key sizes and are more secure, they require more computational resources and can slow down communication. Additionally, it introduces hashing algorithms as a third type of cryptographic function, which are one-way and used to ensure the integrity of a message rather than its confidentiality.

10:01

📜 Hashing Algorithms and Their Applications

This paragraph focuses on hashing algorithms, which are used to create a digital fingerprint or a fixed-size digest of a message. It explains that hashing is a one-way process and contrasts it with the two-way encryption process. The paragraph lists various hashing algorithms, including MD5, SHA-1, SHA-2, and RIPEMD, and discusses their evolution and the increasing security they offer with larger hash sizes. It also describes how hashing is used in applications like HMAC (Hash-based Message Authentication Code) to authenticate the sender of a message by using a shared secret key in conjunction with a hashing algorithm.

15:02

🔗 HMAC and Its Role in Secure Communications

The final paragraph discusses the application of HMAC in secure communications, particularly in protocols like SSL. It provides a practical example of how HMAC can be used between two users, Alice and Bob, to ensure that a message indeed comes from the claimed sender. The process involves Alice encrypting a message with a shared secret key and generating a hash file using a hashing algorithm. She then sends the hash file and the encrypted message to Bob. Upon receipt, Bob uses the same hashing algorithm and secret key to verify the hash file's integrity, confirming the message's authenticity before decrypting it. This use case highlights the importance of HMAC in maintaining both the integrity and authenticity of messages in digital communications.

Mindmap

Keywords

💡Cryptography

Cryptography is the practice of secure communication techniques that allow only the intended recipient to understand the message. It is central to the video's theme as it discusses its historical importance and modern applications. The script explains that cryptography transforms readable messages into a secure form to prevent unauthorized access, illustrating this with the example of a general sending a message to another general securely.

💡Plain Text

Plain Text refers to the original, human-readable form of a message before it is encrypted. In the context of the video, plain text is the starting point for the encryption process, which is essential for understanding how messages are secured. The script mentions that plain text is converted into cipher text through cryptographic processes to ensure confidentiality.

💡Cipher Text

Cipher Text is the result of encrypting plain text using a cryptographic algorithm. It is a key concept in the video as it represents the unreadable form of a message that protects the content from unauthorized readers. The script explains that cipher text is created by transforming plain text through encryption algorithms, ensuring that even if someone intercepts the message, they cannot understand its content without the key.

💡Encryption Algorithm

An Encryption Algorithm is a set of mathematical processes used to convert plain text into cipher text. The video emphasizes the importance of these algorithms in securing messages. The script provides examples such as the Data Encryption Standard (DES) and Advanced Encryption Standard (AES), explaining how they use keys to transform messages into a secure form.

💡Key

In cryptography, a Key is a piece of information that determines the output of the encryption algorithm. It is crucial to the video's narrative as it ties the security of messages to the use of keys. The script explains that keys are used in conjunction with encryption algorithms to create cipher text and are essential for both encryption and decryption processes.

💡Symmetric Algorithm

A Symmetric Algorithm is a type of encryption algorithm that uses the same key for both encryption and decryption. The video discusses this concept to illustrate a common method of securing messages. The script mentions that symmetric algorithms like DES and Triple DES use a single key, making them efficient but requiring secure key distribution.

💡Asymmetric Algorithm

Asymmetric Algorithm, also known as public-key cryptography, uses two different keys: one for encryption and one for decryption. The video explains that this type of algorithm allows for more secure key management. The script provides RSA as an example, highlighting that it uses a larger key size compared to symmetric algorithms, which affects performance and security.

💡Hashing Algorithm

A Hashing Algorithm is a one-way function that converts an input into a fixed-size string of characters, which is typically used for verifying data integrity. The video introduces this concept to show a different application of cryptography. The script explains that hashing algorithms like MD5 and SHA-1 produce a digest that ensures the integrity of a message without the ability to decrypt it.

💡Digest

In the context of hashing, a Digest is the output generated by a hashing algorithm, often referred to as a digital fingerprint or hash file. The video discusses digests to illustrate the one-way nature of hashing. The script mentions that regardless of the size of the input, the output (digest) is always of the same size, ensuring consistency.

💡HMAC

HMAC, or Hashed Message Authentication Code, is a specific type of message authentication mechanism that uses cryptographic hash functions in combination with a secret cryptographic key. The video explains its application for user authentication. The script describes how HMAC works with a secret key and a hashing algorithm to ensure that a message has not been tampered with during transmission.

💡SSL Protocol

SSL (Secure Sockets Layer) Protocol is a security technology for establishing an encrypted link between a web server and a web client. The video briefly mentions its application of HMAC for secure communication. The script indicates that SSL uses cryptographic techniques, including HMAC, to ensure data integrity and confidentiality during web transactions.

Highlights

Cryptography has been a concept for thousands of years, addressing the concern of unauthorized access to messages.

Cryptography is the art of transforming a message into a secure form to prevent unauthorized reading.

The process involves converting plain text to ciphertext, making it unreadable without the proper key.

Encryption algorithms are used to convert plain text to ciphertext and vice versa.

A key is essential in cryptography to ensure that only authorized parties can decrypt the message.

There are two types of encryption algorithms: symmetric and asymmetric.

Symmetric algorithms use a single key for both encryption and decryption.

Asymmetric algorithms use a pair of keys, one for encryption and another for decryption.

Data Encryption Standard (DES) and Triple DES are examples of symmetric algorithms.

Advanced Encryption Standard (AES) is widely used and considered highly secure.

Key size in encryption algorithms affects the strength of the encryption.

Asymmetric algorithms require more computational resources and are slower than symmetric ones.

Hashing algorithms are one-way functions used to ensure the integrity of a message.

Hashing algorithms produce a fixed-size digest or digital fingerprint of the input message.

MD5, SHA-1, and SHA-2 are examples of popular hashing algorithms with varying levels of security.

HMAC is used for message authentication by combining a secret key with a hashing algorithm.

SSL protocol utilizes HMAC for secure communication.

The choice between symmetric and asymmetric algorithms depends on the application's need for speed and security.

Transcripts

play00:00

cryptography is a concept that has been

play00:03

around for

play00:04

thousands of years so it's not something

play00:06

new

play00:07

and the reason for that is that people

play00:10

have always had this concern that when

play00:12

they send a message

play00:13

to a recipient someone unauthorized get

play00:16

access to that message and read the

play00:18

content of the message

play00:19

now that message could be something that

play00:21

a general is sending to

play00:23

another general or it could be something

play00:26

that you know a person is sending to

play00:27

another family member

play00:29

so cryptography is an answer to that

play00:32

concern

play00:33

now what is cryptography it's basically

play00:35

the art of

play00:36

transforming a message into a secure

play00:39

form so that

play00:41

someone unauthorized cannot read the

play00:43

content of the message

play00:44

so we're transforming a clear text

play00:46

message

play00:47

to some gibberish that is not readable

play00:50

and understandable by people

play00:52

so you have a plain text a readable

play00:54

message

play00:55

and you send that readable message

play00:57

through some processes

play00:59

and in that processes the message gets

play01:02

converted to

play01:03

something which is not readable to some

play01:05

gibberish that

play01:06

if somebody gets access to that message

play01:08

they cannot read it

play01:10

so that uh message which is not readable

play01:14

is called ciphertext so i have plain

play01:17

text

play01:17

i send it through some processes and

play01:19

then i get

play01:21

cipher text now during this process

play01:24

you're basically encoding your message

play01:26

or you're in ciphering the message now

play01:29

when the recipient receive

play01:31

this message they cannot read the

play01:32

message either

play01:34

so what they do is they have to send

play01:37

that message

play01:37

through the same processes and get the

play01:40

message converted back to something

play01:43

which is readable which we call it plain

play01:44

text

play01:46

now this process of converting message

play01:49

from plain text to ciphertext

play01:51

is called encryption algorithm so the

play01:53

whole process

play01:54

is called algorithm and when you use it

play01:57

for encryption

play01:58

we call it encryption algorithm now the

play02:00

problem with

play02:01

this process of converting plaintext to

play02:04

ciphertext

play02:05

using an encryption algorithm is that if

play02:08

an

play02:08

unauthorized person gets access to the

play02:11

ciphertext

play02:12

and if they come to know what algorithm

play02:15

you've used

play02:16

then nothing stops them from sending

play02:18

your ciphertext through the same

play02:20

algorithm to get the plain text and read

play02:22

the content of the message

play02:24

now to address this issue

play02:28

they have come up with a key so

play02:31

when you're sending your message the

play02:33

plaintext through the

play02:35

encryption algorithm you send that key

play02:38

to that algorithm too

play02:40

so you use the key and plain text

play02:42

together

play02:43

in that algorithm to convert the plain

play02:46

text message

play02:47

to some gibberish or to cipher text so

play02:50

i'm not going to say gibberish anymore

play02:52

i'm going to say cipher text from now on

play02:55

so now i have the ciphertext and

play02:58

i use the plain text with the algorithm

play03:00

and the key

play03:01

to get that ciphertext so as i mentioned

play03:05

before if you want to

play03:06

convert the ciphertext to uh plain text

play03:09

then you have to send that ciphertext

play03:11

and the key to the same algorithm

play03:14

and get your text converted back to

play03:16

plain text

play03:19

now the algorithm when it's used for

play03:22

encryption

play03:23

we call it encryption algorithm and when

play03:25

we use the same algorithm for decryption

play03:28

we call it decryption algorithm all

play03:31

right

play03:31

now that you know that we have an

play03:33

algorithm that can be used for

play03:34

transforming

play03:35

a plain text to ciphertext or ciphertext

play03:38

to plain text

play03:39

you need to know that we have different

play03:41

types of encryption algorithms

play03:44

we basically have two types of

play03:45

encryption algorithm

play03:47

one is symmetric algorithm in symmetric

play03:50

algorithm you use

play03:52

one key to transform the plain text to

play03:55

ciphertext

play03:56

and you use exactly the same key to

play03:59

transform the ciphertext to plaintext

play04:04

the second type of algorithm is

play04:06

asymmetric algorithm

play04:08

now in asymmetric algorithm you have two

play04:10

keys

play04:11

you use one key for encryption and you

play04:14

use the other key for decryption

play04:17

if you use the first key for encryption

play04:20

you have to use the second key for

play04:22

decryption

play04:23

you cannot use the first key for

play04:25

decryption

play04:27

and if you use the second key for

play04:28

encryption then you have to use the

play04:30

first key for

play04:32

decryption that is the difference

play04:34

between these two algorithms

play04:36

now we have so many different algorithms

play04:39

that are

play04:39

categorized under symmetric and

play04:42

asymmetric

play04:43

so if you look at this slide we have a

play04:46

data encryption standard that's

play04:48

an encryption algorithm which is a

play04:50

symmetric algorithm

play04:52

we have a triple des which is basically

play04:56

data encryption standard but you use it

play04:58

three times

play05:00

and the reason that you do that is to

play05:02

make the algorithm

play05:03

more stronger more secure

play05:06

another type of algorithm that we have

play05:08

which has been widely used nowadays and

play05:11

it's the most secure one

play05:13

is called advanced encryption standard

play05:15

or aes

play05:17

if you look at all these algorithms you

play05:19

can see that they have different

play05:21

sizes of keys that can be used with for

play05:24

example data encryption is

play05:26

a standard has a key of 50

play05:29

56 bit so that means when you want to

play05:32

use this algorithm

play05:34

the key that you're going to use is

play05:36

going to be 56 bits of

play05:38

key you send that key and your text

play05:41

to this algorithm to get the ciphertext

play05:45

when it comes to advanced encryption

play05:47

standard it can

play05:48

work with multiple sizes of keys

play05:51

you can have a key of size 128 bit

play05:55

or 256 bit so the larger the size of

play05:59

your key

play06:00

the stronger your encryption can be and

play06:03

the difference between this symmetric

play06:05

algorithm is

play06:06

basically the mathematic procedures that

play06:09

they use

play06:09

to convert the plaintext to ciphertext

play06:13

now if the mathematic procedure is very

play06:16

sophisticated

play06:17

then that makes the algorithm more

play06:20

powerful

play06:21

stronger algorithm and if the key size

play06:23

is longer

play06:24

that makes even the algorithm stronger

play06:27

now on the right side of screen you can

play06:29

see we have asymmetric

play06:30

algorithm and rsa is an example of that

play06:33

we have more

play06:34

asymmetric algorithms of course but i

play06:37

have

play06:37

just put the most popular one uh which

play06:40

is rsa and it's been around for

play06:42

quite a long time so as you can see the

play06:45

size of the key with the

play06:47

asymmetric algorithm is significantly

play06:50

bigger than

play06:51

what we have in symmetric algorithm now

play06:54

you may be asking

play06:55

that since asymmetry has larger key size

play06:58

compared to a symmetric algorithm

play07:01

why do we need to use symmetric

play07:02

algorithm why don't we use asymmetric

play07:04

algorithm for everything

play07:06

well one reason for that is the

play07:09

resources that you need to handle

play07:12

asymmetry keys

play07:13

for example if you're using asymmetric

play07:16

key

play07:16

the communication the speed of the

play07:18

communication might be

play07:19

much slower than symmetric algorithm and

play07:22

you need a lot of

play07:23

cpu power to handle asymmetric algorithm

play07:27

imagine you're accessing a website using

play07:30

a secure http protocol

play07:32

and if that website uses asymmetric

play07:35

algorithm all the way then the

play07:38

communication with that website is going

play07:40

to be really slow and you will see that

play07:42

your cpu usage is going to be really

play07:44

high to handle all these encrypted

play07:46

traffics using asymmetric algorithm

play07:49

the third type of cryptographic

play07:51

algorithm that we have is called

play07:53

hashing algorithm now the difference

play07:56

between hashing algorithm and the

play07:58

previous two

play07:59

is that hashing algorithm is a one-way

play08:02

algorithm

play08:03

so when you encrypt your message you

play08:05

cannot decrypt it back

play08:07

and technically with hashing algorithm

play08:09

you're not really

play08:10

encrypting your message the result of

play08:13

hashing algorithm is called

play08:15

a digest or a digital fingerprint

play08:18

or a hash file so when you send your

play08:22

message through a hashing algorithm

play08:24

it goes through some calculations some

play08:27

mathematical procedures

play08:28

and the end result is going to be a

play08:31

digest of the file

play08:32

or a hash of that file now you may be

play08:35

asking

play08:36

why do we need such an algorithm if i

play08:38

cannot decrypt the message that i

play08:40

encrypted

play08:41

then what's the point of using this

play08:43

algorithm

play08:44

well that's a very good question that i

play08:46

asked for you

play08:48

in the symmetric and asymmetric

play08:51

algorithm

play08:52

you are encrypting a message so these

play08:54

algorithms protect the confidentiality

play08:57

and

play08:57

integrity of the message hashing

play09:00

algorithm

play09:01

is just for the integrity of the message

play09:04

because in hashing algorithm you don't

play09:06

need to have a key you

play09:08

just need to know the algorithm so when

play09:11

i send a message to someone i just tell

play09:13

them

play09:13

what hashing algorithm i used and then

play09:16

they can use the same algorithm to check

play09:18

the integrity of the message that i sent

play09:21

to them

play09:21

now the way that this works is that when

play09:24

i want to send the message to someone

play09:26

else

play09:27

i calculate a hash of that message

play09:31

and then i send the message with the

play09:34

hash file to the recipient

play09:36

then when the recipient receives that

play09:38

message they're going to use the

play09:40

same hashing algorithm to generate a

play09:43

hash of that file

play09:44

if the produced hash is exactly the same

play09:47

as the one that i sent to them

play09:49

then they know that the message is

play09:52

intact and

play09:53

nothing with the content of that message

play09:55

has been changed

play09:57

so when you use this algorithm you don't

play09:59

really care that

play10:01

someone sees the content of your message

play10:03

what you care is

play10:04

the recipient receives the exact message

play10:07

that you sent to them

play10:09

now one thing about the hashing

play10:11

algorithm

play10:12

is that whether you send a letter a page

play10:16

or 10 volume book as an input to the

play10:19

hashing algorithm

play10:20

the end result is going to be the same

play10:23

size

play10:24

now the same way that we had multiple

play10:27

algorithms

play10:28

with symmetric and asymmetric algorithms

play10:31

in hashing also we have different types

play10:33

of

play10:34

algorithms and the main difference

play10:36

between these

play10:37

different algorithms is in the

play10:39

mathematical calculation of the digital

play10:42

fingerprint or the hash file

play10:44

one of the earliest and most popular

play10:47

hashing algorithm

play10:49

is md5 or message digest five

play10:52

now the five is the version of this

play10:55

algorithm so it started from message

play10:57

digest one and

play10:58

two and then it reached the message

play11:01

digest 5.

play11:03

as you can see the length of the hash

play11:06

file that is generated by message digest

play11:08

5

play11:09

or md5 is 128 bit so as i said whether

play11:13

you send a letter

play11:14

or a page to this uh hashing algorithm

play11:18

the end result is going to be 128 bit

play11:21

now later some vulnerabilities were

play11:23

found with

play11:24

md5 and then sha1 was

play11:27

introduced as a more secure hashing

play11:30

algorithm

play11:31

as you can see sha generates a 106

play11:35

bit hash file so whatever you send to

play11:37

sha

play11:38

1 the end result is going to be 160 bit

play11:42

and then sha 1 also was found to be

play11:46

a little bit vulnerable and then shot 2

play11:48

was introduced as a more secure version

play11:51

of

play11:51

sha-1 and sha2 generates a different

play11:55

hash sizes

play11:56

as you can see the hash length can be

play11:58

224 bit

play12:00

all the way to 512 bit recently

play12:03

shot 3 has been introduced as the most

play12:07

secure version of

play12:08

sha2 another type of hashing algorithm

play12:12

that we have

play12:13

is called race integrity primitives

play12:16

evaluation message digest or

play12:19

ripemd now this algorithm

play12:23

was created by race which is a european

play12:27

union affiliated

play12:28

organization as you can see this

play12:31

algorithm also generates

play12:33

hash files in different sizes

play12:36

now there are other hashing algorithms

play12:39

out there but

play12:40

what you see in these slides are the

play12:42

most common and popular ones

play12:45

one of the usage or applications of

play12:48

the hashing algorithm is in hashed

play12:51

message

play12:52

authentication code as the name says

play12:55

here this hashed message authentication

play12:58

code is used for

play12:59

authenticating a user let me explain how

play13:03

it works

play13:04

let's say we have two users alice and

play13:07

bob

play13:07

and these two uh when they send a

play13:10

message to each other they want to make

play13:11

sure that the message came from the

play13:13

right person

play13:14

so they want to use hmac for

play13:16

authenticating each other

play13:18

now both of these users have same secret

play13:21

key so they both agreed on the same

play13:24

encryption algorithm and they generated

play13:26

as the same secret key to use with that

play13:29

symmetric algorithm when they exchange

play13:31

messages now let's say alice wants to

play13:34

send a message to bob so

play13:36

she uses the same secret key that they

play13:38

have to encrypt that message

play13:40

and then she uses a hashing algorithm

play13:43

to generate a hash file for that

play13:46

encrypted message

play13:48

and the key the secret key that she has

play13:52

the end result is gonna be a hash file

play13:55

now

play13:55

next thing that she's gonna do is send

play13:58

this hash file and the encrypted message

play14:01

to bob

play14:03

when bob receives the message before

play14:05

decrypting the message

play14:06

he is going to make sure that the

play14:08

message actually came from alice

play14:10

so the way that he is going to do that

play14:12

is by using the same hashing algorithm

play14:16

he's gonna send the same encrypted file

play14:18

and the secret key that he has to that

play14:20

hashing algorithm

play14:22

to generate a hash file then

play14:25

when he generates that hash file he's

play14:27

gonna compare that hash file with the

play14:29

one that

play14:30

alice sent to him if these two hash

play14:33

files are exactly the same

play14:35

then he knows that the message came from

play14:38

alice because

play14:39

alice is the one who has that key and

play14:43

without that key there was no way that

play14:45

bob could get the same

play14:47

hash file so now that he knows that the

play14:50

message came from alice

play14:52

he can use the same secret key that he

play14:54

has to decrypt the message

play14:56

and see the content of that message so

play14:58

that's how

play14:59

the hashed message authentication code

play15:02

works

play15:03

one of the application of hmac is

play15:06

in for example ssl protocol i'll talk

play15:08

about ssl protocol in another lesson

play15:11

but that's one of the application of

play15:13

this hmac protocol

play15:15

alright so that's it for this lesson and

play15:18

i'll see you in another video

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
CryptographyEncryptionDecryptionSecurityAlgorithmsData ProtectionHashingRSAAESMD5SHA
¿Necesitas un resumen en inglés?