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

{% trans %}Certificate Types{% endtrans %}

+

The following certificate types are defined:

+ + + + + + + + +
TypeType CodePayload LengthTotal LengthNotes/th>
Null003
HashCash1variesvaries + Experimental, unused. Payload contains an ASCII colon-separated hashcash string. +
Hidden203 + Experimental, unused. Hidden routers generally do not announce that they are hidden. +
Signed340 or 7243 or 75 + Experimental, unused. Payload contains a 40-byte DSA signature, + optionally followed by the 32-byte Hash of the signing Destination. +
Multiple4variesvaries + Experimental, unused. Payload contains multiple certificates. +
Key54+7+ + Since 0.9.11. See below for details. +
+ + +

{% trans %}Key Certificates{% endtrans %}

+

+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: +

+ + + + + +
DataLength
Signing Public Key Type2
Crypto Public Key Type2
Excess Signing Public Key Data0+
Excess Crypto Public Key Data0+
+ +

+The defined Signing Key types are: +

+ + + + + + + + +
TypeType CodeTotal Public Key Length
DSA-1600128
ECDSA-SHA256-P256164
ECDSA-SHA384-P384296
ECDSA-SHA512-P5213132
RSA-SHA256-20484512
RSA-SHA384-30725768
RSA-SHA512-409661024
+ +

+The defined Crypto Public Key types are: +

+ + +
TypeType CodeTotal Public Key Length
ElGamal0256
+ +

+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 TypePadding LengthExcess Signing Key Data in Cert
DSA-16000
ECDSA-SHA256-P256640
ECDSA-SHA384-P384320
ECDSA-SHA512-P52104
RSA-SHA256-20480384
RSA-SHA384-30720648
RSA-SHA512-40960896
+ +

Javadoc

@@ -348,9 +450,13 @@ total length: 387+ bytes {% endhighlight %}

{% trans %}Notes{% endtrans %}

-

{% trans -%} +

Javadoc

@@ -402,6 +508,9 @@ The public key of the destination was used for the old i2cp-to-i2cp encryption which was disabled in version 0.6, it is currently unused except for the IV for LeaseSet encryption, which is deprecated. The public key in the LeaseSet is used instead. +
  • +As of release 0.9.11, if the certificate is a Key Certificate, the boundaries of the +key fields may vary. See the Key Certificate section above for details.
  • Javadoc