How a TEE proof is made, in 3D

A security design that only its authors can explain is a design you have to take on faith. I don't like asking people for faith.
So I built a model of ours, one you can turn over in your hands.
It's a narrated 3D model of how a Reclaim proof is made, from the moment your phone asks for a pair of enclaves to the moment a signed claim lands back on it. Press play and it runs for about four minutes. Or take it slowly: step with the arrow keys, drag to orbit, scroll to zoom. Every wire is colored by what's on it, so you can watch ciphertext, keystream and signatures cross between the parties, and see which wires stay dark.
The dark wires matter most. A privacy design should be judged by what never travels.

One line of a web page
The walkthrough follows a single example. Your phone opens a university portal, and you want to prove one line of what it sends back:
gpa: 9.2 / 10
Only that line. Not your name, not your other grades, and certainly not the session cookie that got you in.
Six parties take part:
- Your phone, the client. It's the only party that talks to the website, and the only place the full response ever exists in the clear.
- A router, which hands out pairs of enclaves.
- TEE_K, a hardware enclave on Google Cloud. It holds the TLS keys.
- TEE_A, a hardware enclave on AWS. It checks the response is genuine.
- The website, over ordinary HTTPS.
- The attestor, which checks everyone's work and signs the result.
Keep an eye on TEE_K and TEE_A. They're the heart of it.
First, prove you're real
Nothing happens until your phone knows exactly what it's talking to.
The router only hands out enclave pairs it has already vetted: hardware attestation verified, code on an allowlist, base image pinned. If any check fails, the pair is never used.
Then your phone checks for itself. It connects to both enclaves over RA-TLS, where each enclave's certificate carries its own hardware attestation. That attestation is bound to the certificate's public key, so it can't be lifted onto an impostor, and it's verified inside the TLS handshake, before a single byte of the protocol moves. The two enclaves check each other the same way.
Why believe the attestation? The walkthrough answers by stacking the evidence one plate at a time:
- AMD's silicon keys (ARK → ASK → VCEK)
- a report signed by the CPU itself
- a vTPM quote rooted in Google or AWS
- the pinned base image
- the published application bundle
- the enclave's own signing key, sealed inside the report
The trust chain runs all the way down to the chip. And because the two enclaves live on two different clouds, no single cloud operator ever holds both of them.
One key, pried in two
Here's the idea the rest of the design hangs on.
In modern TLS, a single key does two jobs. It encrypts the data, and it proves the data hasn't been tampered with. We call our trick Split-AEAD: we pull those two jobs apart and give them to different machines.
TEE_K holds the key. It's created there and never leaves. TEE_A receives only the small derived values it needs to check authentication tags. It can confirm the website's response is real, but it can't read a byte of it.
Neither half is useful on its own. To read your data, an attacker would have to break both enclaves, on both clouds, within the same TLS session.
There's one more thing I like about the shape of this. No enclave ever connects to the website. Your phone opens the connection and blindly relays TLS records, while TEE_K acts as the real TLS endpoint behind it. Each session makes exactly one request. Secrets in that request, like your cookie, are blanked out before TEE_K ever sees it; TEE_A patches them back in while they're still encrypted. Neither enclave sees them in the clear.
When the response arrives, it splits:
- The ciphertext and tags go to TEE_A, which verifies every tag.
- TEE_K never receives a byte of the response. It sends the keystream to your phone, and your phone decrypts locally.
So the only place your grades exist in readable form is the device in your hand.
Destroy everything you didn't choose

This is my favorite scene.
The provider's rules (an XPath, a JSONPath, a regex) resolve into exact byte ranges: reveal these, hide the rest. Then TEE_K edits the keystream the way CRISPR edits genes. Every byte outside the ranges you chose is destroyed before anything is signed. What survives can decrypt your chosen bytes and nothing else, ever.

When the attestor later puts the pieces back together, this is the whole of what it sees:
✱✱✱✱✱✱ gpa: 9.2 / 10 ✱✱✱✱✱
Sometimes an app needs to know it's seen the same person before, without learning who they are. For those cases the two enclaves run a joint circuit, an OPRF computed with MPC, that turns a value like a name into a fingerprint. Both enclaves get the same fingerprint, and neither ever sees the name. This only runs when a provider asks for it. The fingerprint is deterministic on purpose, since the same value has to produce the same fingerprint for it to be useful.
The gauntlet

Each enclave signs its half: TEE_K the redacted keystream, TEE_A the ciphertext. Your phone carries both to the attestor. The enclaves never talk to the attestor directly.

Then the attestor runs every check, in order:
- Both signed halves are present.
- The attestations chain back to AMD and the cloud roots.
- The base image is allowlisted and the app bundle is published.
- The enclave signatures match the attested keys.
- Timestamps are fresh, and both halves belong to the same session.
- Both enclaves agree on the blinded hashes.
- Keystream ⊕ ciphertext recovers the revealed bytes.
- The claimed facts match those bytes.
- Only then, it signs.
Notice what it doesn't redo: TLS and the tag checks. The enclaves already signed those facts, and their word is backed by the hardware.
What comes out is a small, portable, signed fact that anyone can check.
What never happened
The walkthrough ends with a list of things that didn't occur. I think it's the most important screen in the model:
- The plaintext never left your phone.
- No enclave touched the website or the attestor.
- TEE_K never saw the response.
- TEE_A never saw the keys.
Where the picture stops
A model is a simplification, and I'd rather tell you where this one simplifies than have you find out later.
- The university portal, the name and the grade are illustrative. There's no real provider behind them.
- The walkthrough shows the Split-AEAD path used with modern TLS ciphers. The repository also handles compatibility paths and configurations the model doesn't draw.
Go break it
The walkthrough is a single HTML file. It works offline, and it's open source, like everything it describes. It lives in the visualization folder of reclaim-tee, next to the enclave code and the formal model of the Split-AEAD design.
If you think the picture is wrong, or the protocol is, open an issue. I'd much rather fix a diagram than defend one.