Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Bram Cohen (bramgawth.com)
Date: Fri Mar 30 2001 - 22:09:26 CST
On Fri, 30 Mar 2001, Antonomasia wrote:
> Bram Cohen writes:
> > To begin with, there's the issue of padding - this can be done by
> > appending a 1 and then padding with zeros to the next multiple of a block
> > size. If the data to be hashed is already a multiple of a block size and
> > doesn't end in a 1 to begin with, no padding is necessary. This gets rid
> > of a lot of unnecessary work for hashing small files.
> The "no padding is necessary" shortcut means that each hash represents 2
> alternative starting values. It's usual to add padding regardless.
Could you give an example of two things which pad to the same value? I
think there isn't any, so I probably didn't state the technique clearly.
> > One neat trick - if you have a short file (about 20 bytes) and want a 160
> > bit hash of it, you can encrypt the file using itself as the key.
> Isn't this asking for trouble if the original file had low entropy ?
If the original file has low entropy, an attacker could just guess the
entire original file, that's just a property secure hash functions have.
Soko! puzzle game - http://ch.havenco.com:4201/