Sticky Banner Visual Mobile 3

Don't miss the Spring Deal: Save up to 78% before April 21.

Don't miss the Spring Deal: Save up to 78% before April 21. Claim now!

Claim Now!

Expressvpn Glossary

Secure enclave

Secure enclave

What is a secure enclave?

A secure enclave is a hardware-isolated execution environment implemented by the processor, typically as a type of trusted execution environment (TEE). It runs code and stores data independently of the main OS and is designed so that only enclave code can access its secrets, even if the OS or kernel is compromised or untrusted.

Depending on the implementation, the processor protects enclave memory through hardware mechanisms such as encryption in shared or dedicated regions, integrity verification on access, or strict isolation to prevent unauthorized reads or modifications from other software (including privileged components).

How does a secure enclave work?

How a secure enclave enforces a hardware boundary, allowing only verified code to access sealed secrets while blocking operating system access.Secure enclaves enforce strict hardware-controlled execution through these key mechanisms:

  1. CPU-enforced isolation: The processor uses internal hardware to block all non-enclave access to enclave memory, including access attempts from the OS.
  2. Protected memory with integrity checks: Depending on the implementation, hardware may encrypt enclave memory and attach authentication tags or use access controls for isolation. On every access, it verifies integrity to ensure data hasn’t been tampered with.
  3. Restricted entry and exit paths: The CPU permits entry only through specific instructions that validate the entry point and switch to enclave mode, with controlled exits back to the OS. This prevents injections of malicious code.
  4. Attestation to prove enclave identity: The enclave creates a signed attestation document with its measurements (hashes of code and data), which external services verify to confirm it’s genuine and untampered.
  5. Conditional release of secrets: Services verify attestation before sharing keys or data, ensuring secrets are released only to trusted enclaves.

Where is a secure enclave used?

Secure enclaves are deployed across devices and systems for enhanced security:

  • Smartphones: Restrict access to biometric data and device encryption keys.
  • Laptops and desktops: Protect disk encryption keys and enable passwordless logins or certificate-based authentication without exposing secrets.
  • Cloud environments: Enable confidential computing to isolate workloads, ensuring data and keys remain encrypted during processing.
  • Payment systems: Authorize transactions and sign data, like in contactless payments, where card details are processed in isolation.
  • Enterprise applications: Generate hardware-bound keys, support secure authentication, and protect cryptographic material in business tools.

Why is a secure enclave important?

  • Protects keys from OS/kernel compromise: Secrets stay safe even if malware infiltrates the system.
  • Limits the impact of zero-day exploits: Reduces breach scope by isolating OS/hypervisor vulnerabilities at the hardware level.
  • Enables safer biometric processing: Encrypts and stores templates with enclave-only keys, as in Face ID, where raw biometric data never leaves the enclave.
  • Strengthens trust through attestation: Proves enclave identity to services using hardware-bound keys, building verifiable trust chains.
  • Supports confidential computing: Processes encrypted data only in verified TEEs, ideal for privacy-sensitive tasks.

Risks and privacy concerns

While secure enclaves significantly narrow attack surfaces, they aren't foolproof. Technical vulnerabilities, such as side-channel attacks and implementation flaws, can leak data even with encryption in place. Vendors mitigate this through hardware, firmware, and software updates, but absolute security isn't guaranteed.

Privacy trade-offs also arise from attestation. While they verify trustworthiness, attestation documents can serve as stable identifiers, enabling tracking of devices or workloads across sessions if not handled carefully.

Further reading

FAQ

What’s the difference between a secure enclave and a TPM?

A trusted platform module (TPM) is a dedicated chip for cryptographic operations and the storage of small secrets, such as keys. A secure enclave isolates code execution and data from the main OS.

Can a secure enclave be hacked?

Yes, via side channels or firmware flaws. Vendors issue mitigations and updates rather than claiming absolute security.

Does encryption alone replace enclaves?

No. Encryption secures data at rest or in transit, while secure enclaves protect data in use through hardware-isolated computation.

How does remote attestation work?

Remote attestation enables an enclave to prove its identity to an external service by providing a signed document containing its measurements. The service verifies these against a policy before granting access to keys or operations.

Do secure enclaves improve privacy by default?

Not inherently. They keep data local and encrypted, but attestation can enable tracking if identifiers are reused, so privacy hinges on system design.
Get Started