A smart card can leak a secret without exposing its memory. Differential power analysis (DPA) compares variations in a device’s power consumption while it performs cryptographic operations, using those patterns to infer secret-dependent information such as key bits. section 13.2.2 section 13.4
The attack follows a physical-leakage path:
- Measure the device’s electricity consumption over time while it performs encryptions of known plaintexts. section 13.4
- Compare power variations across operations and relate them to secret-dependent computations such as XORs. section 13.4
- Use the resulting correlation to extract the cryptographic key—a physical side-channel attack rather than a direct break of the algorithm. section 13.2.2 section 13.4
RSA square-and-multiply
An RSA exponentiation repeats a square operation for each private-exponent bit and performs a multiply only when that bit is set. If multiplication consumes visibly more power, a single trace can reveal the private key in an unmitigated implementation. This simpler one-trace case is called simple power analysis (SPA); DPA instead compares variations across operations. section 13.4
Figure 13.5 Some cryptographic algorithms leak so much information via their power consumption that a simple power analysis of a single power trace (a measure of the power consumed in time) can leak the private key of the algorithm. For example, this figure represents a trace of an RSA exponentiation (the message being exponentiated to the private exponent; see chapter 6). The RSA exponentiation is implemented with a square-and-multiply algorithm that iterates through the bits of the private exponent; for each bit it applies a square operation followed by a multiply operation only if the bit is set. In this example, multiplication is obviously consuming more power; hence, the clarity of the power trace.
The trace makes the leakage intuitive: operation shapes expose private-exponent bits when power consumption differs clearly. section 13.4
DPA belongs to the non-invasive attack family because it observes a device without modifying it. Hardware and software mitigations aim to make power observations less accurate, while other side channels include timing, electromagnetic radiation, vibration, sound, and returned errors. section 13.2.2 section 13.4
