280 likes | 639 Views
MD5 SHA RIPEMD-160 HMAC. HASH ALGORITHMS - Chapter 12. Message Digest Compression Elementary Operations. MD5. MESSAGE DIGEST GENERATION MD5. MD5 COMPRESSION FUNCTION. ELEMENTARY MD5 OPERATION. Table 9.1 – truth table B C D || F G H I
E N D
MD5 • SHA • RIPEMD-160 • HMAC HASH ALGORITHMS - Chapter 12
Message Digest • Compression • Elementary Operations MD5
Table 9.1 – truth table • B C D || F G H I • -------------------------------------- • 0 0 0 || 0 0 0 1 • 0 0 1 || 1 0 1 0 • 0 1 0 || 0 1 1 0 • 0 1 1 || 1 0 0 1 • 1 0 0 || 0 0 1 1 • 1 0 1 || 0 1 0 1 • 1 1 0 || 1 1 0 0 • 1 1 1 || 1 1 1 0 KEY ELEMENTS OF MD5
Message Digest • Compression • Elementary Operations SECURE HASH ALGORITHM SHA-1
B C D || f0..19 f20..39 f40..59 f60..79 • ---------------------------------------------------------------------------- • 0 0 0 | 0 0 0 0 • 0 0 1 | 1 1 0 1 • 0 1 0 | 0 1 0 1 • 0 1 1 | 1 0 1 0 • 0 0 | 0 1 0 1 • 1 0 1 | 0 0 1 0 • 1 0 | 1 0 1 0 • 1 1 1 | 1 1 1 1 TRUTH TABLE for ft – SHA-1
MD5 message digest – 128 bits SHA-1 message digest – 160 bits Find two messages with same digest: MD5 – 264 operations SHA-1 - 280 operations Comparison: MD5 vs SHA1
SHA-256 • SHA-384 • SHA-512 • message digest lengths: 256, 384, 512 • to provide compatibility with AES • (see Tables 12.3 and 12.4) NEW SHA ALGORITHMS
Message Digest • Compression • Elementary Operations RIPEMD - 160
Tables 12.5 – 12.9 RIPEMD – 160 - data
Table 12.8 - comparison Table 12.9 - relative performance HASH FUNCTIONS - comparisons
Why? Hash functions (e.g. MD5, SHA-1) execute faster than Sym. Key (e.g. DES) HMAC combines HASH with Secret Key to make a MAC HMACK(M) = H[(K+ + opad)||H[K+ + ipad)||M]] Security(H) Security(HMAC) HMAC – a MAC from a HASH