title: Is it possible to create a forged file which has the same checksums using two different algorithms?
body: <p>I was a bit inspired by this blog entry <a href="http://blogs.technet.com/dmelanchthon/archive/2009/07/23/windows-7-rtm.aspx" rel="noreferrer">http://blogs.technet.com/dmelanchthon/archive/2009/07/23/windows-7-rtm.aspx</a> (German)</p>
  
  <p>The current notion is that md5 and sha1 are both somewhat broken. Not easily and fast, but at least for md5 in the range of a practical possibility.  (I'm not at all a crypto expert, so maybe I'm wrong in stuff like that).</p>
  
  <p>So I asked myself if it would be possible to create a file A' which has the <strong>same size</strong>, the <strong>same md5 sum</strong>, and the <strong>same sha1 sum</strong> as the original file A.</p>
  
  <p>First, would it be possible at all?</p>
  
  <p>Second, would it be possible in reality, with current hardware/software?</p>
  
  <p>If not, wouldn't be the easiest way to provide assurance of the integrity of a file to use always two different algorithms, even if they have some kind of weakness?</p>
  
  <p><strong>Updated</strong>:</p>
  
  <p>Just to clarify: the idea is to have a file A and a file A' which fullfills the conditions: </p>
  
  <pre>size(A) == size(A') && md5sum(A) == md5sum(A') && sha1sum(A) == sha1sum(A')</pre>