Nonlinear Boolean Functions in Cryptography
- Nonlinear Boolean functions are non-affine maps from F2^n characterized by high spectral nonlinearity and balanced outputs, crucial for resisting linear attacks.
- The classification leverages affine cosets and rotation symmetric structures to reduce the search space and guide efficient function construction.
- Algorithmic methods such as the Walsh–Hadamard transform and evolutionary algorithms optimize the search for highly nonlinear functions for cryptographic applications.
A nonlinear Boolean function is a map from the binary vector space to that is not affine; such functions play a fundamental role in cryptography, coding theory, and computational complexity. The degree and spectral nonlinearity of a Boolean function are critical for resistance to linear and correlation attacks in symmetric-key systems, while efficient construction and classification remain central research topics, especially for functions with large variable counts.
1. Formal Definitions and Spectral Nonlinearity
Let be a Boolean function. The function is affine if it can be written as for constants . Nonlinearity quantifies the minimum Hamming distance from to any affine function: Spectrally, nonlinearity is measured by the Walsh–Hadamard transform: with denoting addition mod 2 and the inner product. Then
The function is balanced if it takes on each of $0$ and $1$ for exactly half of its input vectors, i.e., (Gašperov et al., 2023).
Bent functions, characterized by for all (and hence having ), exist only for even and are unbalanced. For odd , the optimum nonlinearity is strictly less, bounded above by and realized only by specialized constructions (Carlet et al., 15 Feb 2024, Carlet et al., 24 Apr 2025).
2. Classification, Structure, and Symmetry
Nonlinear Boolean functions are systematically classified in relation to affine functions via algebraic and combinatorial techniques.
- There are exactly -variable Boolean functions and affine functions. Classification schemes partition the set into disjoint classes, each containing one affine function and nonlinear members (Rout et al., 2013).
- Algebraically, these classes have invariant output positions and a -dimensional vector space acting by bitwise XOR, yielding subgroup/coset structure.
- Rotation symmetric (RS) nonlinear functions, satisfying , significantly reduce the search space and underpin many high-nonlinearity candidates (Yang et al., 2012, Carlet et al., 15 Feb 2024, Carlet et al., 24 Apr 2025).
Quartic RS functions generated by attain nonlinearity exactly equal to their weight, as shown by recurrence and Walsh-spectrum analysis. This equality is conjectured to extend to higher-degree () RS monomials, with computational methods confirming the property for several cases (Yang et al., 2012).
3. Construction and Search for High Nonlinearity
The search for balanced, highly nonlinear Boolean functions—critical for cryptographic primitives such as S-boxes and stream ciphers—combines algebraic constructions, combinatorial optimization, and metaheuristics:
- Local Search via Walsh Spectrum: The most computationally efficient contemporary approach involves treating the full Walsh spectrum as a "phenotype," and selecting among neighbors using a lexicographic histogram of spectral magnitudes. In practice, using spectrum-based selection halves the computation time for finding record nonlinearities compared to scalar fitnesses, outperforming previous landscape-guided searches for up to $9$ (Gašperov et al., 2023). Local search neighborhoods are typically defined by balancedness-preserving bit swaps, and spectrum updates are performed in linear time.
- Evolutionary and Memetic Algorithms: Genetic programming and evolutionary algorithms using truth-table, symbolic-tree, or RS encodings can find highly nonlinear functions up to known theoretical bounds for up to $9$ (e.g., NL = 241 for in the RS class via memetic local search) (Carlet et al., 15 Feb 2024, Carlet et al., 24 Apr 2025). For larger , symmetry-constrained search (e.g., RS restriction) and hybridization with local search offer the only practical approaches, as the unconstrained problem becomes infeasible due to the double-exponential growth in search space.
| Method | Max reliably optimized | Peak nonlinearity at | Symmetry-utilized |
|---|---|---|---|
| GP on truth-table | 7 | 240 | No |
| RS bitstring + LS | 9 | 241 | Yes |
| FP encoding + LS | 9 | 241 | Yes (RS variant) |
Empirically, general EAs (GP, truth-table) are outperformed by RS-aware, local-search-enhanced approaches for (Carlet et al., 24 Apr 2025).
4. Algorithmic and Polynomial Approaches to Nonlinearity Computation
Nonlinearity is classically computed via the Fast Walsh–Hadamard Transform (FWT) in integer operations and memory. Recent research provides alternative, more algebraic views:
- Multivariate Polynomial Methods: Simonetti's approach expresses the existence of an affine function at small Hamming distance as a solution to a multivariate system over . Direct Gröbner basis algorithms are intractable for moderate , but incremental kernel representations and reductions to a single "nonlinearity polynomial" over or achieve complexity matching the FWT (Bellini et al., 2016, Bellini, 2014). These methods facilitate symbolic analysis, work directly with algebraic normal forms, and support flexible degree constraints.
- ANF-Based Sparse Methods: For sparse ANFs, the computation is further reduced to a binary integer programming problem over a small number of combined weights, efficiently solving large- instances when the number of monomials is moderate () (Çalık, 2013).
These algorithmic advances enable nonlinearity computation for high-dimensional sparse functions, augmenting classical spectral and algebraic tools.
5. Multidimensional and Generalized Nonlinearity Metrics
While the classical nonlinearity measures distance to affine functions, modern cryptanalytic attacks (linear, multidimensional correlation, fast-algebraic) motivate a richer family of parameters:
- -th Order Nonlinearity: The minimal distance to the set of degree- Boolean functions, with asymptotic behavior of random functions converging almost surely to (Schmidt, 2013).
- Multidimensional Nonlinearity Pairs: Parameters capture the number of unattainable values and the entropy over projections under arbitrary rank- linear maps (generalizing classical nonlinearity at ). For even and , bent functions are optimal in this sense; their vectorial generalization aligns with perfect-nonlinear S-boxes (Semaev, 2019). The full landscape for remains a subject of open research.
These generalized measures allow finer characterization of Boolean function resistance to advanced cryptanalytic methodologies and inform optimal function design for complex vectorial output cases.
6. Applications and Theoretical Significance
Nonlinear Boolean functions underpin the security of modern symmetric cryptology by ensuring S-boxes and combining functions are resistant to linear, differential, and fast-correlation attacks. High nonlinearity, often balanced with other properties such as algebraic immunity, is essential:
- Record nonlinear balanced functions are used in S-boxes and stream ciphers.
- Explicit constructions for efficiently implementable functions with provable nonlinearity and algebraic immunity leverage interval-based HWB kernels and structured permutations (modified Maiorana–McFarland and other combinatorial classes) (Carlet et al., 21 Aug 2024).
- The systematic classification into affine-anchored cosets and symmetry subclasses provides a framework for exhaustive or probabilistic search, analysis of resilience, and structure-guided synthesis, influencing both theoretical paper and practical design.
The field continues to advance, both in algorithmic sophistication and in understanding the deep connections between algebraic, spectral, and combinatorial structure and cryptographic strength. Future research directions encompass new generalizations of nonlinearity, advanced metaheuristics with spectrum-driven objectives, and exploration of larger function classes via scalable algebraic and combinatorial schemes.