Open
Conversation
Add KEM.MLKEM768 to the HPKE suite, enabling post-quantum key encapsulation in HPKE using ML-KEM-768. Unlike DHKEM variants, ML-KEM uses direct encapsulate/decapsulate rather than Diffie-Hellman key exchange. https://claude.ai/code/session_01KYKw3dffngLcjPhbdKkUas
Ignore locally-built AWS-LC directory used for testing. https://claude.ai/code/session_01KYKw3dffngLcjPhbdKkUas
- Move encap/decap into KEM as proper abstraction instead of if-matches! checks in Suite. DHKEM and ML-KEM paths are now cleanly dispatched via match in KEM::encap/decap. - Trim docs to match brevity of other KEM entries. - Remove separate changelog entry (HPKE is already new). - Revert .gitignore change. https://claude.ai/code/session_01KYKw3dffngLcjPhbdKkUas
- Remove "DHKEM helpers" comment header. - Add #[should_panic] unit tests covering all five MLKEM768 unreachable!() branches in DHKEM-only helper methods. https://claude.ai/code/session_01KYKw3dffngLcjPhbdKkUas
alex
commented
Apr 16, 2026
| KEM::P256 => kem_params::P256_NSECRET, | ||
| KEM::P384 => kem_params::P384_NSECRET, | ||
| KEM::P521 => kem_params::P521_NSECRET, | ||
| KEM::MLKEM768 => kem_params::MLKEM768_NSECRET, |
Member
Author
There was a problem hiding this comment.
this isn't reached on mlkem, needs coverage
secret_length() is only called from the DHKEM extract_and_expand path, so the MLKEM768 branch needs explicit test coverage. https://claude.ai/code/session_01KYKw3dffngLcjPhbdKkUas
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
KEM.MLKEM768variant to HPKE, enabling post-quantum key encapsulation via ML-KEM-768.KEMthat dispatches cleanly: ML-KEM callsencapsulate/decapsulatedirectly, DHKEM variants use the existing DH + extract-and-expand path.hpke-pq-test-vectors.json(kem_id0x0041), and#[should_panic]Rust unit tests for all unreachable DHKEM-only paths.Test plan
OPENSSL_DIR=aws-lc nox -e localpasses (3570 passed, 637 skipped, 0 failed)https://claude.ai/code/session_01KYKw3dffngLcjPhbdKkUas