Skip to content

Commit 618ad0a

Browse files
committed
Document ML-KEM and ML-DSA support in README and integration guide
1 parent 0aec54f commit 618ad0a

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
77
number where the code change was added.
88

99
## New Feature Additions
10+
* Add ML-KEM (FIPS 203) and ML-DSA (FIPS 204) post-quantum algorithm support via `--enable-pqc` (PR 399)
1011
* Add OpenSSL FIPS baseline process implementation (PR 357)
1112
* Add seed-src handling for wolfProvider (PR 350)
1213
* Add EC public key auto derivation from private key (PR 338)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ Information on how to configure, build, and test wolfProvider can be found here:
7373
* X25519, X448 (key exchange)
7474
* Ed25519, Ed448 (signatures)
7575

76+
### Post-Quantum (NIST FIPS 203 / 204)
77+
Requires wolfSSL master (post-v5.9.1-stable) and OpenSSL 3.5+ for native
78+
default-provider interop. Opt in with `./scripts/build-wolfprovider.sh --enable-pqc`.
79+
80+
* ML-KEM (FIPS 203) — ML-KEM-512, ML-KEM-768, ML-KEM-1024 (key encapsulation)
81+
* ML-DSA (FIPS 204) — ML-DSA-44, ML-DSA-65, ML-DSA-87 (signatures, pure mode with empty context per FIPS 204 sec 5.2)
82+
7683

7784
## Support
7885

docs/INTEGRATION_GUIDE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ This retrieves dependencies (OpenSSL and wolfSSL) and compiles them as necessary
3030
| `--openssl-dir=/path` | Use existing OpenSSL installation |
3131
| `--replace-default` | Make wolfProvider the default provider |
3232
| `--enable-replace-default-testing` | Enable unit testing with replace-default |
33+
| `--enable-pqc` | Enable ML-KEM and ML-DSA post-quantum algorithms (adds `--enable-mlkem --enable-dilithium --enable-experimental` to wolfSSL). Requires wolfSSL post-v5.9.1-stable. |
3334

3435
**Examples:**
3536

@@ -82,6 +83,7 @@ sudo make install
8283
| `--enable-pwdbased` | PKCS#12 support |
8384
| `--enable-hmac-copy` | Faster repeated HMAC with same key (wolfSSL 5.7.8+) |
8485
| `--enable-sp=yes,asm --enable-sp-math-all` | SP Integer maths |
86+
| `--enable-mlkem --enable-dilithium --enable-experimental` | ML-KEM and ML-DSA post-quantum algorithms (wolfSSL post-v5.9.1-stable). The `build-wolfprovider.sh --enable-pqc` flag sets these automatically. |
8587

8688
**Optional CPPFLAGS:**
8789

@@ -151,6 +153,58 @@ This makes replace default mode useful for testing scenarios where you want to e
151153

152154
---
153155

156+
## Post-Quantum Cryptography (ML-KEM and ML-DSA)
157+
158+
wolfProvider supports NIST's post-quantum algorithms via the wolfSSL backend:
159+
160+
| Algorithm | Standard | Parameter Sets |
161+
|-----------|----------|----------------|
162+
| ML-KEM (key encapsulation) | FIPS 203 | ML-KEM-512, ML-KEM-768, ML-KEM-1024 |
163+
| ML-DSA (digital signature) | FIPS 204 | ML-DSA-44, ML-DSA-65, ML-DSA-87 |
164+
165+
ML-DSA uses pure mode with an empty context string (FIPS 204 sec 5.2, Algorithm 22) — interoperable with OpenSSL 3.5+'s native ML-DSA.
166+
167+
### Requirements
168+
169+
- **wolfSSL**: post-v5.9.1-stable (i.e. v5.9.2-stable or master). Older releases lack the `wc_MlDsaKey_*` and `wc_dilithium_sign_ctx_msg` API surface that wolfProvider's PQC code uses.
170+
- **OpenSSL**: any 3.x. OpenSSL 3.5+ is required only for cross-provider interop against its native ML-KEM/ML-DSA implementations.
171+
172+
### Building with PQC
173+
174+
```bash
175+
./scripts/build-wolfprovider.sh --enable-pqc
176+
```
177+
178+
This adds `--enable-mlkem --enable-dilithium --enable-experimental` to the wolfSSL configure step. wolfProvider auto-detects the resulting `WOLFSSL_HAVE_MLKEM` / `HAVE_DILITHIUM` macros via `include/wolfprovider/settings.h` (gated on `__has_include` of the corresponding wolfSSL headers) and registers the six PQC algorithms.
179+
180+
### Usage Example
181+
182+
```bash
183+
# Generate an ML-DSA-65 key with wolfProvider
184+
OPENSSL_CONF=provider.conf openssl genpkey -algorithm ML-DSA-65 -out key.pem
185+
186+
# Sign and verify with ML-DSA-65
187+
OPENSSL_CONF=provider.conf openssl pkeyutl -sign -inkey key.pem -in msg.bin -out sig.bin
188+
OPENSSL_CONF=provider.conf openssl pkeyutl -verify -pubin -inkey pub.pem -sigfile sig.bin -in msg.bin
189+
```
190+
191+
The OpenSSL CLI can also enumerate available algorithms:
192+
193+
```bash
194+
OPENSSL_CONF=provider.conf openssl list -kem-algorithms -provider libwolfprov
195+
OPENSSL_CONF=provider.conf openssl list -signature-algorithms -provider libwolfprov
196+
```
197+
198+
### Validation
199+
200+
A standalone three-way interop validator (`test/pqc_interop.test`) cross-checks every ML-KEM / ML-DSA combination against:
201+
- OpenSSL 3.5+'s native default provider
202+
- wolfSSL's `wc_*` APIs directly (no provider abstraction)
203+
204+
This proves wolfProvider's raw-key, ciphertext, and signature bytes are FIPS 203 / 204 standards-compliant. The CI workflow `.github/workflows/wolfssl-versions-pqc.yml` runs this validator on every PR, plus a backward-compatibility build against pre-PQC wolfSSL to verify the no-symbol path still builds cleanly.
205+
206+
---
207+
154208
## Testing
155209

156210
### Unit Tests

0 commit comments

Comments
 (0)