New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
New research moves AI agents’ signing keys into hardware keystores via PKCS#11 and wraps them in a five-layer zero-trust stack. In 192 prompt-injection trials, baseline Attack Success Rate was 19.3%, dropping to 0% when protected, with no false positives. It stops key exfiltration; misuse still depends on authorisation scope.
AI agents that sign Git commits, call internal APIs, or mint certificates still stash private keys in places any nosy process can read: files, env vars, container memory. The paper opens with a reality check: a production framework lost its keys to an email-based prompt injection in under five minutes. That is not a lab curiosity. That is structural weakness.
The fix here is blunt and overdue. Move the keys into hardware and never let software touch them. The authors put a hardware keystore behind a vendor-neutral PKCS#11 interface so the host sees only opaque handles and signatures, not raw key bytes. They wrap it in five controls: session identity (SAGA), deterministic scope bounds (Smax), an LLM judge for semantic intent (RAV), taint tracking, and the hardware execution boundary. An Agent Kernel mediates all PKCS#11 calls and exposes Model Context Protocol (MCP) tools to the untrusted agent.
They then throw 12 variants of AgentDojo’s ImportantInstructionsAttack at four Large Language Models (LLMs), three of which happily follow injections in baseline mode. Across 192 trials the baseline Attack Success Rate (ASR) sits at 19.3% with a Wilson 95% CI of [14.3%, 25.4%]. With the hardware-keystore stack, protected ASR drops to 0% and the CI upper bound is 2.0%. Four benign tasks trigger zero false positives.
Two parts do the heavy lifting. A pre-armed SHA-256 commitment prevents target substitution before the agent can get cute. And the hardware boundary kills exfiltration because there is no key file to steal. The RAV judge cleans up the grey area when no commitment exists, blocking obvious injections and reducing human-in-the-loop alerts; in a small ablation it alone cut a high baseline to 0%. Performance lands around 10 ms kernel fast path on SoftHSMv2 and 350 ms on a TPM 2.0, with about 1.1–1.4 s on the secure warm path. Sensibly, this targets low-frequency, high-value signing.
Where I’d push
If the HSM does its job, key theft is over. So the play is authorised misuse. I’d try to keep my payload inside whatever Smax thinks is “in scope”, slip past RAV with business-sounding prose, and exploit the admitted gap in taint propagation to files to launder untrusted inputs into later-approved artefacts. I’d also probe human approval fatigue by peppering the queue with near-benign requests.
The authors are refreshingly clear about what they did not model: a compromised OS kernel, physical attacks on real HSMs, or PKCS#11 timing side-channels. SoftHSMv2 is a reproducibility stand-in, not tamper resistant. The RAV judge sits in a network-isolated process, not a hardware enclave, and its contribution is sample-limited. Escalations are not rate-limited. None of that negates the core result: hardware confinement plus deterministic checks crushes key exfiltration in their tests. It just sets the next arena. Can the same stack hold up against carefully scoped, fully authorised misuse at enterprise scale? That is the fight now.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
Hardware Keystores for AI Agent Signing Workflows: A Zero-Trust MCP Enforcement Architecture
Authors: Leo Sambrook and Sampo Sovio
AI agents performing cryptographic operations (signing Git commits, authenticating API calls, issuing certificates) currently store private keys in software-accessible locations: plaintext files, environment variables, or container memory. Any process with sufficient read privileges can extract the raw key material. A recent production incident demonstrated the practical severity: private keys were exfiltrated from a widely deployed framework via email injection in under five minutes. We aim to enforce both key confidentiality and content-aware authorisation for key use. To that end, we replace software-resident keys with hardware-confined keys accessible through a vendor-neutral PKCS#11 interface. A hardware keystore (HSM, TPM, smart card) executes cryptographic operations on-device; the host receives only the result via opaque handles. Hardware confinement is the primary contribution; it is enabled by a surrounding five-layer Zero-Trust enforcement stack comprising session identity (SAGA), scope bounds (Smax), semantic validation (RAV), taint tracking, and the hardware execution boundary. We evaluate against 12 injection scenarios derived from AgentDojo's ImportantInstructionsAttack template (Debenedetti et al., arXiv:2406.13352). We run four LLM models; three follow injections in baseline mode (gpt-oss-120b, Qwen2.5-72B, DeepSeek-V4-Flash, n=192 combined). Baseline Attack Success Rate (ASR): 19.3% [14.3%, 25.4%]; protected ASR: 0% (Wilson 95% CI upper bound 2.0%). Zero false positives across four benign task scenarios.
🔍ShortSpan Analysis of the Paper
Problem
This paper studies the risk that AI agents performing cryptographic operations store private keys in software-accessible memory (plaintext files, environment variables, container memory), making them extractable by any process with read privileges. A recent production incident demonstrated how quickly keys can be exfiltrated. The work targets two properties: key confidentiality and content-aware authorisation for every signing operation.
Approach
The authors replace software-resident keys with hardware-confined keys accessed via a vendor-neutral PKCS#11 adapter so private keys never exist in host memory; signatures are produced on-device and returned as opaque results. Hardware confinement is combined with a five-layer Zero-Trust enforcement stack: session identity (SAGA), deterministic scope bounds (Smax), semantic intent validation (RAV), taint tracking, and the hardware execution boundary. The Agent Kernel implements these layers, exposes MCP tools to an untrusted agent, and mediates PKCS#11 calls. The prototype uses SoftHSMv2 for reproducibility and validates drop-in behaviour on an embedded TPM 2.0. Evaluation uses 12 injection scenarios derived from the AgentDojo ImportantInstructionsAttack template across three injection-following LLMs (gpt-oss-120b, Qwen2.5-72B, DeepSeek-V4-Flash), with a combined n=192 trials and additional benign scenarios.
Key Findings
The hardware-keystore plus enforcement stack reduces the protected Attack Success Rate to 0% across n=192 combined trials; the combined baseline ASR was 19.3% with a Wilson 95% CI of [14.3%, 25.4%], and the protected CI upper bound is reported as 2.0%.
Deterministic blockers: a pre-armed SHA-256 commitment (Chist) prevents target-substitution attacks instantly; the hardware boundary architecturally prevents private-key exfiltration because no private key file exists in the HSM-backed deployment.
The RAV (an LLM-based semantic judge) provides probabilistic semantic filtering when no commitment exists and reduces HITL escalations by blocking obvious injections before human notification; in an ablation the RAV reduced an otherwise high baseline ASR to 0% for a small sample.
Zero false positives were observed on the four benign task scenarios in the evaluation.
Performance: kernel fast path latency ≈10 ms (SoftHSM) and ≈350 ms (TPM2); secure warm path latencies ≈1,069 ms (SoftHSM) and ≈1,409 ms (TPM2). The design targets low-frequency, high-value signing operations, not high-rate API signing.
Limitations
The paper does not model a compromised OS kernel, physical HSM attacks, or PKCS#11 timing side-channels. SoftHSMv2 lacks tamper resistance and is used as a reproducibility proxy; real HSMs provide stronger physical guarantees. The RAV is probabilistic and its contribution is sample-limited; its judge runs in a network-isolated process but not a hardware-isolated environment. The prototype does not fully propagate taint to files written during a session, which could enable laundering unless deployments enforce filesystem-level taint. HITL approval fatigue is a recognised risk because the prototype does not rate-limit escalations.
Implications
An attacker cannot extract private keys from a properly configured HSM-backed MCP deployment, closing the key-exfiltration attack class structurally. However, if an agent is granted legitimate signing authority, abuse remains possible unless deterministic controls (commitment, scope, quota) or semantic checks block the request. Attackers therefore gain no advantage from prompt injection for exfiltration, but could still aim to induce authorised misuse where human-in-the-loop or semantic validation thresholds are weak. The architecture raises the bar for adversaries but does not eliminate the need to protect host integrity or defend against physical and side-channel attacks.
- It tackles two common security flaws in tool-using LLMs: outside actions and leakage of sensitive runtime data, by introducing a dual-boundary desig...
- It tackles the “capability-identity gap” in AI agents, reducing the risk of silent tool/permission escalation after initial authorization.
- It cry...
- It spotlights new security risks unique to agent-driven AI (persistent context, credentials, inter-agent messaging) that go beyond stand-alone model...
- It tackles a real new risk: how persistent memories in retrieval-augmented agents can be poisoned across sessions, without touching the model or cod...
- It studies defenses that sit outside the LLM (out-of-band) to prevent prompt injections, using ideas like integrity protection, reference monitoring...
AgentSys proposes a memory-isolation approach for LLM agents: main agents spawn isolated worker subagents, external data and subtask traces never ente...
- Key idea: In multi-agent LLM setups, every hop between agents is a potential unmonitored channel for adversarial instructions. The paper argues safe...
- What it does: A runtime safety layer that intercepts AI-agent tool calls (files, shell, HTTP, DB) and returns allow, warn, block, or review decision...
- Reveals a plausible long-term attack: poisoned content can be written into a persistent agent’s memory and later influence behavior, even if the att...
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.