liveBook · Manning

Matrix inversion

As explained in Hacking Cryptography

Matrix inversion is the operation of finding a matrix that multiplies with a given invertible matrix to produce the identity matrix.

Matrix inversion finds S⁻¹ for an invertible matrix S. In LFSR analysis, multiplying S⁻¹ by observed output bits X recovers the tap coefficients A, using XOR and AND as Boolean matrix operations. section 4.2.2

Apply the operation in an observed-bit recovery procedure:

  • Reject the candidate when S is non-invertible; otherwise compute A = S⁻¹X and use the recovered taps and state to clone the LFSR. section 4.2.2

Known-plaintext LFSR recovery

XORing ciphertext with the known prefix “ATTACK AT ” yields keystream bits. Trying candidate lengths, the recovery routine inverts each corresponding S; a successful candidate decrypts the remaining ciphertext into a timestamp.

How Hacking Cryptography covers it

How deep it goes
Explains matrix construction, Boolean arithmetic, inversion failure, and executable recovery, but stops short of deriving inversion internals.
Examples
Demonstrates inversion through Go recovery routines and a known-prefix attack that decrypts a timestamp.
What it assumes
Assumes observed bits and LFSR equations, while demonstrating recovery for known and unknown LFSR lengths.
What you can do after
Diagnose and clone an LFSR when enough observed bits and a valid invertible state matrix are available.
How it connects
Connects matrix inversion to LFSRs, stream ciphers, Boolean matrices, and known-plaintext attacks.

Also explained in

Compare how 2 books explain matrix inversion →

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.