← back to crypto

Trusted Execution Environments

Wikipedia (CC BY-SA 4.0) ยท wpTrusted execution environment

A trusted execution environment (TEE) is an enclave: attestation + encryption + memory isolation. The operator runs the server but cannot read the enclave's memory. The user verifies what code runs (attestation), then sends encrypted data that only the enclave can decrypt. The result: computation on private data without trusting the operator.

Server (operator controls) Enclave isolated memory encrypted at rest attested code application logic User encrypted channel Operator: can run server, cannot read enclave memory 1. verify attestation 2. send encrypted data

The three ingredients

A TEE combines three mechanisms. Attestation (Ch.11): the user verifies what code is running. Encryption: data sent to the enclave is encrypted with a key only the enclave holds. Memory isolation: the hardware prevents the OS, hypervisor, and operator from reading the enclave's memory, even with root access.

Scheme

Real implementations

Platform Vendor Isolation mechanism
Intel SGXIntelCPU-level enclaves in user process
ARM TrustZoneARMSecure world / normal world split
AMD SEVAMDEncrypted VM memory, per-VM keys
AWS Nitro EnclavesAWSIsolated VM with no persistent storage, no network
Scheme

Application: the honest auction

Consider an ad auction server. Advertisers submit bids, and the server runs a wpVCG auction (second-price). Without a TEE, the operator could peek at bids, favor certain advertisers, or lie about the winning price.

With a TEE, the auction code runs in an enclave. Advertisers verify the code via attestation, then send encrypted bids. The enclave computes the winner and price. The operator never sees the bids or the auction logic's internal state.

Scheme

This is the architecture behind the jkVector Space privacy-preserving ad auction. The enclave implementation is at ghvectorspace-enclave.

Neighbors

This series

Foundations (Wikipedia)