This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Colm Buckley, doko, larry, lemburg, martin.panter, matejcik, ned.deily, python-dev, rhettinger, skrah, thomas-petazzoni, vstinner, ztane
Date 2016-06-07.10:14:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Martin Panter (msg267504): "As I understand it, if there is no entropy initialized, this patch will fall back to reading /dev/urandom, which will return predictable data (opposite of “random” data!)."

No, I don't think so.

Linux uses a lot of random sources, but some of them are seen as untrusted as so are added with a very low estimation of their entropy. Linux even adds some random values with a estimation of 0 bit of entropy. For example, drivers can add serial numbers as random numbers.

So even if getrandom() blocks, if the urandom entropy pool is not considered as fully initialized yet, I expect that /dev/urandom still generates *random* numbers, even if these numbers are not suitable to generate cryptographic keys.

Please double check, I'm not sure of what I wrote :-)

See also (but this article doesn't describe how urandom is initialized).
Date User Action Args
2016-06-07 10:14:36vstinnersetrecipients: + vstinner, lemburg, rhettinger, doko, larry, matejcik, ned.deily, skrah, python-dev, martin.panter, ztane, thomas-petazzoni, Colm Buckley
2016-06-07 10:14:36vstinnersetmessageid: <>
2016-06-07 10:14:36vstinnerlinkissue26839 messages
2016-06-07 10:14:35vstinnercreate