[issue13703] Hash collision security issue

STINNER Victor report at bugs.python.org
Fri Jan 13 01:08:23 CET 2012

STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Patch version 6:

 - remove a debug code in dev_urandom() (did always raise an exception for testing)
 - dev_urandom() raises an exception if open() fails
 - os.urandom() uses again the right exception type and message (instead of a generic exception)
 - os.urandom() is not more linked to PYTHONHASHSEED
 - replace uint32_t by unsigned int in lcg_urandom() because Visual Studio 8 doesn't provide this type. "unsigned __int32" is available but I prefer to use a more common type. 32 or 64-bit types are supposed to generate the same sequence number (I didn't test).
 - fix more tests
 - regrtest.py restarts the process with PYTHONHASHSEED=randomseed if -r --randomseed=SEED is used
 - fix compilation on Windows (add random.c to the Visual Studio project file)

Added file: http://bugs.python.org/file24222/random-6.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list