Every function you call produces two things: an output and a duration. Most programmers only worry about the output. Attackers watch both.
A timing side channel is the gap between what a program is supposed to reveal and what its execution time accidentally reveals. The gap can be tiny — a few nanoseconds — but when you can measure it millions of times and average the noise away, even single-bit differences become recoverable.
The classic example is a password or token comparison. A naive byte-by-byte check returns early the moment it finds a mismatch: comparing "secret" against "sadder" stops at the second character and returns in roughly half the time it takes to compare two strings that differ only at the last byte. An attacker who can send many guesses and measure response times can recover the secret one byte at a time — no brute force needed.
This is not a theoretical concern. Real attacks have broken web-application tokens, MAC verifiers, and even some cryptographic key-comparison routines in production systems.
Comments
Loading comments...