Documentation

CslibFrontier.Probability.HashFamily.PolynomialBirthday

Birthday collisions in the two-block polynomial hash #

Even with the key fixed, the probability of a collision between distinct messages is bounded away from zero at the birthday scale. The proof uses the birthday lower bound for any function on uniform samples, subtracting the chance of sampling the same message twice.

Main results #

References #

theorem Cslib.Probability.one_eighth_le_polyHash_twoBlock_collision {F : Type} [Semiring F] [Fintype F] (k : F) (hcard : 16 ≤ Fintype.card F) :
1 / 8 ≤ ((PMF.iid (PMF.uniformOfFintype (F × F)) (Fintype.card F).sqrt).toOuterMeasure {ms : Fin (Fintype.card F).sqrt → F × F | ∃ (i : Fin (Fintype.card F).sqrt) (j : Fin (Fintype.card F).sqrt), polyHash k [(ms i).1, (ms i).2] = polyHash k [(ms j).1, (ms j).2] ∧ ms i ≠ ms j}).toReal

Boneh–Shoup Exercise 7.26(a). For any fixed key k, exactly ⌊√|F|⌋ independent uniform two-block messages contain two distinct messages with equal Hpoly digest with probability at least 1/8 once |F| ≥ 16. As in Remark 7.2 (printed p. 263), the domain is the fixed two-block space F × F: each pair is passed to the variable-length hash of equation (7.3) (printed p. 255) as a list of exactly two blocks. This applies to finite semirings, including the book's prime field ZMod p.