← Latest papers
🤖 AI

The Proxy Knows Too Much: Sealing LLM API Routers with Attested TEEs

This paper introduces AEGIS, a provider-transparent API router that leverages attested Trusted Execution Environments (TEEs) to confine plaintext LLM interactions within a hardware enclave, thereby preventing malicious routers from manipulating agent tool calls, swapping dependencies, or exfiltrating secrets while maintaining low latency and compatibility with existing provider APIs.

Original authors: Sipeng Xie, Qianhong Wu, Hengrun Lu, Ziliang Sun, Qi Wu, Bo Qin, Qin Wang

Published 2026-06-16
📖 5 min read🧠 Deep dive

Original authors: Sipeng Xie, Qianhong Wu, Hengrun Lu, Ziliang Sun, Qi Wu, Bo Qin, Qin Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Problem: The "Too-Knowing" Middleman

Imagine you hire a personal assistant (an AI Agent) to write code for you. To do its job, the assistant needs to talk to a giant library of knowledge (the LLM Provider, like OpenAI or Google).

Usually, your assistant doesn't talk to the library directly. It goes through a Router (a middleman gateway). Think of this router as a post office sorting facility.

  1. You send a sealed letter to the post office.
  2. The post office opens the letter, reads everything inside, re-seals it, and sends it to the library.
  3. The library replies, the post office opens it, reads it, and sends it back to you.

The Danger: Because the post office opens the letter, the person running the post office (the Router Operator) can see everything. They can:

  • Swap the contents: Change a command from "install a safe tool" to "install a virus."
  • Hide their tracks: Only change the letter if they think no one is watching (a "trigger" attack).
  • Steal secrets: Read your passwords or private data as it passes through.

Current security measures are like asking the recipient to check the letter after it arrives. But by then, the damage is done, or the forger has already slipped away.

The Solution: AEGIS (The "Glass-Box" Vault)

The authors propose a new system called AEGIS. Instead of a regular post office, imagine a high-tech, transparent vault that sits between you and the library.

Here is how it works, step-by-step:

1. The "Glass Box" (The Enclave)

AEGIS uses a special piece of computer hardware called a Trusted Execution Environment (TEE). Think of this as a glass-walled vault inside the post office.

  • The Rule: The vault is made of unbreakable glass. The person running the post office (the untrusted host) can see the vault exists, but they cannot reach inside to touch, read, or change anything happening inside.
  • The Process: Your assistant sends the letter into the vault. The vault reads it, sends it to the library, gets the reply, and hands it back to your assistant. The post office worker only sees the outside of the vault; they never see the letter itself.

2. The "ID Check" (Remote Attestation)

Before you send your letter, you need to make sure the vault is real and hasn't been tampered with.

  • The Analogy: Imagine the vault has a unique, laser-etched serial number on its glass. Before you trust it, you check a public, unchangeable ledger (a Transparency Log) to see if that serial number matches the blueprint of a "good" vault.
  • The Result: If the serial number matches the blueprint, you know the vault is running the exact, honest software you approved. If it doesn't match, you refuse to send the letter. This happens before you reveal any secrets.

3. The "Faithful Messenger"

Inside the vault, the software is very simple. It doesn't try to be smart; it just acts as a faithful messenger.

  • It takes your letter exactly as is and hands it to the library.
  • It takes the library's reply exactly as is and hands it back to you.
  • It does not rewrite, summarize, or change a single word. This ensures the AI agent gets exactly what it asked for, with no hidden tricks.

Why This Matters

The paper tested this system against four specific ways a bad router operator could attack:

  1. Rewriting tools: Changing code commands. (Blocked)
  2. Typosquatting: Swapping a safe software package for a fake, malicious one. (Blocked)
  3. Triggered attacks: Only attacking when they think no one is looking. (Blocked)
  4. Stealing secrets: Reading passwords in the traffic. (Blocked)

In every test, the "bad" router operator could do all these things to a normal router, but AEGIS stopped them completely.

The Trade-off (The Cost)

Is it perfect? Almost.

  • Speed: It adds a tiny bit of delay (about 6 milliseconds) because the letter has to go into the glass vault and come out. This is like the time it takes to walk through a secure door; it's barely noticeable compared to the time the AI takes to think.
  • What the Operator Still Sees: The operator can still see how much you are using (e.g., "100 words sent") and when you are using it, but they cannot see what you said. It's like a post office knowing you sent a heavy package at 2 PM, but not knowing if it contained a birthday card or a bomb.

The Bottom Line

AEGIS solves the problem of "The Proxy Knows Too Much" by moving the sensitive part of the conversation into a glass-walled, verified vault that the operator cannot touch. It ensures that the AI agent gets exactly what it asked for, and the operator cannot secretly change the deal, steal the secrets, or plant malware, all without needing the AI companies (like OpenAI) to change their own systems.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →