Skip to content

MLDSA PKI - #8378

Merged
Max (maxtropets) merged 5 commits into
mainfrom
f/mldsa-pki
Sep 21, 2026
Merged

Max (maxtropets) merged 5 commits into
mainfrom
f/mldsa-pki

Conversation

@maxtropets

@maxtropets Max (maxtropets) commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Basic PKI interface for ML-DSA, currently intended only for signing and verifying the ledger.

Azure Linux 4 CI run: https://github.com/microsoft/CCF/actions/runs/35094999314.

  • Compilation requires OpenSSL 3.5 and is optionally gated by the  MLDSA  macro for unit tests.
  • For simplicity, only EXPANDED key export is supported (RFC9881).
  • The header inclusion script now also checks the  # include <>  pattern, whose spacing follows clang-format preferences.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Expanded-key export is not enforced, PEM admission is ambiguous and interactive, and release and header-check metadata need correction.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds OpenSSL 3.5-backed ML-DSA signing and verification APIs, primarily for future ledger signing.

Changes:

  • Adds ML-DSA key generation, import/export, signing, and verification.
  • Adds comprehensive unit and NIST ACVP vector coverage.
  • Updates CI, documentation, changelog, and header checks.

Custom instructions used

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md
  • .github/instructions/changelog.instructions.md
File summaries
File Description
src/crypto/test/mldsa.cpp Exercises ML-DSA behavior and validation.
src/crypto/test/mldsa_vectors.h Provides NIST ACVP vectors.
src/crypto/openssl/mldsa.h Adds shared OpenSSL helpers.
src/crypto/openssl/mldsa_public_key.h Declares the OpenSSL public-key implementation.
src/crypto/openssl/mldsa_public_key.cpp Implements import, export, and verification.
src/crypto/openssl/mldsa_key_pair.h Declares the OpenSSL key-pair implementation.
src/crypto/openssl/mldsa_key_pair.cpp Implements generation, import, export, and signing.
scripts/headers-are-included.sh Updates public-header include detection.
include/ccf/crypto/openssl/openssl_wrappers.h Adds OpenSSL ownership and key-check helpers.
include/ccf/crypto/mldsa_public_key.h Defines the public verification API.
include/ccf/crypto/mldsa_parameter_set.h Defines supported parameter sets.
include/ccf/crypto/mldsa_key_pair.h Defines the signing key-pair API.
Doxyfile Enables guarded APIs in Doxygen.
doc/build_apps/crypto.rst Documents ML-DSA APIs.
CMakeLists.txt Adds gated ML-DSA tests.
cmake/crypto.cmake Builds ML-DSA implementations.
CHANGELOG.md Records the new API.
.github/workflows/ci-al4.yml Enables ML-DSA tests on AL4.
Review details
  • Files reviewed: 18/18 changed files
  • Comments generated: 5
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/headers-are-included.sh
Comment thread src/crypto/openssl/mldsa_key_pair.cpp
Comment thread src/crypto/openssl/mldsa_key_pair.cpp
Comment thread src/crypto/openssl/mldsa_public_key.cpp
Comment thread CHANGELOG.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Verification failures are misclassified and the changelog targets an already published release.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

CHANGELOG.md:14

  • This entry is still under the already published 7.0.16 section (published 2026-09-16 at 08:33 UTC). Move it to a new 7.0.17 section with the matching release link, and update python/pyproject.toml from 7.0.16 to 7.0.17 so the first changelog version and package version remain synchronized.
- ML-DSA-44/65/87 key-pair and public-key APIs for key generation, PKCS#8/SPKI PEM and DER import/export, and pure ML-DSA signing and verification with optional context strings. These APIs are compiled only with OpenSSL 3.5 or newer (#8378).
  • Files reviewed: 18/18 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/crypto/openssl/mldsa_public_key.cpp
@maxtropets
Max (maxtropets) marked this pull request as ready for review September 16, 2026 12:17
@maxtropets
Max (maxtropets) requested a review from a team as a code owner September 16, 2026 12:17
@maxtropets Max (maxtropets) changed the title [DRAFT] MLDSA PKI MLDSA PKI Sep 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The changelog entry targets an already published release, and two repository-convention issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

CHANGELOG.md:14

  • ccf-7.0.16 was published on 2026-09-16, and its published notes do not contain this entry, so adding it to that released section will not include the feature in a future release. Create the next 7.0.x section and link above this one, and update python/pyproject.toml to the same version.
- ML-DSA-44/65/87 key-pair and public-key APIs for key generation, PKCS#8/SPKI PEM and DER import/export, and pure ML-DSA signing and verification with optional context strings. These APIs are compiled only with OpenSSL 3.5 or newer (#8378).
  • Files reviewed: 18/18 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/crypto/test/mldsa.cpp
Comment thread CHANGELOG.md Outdated
Comment thread CMakeLists.txt
@maxtropets
Max (maxtropets) enabled auto-merge (squash) September 21, 2026 21:31
@maxtropets
Max (maxtropets) merged commit 0389104 into main Sep 21, 2026
12 checks passed
@maxtropets
Max (maxtropets) deleted the f/mldsa-pki branch September 21, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants