Defensive programming

andrew cooke andrew at acooke.org
Sun Jun 1 13:55:25 EDT 2003


pwmiller1 at adelphia.net (Paul Miller) writes:
> What in the world are collision resistant hashes?  It seems to me that
> a certain number of collisions are all but guaranteed for any given
> hash table size, depending on the range of the input.  For example, if
[...]

i suppose the best idea would be to read the papers...

...without doing so, i would guess that they advocate using one-way
hashes (like those used in cryptography) so that it is difficult to
find a text that gives a specific hash.  so even if you know the
hashing algorithm, you cannot find two values that will collide
without trying a number of keys equal to about the square root of the
table size (or, if you need collisions in the actual hash value and
not just the table, to about the square root in the number of possible
hash values).

andrew

-- 
http://www.acooke.org






More information about the Python-list mailing list