Module 7 : Factorization

Lecture 4 : Quadratic-Sieve Factoring

 

temp := d
d := c
c := b
b := b + leftrotate ((a + f + k[i] + w[g]) , r[i])
a := temp  

// Add this chunk's hash to result so far:

h0 := h0 + a
h1 := h1 + b
h2 := h2 + c
h3 := h3 + d  

var int digest := h0 append h1 append h2 append h3
// (expressed as little-endian)

// leftrotate function definition

leftrotate (x, c)
return (x << c) or (x >> (32-c));

Summary

The MD5 message-digest algorithm is simple to implement, and provides a "fingerprint" or message digest of a message of arbitrary length. It is conjectured that the difficulty of coming up with two message having the same message digest is on the order of 2^64 operations, and that the difficulty of coming up with any message having a given message digest is on the order of 2^128 operations. The MD5 algorithm has been carefully scrutinized for weaknesses. It is, however, a relatively new algorithm and further security analysis is of course justified, as is the case with any new proposal of this sort.

Differences Between MD4 and MD5

The following are the differences between MD4 and MD5

1.  A fourth round has been added.

2.  Each step now has a unique additive constant.

3.  The function g in round 2 was changed from (XY v XZ v YZ) to(XZ v Y not(Z)) to make g less symmetric.  

4.  Each step now adds in the result of the previous step. This

......a.  promotes a faster "avalanche effect".  

5.   The order in which input words are accessed in rounds 2 and

......a.  3 is changed, to make these patterns less like each other.  

6.  The shift amounts in each round have been approximately

......a. optimized, to yield a faster "avalanche effect." The shifts in

......b.different rounds are distinct.