linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sandy Harris <sandyinchina@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>,
	"Stephan Müller" <smueller@chronox.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jason A. Donenfeld" <jason@zx2c4.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v12 3/4] Linux Random Number Generator
Date: Tue, 18 Jul 2017 21:00:10 -0400	[thread overview]
Message-ID: <CACXcFmmFGYb-JteJZB8gS+uGJZ4zNLMU=AwPQf0td+xiG0+9Qw@mail.gmail.com> (raw)
In-Reply-To: <20170718210816.o6c4iziaqj5dnnd3@thunk.org>

On Tue, Jul 18, 2017 at 5:08 PM, Theodore Ts'o <tytso@mit.edu> wrote:

> I've been trying to take the best features and suggestions from your
> proposal and integrating them into /dev/random already.

A good approach.

> Things that I've chosen not take is basically because I disbelieve
> that the Jitter RNG is valid. ...

The biggest problem with random(4) is that you cannot generate good
output without a good seed & just after boot, especially first boot on
a new system, you may not have enough entropy. A user space process
cannot do it soon enough and all the in-kernel solutions (unless you
have a hardware RNG) pose difficulties.

The only really good solution I know of is to find a way to provide a
chunk of randomness early in the boot process. John Denker has a good
discussion of doing this by modifying the kernel image & Ted talks of
doing it via the boot loader. Neither looks remarkably easy. Other
approaches like making the kernel read a seed file or passing a
parameter on the kernel command line have been suggested but, if I
recall right, rejected.

As I see it, the questions about Jitter, or any other in-kernel
generator based on timing, are whether it is good enough to be useful
until we have one of the above solutions or useful as a
defense-in-depth trick after we have one. I'd say yes to both.

There's been a lot of analysis. Stephan has a detailed rationale & a
lot of test data in his papers & the Havege papers also discuss
getting entropy from timer operations. I'd say the best paper is
McGuire et al:
https://static.lwn.net/images/conf/rtlws11/random-hardware.pdf

There is enough there to convince me that grabbing some (256?) bits
from such a generator early in the initialization is worthwhile.

> So I have been trying to do the evolution thing already.
> ...

> I'm obviously biased, but I don't see I see the Raison d'Etre for
> merging LRNG into the kernel.

Nor I.

  reply	other threads:[~2017-07-19  1:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  7:57 [RFC PATCH v12 0/4] /dev/random - a new approach Stephan Müller
2017-07-18  7:57 ` [RFC PATCH v12 1/4] crypto: make Jitter RNG directly accessible Stephan Müller
2017-07-18  8:30   ` Greg Kroah-Hartman
2017-07-18  8:40     ` Stephan Müller
2017-07-18  8:49       ` Greg Kroah-Hartman
2017-07-18  8:53         ` Stephan Müller
2017-07-18  9:02         ` Arnd Bergmann
2017-07-18  9:10           ` Stephan Müller
2017-07-18  9:16             ` Arnd Bergmann
2017-07-18  9:17               ` Stephan Müller
2017-07-18  7:58 ` [RFC PATCH v12 2/4] random: conditionally compile code depending on LRNG Stephan Müller
2017-07-18  8:13   ` Arnd Bergmann
2017-07-18  8:37     ` Stephan Müller
2017-07-18  8:47       ` Arnd Bergmann
2017-07-18  8:50         ` Stephan Müller
2017-07-18  7:59 ` [RFC PATCH v12 3/4] Linux Random Number Generator Stephan Müller
2017-07-18  8:32   ` Greg Kroah-Hartman
2017-07-18  8:45     ` Stephan Müller
2017-07-18  8:52       ` Greg Kroah-Hartman
2017-07-18 14:37         ` Stephan Müller
2017-07-18 21:08           ` Theodore Ts'o
2017-07-19  1:00             ` Sandy Harris [this message]
2017-07-19  1:51               ` Theodore Ts'o
2017-07-19  6:25                 ` Stephan Müller
2017-07-30 10:44                 ` Pavel Machek
2017-07-23 18:05               ` Sandy Harris
2017-07-23 21:47                 ` Theodore Ts'o
2017-07-19  6:22             ` Stephan Müller
2017-07-19  6:34               ` Greg Kroah-Hartman
2017-07-19 17:26               ` Theodore Ts'o
2017-07-20 19:00                 ` Stephan Müller
2017-07-21  3:08                   ` Theodore Ts'o
2017-07-21  8:57                     ` Stephan Müller
2017-07-21 15:09                       ` Arnd Bergmann
2017-07-21 15:17                         ` Stephan Müller
2017-07-18  8:52       ` Greg Kroah-Hartman
2017-07-18  7:59 ` [RFC PATCH v12 4/4] LRNG - enable compile Stephan Müller
2017-07-18  8:51   ` Arnd Bergmann
2017-07-18  8:56     ` Stephan Müller
2017-07-21 11:30 [RFC PATCH v12 3/4] Linux Random Number Generator Jeffrey Walton

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='CACXcFmmFGYb-JteJZB8gS+uGJZ4zNLMU=AwPQf0td+xiG0+9Qw@mail.gmail.com' \
    --to=sandyinchina@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jason@zx2c4.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smueller@chronox.de \
    --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;
as well as URLs for NNTP newsgroup(s).