What is MurmurHash3 seed parameter?

18,702

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

Share:
18,702
Tiago Costa
Author by

Tiago Costa

My main interests are Graphics and Game Engine programming.

Updated on June 02, 2022

Comments

  • Tiago Costa
    Tiago Costa about 2 years

    MurmurHash3_x86_32() expects a seed parameter. What value should I use and what does it do?