4 ms·
Can't you simply salt the output of your simple hash function with a randomly-pregenerated salt value? (can be unique for each hashtable, a simple integer to be
by kgeist 5y ago
Can't you simply salt the output of your simple hash function with a randomly-pregenerated salt value? (can be unique for each hashtable, a simple integer to be xored) That way the attacker can't predict the collision and you have same performance as before.
- haberman 5y agoA key result of the SipHash paper is that the SipHash authors broke common hash functions so completely that they can generate seed-independent multicollisions. That means that certain inputs will collide regardless of what the seed is. Seeding the hash function is no defense against such an attack.
- wongarsu 5y agoIf you salt the output, wouldn't anything that collided before salting also collide after salting? Surely you would salt the input of the hash function? The effectiveness of that kind of depends on your hash function. SipHash tries to give you guarantees that your salt is effective and stays secret even if hashes (along with unhashed values) ever get exposed to the attacker
- wyager 5y agoIf you scramble the output of the hash function, it has to be in a way that does not commute with the mapping from hash to bucket index. Xor won’t cut it for power of two sized hash tables. Should probably just use a keyed hash function like siphash - the security analysis is straightforward and these hash functions are quite well developed.
- deleted 5y ago[deleted]