galois.GLFSR(feedback_poly: Poly, state: ArrayLike | None = None)

Constructs a Galois LFSR from its feedback polynomial \(f(x)\).

Parameters:
feedback_poly: Poly

The feedback polynomial \(f(x) = 1 + a_1 x + a_2 x^2 + \dots + a_{n} x^{n}\).

state: ArrayLike | None = None

The initial state vector \(S = [S_0, S_1, \dots, S_{n-2}, S_{n-1}]\). The default is None which corresponds to all ones.

Notes

A Galois LFSR may be constructed from its characteristic polynomial \(c(x)\) by passing in its reciprocal as the feedback polynomial. This is because \(f(x) = x^n c(x^{-1})\).