Merged
Conversation
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
approved these changes
Apr 16, 2026
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.
Summary
MLKEM1024PrivateKeyandMLKEM1024PublicKeyalongside the existing ML-KEM-768 types, supporting key generation, encapsulation, decapsulation, and PKCS#8 / SPKI serialization via the RFC 9935 seed format.AlgorithmParameters::MlKem1024(OID 2.16.840.1.101.3.4.4.3) in the x509, key-parsing, andcryptography-opensslcrates, andMlKemVariant::MlKem1024(NID_MLKEM1024, pk=1568, ct=1568, ss=32, seed=64).Test plan
ML_KEM_VARIANTSso all parameterized tests (encaps/decaps,private_bytes_raw, PKCS#8 and SPKI round-trips, invalid inputs, equality, copy/deepcopy) run against it automatically.test_kat_vectors_1024using the existingkat_MLKEM_1024.rspNIST KAT vectors.test_mlkem_unsupportedto assertUnsupportedAlgorithmon non-AWS-LC backends.nox -e localclean (ruff, cargo fmt/check/clippy, mypy, pytest, cargo test --all).