Skip to main content

nonlinearity

Function nonlinearity 

Source
pub fn nonlinearity(truth: &[bool]) -> Option<u64>
Expand description

The nonlinearity of a Boolean function: 2^{n-1} − ½·maxₘ|Ŵ(w)| — its Hamming distance to the nearest affine function. High ⇒ resistant to linear approximation; maximal (bent, n even) ⇒ 2^{n-1} − 2^{n/2−1}. None for a malformed table.