Home / Insights / Generative AI and LLMs

Generative AI and LLMs

Confidential Computing for Sensitive AI Workloads: TEEs, Confidential GPUs and Encrypted Inference

Encryption at rest and in transit stops at the point your model actually reads the data. Confidential computing closes that gap with hardware-isolated, attested environments. This guide explains when it is worth the extra complexity for AI workloads and how to adopt it without stalling delivery.

TopicsGenerative AI and LLMsArchitecture and Modernization

Key takeaways

  • Confidential computing protects data while it is being processed, which is the one state that disk and TLS encryption leave exposed during AI inference.
  • Attestation is the feature that matters most: it lets your key service release secrets only to a verified, unmodified workload, rather than to whoever controls the host.
  • Confidential GPUs make protected LLM inference practical, but CPU-to-GPU transfer is encrypted and slower, so data-heavy workloads pay a measurable performance cost.
  • Fully homomorphic encryption is real but not yet a practical default for LLM inference; treat it as a research track, not a procurement requirement.
  • Start with a threat model and one high-sensitivity workflow; many organisations get most of the benefit from a well-isolated private deployment first and add TEEs where the threat model demands it.

Most security reviews of AI systems ask two questions: is the data encrypted on disk, and is it encrypted on the wire? Both answers are usually yes. The uncomfortable third question is what happens while the model is running. At that moment the prompt, the retrieved documents and the model weights sit in plain text in memory, readable in principle by anyone with sufficient control of the host: a cloud operator, a compromised hypervisor, a rogue administrator or malware with root access.

For most internal assistants that residual risk is acceptable. For clinical notes, legal privilege, financial records, biometric data or proprietary model weights, it often is not, and procurement teams in healthcare, government and financial services increasingly ask about it directly. This article is written for CTOs, security leads and product owners who need to decide whether confidential computing belongs in their AI architecture, which variant fits, and what it really costs to run. It draws on the hardware isolation work we do as part of private AI deployment projects, where the question of who can see data during inference comes up early.

The short version: confidential computing is a strong control for a specific threat, the privileged insider or compromised infrastructure layer. It does not fix prompt injection, poor access control or leaky logging.

What problem does confidential computing solve for AI?

The Confidential Computing Consortium, a Linux Foundation project, defines the field as the protection of data in use by performing computation in a hardware-based, attested Trusted Execution Environment. The definition has three parts worth unpacking for an AI context.

Data in use is the gap

Data has three states: at rest, in transit and in use. Mature cloud platforms already encrypt the first two by default. Microsoft’s Azure confidential computing overview frames confidential computing as the missing third piece, covering data and cryptographic keys while they are being processed. For an LLM, data in use includes the user’s prompt, any documents retrieved for retrieval-augmented generation, intermediate activations, the generated output and the model weights themselves.

Hardware isolation changes who you trust

A Trusted Execution Environment (TEE) is an isolated region of a processor whose memory is encrypted and inaccessible to the host operating system, the hypervisor and the cloud provider’s staff. The consortium is explicit that you still trust two parties: whoever wrote the code running inside the TEE, and the hardware manufacturer. What you no longer have to trust is everyone who administers the infrastructure underneath.

Attestation makes the guarantee checkable

Isolation alone would be of limited use if you could not prove what is running inside the enclave. Attestation is a signed report, rooted in the hardware, that describes the measured state of the environment: firmware, boot chain and the hash of the workload. A key management service can check that report and release a decryption key only if the measurements match an approved build. This is the mechanism that turns a vague promise (“we will not look at your data”) into an enforceable technical control.

Who should care

  • Regulated data owners who want to use cloud GPUs but cannot accept operator access to plaintext patient, client or financial data.
  • Model owners deploying proprietary or fine-tuned weights into a customer’s environment or a third-party cloud, who need to stop the weights being copied.
  • Multi-party collaborations, such as several organisations pooling data for a shared model where no single party, including the host, should see the others’ raw records.

Action: write down, in one sentence, which actor you are protecting against. If the answer is “external attackers via our application”, confidential computing is not your first control. If it is “the infrastructure operator” or “our own administrators”, keep reading.

What are the technical options, and how do they compare?

“Encrypted inference” is used loosely in vendor material. It can mean any of five quite different things, with very different maturity and cost.

1. Confidential virtual machines (CPU TEEs)

Technologies such as AMD SEV-SNP and Intel TDX encrypt an entire virtual machine’s memory and support remote attestation. Existing applications usually run unmodified. This suits pre-processing, retrieval services, small CPU-bound models and the orchestration layer around a GPU workload.

2. Process enclaves on cloud platforms

AWS Nitro Enclaves are a useful example of a more constrained design. According to AWS documentation, an enclave is a hardened virtual machine carved out of an EC2 instance with no persistent storage, no interactive access and no external networking; it talks only to its parent instance over a local socket, and AWS KMS key policies can restrict decryption to enclaves whose measurements match. That makes enclaves well suited to tokenisation, key handling and small, sensitive transformations, but not to large GPU inference.

3. Confidential GPUs

This is what makes protected LLM inference practical. NVIDIA’s H100 was the first of its GPUs to support confidential computing; NVIDIA’s technical write-up explains that the GPU has an on-die hardware root of trust, produces a signed attestation report, and works alongside a confidential VM on the CPU side. Data moving between CPU and GPU passes through encrypted bounce buffers, and in most cases existing CUDA workloads need no code changes.

4. Purpose-built private inference services

Apple’s Private Cloud Compute, described in June 2024, is a useful reference design even if you never use it. Its stated requirements are stateless computation, enforceable guarantees, no privileged runtime access, non-targetability and verifiable transparency, including publishing production software images and logging their measurements. Those five properties are an excellent checklist for evaluating any vendor’s “private” AI claim.

5. Fully homomorphic encryption (FHE)

FHE allows computation on ciphertext without ever decrypting it. NIST describes it as enabling computation of arbitrary functions over encrypted data, without knowing the secret key, and notes it is not yet standardised by NIST, with work ongoing on benchmarks and implementation guidelines. For small models and specific operations it can work; for general LLM inference the computational overhead is currently prohibitive for production use.

OptionProtects againstFits AI workloadsMaturityTypical friction
Confidential VM (CPU)Host OS, hypervisor, operatorRAG services, orchestration, small modelsProduction-ready on major cloudsLow; attestation plumbing
Process enclave (e.g. Nitro)Parent instance, root usersKey handling, redaction, tokenisationProduction-readyMedium; no networking or storage
Confidential GPU + CVMHost, hypervisor, operator, PCIe snoopingLLM and vision inference, fine-tuningProduction-ready on supported hardwareMedium; limited SKUs, transfer overhead
Private inference serviceVendor staff, depending on designConsumer and SaaS assistantsVaries by vendorDepends on transparency offered
Fully homomorphic encryptionEveryone without the keyNarrow models, specific operationsResearch and early productsVery high compute cost

Action: when a vendor says “encrypted inference”, ask which of these five they mean and request the attestation evidence or transparency log that backs the claim.

How do you decide whether you need it?

Confidential computing is one layer in a stack of controls. Before adding it, check whether simpler measures already meet your threat model. Our article on choosing between self-hosted open models and managed cloud AI covers the broader deployment choice; this section focuses on the incremental decision.

Three questions that settle most cases

  1. Who controls the hardware? If the model runs on servers you own, in a facility you control, with a small vetted admin group, the operator threat is already narrow. If it runs on shared cloud GPUs or a partner’s infrastructure, TEEs add real protection.
  2. What is the consequence of operator access? If a regulator, client contract or professional duty treats exposure to the host as a breach, you need a control that is technically enforced, not merely contractual.
  3. Do you need to prove it to someone else? Attestation is evidence a customer or auditor can verify. If your sales cycle stalls on “how do you stop your own staff reading our data?”, that evidence has commercial value.
Scenario (illustrative)Recommended baselineAdd confidential computing?
Internal policy chatbot over public HR documentsManaged API with data-retention controlsNo
Clinical dictation summarised on cloud GPUsPrivate deployment in your cloud account, strict loggingYes, for the inference tier, if the threat model includes the cloud operator
Proprietary fine-tuned model deployed into a customer’s cloudLicensed container, encrypted weightsYes, to bind weight decryption to attested environments
Several firms training a shared fraud modelData-sharing agreement, pseudonymisationYes, often the enabling control
On-premises legal assistant, air-gappedNetwork isolation, role-based accessRarely; physical control already narrows the threat

For example, a mid-sized healthcare software vendor might start with a private deployment of an open-weight model in its own cloud account, then move only the summarisation service onto confidential GPU instances once a large hospital customer asks for operator-exclusion evidence. That staged approach avoids paying the confidential-computing premium for workloads that do not need it.

Also remember what TEEs do not address. Prompt injection, over-broad retrieval permissions and sensitive data written to application logs all happen inside the trusted boundary. The OWASP Top 10 for LLM applications remains the right checklist for those risks.

Action: map each AI workflow to a row like those above and only shortlist the ones where operator access is unacceptable and provable protection has value.

What does a confidential inference architecture look like?

The pattern below is a vendor-neutral outline we use when scoping confidential inference. Names differ by cloud, but the trust flow is the same.

Components

  • Client or API gateway that terminates user authentication and forwards requests over TLS that terminates inside the TEE, not at a load balancer outside it.
  • Confidential VM running the inference server, with a confidential GPU attached where the model needs one.
  • Attestation verifier, either the cloud provider’s service, the GPU vendor’s service or your own, that validates hardware and workload measurements.
  • Key broker (a cloud KMS or an HSM-backed service) whose release policy is bound to approved measurements.
  • Encrypted model store holding weights that can only be decrypted inside an attested environment.
  • Build pipeline that produces reproducible images and records their measurements, so you know what “approved” means.

Request flow, step by step

  1. The confidential VM boots; firmware and boot chain are measured by the hardware.
  2. The GPU driver inside the VM authenticates the GPU and obtains its attestation report. NVIDIA’s guidance is to proceed only when that report is valid.
  3. The VM sends combined CPU and GPU evidence to the verifier, which returns a signed attestation token.
  4. The key broker checks the token against policy and, only if it matches, releases the key for the model weights and the TLS private key.
  5. The inference server loads the decrypted weights into protected memory and begins serving.
  6. Clients, or a gateway acting for them, can request the attestation token to confirm they are talking to the approved build before sending sensitive data.
  7. Outputs return over the same TLS session; logs are restricted to metadata that you have explicitly classified as non-sensitive.

Action: before building, draw this flow for your own stack and mark every point where plaintext exists outside a TEE.

What does it cost, and what risks remain?

Confidential computing is not free, though the costs are more operational than licensing.

Performance

NVIDIA reports that GPU compute and on-package memory bandwidth are the same in confidential mode, but CPU-to-GPU transfer is limited by CPU-side encryption, measured at roughly 4 GB/s in its early-access write-up. Workloads with a high ratio of compute to data movement, such as long LLM generations, stay close to normal performance; workloads that stream large batches of images or swap models frequently feel the overhead more. Benchmark your actual workload rather than relying on vendor averages.

Availability and lock-in

Confidential GPU instances are available only on specific hardware generations and regions. That narrows your capacity options and can conflict with data-residency requirements. Our piece on sovereign AI discusses how hosting location and jurisdiction interact with these choices.

Operational overhead

  • Debugging is harder by design. Production TEEs block the profiling and interactive access engineers normally use. NVIDIA, for instance, disables performance counters in its production confidential mode and offers a separate developer mode that must not be used with sensitive data.

Residual risks

RiskWhy it remainsMitigation
Side-channel attacksHardware isolation has had published weaknesses over timePatch firmware promptly; avoid co-tenancy for the most sensitive workloads
Vulnerable code inside the TEEThe TEE protects your code; it does not make it correctMinimal images, dependency scanning, code review
Application-layer leakagePrompt injection or verbose outputs bypass hardware controlsOutput filtering, least-privilege retrieval, red-team testing
Attestation misconfigurationA permissive policy releases keys to unapproved buildsPolicy-as-code, peer review, alert on policy changes

Action: budget for a benchmarking spike and for the release-engineering work, not just the instance price difference. In our experience those engineering hours are where estimates go wrong.

How should you roll it out? A phased plan and checklist

A phased plan keeps confidential computing from becoming a large, risky platform project.

Phase 1: threat model and baseline (two to four weeks, illustrative)

  • Document the actors you are protecting against and the data classes involved.
  • Implement the non-negotiable baseline: private networking, identity-provider access control, encryption at rest, and log redaction.
  • Choose one workflow where operator exclusion has clear regulatory or commercial value.

Phase 2: pilot on confidential infrastructure

  • Deploy the inference service on a confidential VM, with a confidential GPU if needed.
  • Wire attestation to key release for model weights and TLS keys.
  • Benchmark latency, throughput and cost against the non-confidential baseline on the same model.

Phase 3: production hardening

  • Reproducible builds with recorded measurements; policy-as-code for key release.
  • Runbooks for rotation, firmware patching and rebuild-based incident response.

Readiness checklist

  1. We can name the actor that confidential computing protects against.
  2. Our application-layer controls (access, retrieval permissions, output filtering) are already in place.
  3. TLS terminates inside the trusted environment.
  4. Key release is bound to specific, approved measurements.
  5. The retrieval tier and vector store are covered or explicitly accepted as a risk.
  6. Logs contain no prompts, documents or outputs unless classified and approved.
  7. We have measured the performance overhead on our real workload.
  8. Release and incident processes work without interactive access to production.

Action: run the checklist against your highest-sensitivity AI workflow this quarter; any “no” answer is your next piece of work.

Frequently asked questions

Does confidential computing stop prompt injection or data leaks through model outputs?

No. It protects data from the infrastructure layer while it is processed. Prompt injection, over-broad retrieval and verbose outputs happen inside the trusted boundary, so you still need application-layer controls such as those in the OWASP Top 10 for LLM applications.

Can we run open-weight LLMs on confidential GPUs without changing our code?

Usually yes. NVIDIA states that in most cases existing CUDA workloads run unchanged once the confidential VM has established trust with the GPU. The work lies in attestation, key release and release engineering rather than in the model code.

Is homomorphic encryption a realistic alternative for LLM inference today?

Not for general LLM inference at production scale. NIST describes fully homomorphic encryption as an active area that is not yet standardised, and the compute overhead remains very high. It can suit narrow, small models; for most teams, TEEs are the practical route.

How much slower is confidential inference?

It depends on the workload. NVIDIA reports unchanged GPU compute and memory bandwidth, but encrypted CPU-to-GPU transfer at roughly 4 GB/s in its early-access measurements. Long text generations are affected less than data-heavy batch jobs, so benchmark your own workload before committing.

What evidence should we ask a vendor for when they claim private or encrypted inference?

Ask which technology they use, whether attestation reports are available to you, how keys are bound to approved builds, what is logged, and whether production software images or measurements are published for independent verification.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Confidential Computing Consortium (Linux Foundation): About — accessed 9 November 2026. Definition of confidential computing and the two parties a data owner still trusts.
  2. Microsoft Learn: Azure confidential computing overview — accessed 9 November 2026. Framing of data in use as the third data state and reduced trust in cloud operators.
  3. AWS Documentation: What is Nitro Enclaves? — accessed 9 November 2026. Enclave constraints (no storage, networking or interactive access) and KMS attestation-bound key policies.
  4. NVIDIA Technical Blog: Confidential Computing on H100 GPUs (August 2023) — accessed 9 November 2026. GPU attestation flow, encrypted bounce buffers, operating modes and the roughly 4 GB/s transfer figure.
  5. Apple Security Research: Private Cloud Compute (June 2024) — accessed 9 November 2026. Five design requirements used as an evaluation checklist for private inference claims.
  6. NIST CSRC: Fully Homomorphic Encryption (Privacy-Enhancing Cryptography) — accessed 9 November 2026. Definition of FHE and its current non-standardised status.

Do you need operator-proof AI inference for a sensitive workflow?

Tell us about the data and the threat you are worried about. We will help you decide between a private deployment, confidential GPUs or both, and scope a pilot.