Package net.i2p.client.datagram
Provides a standard way for reading and writing messages transferred over I2P
so that the recipient has an authenticated mechanism to reply to it. This is
necessary because the base I2P message sent through I2PSession.sendMessage(net.i2p.data.Destination, byte[])
has no "from" address, and simply providing a raw "from" address would be
insecure as it could be spoofed. An application that needs to know for certain
who sent a message to them should use the I2PDatagramDissector
to parse the raw message received from the I2PSession
, and
in turn, use the I2PDatagramMaker
to build a
message that can be parsed.
The datagram format implemented here includes
the sender's Destination
, the payload, and a signature
(signed by the sender's SigningPrivateKey
).
For DSA_SHA1 destinations, the signature is of the SHA-256 Hash of the payload.
For other destination types, the signature is of the payload itself.
-
Class Summary Class Description I2PDatagramDissector Class for dissecting I2P repliable datagrams, checking the authenticity of the sender.I2PDatagramMaker Class for creating I2P repliable datagrams. -
Exception Summary Exception Description I2PInvalidDatagramException Exception thrown when I2P repliable datagram signature verification fails.