[issue29535] datetime hash is deterministic in some cases

Ashwin Ramaswami report at bugs.python.org
Wed Aug 14 19:49:31 EDT 2019


Ashwin Ramaswami <aramaswamis at gmail.com> added the comment:

Randomizing the hash of datetime objects was first proposed in https://bugs.python.org/issue13703#msg151796.

For the same reasons as str and bytes are non-deterministically hashed in in PEP 456, shouldn't numerics, datetime objects, and tuples be non-deterministically hashed as well? This is for the reason that they can all be used as dictionary keys (additionally, hash(n) begins to repeat when n is a large enough number) -- so it seems like they are also susceptible to the hash collision DoS attacks.

----------
nosy: +dmalcolm

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29535>
_______________________________________


More information about the Python-bugs-list mailing list