Module packet

Source
Expand description

Handshake packets to establish a confirmed connection via handshake using diagram

Structs§

ClientHandshake
The request of the client to create a TCP handshake.
HandshakePayload
The payload of a TCP handshake.
ServerHandshake
The response of the server to a TCP handshake.

Constants§

CLIENT_HANDSHAKE_SIZE
A serialized client handshake must be equal to 32 (PK) + 24 (nonce) + 72 (encrypted payload) bytes
ENC_PAYLOAD_SIZE
A serialized encrypted payload must be equal to 32 (PK) + 24 (nonce) + 16 (MAC) bytes
PAYLOAD_SIZE
A serialized payload must be equal to 32 (PK) + 24 (nonce) bytes
SERVER_HANDSHAKE_SIZE
A serialized server handshake must be equal to 24 (nonce) + 72 (encrypted payload) bytes