How Anchorage Digital and Turnkey verify code with AWS Nitro Enclaves¶
Summary¶
An AWS Architecture Blog post, co-written with Anchorage Digital (a federally regulated digital-asset bank) and Turnkey (a verifiable key-management provider), describing VisualSign — an open-source Rust, cross-chain transaction parser that runs inside AWS Nitro Enclaves on Turnkey Verifiable Cloud and returns human-readable transaction breakdowns together with attestation-backed proof of which software produced them. The motivating problem is blind signing: wallets can't natively decode complex DeFi transactions, so users approve hex payloads that hide malicious token approvals or transfers, and existing simulation/decoder services must be trusted without any way to verify what code they ran. The architecture answers two required guarantees — correctness (the parser is the exact audited code) and integrity (output not tampered with in transit) — by combining reproducible builds, enclave-hosted computation, and Nitro attestation documents whose PCR measurements a wallet compares to build-derived values. The post then generalizes the design into an attestation-gated access pattern (patterns/attestation-gated-key-release): an HSM releases key material only to an enclave whose attestation verifies, so proof of what code is running replaces network identity, API keys, or operator trust as the access credential — and the attestation becomes a machine-verifiable contract between a domain team (blockchain parsing) and a security team (HSM policy).
Key takeaways¶
-
The trust problem is "did the service run the code it claims?" — contractual trust, network perimeters, and reputation give no cryptographic answer. A transaction parser needs correctness (exact, unmodified audited code) and integrity (output unmodified between parser and wallet). (Source: sources/2026-10-27-aws-how-anchorage-digital-and-turnkey-verify-code-with-aws-nitro-enclaves)
-
Request path (5 steps). Wallet → Turnkey API → a Nitro-Enclave-capable EC2 instance running QuorumOS (Turnkey's open-source enclave OS) + the VisualSign Parser binary → parser emits structured JSON → enclave signs the response with an ephemeral P-256 key and requests a Nitro attestation document from the Nitro Hypervisor → wallet verifies attestation + signature. Anchorage "doesn't need to trust Turnkey."
-
Reproducible builds make PCRs a stable verification policy. The attestation carries Platform Configuration Registers (PCRs) — measurements of enclave image, kernel, and application. Because the build is byte-identical regardless of who builds it or where, PCR values are deterministic: "the trusted values stay constant across rebuilds and verification policies never need to be updated," and any third party can independently confirm the enclave runs the expected QuorumOS version and the unmodified parser. (concepts/reproducible-builds)
-
Four Nitro Enclave properties the trust model depends on: (a) vCPU + memory isolation from the parent instance via the same Nitro Hypervisor that isolates EC2 instances; (b) no persistent storage, no network interface, no DNS, no metadata service — only a local
vsockchannel to the parent; (c) hypervisor-signed attestation documents chained to the AWS Nitro Attestation PKI; (d) no single AWS, Turnkey, or Anchorage operator can access data in the enclave. (systems/nitro, concepts/trusted-execution-environment) -
Attestation verification is easy to get wrong. The document is a COSE Sign1 structure over CBOR whose payload holds an X.509 cert chain, PCRs, and optional
UserData/PublicKey/Nonce. Correct verification = parse CBOR → validate COSE signature → walk the chain to the AWS Nitro root (concepts/chain-of-trust) → check expiry → compare PCRs, with clear errors at each step. -
awsnitroverifier(Go) — two-tier error handling as an API design choice. Malformed input surfaces aserr != nil; validation failures asresult.Valid == false, each with a specific reason (PCR mismatch, expired cert, chain failure) rather than a generic "verification failed." Built-in PCR validation, direct access toUserData/PublicKey/Nonce, root-cert fingerprint and chain-trust status, an offline/test mode for CI/CD without a live enclave, and a migration guide from the widely usednitritelibrary. -
Layered verification levels you can adopt incrementally (via
visualsign-turnkeyclient, built onawsnitroverifier): (1) basic P-256 signature check (a key in Turnkey's infra signed it); (2) boot attestation with PCR validation (image + config match); (3) full QuorumOS manifest verification including the specific application binary hash. The split between a focused attestation library and an application client lets non-blockchain users drop the blockchain dependencies. -
Attestation as an access credential. At Anchorage, HSMs hold key material; the parser runs in a separate enclave; the HSM grants access based on verified attestation — "not based on trusting the network, the operator, or the host machine." The principle: keep the computation away from the sensitive data and use attestation to bridge the gap. (patterns/attestation-gated-key-release)
-
Attestation as an organizational contract. Ownership splits cleanly: blockchain domain experts maintain the parser (Ethereum opcodes, Solana instruction formats, DeFi semantics) with no access to key material; the security/infra team owns attestation verification, HSM policy, and access control without needing to understand Solana's account model. The attestation is "the machine-verifiable contract between the two teams." (concepts/separation-of-concerns)
-
The pattern is not crypto-specific. Proposed non-Web3 uses: sanctions screening / AML in an enclave from a reproducible image (proof the audited screener processed the data); diagnostic models over patient data in an enclave with no storage or network (operator can't exfiltrate); any sensitive operation relying on third-party libraries, pinned to a reproducible build. (concepts/confidential-computing)
Systems / concepts / patterns extracted¶
- Systems: VisualSign (primary subject; new page), AWS Nitro — Nitro Enclaves section added to the parent page per the Systems gate, EC2 (parent instances). Turnkey Verifiable Cloud (TVC, private beta), QuorumOS, awsnitroverifier, visualsign-turnkeyclient, and nitrite are listed in frontmatter only (single-source / sub-components — the two Go libraries are documented as a section on the VisualSign page).
- Concepts: concepts/remote-attestation, concepts/trusted-execution-environment, concepts/confidential-computing, concepts/reproducible-builds (new page — now cited by 4 sources), concepts/chain-of-trust, concepts/separation-of-concerns. Blind signing, HSM, vsock, PCRs, and COSE/CBOR recorded as tags/prose only.
- Patterns: patterns/attestation-gated-key-release (new page — the same shape appears in Meta Private Processing, Google Confidential Federated Compute, and Cloudflare GeoKey Manager).
Architecture¶
wallet ──raw tx──▶ Turnkey API ──▶ EC2 parent instance
│ vsock (only channel)
▼
Nitro Enclave: QuorumOS + VisualSign Parser
1. parse → JSON
2. sign w/ ephemeral P-256 key
3. NSM → attestation doc (PCRs, PublicKey, UserData, Nonce)
wallet ◀──JSON + sig + attestation──┘
verify: COSE sig → X.509 chain → AWS Nitro root → expiry → PCRs == reproducible-build values
Generalized: untrusted input → enclave app → signed bundle + attestation
→ HSM verifies attestation → releases key material to that software only
Operational details¶
- Chains supported at time of writing: Ethereum + L2s (Arbitrum, Optimism, Base, Polygon), Solana, Sui, Tron.
- Example: a Uniswap Universal Router fixture of 2,470 hex characters decodes into Permit2 approval → V2 swap (amounts, min outputs) → fee payment → WETH unwrap, each with explicit addresses/amounts/expiries.
- Response signing key: ephemeral P-256; enclave I/O:
vsockonly. - Collaboration began after Turnkey's whitepaper (January 2025).
Caveats¶
- Partner/architecture post co-written with the vendors; no latency, throughput, fleet size, or failure-mode numbers are given.
- TVC is in private beta as of writing.
- The post doesn't address TEE side-channel risk or how the PCR allowlist / manifest is published and rotated beyond "values derived from reproducible builds" — compare the transparency-ledger layer in systems/whatsapp-private-processing and systems/confidential-federated-compute.
- "No single operator can access" is an AWS/vendor claim, not independently demonstrated here.
Source¶
- Original: https://aws.amazon.com/blogs/architecture/how-anchorage-digital-and-turnkey-verify-code-with-aws-nitro-enclaves/
- Raw markdown:
raw/aws/2026-10-27-how-anchorage-digital-and-turnkey-verify-code-with-aws-nitro-95231c1f.md
Related¶
- systems/visualsign — the system described.
- systems/nitro — Nitro Enclaves as the TEE substrate.
- concepts/remote-attestation · concepts/trusted-execution-environment · concepts/confidential-computing
- concepts/reproducible-builds — what makes PCRs a fixed policy.
- patterns/attestation-gated-key-release — the generalized pattern.
- companies/aws