Stronger Hashes
From: <hidden>
Date: 2016-06-15 22:41:56
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<file|cat - file' because the starting offset of file will probably be not aligned to the hash blocks. With '$(hashprog)<file|cat - file' you can strike through "probably" and replace "definitly". Both methods can be combined. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de