]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: drbg - panic on continuous self test error
authorStephan Mueller <smueller@chronox.de>
Fri, 5 Dec 2014 21:40:21 +0000 (22:40 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 22 Dec 2014 12:02:37 +0000 (23:02 +1100)
commit8ae73b053e7d8856e487a5e1d4510b1270e1c9dd
treeccb4a45d70686fea9c0f104a6e43cf33fcffae73
parentb3010b4e9d3a7cf991b9146a440e5fcf08fb3780
crypto: drbg - panic on continuous self test error

This patch adds a panic if the FIPS 140-2 self test error failed.
Note, that entire code is only executed with fips_enabled (i.e. when the
kernel is booted with fips=1. It is therefore not executed for 99.9% of
all user base.

As mathematically such failure cannot occur, this panic should never be
triggered. But to comply with NISTs current requirements, an endless
loop must be replaced with the panic.

When the new version of FIPS 140 will be released, this entire
continuous self test function will be ripped out as it will not be
needed any more.

This patch is functionally equivalent as implemented in ansi_cprng.c and drivers/char/random.c.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c