TrustZone vs SGX vs SEV/TDX: Isolation Unit, Trusted Computing Base and Memory Encryption Compared
All three are CPU hardware mechanisms, trusted execution environments (TEEs), that keep sensitive processing safe even if the normal OS or the hypervisor is compromised. They differ in the unit they carve out. TrustZone splits the processor into a secure world and a normal world and is used mainly in smartphones and embedded devices. SGX carves out only part of an application as an enclave, keeping the trusted computing base as small as possible. SEV and TDX encrypt the memory of an entire virtual machine (VM) so that even the cloud provider cannot read it, an approach known as confidential computing.
| Aspect | TrustZone | SGX (enclave) | SEV/TDX (VM-based confidential computing) |
|---|---|---|---|
| Isolation unit | The whole processor is split into a secure world and a normal world; a small trusted OS and trusted applications run in the secure world | A part of an application that handles secrets (the enclave) | An entire virtual machine |
| Protects against | The OS and applications in the normal world; even if that kernel is compromised, secure-world memory cannot be read | The OS, the hypervisor, other applications, and attackers who physically read main memory | The hypervisor, the cloud provider's administrators, other VMs, and attackers who physically read main memory |
| Trusted computing base (TCB) | The CPU hardware, the secure monitor that switches worlds, and the trusted OS and applications in the secure world | The CPU hardware and firmware plus the enclave's own code; the OS is not included | The CPU hardware and firmware (such as AMD's secure processor or Intel's TDX module) plus everything inside the VM, including the guest OS; the hypervisor is not included |
| Memory encryption | Not part of the basic mechanism; a bus signal marks accesses as secure or not, and the accesses themselves are blocked | Enclave pages are kept encrypted in main memory outside the CPU; some implementations also detect tampering | The entire VM memory is encrypted with a per-VM key managed only inside the CPU; SEV-SNP and TDX add integrity protection that stops the hypervisor from rewriting or remapping memory |
| Attestation | No common architectural scheme; built by combining the SoC's secure boot and key mechanisms | The enclave's launch measurement is signed with a key inside the CPU; users check the report before handing over secret data | The CPU measures the VM's initial state and issues a report signed with a key inside the CPU; users check it before releasing the key that decrypts their data |
| Typical use | Biometric matching, payment credentials, DRM key storage and verification during secure boot on smartphones and embedded devices | Protecting only part of a server workload, such as key management or processing of sensitive data | Confidential VMs in the cloud, running existing applications while protecting them even from the provider |
| Porting effort | Code must be written as secure-world applications with a narrow interface to the normal world | Large: the application is split into parts inside and outside the enclave, and system calls, file and network I/O are left to code outside | Small: with a supported guest OS, existing operating systems and applications run almost unchanged |
| Known attack classes | Because cores, caches and power are shared, research has demonstrated cache side-channel attacks and fault injection through voltage or clock glitches; flaws in the trusted OS and applications are also targeted | Research has reported secrets leaking through side-channel attacks using cache timing, page-fault patterns and speculative execution | Research has reported attacks in which a malicious hypervisor manipulates the VM interface, such as memory mappings and interrupts, as well as side-channel attacks; integrity protection was added to counter such attacks |
| Availability | Widely used in Arm application processors, with a lightweight version in Armv8-M microcontrollers; Armv9-A also defines Arm CCA (Realms) for VM-level isolation | As of the early 2020s, Intel no longer offers SGX on client CPUs and provides it mainly on server CPUs | SEV is a feature of AMD server CPUs and TDX of Intel server CPUs; as of the mid-2020s, major clouds offer them as confidential VMs |
Figures are typical orders of magnitude and vary by process generation and product.