crypto: Restore sha384 and hmac_sha384 drbgs in FIPS mode
Subsystems (2)
PATCH 1/1 crypto: Restore sha384 and hmac_sha384 drbgs in FIPS mode
Set .fips_allowed in the following drbg alg_test_desc structs.
drbg_nopr_hmac_sha384drbg_nopr_sha384drbg_pr_hmac_sha384drbg_pr_sha384
The sha384 and hmac_sha384 DRBGs with and without prediction resistance were disallowed in an early version of the FIPS 140-3 Implementation Guidance document. Hence, the fips_allowed flag in struct alg_test_desc pertaining to the affected DRBGs was unset. The IG has been withdrawn and they are allowed again.
Furthermore, when the DRBGs are configured, /proc/crypto shows that drbg_*pr_sha384 and drbg_*pr_hmac_sha384 are fips-approved ("fips: yes") but because their self-tests are not run (a consequence of unsetting the fips_allowed flag), the drbgs won't load successfully with the seeming contradictory "fips: yes" in /proc/crypto.
This series contains a single patch that sets the fips_allowed flag in the sha384-impacted DRBGs, which restores the ability to load them in FIPS mode.
To: Herbert Xu <[email protected]>
To: David S. Miller <[email protected]>
--- crypto/testmgr.c | 4 ++++ 1 file changed, 4 insertions(+)
crypto/testmgr.c +4 -0
@@ -4897,6 +4897,7 @@ static const struct alg_test_desc alg_test_descs[] = {*/ .alg = "drbg_nopr_hmac_sha384", .test = alg_test_null, + .fips_allowed =1 }, { .alg = "drbg_nopr_hmac_sha512", .test = alg_test_drbg,
@@ -4915,6 +4916,7 @@ static const struct alg_test_desc alg_test_descs[] = {/* covered by drbg_nopr_sha256 test */ .alg = "drbg_nopr_sha384", .test = alg_test_null, + .fips_allowed =1 }, { .alg = "drbg_nopr_sha512", .fips_allowed = 1,
@@ -4946,6 +4948,7 @@ static const struct alg_test_desc alg_test_descs[] = {/* covered by drbg_pr_hmac_sha256 test */ .alg = "drbg_pr_hmac_sha384", .test = alg_test_null, + .fips_allowed =1 }, { .alg = "drbg_pr_hmac_sha512", .test = alg_test_null,
@@ -4961,6 +4964,7 @@ static const struct alg_test_desc alg_test_descs[] = {/* covered by drbg_pr_sha256 test */ .alg = "drbg_pr_sha384", .test = alg_test_null, + .fips_allowed =1 }, { .alg = "drbg_pr_sha512", .fips_allowed = 1,
Signature · 1 line
2.34.1
Herbert Xu
maintainerQuoted 26 lines · Jeff Barnes
Set .fips_allowed in the following drbg
alg_test_descstructs.
drbg_nopr_hmac_sha384drbg_nopr_sha384drbg_pr_hmac_sha384drbg_pr_sha384The sha384 and
hmac_sha384DRBGs with and without prediction resistance were disallowed in an early version of the FIPS 140-3 Implementation Guidance document. Hence, thefips_allowedflag in structalg_test_descpertaining to the affected DRBGs was unset. The IG has been withdrawn and they are allowed again.Furthermore, when the DRBGs are configured,
/proc/cryptoshows that drbg_*pr_sha384 and drbg_*pr_hmac_sha384 are fips-approved ("fips: yes") but because their self-tests are not run (a consequence of unsetting thefips_allowedflag), the drbgs won't load successfully with the seeming contradictory "fips: yes" in/proc/crypto.This series contains a single patch that sets the
fips_allowedflag in the sha384-impacted DRBGs, which restores the ability to load them in FIPS mode.
Quoted 8 lines
To: Herbert Xu <[email protected]>
To: David S. Miller <[email protected]>--- crypto/testmgr.c | 4 ++++ 1 file changed, 4 insertions(+)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt