feat: add ratchet, streaming, SU3 reseed, and router floodfill
- 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:
1 parent
8eafa11b22
commit
ae72b00323
54 files changed
+9607
-704
No files matched your search
@@ -94,3 +94,36 @@ test "I2NP TunnelData and DatabaseSearchReply round-trip" {
|
||||
)
|
||||
assert_eq(dsr_dec, dsr)
|
||||
}
|
||||
|
||||
///|
|
||||
test "I2NP DatabaseLookup ECIES (0x10) and AES (0x02) reply key/tags round-trip" {
|
||||
let key = @common.Hash::from_bytes(Bytes::make(32, b'\x11'))
|
||||
let from = @common.Hash::from_bytes(Bytes::make(32, b'\x22'))
|
||||
let ecies_dbl = @i2np.I2npPayload::DatabaseLookup(
|
||||
key~,
|
||||
from~,
|
||||
flags=b'\x11', // tunnel delivery (0x01) + ECIES reply (0x10)
|
||||
reply_tunnel_id=Some(445566U),
|
||||
excluded_peers=[@common.Hash::from_bytes(Bytes::make(32, b'\x33'))],
|
||||
reply_key=Some(Bytes::make(32, b'\x44')),
|
||||
reply_tags=[Bytes::make(8, b'\x55')],
|
||||
)
|
||||
let ecies_wire = @i2np.encode_short_message(11U, 1700000900U, ecies_dbl)
|
||||
let (_, ecies_dec) = @i2np.decode_short_message(
|
||||
@encoding.Reader::new(ecies_wire),
|
||||
)
|
||||
assert_eq(ecies_dec, ecies_dbl)
|
||||
|
||||
let aes_dbl = @i2np.I2npPayload::DatabaseLookup(
|
||||
key~,
|
||||
from~,
|
||||
flags=b'\x0a', // RouterInfo lookup (0x08) + AES encryption (0x02)
|
||||
reply_tunnel_id=None,
|
||||
excluded_peers=[],
|
||||
reply_key=Some(Bytes::make(32, b'\x66')),
|
||||
reply_tags=[Bytes::make(32, b'\x77')],
|
||||
)
|
||||
let aes_wire = @i2np.encode_short_message(12U, 1700000900U, aes_dbl)
|
||||
let (_, aes_dec) = @i2np.decode_short_message(@encoding.Reader::new(aes_wire))
|
||||
assert_eq(aes_dec, aes_dbl)
|
||||
}
|
||||
Reference in new issue
Block a user