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 vstinner
Date 2016-08-16.17:25:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za>
In-reply-to
Content
Attached patch adds os.getrandom(): thin wrapper on the Linux getrandom() syscall.

os.getrandom() can return less bytes than requested.

The patch is incomplete: it doesn't include documentation.

I chose to not implement a loop to not loose entropy if a following call fails (ex: fail with EINTR). Rationale:
https://mail.python.org/pipermail/security-sig/2016-July/000072.html

We should also add Solaris support later.

See also #27776: "PEP 524: Make os.urandom() blocking on Linux".
History
Date User Action Args
2016-08-16 17:25:41vstinnersetrecipients: + vstinner
2016-08-16 17:25:41vstinnersetmessageid: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za>
2016-08-16 17:25:41vstinnerlinkissue27778 messages
2016-08-16 17:25:41vstinnercreate