Documentation

CslibFrontier.Crypto.Primitives.CorrelationRobust

Correlation-robust hash families #

A family of functions H : Fin m → K → L, indexed by the position j of a query, is correlation robust when the outputs H j (t j + s) on uniform inputs t j all shifted by one hidden uniform offset s look uniform, even given the inputs t. This is the property of Ishai, Kilian, Nissim and Petrank [IshaiKilianNissimPetrank2003, Definition 1] that replaces the random oracle in their oblivious-transfer extension (Cslib.Crypto.Protocols.MPC.iknpProtocol). Their definition takes K to be bit strings and one function h for every position; the family here allows the j-th query to use its own function H j, as their protocol does, and H j = h recovers their form.

The real game samples s and t and hands (t, fun j => H j (t j + s)) to a distinguisher; the ideal game hands it (t, u) with u uniform. The advantage is the distinguishing advantage of the two games. As for Cslib.Crypto.PRF.advantage, it is concrete: m, H and the distinguisher are fixed, and computational security is a bound on it for a class of efficient distinguishers.

Main definitions #

References #

@[reducible, inline]

A randomized test on m inputs in K and m outputs in L.

noncomputable def Cslib.Crypto.CorrelationRobust.realGame {m : ℕ} {K L : Type} [Fintype K] [Nonempty K] [Add K] (H : Fin m → K → L) (adversary : Adversary m K L) :

The real experiment: sample a uniform offset s and uniform inputs t, and test (t, fun j => H j (t j + s)).

noncomputable def Cslib.Crypto.CorrelationRobust.idealGame {m : ℕ} {K L : Type} [Fintype K] [Nonempty K] [Fintype L] [Nonempty L] (adversary : Adversary m K L) :

The ideal experiment: sample uniform inputs t and uniform outputs u, and test (t, u).

@[reducible, inline]
noncomputable abbrev Cslib.Crypto.CorrelationRobust.advantage {m : ℕ} {K L : Type} [Fintype K] [Nonempty K] [Add K] [Fintype L] [Nonempty L] (H : Fin m → K → L) (adversary : Adversary m K L) :

The correlation-robustness advantage of adversary against H.