Conceptadvanced
Quantitative information flow
Also called QIF, leakage quantification.
Measures how much a program leaks about its secret in bits, as the drop in an attacker's uncertainty after seeing the output.
Quantitative information flow (QIF) measures how much a program or a system tells an observer about a secret. Noninterference asks a yes or no question: can the public output depend on the secret at all? Most useful programs fail it on purpose. A password checker tells the user whether the guess was right, and an election reveals the tally. QIF replaces the yes or no answer with a number. It models the system as a channel from secrets to observations, models the attacker's knowledge as a probability distribution, and reports the leakage in bits as the drop in the attacker's uncertainty. The measure of uncertainty must fit the attacker. This choice is the main design decision in the field.
In plain words
Before running the program, the attacker has some idea of what the secret could be. After seeing the output, the attacker knows more. QIF asks how much more. Uncertainty is measured in bits, so a leak of 3 bits means, roughly, that the attacker's set of likely secrets got 8 times smaller. A program that reveals nothing leaks 0 bits. A program that prints the secret leaks all of it. Everything in between is a matter of degree, and the right measure depends on what the attacker wants: one correct guess, several tries, or a value close enough to the truth.
The idea
Secrets, priors and channels. The secret takes values in a finite set . The attacker's knowledge before the run is a prior distribution on . The system is a channel: a matrix with for each observable output . A deterministic program has one 1 per row. The observation turns into a posterior distribution by Bayes' theorem. The observation is whatever the model says the attacker sees: a printed value, a running time or the state of a shared resource. The guarantee covers only that observation.
Leakage as a drop in uncertainty. Pick an uncertainty measure on distributions and its conditional form , the expected uncertainty after the output. The leakage is
The capacity of the channel is the largest leakage over all priors. It does not depend on what the attacker knows in advance, which makes it the usual worst-case figure.
The choice of measure. Three measures are in common use, and they can rank the same pair of programs in opposite order.
- Shannon leakage. With Shannon entropy and conditional entropy, the leakage is the mutual information , and the capacity is the Shannon channel capacity. It measures the expected number of bits needed to describe the secret. Early work on covert channels and the static analysis of Clark, Hunt and Malacaria (2007) use it.
- Min-entropy leakage. With min-entropy, , the leakage measures how much the output raises the chance of guessing the secret in one try. Smith (2009) proposed it because Shannon leakage can call a program safe when it lets the attacker guess the secret often. See min-entropy leakage.
- g-leakage. A gain function scores each guess against each secret, which models attackers with several tries or partial goals. Min-entropy leakage is one case. See g-leakage.
All QIF pages on this site measure entropy and leakage in bits, with .
Facts that hold for these measures. Each is a theorem for min-entropy leakage and g-leakage, and the first two also hold for Shannon leakage.
- Leakage is never negative: an attacker can ignore the output.
- Processing the output further cannot increase leakage.
- A channel that satisfies noninterference, so that every row of is the same, leaks 0 bits. The converse fails for min-entropy leakage: a channel can leak 0 bits to a one-try attacker under a given prior while its output still depends on the secret.
- The min-capacity bound gives the worst case in closed form, , and a deterministic program with outputs leaks at most bits under every prior. The min-capacity is also at least the Shannon capacity and at least every g-capacity.
Adversary. Unless a page states otherwise, the attacker knows the prior and the channel, sees one output and has unbounded computing power. An adaptive attacker who chooses inputs and runs the system many times needs a model of the whole interaction; Köpf and Basin (2007) give one for side channels.
Examples
The last two bits. Let be uniform on and let the program output . Each output is equally likely and leaves two secrets. Shannon leakage and min-entropy leakage both equal 2 bits, and the one-try chance of guessing goes from to .
A password check. Let be uniform on 8 values and let the output be whether a guess equals . The Shannon leakage is the entropy of the output, bits. The min-entropy leakage is 1 bit: the attacker's chance goes from to . The program fails noninterference, yet a single check leaks little. Repeated checks are a different system: an attacker who may test every value learns the whole secret.
An election. Following Smith (2009), suppose each of voters picks one of two candidates independently with probability , and the system reveals the number of votes for the first candidate. The secret is the vector of votes, with equally likely values, and the output has possible values. The min-entropy leakage is bits. For it is bits, and the chance of guessing every vote rises from to .
Two measures that disagree. Let be uniform on 8-bit values. Program A outputs when is a multiple of 8 and outputs 1 otherwise. Program B outputs the last three bits of . Shannon leakage rates A at 1.169 bits and B at 3 bits. But A reveals the whole secret one time in eight, and min-entropy leakage rates it at bits against 3 bits for B. The numbers come from the exact calculation on the min-entropy leakage page.
A noisy channel. The binary symmetric channel with crossover probability 0.1 has Shannon capacity bits and min-capacity bits. The two capacities answer different questions: how many bits per use can a sender and a receiver who cooperate get through with coding, and how much does one use help a one-try guesser.
Where it is used
- Covert channel analysis. The bandwidth of a covert channel is a capacity in bits per unit time. Since few channels can be closed completely, the practical question is often whether the bandwidth is low enough, not whether it is zero.
- Side channels. A running time, a cache state or a power trace is an output of a channel from the key or the input. Bounding the number of distinct observations bounds the min-entropy leakage; see the min-capacity bound. Köpf and Basin (2007) model adaptive side-channel attacks in this setting.
- Program analysis. Static analyses bound the Shannon or min-entropy leakage of a program, for example by bounding the number of its outputs. Clark, Hunt and Malacaria (2007) give such an analysis for a small imperative language.
- Declassification policies. A declassification policy may allow a program to release some information, and QIF can state how much: at most bits for a stated measure and adversary.
- Privacy of released data. Gain functions model attackers who want to learn a property of a person's record, such as an attribute value, rather than the whole record.
References
- Geoffrey Smith, On the foundations of quantitative information flow, Proceedings of FoSSaCS 2009, LNCS 5504, pp. 288 to 302; Section 4 (programs on which Shannon leakage misjudges the one-guess threat) and Section 5 (vulnerability, min-entropy leakage, the password checker and the election example)
- David Clark, Sebastian Hunt and Pasquale Malacaria, A static analysis for quantifying information flow in a simple imperative language, Journal of Computer Security 15(3), 2007, pp. 321 to 371, Shannon leakage of while programs and a static analysis that bounds it
- Boris Köpf and David Basin, An information-theoretic model for adaptive side-channel attacks, Proceedings of ACM CCS 2007, pp. 286 to 296, the leakage of an adaptive attacker who chooses inputs and observes a side channel
- Mario S. Alvim, Konstantinos Chatzikokolakis, Catuscia Palamidessi and Geoffrey Smith, Measuring information leakage using generalized gain functions, Proceedings of CSF 2012, pp. 265 to 279, gain functions, g-leakage and the comparison of capacities
- Mario S. Alvim, Konstantinos Chatzikokolakis, Annabelle McIver, Carroll Morgan, Catuscia Palamidessi and Geoffrey Smith, The Science of Quantitative Information Flow, Springer, 2020, Part I and Part II (secrets, channels, vulnerability, leakage and capacity)
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 STSGVR Edit this page History Report an error Markdown