Skip to content

Add ML-KEM-1024 support#14669

Merged
reaperhulk merged 1 commit intomainfrom
claude/add-mlkem-1024-support-uV75T
Apr 16, 2026
Merged

Add ML-KEM-1024 support#14669
reaperhulk merged 1 commit intomainfrom
claude/add-mlkem-1024-support-uV75T

Conversation

@alex
Copy link
Copy Markdown
Member

@alex alex commented Apr 16, 2026

Summary

  • Adds MLKEM1024PrivateKey and MLKEM1024PublicKey alongside the existing ML-KEM-768 types, supporting key generation, encapsulation, decapsulation, and PKCS#8 / SPKI serialization via the RFC 9935 seed format.
  • Wires up AlgorithmParameters::MlKem1024 (OID 2.16.840.1.101.3.4.4.3) in the x509, key-parsing, and cryptography-openssl crates, and MlKemVariant::MlKem1024 (NID_MLKEM1024, pk=1568, ct=1568, ss=32, seed=64).
  • Available on AWS-LC, mirroring ML-KEM-768.

Test plan

  • Added ML-KEM-1024 to ML_KEM_VARIANTS so all parameterized tests (encaps/decaps, private_bytes_raw, PKCS#8 and SPKI round-trips, invalid inputs, equality, copy/deepcopy) run against it automatically.
  • Added test_kat_vectors_1024 using the existing kat_MLKEM_1024.rsp NIST KAT vectors.
  • Extended test_mlkem_unsupported to assert UnsupportedAlgorithm on non-AWS-LC backends.
  • Added ML-KEM-1024 wycheproof decaps/keygen_seed/encaps cases.
  • nox -e local clean (ruff, cargo fmt/check/clippy, mypy, pytest, cargo test --all).

Adds MLKEM1024PrivateKey and MLKEM1024PublicKey alongside the existing
ML-KEM-768 types, including key generation, encapsulation, decapsulation,
PKCS8/SPKI serialization via the RFC 9935 seed format, and KAT/wycheproof
test coverage. Supported on AWS-LC where the underlying ML-KEM primitives
are available.
@reaperhulk reaperhulk merged commit bff564b into main Apr 16, 2026
68 checks passed
@reaperhulk reaperhulk deleted the claude/add-mlkem-1024-support-uV75T branch April 16, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants