]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
modsign: Enable ML-DSA module signing
authorDavid Howells <dhowells@redhat.com>
Mon, 6 Oct 2025 07:35:51 +0000 (08:35 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 2 Feb 2026 16:57:39 +0000 (16:57 +0000)
commit0ad9a71933e73c8a2af101d28e9a1dc35bae02d5
tree04db0b296b8a0613e18f6f3ebb601d62db2a49d0
parent8bbdeb7a25b4cd3d829136a2e12982b8ee7d7991
modsign: Enable ML-DSA module signing

Allow ML-DSA module signing to be enabled.

Note that OpenSSL's CMS_*() function suite does not, as of OpenSSL-3.6,
support the use of CMS_NOATTR with ML-DSA, so the prohibition against using
signedAttrs with module signing has to be removed.  The selected digest
then applies only to the algorithm used to calculate the digest stored in
the messageDigest attribute.  The OpenSSL development branch has patches
applied that fix this[1], but it appears that that will only be available
in OpenSSL-4.

[1] https://github.com/openssl/openssl/pull/28923

sign-file won't set CMS_NOATTR if openssl is earlier than v4, resulting in
the use of signed attributes.

The ML-DSA algorithm takes the raw data to be signed without regard to what
digest algorithm is specified in the CMS message.  The CMS specified digest
algorithm is ignored unless signedAttrs are used; in such a case, only
SHA512 is permitted.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jarkko Sakkinen <jarkko@kernel.org>
cc: Eric Biggers <ebiggers@kernel.org>
cc: Lukas Wunner <lukas@wunner.de>
cc: Ignat Korchagin <ignat@cloudflare.com>
cc: Stephan Mueller <smueller@chronox.de>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: keyrings@vger.kernel.org
cc: linux-crypto@vger.kernel.org
Documentation/admin-guide/module-signing.rst
certs/Kconfig
certs/Makefile
scripts/sign-file.c