23-11-2012, 02:40 PM
HASH Algorithms
HASH Algorithms.ppt (Size: 448 KB / Downloads: 22)
MD5 Message Digest Algorithm
Developed by Ron Rivest at MIT
Input: a message of arbitrary length
Output: 128-bit message digest
32-bit word units, 512-bit blocks
Son of MD2, MD4
MD5 Logic
Step 3: Initialize MD buffer
128-bit buffer (four 32-bit registers A,B,C,D) is used to hold intermediate and final results of the hash function
A,B,C,D are initialized to the following values
A = 67452301, B = EFCDAB89, C = 98BADCFE, D = 10325476
Stored in little-endian format (least significant byte of a word in the low-address byte position)
E.g. word A: 01 23 45 67 (low address … high address)
Step 4: Process message in 512-bit (16-word) blocks
Heart of the algorithm called a compression function
Consists of 4 rounds
The 4 rounds have a similar structure, but each uses a different primitive logical functions, referred to as F, G, H, and I
Each round takes as input the current 512-bit block (Yq), 128-bit buffer value ABCD and updates the contents of the buffer
Each round also uses the table T[1 … 64], constructed from the sine function; T[i] = 232 abs(sin(i))
The output of 4th round is added to the CVq to produce CVq+1
MD5 Primitive Logical Functions
One of the 4 primitive logical functions is used in each 4 rounds of the algorithm
Each primitive function takes three 32-bit words as input and produces a 32-bit word output
Each function performs a set of bitwise logical operations
HMAC
MAC based on cryptographic Hash code
Traditional MACs are based on the symmetric block cipher
E.g. Data Authentication Algorithm defined in FIPS PUB 113
Recent MACs are based on hash code
Cryptographic hash functions such as MD5 and SHA-1 generally execute faster than symmetric block ciphers such as DES
Library code for hash functions are widely available
No export restrictions for hash functions, whereas symmetric block ciphers, even when used for MACs, are restricted
HMAC design objective
To use, without modifications, available hash functions
To allow for easy replaceability of the embedded hash function
To preserve the original performance of the hash function
To use and handle keys in a simple way
To have a well understood cryptographic analysis of the strength of the MAC based on reasonable assumptions on the embedded hash function