{% extends "_layout.html" %} {% block title %}Data types Specification{% endblock %} {% block content %}
This document describes some data types common to all I2P-protocols, like I2NP, I2CP, NTCP, etc.
Represents a nonnegative integer.
1 or more bytes in network byte order representing an unsigned integer
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.
8 byte Integer
Represents a UTF-8 encoded string.
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
A boolean value, supporting null/unknown representation 0=false, 1=true, 2=unknown/null
1 byte Integer
This structure is used in ElGamal encryption, representing only the exponent, not the primes, which are constant and defined in the appropiate spec.
256 byte Integer
This structure is used in ElGama decryption, representing only the exponent, not the primes which are constant and defined in the appropiate spec.
256 byte Integer
This structure is used for AES256 encryption and decryption.
32 byte Integer
This structure is used for verifying DSA signatures.
256 byte Integer
This structure is used for creating DSA signatures.
20 byte Integer
This structure represents the DSA signature of some data.
40 byte Integer
Represents the SHA256 of some data.
32 bytes
A certificate is a container for various receipts or proof of works used throughout the I2P network.
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 %}