News for hackers. Stuff that matters.
Re:Which hashing algorithm is best for uniqueness and speed? by Xylakant on Monday October 14, 2013 @02:12PM (#6548695)
This is why hashes for hashtables and similar datastructures are seeded with a random value upon interpreter startup. This throws off your attack well enough to make it barely feasible with a hashing algorithm that distributes sufficiently random. There was a round of DoS vulnerabilities against PHP, Ruby, Java, ..., all based on that attack vector a while ago, but those were all fixed.
Re:Which hashing algorithm is best for uniqueness and speed? by aweisberg on Monday October 14, 2013 @10:03PM (#6551029)
A secret seed is not sufficient to prevent DoS vulnerabilities. That is one of the things the creators of SIP hash demonstrated. You can create collisions with MurmurHash3 that work regardless of the seed.
Re:Which hashing algorithm is best for uniqueness and speed? by pjscott on Tuesday October 15, 2013 @12:41AM (#6551545)
They've also released code to generate an arbitrarily large number of colliding keys for MurmurHash2 and CityHash64, and one to recover the secret key of Python's randomized hash function. At some point here you're doing cryptography whether you want to or not -- and most of these randomized hash functions are just lousy cryptography.
Re:Which hashing algorithm is best for uniqueness and speed? by Xylakant on Tuesday October 15, 2013 @03:31AM (#6552007)
This is right. My wording was incorrect, excuse me. I should have said more correctly "This is why the hashing functions used nowadays include a randomization with a seed determined at interpreter startup." Jruby for example now uses perls hashing algorithm. They used to rely on murmur2, just as cruby did.