When software runs on someone else’s computer, sensitive data may need protection from the surrounding system. A trusted execution environment (TEE) is a processor-supported, isolated environment for running user code. Hardware separates its secure world from the normal, or rich, execution environment, helping resist software attacks. section 13.2.5
A TEE typically works through several coordinated pieces:
- The processor extends its instruction set so programs can execute inside the TEE. section 13.2.5
- A normal operating system and a secure operating system run simultaneously, with separate registers. section 13.2.5
- CPU-enforced logic prevents the normal world from accessing secure-world data, including memory reserved for the TEE. section 13.2.5
- Unlike a standalone secure element, a TEE is programmable and integrated into the main processor, making it faster and cheaper in many systems. section 13.3
Cloud-hosted sensitive processing
A cloud service may process data on infrastructure owned by another organization. A TEE provides a separate execution area for code and data, reducing exposure to software attacks from the surrounding system. Intel SGX and ARM TrustZone are well-known examples. section 13.2.5 section 13.3
A TEE raises the cost of attack rather than making a system invulnerable. Hardware attacks and side channels can still leak information, so secure designs combine hardware and software mitigations and avoid treating one compromised device as a compromise of every device. section 13.3 section 13.5
Figure 13.4 The different hardware solutions you learned in this chapter and an idea of what they look like.
Compare TEEs with secure elements, HSMs, TPMs, and other hardware security solutions by form factor, speed, programmability, and security claims. section 13.3


