[lkml]   [2018]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] random: add a config option to trust the CPU's hwrng
On Tue, Jul 17, 2018 at 9:51 PM, Theodore Y. Ts'o <> wrote:

> On Tue, Jul 17, 2018 at 09:43:44PM -0400, Theodore Ts'o wrote:
>> This gives the user building their own kernel (or a Linux
>> distribution) the option of deciding whether or not to trust the CPU's
>> hardware random number generator (e.g., RDRAND for x86 CPU's) as being
>> correctly implemented and not having a back door introduced (perhaps
>> courtesy of a Nation State's law enforcement or intelligence
>> agencies).
>> This will prevent getrandom(2) from blocking, if there is a
>> willingness to trust the CPU manufacturer.
>> Signed-off-by: Theodore Ts'o <>
> Note, I had meant to tag this with an RFC. I'm not sure I really want
> to push this to Linus yet. If you have an opinion, let me know.

I had something like this in patches I suggested as RFC a couple of
years back. Those patches were rejected for other reasons, quite
likely valid ones.

My version was not binary like this:

>> + bool "Trust the CPU manufacturer to initialize Linux's CRNG"

Instead, I had a compile-time option to choose a number 0-32
for how much entropy to assume a 32-bit value from the HWRNG
contains. Default was something less than 32. I debated values
in the 24-30 range, don't recall what I chose & don't think it
Matters hugely.

Is that a better approach than the binary choice?

 \ /
  Last update: 2018-07-18 17:14    [W:0.072 / U:11.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site