A coefficient matrix stores the tap coefficients of an LFSR and combines with its state matrix to produce new output bits. In Boolean matrices, multiplication is AND and addition is XOR. section 4.2.2
Equation 4.6
\[\begin{aligned} \begin{bmatrix} s_{3} \\ s_{4} \\ s_{5} \end{bmatrix} &= \begin{bmatrix} s_{0} & s_{1} & s_{2} \\ s_{1} & s_{2} & s_{3} \\ s_{2} & s_{3} & s_{4} \end{bmatrix} \begin{bmatrix} a_{0} \\ a_{1} \\ a_{2} \end{bmatrix} \notag\\ X &= SA \label{equation:lfsr-matrix} \end{aligned}\]The matrix equation X = SA arranges observed state values, tap coefficients, and generated bits into a solvable linear system. section 4.2.2
Recovering LFSR taps
Given enough observed keystream bits, construct the state matrix S, invert it, form X from subsequent bits, and compute A = S⁻¹X. The recovery code rejects insufficient observations, singular matrices, and incorrect LFSR lengths; it can try lengths sequentially until one succeeds. section 4.2.2
