Correlation-robust hash functions #
The finite notion Cslib.Crypto.CorrelationRobust.advantage measures how well one test tells
(t, fun j => H j (t j + s)) from (t, u), for uniform s, t and u, for one family H on
finite types. This module states the asymptotic assumption on a hash given on words,
hash : List Bool → Bool, in the form of Definition 1 of Ishai, Kilian, Nissim and Petrank
[IKNP03] (§5, p. 157): an efficiently computable h : {0,1}* → {0,1} is
correlation robust if for uniform k-bit strings s, t₁, …, tₘ the bits
h(t₁ ⊕ s), …, h(tₘ ⊕ s) are pseudorandom given t₁, …, tₘ, for polynomially many m.
At level k with m queries, CorrelationRobust.atLevel hash k m hashes the word of the k bits
of each input with hash, the same function at every position. A distinguisher for the query
count m : ℕ → ℕ (CorrelationRobust.Distinguisher m) is a finite test at each level k on
m k inputs of k bits and m k output bits. It is PPT (CorrelationRobust.Distinguisher.IsPPT)
when one uniform strict PPT machine reads CorrelationRobust.encInput m: the unary level, the
framed list of the input words and the word of the output bits, and writes the test's bit.
CorrelationRobust hash asks that the hash be computable in polynomial time and that, for every
polynomially bounded query count m, every PPT distinguisher have negligible advantage. Its
level-k advantage is, by definition, the finite advantage
CorrelationRobust.advantage (CorrelationRobust.atLevel hash k (m k)) (D k), so the finite
theorems about that advantage apply at every level without a bridge.
Relation to the source #
The two parts of the assumption are Definition 1's two conditions. polyTime reads "efficiently
computable" as one deterministic polynomial-time machine on all words. The security condition
secure differs from Definition 1 as follows; each difference admits fewer distinguishers, so for
a hash with polyTime, Definition 1 implies secure.
- Distinguishers are uniform strict PPT machines, where Definition 1 has circuits of size
p(k). A machine's clock is polynomial in the length of its input, which for a polynomially boundedmis polynomial ink. - Query counts. The count is a fixed polynomially bounded function
mof the level, with a negligible function for each suchm, where Definition 1 has one negligible function for allm ≤ q(k)for each polynomialq.
The bound on m is needed. With m k = 2 ^ k queries, a distinguisher whose clock is polynomial
in its input length can try every s against all the outputs, so the condition without the bound
would fail for every hash computed in polynomial time.
The protocol of [IKNP03] (Fig. 1, p. 152) hashes (j, u) with a random
oracle H : [m] × {0,1}^k → {0,1}^ℓ; §5 (p. 157, with footnote 10) replaces it by a correlation
robust h for bit transfers (ℓ = 1), hashing u alone. CorrelationRobust.atLevel is that
replacement: it ignores the position.
Main definitions #
Cslib.Crypto.CorrelationRobust.atLevel: the hash of a word function at levelk.Cslib.Crypto.CorrelationRobust.Distinguisher,Cslib.Crypto.CorrelationRobust.Input,Cslib.Crypto.CorrelationRobust.encInput,Cslib.Crypto.CorrelationRobust.Distinguisher.IsPPT: distinguishers, what they read, and their efficiency.Cslib.Crypto.CorrelationRobust: the asymptotic assumption.
This module has definitions only. The test module CslibFrontierTests.Crypto.CorrelationRobust
shows that a constant hash is not correlation robust.
References #
- Y. Ishai, J. Kilian, K. Nissim, E. Petrank, Extending Oblivious Transfers Efficiently, §5 (Definition 1, p. 157).
A distinguisher for the query count m: at each level k, a test on m k inputs of k bits
and m k output bits. Distinguisher.IsPPT states its efficiency.
The word of the inputs determines them.
The encoding of a distinguisher's input: the unary level, the word of the inputs (inputsWord)
and the word of the output bits (encBitString), each framed except the last.
A distinguisher is PPT when one uniform strict PPT machine reads encInput m and writes the
test's bit.
Correlation robustness of a hash on words ([IKNP03], Definition 1,
§5, p. 157): the hash is evaluated in polynomial time, and for every polynomially bounded query
count m and at every level k, no uniform strict PPT distinguisher tells the inputs t with the
bits hash (t j + s), for a uniform k-bit s, from t with uniform bits, except with
negligible advantage. The distinguishers are uniform and the negligible function may depend on
m; Definition 1 implies the security condition (module documentation).
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime hash Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBool
One deterministic machine evaluates the hash.
- secure (m : ℕ → ℕ) : PolynomiallyBounded m → Game.Indistinguishable (fun (D : Distinguisher m) (k : ℕ) => realGame (atLevel hash k (m k)) (D k)) (fun (D : Distinguisher m) (k : ℕ) => idealGame (D k)) Distinguisher.IsPPT
For every polynomially bounded query count
m, the finite real and ideal games ofCorrelationRobust.atLevel hash k (m k)at levelkare indistinguishable for PPT distinguishers.