summaryrefslogtreecommitdiff
path: root/certs/Kconfig
diff options
context:
space:
mode:
authorDimitri John Ledkov <dimitri.ledkov@canonical.com>2023-10-11 00:27:55 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-10-20 08:39:26 +0300
commitd4f5bfe20da9fa54024a73a9c60aea45e572d786 (patch)
treea96f98c4ba9daf369dadce52be7f999fcde8c65e /certs/Kconfig
parentfc3225fd6f1e6ac07a8463e7751ecfa228880c71 (diff)
downloadlinux-d4f5bfe20da9fa54024a73a9c60aea45e572d786.tar.xz
certs: 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. Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'certs/Kconfig')
-rw-r--r--certs/Kconfig6
1 files changed, 4 insertions, 2 deletions
diff --git a/certs/Kconfig b/certs/Kconfig
index 1f109b070877..84582de66b7d 100644
--- a/certs/Kconfig
+++ b/certs/Kconfig
@@ -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.