background image


What is a Cryptographic Enclave?


What is a cryptographic enclave? Demystifying cryptographic enclaves and the role they play safeguarding the confidentiality of private keys is critical for securing signature-based authentication.

Why? Well, in the debate about whether secrets or signatures provide more secure authentication, the argument for signatures has won outright. Signatures don't transmit the same authentication token twice. Thus they avoid exposing cleartext passwords and make replay attacks impossible. However, signatures still depend on secrets in their own way. The private key used to make digital signatures needs to be protected for secure authentication. This shifts the attacker's focus to stealing the private keys via attacks such as a Cold Boot Attack, Memory Dump Attacks, and Side Channel Attacks that can steal the private key from RAM or by observing the side effects of a system's CPU activity. 

This article will describe the most common attacks used to steal private keys from RAM and review the technology used to protect against these attacks by removing private keys from RAM and placing them with their own hardware device known as a cryptographic enclave. Finally we will review some of the most common types of cryptographic enclaves used in modern computing.

The Problem: Attacks Against Cryptographic Keys in Memory

The susceptibility of cryptographic keys stored in RAM to various attacks poses a significant security risk. These attacks, including Cold Boot, Memory Dump, and Side Channel attacks, can extract sensitive data like private keys, compromising digital security.

What is a Cold Boot Attack?

A cold boot attack steals the data stored in DRAM and SRAM by rebooting the system before the volatile memory's contents has time to erase. Data remanence refers to the data that remains for a short time after the power has been removed from a memory module. By quickly rebooting a system to an alternative OS and scanning the RAM an attacker can retrieve sensitive data such as private keys from a computer's memory.

What is a Memory Dump Attack?

Memory dump attacks involve accessing and reading the volatile memory (RAM) of a computer while it is conducting its regular function to extract sensitive data stored in it. In a memory dump attack, the attacker typically gains unauthorized access to a system and then uses either legitimate forensic tools or malware to copy data from the system's RAM. This memory dump can then be analyzed to extract valuable information such as passwords, encryption keys, personal data, or other confidential information that was present in the memory at the time of the attack. 

What Are Side Channel Attacks?

Side channel attacks are a type of security exploit that gain information from the physical implementation of a computer system, rather than weaknesses in their software. Some side channel attacks have been demonstrated that could allow attackers to steal private keys from a computer including analyzing electromagnetic emissions, power consumption, or timing information.

The Solution: Cryptographic Enclaves

Cryptographic enclaves are the solution to preventing many types of attacks that attempt to steal private keys. They are designed to provide a secure and isolated execution environment to prevent unauthorized access and tampering.

Let's review how cryptographic enclaves work (and some common examples:)

But First, What is a Cryptographic Enclave?

A cryptographic enclave is a secure dedicated piece of hardware, typically a processor separate from the CPU that is attached to a motherboard chip. Its purpose is to offload cryptographic functions and store cryptographic keys more securely than simply storing them as a file on the hard-disk and loading them when required.  It acts as a fortified vault, isolating sensitive data and processes to prevent unauthorized access even if the system is compromised by attackers.

By ensuring that sensitive operations, like cryptographic key management, are performed in a hardened, isolated area of the processor cryptographic enclaves help safeguard against a range of attacks, including those mentioned above that exploit software vulnerabilities, and side-channel attacks, by restricting direct access to protected data and operations.

Common Hardware Enclaves For Cryptographic Functions

The most common hardware enclaves for cryptographic functions are as follows:

Hardware Security Module (HSM) 

An HSM is a physical device that provides secure key management and cryptographic operations for sensitive applications, often used in enterprise environments. It serves as a highly secure enclave for generating, storing, and managing cryptographic keys, and can perform encryption, decryption, and digital signing. HSMs are designed to be tamper-resistant and are used in scenarios requiring a high level of security, like banking or cloud services.

Hardware Security Token

Hardware security tokens are small, USB or NFC physical devices used for authentication, often as a part of two-factor or multi-factor authentication systems. They store cryptographic keys and can provide digital signatures of digital tokens and act as an added layer of security for the "something you have" element of MFA. . The most popular protocol for hardware security tokens is Fast Identity Online 2 (FIDO2).

Trusted Platform Module (TPM)

A TPM is a specialized chip on a computer's motherboard that provides hardware-based, security-related functions. It securely stores keys, digital certificates, passwords, and data, and it helps with hardware authentication and ensuring the integrity of the system by checking if the system has been tampered with. TPMs are used for secure boot, disk encryption, and platform integrity verification.

Smart Cards / EMV Chips

Smart cards are portable, tamper-resistant devices with embedded integrated circuits that store cryptographic keys used for secure digital authentication, and identification. They can store cryptographic keys and personal information, and are capable of performing cryptographic functions like encryption and digital signing directly on the card. Smart cards enhance security by physically separating sensitive cryptographic operations and data from potentially vulnerable computer systems. Bank cards, such as debit and credit cards, typically use a similar but slightly different technology known as EMV chips, named after its original developers (Europay, MasterCard, and Visa).

Apple's Secure Enclave Processor

The Secure Enclave is a coprocessor integrated into many Apple devices, used for data protection and device security. It provides an isolated environment for processing and storing sensitive data, such as fingerprints and FaceID data, and handles cryptographic operations for device encryption. It ensures that sensitive data is only accessible to authorized processes and is protected even if the main processor is compromised.

Intel's SGX

Intel SGX offers hardware-based memory encryption that isolates specific application code and data in memory. It creates secured "enclaves" that are designed to be protected from processes running at higher privilege levels, effectively safeguarding sensitive data and operations even if the operating system is compromised. SGX is often used for secure computation in cloud environments and protecting intellectual property in software.

ARM's TrustZone

TrustZone is a set of security extensions on ARM processors that provide a secure execution environment alongside the regular operating system. It creates a secure world (for sensitive operations) and a normal world (for regular tasks), allowing for secure boot, secure payment, DRM, and key management. TrustZone is widely used in mobile and embedded devices for isolated and secure processing of sensitive information.


Cryptographic enclaves are critical cybersecurity technologies that address the need to protect cryptographic keys stored in RAM. They offer a solution for safeguarding against Cold Boot, Memory Dump, and Side Channel attacks, which may be used against sophisticated attackers to successfully extract private keys from a compromised system even when they are not stored as files on disk.

By isolating sensitive operations in hardware-based enclaves, they ensure that even if a system is compromised, the integrity and confidentiality of critical cryptographic functions remain intact.

Looking to learn more about what a cryptographic enclave is and how it can help influence your organization's 2024 cybersecurity risk management plan? Reach out today.

Download our Free Buyer's Guide

Whether you are looking to complete Penetration Testing to manage risk, protect your data, comply with regulatory compliance standards or as a requirement for cyber insurance, selecting the right company is crucial.

Download our buyer’s guide to learn everything you need to know to successfully plan, scope and execute your penetration testing projects.