feat: add ratchet, streaming, SU3 reseed, and router floodfill
check / check (windows-latest) (push) Failing after 27s
check / check (ubuntu-latest) (push) Failing after 29s
check / check (macos-latest) (push) Failing after 27s

- Add ratchet/ with ECIES-X25519-AEAD-Ratchet (Proposal 144), Garlic cloves, and ECIES DatabaseLookup replies
- Add streaming/ with Ed25519-signed I2P Streaming (SYN/ACK/NACK/CLOSE/RESET, retransmit, window) and Repliable/Raw Datagrams
- Add common/su3.mbt to parse and verify reseed .su3 bundles
- Add Elligator2 encoding in crypto/ and OfflineSignature support in LeaseSet2 (flags bit 0)
- Router: NTCP2 peer pool, floodfill NetDB crawl, transit tunnel relay, and Garlic/Streaming bridge
- cmd/router: add --peer-dir, --su3, --reseed, --floodfill, --no-clock-skew
- cmd/client: add --dest for persistent destination keys
- Mark Phase 6 complete in README and document the transport scope (NTCP2 only, no SSU2)
This commit is contained in:
nandi committed 2026-11-27 22:23:46 -08:00
1 parent 8eafa11b22
commit ae72b00323
54 files changed
+9607 -704

No files matched your search

+27 -6
View File
@@ -10,17 +10,25 @@ import {
}
// Values
pub fn build_short_tunnel_request(Int32, Array[ShortHopBuildSpec], Array[Bytes]) -> (Array[Bytes], Array[(Int32, HopKeys)]) raise TunnelError
pub fn decrypt_short_build_record(Bytes, @common.Hash, @noise.KeyPair) -> (ShortBuildRequestRecord, HopKeys) raise TunnelError
pub fn decrypt_short_build_reply(HopKeys, Bytes) -> Byte raise TunnelError
pub fn decrypt_short_build_reply(HopKeys, Int32, Bytes) -> Byte raise TunnelError
pub fn encrypt_short_build_record(ShortBuildRequestRecord, @common.Hash, Bytes, @noise.KeyPair) -> (Bytes, HopKeys) raise TunnelError
pub fn decrypt_short_tunnel_replies(Array[Bytes], Array[(Int32, HopKeys)]) -> Array[Byte] raise TunnelError
pub fn encrypt_short_build_reply(HopKeys, Byte) -> Bytes raise TunnelError
pub fn encrypt_short_build_record(ShortBuildRequestRecord, @common.Hash, Bytes, @noise.KeyPair, padding? : Bytes) -> (Bytes, HopKeys) raise TunnelError
pub fn fragment_message_to_cells(DeliveryTarget, UInt32, Bytes, Bytes) -> Array[Bytes] raise TunnelError
pub fn encrypt_short_build_reply(HopKeys, Int32, Byte, padding? : Bytes) -> Bytes raise TunnelError
pub fn pack_tunnel_cell(Bytes, Array[TunnelFragment]) -> Bytes raise TunnelError
pub fn fragment_message_to_cells(DeliveryTarget, UInt32, Bytes, Bytes, padding? : Bytes) -> Array[Bytes] raise TunnelError
pub fn make_slot_nonce(Int32) -> Bytes
pub fn pack_tunnel_cell(Bytes, Array[TunnelFragment], padding? : Bytes) -> Bytes raise TunnelError
pub fn process_short_tunnel_build_hop(Array[Bytes], @common.Hash, @noise.KeyPair, Byte, reply_padding? : Bytes) -> (ShortBuildRequestRecord, HopKeys, Int32, Array[Bytes]) raise TunnelError
pub fn tunnel_layer_decrypt(Bytes, Bytes, Bytes) -> Bytes raise TunnelError
@@ -34,6 +42,7 @@ pub suberror TunnelError {
Crypto(@crypto.CryptoError)
Encoding(@encoding.EncodingError)
Common(@common.CommonError)
Noise(@noise.NoiseError)
InvalidLength(String)
InvalidFormat(String)
ChecksumMismatch
@@ -60,6 +69,8 @@ pub(all) struct HopKeys {
layer_key : Bytes
iv_key : Bytes
handshake_hash : Bytes
garlic_key : Bytes?
garlic_tag : Bytes?
}
#derive(Eq, @debug.Debug)
@@ -75,7 +86,17 @@ pub(all) struct ShortBuildRequestRecord {
options : @common.Mapping
}
pub fn ShortBuildRequestRecord::decode_154(Bytes) -> Self raise TunnelError
pub fn ShortBuildRequestRecord::encode_154(Self) -> Bytes raise TunnelError
pub fn ShortBuildRequestRecord::encode_154(Self, padding? : Bytes) -> Bytes raise TunnelError
#derive(Eq, @debug.Debug)
pub(all) struct ShortHopBuildSpec {
slot_idx : Int32
hop_ident : @common.Hash
hop_static_pub : Bytes
ephemeral : @noise.KeyPair
record : ShortBuildRequestRecord
padding : Bytes
}
#derive(Eq, @debug.Debug)
pub(all) struct TransitHop {