Circular correlation robustness #
A tweakable hash H : L → T → M is circular correlation robust when, for a secret offset drawn
from a key, the oracle that answers a query (x, t, b) with H (x + Δ) t, plus the output offset
Δ' when b is set, looks like a uniform random function. Choi, Katz, Kumaresan and Zhou
[CKKZ12] introduced circular correlation robustness to prove the Free-XOR
technique of Kolesnikov and Schneider [KS08] secure; Guo, Katz, Wang and Yu
[GKWY20] gave the tweakable form, and Zahur, Rosulek and Evans [ZRE15]
and Heath, Kolesnikov and Ng [HKN24], Definition 1, use it for half gates and
one-hot garbling.
CCR.oracle H Δ Δ' q is that oracle, with the input offset Δ : L and the output offset
Δ' : M given separately, and CCR.advantage H δ δ' A is the advantage of A in telling
CCR.oracle H (δ k) (δ' k) under a uniform key k from a uniform random function, in the finite
PRF game Cslib.Crypto.PRF.advantage. Three Boolean garbling schemes of this library rest on it
(the point-and-permute scheme of Cslib.Crypto.Garbling.Privacy rests on PRF security instead):
- Free-XOR (
Cslib.Crypto.Garbling.FreeXOR): the hash reads only a keyx : K, labels areK × Bool, and the offsets areδand(δ, true). - half gates (
Cslib.Crypto.Garbling.HalfGates): the hash reads the whole label, colour bit included, and both offsets areCCR.offset δ = (δ, true). - one-hot garbling (
Cslib.Crypto.Garbling.BinaryToOneHot): labels form aZMod 2-module, both offsets areδ kfor a key mapδ, which can fix the colour bit of the offset.
The input and output offsets live in different groups only for Free-XOR, whose hash ignores the
colour bit. Reading that hash on whole labels instead would make the assumption false: the distinct
queries ((x, false), t, b) and ((x, true), t, b) would get equal answers, which a uniform random
function rarely gives.
[Hea24] Definition 1 assumes Boolean circular correlation robustness (as in
[ZRE15]). CCR.Arithmetic is an arithmetic variant novel to this library—used by
the per-instance switch-system reduction in Cslib.Crypto.Garbling.Switch—where labels lie in an
R-module, the shift is a scalar s : R, and the ideal oracle answers every query with a fresh
uniform label. No implication in either direction between CCR.Arithmetic and Boolean
CCR.advantage is proved or cited, and CCR.Arithmetic currently defines only a finite
NNReal-valued advantage (not a Prop-valued asymptotic assumption). The mixed-modulus
assumption of Ball, Malkin and Rosulek [BMR16], Definition 1, has its own
dependent query type and lives in Cslib.Crypto.Garbling.MixedModulus.
Main definitions #
Cslib.Crypto.Garbling.CCR.Query: a query of a label, a tweak and a bit.Cslib.Crypto.Garbling.CCR.offset: the half-gates offset(R, true).Cslib.Crypto.Garbling.CCR.oracle: the circular oracle under an input and an output offset.Cslib.Crypto.Garbling.CCR.advantage: the circular correlation robustness advantage.Cslib.Crypto.Garbling.CCR.IsTweakUnique: tweak uniqueness for Boolean CCR adversaries (at most one query per tweak on every execution path).Cslib.Crypto.Garbling.CCR.idealFreshGame: the fresh-uniform-per-query ideal game, equivalent toPRF.idealExperimenton tweak-unique adversaries (idealFreshGame_eq_prfIdealGame_of_isTweakUnique).Cslib.Crypto.Garbling.CCR.keyOnlyEmbed,Cslib.Crypto.Garbling.CCR.keyOnlyHandler: lifting key-only CCR queries(x, t, b)into full-label queries((x, true), t, b).Cslib.Crypto.Garbling.CCR.Arithmetic.advantage: the library's novel finite arithmetic variant (not aProp-valued assumption), withCslib.Crypto.Garbling.CCR.Arithmetic.IsTweakUnique.
Main results #
Cslib.ProbOracleComp.runWith_memoize_map_fst_eq_eval_run: lazily memoizing an oracle agrees with fresh-per-query execution whenever each tweak is queried at most once on every path.Cslib.Crypto.Garbling.CCR.idealFreshGame_eq_prfIdealGame_of_isTweakUnique,Cslib.Crypto.Garbling.CCR.Arithmetic.idealGame_eq_runWith_memoize_of_isTweakUnique: fresh-uniform ideal games equal random-function (PRF/memoize) ideal games on tweak-unique adversaries.Cslib.Crypto.Garbling.CCR.advantage_keyOnly: key-only CCR advantage transfers to full-label CCR advantage.
Implementation notes #
The definition of [GKWY20] only allows adversaries that never ask both (x, t, false)
and (x, t, true), whose answers reveal the offset (CCR.oracle_true_sub_oracle_false). Here
advantage is defined for every adversary, and the restriction IsTweakUnique is stated as a
property of the adversary at hand: the Free-XOR (FreeXOR.isTweakUnique_reduction), half-gates
(HalfGates.isTweakUnique_reduction) and one-hot (BinaryToOneHot.isTweakUnique_reduction)
reductions ask every tweak at most once. The same holds for the arithmetic variant, whose
restriction Arithmetic.IsTweakUnique is likewise formalized.
References #
- S. G. Choi, J. Katz, R. Kumaresan, H.-S. Zhou, On the Security of the "Free-XOR" Technique
- C. Guo, J. Katz, X. Wang, Y. Yu, Efficient and Secure Multiparty Computation from Fixed-Key Block Ciphers
- V. Kolesnikov, T. Schneider, Improved Garbled Circuit: Free XOR Gates and Applications
- S. Zahur, M. Rosulek, D. Evans, Two Halves Make a Whole: Reducing Data Transfer in Garbled Circuits using Half Gates
- D. Heath, V. Kolesnikov, L. K. L. Ng, Garbled Circuit Lookup Tables with Logarithmic Number of Ciphertexts
- D. Heath, Efficient Arithmetic in Garbled Circuits
- M. Ball, T. Malkin, M. Rosulek, Garbling Gadgets for Boolean and Arithmetic Circuits
If an oracle computation queries each tweak tweak q at most once on every path, lazily
memoizing fun q => ProbComp.eval (O q) produces the same output distribution as running A
against fresh calls to O.
A query to the circular oracle: a label, a tweak and a bit.
- label : L
The label, shifted by the input offset before hashing.
- tweak : T
The tweak passed to the hash.
- bit : Bool
Whether the answer also gets the output offset.
Instances For
Adversaries against circular correlation robustness: oracle algorithms with private coins
that ask queries of a label, a tweak and a bit, get answers in M, and output a guess.
The circular oracle under the input offset Δ and the output offset Δ': the query
(x, t, b) gets H (x + Δ) t, plus Δ' when b is set.
The answers to (x, t, true) and (x, t, false) differ by the output offset, so an
adversary that asks both learns it.
The keyed circular oracle: the key k selects the input offset δ k and the output offset
δ' k.
The circular correlation robustness advantage of A against H with offsets δ and δ':
its advantage in telling the keyed circular oracle under a uniform key from a uniform random
function.
The adversary never repeats a tweak: on every path it makes at most one query with each
tweak t. In particular, it never queries both (x, t, false) and (x, t, true).
Against every stateful oracle, a tweak-unique adversary records at most one query with each
tweak t on every supported execution.
For a tweak-unique adversary, answering every query with a fresh uniform draw from M
(idealFreshGame) has the same output law as a uniform random function (PRF.idealExperiment).
Library construction (no cited definition): lift a key-only CCR query to a full-label CCR
query via keyOnlyEmbed, so that adding the offset (R, true) cancels the colour bit to
false.
Library infrastructure (no cited result): Key-only CCR advantage transfer. For any key-only
adversary A against fun x t => H (x, false) t with input offset δ and output offset δ',
lifting its queries via keyOnlyHandler preserves its CCR advantage against H with input offset
fun r => (δ r, true) and output offset δ'.
The arithmetic variant #
A query to the arithmetic circular oracle: a label, a tweak and a scalar shift.
- label : L
The label, shifted by minus the offset before hashing.
- tweak : ℕ
The tweak passed to the hash.
- shift : R
The multiple of the offset added to the answer.
The oracle keyed by the offset Δ: the query (k, t, s) gets H (k - Δ) t + s • Δ.
An arithmetic CCR adversary: a test with private coins and oracle access to queries
(k, t, s).
The keyed experiment: the law of the PRF real experiment keyed by a uniform offset of colour
1, answering with oracle.
The ideal experiment: answer every query with a fresh uniform label.
The arithmetic CCR advantage of adversary against H. The assumption that it is small is
meant only for adversaries that never repeat a tweak (IsTweakUnique): repeating a query
distinguishes the fresh oracle from the keyed one.
The adversary never repeats a tweak: on every path it makes at most one query with each
tweak t.
For a tweak-unique adversary, answering every query with a fresh uniform label (idealGame)
has the same output law as lazily memoizing a uniform random function on Query L R.