Run confidential compute in a TEE
Use a TEE's attestation as evidence: verify a provider's Intel TDX, AMD SEV-SNP, AWS Nitro or NVIDIA confidential GPU quote, then send it confidential work.
A trusted execution environment (TEE) runs code in memory the host cannot read. On Tenzro Network a TEE is evidence, not custody: its attestation is a hardware-signed statement of what code is running and on which platform, and the network verifies that statement in full against the vendor's certificate chain before anyone relies on it. Keys are still rooted in a TPM, Secure Enclave or passkey; the TEE proves where the work ran.
Supported platforms are Intel TDX, AMD SEV-SNP, AWS Nitro Enclaves and NVIDIA confidential-computing GPUs.
This tutorial covers both sides: a provider that offers attested compute, and a caller that verifies a provider before sending it sensitive work.
Prerequisites
- Provider: a node running on TEE-capable hardware (a TDX or SEV-SNP confidential VM, a Nitro Enclave host, or a confidential-computing GPU), with a hardware-rooted identity and a posted bond.
- Caller: the
tenzroCLI, ortenzro-sdkfor TypeScript, and a funded account.
Part 1: offer attested compute
1. Detect the TEE
tenzro tee detectExpected output names the platform the node found, for example intel-tdx, and its capabilities. If nothing is detected, the machine is not running inside a confidential environment and cannot serve the TEE role.
2. Start the node with the TEE role
tenzro-node --roles ai,tee --data-dir ./data
tenzro stake bond --role tee --amount <AMOUNT_WEI>The node announces its TEE capability with its provider announcement. Callers and routers can then filter for your node when they require TEE execution.
3. Produce and check your own quote
# 1. A fresh single-use nonce from the node that will verify
NONCE=$(tenzro tee challenge --format json --rpc https://rpc.tenzro.com | jq -r .nonce)
# 2. A report from the enclave, bound to that nonce
curl -s http://127.0.0.1:8545 -H 'content-type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tenzro_getTeeAttestation\",\"params\":{\"user_data\":\"$NONCE\"}}" \
| jq -r .result > report.json
# 3. Verify it against the nonce
REPORT_HEX=$(xxd -p report.json | tr -d '\n')
tenzro tee verify --report "$REPORT_HEX" --nonce "$NONCE" --rpc https://rpc.tenzro.comverify checks the vendor signature, the certificate chain up to the pinned vendor root, the collateral, the debug state and the binding to your nonce. A report that fails any check is rejected; there is no fallback that accepts unverified evidence. Because the nonce is single-use, a replayed report fails too.
Part 2: send confidential work
4. Find TEE providers
tenzro tee providers --rpc https://rpc.tenzro.comOr from TypeScript:
import { TenzroClient } from "tenzro-sdk";
const tz = new TenzroClient({ endpoint: "https://rpc.tenzro.com" });
const { providers } = await tz.tee.listTeeProviders();5. Verify the provider before you trust it
Ask the provider's node for a report bound to a nonce you obtained, and verify it yourself:
# 1. A fresh single-use nonce from the node that will verify
NONCE=$(tenzro tee challenge --format json --rpc https://rpc.tenzro.com | jq -r .nonce)
# 2. A report from the enclave, bound to that nonce
curl -s https://PROVIDER_RPC -H 'content-type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tenzro_getTeeAttestation\",\"params\":{\"user_data\":\"$NONCE\"}}" \
| jq -r .result > report.json
# 3. Verify it against the nonce
REPORT_HEX=$(xxd -p report.json | tr -d '\n')
tenzro tee verify --report "$REPORT_HEX" --nonce "$NONCE" --rpc https://rpc.tenzro.comconst { nonce } = await tz.tee.attestationChallenge();
// ...have the provider produce a report bound to `nonce`, then:
const result = await tz.tee.verifyAttestation(reportHex, nonce);
if (!result.valid) throw new Error(result.error ?? "attestation rejected");Compare the measurement in the quote with the one you expect for the software you want to run. A valid quote for the wrong code is still the wrong code.
6. Run inference that requires a TEE
Ask the router to place a request only with providers whose attestation verifies:
tenzro inference request qwen3-8b "Summarise this contract clause." \
--verification tee \
--rpc https://rpc.tenzro.comThe provider runs the request inside the enclave and signs the result with a key bound to its attestation, so the answer can be tied to the verified environment that produced it. Inputs and outputs can be encrypted to the enclave's public key, so the host operating system never sees them in cleartext.
7. Pay for attested results
Settlement for confidential work is metered per use, like any other inference. A result whose attestation does not verify is not accepted, and a provider that returns one fails the request and loses reputation.
Next steps
- TEE for per-vendor verification in detail.
- Trust and provenance to combine attestation with certifications.