Skip to main content

algebraic_immunity

Function algebraic_immunity 

Source
pub fn algebraic_immunity(truth: &[bool]) -> Option<(usize, AnnihilatorWitness)>
Expand description

The algebraic immunity of a Boolean function given as its 2ⁿ truth table: the minimum degree of a nonzero annihilator of C or of C ⊕ 1, together with a re-checkable witness. Searching degrees ascending, the first hit is the minimum (no lower-degree annihilator exists, or an earlier degree would have found it). None for a malformed table. AI ≤ ⌈n/2⌉ always.