crypto: drbg - use Jitter RNG to obtain seed
authorStephan Mueller <smueller@chronox.de>
Mon, 25 May 2015 13:09:59 +0000 (15:09 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 27 May 2015 09:51:53 +0000 (17:51 +0800)
commitb8ec5ba42c4a3854e27c44e697d9b4f0b84b32bb
tree45522a56a48f8391f925689f78333a5344977a75
parent4c7879907eddd5b3ec09489bc980aab4f44e38dd
crypto: drbg - use Jitter RNG to obtain seed

During initialization, the DRBG now tries to allocate a handle of the
Jitter RNG. If such a Jitter RNG is available during seeding, the DRBG
pulls the required entropy/nonce string from get_random_bytes and
concatenates it with a string of equal size from the Jitter RNG. That
combined string is now the seed for the DRBG.

Written differently, the initial seed of the DRBG is now:

get_random_bytes(entropy/nonce) || jitterentropy (entropy/nonce)

If the Jitter RNG is not available, the DRBG only seeds from
get_random_bytes.

CC: Andreas Steffen <andreas.steffen@strongswan.org>
CC: Theodore Ts'o <tytso@mit.edu>
CC: Sandy Harris <sandyinchina@gmail.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c
include/crypto/drbg.h