{"thread":{"id":"515","subject":"Stronger Hashes","startedAt":"2005-05-06T21:05:02Z","lastAt":"2005-05-06T21:05:02Z","messageCount":1,"participants":["uwesmail2005-git@yahoo.de"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"2708","messageId":"20050506210502.20956.qmail@web25608.mail.ukl.yahoo.com","threadId":"515","inReplyTo":null,"subject":"Stronger Hashes","fromName":"","fromEmail":"uwesmail2005-git@yahoo.de","sentAt":"2005-05-06T21:05:02Z","receivedAt":"2005-05-06T21:05:02Z","isPatch":false,"sender":{"key":"uwesmail2005-git@yahoo.de","avatar":null},"body":"Cryptographic hashes are never strong enough, it seems. There are two\nthreats against which they have to be defended.\nDefense against incidental collisions:\nCan only be made by making the hash longer. Easy way to make the hash\n6-times as long: pad to multiple of 6 bits (can be skipped if hash\nalgorithm is implemented with bit-granularity)\n,create normal hash (from all bits),create hash from all even numbered\nbits\n,create hash from all odd numbered bits, create hash from all bits with\nfully triple bit number, create hash from all bits that follow them and\nlast create a hash from all bit that precede a fully triple numbered\nbit. Concatenate (or interleave) these 6 hashes and you're set.\nThe same is possible with 28. And all perfect numbers.\nDefense against intentional collisions:\nThe mechanism by which a collision is computed uses the property of the\ncryptographic hash to update an IV. If a collision was created, and\nthe next bytes are the same, these files will collide too. Such\ncomputation is dependent on the concrete IV the hash starts with.\nIf that IV is not predictable anymore, these algorithms will break.\nSo the easiest way to break them is to hash 'cat file file'. More\nsecure\nwill be 'gzip -c<file|cat - file' because the starting offset of file\nwill probably be not aligned to the hash blocks. With\n'$(hashprog)<file|cat - file' you can strike through \"probably\" and\nreplace \"definitly\".\n\nBoth methods can be combined. \n\n\n\t\n\n\t\n\t\t\n___________________________________________________________ \nGesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de\n"}]}