[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

Larry Hastings report at bugs.python.org
Thu Jun 9 05:15:40 EDT 2016


Larry Hastings added the comment:

> Oh, I found how to start a task before the user login, and os.urandom() still works: it produces 16 bytes immediatly (in 0.0 second).

Just to confirm: that's a fresh Windows VM, never been booted before ever?  If it had ever been booted before, it might be saving its entropy pools to the hard disk at shutdown.

If you do the experiment a second time with another copy of the same fresh VM, does it generate the same 16 bytes?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27266>
_______________________________________


More information about the Python-bugs-list mailing list