All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stephan Müller" <smueller@chronox.de>
To: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Ted Ts'o <tytso@mit.edu>, John Denker <jsd@av8n.com>,
	Sandy Harris <sandyinchina@gmail.com>
Subject: Re: Lockless /dev/random - Performance/Security/Stability improvement
Date: Fri, 11 Jun 2021 07:59:28 +0200	[thread overview]
Message-ID: <1744453.HlSabMDqgd@positron.chronox.de> (raw)
In-Reply-To: <CACXcFmnRAkrj0Q3uFjyLu7RaWQh0VPbmErkj+cUaxZMb=YiGCw@mail.gmail.com>

Am Freitag, 11. Juni 2021, 05:59:52 CEST schrieb Sandy Harris:

Hi Sandy,

> The basic ideas here look good to me; I will look at details later.
> Meanwhile I wonder what others might think, so I've added some to cc
> list.
> 
> One thing disturbs me, wanting to give more control to
> "the user who should be free to choose their own security/performance
> tradeoff"
> 
> I doubt most users, or even sys admins, know enough to make such
> choices. Yes, some options like the /dev/random vs /dev/urandom choice
> can be given, but I'm not convinced even that is necessary. Our
> objective should be to make the thing foolproof, incapable of being
> messed up by user actions.

Thank you for your considerations.

I would think you are referring to the boottime/runtime configuration of the 
entropy sources.

I think you are right that normal admins should not have the capability to 
influence the entropy source configuration. Normal users would not be able to 
do that anyway even today.

Yet, I am involved with many different system integrators which must make 
quite an effort to adjust the operation to their needs these days. This 
includes adding proprietary patches. System integrators normally would compile 
their own kernel, I would see no problems in changing the LRNG such that:

- the entropy source configuration is a compile time-only setting with the 
current default values

- the runtime configuration is only enabled with a compile time option that is 
clearly marked as a development / test option and not to be used for runtime 
(like the other test interfaces). It would be disabled by default. Note, I 
have developed a regression test suite to test the LRNG operation and 
behavior. For this, such boottime/runtime settings come in very handy.

Regular administrators would not recompile their kernel. Thus Linux distros 
would simply go with the default by not enabling the test interface and have 
safe defaults. This implies that normal admins do not have the freedom to make 
adjustments. Therefore, I think we would have what you propose: a foolproof 
operation. Yet, people who really need the freedom (as otherwise they will 
make some other problematic changes) have the ability to alter the kernel 
compile time configuration to suit their needs. 

Besides, the LRNG contains the logic to verify the settings and guarantee that 
wrong configurations cannot be applied even at compile time. The term wrong 
configuration refers to configurations which would violate mathematical 
constraints. Therefore, the offered flexibility is still ensuring that such 
integrators cannot mess things up to the extent that mathematically something 
goes wrong.


On the other hand, when you refer to the changing of the used cryptographic 
algorithms, I think all offered options are per definition safe: all offer the 
same security strength. A configuration of the cryptographic algorithms is 
what I would suggest to allow to administrators. This is similar to changing 
the cryptographic algorithms for, say, network communication where the 
administrator is in charge of configuring the allowed / used cipher suites.

Ciao
Stephan



  reply	other threads:[~2021-06-11  5:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09  0:33 Lockless /dev/random - Performance/Security/Stability improvement Mike Brooks
2021-06-11  3:59 ` Sandy Harris
2021-06-11  5:59   ` Stephan Müller [this message]
2021-06-11  9:53     ` Stephan Mueller
2021-06-11  9:43   ` Sandy Harris
     [not found]     ` <CALFqKjTAHvORw_U3sGe0ZRvAH8kTVKCdgVKQu+SK6h=C7B-jbA@mail.gmail.com>
2021-06-27 16:35       ` Mike Brooks
2021-08-16 10:59     ` Sandy Harris
2021-08-16 14:25       ` Theodore Ts'o
2022-01-27  0:35         ` Sandy Harris

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=1744453.HlSabMDqgd@positron.chronox.de \
    --to=smueller@chronox.de \
    --cc=jsd@av8n.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=sandyinchina@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.