linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hw_random: add quality categories
Date: Mon, 25 Jun 2007 22:13:41 -0500	[thread overview]
Message-ID: <20070626031340.GQ11166@waste.org> (raw)
In-Reply-To: <200706241555.22957.mb@bu3sch.de>

On Sun, Jun 24, 2007 at 03:55:22PM +0200, Michael Buesch wrote:
> This adds quality categories for hardware random number generators.
> 
...
> +
> +/**
> + * enum hwrng_quality - Quality identifier for RNG hardware
> + * @HWRNG_QUAL_HIGH:	High quality RNG. Higher quality than
> + * 			what is found on the usual PC mainboards.
> + * 			Use that for special dedicated RNG
> + * 			extension boards.
> + * @HWRNG_QUAL_NORMAL:	PC-onboard-RNG devices.
> + * @HWRNG_QUAL_LOW:	Low quality RNG devices. Use this for
> + * 			devices which gather the entropy from possibly
> + * 			bad sources, like the network.
> + * @HWRNG_QUAL_PSEUDO:	Pseudo RNG device. Use this for devices
> + * 			which are not RNG devices by definition, but
> + * 			could be used as such. For example various
> + * 			hardware sensors, like a motion sensor.
> + */

I don't think these definitions are very useful.

There are basically three ways of measuring RNG quality:

a) does it generate a good spectrum based on an unpredictable physical
process like Schott noise or free-running oscillator beat patterns?

b) can the end-user trust that the design is implemented as described?

c) does it output lots of bits fast?

Anything that fails (a) belongs in the PSEUDO class. This applies to
RNGs where the implementation is undocumented too. (There's not much
excuse for this as it costs negligible silicon to do this right.)

Anything that passes (b) is something that the end-user built
themselves while wearing their tinfoil hat.

Anything that claims to be significantly better than the trivial
circuit and whitening on a typical PC is probably marketing hype. 

Which brings us down to (c). And basically all hardware RNGs are
plenty fast enough.

So that's basically three orthogonal axes: "real", "trusted", and
"fast". And "trusted" trumps "real", which trumps "fast".

-- 
Mathematics is the supreme nostalgia of our time.

  parent reply	other threads:[~2007-06-26  3:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-24 13:55 [PATCH] hw_random: add quality categories Michael Buesch
2007-06-24 14:30 ` Alexey Dobriyan
2007-06-24 14:43   ` Michael Buesch
2007-06-25 23:21 ` Andrew Morton
2007-06-26 13:56   ` Michael Buesch
2007-06-26  3:13 ` Matt Mackall [this message]
2007-06-26 14:06   ` Henrique de Moraes Holschuh
2007-06-26 14:20     ` Michael Buesch
2007-06-27  2:00       ` Henrique de Moraes Holschuh
2007-06-27 12:58         ` Michael Buesch
2007-06-27 16:40           ` Henrique de Moraes Holschuh
2007-06-27 17:56             ` Michael Buesch
2007-06-28  7:57               ` Henrique de Moraes Holschuh
2007-06-26 14:12   ` Michael Buesch
2007-06-26 14:32     ` Matt Mackall
2007-06-26 14:45       ` Michael Buesch
2007-06-27  3:18         ` Matt Mackall
2007-06-27 12:52           ` Michael Buesch

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=20070626031340.GQ11166@waste.org \
    --to=mpm@selenic.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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).