pub fn algebraic_filter_attack(
keystream: &[bool],
taps: &[bool],
filter_truth: &[bool],
) -> Option<Vec<bool>>Expand description
Recover the initial state of a filter generator by the algebraic attack: a length-l LFSR with
feedback taps drives a filter C (truth table filter_truth over its m = log₂ inputs, read as
m CONSECUTIVE state bits), emitting keystream[t] = C(seq[t], …, seq[t+m−1]). Using a min-degree
annihilator g of C, each applicable keystream bit becomes g(⟨r_t,s₀⟩, …) = 0, a degree-AI
equation in the initial state s₀; expanding over s₀-monomials of degree ≤ AI and solving the
GF(2) system recovers s₀. Returns the l-bit initial state (verified by regeneration), or None if
there is no low-AI annihilator, the system is underdetermined, or l > 64.