title: Is there any difference between md5 and sha1 in this situation?
body: <p>It is known that</p>
  
  <pre><code>1.    if   ( md5(a)   == md5(b)   )
  2.    then ( md5(a.z) == md5(b.z) )
  3.    but  ( md5(z.a) != md5(z.b) )
  </code></pre>
  
  <p>where the dots concatenate the strings.</p>
  
  <p><strong>EDIT ---</strong></p>
  
  <p>Here you can find <code>a</code> and <code>b</code>:<br>
  <a href="http://www.mscs.dal.ca/~selinger/md5collision/" rel="nofollow noreferrer">http://www.mscs.dal.ca/~selinger/md5collision/</a></p>
  
  <p>Check these links:<br>
  <a href="http://hexpaste.com/qzNCBRYb/1" rel="nofollow noreferrer">hexpaste.com/qzNCBRYb/1</a> - this is <code>a.md5(a)."kutykurutty"</code><br>
  <a href="http://hexpaste.com/mSXMl13A/1" rel="nofollow noreferrer">hexpaste.com/mSXMl13A/1</a> - this is <code>b.md5(b)."kutykurutty"</code></p>
  
  <p>They share the same md5 hash, yet they are different. But you can call these strings <code>a'</code> and <code>b'</code>, because they have the same md5.</p>
  
  <p><strong>--- EDIT</strong></p>
  
  <p>What happens in the second row if we change all the <strong>md5</strong> to <strong>sha1</strong>? So:</p>
  
  <pre><code>1.    if   ( sha1(c)   == sha1(d)   )
  2.    then ( sha1(c.z) ?= sha1(d.z) )
  </code></pre>
  
  <p>I couldn't find two different strings with same <strong>sha1</strong>, that's why I'm asking this. Are there any other interesting "rules" about <strong>sha1</strong>?</p>