[issue15213] _PyOS_URandom documentation
New submission from Christian Heimes <lists@cheimes.de>: The comment for Python/random.c:_PyOS_URandom() states
Fill buffer with size pseudo-random bytes, not suitable for cryptographic use, from the operating random number generator (RNG).
which is not correct as all paths use a RNG that is suitable for most cryptographic purposes except long living private keys for asymmetric encryption. Also the function isn't documented although it's an official API function and plays a vital role on the new hash randomization. ---------- assignee: docs@python components: Documentation messages: 164218 nosy: christian.heimes, docs@python, haypo, pitrou priority: low severity: normal status: open title: _PyOS_URandom documentation versions: Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
Martin v. Löwis <martin@v.loewis.de> added the comment: It's not an official API, as the leading underscore specifies. Changing the comment sounds fine to me. ---------- nosy: +loewis _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
STINNER Victor added the comment: So can we close this issue, or should we start to document private functions? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
Antoine Pitrou added the comment: The comment needs to be fixed before the issue is closed. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
STINNER Victor added the comment:
The comment needs to be fixed before the issue is closed.
Ah yes, here is a patch updating the comment of _PyOS_URandom() and the doc of the os module. ---------- keywords: +patch Added file: http://bugs.python.org/file26650/urandom_doc.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
Roundup Robot added the comment: New changeset 3e5078c3784e by Georg Brandl in branch '2.7': Closes #15213: update comment for _PyOS_URandom http://hg.python.org/cpython/rev/3e5078c3784e ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
Roundup Robot added the comment: New changeset 176bb5a98463 by Georg Brandl in branch '3.3': Closes #15213: update comment for _PyOS_URandom http://hg.python.org/cpython/rev/176bb5a98463 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15213> _______________________________________
participants (5)
-
Antoine Pitrou
-
Christian Heimes
-
Martin v. Löwis
-
Roundup Robot
-
STINNER Victor