New submission from Raymond Hettinger:

The default seeding for the random module currently used 32 bytes from 
urandom() to create the initial state of the random number generator.  This is 
far less than the number of possible states 2**19937-1.

Changing the default seed to a larger number will cover the state space.  This 
gives better security and better randomness by not using just a subset of the 
possible states.

The downside is slightly slower default initialization.

----------
assignee: rhettinger
files: better_seed.diff
keywords: patch
messages: 218238
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Better seeding for the random module
type: security
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35209/better_seed.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21470>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to