Sealed transport and attestation
A node speaks plain HTTP, and any TLS in front of it ends outside the enclave, at whatever proxy the operator runs. So the client never trusts the connection: it trusts the quote.
1. Attest
Section titled “1. Attest”fetchAttestedKey(baseUrl, policy) asks GET /attestation?nonce=… (the one call besides
/health served in the clear). The quote’s report data must be
nonce(32) ‖ SHA-256("calimero.tee-attest.transport-key.v1" ‖ app_hash ‖ transport_key), so it
binds this request and the X25519 transport key the channel will be opened to.
It asks for the interval form (form=interval):
a node answers from a quote it makes once a minute over a key of its own and signs this
request’s nonce with that key, so attesting never waits for a quote. Then the signature must be
that key’s over the nonce, the app hash and the transport key, the quote at most 5 minutes old
by this device’s clock, and its report data must bind that key, the transport key and the time.
A node that answers without interval (an older release) is checked as above.
Either way, as core’s Rust client (attest::verify, Measurements::Release):
- mock quotes (
MOCK_TDX_QUOTE_V1…,merod local) pass only withCloudPolicy(allowMock = true); - a real quote: the node names its mero-tee release; it must be at least
minReleaseVersion; the release’spublished-mrtds.jsonis fetched (ReleaseSource.Mirrorby default,Github, orCustom) and its Sigstore signature checked against the mero-tee release workflow; the quote’s DCAP signature chain and TCB status are checked against Intel’s collateral (from the cloud’s mirror,DEFAULT_COLLATERAL_MIRROR, by default;collateralSource = "intel"asks Intel’s PCS, a URL a PCCS of yours,fetchCollateralreplaces the fetch; the mirror cannot forge anything, every item is Intel-signed, andmaxCollateralAgeDaysbounds how old a replayed copy may be); the TCB status must have been computed against Intel TCB evaluation data of at leastDEFAULT_MIN_TCB_EVALUATION_DATA_NUMBER(20, core’s floor;minTcbEvaluationDataNumberraises it, never lowers it); the TD must not be a debug TD; and all five registers must be the release’s image for the trusted profile (locked-read-onlyunlessallowDebugProfile; withprofiles, the one the node names when it is listed, as core’sallowed_profiles).CloudPolicy.staging(CloudEnvironment.STAGING) lists staging’s three profiles: testing builds only.
val policy = CloudPolicy(release = CloudReleasePolicy(minReleaseVersion = "2.3.109"))// or your own verifier, e.g. pinned measurements:val pinned = CloudPolicy(verifyQuote = createQuoteVerifier(QuoteVerifierOptions(allowedMeasurements = listOf(…))))2. Seal
Section titled “2. Seal”SealedTransport (an OkHttp interceptor) opens a Noise session to the attested key and seals
every request. The wire format is core’s calimero-sealed crate and mero-js src/sealed/, byte
for byte:
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, each used once) 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) inner u32 BE head length ‖ head (JSON) ‖ bodyBoth 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 SealedTransportException; no other path is tried.
Responses stream frame by frame, so server-sent events are sealed too. A restarted node
(stale_transport_key) is attested again; a dropped session (unknown_session) is reopened and
the request resent. CalimeroClient keeps one sealed channel per node.