From 9567477f71b2c98aea8b609fda0fe73c4acf8772 Mon Sep 17 00:00:00 2001
From: zzz Specified below is version 1 of a simple client protocol for interacting with
I2P.
@@ -11,6 +11,17 @@ Newer alternatives:
BOB.
+The reported version remains "1.0".
+I2P 0.9.14 Changes
+
+
+
---------------------------------------------------------------------- Simple Anonymous Messaging (SAM version 1.0) Specification @@ -51,7 +62,9 @@ and HELLO REPLY RESULT=$result VERSION=1.0 -The current version for both must be "1.0". +As of I2P 0.9.14, the MIN parameter is optional. +The MAX parameter must be provided and be greater than or equal to "1" and +less than "2" to use version 1. The RESULT value may be one of: @@ -311,6 +324,11 @@ which is answered by PUB=$pubkey PRIV=$privkey +As of I2P 0.9.14, an optional parameter SIGNATURE_TYPE is supported. +The SIGNATURE_TYPE value may be any name (e.g. ECDSA_SHA256_P256, case insensitive) or number (e.g. 1) +that is supported by Key Certificates. +The default is DSA_SHA1. + ---------------------------------------------------------------------- RESULT values ---------------------------------------------------------------------- diff --git a/i2p2www/pages/site/docs/api/samv2.html b/i2p2www/pages/site/docs/api/samv2.html index b4707c90..d0d16b83 100644 --- a/i2p2www/pages/site/docs/api/samv2.html +++ b/i2p2www/pages/site/docs/api/samv2.html @@ -1,7 +1,7 @@ {% extends "global/layout.html" %} {% block title %}SAM V2 Specification{% endblock %} -{% block lastupdated %}August 2010{% endblock %} -{% block accuratefor %}0.8{% endblock %} +{% block lastupdated %}June 2014{% endblock %} +{% block accuratefor %}0.9.14{% endblock %} {% block content %}Specified below is a simple client protocol for interacting with I2P.
@@ -14,8 +14,9 @@ Alternatives: BOB. - -Version 2 Changes +Version 2 Changes
++SAM V2 was introduced in I2P release 0.6.1.31. Compared to version 1, SAM v2 provides a way to manage several sockets on the same I2P destination in parallel, i.e. the client does not have to wait for data being successfully sent on one socket before sending @@ -23,7 +24,18 @@ data on another socket. All data transits through the same client<-->SAM socket. For multiple sockets, see SAM V3.
+I2P 0.9.14 Changes
++The reported version remains "2.0". +
---------------------------------------------------------------------- Simple Anonymous Messaging (SAM version 2.0) Specification @@ -64,8 +76,9 @@ and *** HELLO REPLY RESULT=$result VERSION=2.0 -*** In order to force protocol version 2.0, the values of $min and $max -*** must be "2.0". +As of I2P 0.9.14, the MIN parameter is optional. +The MAX parameter must be provided and be greater than or equal to "2" and +less than "3" to use version 2. The RESULT value may be one of: @@ -378,6 +391,11 @@ which is answered by PUB=$pubkey PRIV=$privkey +As of I2P 0.9.14, an optional parameter SIGNATURE_TYPE is supported. +The SIGNATURE_TYPE value may be any name (e.g. ECDSA_SHA256_P256, case insensitive) or number (e.g. 1) +that is supported by Key Certificates. +The default is DSA_SHA1. + ---------------------------------------------------------------------- RESULT values ---------------------------------------------------------------------- diff --git a/i2p2www/pages/site/docs/api/samv3.html b/i2p2www/pages/site/docs/api/samv3.html index 700d34ae..3c091ac8 100644 --- a/i2p2www/pages/site/docs/api/samv3.html +++ b/i2p2www/pages/site/docs/api/samv3.html @@ -1,7 +1,7 @@ {% extends "global/layout.html" %} {% block title %}SAM V3{% endblock %} -{% block lastupdated %}August 2010{% endblock %} -{% block accuratefor %}0.8{% endblock %} +{% block lastupdated %}June 2014{% endblock %} +{% block accuratefor %}0.9.14{% endblock %} {% block content %}Specified below is a simple client protocol for interacting with I2P.
@@ -13,8 +13,10 @@ Alternatives: BOB. - -Version 3 Changes +Version 3 Changes
+Version 3.0 Changes
++Version 3.0 was introduced in I2P release 0.7.3. SAM v2 provided a way to manage several sockets on the same I2P destination in parallel, i.e. the client does not have to wait for data being successfully sent on one socket before sending @@ -27,14 +29,24 @@ This is similar to BOB.
+ -Version 3 Language Libraries +
SAM v3 also offers a UDP port for sending datagrams through I2P, and can forward back I2P datagrams to the client's datagram server. -Version 3.1 Changes
++Version 3.1 was introduced in I2P release 0.9.14. +
---------------------------------------------------------------------- Simple Anonymous Messaging (SAM version 3.0) Specification @@ -82,10 +94,11 @@ a HELLO and the bridge sending a HELLO REPLY: and -<- HELLO REPLY RESULT=OK VERSION=3.0 +<- HELLO REPLY RESULT=OK VERSION=3.1 -*** In order to force protocol version 3.0, the values of $min and $max -*** must be "3.0". +As of version 3.1 (I2P 0.9.14), the MIN and MAX parameters are optional. +SAM will always return the highest version possible given the +MIN and MAX constraints, or 3.1 if no constraints are given. If the SAM bridge cannot find a suitable version, it replies with : @@ -122,8 +135,13 @@ received through other forms are answered with an error message) : DESTINATION specifies what destination should be used for sending and receiving messages/streams. It is the base 64 encoding of the concatenation of the destination, private key, and signing private key. -If the destination is specified as TRANSIENT, -the SAM bridge creates a new destination. + +If the destination is specified as TRANSIENT, the SAM bridge creates a new destination. +As of version 3.1 (I2P 0.9.14), if the destination is TRANSIENT, an optional parameter +SIGNATURE_TYPE is supported. The SIGNATURE_TYPE value may be any name +(e.g. ECDSA_SHA256_P256, case insensitive) or number (e.g. 1) +supported by Key Certificates. +The default is DSA_SHA1. {$nickname} is the choice of the client. No whitespace is allowed. @@ -468,6 +486,11 @@ which is answered by PUB=$pubkey PRIV=$privkey +As of I2P 0.9.14, an optional parameter SIGNATURE_TYPE is supported. +The SIGNATURE_TYPE value may be any name (e.g. ECDSA_SHA256_P256, case insensitive) or number (e.g. 1) +that is supported by Key Certificates. +The default is DSA_SHA1. + ---------------------------------------------------------------------- RESULT values ---------------------------------------------------------------------- diff --git a/i2p2www/pages/site/docs/spec/common-structures.html b/i2p2www/pages/site/docs/spec/common-structures.html index 56447b95..d2832df3 100644 --- a/i2p2www/pages/site/docs/spec/common-structures.html +++ b/i2p2www/pages/site/docs/spec/common-structures.html @@ -133,7 +133,7 @@ This structure is used for verifying signatures. Key type and length are inferred from context or are specified in the Key Certificate of a Destination. {% endtrans %} {% trans -%} -The default type is DSA-160. +The default type is DSA_SHA1. {% endtrans %} {% trans -%} As of release 0.9.12, other types may be supported, depending on context. @@ -141,13 +141,13 @@ As of release 0.9.12, other types may be supported, depending on context.
{% trans %}Type{% endtrans %} | {% trans %}Length (bytes){% endtrans %} |
---|---|
DSA-160 | 128 |
ECDSA-SHA256-P256 | 64 |
ECDSA-SHA384-P384 | 96 |
ECDSA-SHA512-P521 | 132 |
RSA-SHA256-2048 | 256 |
RSA-SHA384-3072 | 384 |
RSA-SHA512-4096 | 512 |
DSA_SHA1 | 128 |
ECDSA_SHA256_P256 | 64 |
ECDSA_SHA384_P384 | 96 |
ECDSA_SHA512_P521 | 132 |
RSA_SHA256_2048 | 256 |
RSA_SHA384_3072 | 384 |
RSA_SHA512_4096 | 512 |
{% trans %}Type{% endtrans %} | {% trans %}Length (bytes){% endtrans %} |
---|---|
DSA-160 | 20 |
ECDSA-SHA256-P256 | 32 |
ECDSA-SHA384-P384 | 48 |
ECDSA-SHA512-P521 | 66 |
RSA-SHA256-2048 | 512 |
RSA-SHA384-3072 | 768 |
RSA-SHA512-4096 | 1024 |
DSA_SHA1 | 20 |
ECDSA_SHA256_P256 | 32 |
ECDSA_SHA384_P384 | 48 |
ECDSA_SHA512_P521 | 66 |
RSA_SHA256_2048 | 512 |
RSA_SHA384_3072 | 768 |
RSA_SHA512_4096 | 1024 |
{% trans %}Type{% endtrans %} | {% trans %}Length (bytes){% endtrans %} |
---|---|
DSA-160 | 40 |
ECDSA-SHA256-P256 | 64 |
ECDSA-SHA384-P384 | 96 |
ECDSA-SHA512-P521 | 132 |
RSA-SHA256-2048 | 256 |
RSA-SHA384-3072 | 384 |
RSA-SHA512-4096 | 512 |
DSA_SHA1 | 40 |
ECDSA_SHA256_P256 | 64 |
ECDSA_SHA384_P384 | 96 |
ECDSA_SHA512_P521 | 132 |
RSA_SHA256_2048 | 256 |
RSA_SHA384_3072 | 384 |
RSA_SHA512_4096 | 512 |
Key certificates are preliminary, and are scheduled to be introduced in release 0.9.12. Prior to that release, all PublicKeys were 256-byte ElGamal keys, and -all SigningPublicKeys were 128-byte DSA-160 keys. +all SigningPublicKeys were 128-byte DSA-SHA1 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. @@ -352,13 +352,13 @@ The key certificate payload contains: 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 | 256 |
RSA-SHA384-3072 | 5 | 384 |
RSA-SHA512-4096 | 6 | 512 |
DSA_SHA1 | 0 | 128 |
ECDSA_SHA256_P256 | 1 | 64 |
ECDSA_SHA384_P384 | 2 | 96 |
ECDSA_SHA512_P521 | 3 | 132 |
RSA_SHA256_2048 | 4 | 256 |
RSA_SHA384_3072 | 5 | 384 |
RSA_SHA512_4096 | 6 | 512 |
@@ -370,7 +370,7 @@ The defined Crypto Public Key types are:
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. +are defined as the 256-byte ElGamal PublicKey followed by the 128-byte DSA-SHA1 SigningPublicKey. When a Key Certificate is present, the preceeding 384 bytes are redefined as follows:
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 | 128 |
RSA-SHA384-3072 | 0 | 256 |
RSA-SHA512-4096 | 0 | 384 |
DSA_SHA1 | 0 | 0 |
ECDSA_SHA256_P256 | 64 | 0 |
ECDSA_SHA384_P384 | 32 | 0 |
ECDSA_SHA512_P521 | 0 | 4 |
RSA_SHA256_2048 | 0 | 128 |
RSA_SHA384_3072 | 0 | 256 |
RSA_SHA512_4096 | 0 | 384 |