Abstract
Genetic Programming (GP) is traditionally used to find specific Boolean functions for cryptographic applications. However, as the number of variables increases, the search space becomes computationally intractable. This paper proposes a shift from searching for individual function instances to evolving the algebraic constructions—secondary constructions—that generate them. By using GP to evolve these blueprints, the authors demonstrate that it is possible to rediscover known mathematical constructions and find generalizable rules that maintain high nonlinearity and balancedness across various function sizes, scaling effectively up to 18 variables.
Introduction
In symmetric cryptography, Boolean functions are essential components that provide confusion and diffusion. To ensure security against linear cryptanalysis and statistical bias, these functions must be both balanced (containing an equal number of 0s and 1s) and highly nonlinear. While evolutionary algorithms (EAs) are effective at finding specific "sporadic" functions for small input sizes (e.g., 7 or 8 variables), the search space expands exponentially with the number of inputs. For cryptographically relevant sizes of 13 or more variables, direct search becomes computationally impossible.
This research addresses the scaling challenge by shifting the focus from finding individual instances to evolving generalizable constructions. By evolving a formula that takes a small "seed" function and produces a larger, high-quality function, the researchers create tools that can be applied to any variable size.
Methodology
The researchers utilized Genetic Programming (GP), where individuals in the population are represented as mathematical expression trees.
The GP framework used the following components:
- Building Blocks: Terminal nodes consisted of "seed" Boolean functions (known optimal or near-optimal functions for $n=4$ to $7$) and additional independent variables.
- Operators: The function set included standard Boolean primitives (
AND,OR,XOR,NOT) and a ternaryIFoperator for piecewise definitions. - Fitness Function: A two-stage objective was employed. It first penalized unbalanced functions. Once balancedness was achieved, a bonus was awarded based on nonlinearity. A "spectral indicator" was also used to help the algorithm distinguish between functions with the same nonlinearity but different potential for improvement.
Key Results
The evolved constructions proved to be highly general, consistently producing balanced functions with high nonlinearity across all tested sizes (up to $n=18$).
One of the most significant findings was that GP rediscovered classic algebraic methods. For instance, a simple and effective construction found by the GP was: $$F(v_0, v_1, v) = \text{IF}(v_0, f_0(v), f_1(v) \oplus v_1)$$ This construction essentially concatenates and modifies seed functions to preserve cryptographic properties while increasing input dimension. This specific case is a variation of the well-known indirect sum construction, a powerful sanity check for the GP's ability to find mathematically sound rules.
Discussion and Future Work
The study highlighted the difference between syntactic and semantic diversity. Many different-looking GP trees (genotypes) were found to represent the same underlying logic (phenotype) after simplification with the ESPRESSO logic minimizer. While the GP successfully matched the performance of computationally expensive search-based methods, it primarily rediscovered existing techniques rather than inventing entirely new ones.
Future research aims to overcome current encoding constraints. By allowing additional variables to be used as inputs to the seed functions themselves, rather than just externally, GP might discover novel secondary constructions that have yet to be identified by human mathematicians.
Summary updated