Study guides · Intermediate

Side-channel observations and threat conditions

Use explicitly synthetic distributions to distinguish measurable differences, secret dependence, and an adversary’s ability to observe and infer.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. Ask what an indirect observation establishes
  2. Connect secret dependence to an observation path
  3. Read means together with overlap in synthetic data
  4. Separate statistical difference from demonstrated inference
  5. Noise does not by itself remove dependence
  6. Constant-time design does not mean identical stopwatch values
  7. Evaluate isolation and updates in a concrete configuration
  8. Decide which sizes are public before measuring
  9. Exercise: write observation and inference separately
  10. Ask Logeia about this articleCheck your understanding

Ask what an indirect observation establishes

Two operations can return identical response bodies while differing in timing, memory access, or shared-resource use. If an externally observable property depends on a secret, information may be conveyed without appearing in the explicit output. That is the starting point for side-channel reasoning. An observed difference alone, however, is not a demonstration that a secret was recovered.

This guide uses invented numerical samples, not code that extracts secrets from a real machine. We interpret distributions and state the conditions an attack would require. Read the isolation, TCB, and side-channel overview first. Define the secret, observation surface, shared resource, and available number of trials separately. Avoid both extremes: “different timing always proves a vulnerability” and “equal averages prove safety.” Each omits essential conditions about the observer and the system.

Connect secret dependence to an observation path

Imagine an operation that exits early depending on a secret. If that changes elapsed time and an adversary can measure the difference sufficiently well, the dependency and observation path connect. If the difference is explained only by a public input size, its security relevance depends on what the system treats as confidential. Identify the dependency before labeling a measurement difference a secret leak.

For a shared cache, specify which resource the secret-handling component and observer share and at what granularity. Separate processes do not imply separation of every resource. Conversely, eliminating one shared resource does not prove that timing or response-size paths also disappeared. Add the observation path to the threat model alongside ordinary requests. The diagram should show how a property affected by the secret becomes available to the particular observer.

Read means together with overlap in synthetic data

Let synthetic group A be 98, 99, 100, 100, 101, 102 and group B be 100, 101, 102, 102, 103, 104. Both values and units are invented; these are not measured nanoseconds or microseconds. Means are 100 and 102. Yet observations overlap between 100 and 102, so one observed 101 cannot identify its group with certainty.

A rule classifying values of at least 102 as B misclassifies one A sample and two B samples: nine of twelve labels are correct. This separates mean difference from classification quality. The rule was also chosen and evaluated using the same samples. A performance claim would need independent evaluation data, changing conditions, and error costs. Never cite these artificial values as a leakage rate for a particular processor or cryptographic implementation.

GroupSynthetic observationsMean
A98, 99, 100, 100, 101, 102100
B100, 101, 102, 102, 103, 104102

Separate statistical difference from demonstrated inference

Even a statistically supported difference between groups does not itself demonstrate operational secret recovery. Can the adversary create the relevant conditions, repeat trials while the secret is stable, obtain enough queries, and observe sufficient precision? An evaluator who knows internal group labels has a different capability from an external observer who does not.

For real measurements, retain input order, warmup, instrument details, concurrency, and scheduling or frequency conditions affecting results. Define exclusions in advance, preserve the distribution, and report sample counts instead of selecting favorable trials. The purpose is not merely to find some significant difference. It is to determine whether information available to the stated adversary increases. If the measurement environment differs from the claimed threat environment, explain how that difference limits the conclusion.

Noise does not by itself remove dependence

Variation between individual observations can make a dependency harder to see without eliminating it. Where independent repetition is possible, multiple observations may reduce the effect of noise. Adding a random delay alone is therefore not proof that leakage disappeared. Assess the number of available trials and how long the secret remains stable.

Rate limits and monitoring can reduce observations, but need not remove the secret-dependent computation. Distinguish mitigation roles: a suitable library addresses implementation of secret processing, resource isolation addresses an observation path, and request limits address repetition. Select a combination matching the threat rather than treating one measure as universal. Equalizing an average still leaves questions about distribution shape and other observable properties. A claim should identify which dependency or capability changed and what remains available afterward.

Constant-time design does not mean identical stopwatch values

Constant-time cryptographic design seeks to avoid behavior such as branches and memory-access patterns depending on secret values. It does not promise that every wall-clock measurement on an operating system will be numerically identical. Shared-environment noise and public inputs still exist. State which dependency is being removed; equal source line counts do not establish that property.

Compiler transformations and processor instruction behavior matter too. Ordinary applications should use maintained cryptographic implementations and supported APIs designed for the relevant properties. The HMAC experiment uses compare_digest for tag comparison, which is a focused choice. It does not automatically protect surrounding authentication logic, error responses, or logging. Review the library guarantee together with the caller's behavior and avoid extending a narrow API property into a claim about the entire service.

Evaluate isolation and updates in a concrete configuration

Labels such as process, virtual machine, or container do not uniformly determine observation paths. Examine shared resources, available privileges, and trusted code. Moving work can change a shared-cache condition while leaving network timing or response-size observations available. Describe isolation in terms of the particular adversary capability it restricts.

Runtime, cryptographic-library, operating-system, and hardware mitigations evolve. An actual assessment should record versions and configuration and consult official mitigation guidance for that configuration. Do not treat an old general statement as a current status report for every product. This lesson provides questions for an assessment, not a universal vulnerability matrix. A report should distinguish measured results from hypotheses and state the proposed secret inference, observer capability, and reproduction conditions. Those details make the claimed boundary assessable.

Decide which sizes are public before measuring

Input-dependent time has a different interpretation when the relevant size is explicitly public. Conversely, an application that promises to hide content length must consider response size and processing work as potential clues. Do not redefine information as public only after a measurement reveals it. State the protected information and permitted observations in advance, then evaluate the difference under that policy. A side-channel claim depends on both a dependency and a boundary the application intends to protect.

Exercise: write observation and inference separately

Count errors for the synthetic threshold rule: one A sample is classified as B, and two B samples as A. May you now claim seventy-five-percent secret inference against a real service? No. The values are invented, and neither observer capability nor independent evaluation conditions were demonstrated.

Finally ask whether two groups with equal means must be indistinguishable through every observation. Again no: variance, distribution shape, or other resource behavior may differ. Write one sentence stating what this table establishes and another stating what needs additional evidence. The core skill is connecting secret dependence to the proposed observer without jumping directly from a discovered difference to a vulnerability verdict. The same discipline applies when real measurements replace the synthetic table.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 23

Choose a learning path