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
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.
Quantum Threat Analysis
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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).
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. Predict before you run it.
- 2. Run or change the tool above.
- 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 PlannerThis tool practises the Confidential Computing & TEEs module, phase 6 (Infrastructure & Performance); Infrastructure Modernization Planner produces a deliverable of that phase.
Related content
Next in HSM / PKCS#11