0% found this document useful (0 votes)
76 views25 pages

Cryptographic Hash Functions Guide

The document discusses cryptographic hash functions and message authentication codes. It describes hash functions like SHA-512 and Whirlpool, which use iterative schemes like Merkle-Damgard. It also covers applying hash functions to message authentication and different approaches like encrypting the hash. Message authentication codes provide message integrity and authentication using symmetric techniques and are faster than digital signatures.

Uploaded by

am8465821
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views25 pages

Cryptographic Hash Functions Guide

The document discusses cryptographic hash functions and message authentication codes. It describes hash functions like SHA-512 and Whirlpool, which use iterative schemes like Merkle-Damgard. It also covers applying hash functions to message authentication and different approaches like encrypting the hash. Message authentication codes provide message integrity and authentication using symmetric techniques and are faster than digital signatures.

Uploaded by

am8465821
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Data Security

Lecture 9
Hash Function and MACs
(Message Authentication Codes

Dr: Khaled Saada


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Cryptographic Hash Functions

2
INTRODUCTION
A cryptographic hash function takes a message of
arbitrary length and creates a message digest of fixed
length. The ultimate goal of this chapter is to discuss the
details of the two most promising cryptographic hash
algorithms¾ SHA-512 and Whirlpool.

3
Applications of Cryptogrphic Hash Functions
Message Authentication

Simplified Examples of the use of a Hash function for Message Authentication


4
Applications of Cryptogrphic Hash Functions
Message Authentication

5
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.

b. Only the hash code is encrypted, using symmetric encryption. This


reduces the processing burden for those applications that do not
require confidentiality.

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 re-compute 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.

d. Confidentiality can be added to the approach of method (c) by


encrypting the entire message plus the hash code.
6
Iterated Hash Function
Merkle-Damgard Scheme
This scheme is an iterated hash function that iscollision
resistant if the compression function iscollision resistant.

Figure Merkle-Damgard scheme


7
Two Groups of Compression Functions

1. The compression function is made from scratch.

Message Digest (MD)


Secure Hash Algorithm (SHA)
MD2, MD4, and MD5 by Ron Rivest . MD5 divides the message
into blocks of 512 bits and creates a 128 bit digest.

2. A symmetric-key block cipher serves as acompression


function.
Whirlpool
SHA is a standard developed by NIST. It wasbased on
the MD5
8
Continued

9
Continued
Rabin Scheme : based on the M-D scheme.
The compression function is replaced by an encrypting cipher. The message
block is used as the key. The previously created digest is used as the plaintext.
The ciphertext is the new message digest.

Rabin scheme
10
Continued
Davies-Meyer Scheme : is basically the same as the Rabin
scheme except that it uses forward feed.

Davies-Meyer scheme

11
Continued
Matyas-Meyer-Oseas Scheme : Is a dual version of the D-M
scheme.

Figure 12.4 Matyas-Meyer-Oseas scheme


12
Continued
Miyaguchi-Preneel Scheme : Is an extended version of the
M-M-O scheme. It is stronger against attacks.

Miyaguchi-Preneel scheme
13
SHA-512
SHA-512 is the version of SHA with a 512-bit message digest.
This version, like the others in the SHA family of algorithms,
is based on the Merkle-Damgard scheme.
Introduction

Message digest creation SHA-512


14
Continued
Message Preparation
SHA-512 insists that the length of the original message
be less than 2128 bits.

Note

SHA-512 creates a 512-bit message digest out of a


message less than 2128.

15
Compression Function
Compression function in SHA-512

One word from the


Expanded block

64-bit constant

16
Continued

17
Figure Structure of each round in SHA-512
Continued
Majority Function

Conditional Function

Rotate Functions

18
WHIRLPOOL
Whirlpool is an iterated cryptographic hash function,
based on the Miyaguchi-Preneel scheme, that uses a
symmetric-key block cipher in place of the compression
function. The block cipher is a modified AES cipher that
has been tailored for this purpose.

19
Continued
Whirlpool Hash Function

20 The block cipher is a modified AES cipher in place of the compression function.
Whirlpool Cipher

General idea of the Whirlpool cipher


21
Summary

22
Message Authentication Codes (MACs)
Other names:
“cryptographic checksum" or “keyed hash function".

Message authentication codes are widely used in practice


for providing message integretiy and message
authentication in cases where the two communication
parties share a secret key.

MACs are much faster than digital signatures since they


are based on symmetric ciphers or
hash functions.

23
Principle
Similar to digital signatures, MACs append an “authentication
tag" to a message. The main difference is that MACs use a
symmetric key on both the sender and receiver side.

24
Continued

Protocol :

25

You might also like