Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deaddrop Wire Format

Deaddrop uses a versioned binary format for its DHT records. Each record consists of a header followed by the payload.

Constants

  • MAX_PAYLOAD: 1000 bytes (total record size)
  • VERSION: 0x01
  • ROOT_HEADER_SIZE: 39 bytes
  • NON_ROOT_HEADER_SIZE: 33 bytes

Root Chunk (v1)

The root chunk is the entry point of the deaddrop. Its public key is the “pickup key”.

OffsetSizeFieldDescription
01VersionSet to 0x01
12Total ChunksNumber of chunks in the chain (u16 LE)
34CRC-32CChecksum of the full reassembled payload
732Next PKPublic key of the next chunk (32 zeros if single chunk)
39PayloadData bytes (up to 961 bytes)

Continuation Chunk (v1)

All subsequent chunks use a smaller header.

OffsetSizeFieldDescription
01VersionSet to 0x01
132Next PKPublic key of the next chunk (32 zeros if last chunk)
33PayloadData bytes (up to 967 bytes)

Implementation Details

Byte Order

All multi-byte integers (Total Chunks, CRC-32C) are encoded in little-endian byte order.

Integrity Verification

The CRC-32C checksum uses the Castagnoli polynomial. It is computed over the entire reassembled payload, not per-chunk. Receivers must fetch all chunks and reassemble them before verifying the checksum.

Chain Termination

The chain is considered terminated when a chunk (root or continuation) contains a Next PK field consisting of 32 null bytes (0x00).