From 646682d24e368682cc1b0c24515b68f881d6e795 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 6 Feb 2022 11:26:21 -0500 Subject: [PATCH] Prop. 159 more updates --- i2p2www/spec/proposals/159-ssu2.rst | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/i2p2www/spec/proposals/159-ssu2.rst b/i2p2www/spec/proposals/159-ssu2.rst index 9d4e0ac1..cc8382d7 100644 --- a/i2p2www/spec/proposals/159-ssu2.rst +++ b/i2p2www/spec/proposals/159-ssu2.rst @@ -3101,6 +3101,7 @@ SessionRequest (Type 0) ------------------------ Alice sends to Bob. +Size: 80 + payload size. Long header. Noise content: Alice's ephemeral key X @@ -3255,14 +3256,6 @@ Payload Notes ````` -- When the published address is "NTCP", Bob supports both NTCP and SSU2 on the - same port. For compatibility, when initiating a connection to an address - published as "NTCP", Alice must limit the maximum size of this message, - including padding, to 287 bytes or less. This facilitates automatic protocol - identification by Bob. When published as "SSU2", there is no size - restriction. See the Published Addresses and Version Detection sections - below. - - The unique X value in the initial ChaCha20 block ensure that the ciphertext is different for every session. @@ -3377,6 +3370,7 @@ SessionCreated (Type 1) ------------------------ Bob sends to Alice. +Size: 80 + payload size. Noise content: Bob's ephemeral key Y Noise payload: datetime, options, relay tag, and padding blocks @@ -3522,6 +3516,7 @@ Payload - Address block - Relay Tag block (optional) - Options block (optional) +- Termination block (optional, if session is rejected) - Padding block (optional) @@ -3647,6 +3642,7 @@ SessionConfirmed (Type 2) ----------------------------- Alice sends to Bob. +Size: 80 + payload size. Noise content: Alice's static key Noise payload part 1: None @@ -4020,9 +4016,12 @@ decrypt the Session Request message to generate a Retry message in response. Retry (Type 9) ------------------------------- +Bob sends to Alice. +Size: 48 + payload size. + TODO encrypted? to what key? -Noise payload: Only padding block +Noise payload: See below. Raw contents: @@ -4088,7 +4087,8 @@ Unencrypted data (Poly1305 authentication tag not shown): Source Connection ID :: As received from Alice in Session Request - Token :: 8 byte unsigned integer, nonzero + Token :: 8 byte unsigned integer, randomly generated by Bob, nonzero, + or zero if session is rejected and a termination block is included {% endhighlight %} @@ -4096,10 +4096,13 @@ Unencrypted data (Poly1305 authentication tag not shown): Payload ``````` - DateTime block -- Termination block +- Address block +- Options block (optional) +- Termination block (optional, if session is rejected) - Padding block (optional) + Notes ````` This is NOT a standard Noise message and is not part of the handshake.