The document discusses hash functions and the MD5 algorithm. It explains that a hash function maps inputs of arbitrary size to outputs of a fixed size, and that it is virtually impossible to derive the input given only the hash output. The document then provides a detailed overview of how the MD5 algorithm works, including converting the input to binary, padding it to a multiple of 512 bits, breaking it into 512-bit blocks, assigning initialization values, and performing 64 rounds of logical operations on each block that combines it with the output of the previous block.
44. 1. Convert ‘x’ to binary
2. Pad ‘x’ so that size of x (mod 512) = 0
3. Break ‘x’ into 512 bit sub parts and 32 bit words
4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3.
46. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians
r[i] = Various round shift amounts
47. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians
r[i] = Various round shift amounts
w[g] = Word number (0 – 15)
48. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians
r[i] = Various round shift amounts
w[g] = Word number (0 – 15)
h0 = a = 0x67452301
h1 = b = 0xEFCDAB89
h2 = c = 0x98BADCFE
h3 = d = 0x10325476
49. 1. Convert ‘x’ to binary
2. Pad ‘x’ so that size of x (mod 512) = 0
3. Break ‘x’ into 512 bit sub parts and 32 bit words
4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3.
5. Perform 64 rounds on each sub part
69. ⊕
“XOR is a type of logical disjunction on two operands that results
in a value of “true” if and only if exactly one of the operands has a
value of ‘true’”
70. bit 1 bit 2 ∨ bit 1 bit 2 ⊕
1 1 1 1 1 F
1 0 1 1 0 T
0 1 1 0 1 T
0 0 0 0 0 F
88. b + {(a + f + k[i] + w[g]) << r[i]}
h1 h0
Calculated in The gth word
Operations A-D (32 bit chunk)
|sin(i+1)| x 232 ith pre-designated
where ‘i’ is in radians shift
90. 1. Convert ‘x’ to binary
2. Pad ‘x’ so that size of x (mod 512) = 0
3. Break ‘x’ into 512 bit sub parts and 32 bit words
4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3.
5. Perform 64 rounds on each sub part
6. Add a, b, c and d to register values
91. h0 = h0 + a
h1 = h1 + b
h2 = h2 + c
h3 = h3 + d
92. 1. Convert ‘x’ to binary
2. Pad ‘x’ so that size of x (mod 512) = 0
3. Break ‘x’ into 512 bit sub parts and 32 bit words
4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3.
5. Perform 64 rounds on each sub part
6. Add a, b, c and d to register values
7. Append the register values to create digest
130. “We have used a Sony Playstation 3 to correctly predict the
outcome of the 2008 US presidential elections. In order not to
influence the voters we keep our prediction secret, but commit to it
by publishing its cryptographic hash on this website. The
document with the correct prediction and matching hash will be
revealed after the elections.”
- Marc Stevens, Arjen Lenstra and Benne de Weger