Cold Boot Attack
Reading keys out of memory chips shortly after power is cut, because RAM fades slowly.
Basically
A cold boot attack can recover encryption keys from a computer's memory shortly after you switch it off. The memory can keep data briefly without power.
Key Takeaways
- A cold boot attack exploits DRAM data remanence. Memory chips retain their contents for seconds to minutes after power loss, and cooling them with compressed air or liquid nitrogen extends retention to an hour or more, giving attackers time to extract private keys and other secrets.
- Cryptocurrency wallets that hold signing keys in host memory are vulnerable. Hot wallets and software signers keep private keys in RAM during operation, making them targets for any attacker with physical access to the device.
- Hardware-based mitigations are the strongest defence. Hardware wallets and secure elements never expose keys to host memory, while CPU-level memory encryption through AMD SME/SEV or Intel TME renders extracted DRAM contents unreadable.
What Is a Cold Boot Attack?
A cold boot attack is a physical attack that recovers sensitive data from a computer's RAM after power has been removed. It exploits DRAM data remanence, where memory cells do not lose their charge instantly when power is cut. Stored bits decay gradually over seconds to minutes, giving an attacker time to capture memory contents and extract encryption keys, passwords or private keys.
J. Alex Halderman and colleagues at Princeton University formally demonstrated the attack in the 2008 paper "Lest We Remember: Cold Boot Attacks on Encryption Keys", published at the USENIX Security Symposium. The researchers recovered full disk encryption keys from BitLocker, FileVault, dm-crypt and TrueCrypt. They used no special hardware, only a USB drive with a lightweight boot image and, optionally, a can of compressed air to cool the memory modules.
The attack challenges the widespread assumption that RAM is instantly wiped when a computer shuts down. DRAM retains a usable image of its contents long enough for an attacker to reboot the machine, transplant the memory modules or read out the residual data in another way. Cold boot attacks therefore matter to any system that holds secrets in volatile memory, including cryptocurrency wallets and signing software.
How It Works
DRAM stores each bit as a charge in a tiny capacitor. These capacitors leak charge over time, so DRAM requires constant refresh cycles while powered, but removing power stops the refresh without making the charges vanish immediately. Most bits remain intact for several seconds at room temperature, and cooling the chips slows the discharge dramatically.
The Data Remanence Window
The Princeton researchers measured bit decay rates under different conditions. Their results showed how temperature changed the time available to an attacker.
At cryogenic temperatures, memory contents survive long enough to physically remove the DRAM modules and install them in a separate machine for analysis. Even at room temperature, the window is large enough to reboot a machine from a USB drive.
Attack Variants
The original research described three variants of increasing sophistication. Each variant built on the capabilities of the previous one.
Key Recovery Algorithms
Raw memory dumps from a cold boot attack contain bit errors from partial decay. The Princeton team developed algorithms to locate cryptographic key schedules within noisy memory images and correct errors using the known structure of key expansion algorithms. For AES, for example, the expanded key schedule contains redundant information that allows reconstruction even when a percentage of bits have flipped.
The researchers released the open-source tools aeskeyfind and rsakeyfind to automate the process of locating AES and RSA keys in memory images. The tools work even with significant bit decay.
Relevance to Cryptocurrency
Cold boot attacks are particularly concerning for cryptocurrency because private keys and seed phrases stored in memory grant direct, irreversible access to funds. Unlike a compromised password that can be reset, a stolen private key means permanent loss of the associated assets.
Hot Wallets and Software Signers
Hot wallets and software-based signing applications must load private keys into RAM to sign transactions. During the signing window, and often for the entire time the wallet application is running, the key material sits in host memory. A cold boot attack during this period can recover the keys.
A 2023 systematisation-of-knowledge paper on cryptocurrency wallet security listed cold boot attacks among non-invasive memory attacks and noted that data remanence vulnerabilities had been demonstrated against hardware wallet devices like the Trezor. In 2018, security researchers used memory forensic techniques to extract the secret phrase and salt from an unmodified Bitfi wallet, a device marketed as "unhackable".
Node and Server Environments
Bitcoin and Lightning nodes running on servers hold key material in memory for channel operations, signing and wallet functions. A cold boot attack against a Lightning routing node could extract channel keys, potentially allowing an attacker to broadcast old channel states or steal funds. Server environments in data centres face this risk from malicious insiders or attackers who gain physical access, and the research on wallet security attack surfaces provides a broader view of physical and software attack surfaces.
Full Disk Encryption Bypass
Many cryptocurrency users rely on full disk encryption to protect wallet files at rest. Cold boot attacks were originally demonstrated as a bypass for exactly this scenario: even if the wallet file is encrypted on disk, the decryption key is in RAM while the system is running. Extracting that key from a memory dump gives the attacker access to the wallet file and its contents.
Hardware Memory Encryption
Modern CPUs offer transparent memory encryption that protects against cold boot attacks at the hardware level. These technologies encrypt memory contents without requiring applications to handle the encryption themselves.
With these technologies enabled, a cold boot attacker recovers only ciphertext. The encryption key lives in CPU registers, not DRAM, so it cannot be extracted through memory remanence.
Hardware Wallets and Secure Elements
Hardware wallets provide the most direct defence for cryptocurrency users. Devices like Ledger and Trezor perform all signing operations inside a secure element or dedicated microcontroller, so the private key never leaves the secure chip and is never present in the host computer's RAM. Even if an attacker performs a cold boot attack on the connected computer, there are no keys to find.
The research on hardware wallet attack vectors provides a detailed analysis of hardware wallet security models. It examines the attack vectors relevant to these devices.
Air-Gapped and Offline Signing
Air-gapped signing setups keep key material on a device that is never connected to a network. While this does not eliminate the cold boot risk on the signing device itself, it drastically reduces the attack surface by limiting physical access vectors. An attacker must reach the offline device, not just the internet-connected machine.
Software Mitigations
Operating systems and applications can reduce the cold boot window through several techniques. These techniques aim to shorten the time during which secrets remain recoverable in memory.
Physical Security
Cold boot attacks require physical access to the target machine. Basic physical security measures reduce the risk significantly by making that access harder to obtain.
Evolving Memory Technologies
DDR4 and DDR5 DRAM are somewhat more resistant to cold boot attacks than older DDR2 and DDR3 modules due to scrambling and encryption features at the memory controller level, but the fundamental physics of data remanence still applies. Researchers continue to demonstrate successful attacks against modern memory. Non-volatile memory technologies like Intel Optane, now discontinued, posed even greater risks because they retained data indefinitely without power.
False Sense of Security
Many users assume that shutting down their computer destroys all sensitive data. This assumption leads to poor security practices: leaving hot wallets running on unencrypted machines, not using hardware wallets for significant holdings, or trusting software-only endpoint security measures that cannot defend against physical attacks.
Side-Channel Attack Family
Cold boot attacks belong to a broader family of side-channel attacks that extract secrets through physical characteristics rather than software vulnerabilities. Related attacks include DMA attacks via Thunderbolt or PCIe, electromagnetic emanation analysis and power analysis. Defending against one physical attack vector while ignoring others provides incomplete protection, and the research on harvest-now-decrypt-later attacks provides context on how future threats could compound these risks.
Practical Threat Level
Cold boot attacks require physical access, some technical knowledge and proximity to the target machine shortly after it was running with keys in memory. These requirements make them less common than remote software exploits but highly relevant for high-value targets: exchanges, custodial services and individuals holding significant cryptocurrency on self-custodied machines. The best defence is layered: hardware memory encryption, hardware wallets for signing and physical security for the computing environment.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.