liveBook · Manning

Coefficient matrix

As explained in Hacking Cryptography

A coefficient matrix is a matrix whose entries specify the coefficients of a system of linear combinations.

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

How Hacking Cryptography covers it

How deep it goes
Explains matrix construction, inversion, Boolean arithmetic, and Go recovery code, including insufficient-data and singular-matrix failures.
Examples
Uses three-bit LFSR equations, the system X = SA, the rearrangement A = S⁻¹X, and Go recovery tests.
What it assumes
Assumes observed output bits and an LFSR-length hypothesis, while showing how to construct and invert the required Boolean matrix.
What you can do after
Apply it via the OpenWhiteBox matrix module to recover LFSR taps and clone the generator from observed bits.
How it connects
Connects coefficient matrices to LFSRs, linear combinations, matrix inversion, stream ciphers, and known-plaintext attacks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Hacking Cryptography. The section links point to the parts of the book it draws on.