Repository navigation
Support ML-DSA certs in CCF's PKI - #8629
Open
Max (maxtropets) wants to merge 2 commits into
Open
Max (maxtropets) wants to merge 2 commits into
Max (maxtropets) wants to merge 2 commits into
Conversation
Max (maxtropets)
force-pushed
the
f/step-2-mldsa-pki-cert
branch
3 times, most recently
from
October 25, 2026 17:37
4992622 to
f126e46
Compare
Max (maxtropets)
changed the base branch from
main
to
maxtropets-cert-subject-name-der
October 25, 2026 17:37
Max (maxtropets)
marked this pull request as ready for review
October 25, 2026 17:40
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The security-sensitive issuance and verification changes need human review and successful validation on both ML-DSA-capable and older OpenSSL builds.
No open issues 🎉
What changed in this PR
Adds ML-DSA certificate support to CCF's public cryptography API by sharing certificate signing request (CSR) logic with the existing EC implementation.
Changes:
- Extracts shared CSR creation and certificate issuance logic, retaining key-owned public methods.
- Adds ML-DSA certificate issuance and verification, with explicit runtime errors on older OpenSSL builds.
- Adds certificate tests and documents the public API changes.
Custom instructions used: Repository, changelog, and security/safety guidance supplied in the review context.
| File | Description |
|---|---|
| src/crypto/verifier.cpp | Dispatches ML-DSA verification and public-key export. |
| src/crypto/test/mldsa.cpp | Tests certificate issuance, verification, and invalid inputs. |
| src/crypto/openssl/verifier.cpp | Recognizes ML-DSA certificate public keys. |
| src/crypto/openssl/mldsa.h | Shares parameter-set detection and unsupported-build errors. |
| src/crypto/openssl/mldsa_public_key.h | Declares native OpenSSL key construction. |
| src/crypto/openssl/mldsa_public_key.cpp | Implements native key adoption and older-OpenSSL fallbacks. |
| src/crypto/openssl/mldsa_key_pair.h | Declares ML-DSA CSR implementation methods. |
| src/crypto/openssl/mldsa_key_pair.cpp | Implements ML-DSA issuance and compatibility fallbacks. |
| src/crypto/openssl/ec_key_pair.cpp | Delegates EC issuance to shared CSR helpers. |
| src/crypto/openssl/csr.h | Declares shared OpenSSL CSR helpers. |
| src/crypto/openssl/csr.cpp | Implements shared CSR creation and certificate issuance. |
| include/ccf/crypto/verifier.h | Adds ML-DSA support and documents digest restrictions. |
| include/ccf/crypto/mldsa_public_key.h | Exposes public-key declarations on all builds. |
| include/ccf/crypto/mldsa_parameter_set.h | Exposes parameter-set definitions on all builds. |
| include/ccf/crypto/mldsa_key_pair.h | Adds public CSR and certificate issuance APIs. |
| include/ccf/crypto/ec_key_pair.h | Aliases the shared CSR signer type. |
| include/ccf/crypto/csr.h | Defines the shared CSR signer enumeration. |
| cmake/crypto.cmake | Includes the shared CSR implementation in the build. |
| CHANGELOG.md | Documents ML-DSA certificate support and compatibility behavior. |
Review effort: Balanced
Max (maxtropets)
force-pushed
the
f/step-2-mldsa-pki-cert
branch
from
October 26, 2026 15:17
ea8de58 to
f126e46
Compare
cjen1-msft
force-pushed
the
f/step-2-mldsa-pki-cert
branch
from
October 26, 2026 16:19
f126e46 to
bdb153b
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pulls out CSR core logic from EC keys PKI implementation and adds corresponding overloads to ML-DSA keys PKI.
What I kept
sign_csr()methodsWhat to consider as a follow-up