<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged tpm</title>
<link>https://coderlegion.com/tag/tpm</link>
<description>Powered by Question2Answer</description>
<item>
<title>The Hardware Mutex: Binding LLM Context to a TPM Root of Trust</title>
<link>https://coderlegion.com/11007/the-hardware-mutex-binding-llm-context-to-a-tpm-root-of-trust</link>
<description>&lt;p&gt;&lt;strong&gt;The Vulnerability:&lt;/strong&gt; &lt;code&gt;cat /proc/$PID/mem&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We need to stop pretending that API Keys are &quot;Identity.&quot;&lt;/p&gt;
&lt;p&gt;If you are building an Autonomous Agent today, you are likely storing its credentials (OAuth tokens, PEM keys) in memory. This works fine for a stateless chatbot. It is catastrophic for an Agent authorized to move money.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Attack Vector is trivial:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;An attacker gains root access (or compromised container privileges).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They run a memory dump (&lt;code&gt;gcore&lt;/code&gt; or just reading &lt;code&gt;/proc/mem&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They &lt;code&gt;grep&lt;/code&gt; for the &lt;code&gt;Bearer&lt;/code&gt; token.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They clone the Agent’s identity and empty the wallet.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Software permissions (RBAC) cannot solve this because Root is God. If the operating system trusts the Admin, the Admin can impersonate the Agent.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Fix: The Hardware Mutex&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To secure high-stakes Agents, we must move from &lt;strong&gt;Software Identity&lt;/strong&gt; (which can be copied) to &lt;strong&gt;Hardware Identity&lt;/strong&gt; (which must be proved).&lt;/p&gt;
&lt;p&gt;I’ve released a reference architecture called &lt;strong&gt;The Citadel Protocol&lt;/strong&gt; that defines how to implement this using a &lt;strong&gt;Hardware Mutex&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Here are the mechanics of the stack:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Enclave (The Body)&lt;/strong&gt;&lt;br&gt;
The Agent does not run in a standard Docker container. It runs inside a &lt;strong&gt;TEE (Trusted Execution Environment)&lt;/strong&gt; — like AWS Nitro Enclaves or Intel SGX.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The Physics:&lt;/strong&gt; The memory space is encrypted at the hardware level. Even the Hypervisor (AWS/Azure) cannot read the RAM.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Attestation (The Heartbeat)&lt;/strong&gt;&lt;br&gt;
Instead of a static API Key, the Agent authenticates using Remote Attestation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Boot:&lt;/strong&gt; On startup, the TPM measures the hash of the kernel and the application code into a Platform Configuration Register (&lt;strong&gt;PCR0&lt;/strong&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Quote:&lt;/strong&gt; When the Agent wants to &quot;act&quot; (e.g., call an API), it asks the TPM to sign a &quot;Quote&quot; containing the PCR values.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Verify:&lt;/strong&gt; The upstream service verifies the Quote. If the code has been altered (even by one byte), the hash changes, the signature fails, and the connection is dropped.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Witness (The Ledger)&lt;/strong&gt;&lt;br&gt;
We stop logging to text files (which can be &lt;code&gt;rm -rf&lt;/code&gt;'d). We log to a &lt;strong&gt;Merkle Tree&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every action the Agent takes is hashed and appended to a write-only chain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The head of the chain is anchored externally.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This makes the execution history mathematically impossible to alter&lt;br&gt;
without breaking the chain.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The Spec&lt;/strong&gt;&lt;br&gt;
We are entering the era where &quot;Code&quot; is no longer enough. We need &quot;Code + Physics.&quot;&lt;/p&gt;
&lt;p&gt;I have open-sourced the full architectural specification for this topology. It covers the specific PCR measurements, the Witness schemas, and the &quot;Terminal Refusal&quot; logic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the full Citadel Protocol Specification (Zenodo): &lt;a rel=&quot;nofollow&quot; href=&quot;https://zenodo.org/records/18472859&quot;&gt;https://zenodo.org/records/18472859&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11007/the-hardware-mutex-binding-llm-context-to-a-tpm-root-of-trust</guid>
<pubDate>Tue, 03 Feb 2026 20:43:43 +0000</pubDate>
</item>
</channel>
</rss>