AI Initiative logoAI Initiative
Reading room / Manthan

HERALD Envelope Cheatsheet

HERALD Envelope Cheatsheet. Covers Envelope At A Glance; Field Reference; Genesis vs Reply; Hashing And Signing.

Project explanation / technical method
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

Not explicitly stated in source · Date not established

Provenance, authorship and editorial notes

HERALD Envelope Cheatsheet

Id

manthan-herald-protocol-docs-envelope-cheatsheet

Project

Manthan

Source path

manthan/herald-protocol/docs/envelope-cheatsheet.md

Source sha256

ca88c5160b514c642807f0948b34c67b58efa3be4d29aff815c2d333407e8c11

Local copy sha256

ca88c5160b514c642807f0948b34c67b58efa3be4d29aff815c2d333407e8c11

Repo head

3a94084024a3434cef331fecac91c2c3b43f0313

Date
Not recorded
Date basis

Original publication date not established; Git revision date retained separately.

Author

Not explicitly stated in source

Author basis

Unknown; Git committer not substituted for document author.

Last source commit

8b75d1b0157c20a0a463f0e31008ef9f73099beb

Last source commit date

2026-06-08T07:40:14Z

Document status

Project explanation / technical method

Summary

HERALD Envelope Cheatsheet. Covers Envelope At A Glance; Field Reference; Genesis vs Reply; Hashing And Signing.

Topics
  • Exploration architecture and selection
  • Envelope At A Glance
  • Field Reference
  • Genesis vs Reply
Theme

Exploration architecture and selection

Priority

deep

Related ids
  • manthan-readme
  • manthan-docs-architecture
  • manthan-docs-business-overview
  • manthan-docs-demo-walkthrough
  • manthan-docs-principles
  • manthan-docs-qd-measurement-direction-plan
  • manthan-docs-swarm-evolution-integration
Evidence concerns
  • Recovered source text is preserved verbatim. Assertions, comparisons, commands and results belong to its original context; they were not re-executed or externally re-verified during this corpus review.
Word count

735

Bytes

5004

Source relative

herald-protocol/docs/envelope-cheatsheet.md

Remote mirror

manthan/herald-protocol/docs/envelope-cheatsheet.md

Full text preserved

True

HERALD Envelope Cheatsheet

One-page implementer reference for the v0.2 envelope. Normative source: learning/herald-protocol/SPEC.md.

Envelope At A Glance

sigil pubkey
    |
    v
+-----------------------------+
| HERALD envelope             |
|                             |
| v                           |
| id = sha256(canonical_body) |
| from / to                   |
| parent / trace              |
| ts / nonce / expires        |
| lineage_proof               |
| attestations[]              |
| payload                     |
| signatures[]                |
+-----------------------------+
    |              |
    |              +--> signature[0] MUST be from `from`, scope `origin`
    |
    +--> parent links backward; trace pins the genesis envelope

Field Reference

FieldRequiredShapeVerifier duty
vAll envelopesprotocol version string, e.g. herald/0.2Treat as part of the canonical body.
idAll envelopesSHA-256 digest of canonical bodyRecompute with id omitted and signatures empty; mismatch is tampered.
fromAll envelopessender sigilResolve sigil to full Ed25519 public key before accepting signatures.
toOptionalrecipient sigilApp/transport field; signed when present.
parentGenesis and non-genesisnull for genesis; envelope id otherwiseReject unknown parent as orphaned; check trace-parent binding when parent is known.
traceGenesis and non-genesisgenesis envelope idGenesis uses trace == id; non-genesis must equal parent.trace.
tsAll envelopesUnix secondsApply local clock-skew policy.
nonceAll envelopes128-bit CSPRNG randomCache (from, nonce) and reject duplicates.
expiresOptionalUnix secondsReject when older than now - skew_tolerance.
lineage_proofOptionalreference to Herald-signed lineage certificateMissing endorsement is informational: lineage-unverified.
attestationsOptionalarray of { type, value } claimsPreserve as signed data; semantics come from SPEC, EXT, CHARTER, or registries.
payloadAll envelopesopaque application objectConduits must not modify it.
signaturesAll envelopesordered array of signature objectsIndex 0 must be from with scope: "origin"; validate in order.

Genesis vs Reply

Envelope kindparenttraceExtra rule
Genesisnullsame value as idFirst envelope from a sigil must include a birth attestation.
Non-genesisparent envelope idgenesis envelope idE.trace must equal parent.trace.

Hashing And Signing

1. Build the envelope body in CBOR-deterministic form.
2. For id, canonicalize with id omitted and signatures replaced by an empty array.
3. Set id = sha256(canonical_body).
4. For the origin signature, sign herald.envelope.v2 || canonical_body.
5. For additional signatures, each signer signs the canonical body with all prior signatures retained in declaration order.
6. Never sign or hash a JSON rendering; JSON is display-only.

Signature Object

{
  "by": "sigil:abc...",
  "alg": "ed25519",
  "scope": "origin",
  "sig": "base64-or-profiled-bytes"
}

Registered v0.2 origin algorithm: ed25519. Common scopes named in the core spec are origin, tool-sandbox, conduit-receipt, human-approval, and herald-lineage.

Common Verifier Results

ResultTypical trigger
validOrigin signature verifies, chain is intact, required scopes are present, nonce is fresh.
partialOrigin signature verifies but an optional or policy-required signature is invalid or absent.
signature-invalidOrigin signature fails.
tamperedRecomputed id does not match the envelope.
orphanedParent envelope is not known yet.
parent-trace-mismatchNon-genesis trace differs from parent.trace.
replayed-nonce(from, nonce) has already been seen.
expired-envelopeexpires is outside tolerance.
unknown-sigilfrom cannot be resolved to a public key.
unknown-algSignature algorithm is not registered.
lineage-unverifiedLineage claim lacks Herald endorsement; not a failure by itself.

Verifiers should surface all applicable results, not only the first one.

Minimal Review Checklist

Continue exploring