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
@@ -23,6 +23,8 @@ pub fn i2np_block(UInt32, UInt32, @i2np.I2npPayload) -> Ntcp2Block raise Ntcp2Er
|
||||
|
||||
pub fn router_info_block(@common.RouterInfo, flood? : Bool) -> Ntcp2Block raise Ntcp2Error
|
||||
|
||||
pub fn validate_clock_skew(UInt32, UInt32, max_skew_sec? : UInt32) -> Unit raise Ntcp2Error
|
||||
|
||||
// Errors
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub suberror Ntcp2Error {
|
||||
@@ -34,9 +36,20 @@ pub suberror Ntcp2Error {
|
||||
InvalidState(String)
|
||||
InvalidFormat(String)
|
||||
InvalidLength(String)
|
||||
InvalidNetworkId(Byte)
|
||||
ClockSkew(UInt32, UInt32)
|
||||
ReplayDetected
|
||||
}
|
||||
|
||||
// Types and methods
|
||||
pub struct EphemeralReplayCache {
|
||||
entries : Array[(Bytes, UInt32)]
|
||||
max_entries : Int32
|
||||
}
|
||||
pub fn EphemeralReplayCache::check_and_insert(Self, Bytes, UInt32, window_sec? : UInt32) -> Bool
|
||||
pub fn EphemeralReplayCache::check_or_raise(Self, Bytes, UInt32, window_sec? : UInt32) -> Unit raise Ntcp2Error
|
||||
pub fn EphemeralReplayCache::new(max_entries? : Int32) -> Self
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) enum Ntcp2Block {
|
||||
DateTime(UInt32)
|
||||
@@ -87,7 +100,8 @@ pub fn Ntcp2Handshake::read_session_confirmed(Self, Bytes) -> Array[Ntcp2Block]
|
||||
pub fn Ntcp2Handshake::read_session_created(Self, Bytes) -> SessionCreatedOptions raise Ntcp2Error
|
||||
pub fn Ntcp2Handshake::read_session_created_head(Self, Bytes) -> SessionCreatedOptions raise Ntcp2Error
|
||||
pub fn Ntcp2Handshake::read_session_request(Self, Bytes) -> SessionRequestOptions raise Ntcp2Error
|
||||
pub fn Ntcp2Handshake::read_session_request_head(Self, Bytes) -> SessionRequestOptions raise Ntcp2Error
|
||||
pub fn Ntcp2Handshake::read_session_request_head(Self, Bytes, expected_network_id? : Byte) -> SessionRequestOptions raise Ntcp2Error
|
||||
pub fn Ntcp2Handshake::remote_ephemeral(Self) -> Bytes?
|
||||
pub fn Ntcp2Handshake::set_ephemeral(Self, @noise.KeyPair) -> Unit
|
||||
pub fn Ntcp2Handshake::write_session_confirmed(Self, Array[Ntcp2Block]) -> Bytes raise Ntcp2Error
|
||||
pub fn Ntcp2Handshake::write_session_created(Self, UInt32, padding? : Bytes) -> Bytes raise Ntcp2Error
|
||||
|
||||
Reference in new issue
Block a user