13 Cryptographic Hash Functions (1)
13 Cryptographic Hash Functions (1)
Cryptographic
Hash Functions
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
12.1
Chapter 12
Objectives
To introduce general ideas behind cryptographic
hash functions
To discuss the Merkle-Damgard scheme as the basis
for iterated hash functions
To distinguish between two categories of hash
functions:
To discuss the structure of SHA-512.
12.2
12-1 INTRODUCTION
12.3
12.1.1 Iterated Hash Function
Merkle-Damgard Scheme
12.4
12.1.2 Two Groups of Compression Functions
12.5
12.1.2 Continued
12.6
12.1.2 Continued
Rabin Scheme
12.7
12.1.2 Continued
Davies-Meyer Scheme
12.8
12.1.2 Continued
Matyas-Meyer-Oseas Scheme
12.9
12.1.2 Continued
Miyaguchi-Preneel Scheme
12.10
12-2 SHA-512
12.12
12.2.1 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.
12.13
12.2.1 Continued
12.14
12.2.1 Continued
Example 12.3
What is the number of padding bits if the length of the original
message is 2590 bits?
Solution
We can calculate the number of padding bits as follows:
12.15
12.2.1 Continued
Example 12.4
Do we need padding if the length of the original message is
already a multiple of 1024 bits?
Solution
Yes we do, because we need to add the length field. So padding is
needed to make the new block a multiple of 1024 bits.
12.16
12.2.1 Continued
Words
12.17
12.2.1 Continued
Word Expansion
Figure 12.9 Word expansion in SHA-512
12.18
12.2.1 Continued
Example 12.6
Solution
Each word in the range W16 to W79 is made from four
previously-made words. W60 is made as
12.19
12.2.1 Continued
12.20
12.2.2 Compression Function
Figure 12.10 Compression function in SHA-512
12.21
12.2.2 Continued
Figure 12.11 Structure of each round in SHA-512
12.22
12.2.2 Continued
Majority Function
Conditional Function
Rotate Functions
12.23
12.2.2 Continued
12.24
12.2.3 Analysis
12.25
12-3 WHIRLPOOL
12.27
12.3.1 Whirlpool Cipher
Figure 12.13 General idea of the Whirlpool cipher
12.28
12.3.1 Continued
Figure 12.14 Block and state in the Whirlpool cipher
12.29
12.3.1 Continued
12.30
12.3.1 Continued
12.31
12.3.1 Continued
12.32
12.3.1 Continued
Figure 12.17 SubBytes in the Whirlpool cipher
12.33
12.3.1 Continued
ShiftColumns
Figure 12.18 ShiftColumns transformation in the Whirlpool cipher
12.34
12.3.1 Continued
12.35
12.3.1 Continued
12.36
12.3.1 Continued
Figure 12.21 Key expansion in the Whirlpool cipher
12.37
12.3.1 Continued
12.38
12.3.2 Summary
12.39
12.3.3 Analysis
12.40