---
title: "aadhar.sh/lwe/tee · Trusted Execution Environments"
description: "Trusted Execution Environments at the pace of a 2009 MSN chat: the secret room in the chip and the side channels that leak it, from an Archetype essay."
path: "/lwe/tee"
section: "lwe"
kind: "content"
updated: "2026-06-21"
source: "https://aadhar.sh/lwe/tee"
---

> Site index: https://aadhar.sh/llms.txt
> Section index: https://aadhar.sh/lwe/llms.txt
> This is the Markdown twin of a page on aadhar.sh. The HTML at the source
> URL below is the original, and is hand-written and unminified on purpose.

# **TEEs**Online, Trusted Execution Environments

Learning With Errors  
a chat about PETs

**How to read this:** the **TEEs** teacher's messages are **verbatim** excerpts from ["Privacy 2.0"](https://www.archetype.fund/media/privacy-2-0-pets-and-the-promise-of-private-shared-state-i) by Aadharsh Pannirselvam. The learner's lines, the **AI-noted** side-channel taxonomy, and the demo are AI-generated. Scroll. ↓

**aadharsh**21:22

TEEs. the "secure enclave" thing in my phone? explain it MSN-style.

**TEEs**21:22

Trusted Execution Environments (TEEs) are secure sections of physical chips that use a static but unique "[root of trust][root-of-trust]" as a base secret to encrypt things. Apple has been using TEEs to locally verify and store biometrics and credit card information on their hardware since 2013's iPhone 5s and 2017's [T2][apple-t2] desktop enclave.

[from the article](https://www.archetype.fund/media/privacy-2-0-pets-and-the-promise-of-private-shared-state-i)

**aadharsh**21:23

so it's a secret room inside the chip. has anyone tried to break in?

**TEEs**21:23

This eventually gave way to Secret Network, a network that used a set of [SGX][intel-sgx] nodes for private transactions and [smart contracts][smart-contract]. Crucially, the SGX nodes held a "consensus seed" in their protected memory which functioned akin to a Secret Network-wide decryption key. In October of 2022, a group of researchers used a previously disclosed processor architecture [exploit][exploit] called Aepicleak to build a proof of concept attack in which malicious actors could emulate Secret Network nodes in software to ultimately extract the network's consensus seed from memory.

[from the article](https://www.archetype.fund/media/privacy-2-0-pets-and-the-promise-of-private-shared-state-i)

**aadharsh**21:24

wait, they pulled the master key *out of memory*? how do you even attack a sealed chip?

**TEEs**21:24

In many of these examples, researchers measured heat, [cache][cpu-cache] activity, power consumption, and other side effects of executing programs to infer and extract secrets from operational SGX units. Though it may seem easy to solely fault Intel, SGX isn't alone in being exploited via so-called "[side-channels][side-channel-attack]". Last year, a set of researchers similarly attacked AMD's [SEV][amd-sev] using malicious memory units and [firmware][firmware], while a security team focused on [jailbreaking][jailbreak] exploits found a physical exploit chain for Apple's hardware enclaves aboard their mobile chips.

[from the article](https://www.archetype.fund/media/privacy-2-0-pets-and-the-promise-of-private-shared-state-i)

**aadharsh**21:25

heat, cache, power... so the chip leaks the secret just by *running*? what are the actual flavors of side-channel? show me.

**TEEs**21:25

TEEs shared a demo: watch the enclave leak

A secret PIN lives inside the enclave, and you **can't read it directly**. But running it leaks physical side effects. Pick an attack and watch the secret fall out:

🔒 **SGX enclave**, root of trust sealed

• • • •

memory reads as encrypted ciphertext

no probe running, the enclave looks opaque.

**sidekick**21:27

AI · expanding the essay

the essay names the symptoms (heat, cache, power); here's the loose **taxonomy** of side-channels:

• **Timing**: secret-dependent branches take measurably different times.  
• **Cache**: what got cached vs evicted reveals which memory the secret touched (this family powers Spectre/Meltdown-style attacks and the Aepicleak-era tricks).  
• **Power**: the current draw traces the exact operations (classic on smartcards and SIMs).  
• **EM / thermal**: radiated emissions and heat leak the same thing, contactlessly.  
• **Fault injection**: glitch the voltage, clock, or memory (Rowhammer, AMD SEV's BadRAM) to make the chip mis-compute and spill secrets.

all of them read the *physics around* the computation and leave the math intact. that's why a sealed chip stays so hard to fully trust.

**TEEs**21:28

These attacks collectively speak to how complex TEEs are, as well as how difficult it can be to use TEEs as the sole layer of security for a network. Given the limited capacity to update a TEE's hardware and firmware, as well as its unique and immutable root of trust, fully trusting a closed source TEE implies trusting the TEE's firmware maintainers as well as manufacturers, who feasibly could have a log matching TEEs to their unique roots of trust. Further, fully trusting a network of closed source TEEs in operation implies fully trusting that the TEE isn't compromised and is operated by a non-malicious actor. As such, **the value for malicious actors to exploit a TEE must be lower than the cost to perform said exploit** at each of these layers.

[from the article](https://www.archetype.fund/media/privacy-2-0-pets-and-the-promise-of-private-shared-state-i)

**aadharsh**21:29

so the security really comes down to "attacking it costs more than the secret is worth," and you're trusting the manufacturer on top of that. got it, that's why people pair TEEs with [MPC][mpc]. thanks, TEEs.

→ [read the essay](https://www.archetype.fund/media/privacy-2-0-pets-and-the-promise-of-private-shared-state-i) · [← MPC](https://aadhar.sh/lwe/mpc) · [back to Learning With Errors](https://aadhar.sh/lwe) · [the crypto alternative (0xPARC)](https://aadhar.sh/lwe/pcrypto)

end of conversation

This is a recorded conversation. Run a side-channel above.

[root-of-trust]: https://csrc.nist.gov/glossary/term/roots_of_trust "The small piece of hardware or firmware, often holding a built-in secret key, that every other security check on a device ultimately relies on."
[apple-t2]: https://en.wikipedia.org/wiki/Apple_T2 "A security chip in Intel-based Macs from 2017 onward that stores encryption keys and Touch ID data and checks the startup software."
[intel-sgx]: https://en.wikipedia.org/wiki/Software_Guard_Extensions "Software Guard Extensions: Intel processor instructions that let a program create an enclave, a region of memory the rest of the system can't read."
[smart-contract]: https://en.wikipedia.org/wiki/Smart_contract "A program stored on a blockchain that runs automatically when called, moving funds or data by its own rules."
[exploit]: https://en.wikipedia.org/wiki/Exploit_(computer_security) "Code or a technique that uses a bug to make a system do something its makers never intended, like leak data or run an attacker's code."
[cpu-cache]: https://en.wikipedia.org/wiki/CPU_cache "A small, fast memory on the processor that keeps copies of recently used data so the chip doesn't have to wait on main memory."
[side-channel-attack]: https://en.wikipedia.org/wiki/Side-channel_attack "An attack that learns secrets by measuring a system's physical side effects while it runs, such as timing, power draw, heat or sound."
[amd-sev]: https://www.amd.com/en/developer/sev.html "Secure Encrypted Virtualization: an AMD processor feature that encrypts each virtual machine's memory with its own key, hiding it from the host."
[firmware]: https://en.wikipedia.org/wiki/Firmware "Low-level software stored on a device's chips that starts and controls the hardware, beneath the operating system."
[jailbreak]: https://en.wikipedia.org/wiki/IOS_jailbreaking "Removing the software limits Apple puts on its devices, usually through a security flaw, so the owner can run code Apple hasn't approved."
[mpc]: https://en.wikipedia.org/wiki/Secure_multi-party_computation "Secure multi-party computation: several parties jointly compute a result from their private inputs without any of them revealing its input to the others."

Source: https://aadhar.sh/lwe/tee
