Side-Channel Attack
Recovering secrets from timing, power or electromagnetic leaks rather than from breaking the maths.
Basically
In plain words, a side-channel attack extracts cryptographic secrets by analyzing physical signals like timing, power consumption, or electromagnetic emissions rather than breaking the underlying math.
Key Takeaways
- Side-channel attacks exploit implementation leaks, not mathematical weaknesses: they extract private keys by measuring physical signals like timing, power consumption, or electromagnetic radiation during cryptographic operations.
- Bitcoin libraries defend against these attacks with constant-time code: the secp256k1 library used by Bitcoin Core implements branch-free operations and runtime blinding to prevent information leakage during signing.
- Hardware wallets rely on secure elements as a primary defense: certified chips with power noise injection, glitch detection, and tamper-resistant logic cells raise the cost and complexity of physical side-channel attacks.
What Is a Side-Channel Attack?
A side-channel attack is a method of extracting secret information from a cryptographic system by observing its physical behavior during computation rather than attacking the underlying algorithm. Instead of trying to break the math behind elliptic curve cryptography or SHA-256, an attacker measures unintended signals: how long an operation takes, how much power the chip draws, or what electromagnetic radiation it emits.
The concept dates to at least 1943, when a Bell Telephone engineer observed decipherable spikes on an oscilloscope correlated with an encrypting teletype's output. The field was formalized by Paul Kocher's 1996 paper at CRYPTO, which demonstrated that measuring execution time variations could recover private keys from RSA, Diffie-Hellman, and DSS implementations. His experiments recovered 90% of bits in 512-bit RSA keys after observing roughly 20,000 operations.
Side-channel attacks matter for Bitcoin because every transaction involves digital signatures computed with private keys. If an attacker can observe the signing process closely enough, they can recover the key and steal funds, even if the cryptographic algorithm itself is mathematically sound.
How It Works
All side-channel attacks follow the same general principle: a cryptographic operation that processes secret data produces observable physical effects that correlate with that data. The attacker measures those effects, applies statistical analysis, and reconstructs the secret. The main categories differ in which physical signal they exploit.
Timing Attacks
Timing attacks measure how long a cryptographic operation takes to complete. If the code contains conditional branches that depend on secret key bits (for example, skipping a multiplication when a key bit is zero), the total execution time reveals information about the key. Even nanosecond-scale differences become exploitable with enough measurements.
Brumley and Boneh demonstrated in 2003 that timing attacks work remotely over a network, not just with physical access. For Bitcoin, this means any signing implementation with data-dependent branches could leak private key bits to an observer measuring response times.
Power Analysis
Power analysis attacks monitor the electrical power consumed by a chip during cryptographic computation. Two forms exist:
Electromagnetic Analysis
Electromagnetic (EM) analysis captures radiation emitted by a processor during computation. Researchers have demonstrated ECDSA key extraction from mobile devices using a simple magnetic probe placed near the device, operating at only a few hundred kHz bandwidth. Genkin, Shamir, and Tromer extracted full signing keys from OpenSSL and CoreBitcoin on iOS using an improvised probe and a standard audio card.
Cache-Timing Attacks
Cache-timing attacks exploit the speed difference between CPU cache hits and cache misses. Two primary techniques:
Cache-timing attacks are especially relevant for cloud-hosted Bitcoin infrastructure where multiple tenants share physical CPU hardware.
Acoustic and Frequency-Based Attacks
More exotic side channels include acoustic cryptanalysis (recording sounds emitted by electronic components during decryption) and frequency-scaling attacks. Genkin, Shamir, and Tromer demonstrated extraction of 4096-bit RSA keys from a laptop within an hour by recording high-pitched sounds with a mobile phone placed nearby.
The Hertzbleed attack, disclosed in 2022, exploits dynamic voltage and frequency scaling (DVFS) in modern processors. CPU clock frequency varies with the data being processed, turning constant-time code into variable-time code. This affects all Intel processors and many AMD and ARM chips, and no microcode patches are planned.
Bitcoin-Specific Defenses
The Bitcoin ecosystem has developed multiple layers of defense against side-channel attacks, from carefully written cryptographic libraries to specialized hardware.
Constant-Time Code in libsecp256k1
Bitcoin Core's libsecp256k1 library implements comprehensive side-channel resistance:
These protections require ongoing vigilance. Certain compiler versions (GCC 13+, Clang 14+) have been found to introduce non-constant-time behavior through optimization, breaking guarantees that hold at the source code level.
Hardware Wallet Protections
Signing devices and hardware wallets use secure elements to resist physical side-channel attacks. These certified chips (Common Criteria EAL5+ or EAL6+) include hardware-level countermeasures:
Hardware wallets without secure elements remain vulnerable. In 2019, the Ledger Donjon team demonstrated PIN recovery from a Trezor One using power analysis: they measured power consumption at 3 GS/s during PIN verification, built machine-learning classifiers from 200,000 profiling traces, and achieved 100% PIN recovery after only 10 power traces. For a deeper analysis of these attack vectors, see the hardware wallet attack vectors research article.
FROST Threshold Signing
FROST threshold signatures provide a structural defense against side-channel attacks. Because each participant holds only a key share rather than the full signing key, compromising a single signer via side-channel analysis yields only a share. An attacker would need to side-channel enough participants to meet the threshold (for example, 3 of 5 signers) to reconstruct the full key.
RFC 9591, the official IETF specification for FROST, explicitly addresses side-channel resistance. It requires that scalar multiplication, base-point multiplication, and serialization routines be implemented in constant time. Spark's use of FROST for signing operations means that side-channel resistance is distributed across multiple participants rather than concentrated in a single device. For a deeper look, see the FROST threshold signatures research article.
Notable Examples
Minerva Attack (2019)
Discovered by researchers at Masaryk University, the Minerva attack exploits ECDSA nonce bit-length leakage through timing differences in scalar multiplication. Each additional bit in the nonce adds one loop iteration, creating a measurable timing variation. By collecting roughly 2,100 signatures and solving a lattice reduction problem, researchers recovered 256-bit private keys from smart cards and software libraries including libgcrypt, wolfSSL, and OpenJDK's SunEC provider.
Spectre and Meltdown (2018)
These processor-level vulnerabilities exploited speculative execution to read protected memory, affecting virtually all modern Intel, AMD, and ARM processors. For cryptocurrency infrastructure, the implications were significant: cloud-hosted exchange hot wallets and mining operations running on shared hardware were vulnerable. Multiple exchanges restricted wallet functions during emergency patching. Hardware wallets were unaffected because they do not run general-purpose operating systems.
Hertzbleed (2022)
By exploiting dynamic frequency scaling, Hertzbleed demonstrated that even correctly implemented constant-time code can leak secrets through remote timing analysis. The attack showed that current constant-time programming guidelines are insufficient to guarantee constant-time execution on modern processors, because the CPU itself introduces data-dependent timing variations.
Mitigations
Defending against side-channel attacks requires a layered approach spanning software, hardware, and operational practices.
Software Defenses
Hardware Defenses
Architectural Defenses
Risks and Considerations
Evolving Attack Surface
Side-channel attacks continue to advance. AI-enhanced power analysis and deep learning techniques are making attacks more automated and accurate. The 2025 discovery of sleep-based power side channels demonstrated novel ways to leak ECDSA nonces. As attack tools become more accessible, the bar for exploitation drops.
Physical Access Requirements
Most power analysis and EM attacks require physical proximity to the target device, which limits their practical applicability. However, cache-timing and remote timing attacks work over networks, and Hertzbleed-class attacks can potentially extract keys from any machine with data-dependent frequency scaling. The threat model depends heavily on where keys are stored and how signing is performed.
Defense in Depth
No single countermeasure is sufficient. Constant-time code can be broken by compiler optimizations or CPU frequency scaling. Secure elements can be defeated by laser fault injection (as demonstrated against the TROPIC01 chip used in the Trezor Safe 7 in January 2026). Threshold signatures raise the bar but do not eliminate risk if multiple participants are co-located. Effective defense requires combining software, hardware, and operational protections. For related threats to long-term key security, see the post-quantum cryptography research article.
This 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.