From: Johannes Berg <johannes@sipsolutions.net>
To: Stephan Mueller <smueller@chronox.de>,
Anton Ivanov <anton.ivanov@kot-begemot.co.uk>,
linux-um@lists.infradead.org
Cc: linux-crypto@vger.kernel.org
Subject: Re: jitterentropy vs. simulation
Date: Mon, 04 Dec 2023 11:24:25 +0100 [thread overview]
Message-ID: <e863c5fd47d6b4c36a8f4554d4470ad92e51abea.camel@sipsolutions.net> (raw)
In-Reply-To: <1947100.kdQGY1vKdC@tauon.chronox.de>
Hi Stephan,
> The reason for the Jitter RNG to be dragged in is the Kconfig select in
> CRYPTO_DRBG.
Yes, but you can't get rid of DRBG either. That'd require getting rid of
CRYPTO_RNG_DEFAULT, which means you cannot even have CRYPTO_GENIV?
Hmm. Maybe it _is_ possible to get rid of all these.
> Why does the DRBG require it?
>
> The DRBG seeds from get_random_bytes || jitter rng output. It pulls an equal
> amount of data from each source where each source alone is able to provide all
> entropy that the DRBG needs. That said, the Jitter RNG can be designated as
> optional, because the code already can handle the situation where this Jitter
> RNG is not available. However, in FIPS mode, we must have the Jitter RNG
> source.
>
> That said, I could fathom to change CRYPTO_DRBG to remove the select
> CRYPTO_JITTERENTROPY. But instead, add the select to CRYPTO_FIPS.
Well, CRYPTO_FIPS also would break our testing, since we still have to
support WEP/TKIP (RC4-based) ...
> This change would entail a new log entry when a DRBG instance initializes:
>
> pr_info("DRBG: Continuing without Jitter RNG\n");
>
> I would assume that this change could help you to deselect the Jitter RNG in
> your environment.
>
> Side note: do you have an idea how that Jitter RNG perhaps could still be
> selected by default when the DRBG is enabled, but allows it being deselected
> following the aforementioned suggestion?
Well it _looks_ like it might be possible to get rid of it (see above),
however, what I was really thinking is that jitter RNG might detect that
it doesn't actually get any reasonable data and eventually give up,
rather than looping indefinitely? It seems that might be useful more
generally too?
johannes
next prev parent reply other threads:[~2023-12-04 10:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 10:21 jitterentropy vs. simulation Johannes Berg
[not found] ` <7db861e3-60e4-0ed4-9b28-25a89069a9db@kot-begemot.co.uk>
2023-12-01 18:35 ` Johannes Berg
2023-12-01 19:25 ` Simo Sorce
2023-12-01 20:04 ` Johannes Berg
2023-12-04 8:52 ` Stephan Mueller
2023-12-04 10:24 ` Johannes Berg [this message]
2023-12-04 10:35 ` Stephan Mueller
2023-12-04 12:06 ` Benjamin Beichler
2023-12-04 12:50 ` Anton Ivanov
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=e863c5fd47d6b4c36a8f4554d4470ad92e51abea.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=anton.ivanov@kot-begemot.co.uk \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=smueller@chronox.de \
/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