In classical cryptography, we often treat an algorithm as a mathematical "black box": an input goes in, a transformation occurs, and an output emerges. If the math is hard to invert, the system is deemed secure. However, as Yongdae Kim and others have demonstrated, cryptographic algorithms do not run on math; they run on transistors.
When a hardware device—be it an FPGA, a microcontroller, or an RFID tag—executes an instruction, it consumes physical energy. This energy consumption is not uniform. It fluctuates based on the data being processed, creating a "side channel" of information that can bypass even the most robust mathematical defenses.
The Physics of Leakage
The intuition behind power analysis lies in the way digital CMOS circuits operate. A logic gate primarily consumes power when it switches states (from 0 to 1 or vice versa). Consequently, the total power consumed by a chip at any given moment is highly correlated with the number of bits being flipped in its registers.
Researchers typically model this using two metrics:
- Hamming Weight: The number of '1' bits in a data word.
- Hamming Distance: The number of bits that change between two consecutive states.
As François-Xavier Standaert explains in Towards Security Limits in Side-Channel Attacks, these physical signatures allow an attacker to build a power model. By monitoring the current draw with an oscilloscope while the device encrypts various plaintexts, an attacker can use Correlation Power Analysis (CPA) to see which hypothetical key best matches the observed power spikes. If the predicted power usage (based on the Hamming Distance) aligns with the actual measured traces, the attacker has found the secret key.
Beyond Traditional Ciphers
While early work focused on standard symmetric ciphers like AES, the field has expanded to nearly every corner of modern computing.
- Post-Quantum Cryptography (PQC): Even algorithms designed to resist future quantum computers are vulnerable to today's power analysis. Cong Chen demonstrated the first DPA attack on the McEliece cryptosystem, showing that key rotation in hardware creates predictable power fluctuations. More recently, Yongbin Zhou showed that the NIST standards Dilithium and Kyber can have their keys recovered in minutes by reframing side-channel leakage as a Short Integer Solution (SIS) problem.
- Homomorphic Encryption (HE): Even "holy grail" technologies like Fully Homomorphic Encryption are not immune. Aydin Aysu and Furkan Aydin proved that single-trace attacks using machine learning can extract secret coefficients from the Microsoft SEAL library with 98% accuracy.
- Neural Networks: Power analysis can even "open the box" of Deep Neural Networks. Yun Xiang and colleagues showed that measuring power consumption allows an adversary to reverse-engineer the internal structure of a DNN running on embedded hardware.
Why Constant-Time is Not Enough
A common misconception is that "constant-time" programming—ensuring an algorithm takes the same number of cycles regardless of the input—prevents side-channel attacks. While this stops timing attacks, it does nothing to stop power analysis.
As Hwajeong Seo and Zhe Liu point out in their work on RSA and ECC for ARM-NEON, two operations can take the exact same amount of time but draw vastly different amounts of current. For instance, a hardware multiplier might use more energy to process a '1' than a '0', even if the clock cycles remain identical.
Countermeasures and the Cost of Security
Defending against power analysis requires decoupling the device's power consumption from the data it processes. This is typically achieved through two primary methods:
- Masking and Threshold Implementations: This involves splitting a secret value into multiple random "shares." The device operates on these shares such that the intermediate power consumption appears as random noise to an observer. Amir Moradi and Axel Pöschmann have been pioneers in fitting these Threshold Implementations into ultra-constrained environments like RFID tags, often requiring less than 2,500 gate equivalents.
- Physical Tuning: Rather than changing the algorithm, researchers like Saideep Sreekumar have proposed X-Volt, which dynamically adjusts supply voltages and driver strengths at runtime to "smear" the power profile, making statistical correlation significantly harder for an attacker.
As the Internet of Things scales, the work of researchers at forums like ASHES highlights a sobering reality: in the physical world, there is no such thing as a perfect black box. Security must be built into the silicon, not just the script.