property galois.FLFSR.state : FieldArray

The current state vector \(S = [S_0, S_1, \dots, S_{n-2}, S_{n-1}]\).

Examples

In [1]: c = galois.primitive_poly(7, 4)

In [2]: lfsr = galois.FLFSR(c.reverse(), state=[1, 2, 3, 4]); lfsr
Out[2]: <Fibonacci LFSR: f(x) = 5x^4 + 3x^3 + x^2 + 1 over GF(7)>

In [3]: lfsr.state
Out[3]: GF([1, 2, 3, 4], order=7)

The current state is modified as the Fibonacci LFSR is stepped.

In [4]: lfsr.step(10)
Out[4]: GF([4, 3, 2, 1, 4, 6, 4, 5, 0, 2], order=7)

In [5]: lfsr.state
Out[5]: GF([3, 1, 1, 0], order=7)