diff options
author | Stephan Mueller <smueller@chronox.de> | 2015-05-25 15:09:36 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-27 17:51:53 +0800 |
commit | 4c7879907eddd5b3ec09489bc980aab4f44e38dd (patch) | |
tree | 8d1c5d0b32e923d233b2ba66f0eb51d873e7a6ae /include/crypto | |
parent | 3d6a5f75d1340539dcdcec4609761fa4b836a1f2 (diff) | |
download | linux-4c7879907eddd5b3ec09489bc980aab4f44e38dd.tar.bz2 |
crypto: drbg - add async seeding operation
The async seeding operation is triggered during initalization right
after the first non-blocking seeding is completed. As required by the
asynchronous operation of random.c, a callback function is provided that
is triggered by random.c once entropy is available. That callback
function performs the actual seeding of the DRBG.
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>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/drbg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/drbg.h b/include/crypto/drbg.h index b0526981aa85..46994b25dc85 100644 --- a/include/crypto/drbg.h +++ b/include/crypto/drbg.h @@ -51,6 +51,7 @@ #include <linux/fips.h> #include <linux/mutex.h> #include <linux/list.h> +#include <linux/workqueue.h> /* * Concatenation Helper and string operation helper @@ -119,6 +120,7 @@ struct drbg_state { bool fips_primed; /* Continuous test primed? */ unsigned char *prev; /* FIPS 140-2 continuous test value */ #endif + struct work_struct seed_work; /* asynchronous seeding support */ u8 *seed_buf; /* buffer holding the seed */ size_t seed_buf_len; const struct drbg_state_ops *d_ops; |