What is MurmurHash3 seed parameter?
The seed parameter is a means for you to randomize the hash function. You should provide the same seed value for all calls to the hashing function in the same application of the hashing function. However, each invocation of your application (assuming it is creating a new hash table) can use a different seed, e.g., a random value.
Why is it provided?
One reason is that attackers may use the properties of a hash function to construct a denial of service attack. They could do this by providing strings to your hash function that all hash to the same value destroying the performance of your hash table. But if you use a different seed for each run of your program, the set of strings the attackers must use changes.
See: Effective DoS on web application platform
There's also a Twitter tag for #hashDoS
Tiago Costa
My main interests are Graphics and Game Engine programming.
Updated on June 02, 2022Comments
-
Tiago Costa about 2 years
MurmurHash3_x86_32() expects a seed parameter. What value should I use and what does it do?