← Back to section · Security Risk & Assessment
The Side-Channel Spectrum: How Secrets Leak Through the Physical World
A cipher can be mathematically impeccable while the hardware running it leaks secrets through power draw, electromagnetic radiation, caches and timing. This article maps the main leakage channels and the layered principles of defence.
Beyond Mathematics: Physics
The attacker in cryptography textbooks can only see ciphertexts, submit plaintexts and observe protocol messages. The attacker in the real world can do more: attach an oscilloscope to a chip’s power pins, measure how long each instruction takes, or, when sharing a processor with the victim, measure cache hits and misses. Side-channel attacks exploit exactly this gap — the algorithm has no weakness on paper, yet the physical device executing it leaves traces everywhere.
The history of these attacks is nearly as long as that of modern cryptographic engineering. In the 1990s, timing analysis and power analysis were publicly introduced, with the smartcard industry first in the line of fire; in the 2000s, cache timing extended the battlefield to general-purpose processors; and the Spectre-class vulnerabilities disclosed in 2018 proved that microarchitectural optimisation itself can become a cross-process leakage source. The first step in understanding side channels is to classify the leakage channels clearly.
Four Main Channels
The timing channel is the oldest and most widespread: if a program’s execution time correlates with secrets — comparing a password byte by byte with early exit, or a table lookup touching different memory pages — an attacker can recover the secret gradually through many measurements and statistics. It needs no physical contact; remote network timing works too when the noise is low enough.
The cache channel arises from sharing. The multi-level caches of modern processors are shared by processes on the same core or chip, and by measuring the eviction of their own data an attacker can infer which cache lines the victim accessed, and from that, its lookup indices and key bits. Such attacks turn the “co-tenant” into a real threat, and they must be counted among the risks of multi-tenant cloud environments.
Power and electromagnetic channels require physical proximity. A chip’s current consumption and electromagnetic radiation differ measurably depending on the instructions executed and the data processed. Simple power analysis can read the outline of some operations directly, while differential power analysis uses statistics to extract keys from thousands of traces. This is a routine item in the evaluation of smartcards, secure elements and IoT devices.
The fault channel is, strictly speaking, an active side channel: the attacker disturbs the device with voltage, clock or laser manipulation to force computation errors, then infers secrets from the faulty results. It belongs to a different class from passive measurement, but the two are often discussed within the same evaluation framework; this site treats fault injection in a dedicated article.
Attack Distance Determines the Risk Level
When evaluating side channels, the first variable is the attacker’s distance from the target. Physical-contact attacks (power, electromagnetic, fault) are the most powerful but require the attacker to hold the device or enter its near field, so they mainly threaten cards, terminals and unattended equipment. Same-machine attacks (cache, microarchitectural) need no physical contact but require attack code sharing hardware with the victim; cloud hosts and browsers are the typical battlegrounds. Remote attacks rely only on network timing, are limited by jitter noise, and demand huge sample counts and statistical patience — but once they work, their reach is the largest. The same implementation, deployed on a single-tenant server, a public cloud and a smartcard, faces entirely different side-channel risks: writing the deployment scenario into the threat model is the first step of evaluation.
Constant Time: One Discipline, Several Meanings
For software implementations, the core defensive discipline is constant-time programming: execution time, memory access patterns and control flow must not depend on secret data. Concretely, secret-dependent operations must use fixed-latency implementations, avoiding division by secret values and data-dependent branches; table lookups become full-table scans or bitslicing; secret comparisons never exit early. The discipline sounds simple, but honouring it requires respect for both compiler and hardware — a compiler may optimise hand-written constant-time code back into data-dependent branches, and speculative execution may bypass software-level protections.
It must be stressed that constant time only closes the timing and cache channels. Against power and electromagnetic leakage, the industry’s standard countermeasures are masking (splitting a secret into several random shares that are processed separately) and hiding (adding random delays, noise and dual-rail logic to decorrelate leakage from the secret). Both require cooperation at the hardware and implementation level, and the higher the protection order, the higher the cost; the choice must follow the device’s threat model.
Defence Must Be Layered — and Verifiable
Mature side-channel defence is never a single technique but a layered combination: at the algorithm and protocol layer, choose implementation-friendly structures and limit how many observable samples a single key produces; at the implementation layer, enforce constant time and masking, and run timing-leakage detection tools (statistical tests of the dudect kind) as regression tests in continuous integration; at the system layer, use process isolation, cache partitioning and dedicated secure hardware to shrink the shared surface; at the evaluation layer, subject high-value devices to independent laboratory side-channel assessment and certification.
One more principle is often overlooked: leakage can never be reduced to absolute zero; the goal is to raise the cost of exploitation to an impractical level. When evaluating an implementation, instead of asking “does it leak?”, ask “how many traces, how close a physical presence, and how much statistical power does the attacker need?” Only quantified leakage can enter engineering decisions.
Summary
Side channels remind us that the security boundary of a cryptographic system never stops at the algorithm. Power, electromagnetic radiation, caches and time are the four main leakage channels, each with its own attack distance and countermeasures. Constant-time programming, masking and layered isolation form the backbone of defence, while continuous leakage detection and independent evaluation decide whether those defences hold in reality. When systems migrate to post-quantum algorithms, not one of these channels disappears — lattice arithmetic and hash trees must pass the same test.
References
- Paul Kocher’s original papers on timing attacks and differential power analysis (1996 / 1999, public literature).
- Osvik, Shamir, Tromer: Cache Attacks and Countermeasures (CT-RSA 2006, public paper).
- NIST SP 800-57 and the public side-channel evaluation methodology documents of national evaluation laboratories.
Tags: side channelsconstant timecache timingpower analysis