PLATFORM

Custody in motion

Encryption at rest is a solved problem. Encryption in flight, between systems that were never designed to trust each other, with proof afterwards that nothing was altered — that is the problem KryptAPI exists to solve. This page is the mechanism, in full.

AES-256-GCM content sealing P-256 / X25519 hop key agreement Ed25519 attestation signatures SHA-256 audit chaining
ENVELOPE ANATOMY

Five layers, and exactly one of them is content

A KryptAPI envelope is a single JSON object with five parts. Hover or focus any layer — in the diagram or the list — to separate the stack and see the field it maps to on the wire.

01 · WAX SEAL AAD 02 · ATTESTATION CHAIN 03 · PER-HOP HEADER 04 · CONTENT KEY AGREEMENT 05 · CONTENT (CIPHERTEXT)
  1. "aad" Additional authenticated data — the wax seal. Route ID, hop index, timestamp and retention policy are authenticated but not encrypted, so the relay can route without reading. Alter one byte and decryption fails, loudly.
  2. "att": [ … ] The attestation chain. One Ed25519 signature per hop over the previous entry's digest, the peer identity, and the nonce. This is what makes the trail tamper-evident rather than merely tamper-logged.
  3. "hdr" The per-hop header: protocol version, hop index, key ID (kid), negotiated algorithm, and the 96-bit IV. Every hop rewrites this layer; nothing else in the envelope is touched in transit.
  4. "epk" The ephemeral public key for this hop's ECDH agreement. The content key is derived, never transmitted — there is no wrapped key sitting in the envelope waiting to be stolen.
  5. "ct" The content: AES-256-GCM ciphertext with its 128-bit authentication tag. Opaque to the relay, opaque to us, opaque to anyone holding anything other than the destination's private key.
envelope · on the wire
{
  "v": 1,
  "env": "env_9f42a1c7b3d4c1a7",
  "hdr": {
    "hop": 2,
    "kid": "key_agent_5f1c",
    "alg": "ECDH-ES+A256GCM",
    "iv": "9pQm1xTf0Ad2"
  },
  "epk": { "kty": "EC", "crv": "P-256", "x": "b2c80f55…13ae", "y": "7d19aa0e…c412" },
  "aad": "hop=2;route=rt_2d55;ts=1786553527;retain=7y",
  "ct": "k9RtQ2b…",
  "att": [
    { "peer": "agent-runtime.client", "sig": "1e77…c39a", "ok": true },
    { "peer": "ops-dashboard.client", "sig": "7c02…e441", "ok": true }
  ]
}
// note what is absent: no content key, no recipient private material,
// no plaintext metadata beyond what routing strictly requires.
PER-HOP ENCRYPTION

A key per hop, derived at the moment of the hop

Sealing once at the origin and relaying that same ciphertext everywhere would make one stolen key a catastrophe. KryptAPI instead performs a fresh key agreement per hop, between exactly the two peers on that hop, bound to that hop's route ID and timestamp.

How the hop key is derived

Each peer holds a long-lived identity key-pair used only for attestation signatures — never for content encryption. For the transfer itself, the sender generates an ephemeral key-pair, performs ECDH against the recipient's published public key, and runs the shared secret through HKDF-SHA256 with the hop's AAD as the info parameter.

Because the AAD is bound into the key derivation, the derived key only works for that exact hop, route and time window. Replaying a captured envelope onto a different hop produces a key that decrypts nothing.

What this buys you

  • Blast-radius containment. A compromised hop key opens one hop's payload — not the route, not the day, not the archive.
  • Forward secrecy on the wire. Ephemeral sender keys are discarded after the seal; recovering a long-lived identity key later does not retroactively open captured traffic.
  • Replay refusal. The AAD binds route, hop index and timestamp. A replayed envelope fails authentication before it is ever decrypted.
  • Honest failure. GCM tag mismatch is a hard error with an amber envelope_tag_invalid event, never a silent fallback.
EMAIL WEB FORM PHONE SYSTEM AI AGENT OPS DASHBOARD ARCHIVE hop 1 · email ingress hop 1 · browser-sealed form hop 1 · telephony bridge hop 2 · attested agent hop 3 · escrow archive
handshake transcript

Select an edge to open its hop transcript. Each hop negotiates its own suite and derives its own key.

KEY CUSTODY & ROTATION

You hold the keys. We hold nothing that opens them.

Scroll through a rotation ceremony: a key splits into a 2-of-3 quorum across custody nodes you control, rotates on schedule, and recombines with the event committed to your audit chain.

YOUR INFRASTRUCTURE YOUR HSM OFFLINE ESCROW ROTATION EVENT

1 · The key is never ours

Key material is generated inside your boundary and split into a 2-of-3 quorum: your infrastructure, your HSM, and an offline escrow you control. KryptAPI receives public key material and a fingerprint. That is the entire extent of our custody.

2 · Rotation is an event, not an outage

On the scheduled cadence — or on demand via POST /v1/keys/:id/rotate — each share re-derives. The retiring pair enters a read-only grace period so in-flight envelopes still open; new envelopes bind to the new key from the first millisecond.

3 · The ceremony leaves evidence

The rotation writes one audit entry carrying the quorum record, the retiring and incoming fingerprints, and the attestations of every participating custodian. It is metered as an attestation event, priced like infrastructure, and printed on your statement.

ZERO-KNOWLEDGE RELAY

What we carry, and what we can read

The right column does not resolve on hover, on click, or on a support ticket. It does not resolve because the data does not exist on our side of the boundary.

relay visibility · per envelope
FieldWhat the relay carriesWhat the relay can read
Envelope IDenv_9f42a1c7…c1a7env_9f42a1c7…c1a7
Route ID & hop indexrt_2d55 · hop 2rt_2d55 · hop 2
Ciphertext length41,208 bytes41,208 bytes
Key fingerprints8f2a…d901 → 5f1c…a7408f2a…d901 → 5f1c…a740
Timestampssealed 14:32:07 · opened 14:32:09sealed 14:32:07 · opened 14:32:09
Payload contentciphertext
Content keynever transmitted
Recipient private keynever transmitted
Filename / subject / bodyinside ciphertext
End-user identityinside ciphertext

Retention

Ciphertext is held only until the destination collects it, then dropped on receipt-of-open. Undelivered envelopes expire on the route's TTL — default 72 hours, configurable down to 60 seconds.

Subpoena posture

A lawful demand produces routing metadata, quantities, and fingerprints. It cannot produce content, because we cannot produce content. We publish the shape of what we would hand over.

Operator access

Relay operators can restart nodes and read queue depths. There is no console, flag, or break-glass procedure that renders a payload. The capability was never built.

MUTUAL ATTESTATION

Both ends prove themselves before anything moves

TLS proves you are talking to a server. Attestation proves you are talking to that service, running that policy, holding that key — and proves it in both directions, on every hop, every time.

ORIGIN KRYPTAPI RELAY DESTINATION 1 · POST /v1/attest · challenge c1, route rt_2d55 2 · relay forwards challenge · peer directory lookup 3 · Ed25519(c1 ‖ peer_id ‖ ts) + counter-challenge c2 4 · origin verifies signature · signs c2 5 · POST /v1/envelopes · sealed payload, AAD bound to rt_2d55 6 · receipt-of-open · GCM tag verified, plaintext never leaves 7 · audit entries committed on both ends · prev-hash linked any failure at 3, 4 or 6 → attestation.failed · envelope refused, nothing relayed
SERVICE IDENTITY

Key + policy

A service attests with its Ed25519 identity key and a policy digest covering which routes it may open and which it may originate.

AGENT IDENTITY

Model + prompt policy

An LLM agent additionally attests its agent ID, weights digest, and prompt-policy ID. Change the policy and the attestation changes with it.

FAILURE

Refuse, don't degrade

A failed attestation emits attestation.failed in amber, refuses the envelope, and bills nothing. There is no permissive mode.

DEPLOYMENT TOPOLOGIES

Three shapes, one envelope format

The envelope is identical in all three. Only the question of who runs the relay changes.

Read the reference, or talk to the people who wrote it.

Architecture reviews are done by the engineers who maintain the relay. There is no sales-engineering layer to get past.