From: Jakub Wilk <jwilk@jwilk.net>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: <linux-man@vger.kernel.org>, Alejandro Colomar <alx@kernel.org>,
<libc-alpha@sourceware.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: Re: [PATCH] arc4random.3: New page documenting the arc4random(3) family of functions
Date: Fri, 17 Mar 2023 22:31:49 +0100 [thread overview]
Message-ID: <20230317213149.cp6nx6fhrmq56msv@jwilk.net> (raw)
In-Reply-To: <fd5ee7bd-f4a6-52a6-2f69-7c3547e549c6@gmail.com>
* Alejandro Colomar <alx.manpages@gmail.com>, 2023-01-01 17:27:
>arc4random_uniform() returns a random number less than upper_bound for
>valid input, or 0 when upper_bound is invalid.
Is the "or 0 ..." thing part of the API? I could find anything like that
in glibc docs or BSD man pages.
>STANDARDS
> These nonstandard functions are present in several Unix systems.
That's not really helpful. Also, the VERSIONS section is missing ("every
new interface should include a VERSIONS section").
In contrast, the libbsd man page is much more informative:
>These functions first appeared in OpenBSD 2.1, FreeBSD 3.0, NetBSD
>1.6, and DragonFly 1.0. The functions arc4random(), arc4random_buf()
>and arc4random_uniform() appeared in glibc 2.36.
>
>The original version of this random number generator used the RC4 (also
>known as ARC4) algorithm. In OpenBSD 5.5 it was replaced with the
>ChaCha20 cipher, and it may be replaced again in the future as
>cryptographic techniques advance. A good mnemonic is “A Replacement
>Call for Random”.
--
Jakub Wilk
next prev parent reply other threads:[~2023-03-17 21:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-01 16:26 Alejandro Colomar
2023-01-01 16:27 ` Alejandro Colomar
2023-03-17 21:31 ` Jakub Wilk [this message]
2023-03-17 21:44 ` Alejandro Colomar
2023-03-17 21:54 ` Alejandro Colomar
2023-01-01 16:39 ` Tom Schwindl
2023-01-01 16:41 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230317213149.cp6nx6fhrmq56msv@jwilk.net \
--to=jwilk@jwilk.net \
--cc=Jason@zx2c4.com \
--cc=alx.manpages@gmail.com \
--cc=alx@kernel.org \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).