x509, pkcs7: Add support for ML-DSA signatures
Subsystems (2)
David Howells
maintainerHi Linus,
Could you pull this patchset in the upcoming merge window please? It adds support for ML-DSA signatures in X.509 certificates and PKCS#7/CMS messages, thereby allowing this algorithm to be used for signing modules, kexec'able binaries, wifi regulatory data, etc..
This requires OpenSSL-3.5 at a minimum and preferably OpenSSL-4 (so that it can avoid the use of CMS signedAttrs - but that version is not cut yet). certs/Kconfig does a check to hide the signing options if OpenSSL does not list the algorithm as being available.
Note that this is dependent on Eric Bigger's libcrypto (for the core ML-DSA implementation) and would need to be pulled after that.
Note also that this has a conflict with the modules tree which has a patch to unconditionally use the OpenSSL CMS_* API to generate signatures in scripts/sign-file.c and to remove fallback use of the PKCS7_* API. I've added an illustrative merge at the top of my keys-pqc branch for reference purposes.
The patches were last posted here:
https://lore.kernel.org/r/[email protected]/
Thanks,
David
---
The following changes since commit 959a634ebcda02e0add101024a5793323d66cda5:
lib/crypto: mldsa: Add FIPS cryptographic algorithm self-test (2026-01-12 11:07:50 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/keys-next-20260206
for you to fetch changes up to 965e9a2cf23b066d8bdeb690dff9cd7089c5f667:
pkcs7: Change a pr_warn() to pr_warn_once() (2026-02-05 15:44:00 +0000)
----------------------------------------------------------------
keys: Support for ML-DSA module signing
----------------------------------------------------------------
David Howells (8):
crypto: Add ML-DSA crypto_sig support
x509: Separately calculate sha256 for blacklist
pkcs7, x509: Rename ->digest to ->m
pkcs7: Allow the signing algo to do whatever digestion it wants itself pkcs7, x509: Add ML-DSA support
modsign: Enable ML-DSA module signing
pkcs7: Allow authenticatedAttributes for ML-DSA
pkcs7: Change a pr_warn() to pr_warn_once()
Documentation/admin-guide/module-signing.rst | 16 ++- certs/Kconfig | 40 ++++++ certs/Makefile | 3 + crypto/Kconfig | 9 ++ crypto/Makefile | 2 + crypto/asymmetric_keys/Kconfig | 11 ++ crypto/asymmetric_keys/asymmetric_type.c | 4 +- crypto/asymmetric_keys/pkcs7_parser.c | 36 ++++- crypto/asymmetric_keys/pkcs7_parser.h | 3 + crypto/asymmetric_keys/pkcs7_verify.c | 78 +++++++---- crypto/asymmetric_keys/public_key.c | 13 +- crypto/asymmetric_keys/signature.c | 3 +- crypto/asymmetric_keys/x509_cert_parser.c | 27 +++- crypto/asymmetric_keys/x509_parser.h | 2 + crypto/asymmetric_keys/x509_public_key.c | 42 ++++-- crypto/mldsa.c | 201 +++++++++++++++++++++++++++ include/crypto/public_key.h | 6 +- include/linux/oid_registry.h | 5 + scripts/sign-file.c | 39 ++++-- security/integrity/digsig_asymmetric.c | 4 +- 20 files changed, 473 insertions(+), 71 deletions(-) create mode 100644 crypto/mldsa.c
The pull request you sent on Fri, 06 Feb 2026 13:33:26 +0000:
The pull request you sent on Fri, 06 Feb 2026 13:33:26 +0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.gittags/keys-next-20260206
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b63c90720348578631cda74285958c3ad3169ce9
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html