HSM / PKCS#11 / TEE-HSM Secure Channel

What you will do: Inspect generated sample attestation messages and signature-gated key unwrap. PQC mode uses ML-DSA-65 and ML-KEM; classical mode uses ECDSA and an independently generated AES wrapping key.

Worked example: Run the flow end to end; the PKCS#11 call log shows which call each algorithm makes, and the generated-keys panel shows what ended up where.

Runtime and privacy: The cryptographic exercise runs in this browser. Review the site privacy terms before entering sensitive material; use synthetic inputs for learning and evaluation.

Browse all Crypto Lab tools · Learn with Confidential Computing & TEEs

For your role

Security Architect
Choose one of the presets such as Intel SGX + Thales Luna or AMD SEV-SNP + Entrust nShield, then Execute (Live WASM): the tool loads that pairing's documented integration architecture and shows which keys end up in the enclave and which in the HSM.
Researcher / Academic
Open What runs live vs. simulated? before reading the results: the ML-DSA-65 attestation key, ML-KEM key agreement and the AES key wrap run in the PKCS#11 call log, and the attestation transport is simulated.

Design and explore TEE-HSM integration architectures with mutual attestation and PQC key provisioning. Select a TEE vendor and HSM vendor to visualize the trusted channel.

Live HSM Mode Active

SoftHSM3 · PKCS#11 v3.2 · Rust · session open

Scenario Selector

Select a TEE vendor and HSM vendor below. The tool will load the documented integration architecture and live provisioning demo for that combination. Not all pairings are supported — try using a preset below.

TEE Vendor:
HSM Vendor:
Quantum Threat Analysis
Quantum Threat Analysis — TEE & HSM Components

Each component of a TEE-HSM deployment faces distinct quantum risks. Vectors marked HNDL are subject to harvest-now-decrypt-later attacks — adversaries recording traffic today can decrypt it once a cryptographically-relevant quantum computer (CRQC) is available.

CRITICALECDSA Attestation Chain ForgeryRemote Attestation

Shor's algorithm breaks ECDSA in polynomial time. An attacker with a CRQC can forge attestation quotes, impersonate legitimate enclaves, and bypass all trust decisions based on attestation.

PQC fix:ML-DSA-65/87 for attestation key signing. Hybrid ECDSA+ML-DSA during transition period. Certificate chain re-issuance from vendor root CAs.
Timeline: Intel: 2027 (assumed), ARM: 2028 (assumed), AMD: 2028 (assumed), AWS: none announced· Effort: 4/5
HIGHSealing Key Recovery via Side-Channel + QuantumKey Management

In this AES-128 sealing example, about 2^64 ideal Grover iterations describes exhaustive key search. Assess side-channel evidence separately against the documented platform and threat model.

PQC fix:Check the processor’s documented sealing interface, the root-key protection and the applicable security profile. Use a supported 256-bit sealing option when the platform and policy call for it.
Timeline: Requires next-generation CPU silicon; no Intel or AMD dates are published in the sources we hold (the module's own estimate is Intel 2027+, AMD 2028+)· Effort: 5/5
MEDIUMMemory Encryption Key-Search MarginMemory Encryption

AES-128 is the Category 1 key-search reference and AES-256 is the Category 5 reference. Ideal Grover estimates count sequential queries and leave hardware cost, timing and memory-system access out of the model.

PQC fix:Use 256-bit memory-encryption keys where the processor generation enumerates and supports them (Intel's specification already describes them). Application-layer encryption inside the enclave (for example AES-256-GCM) is an optional extra, not a replacement for that upgrade: it protects a value only while the value stays encrypted. Once the enclave decrypts it to compute on it, the working set sits in memory protected only by the hardware engine, so the engine's key size and the platform's documented threat model and version limits still apply. It also adds an application key to manage.
Timeline: Intel: TBD, AMD: TBD· Effort: 5/5
CRITICALHNDLTEE-HSM TLS Channel Key Exchange CompromiseTEE-HSM Communication

Shor's algorithm breaks ECDH key exchange. An attacker recording TLS sessions between a TEE and HSM can retroactively decrypt all key provisioning data once a CRQC is available (HNDL attack on key material in transit).

PQC fix:Hybrid ML-KEM-768 + ECDH P-256 for TLS 1.3 key exchange (forward secrecy). Requires PQC-capable TLS stacks on both TEE and HSM sides.
Timeline: OpenSSL 3.5+ (2025), wolfSSL (available), BoringSSL (available)· Effort: 3/5
HIGHFirmware Signature ForgerySupply Chain

Shor's algorithm can forge firmware signatures. An attacker could sign malicious TEE firmware, security monitor updates, or microcode patches that pass signature verification. Particularly dangerous for remote firmware update channels.

PQC fix:ML-DSA-65/87 or SLH-DSA for firmware signing. Dual-signature (classical + PQC) during transition. Hardware root of trust must support PQC verification.
Timeline: Requires a silicon refresh; no vendor dates are published in the sources we hold (the module's own estimate is Intel 2027+, AMD 2028+; Arm depends on the SoC vendor)· Effort: 4/5
Memory Encryption Engines — Quantum Impact

This lesson's sample uses a 128-bit key (NIST Category 1); in the idealized Grover model that is about 2^64 iterations, a thinner model margin than AES-256 (Category 5) and not a demonstrated break.

Intel TME-MKIdealized key search
AES-XTS-128 (sample configuration; the Intel specification also describes 256-bit keys) · 128-bit key

A 128-bit key (NIST Category 1) has about 2^64 idealized Grover iterations against 2^128 classically, a thinner model margin than AES-256 (Category 5). That is not a demonstrated break. Intel's multi-key specification already describes AES-XTS with 128- or 256-bit keys by availability and selection, so check what your processor generation enumerates.

Sealing: Platform root key (fused) → CPU SVN → Enclave identity (MRENCLAVE/MRSIGNER) → Sealing key via EGETKEY
AMD SME/SEV Encryption EngineIdealized key search
AES-128 XEX (sample configuration; AMD also documents AES-256 XTS) · 128-bit key

A 128-bit key has about 2^64 idealized Grover iterations against 2^128 classically; this is a model margin, not a demonstrated break. AMD's SEV-SNP firmware interface documents AES-128 XEX and AES-256 XTS modes (a guest policy can require AES-256 XTS), so check which your EPYC generation uses. The RMP is an ownership check, not a quantum-vulnerable signature.

Sealing: AMD Secure Processor root key (fused) → TCB version → VM encryption key (VEK) derived per-VM via ASP key derivation
ARM TrustZone (isolation)No AES key documented
Not defined by TrustZone: Arm describes hardware-enforced isolation and no memory encryption for it (the 256-bit value shown is a placeholder, not a vendor figure) · key size not documented

Arm describes TrustZone as hardware-enforced isolation between secure and non-secure worlds and describes no memory encryption for it, so this lesson has no AES memory key to apply Grover's algorithm to. Any memory encryption on a particular SoC is vendor specific: take its cipher and key size from that SoC's documentation, not from the isolation feature.

Sealing: Hardware Unique Key (HUK, fused per-SoC) → Key derivation via Secure World service (vendor-specific KDF)
AWS Nitro Platform EncryptionNo AES key documented
No enclave memory-encryption cipher documented; AES-256-GCM is documented for in-transit encryption by compatible Nitro Cards (the 256-bit value shown is that figure) · key size not documented

AWS describes enclave protection as isolation enforced by the Nitro Hypervisor, not memory encryption. AWS documents AES-256-GCM for in-transit encryption by compatible Nitro Cards; in the idealized Grover model a 256-bit key leaves a large margin. Attestation documents are signed with ECDSA P-384, which Shor-class attacks break (see the attestation flow).

Sealing: No key hierarchy is documented here. Enclave key release is governed by AWS KMS attestation policy (attestation document in the Recipient parameter).

Run TEE-HSM Key Provisioning (Classical)

Educational sandbox note: The in-browser SoftHSM3 WASM session is an educational sandbox, not a FIPS 140-3 / CMVP-validated production HSM or hardware TEE. Production deployments must validate vendor hardware quotes, certificate chains, measurement policies, and HSM validation status in their target environment.

Related module: HSM PQC firmware details and vendor comparison are covered in the HSM & PQC Operations module. Use the PKCS#11 Simulator to explore the HSM side of this integration.

Production Tool Capabilities & Verification Requirements

What this sample check establishes: Simulates Remote Attestation TLS (RA-TLS) binding a hardware enclave measurement quote to a hybrid post-quantum key exchange channel.

Browser sandbox limitation (non-certification boundary): Uses synthetic attestation quotes in the browser; it does not execute inside physical Intel TDX, AMD SEV-SNP, or Arm CCA silicon.

What to require and test in your production tools:

  • Hardware-rooted TEE attestation verification checking platform certificates, TCB SVN levels, and measurement registers (for example Intel TDX `MRTD`/`RTMR`).
  • Cryptographic channel binding (exporter or public-key hash in quote reportData) linking the `X25519MLKEM768` TLS session to the attested enclave.
  • Post-quantum roadmap for silicon vendor VCEK/ASK attestation root signatures.

Try it

  1. 1. Predict before you run it.
  2. 2. Run or change the tool above.
  3. 3. Explain what the result shows.

After Execute, which key is generated as the attestation key in the PKCS#11 call log?

Next step

Turn it into a plan: Infrastructure Modernization Planner

This tool practises the Confidential Computing & TEEs module, phase 6 (Infrastructure & Performance); Infrastructure Modernization Planner produces a deliverable of that phase.