Motivation
Biometric readings, typed passphrases and physical measurements are secrets that are never reproduced exactly: a second reading w′ of the same fingerprint differs from the enrolled reading w in a few positions. Dodis, Ostrovsky, Reyzin and Smith (arXiv:cs/0602007, SIAM J. Comput. 38(1), 2008) introduced the secure sketch, public helper data that lets anyone holding a nearby w′ recover w while leaking as little as possible about w, and the fuzzy extractor, which in addition turns w into a nearly uniform key. Their constructions for the Hamming, set-difference and edit metrics are the standard reference for this primitive in cryptography.
A construction is judged by its entropy loss: how much min-entropy of the secret the published sketch destroys. To call a construction optimal one needs a lower bound on that loss which holds for every sketch, whatever its algorithm. Appendix C of the paper supplies such a bound from coding theory. It shows that, for uniformly distributed inputs, the code-offset sketch for the Hamming metric and the set-difference sketches lose no more entropy than any sketch must. This mission formalizes that bound, Lemma C.1.
Setting
A metric space is a finite set M with an integer-valued distance dis; the paper also requires dis(x,y)=0 exactly when x=y, symmetry, and the triangle inequality (§2.1, p. 7). Random variables are identified with their laws; logarithms are base 2.
The min-entropy of a random variable A is H∞(A)=−logmaxaPr[A=a]. For a pair (A,B) the average min-entropy is
H~∞(A∣B)=−logEb←B[amaxPr[A=a∣B=b]],
the negative logarithm of the probability that an adversary who sees B guesses A.
An (M,m,m~,t)-secure sketch (Definition 3, p. 11) is a pair of randomized procedures: SS maps w∈M to a string s, and Rec maps (w′,s) back to M. Correctness: if dis(w,w′)≤t then Rec(w′,SS(w))=w. Security: for every distribution W on M with H∞(W)≥m, one has H~∞(W∣SS(W))≥m~.
An (M,K,t)-code (§2.2, p. 8) is a set C⊆M of K points such that every ball {c:dis(w,c)≤t} around a point w∈M contains at most one codeword. For S⊆M, K(M,t,S) is the largest K for which an (M,K,t)-code lies inside S, and K(M,t)=K(M,t,M). Finally (Appendix C, p. 40)
L(M,t,m)=log(∣S∣=2mminK(M,t,S)),
the worst case, over all sets S of 2m points, of the largest t-error-correcting code inside S.
In the Lean development these are minEntropy, avgMinEntropy, IsSecureSketch, IsCode, K dis t S and L dis t N hN, in the namespace FuzzyExtractors.LowerBound.
Formalization targets
Goal: Lemma C.1
If (SS,Rec) is an (M,m,m′,t)-secure sketch and 2m=N is a natural number with N≤∣M∣, then
m′≤L(M,t,m).
The bound fixes no particular metric and no particular sketch; it is stated for every finite integer-valued metric and every sketch, with an arbitrary type of sketch values.
Milestones
The proof in Appendix C has three steps, each a milestone. For W uniform on a set S of 2m points:
- some sketch value v has Pr[SS(W)=v]>0 and H∞(W∣SS(W)=v)≥m′;
- the set T of points of S that can produce v has ∣T∣≥2m′;
- under the correctness property alone, T is an (M,∣T∣,t)-code.
A fourth milestone is the lemma's second sentence: when m=log∣M∣,
m′≤logK(M,t).
Significance
The result. Lemma C.1 converts any secure sketch into a code: the residual entropy m′ of the sketch can be no larger than the logarithm of the best t-error-correcting code inside a worst-case set of 2m points. For uniform inputs it says m′≤logK(M,t), so the entropy loss is at least log∣M∣−logK(M,t). The code-offset construction built from an optimal code attains that loss, which is how the paper certifies its Hamming and set-difference constructions as optimal for uniform passwords. The companion Lemma C.2 gives the analogous bound for fuzzy extractors, up to a −log(1−ε) term. Lower bounds of this shape are what separate an efficient construction from a provably best one.
Formalizing it. The lemma has a complete, short proof in the paper; it has no machine-checked proof that we know of. The mission produces a checked version of the bound for arbitrary finite integer metrics and arbitrary randomized sketches, together with reusable definitions of min-entropy and average min-entropy on probability mass functions, of secure sketches, and of t-error-correcting codes in a general finite metric space.
Difficulty
The combinatorial core, that the preimage set of one sketch value is a code, is immediate from correctness. The work lies in the probabilistic bookkeeping. One must pass from an average bound on guessing probability to a single good sketch value, which requires handling sketch values of probability zero and an infinite (possibly uncountable) space of sketch outputs. One must then pass from "Pr[W=w∣v]≤2−m′ for all w" to "at least 2m′ points carry positive probability", and compute the min-entropy of a uniform distribution exactly. Finally the bound must be transferred to the minimum over all sets of size 2m, a finite but large family. A first idea, to reason only about deterministic sketches, does not suffice: Definition 3 allows randomized SS and Rec, and the statement quantifies over them.
Formalization scope
Laws are Mathlib PMFs; randomized procedures are maps into PMF. The sketch value type V is arbitrary, standing in for {0,1}∗. Average min-entropy is written in the equivalent joint form −log∑bmaxaPr[A=a∧B=b], which avoids conditioning on null events. "Min-entropy m" is read as H∞(W)≥m, and m,m′ are real numbers. Rec is randomized and correctness asks that it return w with probability one for every possible sketch value of w.
The explicit choices:
- L(M,t,m) is defined only when 2m is a natural number N≤∣M∣ (otherwise the minimum ranges over no sets); the goal takes such an N with (N:R)=2m. The printed K(n,t,S) inside the minimum is read as K(M,t,S), and the printed L(M,t,n) as L(M,t,log∣M∣).
- The code-bound statements explicitly assume all metric axioms from §2.1: zero distance exactly for equal points, symmetry, and the triangle inequality. Symmetry is used because the ball condition of a code measures dis(w′,c), while correctness is stated for dis(c,w′). The second-sentence milestone also assumes M nonempty, which the paper leaves implicit.
- The hypothesis is the worst-case secure sketch of Definition 3, not the average-case one of Definition 4, which would weaken the lemma.
- Definition 3's efficiency requirement is dropped; no complexity theory is formalized, and no placeholder predicate replaces it.
Two trivializing formalizations are ruled out: K(M,t,S) is the largest size of a code in S, not a count of codes; and a code is defined by the ball condition, not by "distinct codewords are at distance greater than t", which is weaker in the absence of the triangle inequality.
Needed infrastructure: the min-entropy of a uniform PMF on a finset, the averaging argument over a tsum of ENNReal values, and monotonicity of Finset.inf'. The min-entropy and code definitions are reusable by every other mission of this paper. Contributions are welcome on any milestone, in any order.
Selected references
- Y. Dodis, R. Ostrovsky, L. Reyzin, A. Smith, Fuzzy Extractors: How to Generate Strong Keys from Biometrics and Other Noisy Data, SIAM J. Comput. 38(1):97–139, 2008. arXiv:cs/0602007v4. https://arxiv.org/abs/cs/0602007 — DOI https://doi.org/10.1137/060651380
- A. Juels, M. Wattenberg, A Fuzzy Commitment Scheme, ACM CCS 1999. https://doi.org/10.1145/319709.319714
- R. Renner, S. Wolf, Simple and Tight Bounds for Information Reconciliation and Privacy Amplification, ASIACRYPT 2005. https://doi.org/10.1007/11593447_11