public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Zack Weinberg" <zack@owlfolio.org>
To: "Adhemerval Zanella" <adhemerval.zanella@linaro.org>,
	"GNU libc development" <libc-alpha@sourceware.org>
Subject: Re: [PATCH v12 9/9] manual: Add documentation for arc4random functions
Date: Sun, 24 Jul 2022 11:20:23 -0400	[thread overview]
Message-ID: <4ce0b95c-cc46-4cb4-97e8-b2f318d530d6@www.fastmail.com> (raw)
In-Reply-To: <9a53815c-5b85-1426-645f-016067f7e953@linaro.org>

On Fri, Jul 22, 2022, at 1:15 PM, Adhemerval Zanella Netto wrote:
> On 22/07/22 12:33, Zack Weinberg via Libc-alpha wrote:
>> On 2022-07-22 8:21 AM, Adhemerval Zanella via Libc-alpha wrote:
>>> +Although these functions provide higher random quality than ISO, BSD, and
>>> +SVID functions, these still use a Pseudo-Random generator and should not
>>> +be used in cryptographic contexts.
>>
>> Huh? Isn't the whole point of arc4random that it _is_
>> cryptographically strong?
>
> Even OpenBSD manual is not clear about it [1].
...
> The main problem is if we state this is a CSRNG we need to certify
> somehow, which I don't have the background to do; and it might incur
> in extra certification depending of the intended glibc usage [2].
> So I think it would be a more conservative approach to state our
> implementation is not a CSRNG ...

My main concern with saying "still uses a Pseudo-Random Generator" and
"should not be used in cryptographic contexts" is that, since we
resisted adding this API for so long, people might think we did the
bare minimum and it shouldn't actually be used at all.

How about this?

# These functions use a cryptographic-strength random number
# generation _algorithm_ (currently ChaCha20) but the implementation
# has not been validated for use in security-critical contexts.

zw

  reply	other threads:[~2022-07-24 15:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 12:21 [PATCH v12 0/9] Add arc4random support Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 1/9] stdlib: Add arc4random, arc4random_buf, and arc4random_uniform (BZ #4417) Adhemerval Zanella
2022-07-22 12:35   ` Florian Weimer
2022-07-22 13:00     ` Adhemerval Zanella Netto
2022-07-22 15:31   ` Zack Weinberg
2022-07-22 17:00     ` Adhemerval Zanella Netto
2022-07-22 12:21 ` [PATCH v12 2/9] stdlib: Add arc4random tests Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 3/9] benchtests: Add arc4random benchtest Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 4/9] aarch64: Add optimized chacha20 Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 5/9] x86: Add SSE2 " Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 6/9] x86: Add AVX2 " Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 7/9] powerpc64: Add " Adhemerval Zanella
2022-07-27 14:09   ` Tulio Magno Quites Machado Filho
2022-07-22 12:21 ` [PATCH v12 8/9] s390x: " Adhemerval Zanella
2022-07-22 12:21 ` [PATCH v12 9/9] manual: Add documentation for arc4random functions Adhemerval Zanella
2022-07-22 15:33   ` Zack Weinberg
2022-07-22 17:15     ` Adhemerval Zanella Netto
2022-07-24 15:20       ` Zack Weinberg [this message]
2022-07-22 19:12 ` [PATCH v12 0/9] Add arc4random support Cristian Rodríguez
2022-07-22 21:35   ` Adhemerval Zanella Netto

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=4ce0b95c-cc46-4cb4-97e8-b2f318d530d6@www.fastmail.com \
    --to=zack@owlfolio.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.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).