From 647eca9704934d8597ca6970a24197364be16f10 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Tue, 13 Aug 2019 21:29:02 +0000 Subject: [PATCH] More proposal 147 updates --- i2p2www/pages/site/docs/how/network-database.html | 15 +++++++++++++-- .../proposals/147-transport-network-id-check.rst | 8 ++++---- i2p2www/spec/ssu.rst | 5 +++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/i2p2www/pages/site/docs/how/network-database.html b/i2p2www/pages/site/docs/how/network-database.html index 55bf1a6cf..a2a44430e 100644 --- a/i2p2www/pages/site/docs/how/network-database.html +++ b/i2p2www/pages/site/docs/how/network-database.html @@ -1,7 +1,7 @@ {% extends "global/layout.html" %} {% block title %}{% trans %}The Network Database{% endtrans %}{% endblock %} -{% block lastupdated %}{% trans %}January 2019{% endtrans %}{% endblock %} -{% block accuratefor %}0.9.38{% endblock %} +{% block lastupdated %}{% trans %}August 2019{% endtrans %}{% endblock %} +{% block accuratefor %}0.9.42{% endblock %} {% block content %} <h2>{% trans %}Overview{% endtrans %}</h2> @@ -88,6 +88,17 @@ Above the minimum threshold, the advertised bandwidth is not used or trusted any in the router, except for display in the user interface and for debugging and network analysis. {%- endtrans %}</p> +<p>Valid NetID numbers:</p> +<table><tr><th>Usage<th>NetID Number +<tr><td>Reserved<td>0 +<tr><td>Reserved<td>1 +<tr><td>Current Network (default)<td>2 +<tr><td>Reserved Future Networks<td>3 - 15 +<tr><td>Forks and Test Networks<td>16 - 254 +<tr><td>Reserved<td>255 +</table> + + <h3>{% trans %}Additional Options{% endtrans %}</h3> <p>{% trans stats=i2pconv('stats.i2p') -%} diff --git a/i2p2www/spec/proposals/147-transport-network-id-check.rst b/i2p2www/spec/proposals/147-transport-network-id-check.rst index 2b5fb5a61..fd2c14a05 100644 --- a/i2p2www/spec/proposals/147-transport-network-id-check.rst +++ b/i2p2www/spec/proposals/147-transport-network-id-check.rst @@ -88,7 +88,7 @@ Add the following specification for valid network id values: ================================== ============== - Payload Block Type NetID Number + Usage NetID Number ================================== ============== Reserved 0 Reserved 1 @@ -139,9 +139,9 @@ New: HMAC-MD5(encryptedPayload + IV + (payloadLength ^ protocolVersion ^ ((netid - 2) << 8)), macKey) '+' means append, '^' means exclusive-or, '<<' means left shift. - payloadLength is a 2 byte unsigned integer - protocolVersion is one byte 0x00 - netid is a 1 byte unsigned integer + payloadLength is a two byte unsigned integer, big endian + protocolVersion is two bytes 0x0000, big endian + netid is a two byte unsigned integer, big endian, legal values are 2-254 {% endhighlight %} diff --git a/i2p2www/spec/ssu.rst b/i2p2www/spec/ssu.rst index 284ad47b3..8776f275c 100644 --- a/i2p2www/spec/ssu.rst +++ b/i2p2www/spec/ssu.rst @@ -43,7 +43,7 @@ where '+' means append and '^' means exclusive-or. The IV is generated randomly for each packet. The encryptedPayload is the encrypted version of the message starting with the flag byte (encrypt-then-MAC). The payloadLength used in the MAC is a 2 byte unsigned -integer. Note that protocolVersion is 0, so the exclusive-or is a no-op. The +integer, big endian. Note that protocolVersion is 0, so the exclusive-or is a no-op. The macKey is either the introduction key or is constructed from the exchanged DH key (see details below), as specified for each message below. @@ -54,11 +54,12 @@ The payload itself (that is, the message starting with the flag byte) is AES256/CBC encrypted with the IV and the sessionKey, with replay prevention addressed within its body, explained below. -The protocolVersion is a 2 byte unsigned integer and is currently set to 0. +The protocolVersion is a 2 byte unsigned integer, big endian, and is currently set to 0. Peers using a different protocol version will not be able to communicate with this peer, though earlier versions not using this flag are. The exclusive OR of ((netid - 2) << 8) is used to quickly identify cross-network connections. +The netid is a 2 byte unsigned integer, big endian, and is currently set to 2. As of 0.9.42. See proposal 147 for more information. As the current network ID is 2, this is a no-op for the current network and is backward compatible. Any connections from test networks should have a different ID and will fail the HMAC. -- GitLab