A few notes on AWS Nitro Enclaves: KMS integration

Aug 5, 2026

AI summary AI-generated, may contain mistakes

This article, the third in a series on AWS Nitro Enclaves, explores the integration between Nitro Enclaves and AWS Key Management Service (KMS), explaining how attestation-based key policies and encrypted responses allow enclaves to securely offload key management. It catalogs passive and active attack classes against the enclave-KMS communication channel—including data swaps, CMK substitution, replay attacks, and man-in-the-middle attacks—offering checklists of mitigations such as hardcoding CMK ARNs, using encryption contexts, and employing enclave-initiated TLS with attested CAs. It also highlights operational risks that persist even with correct cryptography, such as IAM credential manipulation, timing side channels, and replay windows within attestation freshness limits.

Nitro Enclaves and Key Management Service (KMS) feel like a natural fit: since the KMS can verify attestation documents generated by the enclaves, developers can offload key management tasks from their applications to the AWS-managed service. But integrating an external service with your trusted enclaves comes with new threats, even if that service comes from the same provider.

In this blog post—the third in our series on Nitro Enclaves, following our posts on attack surface and images and attestation—we catalog passive and active attack classes against the enclave-KMS communication channel, and cover the operational risks that persist even when the cryptography is correct.

Intro to KMS

Keep reading

Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.

More from Trail of Bits Blog

After Binance, check what your signing systems can approve

AI summaryThe article examines Binance's October 2026 security incident, in which an attacker obtained valid signatures from the exchange's wallet-signing service via social engineering and stolen credentials, then used an EIP-7702 delegation to repeatedly drain funds without further signatures. It warns that many transaction monitoring and signing-policy systems fail to account for newer Ethereum execution paths such as EIP-7702 delegations, session keys, Safe modules, and ERC-4337 UserOperations, allowing malicious wallet-authority changes to go undetected. The author recommends four measures—reducing access to signing infrastructure, treating delegation as an administrative privilege, limiting damage even if signing is compromised, and detecting wallet-authority changes—each with verification tests to confirm the controls work.

The cryptography behind electronic voting (and why paper ballots are still essential)

AI summaryThe article explains why paper ballots remain essential for elections despite cryptographic advances, describing how systems like Helios and ElectionGuard use techniques such as homomorphic encryption, threshold key-sharing, and zero-knowledge proofs to protect voter privacy and provide verifiable tallies. It highlights that electronic voting introduces unique risks—such as scalable software vulnerabilities, compromised clients, and coercion—that paper-based systems largely avoid through physical controls and detectability of failures. Ultimately, cryptography can strengthen verifiability as a layer atop paper infrastructure, but it cannot fully replace the security and trust of paper ballots in high-stakes public elections.

Backporting security fixes at scale with Codex

AI summaryThe article describes how thousands of known CVEs remain unfixed in stable software like Linux kernel stable branches, Ubuntu LTS, and Debian because backporting security patches is time-consuming, thankless volunteer work that rarely gets prioritized. Using Codex with GPT-5.6, the team reduced backporting effort from days to roughly 30 minutes to three hours of human attention per fix, with AI agents handling patch adaptation, testing, and evidence gathering while engineers review and submit the patches. By October 29, this workflow had helped land fixes for 149 distinct CVEs in stable Linux kernel releases, along with patches for Fedora and Ubuntu packages, demonstrating that AI assistance can make neglected security work practical at scale.

Your AI agent fixed the bug, but what else did it change?

AI summaryTrail of Bits has released two plugins, patching-bugs and regression-hunt, developed through its Patch the Planet initiative with OpenAI, which let AI agents reproduce reported bugs, develop fixes, and check whether changes break previously working behavior in open-source projects. The plugins standardize patching through strict input/output schemas, live proof-of-concept validation, and project-specific threat models and patching guidelines, with regression-hunt producing 25% fewer false-positive findings than a baseline Codex agent in preliminary evaluations. The authors argue that as AI accelerates bug discovery, the industry needs reliable, standardized patching workflows, and they encourage maintainers to add THREAT_MODEL.md and PATCHING_GUIDELINES.md files so the agents work within each project's rules.

Package managers have an integrity problem

AI summaryThe author tested 25 popular package managers against a simulated malicious package repository using a Docker- and mitmproxy-based harness, finding that fewer than half check integrity via lockfiles by default, only Go and vcpkg verify every downloaded package, and only Go verifies signatures by default. Many cryptographic implementations fall short in subtle ways—for example, Pub detects hash mismatches but installs packages anyway, Conan treats an MD5 hash merely as an identifier, and cpanminus uses unencrypted HTTP—due to design choices, prioritization, or the complexity of developer-friendly solutions. The article warns that as developer compromise becomes harder, attackers will shift to the repositories serving code, and explores which cryptographic designs package managers should adopt going forward.