Let be the output of a Linear Feedback Shift Register
We aim to find the unknown and such that

for all .
In this case:

We look successively at the matrices

For each if then just continue
If , we try ,
solve for and check the stream.