HPPR Packet Format

Tags: packet, stored-format

Ā© R.A.Sol

Every stored packet starts with a markline:

šŸ–§: <hash-text>

<hash-text> is the packet type, BLAKE3-256 digest encoded in B64A, and .H3 format suffix. It identifies the canonical payload after the first LF.

HPPR stored packet types:

Shared Rules

Blob

šŸ–§: <hash>
Data-Length: <len>

<data exactly <len> bytes>

Rules:

Plex

šŸ–§: <hash>
Group: <group>
API: <api>
Key: <key>
TAI: <tai>
[Extra headers]*
šŸ–§: <blob_hash>
Data-Length: <len>

<data>

Rules:

TAI Format

TAI format:

<seconds>:<subseconds>

Rules:

TAI seconds use International Atomic Time. Timestamp generation applies the TAI-UTC offset in force for the generation instant.

Header Validation

General:

Group:

API:

Key:

Extra Headers

Extra-header ordering is canonical:

Reserved header names (MUST NOT appear as extra headers):

Limits:

Seal

šŸ–§: <hash>
Seal-By: <verification-key>
Seal-Sig: <signature>
šŸ–§: <plex_hash>
Group: <group>
API: <api>
Key: <key>
TAI: <tai>
[Extra headers (sorted)]*
šŸ–§: <blob_hash>
Data-Length: <len>

<data>

Rules:

Packet-shaped Command Envelopes

Wire protocols may define packet-shaped command envelopes that are not stored packets. The generic Null command packet uses markline šŸ–§: 0.H3 and is defined in 030-COMMAND-MESSAGES.md. Null packets are command envelopes and response envelopes only. They are not Blob, Plex, or Seal packets and are never stored in repository storage.

Limits

Parsing

  1. Read markline and verify the type prefix in the hash text.
  2. Blob:
    • read Data-Length
    • consume exact data bytes
    • verify Blob hash
  3. Plex:
    • read required headers in required order
    • read extra headers with canonical ordering checks
    • parse embedded Blob
    • verify Plex hash
  4. Seal:
    • read Seal-By, Seal-Sig
    • parse embedded Plex
    • verify Seal hash
    • verify signature

Reject on any of the following:

Trailer-hash Format

Trailer-hash format supports streaming when the final hash is only known at the end.

Open marker:

ā‹ÆšŸ–§: <type>[ <coordinate>]

Close marker:

ā‹ÆšŸ–§: <hash>

Rules:

Seal trailer example:

ā‹ÆšŸ–§: S //<group>/<api>//<key>/|/seal/<verification-key>
<escaped data>
ā‹ÆšŸ–§: B.<blob-hash>.H3
Group: <group>
API: <api>
Key: <key>
TAI: <tai>
[Extra headers]*
ā‹ÆšŸ–§: P.<plex-hash>.H3
Seal-By: <verification-key>
Seal-Sig: <signature>
ā‹ÆšŸ–§: S.<seal-hash>.H3

Additional rules:

Both sides buffer full packet bytes to compute and verify hashes.

Thin Format

Thin format stores only part of a packet.

Thin packets omit embedded content bytes and rely on nested hashes for reconstruction.

Digest computation always requires full packet bytes. Implementations MUST resolve thin references before hash verification.

Thin format is for storage and transfer when inner packets are already present.


  1. .H3 names the active format extension: BLAKE3-256 hashing, HSB3 signatures, UTF-8 NFC normalization (Unicode 17.0.0), and this packet structure.ā†©ļøŽ