diff options
author | Stephan Mueller <smueller@chronox.de> | 2019-05-08 16:19:24 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-05-23 14:01:06 +0800 |
commit | 384577283cad0bde8a83dcf11812e998980a8bbc (patch) | |
tree | be76420b52bfe1e77d6b95dcc6cfc8763d4aedd9 /crypto/ecb.c | |
parent | 8648646bd7927eccf4334248e94827d5dd47acf9 (diff) | |
download | linux-crypto-384577283cad0bde8a83dcf11812e998980a8bbc.tar.gz linux-crypto-384577283cad0bde8a83dcf11812e998980a8bbc.zip |
crypto: drbg - add FIPS 140-2 CTRNG for noise source
FIPS 140-2 section 4.9.2 requires a continuous self test of the noise
source. Up to kernel 4.8 drivers/char/random.c provided this continuous
self test. Afterwards it was moved to a location that is inconsistent
with the FIPS 140-2 requirements. The relevant patch was
63f4f35c018d68be4b791122d18095998c883c71 .
Thus, the FIPS 140-2 CTRNG is added to the DRBG when it obtains the
seed. This patch resurrects the function drbg_fips_continous_test that
existed some time ago and applies it to the noise sources. The patch
that removed the drbg_fips_continous_test was
8b6744f170572bc7278461a4525b1b65b1aac81d .
The Jitter RNG implements its own FIPS 140-2 self test and thus does not
need to be subjected to the test in the DRBG.
The patch contains a tiny fix to ensure proper zeroization in case of an
error during the Jitter RNG data gathering.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecb.c')
0 files changed, 0 insertions, 0 deletions