New submission from STINNER Victor: 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". ---------- components: Library (Lib) files: getrandom.patch keywords: patch messages: 272867 nosy: haypo priority: normal severity: normal status: open title: PEP 524: Add os.getrandom() type: security versions: Python 3.6 Added file: http://bugs.python.org/file44127/getrandom.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27778> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com