Documentation

CslibFrontier.Crypto.Protocols.VOLE.BatchMulCheck

Batching VOLE multiplication checks with public random weights #

The sender fixes authenticated wire values and masks before a public random vector of weights is sampled. It may then choose arbitrary randomized affine coefficients depending on those weights. An independent hidden key is used for the final weighted multiplication check.

For a false vector of multiplication claims, the weighted residual vanishes with probability 1 / |F|. Otherwise the acceptance equation is a nonzero quadratic in the hidden key. This yields the mixture bound 1 / |F| + (1 - 1 / |F|) * (2 / |F|).

Main results #

This original ideal algebraic batching result uses a vector of independent weights, with one field element per constraint, and two field elements in the reply. It is not the scalar-challenge QuickSilver protocol, a zero-knowledge result or a certified efficient implementation.

theorem Cslib.Crypto.Protocols.VOLE.voleMulCheck_sum_sub_eq {ι F : Type} [Fintype ι] [CommRing F] (r x y z v_x v_y v_z : ι → F) (delta : F) :
∑ i : ι, r i * ((x i * delta + v_x i) * (y i * delta + v_y i) - (z i * delta + v_z i) * delta) = (∑ i : ι, r i * (x i * y i - z i)) * delta ^ 2 + (∑ i : ι, r i * voleMulCrossTerm (x i) (v_x i) (y i) (v_y i) (v_z i)) * delta + ∑ i : ι, r i * voleMulConstTerm (v_x i) (v_y i)

The weighted multiplication check has leading coefficient equal to the weighted residual.

theorem Cslib.Crypto.Protocols.VOLE.toOuterMeasure_voleMulCheck_sum_le {ι F : Type} [Fintype ι] [Field F] [Fintype F] (r x y z v_x v_y v_z : ι → F) (a b : F) (hne : ∑ i : ι, r i * (x i * y i - z i) ≠ 0) :
(Probability.PMF.uniformOfFintype F).toOuterMeasure {delta : F | ∑ i : ι, r i * ((x i * delta + v_x i) * (y i * delta + v_y i) - (z i * delta + v_z i) * delta) = a * delta + b} ≤ 2 / ↑(Fintype.card F)

With nonzero weighted residual, arbitrary affine coefficients pass the weighted check for an independent uniform key with probability at most 2 / |F|.

theorem Cslib.Crypto.Protocols.VOLE.voleMulCheck_sum {ι F : Type} [Fintype ι] [CommRing F] (r x y z v_x v_y v_z : ι → F) (delta : F) (htrue : ∀ (i : ι), x i * y i = z i) :
∑ i : ι, r i * ((x i * delta + v_x i) * (y i * delta + v_y i) - (z i * delta + v_z i) * delta) = (∑ i : ι, r i * voleMulCrossTerm (x i) (v_x i) (y i) (v_y i) (v_z i)) * delta + ∑ i : ι, r i * voleMulConstTerm (v_x i) (v_y i)

Honest affine coefficients accept every weighted batch of true multiplication constraints, including the empty batch and every key.

theorem Cslib.Crypto.Protocols.VOLE.toOuterMeasure_voleMulCheck_batch_le {ι F : Type} [Fintype ι] [Field F] [Fintype F] [DecidableEq F] [DecidableEq ι] (x y z v_x v_y v_z : ι → F) (reply : (ι → F) → PMF (F × F)) (hfalse : ∃ (i : ι), x i * y i ≠ z i) :
(do let r ← Probability.PMF.uniformOfFintype (ι → F) let ab ← reply r let delta ← Probability.PMF.uniformOfFintype F pure (decide (∑ i : ι, r i * ((x i * delta + v_x i) * (y i * delta + v_y i) - (z i * delta + v_z i) * delta) = ab.1 * delta + ab.2))).toOuterMeasure {true} ≤ (↑(Fintype.card F))⁻¹ + (1 - (↑(Fintype.card F))⁻¹) * (2 / ↑(Fintype.card F))

A false batch with an arbitrary randomized affine reply depending on the public weight vector passes with probability at most 1 / |F| + (1 - 1 / |F|) * (2 / |F|). Wire values and masks are fixed before the weights; the receiver key is independent of the weights and reply.

theorem Cslib.Crypto.Protocols.VOLE.toOuterMeasure_voleMulCheck_batch_bind_le {ι F : Type} [Fintype ι] [Field F] [Fintype F] [DecidableEq F] [DecidableEq ι] {S : Type} (sender : PMF S) (x y z v_x v_y v_z : S → ι → F) (reply : S → (ι → F) → PMF (F × F)) :
(do let s ← sender let r ← Probability.PMF.uniformOfFintype (ι → F) let ab ← reply s r let delta ← Probability.PMF.uniformOfFintype F pure (decide ((∃ (i : ι), x s i * y s i ≠ z s i) ∧ ∑ i : ι, r i * ((x s i * delta + v_x s i) * (y s i * delta + v_y s i) - (z s i * delta + v_z s i) * delta) = ab.1 * delta + ab.2))).toOuterMeasure {true} ≤ (↑(Fintype.card F))⁻¹ + (1 - (↑(Fintype.card F))⁻¹) * (2 / ↑(Fintype.card F))

An arbitrary randomized sender fixes all wire values and masks before the public weights. Its randomized reply may depend on the entire sender state and those weights, but the hidden key remains independent. The bad event contains a false constraint; for an empty index type it is empty. There is no hypothesis on the sender's support or its probability of cheating.

theorem Cslib.Crypto.Protocols.VOLE.toOuterMeasure_voleMulCheck_batch_bind_le_three_div {ι F : Type} [Fintype ι] [Field F] [Fintype F] [DecidableEq F] [DecidableEq ι] {S : Type} (sender : PMF S) (x y z v_x v_y v_z : S → ι → F) (reply : S → (ι → F) → PMF (F × F)) :
(do let s ← sender let r ← Probability.PMF.uniformOfFintype (ι → F) let ab ← reply s r let delta ← Probability.PMF.uniformOfFintype F pure (decide ((∃ (i : ι), x s i * y s i ≠ z s i) ∧ ∑ i : ι, r i * ((x s i * delta + v_x s i) * (y s i * delta + v_y s i) - (z s i * delta + v_z s i) * delta) = ab.1 * delta + ab.2))).toOuterMeasure {true} ≤ 3 / ↑(Fintype.card F)

The simpler 3 / |F| bound for the same randomized sender and adaptive affine reply.