Documentation

CslibFrontier.Crypto.Protocols.SecretSharing.AccessStructure.LinearEquivalence

Equivalent monotone span programs #

Two monotone span programs are equivalent when, for every secret, the linear secret sharing schemes derived from them give the same distribution of shares Boneh and Shoup, Definition 22.23, p. 981. Here that is the equation (linearUniformAccessScheme P').shareDist (uniformOfFintype (LinearKey P')) secret = (linearUniformAccessScheme P).shareDist (uniformOfFintype (LinearKey P)) secret for every secret, over a finite field, with no separate predicate: the two sides have the same type only when the programs have the same row dimensions. Their numbers of columns may differ.

Lemma 22.15 of [BS23] says that multiplying every matrix on the right by an invertible matrix R whose top row is e₁ gives an equivalent program. For a key k, the program (M_i * R)_i gives the shares that P gives for the key tail (R * (secret, k)), and that map of keys is a bijection, so a uniform key goes to a uniform key.

For parties Fin N and a field with decidable equality, where elimination runs, this module also proves the identities of the two parts of Theorem 22.14 of [BS23] (p. 981). They are steps toward that theorem, not the theorem. Part (a): for an accepted coalition, the vectors of the algorithm Lin (MonotoneSpanProgram.recombination) recombine the members' shares to the secret, for every key. Part (b)(i): for a coalition that is not accepted, the program P_L (MonotoneSpanProgram.normalForm) is equivalent to P, by Lemma 22.15. Theorem 22.14 also says that Lin is an efficient deterministic algorithm and that P_L is efficiently computable. The only bounds are those of CslibFrontier.Computability.Circuit.SpanProgram.EliminationSynthesis, one field-gate circuit for each shape of program; a uniform bound in bit operations is open (#5293).

Main results #

References #

Lemma 22.15 ([BS23], p. 982): for an invertible matrix R whose top row is e₁, the programs P and (M_i * R)_i give the same distribution of shares under a uniform key. Holding for every secret, this is the equivalence of the two programs in the sense of Definition 22.23 (p. 981).

theorem Cslib.Crypto.Protocols.SecretSharing.linearShare_eq_of_col_zero {F : Type u_1} {Party : Type u_2} [Field F] (P : Circuits.MonotoneSpanProgram F Party) {i : Party} (h : ∀ (row : Fin (P.rowDim i)), P.matrix i row 0 = 0) (k : LinearKey P) (secret₀ secret₁ : F) :
linearShare P k secret₀ i = linearShare P k secret₁ i

A share whose matrix has left-most column zero does not depend on the secret ([BS23], discussion after Theorem 22.14, p. 981).

theorem Cslib.Crypto.Protocols.SecretSharing.sum_recombination_dotProduct_linearShare {F : Type u_1} [Field F] [DecidableEq F] {N : ℕ} (P : Circuits.MonotoneSpanProgram F (Fin N)) {s : Finset (Fin N)} (hs : P.Accepts s) (k : LinearKey P) (secret : F) :
∑ i : ↥s, P.recombination s ↑i ⬝ᵥ linearShare P k secret ↑i = secret

The recombination identity of Theorem 22.14(a), a step toward [BS23], Theorem 22.14 (p. 981), not that theorem: for an accepted coalition s, the vectors P.recombination s that elimination computes for the algorithm Lin recombine the shares of the members of s to the secret, for every key. Theorem 22.14(a) also says that Lin is an efficient deterministic algorithm. The only bound is Cslib.Circuits.Synthesis.full_recombination, one field-gate circuit for each shape of program; a uniform bound in bit operations is open (#5293).

The equivalence of Theorem 22.14(b)(i), a step toward [BS23], Theorem 22.14 (p. 981), not that theorem: for a coalition s that is not accepted, the program P_L = P.normalForm s is equivalent to P, giving the same distribution of shares under a uniform key. The zero column of part (ii) is MonotoneSpanProgram.normalForm_matrix_zero, and with linearShare_eq_of_col_zero it says that the shares of the members of s do not depend on the secret. Theorem 22.14(b) also says that P_L is efficiently computable. The only bound is Cslib.Circuits.Synthesis.full_normalForm, one field-gate circuit for each shape of program; a uniform bound in bit operations is open (#5293).