diff --git a/i2p2www/pages/site/docs/spec/common-structures.html b/i2p2www/pages/site/docs/spec/common-structures.html index dbb7b2de..0e985055 100644 --- a/i2p2www/pages/site/docs/spec/common-structures.html +++ b/i2p2www/pages/site/docs/spec/common-structures.html @@ -1,6 +1,6 @@ {% extends "global/layout.html" %} {% block title %}{% trans %}Common structures Specification{% endtrans %}{% endblock %} -{% block lastupdated %}{% trans %}December 2013{% endtrans %}{% endblock %} +{% block lastupdated %}{% trans %}January 2014{% endtrans %}{% endblock %} {% block accuratefor %}0.9.9{% endblock %} {% block content %}
{% trans i2np=site_url('docs/protocol/i2np'), @@ -219,6 +219,108 @@ however non-NULL certs are not widely used, and any checking is left to the appl {%- endtrans %} +
The following certificate types are defined:
+Type | Type Code | Payload Length | Total Length | Notes/th> |
---|---|---|---|---|
Null | 0 | 0 | 3 | |
HashCash | 1 | varies | varies | + Experimental, unused. Payload contains an ASCII colon-separated hashcash string. + |
Hidden | 2 | 0 | 3 | + Experimental, unused. Hidden routers generally do not announce that they are hidden. + |
Signed | 3 | 40 or 72 | 43 or 75 | + Experimental, unused. Payload contains a 40-byte DSA signature, + optionally followed by the 32-byte Hash of the signing Destination. + |
Multiple | 4 | varies | varies | + Experimental, unused. Payload contains multiple certificates. + |
Key | 5 | 4+ | 7+ | + Since 0.9.11. See below for details. + |
+Key certificates are preliminary, and are scheduled to be introduced in release 0.9.11. +Prior to that release, all PublicKeys were 256-byte ElGamal keys, and +all SigningPublicKeys were 128-byte DSA-160 keys. +A key certificate provides a mechanism to indicate the type of the PublicKey and SigningPublicKey +in the Destination or RouterIdentity, and to package any key data in excess of the +standard lengths. +
+By maintaining exactly 384 bytes before the certificate, and putting any excess key +data inside the certificate, we maintain compatibility for any software that +parses Destinations and RouterIdentities. + +
+The key certificate payload contains: +
Data | Length |
---|---|
Signing Public Key Type | 2 |
Crypto Public Key Type | 2 |
Excess Signing Public Key Data | 0+ |
Excess Crypto Public Key Data | 0+ |
+The defined Signing Key types are: +
Type | Type Code | Total Public Key Length |
---|---|---|
DSA-160 | 0 | 128 |
ECDSA-SHA256-P256 | 1 | 64 |
ECDSA-SHA384-P384 | 2 | 96 |
ECDSA-SHA512-P521 | 3 | 132 |
RSA-SHA256-2048 | 4 | 512 |
RSA-SHA384-3072 | 5 | 768 |
RSA-SHA512-4096 | 6 | 1024 |
+The defined Crypto Public Key types are: +
Type | Type Code | Total Public Key Length |
---|---|---|
ElGamal | 0 | 256 |
+When a Key Certificate is not present, the preceeding 384 bytes in the Destination or RouterIdentity +are defined as the 256-byte ElGamal PublicKey followed by the 128-byte DSA-160 SigningPublicKey. +When a Key Certificate is present, the preceeding 384 bytes are redefined as follows: +
+The lengths and boundaries of the initial key data, the padding, and the excess key data portions +in the certificates are not explicitly specified, but are derived from +the lengths of the specified key types. +If the total lengths of the Crypto and Signing Public Keys exceed 384 bytes, +the remainder will be contained in the Key Certificate. +If the Crypto Public Key length is not 256 bytes, the method for determining +the boundary between the two keys is to be specified in a future revision of this document. +
+ ++Example layouts using an ElGamal Crypto Public Key and the Signing Public Key type indicated: +
Signing Key Type | Padding Length | Excess Signing Key Data in Cert |
---|---|---|
DSA-160 | 0 | 0 |
ECDSA-SHA256-P256 | 64 | 0 |
ECDSA-SHA384-P384 | 32 | 0 |
ECDSA-SHA512-P521 | 0 | 4 |
RSA-SHA256-2048 | 0 | 384 |
RSA-SHA384-3072 | 0 | 648 |
RSA-SHA512-4096 | 0 | 896 |
{% trans -%} +