[Python-Dev] BDFL ruling request: should we block forever waiting for high-quality random bits?

Donald Stufft donald at stufft.io
Fri Jun 10 15:01:48 EDT 2016


> On Jun 10, 2016, at 2:55 PM, Donald Stufft <donald at stufft.io> wrote:
> 
> So really, out of the recommended solutions you really only have find a way to interface with the getrandom() function, or just consume /dev/urandom and hope it’s been initialized.

I’d note, this is one of the reasons why I felt like blocking (or raising an exception) on os.urandom was the right solution— because it’s hard to get that behavior on Linux otherwise. However, if we instead kept the blocking (or exception) behavior, getting the old behavior back on Linux is trivial, since it would only require open(“/dev/urandom”).read(…).

—
Donald Stufft



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160610/fb4a3095/attachment.html>


More information about the Python-Dev mailing list