How it works · 31 of 34 Advanced
What is a side-channel attack?
Secrets leaking through physics
Side channels: A side channel is a leak through something a machine does by accident (timing, power draw, sound, vibration) rather than through what it sends on purpose; the secret is never "read", it is worked out from the side effect.
Loading the animation…
Say it like this A side channel leaks a secret through something a machine does by accident, like timing, power, sound or shaking; nothing reads the secret, it is worked out from the side effect.
Under the hood — for builders
- Real example: a timing leak, run here
- A side channel needs no sensor. We wrote a password check that compares letter by letter and stops at the first wrong one, then timed it from outside. A guess with the right first letter takes longer, so the time gives the letter away, one position at a time:
- What the leak bought, measured
- Letter by letter, the timing attack recovered the whole password; against the constant-time check the same attack produced nine random letters:
- The laptop leak, in the paper's numbers
- Our macbook-motion-sensor paper (Tianjin University, 18 Sep 2026): an app with no permission read the motion sensor, 800 readings a second, while people typed:
- Five kinds of leak
- Timing: how long a check takes (Kocher, 1996, RSA keys). Power: how much current a chip draws (Kocher, Jaffe, Jun, 1999). Sound: a laptop's coil whine (Genkin, Shamir, Tromer, 2014, RSA keys). Cache: what another program left behind (Spectre and Meltdown, 2018). Shaking: this card's laptop.
- How each is closed
- Code that takes the same time whatever the input (constant-time). Take away the reading: standard accounts silence the laptop sensor. Add noise or blind the secret. Or make the secret worthless: a passkey can't be typed, so it can't be shaken out (C3).
- Watch out
- Side channels need closeness: code on the same machine, or a sensor in reach. The paper's figures are lab tests; it reports no attacks outside the lab.
- Sources
- Our macbook-motion-sensor paper · Python hmac.compare_digest docs · Kocher (CRYPTO 1996, 1999) · Genkin, Shamir, Tromer (CRYPTO 2014) · Kocher et al., Spectre (2018) · timing test run for this card.
What happens in the side channels animation, step by step?
- Recent MacBook Airs have a motion sensor, the part that knows when you tilt a phone. It measures movement 800 times a second.
- Your turn: the sensor knows nothing about keys. Can it leak your typing?
- Every key press shakes the case a little, and each key shakes it in its own place.
- A program matches each shake to shakes learned from other people's typing: 94 of 100 characters right, on people it had never seen.
- No permission covers the sensor. In the researchers' tests a standard account cut it off: it only answered an administrator.
- A leak is listening to a machine. The next attack talks back to it. Next: sensor spoofing.
What everyday example explains side channels?
A safecracker with a stethoscope: the lock never says the combination, but its clicks give it away.
Why should a team care about side channels?
Move staff Macs to standard accounts and control installs now, and move key logins to passkeys, so a password worked out from the keyboard is worth less.