Subject: Re: [boost] [hash] Extract module from functional + std::hash_combine
From: Bjorn Reese (breese_at_[hidden])
Date: 2018-01-06 18:23:03


On 01/06/18 18:59, Vinnie Falco via Boost wrote:

> I am not familiar with the terms offset and modulo as applied to
> popular non-cryptographic hash algorithms such as xxHash or

For FNV:

   s/offset/basis/
   s/modulo/prime/

In other words, the constants used withing the hash function.

> Some of these algorithms allow the user to provide an integral "seed"
> which is used to permute the result. This can be used to protect a
> container from algorithmic complexity attacks when used with possibly
> adversarial inputs. In the absence of an algorithm which allows for a
> seed, a less efficient but equally effective method is to prepend a
> unique value, specific to the instance of the hash function, to the
> input data. This can be turned into a generic wrapper (I believe Peter
> will eventually add such a thing if he has not done so already).

Is different seeding sufficient to ensure that they are pairwise
independent?