Cryptographic Hash Function
Cryptographic Hash Function
Hash Functions
Raj Jain
Washington University in Saint Louis
Saint Louis, MO 63130
Jain@cse.wustl.edu
Audio/Video recordings of this lecture are available at:
http://www.cse.wustl.edu/~jain/cse571-11/
Washington University in St. Louis CSE571S ©2011 Raj Jain
11-1
Overview
These slides are based partly on Lawrie Brown’s slides supplied with William Stallings’s
book “Cryptography and Network Security: Principles and Practice,” 5th Ed, 2011.
Washington University in St. Louis CSE571S ©2011 Raj Jain
11-2
Hash Function
Hash tables used in data searches
Data
The hash function should
1. Take variable size input
Hash
2. Produce fixed output size (Size of the Fn
table)
3. Be easy to compute
4. Be pseudorandom so that it
distributes uniformly over the table
Minimizes collisions
4. Pseudorandom
5. Pre-image Resistant = one-way
It is not possible to find M, given h.
6. 2nd Pre-image Resistant: = Weak Collision Resitant
It is not possible to find y, such that h(y)=h(x)
7. Strong Collision Resistant: It is not possible to find any two x
and y, such that h(y)=h(x)
In general, n possibilities
n trials to find a collision
[Source: Wikipedia]
Washington University in St. Louis CSE571S ©2011 Raj Jain
11-14
SHA-512 Overview
1. Append padding bits
2. Append length
80 Rounds
Wt= 1(Wt-2)+Wt-7+0(Wt-15)+Wt-16
0(x)=ROTR1(x)+ROTR8(x)+SHR7(x)
1(x)=ROTR19(x)+ROTR61(x)+SHR6(x)
ROTRn(x)=rotate right by n bits
SHRn(x)=Left shift n bits with padding by 0’s on the right
+ = Addition modulo 264
Washington University in St. Louis CSE571S ©2011 Raj Jain
11-17
SHA-3
SHA-2 (esp. SHA-512) seems secure
Shares same structure and mathematical operations as
predecessors so have concern
NIST announced in 2007 a competition for the SHA-3
Has had 3 rounds of narrowing down the selections
Five algorithms advanced to the third (and final) round in
December 2010
Final selection to be announced by 2012
Ref: http://en.wikipedia.org/wiki/NIST_hash_function_competition
Washington University in St. Louis CSE571S ©2011 Raj Jain
11-18
SHA-3 Requirements
Replace SHA-2 with SHA-3 in any use
So use same hash sizes
Evaluation criteria
Security close to theoretical max for hash sizes
for a 4-byte message M={m1, m2, m3, m4}={128, 252, 33, 19}
All are decimal numbers.
Check if the hash function is:
A. Collision Resistant
B. Pre-image resistant
B. Second Pre-image Resistant
Show counter examples for any property that is not satisfied.