From b64dcad0bdd8e21f1e579c276d3d72e562fea93b Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 25 Jul 2010 21:02:14 +0000 Subject: [PATCH] added specification for common datatypes --- www.i2p2/pages/datatypes_spec.html | 154 ++++++++++++++++++++++++ www.i2p2/pages/how_networkdatabase.html | 3 + 2 files changed, 157 insertions(+) create mode 100644 www.i2p2/pages/datatypes_spec.html diff --git a/www.i2p2/pages/datatypes_spec.html b/www.i2p2/pages/datatypes_spec.html new file mode 100644 index 00000000..b628b3c2 --- /dev/null +++ b/www.i2p2/pages/datatypes_spec.html @@ -0,0 +1,154 @@ +{% extends "_layout.html" %} +{% block title %}Data types Specification{% endblock %} +{% block content %} +

Data types Specification

+

+ This document describes some data types common to all I2P-protocols, like I2NP, I2CP, NTCP, etc. +

+ +

Integer

+

Description

+

+ Represents a nonnegative integer. +

+

Contents

+

+ 1 or more bytes in network byte order representing an unsigned integer +

+ +

Date

+

Description

+

+ The number of milliseconds since midnight on January 1, 1970 in the GMT timezone. + If the number is 0, the date is undefined or null. +

+

Contents

+

+ 8 byte Integer +

+ +

String

+

Description

+

+ Represents a UTF-8 encoded string. +

+

Contents

+

+ 1 or more bytes where the first byte is the number of bytes(not characters!) in the string and the remaining 0-255 bytes are the non-null terminated UTF-8 encoded character array +

+ +

+

Description

+

+ A boolean value, supporting null/unknown representation + 0=false, 1=true, 2=unknown/null +

+

Contents

+

+ 1 byte Integer +

+ +

PublicKey

+

Description

+

+ This structure is used in ElGamal encryption, representing only the exponent, not the primes, which are constant and defined in the appropiate spec. +

+

Contents

+

+ 256 byte Integer +

+ +

PrivateKey

+

Description

+

+ This structure is used in ElGama decryption, representing only the exponent, not the primes which are constant and defined in the appropiate spec. +

+

Contents

+

+ 256 byte Integer +

+ +

SessionKey

+

Description

+

+ This structure is used for AES256 encryption and decryption. +

+

Contents

+

+ 32 byte Integer +

+ +

SigningPublicKey

+

Description

+

+ This structure is used for verifying DSA signatures. +

+

Contents

+

+ 256 byte Integer +

+ +

SigningPrivateKey

+

Description

+

+ This structure is used for creating DSA signatures. +

+

Contents

+

+ 20 byte Integer +

+ +

Signature

+

Description

+

+ This structure represents the DSA signature of some data. +

+

Contents

+

+ 40 byte Integer +

+ +

Hash

+

Description

+

+ Represents the SHA256 of some data. +

+

Contents

+

+ 32 bytes +

+ +

Certificate

+

Description

+

+ A certificate is a container for various receipts or proof of works used throughout the I2P network. +

+

Contents

+

+ 1 byte Integer specifying certificate type, followed by a 2 Integer specifying the size of the certificate payload, then that many bytes. +

+
+{% filter escape %}
++----+----+----+----+----+--//
+|type| length  | payload
++----+----+----+----+----+--//
+
+type :: Integer
+        length -> 1 byte
+
+        case 0 -> NULL
+        case 1 -> HASHCASH
+        case 2 -> HIDDEN
+        case 3 -> SIGNED
+        case 4 -> MULTIPLE
+
+length :: Integer
+          length -> 2 bytes
+
+payload :: data
+           length -> $length bytes
+{% endfilter %}
+
+ + +{% endblock %} diff --git a/www.i2p2/pages/how_networkdatabase.html b/www.i2p2/pages/how_networkdatabase.html index 1cf133a8..bfa2c3ad 100644 --- a/www.i2p2/pages/how_networkdatabase.html +++ b/www.i2p2/pages/how_networkdatabase.html @@ -588,4 +588,7 @@ and we are well-positioned to react quickly should the need arise.

+

Really current status

+ + {% endblock %}