Bài giảng Cryptography and Network Security - Chapter 4, Part A: Cryptographic hash functions - Nguyễn Đức Thái

Cryptography and Network Security  
Chapter 4 – Part A  
Cryptographic Hash Functions  
Lectured by  
Nguyễn Đức Thái  
Outline  
. Cryptographic Hash Functions  
. Message Authentication  
. Attacks on Hash Functions  
• Brute-Force Attacks  
• Cryptanalysis Attacks  
. Secure Hash Algorithm (SHA)  
2
Hash functions  
. A hash function maps a variable-length message into  
a fixed-length hash value, or message digest  
. A hash function H accepts a variable-length block of  
data as input and produces a fixed-size hash value  
h = H(M)  
. The principal object of a hash function is data  
integrity  
3
Cryptographic Hash functions  
. The kind of hash function needed for security  
applications is referred to as a cryptographic hash  
function.  
. A cryptographic hash function is an algorithm for  
which it is computationally infeasible  
. Because of these characteristics, hash functions are  
often used to determine whether or not data has  
changed  
4
Cryptographic Hash functions  
5
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 (i.e., contain no modification,  
insertion, deletion, or replay).  
. When a hash function is used to provide message  
authentication, the hash function value is often  
referred to as a message digest.  
6
Hash Functions & Msg Authentication  
7
Message Authentication – Picture a)  
. The message plus concatenated hash code is  
encrypted using symmetric encryption.  
. Because only A and B share the secret key, the  
message must have come from A and has not been  
altered.  
. The hash code provides the structure or redundancy  
required to achieve authentication.  
. Because encryption is applied to the entire message  
plus hash code, confidentiality is also provided  
8
Message Authentication – Picture b)  
. Only the hash code is encrypted, using symmetric  
encryption.  
. This reduces the processing burden for those  
applications that do not require confidentiality  
9
Message Authentication – Picture c)  
. It is possible to use a hash function but no  
encryption for message authentication.  
. The technique assumes that the two communicating  
parties share a common secret value S.  
. A computes the hash value over the concatenation  
of M and S and appends the resulting hash value to.  
. Because B possesses, it can recompute the hash  
value to verify.  
. Because the secret value itself is not sent, an  
opponent cannot modify an intercepted message  
and cannot generate a false message.  
10  
Message Authentication – Picture d)  
. Confidentiality can be added to the approach of  
method (c) by encrypting the entire message plus  
the hash code  
11  
Hash Functions & Digital Signatures  
12  
Hash Functions & Dig. Signatures (1/2)  
. The hash code is encrypted, using public-key  
encryption with the sender’s private key.  
. It also provides a digital signature, because only the  
sender could have produced the encrypted hash  
code.  
. In fact, this is the essence of the digital signature  
technique.  
13  
Hash Functions & Dig. Signatures (2/2)  
. If confidentiality as well as a digital signature is  
desired, then the message plus the private-key-  
encrypted hash code can be encrypted using a  
symmetric secret key.  
14  
Other Hash Functions Uses  
. Hash functions are commonly used to create a one-way  
password file.  
• Thus, the actual password is not retrievable by a hacker who gains  
access to the password file.  
• This approach to password protection is used by most operating  
systems.  
. Hash functions can be used for intrusion detection and virus  
detection.  
• Store H(F) for each file on a system and secure the hash values (e.g.,  
on a CD-R that is kept secure).  
• One can later determine if a file has been modified by recomputing  
H(F).  
• An intruder would need to change F without changing H(F).  
. Can be used to construct a pseudorandom function (PRF) or  
a pseudorandom number generator (PRNG).  
15  
Hash Functions Requirements  
16  
Attacks on Hash Functions  
. Brute-Force attacks  
• Preimage and second preimage attacks  
• Collision resistant attacks  
. Cryptanalysis attacks  
17  
Brute-Force Attacks  
. A brute-force attack does not depend on the specific  
algorithm but depends only on bit length.  
. In the case of a hash function, a brute-force attack  
depends only on the bit length of the hash value.  
. A cryptanalysis, in contrast, is an attack based on  
weaknesses in a particular cryptographic algorithm.  
18  
Preimage & Second Preimage Attacks  
. For a preimage or second preimage attack, an  
adversary wishes to find a value such that H(y) is  
equal to a given hash value.  
. The brute-force method is to pick values of y at  
random and try each value until a collision occurs.  
. For an m-bit hash value, the level of effort is  
proportional to 2m  
. Specifically, the adversary would have to try, on  
average, 2m-1 values of y to find one that generates a  
given hash value h.  
19  
Collision Resistant Attacks  
. For a collision resistant attack, an adversary wishes  
to find two messages or data blocks, x and y, that  
yield the same hash function: H(x) = H(y).  
. In essence, if we choose random variables from a  
uniform distribution in the range 0 through N – 1,  
then the probability that a repeated element is  
encountered exceeds 0.5 after N1/2 choices have  
been made  
. Thus, for an m-bit hash value, if we pick data blocks  
at random, we can expect to find two data blocks  
with the same hash value within 2m/2 attempts  
20  
Tải về để xem bản đầy đủ
pdf 29 trang myanh 26380 Free
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Cryptography and Network Security - Chapter 4, Part A: Cryptographic hash functions - 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_a.pdf