Documentation

CslibFrontier.Crypto.Primitives.UHF.PairwiseUnpredictability

Pairwise unpredictability #

[BS23], Section 7.6.1, printed p. 275, defines pairwise unpredictability for a single keyed hash with a private uniform key. After seeing the digest of its first message, the adversary chooses another message and tries to predict its digest.

Main definitions #

Main results #

References #

The second message and its predicted hash.

  • message : M

    The message whose hash the adversary predicts.

  • digest : Y

    The predicted hash.

@[reducible, inline]

The adversary chooses a message, saves private state, then receives only its hash.

noncomputable def Cslib.Crypto.UHF.predictionExperiment {K M Y σ : Type} [Fintype K] [Nonempty K] [DecidableEq M] [DecidableEq Y] (H : K → M → Y) (A : PredictionAdversary M Y σ) :

Attack Game 7.5 ([BS23], v0.6, printed p. 275). The challenger samples a private uniform key and answers the first query. The experiment rejects a prediction for the first message, which the source forbids submitting.

def Cslib.Crypto.UHF.IsPairwiseUnpredictable {K M Y : Type} [Fintype K] [Nonempty K] [DecidableEq M] [DecidableEq Y] (H : K → M → Y) (ε : ENNReal) :

Statistical pairwise unpredictability ([BS23], Definition 7.7, v0.6, p. 275). All probabilistic two-stage adversaries, with arbitrary saved state, succeed with probability at most ε.

An ε-PUF is an ε-UHF ([BS23], v0.6, p. 275). Use the revealed digest as the prediction for the other message.

An ε-PUF with group-valued digests is an ε-DUF ([BS23], v0.6, p. 275). To test a proposed difference, add it on the left of the revealed digest. The proof works for any additive group, including the source's cyclic and abelian cases.

theorem Cslib.Crypto.UHF.isPairwiseUnpredictable_add_uniform {K M Y : Type} [Fintype K] [Nonempty K] [DecidableEq M] [DecidableEq Y] {H : K → M → Y} {ε : ENNReal} [AddGroup Y] [Fintype Y] (h : Probability.IsDeltaUniversalHash (Probability.PMF.uniformOfFintype K) H ε) :
IsPairwiseUnpredictable (fun (key : K × Y) (m : M) => H key.1 m + key.2) ε

Lemma 7.11 ([BS23], v0.6, Section 7.6.2, printed p. 276). Add an independent uniform digest to every hash evaluation. If the original family is ε-difference universal, the resulting family is ε-pairwise unpredictable. The challenger uses a uniform key in the product of the original key and digest spaces. The argument works for finite additive groups, including the source's cyclic groups.