Skip to content

Commit 5cd4da1

Browse files
committed
noise: hybrid X25519+ML-KEM-768 handshake, negotiated alongside /noise
Adds an additive, off-by-default 'mlkem-hfs' feature advertising Noise_XXhfs_25519+ML-KEM-768_ChaChaPoly_SHA256 under a new protocol id, falling back to classical /noise for older peers. Ports the crate to snow 0.10 (patched to our fork carrying the ML-KEM KEM) and widens the handshake scratch buffer for the KEM material.
1 parent 6a6814b commit 5cd4da1

8 files changed

Lines changed: 287 additions & 72 deletions

File tree

Cargo.lock

Lines changed: 131 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ web-time = "1.1.0"
159159

160160
[patch.crates-io]
161161

162+
# Point snow at the fork carrying ML-KEM-768 for the HFS extension, until it
163+
# lands upstream (mcginty/snow).
164+
snow = { git = "https://github.com/royzah/snow", branch = "feat/ml-kem-hfs" }
165+
162166
# Patch away `libp2p-identity` in our dependency tree with the workspace version.
163167
# `libp2p-identity` is a leaf dependency and used within `rust-multiaddr` which is **not** part of the workspace.
164168
# As a result, we cannot just reference the workspace version in our crates because the types would mismatch with what

transports/noise/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## 0.47.0
22

3+
- Add an additive, off-by-default `mlkem-hfs` feature: a hybrid post-quantum
4+
handshake (`Noise_XXhfs_25519+ML-KEM-768_ChaChaPoly_SHA256`) negotiated
5+
alongside `/noise`, falling back to classical X25519 for older peers.
6+
37
- Raise MSRV to 1.88.0.
48
See [PR 6273](https://github.com/libp2p/rust-libp2p/pull/6273).
59

0 commit comments

Comments
 (0)