From: "George Spelvin" <linux@horizon.com>
To: torvalds@linux-foundation.org
Cc: linux@horizon.com, linux-kernel@vger.kernel.org, mpm@selenic.com,
tytso@mit.edu
Subject: Re: [PATCH 1/2] random: Add support for architectural random hooks
Date: 30 Jul 2011 19:46:30 -0400 [thread overview]
Message-ID: <20110730234630.7270.qmail@science.horizon.com> (raw)
> The fact is, even if you worry about some back door for the NSA, or
> some theoretical lack of perfect 32-bit randomness, we can pretty much
> depend on it. We still do our own hashing on top of whatever entropy
> we get out of rdrand, and we would still have all our other stuff.
> Plus the instruction is public and testable - if Intel did something
> wrong, they'll be *very* embarrassed.
>
> In other words, there's absolutely no reason not to use it, and allow
> us to get away from /dev/random running out of entropy. We absolutely
> should use it for bootup randomness (where we currently are somewhat
> weak), and I absolutely disagree that it should be made into more of a
> driver abstraction.
I agree with your second paragraph, but disagree violently with your
first: Intel provide no way to test their RNG, and the AES-based whitener
makes it completely private and UNtestable.
Intel go into details about the hardware's boot-up self-test, but then
provide no way to access that self-test information, much less check up
on it.
I can feed all zeros into the described whitener and get output that is
not possible to distinguish from random, without access to the secret
initial state. That's the whole point of a cipher, and AES is a very
good cipher!
The only technically difficult thing about implementing a back door
is ensuring that the output sequence doesn't repeat each power cycle.
You need just enough entropy or nonce to get that.
As long as you can achieve that, getting caught is actually quite unlikely.
Consider a sample implementation: implement it exactly as described,
except:
- Make the hardware known answer test (or, more specifically,
the state of the DRBG after the KAT) the backdoor secret, and
- Suppress all but the first 40 bits of entropy from the hardware
entropy source, replacing it with a fixed pattern (e.g. all zero).
An attacker who knows the secret needs to brute-force the 40 bits plus
the number of RDRND reads to be able to predict the RDRAND outout.
Someone who doesn't can ony detect the fiddle by power-cycling the
hardware a million times and looking for duplicate outputs. (Birthday
attack on the amount of seed entropy.)
Even a small amount of persistent storage makes things more difficult.
For example, an 8-bit counter that usually survives power cycles replaces
the 40-bit birthday attack with 256 32-bit birthday attacks, requiring
256 * 2^16 = 2^24 power-cycles to find a collision. While making an
attacker's job easier after they've brute-forced 40+ bits once.
I don't think it's *likely* that Intel have done this, but given the
about of National Security bullshit the U.S. government is throwing
around these days, I'm less than 10 bits certain that they haven't.
A much more verifiable way would be to provide access to the raw hardware
generator, and enough hardware documentation to predict how its output
varies with environmental conditions (temperature, supply voltage, clock
speed, x-rays, ...) and lot-to-lot. It would be extremely difficult
to produce a deterministic (i.e. back-door-able) generator with the
same sensitivities.
next reply other threads:[~2011-07-30 23:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-30 23:46 George Spelvin [this message]
2011-07-31 0:29 ` Linus Torvalds
2011-07-31 0:58 ` George Spelvin
2011-07-31 1:02 ` Bryan Donlan
2011-07-31 1:35 ` Linus Torvalds
2011-07-31 2:02 ` Bryan Donlan
2011-07-31 2:42 ` Henrique de Moraes Holschuh
2011-07-31 3:17 ` Bryan Donlan
2011-07-31 4:33 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2011-07-29 20:37 [RFD] Direct support for the x86 RDRAND instruction H. Peter Anvin
2011-07-29 20:37 ` [PATCH 1/2] random: Add support for architectural random hooks H. Peter Anvin
2011-07-29 21:16 ` Matt Mackall
2011-07-30 6:20 ` Linus Torvalds
2011-07-30 16:34 ` Arjan van de Ven
2011-07-30 17:45 ` Matt Mackall
2011-07-30 18:20 ` Linus Torvalds
2011-07-30 19:13 ` Matt Mackall
2011-07-30 19:29 ` Linus Torvalds
2011-07-30 22:25 ` Ted Ts'o
2011-07-31 1:13 ` Linus Torvalds
2011-07-31 1:32 ` H. Peter Anvin
2011-07-31 1:43 ` Linus Torvalds
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=20110730234630.7270.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=torvalds@linux-foundation.org \
--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
all inboxes | Powered by JetHome®