diff --git a/i2p2www/lexers.py b/i2p2www/lexers.py index aaf6718e..fe1c23b1 100644 --- a/i2p2www/lexers.py +++ b/i2p2www/lexers.py @@ -29,7 +29,9 @@ class DataSpecLexer(RegexLexer): (r'(-*)(//)(-+\+-)', bygroups(Text, Generic.Strong, Text)), ], 'content': [ + (r'(\s*)(\+-)', bygroups(Text, Text), '#pop', 'boundary'), (r'(\s*)([\+|])$', bygroups(Text, Text), '#pop'), + (r'(\s*)(\.\.\.)(\s)', bygroups(Text, Generic.Strong, Text)), (r'(\s*)(\.\.\.)$', bygroups(Text, Generic.Strong), '#pop'), (r'(\s*)(~)$', bygroups(Text, Generic.Strong), '#pop'), (r'(\s*)([\w=;]+)$', bygroups(Text, Name.Tag), '#pop'), diff --git a/i2p2www/pages/site/docs/how/cryptography.html b/i2p2www/pages/site/docs/how/cryptography.html index 5b5fe14d..296110a1 100644 --- a/i2p2www/pages/site/docs/how/cryptography.html +++ b/i2p2www/pages/site/docs/how/cryptography.html @@ -47,7 +47,7 @@ AES encrypted payload using that key and IV.

{% trans -%} The unencrypted ElGamal contains: {%- endtrans %}

-
+{% highlight lang='dataspec' %}
    +----+----+----+----+----+----+----+----+
    |nonz|           H(data)                |
    +----+                                  +
@@ -58,9 +58,9 @@ The unencrypted ElGamal contains:
    |                                       |
    +    +----+----+----+----+----+----+----+
    |    |  data...
-   +----+----+----+--//                   
+   +----+----+----+-//
+{% endhighlight %}
 
-

{% trans -%} The H(data) is the SHA256 of the data that is encrypted in the ElGamal block, and is preceded by a nonzero byte. @@ -77,10 +77,10 @@ Total length: typically 255 bytes. The encrypted ElGamal contains: {%- endtrans %}

-
+{% highlight lang='dataspec' %}
    +----+----+----+----+----+----+----+----+
    |  zero padding...       |              |
-   +----+----+----+--// ----+              +
+   +----+----+----+-//-+----+              +
    |                                       |
    +                                       +
    |       ElG encrypted part 1            |
@@ -88,7 +88,7 @@ The encrypted ElGamal contains:
    |                                       |
    +    +----+----+----+----+----+----+----+
    |    |   zero padding...      |         |
-   +----+----+----+----+--// ----+         +
+   +----+----+----+----+-//-+----+         +
    |                                       |
    +                                       +
    |       ElG encrypted part 2            |
@@ -97,8 +97,8 @@ The encrypted ElGamal contains:
    +         +----+----+----+----+----+----+
    |         +
    +----+----+
+{% endhighlight %}
 
-

{% trans -%} Each encrypted part is prepended with zeros to a size of exactly 257 bytes. Total length: 514 bytes. diff --git a/i2p2www/pages/site/docs/how/elgamal-aes.html b/i2p2www/pages/site/docs/how/elgamal-aes.html index ec84bc47..9c44a9c3 100644 --- a/i2p2www/pages/site/docs/how/elgamal-aes.html +++ b/i2p2www/pages/site/docs/how/elgamal-aes.html @@ -103,7 +103,7 @@ and an encrypted AES block.

{% trans -%} The encrypted message contains: {%- endtrans %}

-
+{% highlight lang='dataspec' %}
    +----+----+----+----+----+----+----+----+
    |                                       |
    +                                       +
@@ -121,8 +121,8 @@ The encrypted message contains:
    +         +----+----+----+----+----+----+
    |         +
    +----+----+
+{% endhighlight %}
 
-

{% trans %}ElGamal Block{% endtrans %}

{% trans -%} @@ -132,7 +132,7 @@ The encrypted ElGamal Block is always 514 bytes long.

{% trans -%} The unencrypted ElGamal data is 222 bytes long, containing: {%- endtrans %}

-
+{% highlight lang='dataspec' %}
    +----+----+----+----+----+----+----+----+
    |                                       |
    +                                       +
@@ -159,7 +159,7 @@ The unencrypted ElGamal data is 222 bytes long, containing:
    +                             +----+----+
    |                             |
    +----+----+----+----+----+----+
-
+{% endhighlight %}

{% trans commonstructures=site_url('docs/spec/common-structures') -%} The 32-byte diff --git a/i2p2www/pages/site/docs/spec/i2np.html b/i2p2www/pages/site/docs/spec/i2np.html index 54938304..4e6df9e0 100644 --- a/i2p2www/pages/site/docs/spec/i2np.html +++ b/i2p2www/pages/site/docs/spec/i2np.html @@ -184,7 +184,7 @@ ElGamal encrypted: + + | | +----+----+----+----+----+----+----+----+ -| encrypted data ... | +| encrypted data... | ~ ~ | | +----+----+----+----+----+----+----+----+ @@ -192,7 +192,7 @@ ElGamal encrypted: ElGamal and AES encrypted: +----+----+----+----+----+----+----+----+ -| encrypted data ... | +| encrypted data... | ~ ~ | | +----+----+----+----+----+----+----+----+ diff --git a/i2p2www/pages/site/docs/spec/ssu.html b/i2p2www/pages/site/docs/spec/ssu.html index b2f1b6da..705611dc 100644 --- a/i2p2www/pages/site/docs/spec/ssu.html +++ b/i2p2www/pages/site/docs/spec/ssu.html @@ -119,11 +119,18 @@ the following bitfields:

+ + | | +----+----+----+----+----+----+----+----+ - |flag| time | (optionally | - +----+----+----+----+----+ | - | this may have 64 byte keying material | - | and/or a one+N byte extended options) | - +---------------------------------------| + |flag| time | | + +----+----+----+----+----+ + + | keying material (optional) | + + + + | | + ~ ~ + | | + + +----+----+----+ + | |#opt| | + +----+----+----+----+----+----+ + + | #opt extended option bytes (optional) | + ~ ~ {% endhighlight %}