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.
- Legality. An adversary must ask at most one query per tweak on every run
(
CCR.IsTweakUnique), at every level. Definition 1 forbids only asking one(x, i)with both bits. Guo, Katz, Wang and Yu [GKWY20] name non-repeating tweaks as a weaker notion that may suffice (locator not verified). - Tweaks are
k-bit strings at levelk; Definition 1 takes them fromℤ(H : {0, 1}^k × ℤ → {0, 1}^k, p. 8). - Lengths. Labels have
k + 2bits at levelk, where Definition 1 hask. - Adversaries are uniform strict oracle-PPT word programs; Definition 1 says "polynomial-time adversaries", and Choi, Katz, Kumaresan and Zhou [CKKZ12] admit non-uniform ones.
- Evaluation.
polyTimeasks that one deterministic machine evaluate the hash in polynomial time on all words. Definition 1 gives the adversary unrestricted access toHbut asks nothing of its running time. The premise is kept because the garbling schemes built on the hash must be efficient.
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 #
Cslib.Crypto.Garbling.CCR.atLevel: the hash of a word family at levelk.Cslib.Crypto.Garbling.CCR.codec: circular-oracle queries and labels on the word channel.Cslib.Crypto.CircularCorrelationRobust: the asymptotic assumption.
References #
- S. Zahur, M. Rosulek, D. Evans, Two Halves Make a Whole: Reducing Data Transfer in Garbled Circuits using Half Gates
- C. Guo, J. Katz, X. Wang, Y. Yu, Efficient and Secure Multiparty Computation from Fixed-Key Block Ciphers
- S. G. Choi, J. Katz, R. Kumaresan, H.-S. Zhou, On the Security of the "Free-XOR" Technique
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.
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.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime (fun (x : List Bool × List Bool) => match x with | (label, tweak) => hash label tweak) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits
One deterministic machine evaluates the hash on the encoded label and tweak words.
- secure : Game.Indistinguishable (fun (W : OracleDistinguisher) (k : ℕ) => (PRF.realExperiment (Garbling.CCR.keyed (Garbling.CCR.atLevel hash k) Garbling.CCR.offset Garbling.CCR.offset) ((Garbling.CCR.codec k).adapt (W k []))).eval) (fun (W : OracleDistinguisher) (k : ℕ) => (PRF.idealExperiment ((Garbling.CCR.codec k).adapt (W k []))).eval) fun (W : OracleDistinguisher) => Probability.IsOraclePPT Turing.MultiTapeTM.encBool W ∧ ∀ (k : ℕ), Garbling.CCR.IsTweakUnique ((Garbling.CCR.codec k).adapt (W k []))
At level
k, the keyed circular oracle under a uniform offset key and a uniform random function, both read throughCCR.codec k, are indistinguishable for every uniform strict oracle-PPT word distinguisher that never repeats a tweak at any level.
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.