The algorithm Lin and the program P_L by elimination #
Boneh and Shoup, Theorem 22.14, p. 981 states two algorithms for a monotone span
program P whose parties are 1, …, N. For an accepted coalition s, Lin(s) returns vectors
λ_j with ∑_{j ∈ s} λ_j M_j = e₁. For a coalition that is not accepted, P_L is a program that
accepts the same coalitions and has left-most column zero in the matrix of every member of s.
Both are computed here by one run of elimination on the stacked rows of the members
(Cslib.LinearAlgebra.vecMulSolve and Cslib.LinearAlgebra.kernelVecAt). The theorem also says
that Lin is efficient and that P_L is efficiently computable. The results here concern their
values; they are steps toward Theorem 22.14, not the theorem (#5293).
The book proves part (b) by extending a basis of the row space of the coalition. Here P_L is
P multiplied on the right by the identity matrix whose first column is a kernel vector v of
the members' rows with v₁ = 1. That matrix is invertible with top row e₁, so Lemma 22.15
applies, and it keeps columns 2, …, d of every matrix unchanged. shearMatrix lives in the
span-program namespace because normalForm is its only client; it moves to
Foundations/LinearAlgebra/Matrix/ when a second client appears.
The three algorithms are total. Outside their domains they return what elimination returns:
recombination_eq_zero_of_not_accepts, nullVector_eq_zero_of_accepts and
not_accepts_normalForm_of_accepts. The circuit-size bounds, one field-gate circuit for each
shape of program, are in CslibFrontier.Computability.Circuit.SpanProgram.EliminationSynthesis;
the identities of Theorem 22.14 for the shares and the secret are in
CslibFrontier.Crypto.Protocols.SecretSharing.AccessStructure.LinearEquivalence.
Main definitions #
Cslib.Circuits.MonotoneSpanProgram.stack: the rows of the members, stacked.Cslib.Circuits.MonotoneSpanProgram.recombination: the algorithmLin.Cslib.Circuits.MonotoneSpanProgram.nullVector: a kernel vector of the members' rows.Cslib.Circuits.MonotoneSpanProgram.shearMatrix: the identity with its first column replaced.Cslib.Circuits.MonotoneSpanProgram.normalForm: the programP_L.
Main results #
Cslib.Circuits.MonotoneSpanProgram.sum_vecMul_recombination: for an accepted coalition the vectors ofLincombine the members' rows toe₁.Cslib.Circuits.MonotoneSpanProgram.nullVector_zero_eq_one_iff: the kernel vector has first entry one exactly when the coalition is not accepted.Cslib.Circuits.MonotoneSpanProgram.normalForm_matrix_zero: the zero column of Theorem 22.14(b)(ii), a step toward that theorem.Cslib.Circuits.MonotoneSpanProgram.accepts_normalForm: for a coalition that is not accepted,P_Laccepts the same coalitions asP.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Theorem 22.14, p. 981.
The rows of the matrices of the members of s, stacked in the order of the parties; the
rows of the other parties are replaced by zero.
The identity matrix with its first column replaced by v. For v 0 = 1 it is invertible
with top row e₁; multiplying a matrix M by it on the right replaces the first column of M
by M *ᵥ v and keeps the other columns.
Multiplying by shearMatrix v replaces the first column by the product with v.
Algorithm Lin ([BS23], Theorem 22.14(a), p. 981): recombination vectors for
the coalition s, by elimination on the stacked rows. Party i gets the vector
P.recombination s i. The rows of a party outside s are zero in stack, and its vector does
not enter sum_vecMul_recombination. When s is not accepted, elimination finds no solution
and returns the zero vector for every party (recombination_eq_zero_of_not_accepts).
For an accepted coalition, the vectors of recombination combine the rows of the members to
the target e₁.
On a coalition that is not accepted, recombination gives every party the zero vector.
A kernel vector of the matrices of the members of s with first entry one, by elimination.
It exists exactly when s is not accepted (nullVector_zero_eq_one_iff); when s is accepted,
elimination returns the zero vector (nullVector_eq_zero_of_accepts).
The first entry of nullVector is one exactly on the coalitions that are not accepted.
On an accepted coalition, nullVector is the zero vector.
For a coalition that is not accepted, shearMatrix (P.nullVector s) satisfies the two
hypotheses of Lemma 22.15: it is invertible and its top row is e₁.
The program P_L ([BS23], Theorem 22.14(b), p. 981): the matrices of P
multiplied on the right by the identity matrix with first column P.nullVector s. For an
accepted s the kernel vector is zero, so every matrix of P.normalForm s has first column
zero, for members and non-members alike, and the program accepts no coalition
(not_accepts_normalForm_of_accepts).
The zero column of Theorem 22.14(b)(ii), a step toward [BS23], Theorem 22.14
(p. 981), not that theorem: in P.normalForm s, the left-most column of the matrix of every
member of s is zero. This holds for every s. 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 (#5293).
The other columns are those of P.
For a coalition s that is not accepted, P.normalForm s accepts the same coalitions as
P.
For an accepted coalition s, every matrix of P.normalForm s has first column zero, so the
program accepts no coalition.