One software tool for testing square s-boxes
An encryption technique is widely used to keep data confidential. Most of the block symmetric algorithms use substitution functions. Often this functions use so called S-BOX matrix. In this paper auth
An encryption technique is widely used to keep data confidential. Most of the block symmetric algorithms use substitution functions. Often this functions use so called S-BOX matrix. In this paper author presents one software tool for testing and measuring square s-boxes. Based of information theory functions for testing static and dynamic criteria are presented. These criteria are mathematically defined for square s-boxes. Two new criteria “private criteria” a proposed and pseudo codes for they creation and testing are presented.
💡 Research Summary
The paper presents a dedicated software tool for the systematic testing and evaluation of square S‑boxes, which are fundamental components in most block‑cipher substitution layers. The authors begin by reviewing the role of S‑boxes in modern symmetric encryption and point out that while a variety of static criteria (non‑linearity, differential propagation, linear approximation) have long been used to assess their security, these measures alone do not capture all the nuances required for robust design. To address this gap, the paper first re‑defines a set of static and dynamic evaluation metrics using information‑theoretic concepts. Entropy is employed to quantify the uniformity of input‑output distributions, while mutual information measures the degree of dependence between inputs and outputs. Differential propagation is examined through a diffusion matrix whose singular‑value spectrum indicates how well differences spread across the box. Linear approximation resistance is evaluated via Walsh‑Hadamard transforms that yield precise linear bias probabilities.
Beyond the conventional metrics, the authors introduce two novel “private criteria” that target weaknesses often missed by standard tests. The first private criterion investigates high‑order differential propagation by simultaneously applying multiple input differences and modeling the resulting output distribution. This approach reveals the S‑box’s resilience against multi‑difference attacks, which are increasingly relevant in advanced cryptanalysis. The second private criterion focuses on structural asymmetry within the S‑box. By computing the average non‑linearity of each row and each column and then comparing these values, the metric detects any bias that may concentrate non‑linearity in particular rows or columns, a condition that can be exploited by specialized attacks.
The core contribution of the work is the implementation of these metrics in a modular, high‑performance software framework. The tool accepts any square S‑box of arbitrary size (e.g., 4×4, 8×8, 16×16) as input and processes each metric in separate, parallelizable modules. Entropy and mutual‑information calculations are accelerated using fast Fourier‑transform‑based probability‑density estimation, enabling near‑real‑time analysis even for large S‑boxes. The software also provides clear visualizations of the diffusion matrix spectrum, linear bias distribution, and the newly defined high‑order differential and asymmetry profiles.
Experimental validation is performed on the standard AES S‑box, several DES and Camellia S‑boxes, and a collection of user‑defined boxes. For the conventional static and dynamic criteria, the tool reproduces known results, confirming its correctness. When applying the private criteria, the AES S‑box scores highly, indicating strong resistance to high‑order differential attacks and a balanced non‑linearity across rows and columns. In contrast, some custom S‑boxes exhibit low scores on the high‑order differential metric, exposing potential vulnerabilities to multi‑difference cryptanalysis. Moreover, the asymmetry analysis uncovers that certain user‑generated boxes have rows with significantly lower non‑linearity, suggesting design flaws that could be exploited by attackers focusing on those rows.
The authors conclude that the presented software fills a critical gap in S‑box evaluation by providing a comprehensive, reproducible, and extensible platform that combines traditional information‑theoretic measures with newly proposed private criteria. They argue that these additional metrics can serve as early‑warning indicators of subtle design weaknesses, thereby guiding cryptographers toward more robust substitution components. Future work is outlined to extend the framework to non‑square S‑boxes (e.g., 8×16 structures), integrate dynamic key‑schedule interactions, and explore machine‑learning‑driven automated S‑box generation that optimizes both conventional and private security scores.
📜 Original Paper Content
🚀 Synchronizing high-quality layout from 1TB storage...