Bài giảng Cryptography and Network Security - Chapter 4, Part B: Message authetication codes - Nguyễn Đức Thái

Cryptography and Network Security  
Chapter 4 – Part B  
Message Authetication Codes  
Lectured by  
Nguyễn Đức Thái  
Outline  
. Message Authentication Requirements  
. Message Authentication Functions  
. Basic Use of MACs  
. MACs based on Hash Functions: HMAC  
2
Message Authentication  
. Message authentication is a mechanism or service  
used to verify the integrity of a message.  
. Message authentication assures that data received  
are exactly as sent by (i.e., contain no modification,  
insertion, deletion, or replay) and that the purported  
identity of the sender is valid.  
. Symmetric encryption provides authentication  
among those who share the secret key.  
3
Message Authentication  
. A message authentication code (MAC) is an  
algorithm that requires the use of a secret key.  
. A MAC takes a variable-length message and a secret  
key as input and produces an authentication code.  
. A recipient in possession of the secret key can  
generate an authentication code to verify the  
integrity of the message  
. One way: a MAC is to combine a cryptographic hash  
function in some fashion with a secret key  
. Another way: to use a symmetric block cipher in  
such a way that it produces a fixed-length output for  
a variablelength input  
4
Message Authentication Requirements  
. Disclosure  
. Sequence modification  
• Release of message contents  
• Any modification to a  
to any person or process not  
sequence of messages  
possessing the appropriate  
between parties, including  
cryptographic key  
insertion, deletion, and  
reordering  
. Traffic analysis  
. Timing modification  
• Discovery of the pattern of  
traffic between parties  
• Delay or replay of  
messages  
. Masquerade  
. Source repudiation  
• Insertion of messages into  
the network from a  
• Denial of transmission of  
fraudulent source  
message by source  
. Content modification  
. Destination repudiation  
• Changes to the contents of a  
message, including insertion,  
deletion, transposition, and  
modification  
• Denial of receipt of  
message by destination  
5
Message Authentication  
. Message authentication is a procedure to verify that  
received messages come from the alleged source  
and have not been altered.  
. Message authentication may also verify sequencing  
and timeliness  
. A digital signature is an authentication technique  
that also includes measures to counter repudiation  
by the source.  
6
Message Authentication Functions  
• Hash function  
Two levels of  
• A function that maps a  
message of any length into a  
fixed-length hash value  
which serves as the  
Lower level  
authenticator  
• There must be some sort of function  
that produces an authenticator  
• Message encryption  
• The ciphertext of the entire  
message serves as its  
authenticator  
• Message authentication code  
(MAC)  
• A function of the message  
and a secret key that  
produces a fixed-length  
value that serves as the  
authenticator  
Higher-level  
•Uses the lower-level function as a primitive in an  
authentication protocol that enables a receiver to  
verify the authenticity of a message  
7
Message Encryption  
8
Internal and External Error Control  
TCP Segment  
10  
Public Key Encryption  
. The straightforward use of public-key encryption  
provides confidentiality but not authentication  
. To provide both confidentiality and authentication, A  
can encrypt M first using its private key which  
provides the digital signature, and then using B’s  
public key, which provides confidentiality  
. Disadvantage is that the public-key algorithm must  
be exercised four times rather than two in each  
communication  
11  
Basic Uses of MAC  
12  
Requirements for MAC  
The final  
requirement  
dictates that the  
authentication  
algorithm should  
not be weaker  
with respect to  
certain parts or  
bits of the  
The first requirement  
deals with message  
replacement attacks,  
in which an opponent  
is able to construct a  
new message to  
match a given MAC,  
even though the  
opponent does not  
know and does not  
learn the key  
The second  
requirement  
deals with the  
need to thwart a  
brute-force  
Taking into account  
the types of attacks,  
the MAC needs to  
satisfy the following:  
attack based on  
chosen plaintext  
message than  
others  
13  
Brute-Force Attacks  
. Requires known message-tag pairs  
• A brute-force method of finding a collision is to pick  
a random bit string y and check if H(y) = H(x)  
Two lines of attack:  
•Attack the key space  
•If an attacker can determine the MAC key then it is possible to  
generate a valid MAC value for any input x  
•Attack the MAC value  
•Objective is to generate a valid tag for a given message or to find a  
message that matches a given tag  
14  
Cryptanalysis  
. Cryptanalytic attacks seek to exploit some property  
of the algorithm to perform some attack other than  
an exhaustive search  
. An ideal MAC algorithm will require a cryptanalytic  
effort greater than or equal to the brute-force effort  
. There is much more variety in the structure of MACs  
than in hash functions, so it is difficult to generalize  
about the cryptanalysis of MACs  
15  
MACs based on Hash Functions: HMAC  
. There has been increased interest in developing a  
MAC derived from a cryptographic hash function  
. Motivations:  
• Cryptographic hash functions such as MD5 and SHA  
generally execute faster in software than symmetric block  
ciphers such as DES  
• Library code for cryptographic hash functions is widely  
available  
. HMAC has been chosen as the mandatory-to-  
implement MAC for IP security  
. Has also been issued as a NIST standard (FIPS 198)  
16  
Summary  
. Message Authentication Requirements  
. Message Authentication Functions  
. Basic Use of MACs  
. MACs based on Hash Functions: HMAC  
17  
References  
1. Cryptography and Network Security, Principles  
and Practice, William Stallings, Prentice Hall,  
Sixth Edition, 2013  
18  
pdf 18 trang myanh 25420 Free
Bạn đang xem tài liệu "Bài giảng Cryptography and Network Security - Chapter 4, Part B: Message authetication codes - Nguyễn Đức Thái", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_cryptography_and_network_security_chapter_4_part_b.pdf