Definition
Noninterference is a formal security property of a program or system: changing its secret inputs causes no change in anything a public observer can see. Stated with two runs, any two runs whose inputs agree on everything the observer may know produce observations that the observer cannot tell apart. Joseph Goguen and José Meseguer defined it in 1982 [424]. The property is only as strong as two choices: which inputs the observer may know, and what the observer sees, such as output values, timing or whether the run finishes.
The idea
A single run cannot show a leak. A program returns 3; whether that 3 reveals anything about a secret cannot be seen in that run. A leak is a difference: if the program returns 3 when the secret is 0 and 2 when the secret is 1, an observer who sees the result learns the secret. Noninterference turns this into a requirement on every pair of runs: fix everything public, vary only the secret, and the observer must see no difference.
A blind taste test is a fair picture. Two cups differ only in the brand of cola; if the taster cannot tell them apart, the brand does not interfere with the taste. The picture stops in two places. Noninterference must hold for every pair of secrets, not for one tasting. And the verdict depends on what the taster may use: a taster who may also time how long each cup took to pour may tell the cups apart when the taste alone does not.
Because the property compares two runs, it is not a property of any single run; Clarkson and Schneider call properties of sets of runs hyperproperties [521]. Watching or testing single runs therefore cannot confirm noninterference. A common proof technique, self-composition, joins two copies of the program into one program and proves that the copies’ public outputs always agree.
How it works
Stating noninterference for a given system means making five choices explicitly.
Inputs. Split the inputs and the initial state into a low part, which the observer may know, and a high part, which must stay secret. Low and high are the usual words for public and secret.
Equivalent starting points. Two starting states are low-equivalent when their low parts are equal; their high parts may differ in any way.
Observation. Define what the observer sees of one run. Common choices, from weakest to strongest: the final values of low outputs; the sequence of low outputs as they appear; that sequence plus whether the run finishes; that sequence plus the time of each output, counted in instructions or in clock cycles; and, in addition, the addresses of memory accesses, which caches can reveal.
Equivalent observations. Decide when two observations count as the same. For a deterministic program, which always behaves the same way on the same input, this means equal. For a program that uses randomness, the probability distributions of the observations must be equal, or, in cryptographic arguments, impossible to tell apart by any feasible computation.
Termination. Termination-insensitive noninterference compares only pairs of runs that both finish. Termination-sensitive noninterference also requires that if one run of a pair finishes, the other does too.
The property then reads: every pair of low-equivalent starting points gives equivalent observations. Each choice in steps 3 to 5 gives a different property, and a proof of one says nothing about a stronger one. Information-flow control §1.41, which labels data as secret or public and rejects programs that let secret data reach public outputs, is the usual way to enforce noninterference in a program.
Worked example
Let be a public input and a secret input that is 0 or 1. Fix and compare the run with and the run with .
Program A returns . Both runs return . The observations are equal, so A satisfies noninterference for final values.
Program B returns . The runs return and . The observer tells them apart and learns : B violates noninterference.
Program C returns but takes 5 time units when and 9 when . With final values as the observation, both runs give 3, and C satisfies the property. With the pair (value, time) as the observation, the runs give (3, 5) and (3, 9), and C violates it. The program is the same; only the observation changed.
Program D returns when and loops forever when . Termination-insensitive noninterference compares only pairs in which both runs finish, and no such pair differs, so D satisfies it. D violates termination-sensitive noninterference, because one run finishes and the other does not: an observer who waits learns .
Program E picks a random bit , 0 or 1 with probability each, and returns , the remainder of after division by 2. With the result is 0 or 1 with probability each; with it is 1 or 0 with probability each. The two distributions are equal, so E satisfies noninterference for distributions of final values, although for any fixed value of the output depends on .
Stated precisely
Let mean that the starting states and have equal low parts. Let be the run of the program from , and let , the observation function, map a run to what the observer sees of it. The program satisfies noninterference with respect to when In the termination-insensitive variant, the equation is required only when both runs finish. For a program that uses randomness, is a probability distribution, and the equation compares distributions. Applied to program B, the states with and or are low-equivalent, and gives 2 and 3, so the condition fails.
A policy that permits a release replaces by a stricter relation. In delimited release, and must also agree on the value of each permitted release expression, such as the result of a password comparison, before their observations are compared.
A proof of noninterference rests on a model with two parts: the semantics of the program, which defines what a run is, and , which defines what the attacker sees. The proof transfers to a real system only if the compiled program on the real machine behaves as the semantics says and the real attacker sees no more than .
Limits and common mistakes
A proof for a weaker observation covers nothing stronger. A proof about final values says nothing about timing, termination, error messages, message sizes or caches; a secret that shows only through such effects leaks through a side channel §1.29.
Tests cannot establish noninterference. A test compares finitely many pairs of runs, and the property speaks about all pairs.
Real programs must reveal something. Strict noninterference rejects a password check, whose verdict depends on the password. The property that applies is then a weakened one that names the permitted release, which is declassification §1.43.
Termination-insensitive noninterference can leak a whole secret to an observer who runs the program many times with public inputs of the observer’s choice. A program that loops forever exactly when the public input equals the secret satisfies it, yet each run answers one guess.
Refinement can destroy the property. A specification that may output either bit, whatever the secret, reveals nothing, because every output is possible in every case. An implementation that always outputs the secret bit is a valid refinement of that specification and reveals everything. Noninterference shown for a nondeterministic specification therefore does not carry over to its implementations; this is called the refinement paradox.
Questions answered
Which observations and timing effects are included in the equivalence relation?
The equivalence relation includes exactly the observations that the noninterference definition names, and nothing more; timing, termination and other effects are included only when the definition lists them. Noninterference is the property that changing secret inputs changes nothing a public observer can see. A noninterference statement fixes two relations. The first, low-equivalence, says which starting states count as the same to the observer: normally those with equal public inputs and equal public initial state. The second says which observations count as the same, and it is fixed by the observation function.
Common observation functions, from weakest to strongest, are: the final values of public outputs; the sequence of public outputs; that sequence plus whether the run finishes (termination-sensitive); that sequence plus the time of each output, in instructions or clock cycles (timing-sensitive); and, in addition, memory-access addresses, which caches can reveal. For programs that use randomness, equivalent means equal probability distributions of observations, or, in cryptographic arguments, distributions that no feasible computation can tell apart. To read a noninterference claim, find which of these it names. A proof whose relation compares final values says nothing about timing, about whether the program finishes, about faults and error messages, or about message sizes.
Related entries: Information-flow control (§1.41), Declassification (§1.43), Confidentiality (§1.8), Side channel (§1.29), Refinement (§3.32), Integrity endorsement: when untrusted input may influence trusted state (§1.49). Further reading: [424, 521].