From: Stephan Mueller <smueller@chronox.de>
To: herbert@gondor.apana.org.au, Theodore Tso <tytso@mit.edu>
Cc: sandyinchina@gmail.com, Jason Cooper <jason@lakedaemon.net>,
John Denker <jsd@av8n.com>, "H. Peter Anvin" <hpa@zytor.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/6] /dev/random - a new approach
Date: Sun, 24 Apr 2016 12:38:54 +0200 [thread overview]
Message-ID: <1589319.WyasadRQQe@positron.chronox.de> (raw)
Hi Herbert, Ted,
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.
Changes v2:
* Removal of the Jitter RNG fast noise source as requested by Ted
* Addition of processing of add_input_randomness as suggested by Ted
* Update documentation and testing in [1] to cover the updates
* Addition of a SystemTap script to test add_input_randomness
* To clarify the question whether sufficient entropy is present during boot
I added one more test in 3.3.1 [1] which demonstrates the providing of
sufficient entropy during initialization. In the worst case of no fast noise
sources, in the worst case of a virtual machine with only very few hardware
devices, the testing shows that the secondary DRBG is fully seeded with 256
bits of entropy before user space injects the random data obtained
during shutdown of the previous boot (i.e. the requirement phrased by the
legacy /dev/random implementation). As the writing of the random data into
/dev/random by user space will happen before any cryptographic service
is initialized in user space, this test demonstrates that sufficient
entropy is already present in the LRNG at the time user space requires it
for seeding cryptographic daemons. Note, this test result was obtained
for different architectures, such as x86 64 bit, x86 32 bit, ARM 32 bit and
MIPS 32 bit.
[1] http://www.chronox.de/lrng/doc/lrng.pdf
[2] http://www.chronox.de/lrng.html
Stephan Mueller (6):
crypto: DRBG - externalize DRBG functions for LRNG
random: conditionally compile code depending on LRNG
crypto: Linux Random Number Generator
crypto: LRNG - enable compile
crypto: LRNG - hook LRNG into interrupt handler
hyperv IRQ handler: trigger LRNG
crypto/Kconfig | 10 +
crypto/Makefile | 1 +
crypto/drbg.c | 11 +-
crypto/lrng.c | 1743 ++++++++++++++++++++++++++++++++++++++++++++++++
drivers/char/random.c | 8 +
drivers/hv/vmbus_drv.c | 3 +
include/crypto/drbg.h | 7 +
include/linux/genhd.h | 5 +
include/linux/random.h | 9 +-
kernel/irq/handle.c | 1 +
10 files changed, 1791 insertions(+), 7 deletions(-)
create mode 100644 crypto/lrng.c
--
2.5.5
next reply other threads:[~2016-04-24 10:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-24 10:38 Stephan Mueller [this message]
2016-04-24 10:39 ` [PATCH v2 1/6] crypto: DRBG - externalize DRBG functions for LRNG Stephan Mueller
2016-04-24 10:40 ` [PATCH v2 2/6] random: conditionally compile code depending on LRNG Stephan Mueller
2016-04-24 10:40 ` [PATCH v2 3/6] crypto: Linux Random Number Generator Stephan Mueller
2016-04-24 11:30 ` Joe Perches
2016-04-24 14:12 ` Stephan Mueller
2016-04-24 16:43 ` Joe Perches
2016-04-24 10:42 ` [PATCH v2 4/6] crypto: LRNG - enable compile Stephan Mueller
2016-04-24 10:42 ` [PATCH v2 5/6] crypto: LRNG - hook LRNG into interrupt handler Stephan Mueller
2016-04-24 10:44 ` [PATCH v2 6/6] hyperv IRQ handler: trigger LRNG Stephan Mueller
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=1589319.WyasadRQQe@positron.chronox.de \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=jsd@av8n.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox