Definitionadvanced
Noninterference
Also called secure information flow.
A program is noninterfering if its public outputs do not depend on its secret inputs, a property checked by type systems or analysis.
Noninterference says that the public outputs of a program depend only on its public inputs: if two runs start with the same public values, they end with the same public values, whatever the secrets were. It is the standard meaning of "the program does not leak its secrets", and it covers both direct copies of a secret and leaks through the control flow. It is a property of pairs of runs, not of single runs, so one Hoare triple cannot state it; it is a 2-safety property, and self-composition turns it into an ordinary safety property. Security type systems check a stronger condition that implies it.
Definition
Setting. A program in a small deterministic while language runs over integer variables. Each variable has a level: low (, public) or high (, secret). A state maps the variables to integers, and two states are low-equivalent, , if they agree on every low variable. is the final state of the run of from , or if the run does not stop.
Noninterference (termination-insensitive). is noninterfering if for all states , whenever and , then .
Termination-sensitive noninterference adds: if and only if . So the secret cannot decide whether the program stops.
More levels. With a lattice of levels, as in Denning's model, is noninterfering if for every level the inputs at levels at or below fix the outputs at levels at or below . The two-level case is the one above. For nondeterministic or concurrent programs the usual form is possibilistic: for , every final state from is low-equivalent to some final state from .
Runs and k-safety. A run of is a pair with . A property of programs is a trace property if there is a set of runs such that has the property exactly when every run of is in . It is a k-safety property, as Terauchi and Aiken call it, if there is a set of -tuples of runs such that has the property exactly when no runs of form a tuple in .
Theorem. (1) Noninterference is a 2-safety property. (2) It is not a trace property. (3) It is undecidable.
Proof. (1) Let be the set of pairs with and . By the definition, is noninterfering exactly when no two runs of form a pair in .
(2) Suppose is a set of runs that defines noninterference as a trace property. Take one low variable and one high variable , and the program . Its runs are the pairs with . Fix one run and let . The program , for the constant , is noninterfering, since its low output is always . The run is one of its runs, so . This holds for every run of , so has the property. But leaks: the states with and are low-equivalent, and the outputs have and . This contradicts the choice of .
(3) For a program that does not use or , let . If stops, then leaks as in (2). If does not stop, has no runs and is noninterfering. So a decision procedure for noninterference would decide the halting problem. This is also an instance of Rice's theorem. The complement is recursively enumerable, since one can search over pairs of inputs and run them.
Termination-sensitive noninterference is not a 2-safety property: a violation can need a run that does not stop, and no finite part of it shows the violation.
Examples and non-examples
Take low and high.
| program | noninterfering? | why |
|---|---|---|
| no | explicit flow: and give different | |
| no | implicit flow: no assignment copies , but the branch does | |
| yes | the final is always 0 | |
| yes | the final is always 0 | |
| yes | flow from low to high is allowed | |
| yes, termination-insensitive; no, termination-sensitive | the secret decides whether the program stops | |
| yes | but the time it takes leaks , a timing attack that this definition does not model | |
| no | a password check leaks one bit; real policies allow it with declassification |
The third and fourth rows show that the definition is semantic. The flow-insensitive type system of Volpano, Irvine and Smith rejects , because receives a high value at some point, and it rejects too. Its soundness theorem says that typable programs are noninterfering; the converse fails, as it must, since the property is undecidable. A flow-sensitive analysis accepts the third row but still rejects the fourth.
A taint analysis tracks explicit flows only, so it does not prove noninterference: the implicit flow in the second row passes it. A check for noninterference must also mark everything assigned under a branch on a secret.
Related definitions
- Safety and liveness. Safety and liveness properties are trace properties. Noninterference is neither, because it compares runs. Clarkson and Schneider call such a property a hyperproperty, a set of sets of traces, and noninterference is a safety hyperproperty.
- Self-composition. Because noninterference is 2-safety, it holds exactly when a program that runs two renamed copies of one after the other satisfies the safety triple . See self-composition.
- Program equivalence. Noninterference says that is equivalent to itself when the inputs are related by and the outputs are compared by . It is a relational property, like the equivalence of a program and its compiled form in translation validation.
- Type soundness. A security type system is sound when every typable program is noninterfering. This is the analog of type soundness, but it is stated about two runs.
- Timing and constant-time code. If the time of a run is an output, the definition becomes "constant-time" execution, the usual defense in cryptographic code.
References
- Joseph A. Goguen and Jose Meseguer, Security policies and security models, Proceedings of the 1982 IEEE Symposium on Security and Privacy, pp. 11 to 20, the definition of noninterference between groups of users of a system
- Dorothy E. Denning, A lattice model of secure information flow, Communications of the ACM 19(5), 1976, pp. 236 to 243, security classes ordered in a lattice and the explicit and implicit flows of a program
- Dennis Volpano, Cynthia Irvine and Geoffrey Smith, A sound type system for secure flow analysis, Journal of Computer Security 4(2-3), 1996, pp. 167 to 187, the security type system for a while language and its soundness theorem, which states noninterference for typable programs
- Andrei Sabelfeld and Andrew C. Myers, Language-based information-flow security, IEEE Journal on Selected Areas in Communications 21(1), 2003, pp. 5 to 19, the semantic definition of noninterference, termination and timing channels, and declassification
- Tachio Terauchi and Alex Aiken, Secure information flow as a safety problem, Proceedings of SAS 2005, LNCS 3672, the definition of 2-safety and the observation that noninterference is a 2-safety property and not a safety property
- Michael R. Clarkson and Fred B. Schneider, Hyperproperties, Journal of Computer Security 18(6), 2010, pp. 1157 to 1210, hyperproperties as sets of trace properties, and noninterference as a hyperproperty that is not a trace property
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag DQHM28 Edit this page History Report an error Markdown