Skip to main content
Status: Draft
Type: Standards Track
Category: Core
Updated: 2026-07-20
Requires: CIP-2 (off-chain compute), CIP-3 (fee model), CIP-10 (containers)
Related: CIP-1 (deferred callbacks), CIP-9 (off-chain storage / CBFS), CIP-13 (delegation), CIP-24 (CBSS)
Cowboy Cloud and Cowboy Chain. This CIP specifies the Cowboy protocol. Cowboy Cloud runs on this protocol today. Cowboy Chain, a public network on the same protocol, is under consideration for a future release. Where the two differ, this CIP says so.

1. Abstract

Background

This CIP covers off-chain AI and privacy-sensitive workloads.

Goal

Specify hardware-backed TEE execution for those workloads. A Composite Attestation Envelope (CAE) binds an Intel TDX (or AMD SEV-SNP / AWS Nitro) CPU quote, an NVIDIA NCC GPU report, and a service signature into one receipt. The TEE Verifier system actor at 0x05 verifies the receipt on chain. The specification defines these verification requirements:
  • Under §3.4, TeeAttested is for confidential outputs: a single runner, where the attestation is the verification (no cross-runner reproduction). Deterministic is for non-confidential, reproducible outputs: a committee re-executes and byte-matches the result. A confidential output is not reproducible byte-for-byte across runners.
  • On-chain verification uses a SNARK-compressed DCAP proof (§3.8). The chain runs verify(proof, public_inputs); the circuit performs quote parsing, the vendor X.509 chain, ECDSA, and TCB-level evaluation. This makes verification deterministic (time-dependent collateral becomes a circuit input anchored to a governance snapshot) and cheap (≈ 1 order of magnitude gas reduction vs a hand-rolled on-chain chain walk).
  • Under §3.6, after TEE.Fail (2025-10) demonstrated physical extraction of attestation keys (and forged TDX attestations on a live chain), a single hardware root is insufficient. This CIP requires chip_root ∧ operator_root, where the operator root is a Proof-of-Cloud / deployment endorsement.
This CIP does not require every runner to run in a TEE; non-TEE runners continue to serve None, EconomicBond, MajorityVote, StructuredMatch, and SemanticSimilarity jobs unchanged.

2. Motivation

CIP-2 defines a tee_required flag, a Deterministic verification mode, and the TEE Verifier at 0x05. These require cryptographic evidence of the executing environment; self-declared capabilities cannot provide it. PythonVM × TEE secure-kernel patterns, the whitepaper §5.5 “TEE option”, and CIP-10 §12.3 BillingAttestation depend on this attestation pipeline. The 2026-Q2 platform choices reflect available implementations. Intel IAS/EPID reached EOL (2025-04-02), shifting the ecosystem to DCAP / Intel Trust Authority and to VM-level confidential computing (TDX, SEV-SNP); NVIDIA Confidential Compute (NCC) on H100/H200/Blackwell is the de facto GPU TEE for AI; Confidential Containers (CoCo) + Trustee are the deployable platform layer. Two security and implementation considerations inform the design (§3.4, §3.6, §3.8):
  1. TEE.Fail (2025-10) used a < $1,000 DDR5 physical interposer to extract signing/attestation keys from Intel TDX/SGX and AMD SEV-SNP (deterministic AES-XTS, no replay protection) and forge TDX attestations on Ethereum BuilderNet. A forged quote can chain to a vendor root. The single-hardware-root assumption is therefore unsafe. This motivates multi-root trust (§3.6).
  2. Production SNARK-compressed DCAP verifiers (e.g. Automata) verify SGX/TDX attestations on EVM at ~1/10th the gas, and resolve the determinism problem by moving time-dependent checks into the circuit. This motivates SNARK verification (§3.8).

3. Specification

3.1 Terminology

  • CVM means Confidential Virtual Machine (TDX Trust Domain, SEV-SNP VM, Nitro Enclave).
  • NCC means NVIDIA Confidential Compute; per-GPU attestation signed by an NVIDIA-rooted key plus an EAT token from the NVIDIA Remote Attestation Service (NRAS).
  • Quote means a signed, hardware-generated attestation bound to a measurement and caller-supplied user_data.
  • Measurement means a hash of the TEE’s initial state (TDX MRTD, SNP LAUNCH_DIGEST, Nitro PCR0; further Nitro PCRs ride in pcr_extensions).
  • CAE means Composite Attestation Envelope (§3.5).
  • CollateralSnapshot means a governance-published bundle of vendor collateral (root certs, TCBInfo, QEIdentity, CRLs, NRAS root) selected by block height; the only source of truth for time-dependent validity on-chain (§3.8.4).
  • Measurement Binding means on-chain Registry record tying a runner to CPU/GPU measurements, a service pubkey, and an operator-root reference, established at registration (§3.9).
  • Chip root / Operator root means the two trust roots of §3.6.
  • Freshness Anchor means (nonce, deadline, generated_at) in a CAE (§3.5).

3.2 System Actor Map (authoritative)

This table is the canonical allocation (TEE_VERIFIER = 0x05, SECRETS_MANAGER/CBSS = 0x04).

3.3 Hardware Stack

{"tdx","sev","nitro"} are eligible for TeeAttested/Deterministic; "sgx" supports EconomicBond only. Struct enum variants and the Runner Registry’s canonical TEE-type set MUST use these same lowercase strings. The base CVM image is cowboy/runner-tee-base:v1 (extends CIP-10 §5.5). A reproducible build makes its measurement publicly verifiable.

3.4 Verification modes — TeeAttested vs Deterministic

A confidential output (encrypted per-recipient) is never byte-identical across runners, so it cannot be committee-matched. This CIP defines two distinct modes: Rules:
  • A tee_required job defaults to TeeAttested. Selecting Deterministic requires the submitter to declare the output non-confidential.
  • For both modes every TEE result MUST carry a CompositeAttestation that passes §3.8.
  • For tee_type eligibility, tdx / sev / nitro support both modes; sgx supports neither and uses EconomicBond only.
In the wire encoding (VerificationConfig), TeeAttested and Deterministic name verification choices, and the wire forms below map each choice onto VerificationMode and tee_required. There is no TeeAttested tag in the on-chain VerificationMode enum; its wire tags are None=0, EconomicBond=1, MajorityVote=2, StructuredMatch=3, Deterministic=4, SemanticSimilarity=5 (single u8). TEE attestation is carried by the sibling tee_required: bool field of VerificationConfig (plus required_tee_type: Option<String>, ≤128 B). The wire forms are: TeeAttested = tee_required = true with a confidential single-runner VerificationMode (None / EconomicBond); Deterministic = VerificationMode::Deterministic (tag 4) with tee_required == true (the node enforces that Deterministic requires tee_required).

3.5 Composite Attestation Envelope (CAE)

Encoded as D-CBOR (same determinism guarantees as CIP-3).
The attest_digest digest MUST be computed over the CAE with the signature field cleared, so it does not contain the signature that signs it:
All CAE consumers (storage §3.7, secrets §3.12, billing) use this definition. The nonce MUST incorporate an on-chain unpredictable beacon, not be derivable solely from public data:
beacon is the CIP-11 §9.2 consensus threshold seed (a BLS12-381 threshold signature over the round, grinding-resistant, unpredictable until the round is certified) for round r_submit + SELECTION_SEED_DELAY_VIEWS (currently 3). It MUST be read from the committed, execution-readable ConsumedSeedsV1 (the same source the CIP-2 dispatcher uses for committee selection), not from the node’s local, prunable SeedStore. Only the committed path is deterministic under replay. The chosen round is in the future at submission time, so neither a key-extraction adversary nor a colluding proposer can precompute or grind the nonce; the runner generates the quote once that seed is certified (~SELECTION_SEED_DELAY_VIEWS views later), within the remaining MAX_QUOTE_AGE window. A nonce derived solely from publicly-known/predictable values (e.g. block hash alone) is non-conformant.
This nonce-derivation recipe is a producer-side MUST. The chain cannot verify the derivation. The verifier treats nonce as opaque, checking only its inclusion in REPORTDATA (§3.8.5) and non-replay. Honest runners must bind the beacon. The chain does not check that invariant; an adversary who can already extract attestation keys is out of scope for this control (that is the operator-root’s job, §3.6).
The CPU quote’s REPORTDATA (SNP REPORT_DATA, Nitro user_data) MUST equal:
The mandatory service-key scheme defines service_sig as the CIP-40 SignatureSlot under CAE_SERVICE_SIGNATURE_POLICY: Ed25519, Native mode, inline tagged key required. The inline key MUST equal the trusted service key. In this CIP’s binding and delivery preimages, service_pubkey denotes that key’s raw 32-byte Ed25519 payload. Other algorithms, modes and absent inline keys are rejected; the tag is not added to REPORTDATA. The CAE producer uses None while computing attest_digest, then installs the required slot.

3.5.1 Per-path preimages

A CAE is produced on four paths; each pins its own nonce / REPORTDATA / result_hash. All follow the rules above (attest_digest excludes service_sig; nonce mixes the beacon b, the CIP-11 §9.2 committed threshold seed defined above; REPORTDATA = keccak256(nonce ‖ service_pubkey ‖ gpu_measurement_if_any)). Every service_sig signs the CIP-40 native frame:
The identity comes from the trusted engine or producer configuration. The preimage is 201 bytes on all four paths. For the req_hash recipe, req_hash is computed once, by the Job Dispatcher (0x02) at job submission, over the job’s JobType ONLY (not the whole JobSpec):
where JobType::encode() is the canonical commonware-codec JobType bytes (the first byte is the CIP-11 §9.4 job_kind tag) and JOB_SPEC_VERSION is the JobSpec wire-format version byte, the single constant shared with the job_spec_hash recipe (CIP-11 §12.6). It is stored verbatim in JobSpec.req_hash; every job-bearing path below consumes the stored value and MUST NOT recompute it (the no-request paths pin the keccak(b"") constant instead, as the table and prose below state). The JobType byte encoding, including its nested types, is defined in CIP-11 §12.6. For FULL registration/renewal, scope_id MUST be the submitting transaction’s 20-byte runner address left-padded with 12 zero bytes; both hashes MUST equal keccak(b""). A valid service signature for a different runner or a job-result scope cannot authorize registration. Paths with no request (registration, secret release, billing) pin req_hash = keccak(b"") so the 128-byte service body and its native frame stay byte-exact on every path. For the billing path the GPU term in REPORTDATA is replaced by the billing body digest: REPORTDATA = keccak256(nonce ‖ service_pubkey ‖ keccak(billing_fields_rlp)). The billing CAE is generated fresh per event (the cert chain MAY be cached; the quote MUST be fresh within MAX_QUOTE_AGE). These definitions MUST be byte-exact across all producers and verifiers.

3.5.1a result_payload canonicalization

The Job path’s result_hash := keccak256(result_payload) requires a canonical preimage. Every producer and verifier MUST use:
  • canonical_result_cbor applies the CIP-11 §12.6 CBOR-float64 profile to JSON: recursively sorted text keys for maps; ordered arrays; shortest CBOR integers, including negative integers, for integral in-range numbers; otherwise IEEE-754 binary64. Numeric boundaries are defined by the single-source codec and its fixtures. NaN, infinities, and values exceeding the codec’s nesting-depth or encoded-size limits are INVALID.
  • CANONICAL_RESULT_VERSION is the u8 wire-format prefix owned by cowboy-protocol-codec. Node and runner MUST use the same codec revision and frozen fixtures that map result.data to result_payload bytes, including numeric and depth/size boundary cases. Caps are codec constants, and governance cannot configure them independently. Changes to bytes or the accepted domain require a format-version change and updated cross-stack fixtures.
  • For a single-runner job, if a tee_required result has no canonical preimage, the result is rejected and the job fails verification. There is no cross-runner slash set. EconomicBond applies its failed-result bond disposition; None has no economic consequence.
CAE signing admits finite non-integral binary64 through the deterministic CBOR-float64 profile. This authenticates one runner’s result bytes; it does not make floating-point computation reproducible across runners. The whitepaper permits this profile specifically for CAE signing, while quorum comparison excludes non-integral numbers. Node and runner use the canonical preimage unconditionally from genesis.

3.5.2 Deterministic cross-runner byte-match

CIP-2 §9 is the primary home of the VerificationMode::Deterministic full-result equality rule. Comparison MUST use bare canonical_result_cbor(result.data) bytes, without the CAE version prefix, and MUST reject non-integral binary64 from the comparison domain. Canonical serialization does not make floating-point computation reproducible; deterministic outputs MUST use scaled integers or fixed-point values (Nano). An INVALID result has no comparison key and cannot join a cohort or serve as its reference. Select the first valid result in the verifier’s deterministic result order as the reference, and count results with exactly the same canonical bytes. Disposition is threshold-gated:
  • If the reference cohort reaches the job’s stored threshold, valid results outside it receive the CIP-2 §6.1 quorum-dissent disposition (score-zero reputation, no payment, stake slash). INVALID results instead receive the operational-failure disposition (score-zero reputation, no payment, unchanged stake).
  • If the reference cohort is below threshold, the accepted reveal remains pending with no dissent slash.
  • If every result is INVALID, accepted reveals remain pending with no dissent slash; settlement or timeout applies the operational-failure consequence.
For example, if two runners return {"rate":3.333} (INVALID) and one returns {"rate":3} (valid), a threshold of two is not met and no runner is slashed. A single surviving INVALID result likewise supplies no valid vote and causes no dissent slash. Neither result_schema nor the free-form data_format selects slash eligibility; the codec and the stored threshold define the decision. MajorityVote and StructuredMatch use canonical CBOR with the same no-floats comparison domain, from genesis. MajorityVote selects its configured vote field, or the full result when no field is configured. StructuredMatch selects configured match_fields, or the full result when that list is empty; schema violations receive reputation penalties without slashing, while grouping dissent is unslashed. Their grouping and disposition rules are defined in CIP-2 §9/§9.1 and remain distinct from Deterministic’s first-valid-reference rule.

3.6 Trust roots — multi-root (chip_root ∧ operator_root)

TEE.Fail shows a chip-vendor root alone can be defeated by an adversary with physical access + root. This CIP requires two independent roots:
  • chip_root, the vendor attestation, verified via the SNARK pipeline (§3.8).
  • operator_root, a Proof-of-Cloud / deployment endorsement (cf. Flashbots Proof-of-Cloud, Intel POE) proving the CVM runs in an attested operational environment, not a bench rig under interposition. One conformant implementation is the shipped governance-trusted-key model (§3.8.2).
Acceptance of a TeeAttested or Deterministic + tee_required result requires both roots to pass. MeasurementBinding (§3.9) carries operator_root_ref. At regenesis, dispatch requires an Active, unexpired, type-matching binding. Result acceptance and CBSS release also require an Active binding with the respective freshness checks; result submission requires a CAE. Nitro registration verifies the COSE document and X.509 chain on-chain against governance-seeded AWS roots and measurement endorsements. Non-Nitro registration without a verified chip-root proof fails closed with ChipRootProofRequired (E1619); no self-asserted binding is created. TDX/SEV verification requires the tee-snark implementation and matching consensus configuration on every validator. The default build supports Nitro registration only; SGX has no supported binding type. Genesis seeds no bindings or collateral. The chip root does not defend against physical access + root (TEE.Fail class); vendors classify this out of scope. The operator root is the mitigation. Remote/software adversaries without physical access are covered by the chip root alone.

3.7 On-chain Storage Strategy

Result replay markers use tee_result_nonce: ‖ task_id ‖ runner ‖ nonce, distinct from permissionless VerifyCae’s tee_seen_nonce: and billing’s tee_billing_nonce:. Identical results from different committee runners therefore do not consume each other’s nonces. Each result audit digest is stored under cae:task: ‖ task_id ‖ runner, with its own height-keyed GC index and retention window. Both digest writes propagate store faults and roll back with the transaction. The execution build publishes TEE_CHIP_ROOT_SNARK (0 or 1) in the runtime fingerprint; with the feature disabled, non-Nitro FULL verification returns E1619. This does not change the default build feature policy.

3.8 TEE Verifier Actor (0x05)

3.8.1 State

Per-runner measurement whitelists live in the Runner Registry measurement_binding (§3.9), not here. The logical TEE Verifier allocation is 0x05; the implementation stores its TEE key families under physical actor 0x04 (see Secrets Whitepaper §2). Two collection rows use version-1 binary state codecs: Both codecs reject unsupported versions, malformed lengths, excess entries, duplicates and trailing bytes. The key-length rule describes storage encoding; registration still applies its TEE-type-specific public-key validation and normalization. Collateral point values remain raw snapshot bytes. These state codecs apply from the auth-v3 genesis, with no activation gate. The trusted-key maximum is 3 + 640 × 51 = 32,643 bytes.

3.8.2 Trusted-key endorsement

The trusted-key path provides the governance endorsement used by the operator root:
  • Instructions (opcodes 60–61): RegisterTeeTrustedKey / RevokeTeeTrustedKey. Governance registers a trusted quote-signing key per (tee_type, measurement_hash). Opcodes 62 and 63 are unassigned.
  • This model does not verify a hardware cert chain; its trust root is “governance vouches for this mapping from measurement to key”.
Trusted-key registration admits at most MAX_TEE_TRUSTED_KEYS_PER_MEASUREMENT = 640 distinct normalized keys for each (tee_type, measurement_hash). Registering an existing key remains valid at capacity; a new 641st key is rejected with InvalidData before writing. Revocation removes the key and frees a slot while retaining the index row, including when empty. The trusted-key endorsement supplies the operator_root (§3.6); it does not substitute for the chip_root. The node verifies Nitro registrations against AWS evidence in the default build. TDX and SEV registration require a verified chip-root proof from the tee-snark build; self-asserted registration is rejected. Operator-root enforcement still follows the acceptance policies in §3.6.

3.8.3 Instructions

Opcodes 124–127 are allocated.
Collateral (TCBInfo / QEIdentity / CRL) is published as one snapshot via UpdateCollateral. This is what lets governance blacklist a vulnerable microcode/TCB level (§6), by publishing a snapshot whose TCBInfo marks that level unacceptable.

3.8.4 Determinism via governance-anchored collateral

All time-dependent validity (cert notAfter, CRL nextUpdate, TCBInfo dates) is evaluated against the CollateralSnapshot selected by block_height, never wall-clock. The snapshot is published by governance with a ≥ 7-day delay (ROOT_UPDATE_DELAY). Every validator replaying a transaction selects the same snapshot for the same block, so verification is deterministic. The sorted tee_collateral_index admits at most MAX_TEE_COLLATERAL_SNAPSHOTS = 8_191 distinct effective heights. UpdateCollateral checks capacity before publishing the point record: a new 8,192nd height is rejected with InvalidData, leaving no unindexed snapshot. Replacing a snapshot at an already indexed height remains allowed at capacity, subject to the existing authority and delay checks. Snapshot rows and their index entries remain retained; this amendment adds no eviction or garbage collection.

3.8.5 Verification pipeline (verify_cae)

This is the full verification used at registration / renewal (§3.8.8); steps 3–4 (the SNARK) are skipped on the per-call light path, which instead verifies the quote signature against the binding’s bound_quote_key. The chain verifies a SNARK proof whose circuit performs steps 3–4 internally; the remaining steps are cheap on-chain checks. Conceptually: verify_cae runs in one of two modes (§3.8.8). Full (registration / renewal, low frequency) runs the chip-root SNARK (steps 3–4) and captures the binding. Light (per-call, the hot path on every job result) skips steps 3–4 and instead verifies the per-job quote signature against the binding’s bound_quote_key, the key the SNARK already verified at registration. The mode is selected by the presence of proof: Full carries one; Light does not.
FULL registration/renewal replay markers use tee_registration_nonce: ‖ scope_id ‖ nonce, distinct from permissionless LIGHT VerifyCae markers under tee_seen_nonce:. A LIGHT submission, including a copied renewal CAE or one signed by another registered service key, MUST NOT consume the runner’s FULL registration nonce. Results and billing retain their separate replay namespaces. All these markers use the bounded tng: garbage-collection index, whose values retain the exact marker keys: a marker recorded at height h remains through h + MAX_QUOTE_AGE inclusive and may be deleted only afterward. The permissionless caller’s upto_block can shorten, but cannot extend, the chain-derived deletion cutoff. An implementer MUST NOT run step 3 (SNARK) on the per-call Light path: per-call SNARK verification is infeasible within the freshness window (§3.8.8) and is the explicit motivation for the split.

3.8.6 Error codes

3.8.7 Gas

These are base/parse brackets, not all-in cryptographic prices. They are charged above the generic 5,000-Cycle / 500-Cell instruction base after CAE decoding and before freshness/replay checks. Malformed CAE bytes fail before the bracket. Thus TDX/SEV FULL’s bracket subtotal is 125,000 Cycles / 564 Cells; LIGHT and Nitro FULL’s is 17,000 / 532. The standalone bracket is not added to embedded JobResultSubmit or billing LIGHT checks. Nitro FULL additionally debits 105,500 Cycles immediately before each P-384 validation/verification attempt: 3,200 key validation plus 102,300 object verification. This includes the COSE signature, every certificate link and the root self-signature. For C CA certificates, a successful walk performs C+2 such pairs, separately from the 5,600-Cycle Ed25519 service-key/signature charge. The current tariff is implemented but its corrected P-384 calibration remains pending (CIP-3 §2.5). VerifyCae uses the 32,800,000-Cycle System lane. For one external secp256k1 slot (5,000-Cycle transaction intrinsic plus 10,000 signature), ignoring calldata, other instruction work and Cells/Access constraints, Nitro LIGHT needs at least 17,000+5,000+10,000+5,600 = 37,600 Cycles, giving an upper bound of 872 calls per lane. A Nitro FULL hardware-fixture shape with four CA certificates needs at least 37,600 + 6×105,500 = 670,600 Cycles (48 per lane); the six-CA maximum shape needs at least 37,600 + 8×105,500 = 881,600 (37 per lane). These are upper bounds from selected necessary charges, not throughput guarantees. The previous common 1,929 LIGHT/Nitro estimate only divided by the bracket and understated FULL verification. Cycle exhaustion during leaf or chain verification preserves its meter error and yields the existing 1005 OutOfCycles, not an attestation-invalid result. The charge runs before the cryptographic attempt that would exceed the budget.

3.8.8 Where the SNARK runs — registration vs per-call (proving-latency split)

zkVM proving of a DCAP quote is 30 s – minutes (RISC Zero / SP1 / Bonsai), far above MAX_QUOTE_AGE. Verifying a fresh chip-root SNARK on every job is therefore infeasible. CIP-23 splits the chip root across two cadences:
  • At registration / renewal, which occurs at low frequency, ~7 days (§3.9), the full chip-root SNARK (§3.8.5 steps 3–4: vendor cert chain + TCB level) is generated and verified once per binding. On success the binding captures the ECDSA attestation key (AK) that signs the quote body (bound_quote_key) and the accepted measurements / TCB epoch.
For bound_quote_key, ECDSA-DCAP uses the attestation key (AK) to sign the quote body. The Quoting Enclave certifies the AK; the PCK signs the enclave report and does not sign quote bodies. Therefore bound_quote_key MUST be the AK, specifically the ecdsa_attestation_key carried in the quote’s signature section. The per-call Light check (§3.8.5 step 4′) is a single ECDSA of quote.header ‖ quote.report_body against that AK. At registration the SNARK verifies the full chain from AK through QE and PCK to Intel root and the QE-report binding of the AK. The per-call path trusts the captured AK directly and does no per-call re-verification of the AK against the QE. Soundness assumes that the AK stays stable for the whole renewal period. If the QE rotates the AK mid-period, quotes signed by the new AK fail step 4′ (verify against the stale bound AK) and those results are rejected until renewal re-captures the new AK. AK rotation fails closed, never open. (Implementations capture the AK at registration; per-call they MUST verify against the bound AK, not against the AK embedded in the incoming quote.)
  • On each call, result acceptance does not re-verify the SNARK. The runner’s per-job quote is checked with the light path: the quote signature verifies against the binding’s bound_quote_key (a single ECDSA), plus REPORTDATA binding (step 6), service signature (step 7), freshness (step 1) and replay (step 2). The cert chain / TCB were already proven at registration and are invariant within the TCB epoch.
A per-job result is accepted only if its quote chains (via bound_quote_key) to a binding whose chip-root SNARK and operator root passed at registration, the binding is Active / unexpired, and the per-job freshness / replay / REPORTDATA checks hold. A platform TCB change (microcode update / revocation) makes the binding fail renewal and drop out, bounding staleness to one renewal period. Because the Light path does no per-call CRL / TCBInfo check, a platform key revoked after a binding was captured keeps producing accepted results until the binding next fails renewal, a window of up to BINDING_RENEWAL_PERIOD (~7 days), versus ~75 s under a hypothetical per-call full check. This is the deliberate cost of moving the SNARK off the hot path (§3.8.8) and is an accepted risk recorded by governance, mitigated two ways: (1) shortening BINDING_RENEWAL_PERIOD trades proving overhead for a tighter staleness bound; (2) governance MAY call DeprecateBinding { service_pubkey } (opcode 124) to set a binding to Deprecated/Revoked immediately, before its renewal, on a mid-epoch revocation or disclosed CVE. After force-deprecation newly built eligible-candidate sets exclude the runner and per-call Light verification fails step 3′ (status == Active). Already committed selections retain their snapshot membership as defined in §3.10. UpdateCollateral (publishing a snapshot whose TCBInfo blacklists the level) only bites at the next renewal, so DeprecateBinding is the fast path for the up-to-7-day window. A Revoked service key is terminal: FULL registration or renewal MUST reject it even for its original runner; the runner may register only a new key. verify_cae (§3.8.5) thus has two entry modes: full (registration / renewal, carries proof) and light (per-call, no proof). The dispatcher (§3.10) and Result Verifier (§3.11) use the light mode; only RegisterRunner / renewal uses the full mode.

3.8.9 Nitro (P3) backend verification — COSE_Sign1, direct (no SNARK)

AWS Nitro Enclaves do not produce a DCAP quote. The platform attestation is a COSE_Sign1 document (CBOR) signed ES384 by a per-enclave leaf key, certified by an X.509 chain to the AWS Nitro root (Root-G1). There is no microcode TCB to evaluate. Consequently Nitro does not use the chip-root SNARK (§3.8.5 steps 3–4); its verification is a handful of signature / certificate checks performed directly on-chain. This subsection specializes §3.8.5 for cae.cpu.tee_type == Nitro. Nitro uses direct COSE/X.509 verification rather than the DCAP proof path. This is an implementation choice, not a claim that it is cheaper end to end. Its cost scales with the validated certificate count and the separately charged P-384 operations in §3.8.7. The CA bundle must contain 1–6 certificates, excluding the enclave leaf; every DER blob, leaf included, must be 1–1,024 bytes. Six is a Cowboy consensus bound, not an AWS maximum. Structural CBOR/algorithm/size and trusted-root byte-equality checks run before service-key verification, DER certificate parsing or P-384 work. The same preflighted document/snapshot is reused; the chain walker repeats the bounds before parsing. cae.cpu.quote carries the raw COSE_Sign1 = [protected, unprotected, payload, signature]. protected MUST decode to {1: -35} (alg = ES384); signature is a 96-byte raw r ‖ s. payload is the CBOR attestation document with at least: module_id, digest = "SHA384", timestamp, pcrs (a map from each u8 PCR index to its 48-byte value), certificate (leaf DER), cabundle (DER chain, root-first), and the binding field user_data carrying the CIP-23 REPORTDATA (§3.5, Nitro has no dedicated REPORTDATA slot; user_data is it). The native nonce / public_key fields MAY additionally mirror the freshness nonce / service key but are not the normative binding. For full registration / renewal with tee_type == Nitro, step 3 of §3.8.5 is replaced by:
The captured bound_quote_key for Nitro is the Ed25519 service_pubkey, not a platform attestation key. This differs from DCAP (where it is the AK, §3.8.8) and is the crux of the per-call path below. The service key is bound into the AWS-signed document transitively, as a term of the user_data REPORTDATA preimage (step e). The Nitro leaf signing key is ephemeral: a fresh key per enclave boot with a short-lived certificate. It is therefore unusable as a stable per-call verification key (unlike a DCAP AK, which §3.8.8 assumes stable for the renewal period). Nitro per-call verification MUST NOT re-verify the COSE document. Registration step (e) already bound the stable Ed25519 service key into the AWS-signed document (as a REPORTDATA term); per-call acceptance then rests on:
  • §3.8.5 step 7, the service signature over §3.5.1’s domain/identity-framed preimage, verified against service_pubkey (== binding.bound_quote_key);
  • §3.8.5 step 5 / step 3′, measurement whitelist; binding Active and unexpired.
Step 4′ (quote-sig vs bound_quote_key) and step 6 (REPORTDATA) do not apply per-call to Nitro: there is no per-call platform quote, and the REPORTDATA (user_data) binding was already checked once, at registration (step e), inside the AWS-signed document. The §3.8.8 guarantee holds unchanged: a per-job result is accepted only if it carries a service signature from a key that an AWS-rooted document bound to a whitelisted enclave measurement at registration, the binding is Active / unexpired, and freshness / replay hold. The parent sends exactly C23S[4] ‖ version=2[1] ‖ native_preimage[201], a 206-byte request, and closes its write half before reading the signature. The native preimage is CIP-40 §7.6 row 17’s domain/identity frame over the four 32-byte body fields: 2 + 31 + 8 + 32 + 128 = 201 bytes. The enclave checks the header immediately, bounds the complete request, rejects other versions or lengths, and signs only the canonical native preimage. The transport version does not change the cowboy/tee/service-signature/v1 signing domain. This format requires rebuilding the Nitro EIF and endorsing its new PCR0 before using the updated parent. Leaf-cert / enclave-key rotation does not affect the per-call path (it never trusts that key). A re-launched enclave with a different PCR0 yields a different measurement and fails the whitelist until re-registration. Mid-epoch revocation of the AWS root or governance distrust of a measurement uses the same controls as DCAP: DeprecateBinding (immediate) and UpdateCollateral (next renewal), §3.8.8. Nitro reuses §3.8.6 codes: COSE decode / ES384 / chain failure returns AttestFail; user_data REPORTDATA mismatch returns NonceBindingFail; a PCR outside the whitelist returns RegistryMismatch; an absent AWS root in the snapshot returns UnsupportedTeeType. Nitro full replaces the SNARK-verify term with on-chain COSE + X.509 work: one ES384 verify + a 5-cert ECDSA chain walk + CBOR extraction, on the order of the DCAP light path, and bounded likewise. There is no per-call Nitro cost beyond §3.8.5’s common tail. A full cycle accounting is deferred to implementation.

3.9 Runner Registry Extension

To register, a runner boots a CVM, derives a service keypair, submits RegisterRunner(stake, rate_card, initial_cae, service_pubkey, claimed_measurements, operator_root); the Registry cross-calls 0x05::VerifyCae in full mode (chip-root SNARK, §3.8.8) and validates operator_root; on success it persists an Active binding capturing bound_quote_key (the attestation key (AK) whose chain from AK through QE and PCK to the root the SNARK verified) for the per-call light path. A binding MUST be renewed every BINDING_RENEWAL_PERIOD (default 604,800 blocks ≈ 7 days at 1 s); expiry changes its status to Deprecated, removing it from the candidate pool while historical results stay verifiable. Renewal re-runs the full SNARK, so a TCB/microcode change is caught within one renewal period. A service public key belongs to one runner and MUST NOT be reassigned to another address, even after it is deprecated or revoked. The runner-keyed row identifies its current binding. Renewal with a different service key atomically sets an Active old primary binding to Deprecated before publishing the new Active primary and runner rows; an old Revoked binding remains Revoked. Governance can still revoke the retired primary by key; doing so MUST NOT overwrite the runner’s newer binding. Revoking the current key updates both rows. These binding-row operations introduce no new state-key namespace or event topic. The tee.binding.deprecated event payload remains the runner address. The originating DeprecateBinding instruction identifies the revoked service key; the event does not imply revocation of the runner’s current binding. Rotation retirement emits the existing registration event without a separate deprecation event. Only verified measurement bindings grant TEE authority: dispatch, result acceptance and secret release all check the runner’s binding, and no other TEE record exists. Attestation-first registration closes the swap-binary race: binding measurements at registration plus per-job CAE nonce binding means any binary swap invalidates both.

3.10 Dispatcher Filter

For tee_required jobs, the runner’s Registry record MUST have a measurement_binding with status == Active, expires_at > submission_block, and cpu_tee_type matching the job’s required_tee_type (if set). Self-declared capabilities.tee_support MUST NOT be used as proof of TEE capability for acceptance. At regenesis, self-declared tee_support never makes a runner eligible. A single-runner TDX job without an eligible bound runner is rejected during submission with InsufficientRunners (E1607); it is not accepted and left waiting for a job timeout. Multi-runner jobs use the pending-selection lifecycle and can fail in a later selection round. A candidate’s TEE eligibility is frozen in an already committed selection snapshot. Deprecating or expiring its binding after the snapshot does not rewrite its root, remove the member from the committed draw, or substitute a live candidate. Assignment may therefore include that runner; every subsequent TEE-required result and secret release still checks the current binding and fails while it is revoked/expired. The job then follows its ordinary timeout/reselection lifecycle. Results already accepted before revocation remain accepted. This grandfathering applies to selection only, not permission to submit new attested work.

3.11 Result Verifier

For tee_required jobs, per-call acceptance uses the light verify_cae (§3.8.8). It performs no per-call SNARK verification. It checks quote freshness and nonce replay (steps 1–2), the quote signature against the binding’s bound_quote_key, the REPORTDATA binding (step 6), and the service signature (step 7). The following mode rules apply to these jobs:
  • For TeeAttested, the committee has 1 runner and the result MUST carry a CAE. 0x03 runs the light verify_cae and accepts a passing result. It performs no byte comparison, because the output is confidential.
  • For Deterministic, every result MUST carry a CAE. 0x03 runs the light verify_cae on each result, then performs the byte-identical match on the (non-confidential) result payload, using the canonical, no-floats comparison and threshold-gated failure/slash dispositions in §3.5.1a / §3.5.2.
  • For every tee_required job, including other verification modes, the result MUST carry a passing CAE.
For a job with tee_required = false, an attached CAE is not verified, carries no attestation authority, and MUST NOT be treated as attestation evidence. Ordinary result verification still applies. Billing carries a separate CAE with its own scope and verification under §3.12; an unverified result CAE cannot substitute for it.

3.12 Secrets Manager / CBSS Integration

Secrets Manager (0x04) / CBSS gates a secret release on a valid CAE when the secret’s policy sets tee_required. Secrets are delivered HPKE-wrapped to the runner’s service_pubkey; cleartext exists only inside the CVM. CIP-24 release authorization MUST require an Active, unexpired, verified measurement_binding and re-check it at release, so DeprecateBinding blocks further release after mid-job revocation. The fresh per-release CAE uses §3.5.1’s secret-release preimages. At regenesis, both release-request and receipt validation require a verified Active binding with expires_at > validation_block and cpu_tee_type matching the job’s required_tee_type when set; equality at expiry is rejected. Fresh per-release CAE verification remains separate implementation work. Container billing follows CIP-10 §12.3: exactly one runner, metered = true, and a successfully verified billing CAE make settlement eligible at result height H + 1, with cae_final = true and billing disputes rejected. The shipped Nitro signer attests service-key custody and signs host-measured cgroup fields; it does not independently prove meter integrity under host compromise. Charges remain capped by compute escrow.

3.13 tee_call SDK Helper

No new PVM syscall. cowboy_sdk.tee.tee_call(...) is a Python wrapper that emits a SubmitJob with tee_required = true (mode defaults to TeeAttested; pass deterministic=True for the reproducible path). PVM determinism is unaffected.

3.14 The three-layer chain (defense in depth)

A TEE-required job touches three independent layers, each at a different lifecycle moment: If the manifest declares sec.tee_required, all the actor’s jobs MUST set tee_required = true (submitter-side validation rejects violations). The dispatcher (§3.10) selects only bound runners; the Result Verifier (§3.11) requires a passing CAE.

3.15 CIP-13 (delegation) interaction

TEE eligibility is a categorical capability check (measurement_binding.status), not stake-thresholded. Delegated stake raises VRF weight but does not confer eligibility. Slashing for forged attestation: self-stake uncapped; delegator slash capped at MAX_DELEGATION_SLASH_PER_EPOCH_BPS = 500 (5%) per CIP-13 §3.6. Delegators have no claim on or visibility into secrets the runner accesses.

3.16 Parameters


4. Rationale

  • Confidential output and committee byte-match are mutually exclusive. TeeAttested makes attestation the verification; Deterministic keeps reproduction for public outputs.
  • Moving X.509 + ECDSA + TCB evaluation into a circuit makes time-dependent checks deterministic because collateral becomes a snapshot-anchored circuit input. Verifying a proof reduces gas use compared with a 7-layer certificate-chain walk.
  • Under §3.8.8, zkVM DCAP proving takes ~30 s–minutes and cannot fit the 75-block freshness window per call. Verifying the chip-root SNARK at registration / renewal (~7 days) and binding the platform key (bound_quote_key) lets per-call acceptance be a single ECDSA + REPORTDATA / freshness / replay while the cert chain / TCB are proven once per renewal period.
  • TEE.Fail demonstrated that physical access permits forged quotes that validate against a vendor root. Proof-of-Cloud supplies an independent operator endorsement.
  • REPORTDATA binds the CPU and GPU attestations. Without cross-binding, CPU and GPU attestations can be mixed and matched; the user_data rule makes the CPU quote worthless without the matching GPU report and service key.
  • Anchoring only attest_digest keeps state growth independent of attestation size; the full CAE lives on CIP-9.
  • attest_digest excludes the signature to avoid a circular definition in which the digest contains the signature that signs it.
  • A publicly-derivable nonce offers no freshness against a key-extraction adversary; an on-chain beacon does.

5. Integration requirements

  • Non-TEE runners serve jobs that do not require attestation and cannot be selected for tee_required jobs.
  • A governance-trusted key supplies only the operator endorsement. Every attested path requires both roots and fails closed when either is missing or invalid.
  • Dispatcher and result verification require verified measurement_binding records; self-declared tee_support is not attestation evidence.
  • CIP-10 BillingAttestation.tee_signature is Option<CompositeAttestation>, freshly generated per billing event with the byte-exact nonce, REPORTDATA, and result_hash in §3.5.1. The cert chain MAY be cached; the quote MUST be fresh within MAX_QUOTE_AGE.

6. Security Considerations

  • Under the threat model (§3.6), the chip-vendor root does not cover physical access + root (TEE.Fail). The operator root mitigates this threat; the chip root covers remote/software adversaries.
  • As TEE.Fail demonstrated, physical extraction permits a forged quote that chains to a vendor root. Single-root acceptance is therefore disallowed; chip_root ∧ operator_root is required.
  • SNARK chip-root verification rejects remote quote forgeries.
  • To prevent replay, nonce (with beacon) is bound inside REPORTDATA and checked against seen_nonces[task_id] for the dispute window.
  • For vulnerable microcode / TCB, governance publishes a CollateralSnapshot whose TCBInfo marks the level unacceptable, causing step 4 to return TcbOutOfDate.
  • NRAS verification uses snapshot.nras_root without a live call; a threshold multi-provider fallback is a follow-up.
  • For CAE availability, the on-chain attest_digest proves the receipt exists even if the CIP-9 body is unreachable; runners SHOULD pin to ≥ k Relay Nodes.
  • CIP-10 §14.6 addresses GPU memory residue.

7. Implementation Roadmap

Net effort to reach the full chip-root + multi-root design is estimated at ≈ 20–30 engineer-weeks, dominated by the SNARK DCAP verifier.

Appendix A: Reference Mapping (PythonVM × TEE prior art ↔ Cowboy)

Appendix B: TEE landscape (snapshot, informative)

The CPU/GPU backends are Intel TDX (primary, Azure/Google/Alibaba), NVIDIA NCC (primary GPU; H100/H200/Blackwell; ~2–5% LLM overhead), AMD SEV-SNP and AWS Nitro (secondary), Intel SGX (IAS/EPID EOL 2025-04-02, EconomicBond only), ARM CCA (tracked, immature). The primary platform layer is Confidential Containers (CoCo) + Trustee/KBS, reused from CIP-10. The implementation does not use Gramine, Occlum or Open Enclave (SGX LibOS/SDK), which VM-level confidential computing supersedes. 2026-06 update (informs §3.4/§3.6/§3.8).
  • TEE.Fail (2025-10) used a < $1,000 DDR5 interposer to extract keys from TDX/SGX/SEV-SNP (deterministic AES-XTS) and forge TDX attestations on Ethereum BuilderNet. Vendors deem physical attacks out of scope. This motivates multi-root (§3.6).
  • On-chain SNARK DCAP implementations (Automata et al.) provide production SGX/TDX attestation on EVM with SNARK compression (~1/10 gas) and decentralized collateral caching. They support the §3.8 SNARK pipeline.
  • Proof-of-Cloud (Flashbots) / Intel POE composes chip-root and operator-root endorsements to supply the operator_root of §3.6.
  • NVIDIA Blackwell CC supports B200/GB200 confidential mode with encrypted PCIe 5.0 / NVLink, described in the CC deployment guide v7.1 (2026-04).
Sources: TEE.Fail, bleepingcomputer.com/news/security/teefail-attack-breaks-confidential-computing-on-intel-amd-nvidia-cpus/ ; Proof-of-Cloud, writings.flashbots.net/mind-the-gap-tee-poc ; on-chain SNARK DCAP, medium.com/@oraclethaacat/beyond-dcap-… ; NVIDIA CC, docs.nvidia.com/cc-deployment-guide-tdx.pdf