Is there any difference between md5 and sha1 in this situation?

Posted by Vili on Stack Overflow See other posts from Stack Overflow or by Vili
Published on 2010-05-31T09:41:20Z Indexed on 2010/05/31 10:52 UTC
Read the original article Hit count: 373

Filed under:
|
|

It is known that

1.    if   ( md5(a)   == md5(b)   )
2.    then ( md5(a.z) == md5(b.z) )
3.    but  ( md5(z.a) != md5(z.b) )

where the dots concatenate the strings.

What happens in the second row if we change all the md5 to sha1? So:

1.    if   ( sha1(c)   == sha1(d)   )
2.    then ( sha1(c.z) ?= sha1(d.z) )

I couldn't find two different strings with same sha1, that's why I'm asking this. Are there any other interesting "rules" about sha1?

© Stack Overflow or respective owner

Related posts about md5

Related posts about sha1