From: "Stephan Müller" <smueller@chronox.de>
To: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH v11 0/5] /dev/random - a new approach
Date: Sun, 14 May 2017 16:26:49 +0200 [thread overview]
Message-ID: <7746835.7W6fIIgSam@positron.chronox.de> (raw)
Hi,
The following patch set provides a different approach to /dev/random which
I call Linux Random Number Generator (LRNG) to collect entropy within the Linux
kernel. The main improvements compared to the legacy /dev/random is to provide
sufficient entropy during boot time as well as in virtual environments and when
using SSDs. A secondary design goal is to limit the impact of the entropy
collection on massive parallel systems and also allow the use accelerated
cryptographic primitives. Also, all steps of the entropic data processing are
testable. Finally massive performance improvements are visible at /dev/urandom
and get_random_bytes.
The design and implementation is driven by a set of goals described in [1]
that the LRNG completely implements. Furthermore, [1] includes a
comparison with RNG design suggestions such as SP800-90B, SP800-90C, and
AIS20/31.
The LRNG has a flexible design by allowing an easy replacement of the
deterministic random number generator component. Currently implemented DRNGs
are an SP800-90A DRBG and a ChaCha20 DRNG.
[1] http://www.chronox.de/lrng.html
Changes v11 (compared to v9):
* port to 4.12-rc1
* contintionally compile JitterRNG code depending on CONFIG_CRYPTO_JITTERENTROPY
* update error code path when lrng_hash_buffer fails to report the successfully
read entropy
* remove LRNG_DRBG_BLOCKLEN_BYTES in favor of LRNG_DRBG_BLOCKSIZE
* add get_random_u64 and get_random_u32 from legacy /dev/random to prevent
any modifications of random.c
* move LRNG to drivers/char/
* wakeup user space writers only when entropy in pool is low (not when primary
DRBG entropy is low)
* LFSR alteration to space the processed words 67 words apart to counter
polynomial taps that are close together which may be affected by dependencies
* Always mix in an interrupt time stamp even when considered stuck, just do not
increment number of collected interrupts used to determine the entropy content
Stephan Mueller (5):
crypto: DRBG - externalize DRBG functions for LRNG
random: conditionally compile code depending on LRNG
Linux Random Number Generator
LRNG - enable compile
LRNG - add ChaCha20 support
crypto/drbg.c | 11 +-
drivers/char/Kconfig | 9 +
drivers/char/Makefile | 15 +-
drivers/char/lrng_base.c | 2283 ++++++++++++++++++++++++++++++++++++++++
drivers/char/lrng_kcapi.c | 173 +++
drivers/char/lrng_standalone.c | 325 ++++++
include/crypto/drbg.h | 7 +
include/linux/genhd.h | 5 +
8 files changed, 2821 insertions(+), 7 deletions(-)
create mode 100644 drivers/char/lrng_base.c
create mode 100644 drivers/char/lrng_kcapi.c
create mode 100644 drivers/char/lrng_standalone.c
--
2.9.3
next reply other threads:[~2017-05-14 14:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-14 14:26 Stephan Müller [this message]
2017-05-14 14:27 ` [PATCH v11 1/5] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller
2017-05-14 14:28 ` [PATCH v11 2/5] random: conditionally compile code depending on LRNG Stephan Müller
2017-05-14 14:28 ` [PATCH v11 3/5] Linux Random Number Generator Stephan Müller
2017-05-14 14:29 ` [PATCH v11 4/5] LRNG - enable compile Stephan Müller
2017-05-14 14:29 ` [PATCH v11 5/5] LRNG - add ChaCha20 support Stephan Müller
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=7746835.7W6fIIgSam@positron.chronox.de \
--to=smueller@chronox.de \
--cc=Jason@zx2c4.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 NNTP newsgroup(s).