Binary subset sums of modular matrix rows #
Uniform modular matrices give two-universal hashing of one binary row, for every positive modulus. Many independent binary rows may use the same public matrix, with a statistical-distance loss linear in their count. No whole-matrix universality or pointwise assertion about a fixed matrix is needed.
Main results #
Cslib.BitString.SubsetSum.uniform_vecMul_sub: distinct rows give a uniform difference.Cslib.BitString.SubsetSum.vecMul_collision_probability: exact modular collision probability.Cslib.BitString.SubsetSum.dist_mul_le: the joint bound with the entire public matrix retained.
References #
- [C. Gentry, A. Sahai and B. Waters, Homomorphic Encryption from Learning with Errors: Conceptually-Simpler, Asymptotically-Faster, Attribute-Based, Section 3.2] [GSW13]
theorem Cslib.BitString.SubsetSum.dist_mul_le {q m d : ℕ} [NeZero q] {Rows : Type u_5} [Fintype Rows] [DecidableEq Rows] :
dist
((Probability.PMF.uniformOfFintype (Matrix (Fin m) (Fin d) (ZMod q))).bind
fun (A : Matrix (Fin m) (Fin d) (ZMod q)) =>
PMF.map (fun (r : Matrix Rows (Fin m) Bool) => (A, (r.map fun (bit : Bool) => ↑bit.toNat) * A))
(Probability.PMF.uniformOfFintype (Matrix Rows (Fin m) Bool)))
((Probability.PMF.uniformOfFintype (Matrix (Fin m) (Fin d) (ZMod q))).bind
fun (A : Matrix (Fin m) (Fin d) (ZMod q)) =>
PMF.map (fun (x : Matrix Rows (Fin d) (ZMod q)) => (A, x))
(Probability.PMF.uniformOfFintype (Matrix Rows (Fin d) (ZMod q)))) ≤ ↑(Fintype.card Rows) * √(↑q ^ d / 2 ^ m) / 2
Independent binary rows share one uniform public matrix. The comparison retains that matrix; the replacement modular matrix is independent of it.