random(4) plugin infrastructure for mulitple RNG in a modular fashion

Tim Kientzle tim at kientzle.com
Sun Aug 18 16:53:36 UTC 2013


On Aug 18, 2013, at 4:33 AM, Dag-Erling Smørgrav wrote:

> Mark R V Murray <mark at grondar.org> writes:
>> OK - in the context of what is currently there, it makes less sense than
>> that; loading RDRAND/Ivy and Nehemiah simultaneously is silly …

Lots of folks build static kernels that they run on diverse
hardware.

The hardware RNG modules should be loadable simultaneously
and should probe and activate only if their hardware is present,
like any other driver for real hardware.

> Provided the HWRNG is of sufficient quality, the user should be allowed
> to use it directly (through /dev/random) without Yarrow / Fortuna.

We could have kernel options to choose mixers
(e.g., Yarrow or Fortuna) for /dev/random and
loadable device modules for entropy sources.

Besides Yarrow and Fortuna mixers, we could then
offer a "null mixer" option that selected the single
"best" entropy source and passed it directly through.

Users could compile the null mixer into the kernel
and load a single HW RNG driver to have precise
control over /dev/random.  Interrupt harvesting would
be the lowest-quality source as a fall back.

In particular, this has a reasonable failure mode if
someone built a kernel with only a single HW entropy
source and the null mixer:
  * On hardware with that source, they would get
     full-speed HW entropy.
  * On hardware without that source, they would get
     the old blocking /dev/random that we had before
     Yarrow, the one that used only interrupt harvesting.

Tim



More information about the freebsd-arch mailing list