Universal and Δ-universal hash families #
A keyed hash family is a function h : ι → X → Y together with a law seed : PMF ι of its key,
or seed. Two collision properties of such families are defined here, for an arbitrary seed law:
IsUniversalHash seed h ε: distinct inputs collide with probability at mostε. This is anε-bounded universal hash function, orε-UHF ([BS23], Definition 7.2); forε = 1 / |Y|it is the universal family of Carter and Wegman [CW79] (Cslib.Probability.IsTwoUniversal).IsDeltaUniversalHash seed h ε, for an additive groupY: for distinct inputs, every difference of their hashes has probability at mostε. This is anε-almost-Δ-universal family; it isε-almost-XOR-universal (ε-AXU) whenYis a space of bit strings, and anε-bounded difference unpredictable function, orε-DUF ([BS23], Definition 7.5).
A Δ-universal family is universal, taking the difference 0
(IsDeltaUniversalHash.isUniversalHash). Strongly universal, that is pairwise independent,
families with uniform seeds are Cslib.Probability.IsPairwiseIndependentHash; they are universal
and Δ-universal with ε = 1 / |Y| (Complexity.Probability.PairwiseIndependentHash.Universal).
A uniformly distributed difference gives the optimal ε = 1 / |Y|
(IsDeltaUniversalHash.of_map_sub_eq_uniform). Further families are Carter–Wegman polynomial
evaluation (Complexity.Probability.HashFamily.Polynomial) and multiply-shift hashing
(Complexity.Probability.HashFamily.MultiplyShift).
Probabilities are taken with PMF.toOuterMeasure and bounds are extended nonnegative reals.
These are information-theoretic properties; efficient evaluation is a separate matter.
Main definitions #
Cslib.Probability.IsUniversalHash:ε-universal families.Cslib.Probability.IsDeltaUniversalHash:ε-almost-Δ-universal families.
Main results #
Cslib.Probability.IsDeltaUniversalHash.isUniversalHash: Δ-universal families are universal.Cslib.Probability.IsUniversalHash.precompose,Cslib.Probability.IsUniversalHash.precompose_seed: injective input encodings and pushed-forward seeds.Cslib.Probability.IsUniversalHash.sum_ite_toReal_le: the collision bound as a finite sum.Cslib.Probability.IsDeltaUniversalHash.of_map_sub_eq_uniform: uniform differences.Cslib.Probability.IsUniversalHash.of_card_le,Cslib.Probability.IsDeltaUniversalHash.of_card_le: counting bad seeds of a uniform seed.
References #
An ε-almost-Δ-universal hash family ([BS23], Definition 7.5, where it is called an
ε-DUF; ε-AXU when the difference is XOR): for distinct inputs x and x' and every d, the
seed i gives hash i x - hash i x' = d with probability at most ε.
Instances For
A family that is ε-universal is ε'-universal for every ε' ≥ ε.
An injective input encoding preserves universality.
Universality for a pushed-forward seed law is universality of the precomposed family.
On a finite seed space, the collision probability of distinct inputs is a sum of seed masses
bounded by ε.
A collision bound stated as a finite sum of seed masses gives universality.
With a uniform seed, a bound c on the number of seeds on which two distinct inputs
collide gives c / |ι|-universality.
A Δ-universal family is universal with the same bound: take the difference 0.
A family that is ε-Δ-universal is ε'-Δ-universal for every ε' ≥ ε.
An injective input encoding preserves Δ-universality.
Δ-universality for a pushed-forward seed law is Δ-universality of the precomposed family.
If distinct inputs always have a uniformly distributed difference of hashes, the family is
1 / |Y|-Δ-universal, the least possible bound.
With a uniform seed, a bound c on the number of seeds giving any one difference of the
hashes of two distinct inputs gives c / |ι|-Δ-universality.