[New-bugs-announce] [issue27778] PEP 524: Add os.getrandom()

STINNER Victor report at bugs.python.org
Tue Aug 16 13:25:41 EDT 2016


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 <report at bugs.python.org>
<http://bugs.python.org/issue27778>
_______________________________________


More information about the New-bugs-announce mailing list