crypto: Limit MODULE_SIG_KEY_TYPE_ECDSA to SHA384 or SHA512
Subsystems (3)
PATCH 1/1 crypto: Limit MODULE_SIG_KEY_TYPE_ECDSA to SHA384 or SHA512
NIST FIPS 186-5 states that it is recommended that the security strength associated with the bit length of n and the security strength of the hash function be the same, or higher upon agreement. Given NIST P384 curve is used, force using either SHA384 or SHA512.
--- certs/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
certs/Kconfig +4 -2
@@ -30,9 +30,11 @@ config MODULE_SIG_KEY_TYPE_RSA config MODULE_SIG_KEY_TYPE_ECDSA bool "ECDSA" select CRYPTO_ECDSA + depends on MODULE_SIG_SHA384 || MODULE_SIG_SHA512 help - Use an elliptic curve key (NIST P384) for module signing. Consider - using a strong hash like sha256 or sha384 for hashing modules. + Use an elliptic curve key (NIST P384) for module signing. Use + a strong hash of same or higher bit length, i.e. sha384 or + sha512 for hashing modules. Note: Remove all ECDSA signing keys, e.g. certs/signing_key.pem, when falling back to building Linux 5.14 and older kernels.
Signature · 1 line
2.34.1
Quoted 7 lines · Dimitri John Ledkov
NIST FIPS 186-5 states that it is recommended that the security strength associated with the bit length of n and the security strength of the hash function be the same, or higher upon agreement. Given NIST P384 curve is used, force using either SHA384 or SHA512.
Signed-off-by Dimitri John Ledkov <[email protected]>---
I'd imagine this could go through crypto tree, as folks more in tune with these requirements would be more aligned with what we need.
Luis
Herbert Xu
maintainerQuoted 9 lines · Dimitri John Ledkov
NIST FIPS 186-5 states that it is recommended that the security strength associated with the bit length of n and the security strength of the hash function be the same, or higher upon agreement. Given NIST P384 curve is used, force using either SHA384 or SHA512.
Signed-off-by Dimitri John Ledkov <[email protected]>--- certs/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
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
Herbert Xu
maintainerQuoted 9 lines · Dimitri John Ledkov
NIST FIPS 186-5 states that it is recommended that the security strength associated with the bit length of n and the security strength of the hash function be the same, or higher upon agreement. Given NIST P384 curve is used, force using either SHA384 or SHA512.
Signed-off-by Dimitri John Ledkov <[email protected]>--- certs/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
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