Highlight dataspec changes

This commit is contained in:
str4d
2013-12-12 04:46:14 +00:00
parent f045b3dfc6
commit b934971e43
5 changed files with 27 additions and 18 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -184,7 +184,7 @@ ElGamal encrypted:
+ +
| |
+----+----+----+----+----+----+----+----+
| encrypted data ... |
| encrypted data... |
~ ~
| |
+----+----+----+----+----+----+----+----+
@@ -192,7 +192,7 @@ ElGamal encrypted:
ElGamal and AES encrypted:
+----+----+----+----+----+----+----+----+
| encrypted data ... |
| encrypted data... |
~ ~
| |
+----+----+----+----+----+----+----+----+

View File

@@ -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 %}