Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_PyOS_URandom documentation #59418

Closed
tiran opened this issue Jun 28, 2012 · 7 comments
Closed

_PyOS_URandom documentation #59418

tiran opened this issue Jun 28, 2012 · 7 comments
Labels
docs Documentation in the Doc dir

Comments

@tiran
Copy link
Member

tiran commented Jun 28, 2012

BPO 15213
Nosy @loewis, @pitrou, @vstinner, @tiran
Files
  • urandom_doc.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2013-10-06.16:47:51.820>
    created_at = <Date 2012-06-28.00:57:03.243>
    labels = ['docs']
    title = '_PyOS_URandom documentation'
    updated_at = <Date 2013-10-06.16:56:22.028>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2013-10-06.16:56:22.028>
    actor = 'python-dev'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2013-10-06.16:47:51.820>
    closer = 'python-dev'
    components = ['Documentation']
    creation = <Date 2012-06-28.00:57:03.243>
    creator = 'christian.heimes'
    dependencies = []
    files = ['26650']
    hgrepos = []
    issue_num = 15213
    keywords = ['patch']
    message_count = 7.0
    messages = ['164218', '164222', '167094', '167118', '167156', '199097', '199099']
    nosy_count = 6.0
    nosy_names = ['loewis', 'pitrou', 'vstinner', 'christian.heimes', 'docs@python', 'python-dev']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue15213'
    versions = ['Python 3.3']

    @tiran
    Copy link
    Member Author

    tiran commented Jun 28, 2012

    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.

    @tiran tiran added the docs Documentation in the Doc dir label Jun 28, 2012
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 28, 2012

    It's not an official API, as the leading underscore specifies. Changing the comment sounds fine to me.

    @vstinner
    Copy link
    Member

    vstinner commented Aug 1, 2012

    So can we close this issue, or should we start to document private functions?

    @pitrou
    Copy link
    Member

    pitrou commented Aug 1, 2012

    The comment needs to be fixed before the issue is closed.

    @vstinner
    Copy link
    Member

    vstinner commented Aug 1, 2012

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 6, 2013

    New changeset 3e5078c3784e by Georg Brandl in branch '2.7':
    Closes bpo-15213: update comment for _PyOS_URandom
    http://hg.python.org/cpython/rev/3e5078c3784e

    @python-dev python-dev mannequin closed this as completed Oct 6, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 6, 2013

    New changeset 176bb5a98463 by Georg Brandl in branch '3.3':
    Closes bpo-15213: update comment for _PyOS_URandom
    http://hg.python.org/cpython/rev/176bb5a98463

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants