liveBook · Manning

Trusted execution environment

As explained in Real-World Cryptography

A trusted execution environment is an isolated programmable execution environment implemented with processor-supported mechanisms to resist software attacks.

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

How Real-World Cryptography covers it

How deep it goes
Explains processor integration, secure and normal worlds, memory separation, examples, and limitations without detailing vendor implementations.
Examples
Uses cloud-hosted data processing, Intel SGX, ARM TrustZone, and processor-reserved memory as concrete examples.
What it assumes
Assumes basic familiarity with processors and operating systems while introducing secure-world isolation and hardware security comparisons.
What you can do after
Evaluate/understand when a programmable CPU-integrated security environment fits better than a secure element, HSM, or TPM.
How it connects
Connects trusted execution environments with secure elements, HSMs, TPMs, secure operating systems, cloud computing, and side-channel attacks.

Also explained in

Compare how 3 books explain trusted execution environment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.