> SGX inverted the trust model. For the first time an ordinary application could protect itself from the operating system, the hypervisor and the administrator of the machine it was running on. The idea was radical, and so were the attacks it invited.
The enclave model
> Intel described Software Guard Extensions in papers presented in 2013 and shipped them with the Skylake generation in 2015. An enclave is a region of an application's address space whose pages live in an encrypted, integrity-protected Enclave Page Cache. The CPU refuses access to those pages from any code outside the enclave, including the kernel. The enclave's identity is its measurement, MRENCLAVE, computed as it is built, and its author's identity, MRSIGNER, taken from the signing key.
> Two capabilities followed directly. Sealing let an enclave encrypt data to its own identity so that only the same enclave, on the same CPU, could unseal it later. Remote attestation let an enclave prove its measurement to a remote party, at first through a vendor-operated attestation service and later through Data Center Attestation Primitives that allowed operators to run their own verification infrastructure.
Attacks as a driving force
> Because SGX removed the operating system from the trusted base, it also handed the operating system to the attacker. Controlled-channel attacks showed that a malicious OS could infer enclave secrets from page faults. Cache timing attacks followed. In 2018 Foreshadow, a transient-execution attack in the same family as Meltdown and Spectre, extracted sealing and attestation keys. Later work such as Plundervolt in 2019 manipulated voltage to induce faults inside enclaves.
> Dr. Martin Mackinnon's time series shows the rhythm: disclosure, microcode update, a bump in the security version number recorded in attestation, and a period during which verifiers had to decide whether to accept older platforms. The trusted computing base recovery mechanism is one of SGX's lasting contributions. It made revocation of a whole hardware generation's trust a routine, if painful, operation.
Retreat and legacy
> Intel removed SGX from its 11th and 12th generation client processors, while server parts from the Ice Lake generation in 2021 kept it with much larger enclave memory. The enclave model survived in the cloud, in key management and in privacy-preserving analytics, but the dream of every laptop running enclaves for every application faded.
> Its legacy is conceptual. Every later system inherited the vocabulary SGX popularised: measurement, sealing, quote, trusted computing base, side channel. The confidential virtual machines that followed chose a larger unit of isolation partly because partitioning applications into enclaves had proved hard for developers.
- Intel SGX
- Data Center Attestation Primitives
- TCB recovery
- Sealing
- Encrypting data so that it can only be decrypted by the same code identity on the same platform, or when the platform is in a stated configuration.
- Enclave
- A protected region of an application's memory, introduced at scale by Intel SGX, inaccessible to the operating system and hypervisor.
- Side channel
- Information leaked through timing, power, electromagnetic emission, cache state or faults rather than through intended interfaces.