SHA (secure hash algorithm) Jen-Chang Liu, 2005 Adapted from lecture slides by Lawrie Brown
History of SHA SHA: secure hash algorithm Developed by National Institute of Standard and Technology (NIST) Based on the MD4 FIPS 180 in 1993 SHA-1: revised SHA, FIPS in 1995, also RFC 3174
Secure hash algorithm (SHA) SHA logic 512-bit block SHA bit digest
SHA round for 512-bit block 4 different functions: Totally 80 steps 5 個 32- bit words
Elementary SHA operation 32 bits From 512-bit input block Fixed constant Circular left shift 5 bits
SHA bitswise functions StepFunction ValueComment 0≤t≤19 If B then C else D 20≤t≤39 Parity bit of B,C, and D 40≤t≤59 2 or 3 of B,C,D is true 60≤t≤79 Parity bit of B,C, and D
W[0-79] from input 512-bit block W[0-79]
Security of SHA Against brute-force attack Produce any message having a given SHA digest is on the order of Against cryptanalysis No known attacks Speed Logic operation & addition modulo 2 32 Fast on 32-bit architecture Simple to implement
Improvement to SHA Comparison of SHA-x