Skip to content

feat(core): hybrid X25519 + ML-KEM-768 key wrap - #20

Merged
GoDeskio merged 1 commit into
mainfrom
feat/hybrid-pq-wrap
Nov 5, 2026
Merged

GoDeskio merged 1 commit into
mainfrom
feat/hybrid-pq-wrap

Conversation

@GoDeskio

Copy link
Copy Markdown
Owner

Backlog #6, post-quantum readiness.

  • src/pq.rs: wraps a DEK to a hybrid public key.
  • KEK = HKDF over both shared secrets, plus the ephemeral key, the recipient key and the KEM ciphertext. Payload sealed with XChaCha20-Poly1305 under the EGPQ v1 format.
  • Rejects non-contributory X25519 results.
  • Uses RustCrypto ml-kem 0.2 (FIPS 203, Apache/MIT) and x25519-dalek 2. Note that ml-kem has not had an independent audit.
  • lib.rs: three key.as_ref().into() calls became (&*key).into() to fix a type-inference break caused by the new dependency. No behaviour change.
  • Tests: round trip, randomized output, tamper at four offsets, wrong key, bad public key length.

@socket-security

socket-security Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​ml-kem@​0.2.310010093100100
Addedcargo/​x25519-dalek@​2.0.110010093100100

View full report

@GoDeskio
GoDeskio force-pushed the feat/hybrid-pq-wrap branch from 8cbdcce to afc9f34 Compare November 5, 2026 10:42
@GoDeskio
GoDeskio merged commit f0e4a41 into main Nov 5, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant