From: Eric Biggers <ebiggers@kernel.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
Theodore Ts'o <tytso@mit.edu>,
Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [PATCH v1 5/7] random: do not xor RDRAND when writing into /dev/random
Date: Tue, 8 Feb 2022 15:11:54 -0800 [thread overview]
Message-ID: <YgL4umsyljm0R4Th@sol.localdomain> (raw)
In-Reply-To: <20220208155335.378318-6-Jason@zx2c4.com>
On Tue, Feb 08, 2022 at 04:53:33PM +0100, Jason A. Donenfeld wrote:
> Continuing the reasoning of "random: ensure early RDSEED goes through
> mixer on init", we don't want RDRAND interacting with anything without
> going through the mixer function, as a backdoored CPU could presumably
> cancel out data during an xor, which it'd have a harder time doing when
> being forced through a cryptographic hash function. There's actually no
> need at all to be calling RDRAND in write_pool(), because before we
> extract from the pool, we always do so with 32 bytes of RDSEED hashed in
> at that stage. Xoring at this stage is needless and introduces a minor
> liability.
>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> drivers/char/random.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
Looks good,
Reviewed-by: Eric Biggers <ebiggers@google.com>
- Eric
next prev parent reply other threads:[~2022-02-08 23:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 15:53 [PATCH v1 0/7] random: cleanups around per-cpu crng & rdrand Jason A. Donenfeld
2022-02-08 15:53 ` [PATCH v1 1/7] random: use RDSEED instead of RDRAND in entropy extraction Jason A. Donenfeld
2022-02-08 23:07 ` Eric Biggers
2022-02-08 15:53 ` [PATCH v1 2/7] random: get rid of secondary crngs Jason A. Donenfeld
2022-02-08 15:53 ` [PATCH v1 3/7] random: inline leaves of rand_initialize() Jason A. Donenfeld
2022-02-08 23:08 ` Eric Biggers
2022-02-08 15:53 ` [PATCH v1 4/7] random: ensure early RDSEED goes through mixer on init Jason A. Donenfeld
2022-02-08 23:10 ` Eric Biggers
2022-02-08 15:53 ` [PATCH v1 5/7] random: do not xor RDRAND when writing into /dev/random Jason A. Donenfeld
2022-02-08 23:11 ` Eric Biggers [this message]
2022-02-08 15:53 ` [PATCH v1 6/7] random: use simpler fast key erasure flow on per-cpu keys Jason A. Donenfeld
2022-02-08 23:39 ` Eric Biggers
2022-02-09 0:21 ` Jason A. Donenfeld
2022-02-08 15:53 ` [PATCH v1 7/7] random: remove outdated INT_MAX >> 6 check in urandom_read() Jason A. Donenfeld
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=YgL4umsyljm0R4Th@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=tytso@mit.edu \
/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