kern_nrandom, rnd drivers: update for new CSPRNG
authorAlex Hornung <alex@alexhornung.com>
Mon, 14 Jul 2014 07:53:06 +0000 (08:53 +0100)
committerAlex Hornung <alex@alexhornung.com>
Mon, 14 Jul 2014 10:21:12 +0000 (11:21 +0100)
commit790110cdccadc4128de10dd878e006ea6d51ac8c
tree86da118857598d50c532f6e34e9ddddf361a9237
parent805c0661ed450c22f2f7d95e1dba221e98420676
kern_nrandom, rnd drivers: update for new CSPRNG

 * Identify each source of entropy with an identifier, so that
   for example the Fortuna CSPRNG can manage the pool index
   for each source.

 * Add a new sysctl, kern.rand_mode, which can be used to select
   which generator is used for /dev/random; valid values are:
    - csprng (to use only the Fortuna-based CSPRNG)
    - ibaa (to use only IBAA)
    - mixed (to XOR both csprng and ibaa in the output stream
   It defaults to "mixed".
sys/dev/crypto/glxsb/glxsb.c
sys/dev/crypto/hifn/hifn7751.c
sys/dev/crypto/padlock/padlock_rng.c
sys/dev/crypto/rdrand/rdrand.c
sys/dev/crypto/safe/safe.c
sys/dev/crypto/ubsec/ubsec.c
sys/kern/kern_memio.c
sys/kern/kern_nrandom.c
sys/sys/random.h