forked from I2P_Developers/i2p.www
Highlight dataspec changes
This commit is contained in:
@@ -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'),
|
||||
|
@@ -47,7 +47,7 @@ AES encrypted payload using that key and IV.
|
||||
<p>{% trans -%}
|
||||
The unencrypted ElGamal contains:
|
||||
{%- endtrans %}</p>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
|nonz| H(data) |
|
||||
+----+ +
|
||||
@@ -58,9 +58,9 @@ The unencrypted ElGamal contains:
|
||||
| |
|
||||
+ +----+----+----+----+----+----+----+
|
||||
| | data...
|
||||
+----+----+----+--//
|
||||
+----+----+----+-//
|
||||
{% endhighlight %}
|
||||
|
||||
</pre>
|
||||
<p>{% 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 %}</p>
|
||||
</p>
|
||||
<pre>
|
||||
{% 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 %}
|
||||
|
||||
</pre>
|
||||
<p>{% trans -%}
|
||||
Each encrypted part is prepended with zeros to a size of exactly 257 bytes.
|
||||
Total length: 514 bytes.
|
||||
|
@@ -103,7 +103,7 @@ and an encrypted AES block.
|
||||
<p>{% trans -%}
|
||||
The encrypted message contains:
|
||||
{%- endtrans %}</p>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| |
|
||||
+ +
|
||||
@@ -121,8 +121,8 @@ The encrypted message contains:
|
||||
+ +----+----+----+----+----+----+
|
||||
| +
|
||||
+----+----+
|
||||
{% endhighlight %}
|
||||
|
||||
</pre>
|
||||
|
||||
<h3>{% trans %}ElGamal Block{% endtrans %}</h3>
|
||||
<p>{% trans -%}
|
||||
@@ -132,7 +132,7 @@ The encrypted ElGamal Block is always 514 bytes long.
|
||||
<p>{% trans -%}
|
||||
The unencrypted ElGamal data is 222 bytes long, containing:
|
||||
{%- endtrans %}</p>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| |
|
||||
+ +
|
||||
@@ -159,7 +159,7 @@ The unencrypted ElGamal data is 222 bytes long, containing:
|
||||
+ +----+----+
|
||||
| |
|
||||
+----+----+----+----+----+----+
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<p>{% trans commonstructures=site_url('docs/spec/common-structures') -%}
|
||||
The 32-byte
|
||||
|
@@ -184,7 +184,7 @@ ElGamal encrypted:
|
||||
+ +
|
||||
| |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| encrypted data ... |
|
||||
| encrypted data... |
|
||||
~ ~
|
||||
| |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
@@ -192,7 +192,7 @@ ElGamal encrypted:
|
||||
|
||||
ElGamal and AES encrypted:
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| encrypted data ... |
|
||||
| encrypted data... |
|
||||
~ ~
|
||||
| |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
|
@@ -119,11 +119,18 @@ the following bitfields:</p>
|
||||
+ +
|
||||
| |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
|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 %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user