From: uwesmail2005-git@yahoo.de Date: Fri, 06 May 2005 21:05:02 GMT Subject: Stronger Hashes Message-ID: <20050506210502.20956.qmail@web25608.mail.ukl.yahoo.com> Cryptographic hashes are never strong enough, it seems. There are two threats against which they have to be defended. Defense against incidental collisions: Can only be made by making the hash longer. Easy way to make the hash 6-times as long: pad to multiple of 6 bits (can be skipped if hash algorithm is implemented with bit-granularity) ,create normal hash (from all bits),create hash from all even numbered bits ,create hash from all odd numbered bits, create hash from all bits with fully triple bit number, create hash from all bits that follow them and last create a hash from all bit that precede a fully triple numbered bit. Concatenate (or interleave) these 6 hashes and you're set. The same is possible with 28. And all perfect numbers. Defense against intentional collisions: The mechanism by which a collision is computed uses the property of the cryptographic hash to update an IV. If a collision was created, and the next bytes are the same, these files will collide too. Such computation is dependent on the concrete IV the hash starts with. If that IV is not predictable anymore, these algorithms will break. So the easiest way to break them is to hash 'cat file file'. More secure will be 'gzip -c