Side channels: define what an adversary can observe
Distinguish forbidden direct access from secret-dependent shared-resource observations, with explicit attacker capabilities and bounded experimental claims.
On this page
The question for today
What you’ll understand
- State the secret, observation, capabilities, and nuisance variables of a channel model.
- Distinguish the sharing assumptions of Flush+Reload and Prime+Probe.
- Interpret finite classification evidence without claiming universal absence or exploitability.
Two processes can have separate address spaces and still influence a shared cache or memory path. If that influence depends on a secret, an authorized observer of its own timings may learn something without issuing a forbidden read. This does not mean every shared cluster leaks every secret, nor that a failed classifier proves isolation. A defensible side-channel claim names the attacker’s capabilities, secret distribution, observations, hardware, and experiment. We discuss original cache research to build defensive models, without assuming that historical attack conditions apply unchanged to a current platform.
Write the observation model before measuring accuracy
Let a secret variable describe the information the defender intends to keep private, and define exactly what the other tenant can observe: its own operation latency, cache-related timing, shared-service response time, or another permitted signal. Specify whether the adversary can run native code, choose placement, invoke a cache-flush instruction, obtain a fine-grained clock, or repeat an experiment. The existence of a shared resource alone is not a complete attack. The observation must carry relevant secret-dependent information under a feasible and authorized test model.
Original Flush+Reload research uses shared memory pages and cache-line flushing to observe victim activity under its stated conditions. Prime+Probe-style models instead study contention in cache sets and need not require the same shared virtual page. Do not generalize one technique’s prerequisite into a universal requirement for all cache channels. Different processors, scheduling, virtualization, timers, page sharing, and mitigation settings change the feasible observation. A defensive assessment records these conditions so that a demonstrated channel and a failed reproduction can both be interpreted precisely.
Separate signal, confounding, and evaluation leakage
In an authorized fixture, vary secret labels while controlling unrelated work, and reserve blind evaluation traces distinct from tuning data. Otherwise a classifier can memorize run identifiers, request sizes, machine temperature, or the order in which fixtures were executed. Balanced labels make a simple baseline visible, but they do not remove nuisance variables. Pair or randomize experiments, preserve the data-generation record, and check whether the proposed mitigation changes the secret-dependent mechanism rather than merely changing a convenient incidental marker.
Report false positives, false negatives, class balance, sample size, and uncertainty, not just one accuracy percentage. A classifier exceeding chance on a holdout fixture supplies evidence for that fixture and observation model. It does not automatically establish key recovery, arbitrary victim inference, or a production exploit. Conversely, chance-level results may reflect too little data, a weak observer, an irrelevant feature, or a channel outside the chosen observation. Match the conclusion to the tested capability instead of treating one statistical result as a complete confidentiality theorem.
Mitigate the named sharing mechanism and retest
Possible defenses include removing a particular sharing condition, using secret-independent implementations, partitioning an implicated resource, or changing placement and trust assignments. Each has a bounded claim. Disabling shared pages addresses a prerequisite of a specific Flush+Reload setup but does not remove every contention channel. Cache-way allocation is not a proof against all memory, timing, power, or shared-service observations. Define what changes, what remains shared, and which adversary capabilities are excluded, then repeat the evaluation alongside performance and correctness tests.
Reset the probability lab, explicitly set p=0.5 and n=20, predict the mean number of correct guesses, then Play or Step. For a separate hypothetical observer Reset and explicitly set p=0.8 and n=20 before predicting again. The means are ten and sixteen under the assumed independent model. Playback highlights exact binomial outcomes; it neither draws attack traces nor estimates p from observed accuracy. The lab therefore illustrates a stated probabilistic hypothesis, while the actual defensive experiment must justify labels, independence, observation capability, and uncertainty.
Work it through
Describe finite observer evidence without inventing a proof
An authorized blind fixture contains twenty balanced binary labels, ten of each. A previously fixed classifier predicts sixteen correctly. A label-independent uniform random guesser is the comparison model. What can be calculated, and what remains unproved?
The observed classifier accuracy is sixteen divided by twenty, or 0.8. Under the stated independent uniform-guess model, the expected correct count is twenty times 0.5, or ten; expectation is not a guarantee that every random run obtains ten.
The classifier made four errors on this fixture. Preserve its confusion matrix and the blind split so that the result cannot be explained solely by tuning on these same labels. Balanced labels alone do not eliminate nuisance variables or correlation between evaluation traces.
The result motivates investigation of the defined observation path. It does not by itself quantify confidence, prove that the feature depends causally on the secret, establish arbitrary key recovery, or show behavior on another processor and workload. Additional controlled and repeated evidence is needed.
Eighty percent is an observation about this finite fixture. The isolation claim must retain its attacker, hardware, label-generation, and evaluation assumptions.
The living notebook
Explore the model
Interactive lab · probability
Known-probability hypotheses, not attack-trace inference
For independent runs use Reset → explicitly set BOTH p and n → predict → Play/Step. Compare (.5,20), mean ten, with (.8,20), mean sixteen. Playback tours exact outcomes and does not sample traces or estimate an attacker’s real accuracy.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA toy correctness distribution clarifies a hypothesis but cannot certify confidentiality or exploitability.
Pause & reason
Check your understanding
Your turn
Try it yourself
A blind balanced fixture has forty labels and a fixed observer predicts 28 correctly. Calculate accuracy and the independent uniform-guesser expected count. Why would reusing those forty labels to tune the observer weaken the result?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compute two simple ratios or expectations, then examine the separation between choosing an observer and evaluating it.
Compare with the solution
Observed accuracy is 28/40=0.7, while the uniform independent comparison expects twenty correct predictions. These numbers alone do not supply a confidence level or a causal explanation. Tuning on the same labels can select accidental patterns and inflate the reported evaluation result. Retain a separate blind evaluation, control nuisance variables, and state the actual observation capability and hardware. A failure to find a useful classifier still would not prove all permitted observations independent of every secret under every future workload.
Keep the idea
Take it with you
- Specify secret-dependent observations and attacker capabilities explicitly.
- Different channel families rely on different sharing conditions.
- Finite evaluation and scoped mitigation evidence do not become universal confidentiality proofs.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.