Skip to content

Add ML-KEM and ML-DSA support#399

Merged
ColtonWilley merged 55 commits into
wolfSSL:masterfrom
aidangarske:pqc-support
Jun 30, 2026
Merged

Add ML-KEM and ML-DSA support#399
ColtonWilley merged 55 commits into
wolfSSL:masterfrom
aidangarske:pqc-support

Conversation

@aidangarske

@aidangarske aidangarske commented May 23, 2026

Copy link
Copy Markdown
Member

ML-KEM (FIPS 203) and ML-DSA (FIPS 204) via wolfSSL backend.

Algorithms: ML-KEM-512/768/1024, ML-DSA-44/65/87 hybrid schemes supported now as well

Opt-in: ./scripts/build-wolfprovider.sh --enable-pqc (adds --enable-mlkem --enable-mldsa to wolfSSL).

  • PQC is not auto detected its only enabled when specifically built.
  • Ability to enable either algo only or both
  • Reject pqc with debian bookworm build could test with trixie eventually
  • ML-DSA CertificateVerify signing and verification both work in TLS
  • wolfProvider now generates ML-DSA certs
  • wolfProvider X509 ML-DSA sigs are valid
  • osp integration with https://github.com/open-quantum-safe/oqs-demos/tree/main/nginx using ML-DSA and hybrid schemes and tested in CI

Validation: three independent paths cross-checked, all pass.

  • Internal unit tests (11 functions x 3 levels = 33 assertions) in make test
  • wolfProvider <-> OpenSSL 3.6+ default provider (12 cross-pairs)
  • wolfProvider <-> wolfSSL direct wc_* API (12 cross-pairs)
  • entire openssl mldsa mlkem test suite exercised in CI for full compatibility
  • Interop tests with hybrid in place as well

CI: new wolfssl-versions-pqc.yml runs three matrix rows - pre-PQC wolfSSL, latest stable, master -- and the three-way interop validator on the PQC-enabled rows.

  • Put floor to 3.6 where mldsa apis solid and 5.9.2 for pqc in general; added note that we could do lower than 3.6 if reuqested but offically support and test those higher versions

supplemental PR for interop test in wolfCrypt: wolfSSL/wolfssl#10603

Test plan

  • make test passes (all 11 PQC tests + existing suite)
  • ./test/pqc_interop.test -- ALL PASS (24 cross-pairs)
  • Build against pre-PQC wolfSSL: PQC code paths skip, make test clean
  • CI green on all three matrix rows

Copilot AI review requested due to automatic review settings May 23, 2026 05:56

This comment was marked as resolved.

@aidangarske aidangarske self-assigned this May 23, 2026
@aidangarske aidangarske marked this pull request as ready for review May 26, 2026 17:13

@Frauschi Frauschi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some smaller findings. The biggest "issue" imo is the usage of the now old ML-DSA API instead of the new one. But moving this to the new one should be easy.

Comment thread docs/INTEGRATION_GUIDE.md Outdated
Comment thread docs/INTEGRATION_GUIDE.md Outdated
Comment thread docs/INTEGRATION_GUIDE.md Outdated
Comment thread docs/INTEGRATION_GUIDE.md Outdated
Comment thread docs/INTEGRATION_GUIDE.md Outdated
Comment thread src/wp_mldsa_kmgmt.c Outdated
Comment thread src/wp_mldsa_kmgmt.c Outdated
Comment thread src/wp_mldsa_kmgmt.c Outdated
Comment thread src/wp_mldsa_kmgmt.c
Comment thread src/wp_mlkem_kmgmt.c
@Frauschi

Copy link
Copy Markdown

Jenkins retest this please

@aidangarske aidangarske requested a review from Frauschi May 29, 2026 23:43
@aidangarske

Copy link
Copy Markdown
Member Author

Jenkins retest this please

Frauschi
Frauschi previously approved these changes Jun 1, 2026

@Frauschi Frauschi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

Comment thread docs/INTEGRATION_GUIDE.md
Comment thread docs/INTEGRATION_GUIDE.md Outdated
Comment thread include/wolfprovider/settings.h Outdated
Comment thread src/wp_mlkem_kem.c
Comment thread src/wp_mldsa_kmgmt.c
Comment thread src/wp_mldsa_kmgmt.c
Comment thread src/wp_mlkem_kmgmt.c
Comment thread test/standalone/tests/pqc_interop/test_pqc_interop.c
Comment thread src/wp_mldsa_sig.c
Comment thread src/wp_mldsa_kmgmt.c Outdated
Comment thread src/wp_mlkem_kmgmt.c Outdated
Comment thread src/wp_mlkem_kmgmt.c Outdated
@SparkiDev SparkiDev removed their assignment Jun 16, 2026
@aidangarske aidangarske added ci:nginx-pqc PR OSP toggle: run nginx-pqc and removed ci:nginx-pqc PR OSP toggle: run nginx-pqc labels Jun 16, 2026
…A public only when actually decoded, give hybrid variant tables internal linkage
….9.2); fix wget TLS by setting LD_LIBRARY_PATH after nginx download
…rray of GIDs, so the loop ran once with a GID); drop install-layout-dependent mime.types include; add startup debug
…per wolfSSL ref), loading wolfProvider via provider.conf in non-replace builds
…re private first since its encode embeds the public
…eed only for test-entropy/deterministic signing
… wc_MlDsaKey_SignCtxHash/VerifyCtxHash (pure path unchanged for md=NULL)
…eject the external-mu + pre-hash combination both ways
…_Shake256_Update) and SignMuWithSeed/VerifyMu, instead of buffering the whole message
… gate lost with SignMuWithSeed) and reject context/mu/encoding changes after streaming starts
…nal-mu input has been buffered, not just after pure streaming starts
@aidangarske aidangarske added ci:nginx-pqc PR OSP toggle: run nginx-pqc and removed ci:nginx-pqc PR OSP toggle: run nginx-pqc labels Jun 25, 2026
@ColtonWilley ColtonWilley merged commit 1d63d90 into wolfSSL:master Jun 30, 2026
125 checks passed
@aidangarske aidangarske deleted the pqc-support branch June 30, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:nginx-pqc PR OSP toggle: run nginx-pqc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants