Documentation

CslibFrontier.Crypto.Protocols.MAC.OneTime

One-time authentication from pairwise unpredictability #

[BS23], Section 7.6, uses the fresh-pair MAC game with one signing response. A keyed hash defines a deterministic MAC by using its digest as the tag and checking equality at verification. For this MAC, a valid fresh pair necessarily has a fresh message. Thus an adversary can forge precisely when it can predict a second digest after seeing the first.

theorem Cslib.Crypto.oneTimeForgeExperiment_hash_le {K M T σ : Type} [Fintype K] [Nonempty K] [DecidableEq M] [DecidableEq T] {H : K → M → T} {ε : ENNReal} (h : UHF.IsPairwiseUnpredictable H ε) (A : TwoStage Unit M T (M × T) σ) :
(oneTimeForgeExperiment (ProbComp.uniform K) (fun (k : K) (m : M) => pure (H k m)) (fun (k : K) (m : M) (t : T) => decide (H k m = t)) (A.choose ()) A.guess).eval true ≤ ε

Theorem 7.12 ([BS23], v0.6, Section 7.6.3, printed p. 276). For a private uniform key, using an ε-PUF's digest as the tag gives success probability at most ε for every fresh-pair forger after one signing response. The two-stage adversary can use arbitrary private state and has no runtime restriction.