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

Donald Stufft report at bugs.python.org
Wed Jun 8 19:16:00 EDT 2016


Donald Stufft added the comment:

> > there is a lot of code out there using os.urandom for it's security properties
>
> This is exactly why we should not change the behavior of os.urandom().  os.urandom() must not block on Linux.  So defaulting to block=True on Linux is a non-starter.

This statement doesn't make any sense to me... you're asserting that because a lot of people are using os.urandom assuming it's going to give them cryptographically secure random numbers... we shouldn't change the implementation of this function to assure that they are going to get cryptographically secure random numbers?

----------

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


More information about the Python-bugs-list mailing list