Documentation

CslibFrontier.Crypto.Computational.CircularCorrelationRobust

Circular correlation robust hash families #

The finite notion Cslib.Crypto.Garbling.CCR.advantage measures how well one adversary tells a circular oracle from a random function, for one hash on finite types. This module states the asymptotic assumption on a hash family given on words, hash : List Bool → List Bool → List Bool, in the form of Definition 1 of Zahur, Rosulek and Evans [ZRE15] (§4.1, p. 10 of ePrint 2014/756, version of March 16, 2015): for a uniform R with least significant bit 1, the oracle Circ_R(x, i, b) = H(x ⊕ R, i) ⊕ bR must be indistinguishable from a random function by polynomial-time adversaries that never query one (x, i) with both values of b.

At level k a label is a (k + 1)-bit key and a colour bit, (k + 2) bits in all, and a tweak has k bits. Labels are read and written on words as the garbling schemes on words do it (CslibFrontier.Crypto.Primitives.Garbling.LabelWord): labelBits writes the key bits, then the colour, and labelOfWord k reads a label from the first k + 2 bits of a word, padding with false. CCR.atLevel hash k hashes the label's word with the tweak's bits and reads the answer as a label. The offset CCR.offset R = (R, true) has colour true: the colour is the least significant bit that Definition 1 fixes to 1. A word distinguisher W : OracleDistinguisher sends a query (x, t, b) as the request of the k + 2 bits of x, the k bits of t and the bit b, and reads a label as its k + 2 bits (CCR.codec k).

CircularCorrelationRobust hash asks that the hash be computable in polynomial time and that every uniform strict oracle-PPT word distinguisher that never repeats a tweak, at any level, have negligible advantage. Its level-k advantage is, by definition, the finite advantage CCR.advantage (CCR.atLevel hash k) CCR.offset CCR.offset ((CCR.codec k).adapt (W k [])), so the finite theorems about CCR.advantage apply at every level without a bridge. The lemma CircularCorrelationRobust.negligible_advantage is this finite-advantage reading of the assumption, not a separate result. Legality is required at every level, as in the source; a reduction that would need more than the 2 ^ k tweaks of level k stays legal by making no queries there.

Relation to the sources #

The assumption has two parts. Its security condition secure is Definition 1 of [ZRE15] with the differences below, each of which admits fewer adversaries or fixes a parametrization. So for a hash family that is evaluated in polynomial time, Definition 1 implies secure. The evaluation premise polyTime is separate: Definition 1 does not supply it.

Definition 3 of [GKWY20] (tccr; locator not verified) is the concrete form of the same notion, with repeatable tweaks and every key law of min-entropy at least ρ. Definition 4 of [CKKZ12] (locator not verified) is the dual-key notion from which circular correlation robustness originates. Definition 3 of [ZRE15] (p. 11), robustness for naturally derived keys, restricts the adversary further; Theorem 1 there (p. 12), privacy of half-gates garbling, assumes only that weaker notion.

Main definitions #

References #

def Cslib.Crypto.Garbling.CCR.atLevel (hash : List Bool → List Bool → List Bool) (k : ℕ) (x : BitString (k + 1) × Bool) (t : BitString k) :

The hash of the word family hash at level k: the label x and the tweak t are hashed as the word labelBits x, the k + 1 bits of its key followed by its colour, and the word of the k bits of t; the answer is read as a label by labelOfWord k, its first k + 1 bits the key and bit k + 1 the colour, padding with false.

Circular-oracle queries at level k on the single word channel. The query (x, t, b) is the request of the label word labelBits x, the k + 1 bits of its key and then its colour, followed by the k bits of t and then b, 2 k + 3 bits in all; a request carries a query exactly when it has 2 k + 3 bits, and its label is read back by labelOfWord k. A label reply is the reply of labelCodec k, which is its label word labelBits.

The cost of a word request for the tweak t at level k: one when it has 2 k + 3 bits, the length of a query's request, and its bits k + 2 to 2 k + 1 are t.

A query with the tweak t costs one on its request.

theorem Cslib.Crypto.Garbling.CCR.wordOracle_codec_encodeQuery {k : ℕ} (O : Query (BitString (k + 1) × Bool) (BitString k) → BitString (k + 1) × Bool) (q : Query (BitString (k + 1) × Bool) (BitString k)) :
(codec k).wordOracle (fun (q : Query (BitString (k + 1) × Bool) (BitString k)) => pure (O q)) ((codec k).encodeQuery q) = pure (labelBits (O q))

The word oracle of a fixed typed oracle answers a query's request with the query's label.

Circular correlation robustness of a hash family on words: the hash is evaluated in polynomial time, a premise that the source does not impose, and its security condition is [ZRE15] Definition 1 (§4.1, p. 10) read with k-bit tweaks, (k + 2)-bit labels and tweak-unique uniform adversaries (module documentation). At every level k no uniform strict oracle-PPT word distinguisher that asks each tweak at most once, at every level, tells the circular oracle (x, t, b) ↦ H(x + Δ, t) + bΔ with H = CCR.atLevel hash k and Δ = CCR.offset R for a uniform (k + 1)-bit R from a uniform random function, except with negligible advantage.

The assumption at the finite advantage. Under circular correlation robustness, every uniform strict oracle-PPT word distinguisher that never repeats a tweak has negligible finite advantage CCR.advantage (CCR.atLevel hash k) CCR.offset CCR.offset at level k: the level-k advantage of the assumption's games is that finite advantage.