crypto: drbg - ensure drbg hmac sha512 is used in FIPS selftests
authorDimitri John Ledkov <dimitri.ledkov@canonical.com>
Mon, 30 Oct 2023 12:05:15 +0000 (14:05 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Nov 2023 11:16:29 +0000 (19:16 +0800)
commitdd9af7046d815a4d6ee77c2958d98de2af294309
tree6974a44a3b3b052bf7728c63c10bf34b99dbc964
parenta9dc62988600e57cabcca9b357cde4df8ee61fb5
crypto: drbg - ensure drbg hmac sha512 is used in FIPS selftests

Update code comment, self test & healthcheck to use HMAC SHA512,
instead of HMAC SHA256. These changes are in dead-code, or FIPS
enabled code-paths only and have not effect on usual kernel builds.

On systems booting in FIPS mode that has the effect of switch sanity
selftest to HMAC sha512 based (which has been the default DRBG).

This patch updates code from 9b7b94683a ("crypto: DRBG - switch to
HMAC SHA512 DRBG as default DRBG"), but is not interesting to
cherry-pick for stable updates, because it doesn't affect regular
builds, nor has any tangible effect on FIPS certifcation.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Reviewed-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c