hash randomisation

Mixing a secret random value, chosen when a process starts, into string hashing so that hash values cannot be predicted from outside.

In more detail

Python has randomised str, bytes and datetime hashes by default since version 3.3, which is why hash('apple') differs between runs. Integers are not randomised, so their hashes stay the same across runs. Randomisation defeats hash flooding only while the seed stays secret; if attackers can observe hash outputs, a keyed hash such as SipHash is needed.

Related terms

Taught in

References