Skip to content

Sealed transport

Only GET /health and GET /attestation are plaintext. Everything else is sealed: CalimeroClient opens a SealedTransport per node, keyed by the transport key the node’s quote binds, and every request and response (event streams included) travels inside it. The wire format is core’s calimero-sealed, byte for byte (the tests run core’s published vectors):

handshake Noise_NK_25519_AESGCM_SHA256, prologue "calimero/sealed-http/v2"
request POST /sealed/handshake 0x02 ‖ transport_pk ‖ Noise message 1
response 0x02 ‖ Noise message 2 (payload = session_id(16) ‖ lifetime secs, u32 BE)
exchange POST /sealed
header 0x02 ‖ session_id(16) ‖ request_id (u64 BE; from 1)
request header ‖ AES-256-GCM(req key, nonce = request_id ‖ 0u32, aad = header, inner)
response frames: u32 BE length ‖ AES-256-GCM(resp key, nonce = request_id ‖ index, aad = header, kind ‖ data)

Both paths are served by nodes from core 1.0.0-rc.25 on. An older node answers the handshake with a refusal (404, say), which is reported as a SealedTransportError; no other path is tried.

A session is renewed a minute before it lapses, reopened when the node forgot it (unknown_session), and the node is attested again when it restarted (stale_transport_key). SealedTransport.urlSession() seals any URLSession request to the node; a request outside its base URL is refused, never sent in the clear.