Cs PPT CHP 3 Part 4
Cs PPT CHP 3 Part 4
word A: 01 23 45 67
word B: word D: 76 54 32 10 89 ab cd ef
word C: fe dc ba 98
STEP 3
IMPLEMENTATION STEPS
The main MD5 algorithm operates on a 128-bit state,
divided into four 32-bit words, denoted A, B, C,
and D.
These are initialized to certain fixed constants. The
main algorithm then uses each 512-bit message block
in turn to modify the state.
The processing of a message block consists of four
similar stages, termed rounds; each round is
composed of 16 similar operations based on a non-
linear function F, modular addition, and left
rotation.
Figure 1 illustrates one operation within a round.
There are four possible functions; a different one is
used in each round:
IMPLEMENTATION STEPS
Step4. Process message in 16-word blocks
Four functions will be defined such that each
function takes an input of three 32-bit words and
produces a 32-bit word output.
ONE MD5 OPERATION.
MD5 CONSISTS OF 64
OF THESE OPERATIONS,
GROUPED IN FOUR
ROUNDS OF 16
OPERATIONS. F IS A
NONLINEAR FUNCTION;
ONE FUNCTION IS USED
IN EACH
ROUND. MI DENOTES A
32-BIT BLOCK OF THE
MESSAGE INPUT,
AND KI DENOTES A 32-
BIT CONSTANT,
DIFFERENT FOR EACH
OPERATION. S DENOTES
A LEFT BIT ROTATION
BY S PLACES; S VARIES
FOR EACH
OPERATION. DENOTES
ADDITION MODULO 232.
STEP 5. OUTPUT
The message digest produced as output is A,
B, C, D.
That is, we begin with the low-order byte of
A, and end with the high-order byte of D.
MD5 HASHES
The 128-bit (16-byte) MD5 hashes (also
termed message digests) are typically
represented as a sequence of 32 hexadecimal
digits. The following demonstrates a 43-byte
ASCII input and the corresponding MD5 hash:
SECURITY
The security of the MD5 hash function is
severely compromised. A collision attack
exists that can find collisions within seconds
on a computer with a 2.6 GHz Pentium 4
processor.
As it is easy to generate MD5 collisions, it is
possible for the person who created the file
to create a second file with the same
checksum, so this technique cannot protect
against some forms of malicious tampering.
APPLICATIONS