I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3cdb619a authored by zzz's avatar zzz
Browse files

formatting cleanups

parent d235f456
No related branches found
No related tags found
No related merge requests found
{% extends "global/layout.html" %} {% extends "global/layout.html" %}
{% block title %}SSU Protocol Specification{% endblock %} {% block title %}SSU Protocol Specification{% endblock %}
{% block lastupdated %}December 2013{% endblock %} {% block lastupdated %}January 2014{% endblock %}
{% block accuratefor %}0.9.9{% endblock %} {% block accuratefor %}0.9.10{% endblock %}
{% block content %} {% block content %}
<p> <p>
...@@ -99,10 +99,13 @@ the following bitfields:</p> ...@@ -99,10 +99,13 @@ the following bitfields:</p>
Bit order: 76543210 (bit 7 is MSB) Bit order: 76543210 (bit 7 is MSB)
bits 7-4: payload type bits 7-4: payload type
bit 3: rekey? bit 3: rekey, always 0, unimplemented
bit 2: extended options included bit 2: extended options included, always 0, unimplemented
bits 1-0: reserved bits 1-0: reserved, set to 0 for compatibility with future uses
{% endhighlight %} {% endhighlight %}
<p>The header format is:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
Header: 37+ bytes Header: 37+ bytes
Encryption starts with the flag byte. Encryption starts with the flag byte.
...@@ -127,8 +130,15 @@ the following bitfields:</p> ...@@ -127,8 +130,15 @@ the following bitfields:</p>
+----+----+----+----+----+----+ + +----+----+----+----+----+----+ +
| #opt extended option bytes (optional) | | #opt extended option bytes (optional) |
~ ~ ~ ~
~ ~
+----+----+----+----+----+----+----+----+
{% endhighlight %} {% endhighlight %}
<p>
Note that rekeying and extended options are unimplemented, so the
current header size is exactly 37 bytes.
</p>
<h3 id="rekey">Rekeying</h3> <h3 id="rekey">Rekeying</h3>
<p>If the rekey flag is set, 64 bytes of keying material follow the <p>If the rekey flag is set, 64 bytes of keying material follow the
...@@ -239,6 +249,8 @@ This is the first message sent to establish a session. ...@@ -239,6 +249,8 @@ This is the first message sent to establish a session.
<td>introKey</td></tr> <td>introKey</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
| X, as calculated from DH | | X, as calculated from DH |
...@@ -257,6 +269,7 @@ This is the first message sent to establish a session. ...@@ -257,6 +269,7 @@ This is the first message sent to establish a session.
<p> <p>
Typical size including header, in current implementation: 304 (IPv4) or 320 (IPv6) bytes Typical size including header, in current implementation: 304 (IPv4) or 320 (IPv6) bytes
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
...@@ -299,6 +312,8 @@ This is the response to a Session Request. ...@@ -299,6 +312,8 @@ This is the response to a Session Request.
signature and the following 8 bytes padding.</td></tr> signature and the following 8 bytes padding.</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
| Y, as calculated from DH | | Y, as calculated from DH |
...@@ -333,6 +348,7 @@ This is the response to a Session Request. ...@@ -333,6 +348,7 @@ This is the response to a Session Request.
<p> <p>
Typical size including header, in current implementation: 368 bytes (IPv4 or IPv6) Typical size including header, in current implementation: 368 bytes (IPv4 or IPv6)
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
...@@ -390,7 +406,10 @@ bits 3-0: total identity fragments (F) 1-15</pre></li> ...@@ -390,7 +406,10 @@ bits 3-0: total identity fragments (F) 1-15</pre></li>
<td>sessionKey</td></tr> <td>sessionKey</td></tr>
</table> </table>
<b>Fragment 0 through F-2 (if F &gt; 1):</b> <p>
<b>Fragment 0 through F-2</b>
(only if F &gt; 1; currently unused, see notes below) :
</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
|info| cursize | | |info| cursize | |
...@@ -405,7 +424,9 @@ bits 3-0: total identity fragments (F) 1-15</pre></li> ...@@ -405,7 +424,9 @@ bits 3-0: total identity fragments (F) 1-15</pre></li>
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
{% endhighlight %} {% endhighlight %}
<p>
<b>Fragment F-1 (last or only fragment):</b> <b>Fragment F-1 (last or only fragment):</b>
</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
|info| cursize | | |info| cursize | |
...@@ -436,6 +457,7 @@ bits 3-0: total identity fragments (F) 1-15</pre></li> ...@@ -436,6 +457,7 @@ bits 3-0: total identity fragments (F) 1-15</pre></li>
<p> <p>
Typical size including header, in current implementation: 480 bytes Typical size including header, in current implementation: 480 bytes
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
...@@ -479,14 +501,11 @@ and is sent as of release 0.8.9. ...@@ -479,14 +501,11 @@ and is sent as of release 0.8.9.
<td>sessionKey or introKey</td></tr> <td>sessionKey or introKey</td></tr>
</table> </table>
{% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+
| no data |
+----+----+----+----+----+----+----+----+
{% endhighlight %}
<p> <p>
This message does not contain any data.
Typical size including header, in current implementation: 48 bytes Typical size including header, in current implementation: 48 bytes
(before non-mod-16 padding)
</p> </p>
<h3 id="relayRequest">RelayRequest (type 3)</h3> <h3 id="relayRequest">RelayRequest (type 3)</h3>
...@@ -513,6 +532,8 @@ This is the first message sent from Alice to Bob to request an introduction to C ...@@ -513,6 +532,8 @@ This is the first message sent from Alice to Bob to request an introduction to C
<td>introKey (or sessionKey, if Alice/Bob is established)</td></tr> <td>introKey (or sessionKey, if Alice/Bob is established)</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
| relay tag |size| Alice IP addr | relay tag |size| Alice IP addr
...@@ -537,6 +558,7 @@ This is the first message sent from Alice to Bob to request an introduction to C ...@@ -537,6 +558,7 @@ This is the first message sent from Alice to Bob to request an introduction to C
<p> <p>
Typical size including header, in current implementation: 96 bytes (no Alice IP included) or 112 bytes (4-byte Alice IP included) Typical size including header, in current implementation: 96 bytes (no Alice IP included) or 112 bytes (4-byte Alice IP included)
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
...@@ -579,6 +601,8 @@ This is the response to a Relay Request and is sent from Bob to Alice. ...@@ -579,6 +601,8 @@ This is the response to a Relay Request and is sent from Bob to Alice.
<td>introKey (or sessionKey, if Alice/Bob is established)</td></tr> <td>introKey (or sessionKey, if Alice/Bob is established)</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
|size| Charlie IP | Port (C)|size| |size| Charlie IP | Port (C)|size|
...@@ -593,6 +617,7 @@ This is the response to a Relay Request and is sent from Bob to Alice. ...@@ -593,6 +617,7 @@ This is the response to a Relay Request and is sent from Bob to Alice.
<p> <p>
Typical size including header, in current implementation: 64 (Alice IPv4) or 80 (Alice IPv6) bytes Typical size including header, in current implementation: 64 (Alice IPv4) or 80 (Alice IPv6) bytes
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
...@@ -632,6 +657,8 @@ This is the introduction for Alice, which is sent from Bob to Charlie. ...@@ -632,6 +657,8 @@ This is the introduction for Alice, which is sent from Bob to Charlie.
<td>sessionKey</td></tr> <td>sessionKey</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
|size| Alice IP | Port (A)|size| |size| Alice IP | Port (A)|size|
...@@ -646,6 +673,7 @@ This is the introduction for Alice, which is sent from Bob to Charlie. ...@@ -646,6 +673,7 @@ This is the introduction for Alice, which is sent from Bob to Charlie.
<p> <p>
Typical size including header, in current implementation: 48 bytes Typical size including header, in current implementation: 48 bytes
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
...@@ -736,6 +764,8 @@ byte 1 ...@@ -736,6 +764,8 @@ byte 1
<td>sessionKey</td></tr> <td>sessionKey</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
|flag| (additional headers, determined | |flag| (additional headers, determined |
...@@ -835,6 +865,8 @@ See <a href="{{ site_url('docs/transport/ssu') }}#peerTesting">the SSU overview ...@@ -835,6 +865,8 @@ See <a href="{{ site_url('docs/transport/ssu') }}#peerTesting">the SSU overview
<td>introKey (or sessionKey if the connection has already been established)</td></tr> <td>introKey (or sessionKey if the connection has already been established)</td></tr>
</table> </table>
<p>Message format:</p>
{% highlight lang='dataspec' %} {% highlight lang='dataspec' %}
+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+
| test nonce |size| Alice IP addr | test nonce |size| Alice IP addr
...@@ -855,6 +887,7 @@ See <a href="{{ site_url('docs/transport/ssu') }}#peerTesting">the SSU overview ...@@ -855,6 +887,7 @@ See <a href="{{ site_url('docs/transport/ssu') }}#peerTesting">the SSU overview
<p> <p>
Typical size including header, in current implementation: 80 bytes Typical size including header, in current implementation: 80 bytes
(before non-mod-16 padding)
</p> </p>
<h4>Notes</h4> <h4>Notes</h4>
......
...@@ -139,6 +139,7 @@ Currently set in the inital SYN packet, otherwise the ackThrough field is always ...@@ -139,6 +139,7 @@ Currently set in the inital SYN packet, otherwise the ackThrough field is always
Note that this does not save any space, the ackThrough field is before the flags Note that this does not save any space, the ackThrough field is before the flags
and is always present. and is always present.
<tr><td>11-15<td>unused<td><td><td> <tr><td>11-15<td>unused<td><td><td>
Set to zero for compatibility with future uses.
</table> </table>
<h4>Variable Length Signature Notes</h4> <h4>Variable Length Signature Notes</h4>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment