Expand description
Sealed envelopes (spec §10.1): end-to-end confidentiality through relays.
seal takes an inner envelope and produces an outer envelope whose body
is Body::Sealed: the inner envelope’s msgpack encoding, encrypted with
ChaCha20-Poly1305 under a key derived via X25519 ECDH(sender_secret,
recipient_public) + HKDF-ish salt. open reverses it.
Functions§
- derive_
session_ key - §10.2: Derive a session-specific symmetric key from a root secret.
Used to derive ephemeral keys for specific message streams (e.g. per
agent-pair, per task-id) without re-running the full ECDH handshake
for every message (reduces CPU overhead and exposure).
root_secretmust be the 32-byte ECDH shared secret.session_idis an opaque string distinguishing the channel (e.g. “agent-a-to-b-task-123”). - open
- Open a sealed envelope.
recipient_secretmust pair with the sender public key embedded in the Sealed body. - seal
- Seal
innerso only the holder ofrecipient_secret’s counterpart public key can open it. The outer envelope keeps routing metadata (from/to/performative=inform) but the payload is opaque in transit.