Skip to content
Ylabator

Confidential Inference: TEEs and Remote Attestation

A trusted execution environment protects prompts while the processor uses them, and attestation proves what code is running before keys are released. It says nothing about what that code logs or sends.

Topics
Confidential Computing
Level
Founder / builder
Read
5 min
Published
2026-11-12
Reviewed
2026-11-12
Post-launch queue

The problem

On June 10, 2024, Apple's security team described Private Cloud Compute, the server side of Apple Intelligence. User devices send data only to nodes that can cryptographically attest to running publicly listed software. The nodes have no remote shell or interactive debugging, and no general-purpose logging. Only pre-specified, structured and audited logs and metrics can leave a node [1].

That design answers a question most AI deployments leave open: what stops the operator from reading prompts while they are being processed? Encryption at rest protects disks. TLS protects the wire. Neither protects plaintext in memory, and a model cannot compute on ciphertext. NVIDIA's confidential computing whitepaper puts it plainly, citing the Confidential Computing Consortium: data is often encrypted at rest and in transit, but not while in use in memory [2].

A financial analysis service that wants managed GPUs without trusting the cloud operator with client prompts faces exactly this gap (an illustrative scenario). The hardware to close it now exists in public clouds. The risk is buying it as if it closed every other gap too.

How it works

The diagram shows three protections side by side: encrypted storage for data at rest, encrypted transport for data in transit, and trusted execution for data during computation. Only the third is new.

A trusted execution environment is a hardware-isolated region whose memory the host cannot read. NIST's glossary defines it simply as an area or enclave protected by a system processor [5]. For AI inference, the TEE is a confidential virtual machine on the CPU, using AMD SEV-SNP or Intel TDX, extended to the GPU. NVIDIA's Hopper and Blackwell GPUs join the CPU TEE: the driver sets up an encrypted SPDM session with the GPU firmware, the GPU is attested, and CUDA programs run only after attestation succeeds [2]. Azure's confidential GPU VMs pair 4th Gen AMD EPYC with SEV-SNP and NVIDIA H100, and Microsoft states the TEE spans the confidential VM and the attached GPU [3].

Inside the boundary sit the measured code and model and the prompts in use. Outside it sit the cloud operator, the host OS and the hypervisor.

Attestation produces evidence: signed measurements of the hardware, firmware and software that booted. A verifier compares those measurements with expected values. A key release policy hands the decryption key for the model weights or the data only when the measurements match. On Azure, Secure Key Release in Key Vault releases exportable keys only against claims produced by Microsoft Azure Attestation [4].

The order matters. The workload boots without secrets, proves what it is, then receives keys. If an operator changes the image, the measurements change, the verifier rejects them, and the key never arrives.

What stays outside the guarantee: side channels, the supply chain of the measured software, availability, and everything the measured code chooses to do. NVIDIA's whitepaper lists one availability attack as out of scope: a malicious hypervisor can still cut a confidential VM's network or power [2]. Software that logs every prompt inside a sealed VM still logs every prompt.

Trusted execution boundary and key release

Fig. 12
  • Encrypted storageData at rest
  • Encrypted transportData in transit
  • Trusted executionData during computation
Host: cloud operator, OS, hypervisor
Trusted execution environment
Measured code and model
Prompts in use
  1. Attestation evidenceMeasurements
  2. VerifierCompares to expected
  3. Key release policyKeys only on match
A TEE attempts to isolate code and data during execution. Attestation provides evidence about measured software and hardware, subject to platform trust and the threat model. It is not absolute security.
Technical detail

Specify trusted code, measurements, key release policy, enclave lifecycle, patching, model loading and operator access. Test that attestation is refused for changed measurements and that key release then fails.

Document side-channel and supply-chain assumptions, and compare with simpler privately controlled inference.

By the numbers

of unsecured performance, NVIDIA's figure for its secure AI deployments [6]
up to 98%
core requirements Apple set for Private Cloud Compute, including no privileged runtime access [1]
5
AMD EPYC with SEV-SNP, paired with NVIDIA H100 in Azure confidential GPU VMs [3]
4th Gen
first release of NVIDIA's confidential computing whitepaper for Hopper [2]
July 2023
ConcernCovered by the TEEWho must handle it
Prompts in GPU and CPU memory during inferenceYes, isolated from host and hypervisor [2][3]Hardware vendor and cloud
Proof of which code and model are loadedYes, through attestation evidence [2]Your verifier and key policy
Application logs and tracesNoYour code: structured, audited logs only, as in PCC [1]
Outbound tool calls, search and connectorsNoYour egress policy and approval gates
Availability against a hostile hypervisorNo, out of scope [2]Your HA and DR design [3]
Side channels and supply chainPartly: BMC data paths, JTAG and performance counters are locked in confidential mode [2]Your documented assumptions
What a GPU TEE covers and what it leaves to the application [1][2][3][5]

The performance number removes the old objection. If confidential mode costs a few percent, the decision turns on operations and threat model, not speed [6]. The table shows what the decision cannot settle. Of six concerns, the TEE handles two outright. The rest are application design, which is why Apple's design also rules out general-purpose logging and remote shells [1].

Implementation

Gate every secret on attestation. On Azure, attach a release policy to the key that decrypts model weights or a data key, so Key Vault releases it only to an attested, compliant confidential VM. The policy grammar and claim names below follow Microsoft's published examples [4]. Pinning the VM ID narrows release to one known machine, but not to the software inside it. To bind release to software, pin a measurement as well, such as x-ms-sevsnpvm-hostdata in Microsoft's confidential container example [4].

model-key-release-policy.jsonjson
{
  "version": "1.0.0",
  "anyOf": [
    {
      "authority": "https://sharedweu.weu.attest.azure.net",
      "allOf": [
        {
          "claim": "x-ms-isolation-tee.x-ms-attestation-type",
          "equals": "sevsnpvm"
        },
        {
          "claim": "x-ms-isolation-tee.x-ms-compliance-status",
          "equals": "azure-compliant-cvm"
        },
        {
          "claim": "x-ms-azurevm-vmid",
          "equals": "B958DC88-E41D-47F1-8D20-E57B6B7E9825"
        }
      ]
    }
  ]
}

Write the rest of the specification down before deployment, as the diagram's detail lists: trusted code and its measurements, the key release policy, the enclave lifecycle, the patching process (every patch changes measurements, so the policy must be updated in the same change), how the model is loaded, and which operator access remains.

Then compare with the simpler option. If the threat model does not name the cloud operator, privately controlled inference on a dedicated deployment may give the same practical protection with less operational work. Confidential computing changes whom you trust. It does not remove trust.

Test it

The acceptance test is a refusal. A changed measurement must be rejected, and key release must fail. Run the policy logic locally against recorded claims before relying on the cloud service, so the team knows exactly which claim blocks which change. The evaluator below mirrors the policy's anyOf and allOf semantics for equals conditions.

test_key_release_policy.pypython
import json
import pytest

POLICY = json.load(open("model-key-release-policy.json"))

def get_claim(claims: dict, dotted: str):
    # Policy claims may be nested ("a.b") or top level, so try both forms.
    if dotted in claims:
        return claims[dotted]
    node = claims
    for part in dotted.split("."):
        node = node.get(part) if isinstance(node, dict) else None
    return node

def releases(policy: dict, issuer: str, claims: dict) -> bool:
    return any(rule["authority"] == issuer and
               all(get_claim(claims, c["claim"]) == c["equals"] for c in rule["allOf"])
               for rule in policy["anyOf"])

ISSUER = "https://sharedweu.weu.attest.azure.net"
GOOD = {
    "x-ms-isolation-tee": {"x-ms-attestation-type": "sevsnpvm",
                           "x-ms-compliance-status": "azure-compliant-cvm"},
    "x-ms-azurevm-vmid": "B958DC88-E41D-47F1-8D20-E57B6B7E9825",
}

def test_attested_vm_gets_key():
    assert releases(POLICY, ISSUER, GOOD)

@pytest.mark.parametrize("key,value", [
    ("x-ms-attestation-type", "tvm"),          # not SEV-SNP
    ("x-ms-compliance-status", "unknown"),     # not an Azure-compliant CVM
])
def test_changed_measurement_is_refused(key, value):
    claims = json.loads(json.dumps(GOOD))
    claims["x-ms-isolation-tee"][key] = value
    assert not releases(POLICY, ISSUER, claims)

def test_other_vm_is_refused():
    assert not releases(POLICY, ISSUER, {**GOOD, "x-ms-azurevm-vmid": "other-vm"})

def test_wrong_attestation_authority_is_refused():
    assert not releases(POLICY, "https://attacker.example", GOOD)

Expected result: one release, four refusals. Then repeat the negative cases against the real service in staging.

  • Boot a standard, non-confidential VM and request the key. Expect a denial from Key Vault.
  • Request the key from a second confidential VM with a different VM ID. Expect a denial. If you pin a software measurement, change the image and expect a denial until the policy is updated through change control.
  • Search the VM's logs and traces for a canary prompt. A hit means the application, not the TEE, leaks plaintext.
  • Record the side-channel and supply-chain assumptions in the test report.

Decision

Use confidential inference when the cloud operator is a named actor in your threat model: regulated client data on shared GPUs, a customer contract that excludes the provider's staff, or a multi-party computation where no party should see the others' inputs.

  • Gate keys on attestation, never on network location alone.
  • Budget for operations. Every patch changes measurements. Microsoft also leaves HA and DR for confidential GPU VMs to the customer [3].
  • Fix logging and egress first. A TEE around a leaky application is a sealed box with an open window.
  • If the operator is not in the threat model, a dedicated deployment with strict logging is simpler and cheaper.

Sources

  1. [1]Private Cloud Compute: A new frontier for AI privacy in the cloud (opens in a new tab)Apple Security Research, June 2024
  2. [2]NVIDIA Secure AI with Blackwell and Hopper GPUs, WP-12554-001 (opens in a new tab)NVIDIA, August 2025
  3. [3]Azure Confidential GPU options (opens in a new tab)Microsoft Learn, February 2026
  4. [4]Secure Key Release policy examples for Azure Confidential Computing (opens in a new tab)Microsoft Learn, September 2026
  5. [5]Trusted execution environment (glossary) (opens in a new tab)NIST Computer Security Resource Center, November 2026
  6. [6]Secure AI Solutions (opens in a new tab)NVIDIA, November 2026

Technical guidance, not security certification or legal advice.

All Private AI articles