Skip to main content

fast_correlation_attack

Function fast_correlation_attack 

Source
pub fn fast_correlation_attack(
    keystream: &[bool],
    taps: &[bool],
    max_iters: usize,
) -> Option<Vec<bool>>
Expand description

Meier–Staffelbach fast correlation attack: recover the initial state of the length-L LFSR with feedback taps from a noisy keystream keystream (a z = a ⊕ noise binary symmetric channel), by iterative bit-flip decoding against the low-weight parity checks the feedback recurrence and its Frobenius squares generate. Returns the recovered L-bit initial state when decoding converges to a valid LFSR output that agrees with the keystream noticeably better than chance, else None (too much noise or too few low-weight checks — the register resists). Polynomial in L — no 2^L search.