Binary subset-sum hashing #
A binary word selects a subset of independently uniform elements of a finite additive group.
Distinct words give a uniformly distributed difference, and hence collide with probability exactly
1 / |G|. In particular, the output group may be a finite power of ZMod q for any positive
modulus; no prime-modulus hypothesis is needed.
Main definitions #
Cslib.BitString.SubsetSum.hash: sum the weights selected by a binary word.Cslib.BitString.SubsetSum.hashRows: hash every binary row with the same weights.
Main results #
Cslib.BitString.SubsetSum.uniform_hash_sub: distinct words give a uniform difference.Cslib.BitString.SubsetSum.collision_probability: the exact collision probability.Cslib.BitString.SubsetSum.isDeltaUniversalHash,Cslib.BitString.SubsetSum.isTwoUniversal: the binary subset-sum family is1 / |G|-Δ-universal, hence universal.Cslib.BitString.SubsetSum.dist_hashRows_le: many independent binary rows with one public seed.
References #
- [C. Gentry, A. Sahai and B. Waters, Homomorphic Encryption from Learning with Errors: Conceptually-Simpler, Asymptotically-Faster, Attribute-Based, Section 3.2] [GSW13]
The proof reuses the finite-group uniformity lemmas in Probability.Uniform.
Sum the weights at the coordinates selected by a binary word.
Instances For
Distinct binary words give a uniform difference, including for composite-modulus groups.
The collision probability is exactly the reciprocal output-group cardinality.
Uniform group weights form a 1 / |G|-Δ-universal family on binary words: the difference
of two hashes is uniform.
Uniform group weights form a universal family on binary words.
Apply the same public weights to every binary row.
Instances For
Independent uniform binary rows become jointly close to uniform while their shared weights remain public. The loss is linear in the row count; the complete row family is not assumed to be two-universal.