7 Unit 4. Cryptographic-Hash-Functions
7 Unit 4. Cryptographic-Hash-Functions
Cryptographic
Hash Functions
12.1
Hash Function
The hash value represents
concisely the longer
message
may called the message digest
A message digest is as a
``digital fingerprint'' of the
original document
h = H(M)
2
Hashing V.S. Encryption
k
Hello, world. NhbXBsZSBzZW50ZW5jZSB0byBzaG93IEVuY
E
A sample sentence to show encryption. 3J5cHRpb24KsZSBzZ
k
Hello, world.
D NhbXBsZSBzZW50ZW5jZSB0byBzaG93IEVuY
A sample sentence to show encryption.
3J5cHRpb24KsZSBzZ
12.17
12.18
12.19
12-2 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.
• Message Digest(MD)
• MD2, MD4, MD5
• Secure Hash Algorithm(SHA)
• SHA-0, SHA-1, SHA-2
• RACE Integrity Primitives Evaluation Message Digest(RIPEMD-
160)
• Whirpool
12.23
12.2.1 Introduction
12.24
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.25
12.2.1 Continued
12.26
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.27
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.28
12.2.1 Continued
Words
Figure 12.8 A message block and the digest as words
12.29
12.2.1 Continued
Word Expansion
Figure 12.9 Word expansion in SHA-512
Example 12.6
Solution
Each word in the range W16 to W79 is made from four previously-
made words. W60 is made as
12.31
12.2.1 Continued
12.32
12.2.2 Compression Function
Figure 12.10 Compression function in SHA-512
12.33
12.2.2 Continued
Figure 12.11 Structure of each round in SHA-512
12.34
12.2.2 Continued
Majority Function
Conditional Function
Rotate Functions
12.35
12.2.2 Analysis
12.36