The leftover hash lemma is a lemma in cryptography first stated by Russell Impagliazzo, Leonid Levin, and Michael Luby.
[1] Given a secret key X that has n uniform random bits, of which an adversary was able to learn the values of some t < n bits of that key, the leftover hash lemma states that it is possible to produce a key of about n − t bits, over which the adversary has almost no knowledge, without knowing which t are known to the adversary.
Since the adversary knows all but n − t bits, this is almost optimal.
More precisely, the leftover hash lemma states that it is possible to extract a length asymptotic to
(the min-entropy of X) bits from a random variable X) that are almost uniformly distributed.
In other words, an adversary who has some partial knowledge about X, will have almost no knowledge about the extracted value.
This is also known as privacy amplification (see privacy amplification section in the article Quantum key distribution).
Randomness extractors achieve the same result, but use (normally) less randomness.
and independent of X, we have: where U is uniform over
is the min-entropy of X, which measures the amount of randomness X has.
The min-entropy is always less than or equal to the Shannon entropy.
is the probability of correctly guessing X.
Therefore, the min-entropy measures how difficult it is to guess X.