[Python-Dev] Hash collision security issue (now public)

Victor Stinner victor.stinner at gmail.com
Fri Jan 6 01:46:58 CET 2012


2012/1/6 Barry Warsaw <barry at python.org>:
>>Settings for PYRANDOMHASH:
>>
>> PYRANDOMHASH=1
>>   enable randomized hashing function
>>
>> PYRANDOMHASH=/path/to/seed
>>   enable randomized hashing function and read seed from 'seed'
>>
>> PYRANDOMHASH=0
>>   disable randomed hashing function
>
> Why not PYTHONHASHSEED then?

See my patch attached to the issue #13703? I prepared the code to be
able to set easily the hash seed (it has a LCG, it's seed can be
provided by the user directly). I agree that the value 0 should give
the same behaviour than the actual hash (disable the randomized hash).
I will add the variable in the next version of my patch.


More information about the Python-Dev mailing list