Cryptographic leakage 2026-11-05
Cryptographic leakage is information about secret inputs or internal state that an observer obtains through the interfaces or observations admitted by a security model. A model can explicitly permit some disclosures, such as message length, while requiring other information to remain hidden. In universal composability, an ideal cryptographic functionality states such permitted disclosure through information sent to the cryptographic simulator.[ref]
Universally Composable Security: A Tutorial by Ran Canetti. PDF pp. 25–26, ideal-service leakage and wrapper; p. 33, message-hiding service with lengths and timings exposed
A simple cryptographic leakage function writes the disclosed value as , where is a secret random variable. An original example takes uniform on the 256 eight-bit strings and lets reveal its first four bits. Before observing , every complete secret has probability . Afterwards, exactly sixteen secrets remain equally likely, so the best complete-secret guess succeeds with probability . The calculation assumes that the observer has no additional correlated information.
Using information entropy measured in bits, this example givesHere is conditional entropy and is mutual information. Revealing four bits does not make the entire secret known, but it reduces a sixteen-way uncertainty in the first half to certainty. Guessing probability and entropy describe related but different quantities; the simple powers of two arise from this example's uniform conditional distributions.
Length disclosure gives another operational example. Suppose a cryptographic environment privately chooses a uniform bit , then submits a one-byte message when and a two-byte message when . Observing the length reveals exactly, even if the encryption hides all message contents at each fixed length. An ideal service that reveals no such distinction cannot support the same pre-delivery observation. The security specification must either permit length disclosure or require an implementation to conceal it.
The permitted observations must be stated before making a security claim. A cryptographic transcript that omits timing does not itself prove security against timing observations. Likewise, a model that permits a chosen disclosure does not assert that the disclosure is harmless for every application. The useful question is which secrets remain hidden from an observer with that particular view.
Let be uniformly distributed over the bit strings of length , and disclose only its Hamming weight , the number of one-bits. This is a deterministic cryptographic leakage function. Its consequences depend on the observed weight, even though has only possible values. A permitted disclosure belongs in the security model; the existence of that model does not establish that the disclosure is harmless.[ref]
Universally Composable Security: A Tutorial by Ran Canetti. PDF pp. 25 and 33, permitted leakage and message-length disclosure
There are strings of weight . Hence has a binomial distribution, and conditional probability givesfor each compatible string . The optimal complete-string guess therefore succeeds with probability after that observation. For , observing leaves six equally likely strings; observing identifies
0000 exactly.Averaging over disclosed weights yieldscompared with before disclosure. For four bits this changes to . The worst conditional outcome has success probability one. An average guarantee and a guarantee for every observation are consequently different claims.
The information entropy calculation answers another question. Since is determined by , the mutual information satisfies andFor , bits and bits. These entropy values are not obtained by taking the logarithm of the average guessing probability. All calculations here assume the uniform prior and no additional correlated observation.