AEX: Non-Intrusive Multi-Hop Attestation and Provenance for LLM APIs
Organizations: Zhejiang University of Technology
Abstract
Hosted large language models are increasingly accessed through remote APIs, but the API boundary still offers little direct evidence that a returned output actually corresponds to the client-visible request. Recent audits of shadow APIs show that unofficial or intermediary endpoints can diverge from claimed behavior, while existing approaches such as fingerprinting, model-equality testing, verifiable inference, and TEE attestation either remain inferential or answer different questions. We propose AEX, a non-intrusive attestation extension for existing JSON-based LLM APIs. AEX preserves request, response, tool-calling, streaming, and error semantics, and instead adds a signed top-level attestation object that binds a client-visible request projection to either a complete response object or a committed streaming output. To support realistic deployments, AEX provides explicit request-binding modes, signed request-transform receipts for trusted intermediaries, and source-output / output-transform receipts for trusted output rewriting. For streaming, it separates checkpoint proofs for verified prefixes of an unmodified source stream from complete-output lineage for outputs that have been rewritten, buffered, aggregated, or re-packaged, preventing transformed outputs from being mistaken for source-stream prefixes. AEX therefore makes a deliberately narrow claim: a trusted issuer attests to a specific request-output relation, or to a specific complete-output lineage, at the API boundary. We present the protocol design, threat model, verification state machine, security and privacy analysis, an OpenAI-compatible chat-completions profile, and a reference TypeScript prototype with local conformance tests and microbenchmarks.
Figures & tables
| Mechanism | Main object | Online API transaction binding | Streaming chunk semantics | Primary question answered |
|---|---|---|---|---|
| HTTP Message Signatures [ 13 ] | HTTP components | Partial, generic | No LLM-specific chunk model | Which HTTP components were signed, despite safe transformation? |
| C2PA [ 19 ] | Media assets | No | No | What is the provenance history of this media asset? |
| in-toto / DSSE [ 20 , 21 ] | Supply-chain metadata | Not transaction-oriented | No | What signed steps and artifacts formed a software supply chain? |
| LLMmap / MET [ 2 , 3 ] | Output behavior | Inferential only | Indirect | Which model or distribution does this endpoint appear to serve? |
| SVIP [ 4 ] | Model internals + outputs | Yes, but intrusive | Not targeted at API chunk streams | Did the provider likely use the requested open-source model? |
| TEE attestation / RA-WEBs / AttestLLM [ 7 , 6 , 5 ] | Execution environment | Indirect unless coupled with app semantics | No LLM-API semantics by default | What measured code/environment is running? |
| Layer | Count | Main coverage |
|---|---|---|
| Unit tests | 29 | Core request binding, attestation issuance/verification, output-lineage receipts, stream verification, and JWKS behavior |
| Integration tests | 25 | End-to-end gateway/proxy/provider flows, request/output transform chains, lineage scenarios, and negative-path verification states |
| Browser end-to-end tests | 6 | Public /v1/* API wiring, stream progress, diagnostics, and proxy configuration workflows |
| Scenario | Runs | Median client completion (ms) | Median first stream chunk (ms) | Median gateway verification (ms) |
|---|---|---|---|---|
| Non-stream success | 20/20 verified | 2.287 | — | 0.495 |
| Stream success (checkpoint) | 20/20 verified | 243.371 | 1.736 | 0.843 |
| Transform-chain success | 20/20 verified | 2.609 | — | 0.952 |
| Non-stream lineage success | 20/20 verified | 2.225 | — | 0.710 |
| Stream lineage success | 20/20 verified | 243.028 | 1.666 | 1.491 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| AEX can prove | AEX does not prove |
|---|---|
| A trusted issuer signed a particular request-output relation. | The response is factually true. |
| A streamed output was received in the committed order and count, subject to the terminal proof mode that was actually used. | The provider used a specific internal model weight snapshot. |
| A request was transformed through a chain of explicitly signed, trusted transforms. | No hidden prompts, private retrieval, or server-side policy text existed. |
| A final complete output descended from a source issuer’s complete output through an explicitly signed chain of trusted output transforms. | Every hidden intermediate output in that lineage is visible to the client. |
| A non-streaming or streaming response is inconsistent with the attested commitments if tampered with. | An accepted output transform is semantically correct, reasonable, or minimal absent external policy. |
Remote Attestation
Remote attestation uses cryptographic evidence to let a verifier check the hardware and software state of a remote system.
See all 10 papers