liveBook · Manning

Side-channel attack

As explained in Real-World Cryptography

A side-channel attack infers secret-dependent information from physical or operational leakage such as timing, power consumption, or electromagnetic radiation.

A cryptographic device can reveal a secret without printing it. An attacker may measure timing, power use, electromagnetic radiation, vibrations, sound, returned errors, or memory-access delays, then infer secret-dependent information. section 13.0 section 13.4

One power trace, one private key

In RSA square-and-multiply exponentiation, each private-exponent bit triggers a square and, when set, a multiply. If multiplication consumes more power, a single power trace can expose the private key through simple power analysis. 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.

Use the power trace to connect algorithmic branches with observable physical leakage: visibly stronger multiplication activity reveals private-exponent bits. section 13.4

Reduce leakage and limit what a successful attack can expose:

  • Use constant-time algorithms; avoid branches and memory accesses controlled by secret data. section 13.5
  • Apply blinding and masking to decorrelate sensitive operations from secrets or known input data. section 13.5
  • Return indistinguishable errors and avoid early exits, especially during RSA PKCS#1 v1.5 padding validation in TLS. section 13.4
  • Combine software and hardware defenses, use unique keys per device or operation, and accept residual risk explicitly. section 13.5

How Real-World Cryptography covers it

How deep it goes
Explains leakage mechanisms, demonstrates RSA power analysis, and gives software mitigations without detailing attack implementation.
Examples
Uses RSA square-and-multiply power traces, TLS padding errors, CPU caches, electromagnetic radiation, sound, and timing as examples.
What it assumes
Assumes basic cryptographic operations and protocols, while introducing adversarial leakage through concrete RSA and TLS examples.
What you can do after
Apply constant-time coding, secret-independent memory access, masking, blinding, uniform errors, and layered hardware defenses.
How it connects
Connects side-channel attacks with RSA, TLS, Bleichenbacher attacks, constant-time algorithms, masking, blinding, and hardware security.

Also explained in

Compare how 3 books explain side-channel attack →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.