YAMN v2 / technical protocol reference
Packet specification.
A compact description of the fixed-size payload and the routing information revealed one layer at a time along a YAMN chain.
01 / LINEAGE
YAMN and Mixmaster.
YAMN is a close relative of Mixmaster. Keyrings, statistics and the layered payload concept are similar enough for Echolot to support YAMN with targeted parsing changes. The cryptographic and mixing choices differ.
| Function | Mixmaster | YAMN |
|---|---|---|
| Public-key encryption | RSA | NaCl Box |
| Symmetric encryption | Triple-DES | AES-256-CTR |
| Integrity checking | MD5, partial | BLAKE2 |
| Pooling algorithm | Dynamic mix | Binomial mix |
| Maximum chain length | 20 | 10 |
02 / PAYLOAD
Fixed outer size.
The YAMN payload contains ten fixed hop-header slots followed by the body. During construction, all headers after the current one and the body are wrapped in multiple encryption layers. A hop removes one layer and obtains only its next routing instruction.
| Field | Bytes | Description |
|---|---|---|
| Headers | 2,560 | 10 headers, 256 bytes each |
| Body | 17,920 | User-defined content plus padding |
| Total | 20,480 | Fixed payload size |
03 / HOP HEADER
Each header is 256 bytes.
| Field | Bytes | Description |
|---|---|---|
| Recipient key ID | 16 | Identifies the recipient key used to open the sealed header. |
| Sender public key | 32 | Ephemeral public key corresponding to the client secret key. |
| XSalsa20 nonce | 24 | Nonce used by NaCl Box. |
| NaCl sealed header | 176 | 160 bytes of content plus NaCl overhead. |
| Random padding | 8 | Random bytes. |
| Total | 256 |
The client generates an ephemeral NaCl key pair per hop. The secret key is discarded after header construction; the public key travels inside the hop header.
04 / SEALED HEADER
Routing and anti-tag data.
| Field | Bytes | Description |
|---|---|---|
| Packet version | 1 | Format version. |
| Packet type ID | 1 | Intermediate hop 0, Exit hop 1. |
| Delivery protocol | 1 | SMTP 0, currently the delivery protocol. |
| Packet ID | 16 | Unique value used for replay detection. |
| AES-CTR key | 32 | Decrypts subsequent headers and body layer. |
| Timestamp | 2 | Days since epoch, little-endian, with a random 0 to 3 day subtraction. |
| Packet info | 64 | Intermediate or Exit-specific instructions. |
| Anti-tag digest | 32 | BLAKE2 digest of subsequent headers and body. |
| Padding | 11 | Encrypted zero bytes. |
| Total | 160 |
05 / INTERMEDIATE HOP
Prepare the next layer.
| Field | Bytes | Description |
|---|---|---|
| Partial AES-CTR IV | 12 | Random bytes used to construct per-layer IVs. |
| Next-hop address | 52 | Address of the next YAMN remailer. |
| Total | 64 |
The four-byte counter completes the 16-byte IV. Headers use ordered sequence values and the body uses the final sequence. The historical notation is RRRRNNNNRRRRRRRR, where N marks the counter bytes.
06 / EXIT HOP
Recover the delivery body.
| Field | Bytes | Description |
|---|---|---|
| AES-CTR IV | 16 | Used to decrypt the body. |
| Chunk number | 1 | Sequence number for chunked messages. |
| Total chunks | 1 | Number of chunks in the message. |
| Message ID | 16 | Common identifier for all chunks. |
| Body length | 4 | Unpadded body length, little-endian. |
| Delivery method | 1 | SMTP 0, dummy 255. |
| Padding | 25 | Encrypted zero bytes. |
| Total | 64 |
A valid chain has one final YAMN Exit. The Exit performs concrete final delivery by SMTP, which may target an email recipient or a Mail-to-News gateway.