Next Article in Journal
Review of Modular Multiplication Algorithms over Prime Fields for Public-Key Cryptosystems
Previous Article in Journal
Compile-Time Fully Homomorphic Encryption: Eliminating Online Encryption via Algebraic Basis Synthesis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Generation of Affine-Shifted S-Boxes with Constant Confusion Coefficient Variance and Application in the Partitioning of the S-Box Space

by
Ismel Martínez-Díaz
1,
Carlos Miguel Legón-Pérez
2,3 and
Guillermo Sosa-Gómez
4,*
1
Department of Mathematics, University of Lleida, Jaume II, 69, 25001 Lleida, Spain
2
Instituto Superior Tecnológico Internacional San Luis (ITSAL), Canonigo Ramos y Avenida La Prensa, Riobamba 060101, Ecuador
3
Instituto de Criptografía, Facultad de Matemática y Computación, Universidad de la Habana, Calle J No. 556 Entre 25 y 27, Ciudad de La Habana 10400, Cuba
4
Facultad de Ciencias Económicas y Empresariales, Universidad Panamericana, Álvaro del Portillo 49, Zapopan 45010, Mexico
*
Author to whom correspondence should be addressed.
Cryptography 2025, 9(2), 45; https://doi.org/10.3390/cryptography9020045
Submission received: 13 May 2025 / Revised: 5 June 2025 / Accepted: 9 June 2025 / Published: 14 June 2025

Abstract

Among the multiple important properties that characterize strong S-boxes for symmetric cryptography and are used in their designs, this study focuses on two: the non-linearity property, a classical security metric, and the confusion coefficient variance property, a statistical proxy for side channel resistance under the Hamming weight leakage model. Given an S-box, two sets can be created: the set of affine-shifted S-boxes, where S-boxes have the same non-linearity value, and the set of Hamming weight classes, where S-boxes have the same confusion coefficient variance value. The inherent values of these two properties ensure resistance to cryptographic attacks; however, if the value of one property increases, it will imply a decrease in the value of the other property. In view of the aforementioned fact, attaining a trade-off becomes a complex undertaking. The impetus for this research stems from the following hypothesis: if an initial S-box already exhibits a trade-off, it would be advantageous to employ a method that generates new S-boxes while preserving the balance. A thorough review of the extant literature reveals the absence of any methodology that encompasses the aforementioned elements. The present paper proposes a novel methodology for generating an affine-shifted subset of S-boxes, ensuring that the resulting subset possesses the same confusion coefficient variance value. We provide insights on the optimal search strategy to optimize non-linearity and confusion coefficient variance. The proposed methodology guarantees the preservation of constant values on the designated. It is possible to incorporate these properties into a comprehensive design scheme, in which case the remaining S-box properties are to be examined. We also demonstrate that, despite the fact that this subset contains S-boxes with the theoretical resistance to side channel attacks under the Hamming weight model, the S-boxes are in different Hamming weight classes.

1. Introduction

In the domain of symmetric cryptography, particularly in the design of block ciphers, the substitution box, also known as the S-box, plays a pivotal role. This notion has been extensively documented in the literature, with notable sources including [1,2]. The S-box’s significance extends to its recent applications in lightweight cryptography and key-dependent cryptography, as evidenced by the works of [3,4]. To ensure a secure encryption/decryption process, it is imperative that the S-boxes have optimal values for their cryptographic properties [5]. Researchers have concentrated on two properties in particular: non-linearity [6], which is the property of a cryptosystem that resists linear cryptoanalysis, and confusion coefficient variance (CCV) [7], which is the property of a cryptosystem that resists power cryptoanalysis under the Hamming weight model. It is acknowledged that other properties, such as differential uniformity, boomerang uniformity, and algebraic degree, are crucial for practical cipher design. However, the present paper is limited in scope to the exploration of the interaction between NL and CCV under a specific class of transformations.
There are several methods for the generation of S-boxes that carry good NL and/or CCV. In general, the aforementioned methods can be classified into three categories. Firstly, there is the algebraic construction method [8]. Secondly, there is the heuristic search method, which includes the random search and artificial intelligence methods [9,10,11,12]. Third, there is the hybrid approach [13,14,15]. Relative to the design of AI-assisted S-boxes, we want to mention that, in addition to the search of S-boxes using metaheuristic algorithms, only a few researches from the machine learning field tried to design S-boxes, example [16]. In our opinion, this is happening because there is no dataset of S-boxes that allows the generation of new ones with good properties.
The integrity of NL and CCV is known to provide a certain degree of protection against cryptographic attacks [1]. However, it should be noted that enhancing CCV is known to result in a corresponding deterioration of NL, and vice versa [7,17,18]. In view of the aforementioned fact, attaining a trade-off becomes a complex undertaking. The impetus for this research stems from the following hypothesis: if an initial S-box already exhibits a trade-off, any method that generates new S-boxes while preserving the balance will be of significant utility. The extant literature does not contain a methodology of this kind; therefore, one is herein presented.
It is well established that affine transformations over a fixed S-box preserve the NL property, as evidenced in the literature [19]. Consequently, in the context of constructing or searching for S-boxes that exhibit optimal NL, the space of all S-boxes can be regarded as a partition of affine classes. Furthermore, in the recent study by [20], this same space has been partitioned by equivalence classes, taking into account their hypothetical leakage in relation to the Hamming weight power consumption representation. These equivalence classes are denoted as Hamming weight (HW) classes. It is important to note that each Hamming weight class considers S-boxes with the same power representation. Consequently, the CCV remains constant across equivalent classes. The calculation of the number of equivalent classes and the cardinals of each equivalent class was also performed in [20].
The HW classes for bijective S-boxes of order n are permutations with repetition of length 2 n , of the numbers 0, …, n, where the number (weight) k appears exactly C ( n , k ) times. The set of repetition-based permutations does not form a group, and the search in this space has been studied in [21]. In their study, the researchers proposed a discrete algebraic differential evolutionary algorithm for repetition-based permutations. They also analyzed the behavior of these permutations during the search.
In this study, we examine affine-shifted transformations in relation to the CCV property, with a focus on those that yield S-boxes with identical CCV values. The present study relies on experimental results to statistically study the properties in terms of behavior, interaction, and common points. This research clearly ends in the formulation of a mathematical invariance and the definition of a generation method. We identify such a subset and present the method given an initial S-box, which is our main result. The S-boxes obtained have been shown to possess identical NL and CCV values. While mathematical proofs have been provided to demonstrate the method’s behavior, empirical evidence has been presented to substantiate its efficacy in the 4-bit and 8-bit spaces. The following discussion will demonstrate the application of the method in various heuristic search and optimization strategies. In conclusion, it is demonstrated that while the S-boxes exhibit equivalent theoretical resistance, they do not belong to the same Hamming weight equivalence class. This finding represents a novel outcome, as it provides evidence that there exist disparate Hamming weight classes within the S-boxes, despite the presence of equal CCV.
In addition to the above summary, we want to remark the following key points:
  • Our generation method directly and quickly computes the S-boxes that have the same CCV as the initial S-box. There is no need for an extra computation to check the entire affine-shifted class. The level of resistance to side channel attacks that we provide is only in its theoretical form. However, because the property ensures minimal security in the first phase of the S-box design, then that level of practical applicability is embedded.
  • Our proposal of partitioning the space of S-boxes in mega-classes (focused on the CCV property, instead of in the Hamming weight), is practical and applicable to heuristic methods and combinatorial optimization, to speed up the search, in the same manner as was carried out for Hamming weight classes [20,22]. Before this work, moving from an S-box solution to another S-box solution with the same CCV value was only possible if the move was inside the same Hamming weight class. In this work, we provide a new way of keeping the CCV value constant, with the addition of also keeping the NL value constant. In other words, having the mathematical definition of the CCV partition of the S-box space is not enough for a cipher designer to quickly obtain S-boxes with the same NL and CCV; the designer needs a generation method like ours.
  • The previous points, (1) and (2), expose the technical novelty of our research.
  • Our invariance statement is supported by several experiments. We consider this a theoretical result by itself that provides a new insight about the intersection between affine-shifted classes and the Hamming weight classes. Moreover, we provide another proposition where we outline a strong and novel theoretical result, also related with the intersection: we prove the existence of different Hamming weight classes in the affine-shifted set.
  • Our contribution lies not in computational efficiency or generality but in structure and interpretation of the CCV landscape within this tractable class. We define the notion of CCV mega-classes, observe their empirical separation across Hamming weight classes, and propose that this structure can be used to guide or constrain S-box search algorithms. We acknowledge that this work may be considered exploratory and structural rather than a breakthrough in cryptographic design. In other words, we believe that identifying invariant metrics within subsets of S-boxes is a useful building block for future heuristic or evolutionary design strategies.
  • Detailed experiments on 3-bit S-boxes were presented to analyze the joint and marginal probabilities of NL and CCV. We calculated those probabilities after generating and evaluating all the S-boxes from the entire S-box space; we did not follow any abstract or a pure math approach. In this particular case, the size of the space is computable and there are only two values for the NL property and there values for the CCV property, which helped us to obtain the insights. However, for bigger spaces like, for example, the 8-bit S-boxes, we think the combinatorial space is not computable with a personal computer, and the range of values for NL is big, but it is much bigger for CCV. The scope of our research ended in the simplest case.
This paper is structured as follows: the introduction continues with the Related Works Section 1.1 and Basic Notions Section 1.2; then, there will be a Results Section 2 and finally a Conclusions Section 3.

1.1. Related Works

The related works can be examined from two perspectives: those that provide algebraic constructions and mathematical proofs, and those that offer conjectures and empirical demonstrations.
From the very beginning of the definition of DPAs (Differential Power Attacks) and the definition of the OTO (Transparency Order, O for old definition) property, in [23], Prouff states the impossibility of designing a property that can resist in an optimal way, and at the same time, the linear, differential, and DPA attacks. Moreover, the author also proved that the OTO of balanced affine functions is not close to the best value, while the OTO of curved functions achieves the worst value, confirming that the construction of highly non-linear S-boxes with good OTO is an open problem.
Later, Chakraborty et al., in [24], proved that MTO (Transparency Order, M for modified and currently used definition) remains constant for affine permutations; on the other hand, if two S-boxes are extended affine equivalence but not affine equivalence, then their MTO are not necessarily equal. Again, it was easy to show that a bit of change in transparency order alone is not enough to ensure the security of a real implementation; therefore, it must be used in combination with other classical countermeasures. In [25], given the similarities of the RTO (Transparency Order, R for revised definition) with the MTO, the authors also prove that the value remains constant for affine transformations.
Following an exhaustive series of experiments, Picek [9] advanced a conjecture that affine equivalence does not imply equivalence in relation to DPA. In terms of the computational complexity of the affine transformation, Picek concluded that modifying the confusion coefficient is less onerous than modifying the transparency order.
A recent article [26] analyzes the affine and extended classes; the study shows that the DPA-SNR (Differential Power Analysis Signal to Noise Ratio) is not preserved.
Although affine transformations of S-boxes and their relation to DPA were not studied in [20], a new equivalence class was defined, proving that S-boxes in the same class show equal CCV. The intersection between affine equivalence and Hamming weight equivalence presents a novel and intriguing research trajectory.

1.2. Basic Notions

A bijective and vectorial Boolean function is a common mathematical definition of an S-box S : { 0 , 1 } n { 0 , 1 } n [27]. This kind of bijection can be represented as a Look Up Table [28] in an efficient manner from a computational point of view and it is important in combinatorial optimization designs of S-boxes. Taking into account the output of the function, and considering the function itself as a permutation S = ( S ( x 0 ) , S ( x 2 n 1 ) ) , is very useful for understanding the properties related to side channel attacks, while the mathematical definition is more related to algebraic properties, as will be seen in this section.
Given a Boolean function f and a Boolean vector w, the Walsh–Hadamard transform is defined as
W H f ( w ) = x { 0 , 1 } n f ^ ( x ) L w ^ ( x )
where the polar form of f is f ^ and L w ^ is a linear function specified by w. The maximum value of W H across all possible Boolean vectors is denoted by
W H m a x ( f ) = m a x w { 0 , 1 } n | W H f ( w ) |
in which |.| represents the absolute value.
The non-linearity property of the Boolean function f can be defined as
N L f = 1 2 ( 2 n W H m a x ( f ) )
Then, the NL property of the vectorial Boolean function S is the lowest value of the non-linearity among the component functions of S (non-zero linear combinations of the n coordinates functions of S).
Affine-shifted S-boxes to a given one S are those constructed as S a , b = S ( x a ) b , x { 0 , 1 } n , where a , b { 0 , 1 } n . In the case a = 0 n , b = 0 n , then S 0 , 0 = S .
Each S-box S a , b , affine-shifted to the given S, has the same NL value as S [19].
The confusion coefficient metric was presented in [29]. This property is computed for sub-keys k i and k j as
κ ( k i , k j ) = E [ ( W ( k i ) W ( k j ) ) 2 ] ,
where, in (Equation (4)), W represents the leakage function of the encryption or decryption process given an arbitrary input and the sub-key k. In common symmetric cryptosystems, one way of modeling the power consumption is by using the value H W ( S ( i n k ) ) , known as the Hamming weight leakage model, where H W ( y ) , y { 0 , 1 } n computes the amount of 1’s in the binary vector y. Because the confusion coefficient property was a physical property, the confusion coefficient variance (CCV) mathematical property was presented using the confusion coefficient (Equation (4)) and the Hamming Weight model in [7]. The property takes into account all sub-keys k i , k j and all input text i n :
C C V ( S ) = V a r ( E [ ( H W ( S ( i n k i ) ) H W ( S ( i n k j ) ) ) 2 ] )
If two S-boxes S a and S b belong to the same Hamming weight class or, in other words, if H W ( S a ( x ) ) = H W ( S b ( x ) ) , x { 0 , 1 } n , then they have the same theoretical resistance against power attacks under the Hamming weight leakage model [20].
A computation representation of a class can be precisely the vector of weights of the outputs of an S-box S that belongs to the class [20]
H W ( S ) = ( H W ( S ( x 0 ) ) , , H W ( S ( x 2 n 1 ) ) )
There are n + 1 sets of inputs of S such as C k = { x { 0 , 1 } n | H W ( S ( x ) ) = k } , 0 k n . For two bijective S-boxes, if their sets are equal, they belong to the same Hamming weight class [20].

2. Results: Generation of S-Boxes with the Same NL and CCV Values as an Arbitrary Initial S-Box

In the current section, we develop the study of the existing relation between affine-shifted transformations and CCV via Hamming height classes, and the achievements derived from it.

2.1. Balanced Case

To study the relationship between affine-shifted S-boxes and their respective CCV values, we analyzed all the affine-shifted S-boxes given the best S-box presented in [7], which is a bijection from { 0 , 1 } 8 to { 0 , 1 } 8 obtained by evolutionary computation and representing a local optimum (CCV = 4.057, NL = 98). We called this S-box S P i c e k . The different aspects of the study are shown in Figure 1, Figure 2, Figure 3 and Figure 4.
The HW class of S P i c e k in its weight array representation is
H W c l a s s ( S P i c e k ) = (4, 3, 3, 4, 4, 2, 2, 4, 4, 2, 3, 3, 4, 4, 3, 4, 5, 7, 6, 5, 5, 6, 6, 5, 5, 5, 7, 4, 4, 6, 5, 4, 3, 4, 4, 3, 2, 5, 5, 3, 4, 4, 5, 3, 3, 4, 4, 3, 6, 4, 5, 6, 7, 5, 4, 5, 6, 6, 5, 5, 6, 4, 5, 6, 6, 4, 4, 5, 6, 3, 4, 5, 5, 5, 4, 5, 5, 4, 5, 6, 2, 3, 3, 1, 2, 4, 4, 1, 3, 4, 4, 3, 2, 4, 3, 2, 4, 5, 5, 4, 3, 5, 5, 4, 3, 5, 5, 3, 4, 6, 5, 3, 3, 2, 2, 3, 4, 0, 1, 3, 4, 3, 2, 3, 3, 2, 2, 2, 4, 7, 6, 5, 4, 6, 7, 5, 4, 6, 6, 4, 4, 8, 6, 5, 3, 2, 3, 4, 4, 4, 3, 4, 4, 3, 1, 3, 3, 2, 3, 5, 5, 5, 5, 6, 6, 5, 4, 4, 7, 4, 4, 6, 6, 5, 5, 7, 3, 4, 4, 2, 4, 5, 4, 3, 2, 4, 5, 3, 3, 4, 3, 3, 2, 5, 3, 2, 2, 3, 4, 3, 1, 3, 4, 2, 1, 5, 3, 2, 4, 3, 5, 5, 5, 5, 4, 5, 5, 5, 3, 7, 6, 4, 3, 6, 3, 3, 2, 4, 3, 3, 2, 4, 4, 1, 1, 4, 4, 2, 3, 4, 3, 6, 6, 2, 4, 5, 6, 4, 3, 5, 5, 4, 3, 5, 5, 2).
The S-boxes similar to S P i c e k have, as is known, the same relatively high value of NL = 98, which provides resistance to linear attacks; however, in Figure 1, it is observed that most of them have a very low CCV value, which is a weakness that makes them vulnerable to power side channel attacks. On the other hand, it can also be seen that there are S-boxes with values of 4.057, which is equal to the CCV value of the S P i c e k S-box. Given this behavior of the distribution of CCV values, the following question arises naturally: what are the S-boxes that preserve the CCV value of the initial S-box? The results of our experiment allow us to answer this question.
We found that all S-boxes generated when b = 0 or b = 255 have the same CCV value as the starting S-box. However, the amount of S-boxes following this invariant was a small fraction of all S-boxes analyzed (see Figure 1), when most CCV values were concentrated near 0. The histogram shows the gap between the CCV value of S-boxes, where 0 < b < 255 and the initial (CCV = 4.057); this gap reflects the distance between a random CCV value and one obtained after an optimization process. We also noticed that the CCV value was never greater than the CCV value of S P i c e k .
In Figure 2, it can be seen more clearly that the highest CCV values are only reached for b = 0 or b = 255 , represented by the brown color. In this 3D view, five buckets were defined (0–1, 1–2, 2–3, 3–4, and 4–5), but because two of them were empty (2–3 and 3–4), three colors were displayed. It seems that there is some kind of symmetric distribution, but we did not analyze it in depth. For a better visualization, a scatter plot was made for b versus CCV (see Figure 3).
We also examined the Hamming weight vectors for S-boxes, where b = 0 . Figure 4 shows the first 16 vectors of the affine-shifted S-boxes (including the HW class of S P i c e k = S P i c e k 0 , 0 itself), where each weight of an S-box output is a value between 0 and 8, represented by a color. We chose this first block because we noticed that the same patterns repeated every 16 vectors. The main insight we obtain is that the Hamming weight classes are not the same, because, taking the first vector as the initial HW class, the color changes for the same input x, from one row to another, while the weight should be invariant equal to H W ( S P i c e k ( x ) ) (see [20]). This notion will be further confirmed in this paper for the AES S-box, where even the distance between classes will be studied. Another thing we noticed is that there is a kind of “inverted reflection” of the first 8 vectors into the last 8 vectors, every 16 entries. Moreover, we assumed that as a movement of weights but kept the variance. We even assumed that all of the above behavior also holds for b = 255 .

2.2. Unbalanced Case

To study the relationship between affine-shifted S-boxes and their respective CCV values in an unbalanced case, we analyzed all affine-shifted S-boxes given the AES S-box [8], which is a cryptographic primitive created via an algebraic construction. Moreover, it has very poor resistance to power consumption attacks (CCV = 0.1113, NL = 112). We denoted this S-box as S A E S .
We found that all S-boxes generated when b = 0 or b = 255 have the same CCV value as the starting one, again. The S-boxes following this invariant comprised a small fraction of all S-boxes analyzed (see Figure 5). The histogram shows the dispersion of the CCV value of the S-boxes; this reflects how bad the neighborhood is with respect to the side channel impedance.
For a more detailed illustration, we scattered the points of b versus C C V (see Figure 6). The symmetrical pattern reappeared. Moreover, we defined some dashed intersection lines to note the behavior around b = 0 and b = 255 . It can be seen that for other values of b, the initial CCV is reached.

2.3. Cases Comparison

Balanced and unbalanced cases can be compared using Figure 7 and Figure 8. There are clear differences in the distribution of the CCV values. The CCV values for affine-shifted S-boxes to S P i c e k are mostly highly concentrated near zero, with a few outliers. On the other hand, the CCV values for affine-shifted S-boxes similar to the S A E S are highly dispersed. In the first case, the median value is 0.1345 and the variance value is 0.1999; in the other case, the median value is 0.1168 and the variance value is 0.0002.

2.4. Invariance of the Confusion Coefficient Variance Under Affine-Shifted S-Boxes, and a Generation Method

The entire above analysis (balanced and unbalanced cases) led to the invariance. In this section, we also formalize a generation method from the invariance.
We recall the definition of confusion coefficient variance (CCV) for an S-box S : { 0 , 1 } n { 0 , 1 } n , based on the Hamming weight leakage model from 5:
C C V ( S ) = Var E H W ( S ( i n k i ) ) H W ( S ( i n k j ) ) 2 ,
where H W ( · ) denotes the Hamming weight function, and the expectation is taken over all plain texts i n { 0 , 1 } n and distinct sub-keys k i , k j { 0 , 1 } n .
Proposition 1.
Let S be a bijective S-box. Define the affine-shifted subset:
A = S a , b | S a , b ( i n ) = S ( i n a ) b , with a { 0 , 1 } n , b { 0 n , 1 n } .
Then,
C C V ( S a , b ) = C C V ( S ) , S a , b A .
Proof. 
Let S a , b ( i n ) = S ( i n a ) b . Then,
S a , b ( i n k i ) = S ( ( i n k i ) a ) b = S ( i n k i a ) b , S a , b ( i n k j ) = S ( i n k j a ) b .
Therefore, the corresponding Hamming weights are
H W ( S a , b ( i n k i ) ) = H W ( S ( i n k i a ) b ) , H W ( S a , b ( i n k j ) ) = H W ( S ( i n k j a ) b ) .
We now analyze the Hamming weight difference under XOR with a fixed vector b { 0 , 1 } n . For general y 1 , y 2 , it holds that
( H W ( y 1 b ) H W ( y 2 b ) ) 2 ( H W ( y 1 ) H W ( y 2 ) ) 2 in general .
However, for b { 0 n , 1 n } , the transformation is either an identity or bitwise complement, which preserves squared Hamming weight differences:
( H W ( y 1 b ) H W ( y 2 b ) ) 2 = ( H W ( y 1 ) H W ( y 2 ) ) 2 .
Now consider the change of variables:
k i = k i a , k j = k j a .
Since XOR with a fixed vector a defines a bijection over { 0 , 1 } n , the set of all distinct key pairs ( k i , k j ) , k i k j is mapped bijectively to the set of all distinct pairs ( k i , k j ) with k i k j . This mapping
  • Preserves the number of pairs: 2 n 2 ;
  • Ensures that no pair is repeated;
  • Covers all possible key pair combinations.
Hence, the expectation and variance over these key pairs remains unchanged. Therefore,
C C V ( S a , b ) = C C V ( S ) .
The subset A has a size of 2 × ( 2 n 1 ) S-boxes. This size grows exponentially as the size of the bits n grows (see Table 1).
Like Proposition 1, another important result of this research is the method of generating A, the subset of the affine-shifted S-boxes, such that the S-boxes of A stay invariant not only the NL property but also the CCV property, with respect to S—the initial S-box. The steps of the method are as follows (see Algorithm 1):
Algorithm 1 Generation method.
Require: 
S, S-box.
Ensure: 
A, subset of S-boxes with equal NL and CCV than S.
1:
A
2:
for  a { 0 , 1 } n 0 n  do
3:
for  b { 0 n , 1 n }  do
4:
  for  x { 0 , 1 } n  do
5:
    S a , b ( x ) S ( x a ) b
6:
  end for
7:
   A A { S a , b }
8:
end for
9:
end for
10:
return A
Because each S-box on the affine-shifted subset depends only on the initial S-box, the generation method can be parallelized. Moreover, on each concurrent process for the creation of S-boxes, the remaining properties can be evaluated.
In comparison with other heuristic methods, like local search or evolution algorithms, starting from an S-box with good NL, it is better to generate affine-shifted S-boxes with the same CCV, instead of checking the neighborhood or the offspring of the S-box, because doing so will not even ensure the same NL. Although our method is not meant to search for S-boxes with a good trade-off between CCV/NL, it is the most efficient method to keep that trade-off.
The method can be applied on bijective S-boxes of all dimensions.
With the objective of finding practical evidence in favor of our invariance and showing the good behavior of the proposed generation method, the following experiment was designed and performed:
  • Fix an S-box space of ( n = 8 , bits) or ( n = 4 , bits).
  • Generation of tens of thousands of initial random S-boxes.
  • For each initial random S-box, apply the generation method Algorithm 1 and obtain the resulting subset of affine-shifted S-boxes.
  • Calculate the CCV of all the S-boxes that belong to the resulting subset.
  • Check if the CCV value stays constant and equal to the CCV of the initial S-box.
We applied this method 10,000 times. All the times the results were as we expected: CCV was the same for all the S-boxes inside the subset.
In terms of the practical value of the generation method, the theoretical results ensure the invariance at the affine shifted subset for S-boxes of all sizes, including 16x16 S-boxes. In order hand, the resistant we try to keep (CCV) is still needed in the design phase of the S-box; stronger attacks like the Deep Learning-Based Side Channel Analysis are present to continue undermining cryptosystems; see [30].

2.5. Generated S-Box Example

Below, we list the S-box S P i c e k 8 , 0 that belongs to the affine-shifted subset after applying the generation method Algorithm 1 given the initial S-box of [7]. In particular, S P i c e k 8 , 0 was obtained with the values a = 8 y b = 0 ; it is a cryptography primitive with a good trade-off between NL and CCV. This S-box is not suitable for practical use and is included merely to demonstrate the CCV invariance mechanism.
S P i c e k 8 , 0 = (85, 79, 172, 221, 61, 176, 19, 204, 89, 210, 127, 72, 8, 143, 209, 148, 10, 151, 30, 125, 203, 113, 188, 131, 123, 25, 78, 147, 84, 205, 32, 31, 74, 247, 91, 242, 23, 90, 47, 34, 235, 16, 141, 103, 165, 37, 4, 227, 76, 45, 134, 236, 117, 41, 56, 44, 216, 112, 245, 7, 65, 239, 166, 156, 27, 46, 140, 246, 118, 6, 150, 194, 163, 69, 252, 81, 64, 183, 201, 224, 58, 190, 116, 226, 77, 105, 189, 192, 255, 12, 122, 212, 234, 60, 33, 115, 162, 171, 106, 179, 173, 88, 220, 160, 243, 42, 87, 52, 164, 70, 137, 230, 83, 43, 138, 175, 207, 136, 98, 144, 248, 121, 253, 67, 68, 238, 71, 66, 177, 214, 145, 95, 119, 80, 139, 168, 240, 200, 62, 13, 132, 53, 133, 82, 35, 251, 135, 101, 153, 104, 107, 130, 223, 5, 93, 228, 155, 21, 50, 126, 152, 159, 54, 213, 202, 22, 233, 36, 219, 100, 109, 149, 146, 59, 3, 111, 39, 94, 28, 63, 185, 2, 142, 161, 186, 102, 250, 24, 96, 206, 195, 17, 75, 174, 129, 254, 187, 18, 193, 184, 232, 170, 237, 180, 40, 244, 49, 197, 20, 222, 157, 217, 208, 120, 199, 0, 249, 169, 218, 181, 73, 211, 11, 241, 9, 231, 229, 15, 108, 86, 110, 128, 191, 14, 225, 29, 198, 51, 48, 215, 92, 158, 26, 55, 167, 1, 99, 97, 124, 178, 154, 38, 196, 182, 114, 57).

2.6. Hamming Weight Class Membership via Distance Analysis

Proposition 2.
Although the S-boxes of the subset A have the same CCV values, they are not necessarily in the same HW equivalent class.
Proof. 
This method consists of selecting an S-box (the S A E S was taken), generating S-boxes of the correspondent set A, calculating the HW classes of the S-boxes of this set A, and proving that the HW classes are different because the distance between them is greater than zero.
1- Run the generation method Algorithm 1 to obtain the subset A a e s ; however, given as an initial S-box S A E S , the S-box is used by the AES block cipher.
A a e s = { S a , b | S a , b ( x ) = S A E S ( x a ) b } , x { 0 , 1 } 8
where a { 0 , 1 } 8 , b { 0 8 , 1 8 } and
2- For each S-box S a , b A a e s , calculate the Euclidean distance:
E D ( S a , S b ) = x { 0 , 1 } 8 ( H W ( S a ( x ) ) H W ( S b ( x ) ) ) 2
and the Hamming distance:
H D ( S a , S b ) = x { 0 , 1 } 8 1 H W ( S a ( x ) ) H W ( S b ( x ) ) , 0 e. o. c.
in relation with S A E S .
The results were as expected. The S-boxes in A a e s have the same CCV as S A E S , but they do not belong to the same Hamming weight class. Furthermore, they belong to different Hamming weight classes (see Figure 9 and Figure 10) considering different distance measures. In the case of the Euclidean distance, we obtain E D ( S a , b , S A E S ) > 25 , S a , b A a e s ; in the case of the Hamming distance, we obtain H D ( S a , b , S A E S ) > 150 , S a , b A a e s .
The demonstration that there are different HW classes with an equal CCV property value is another novel result of this work from a theoretical point of view. Its practical application could further reduce the combinatorial search space for S-boxes resistant to power consumption attacks. To achieve the reduction, we propose to define, in this space of HW classes, a new equivalence relation according to the value of CCV, which immediately partitions this space of permutations with repetitions into new mega-classes, whose elements would be the HW classes with equal CCV.
If it is possible to define an efficient algorithm to build these new mega-classes and move in this reduced combinatorial space by increasing the value of CCV, the searching methods could be accelerated because all HW classes have a common and low CCV value. Partitioning the space of S-boxes using mega-classes could be better than using Hamming-Height classes. An heuristic search will optimally traverse across the space moving from mega-class to mega-class instead of moving from S-box to S-box, in the same way as has been done before using the Hamming-Weight partition.
This approach raises new questions: How to identify all the different HW classes that have the same CCV value? How to design an efficient algorithm to move in this newly reduced space of mega-classes, increasing the CCV value? How many different CCV values exist in the space of n x n S-boxes? The answer to this last question is experimentally difficult due to the exponential dimension of the S-box space, which is why the samples of CCV values may be unrepresentative. These problems are suggested for future research.

2.7. Proof of Different Hamming Weight Classes for Affine-Shifted S-Boxes

Proposition 3.
Let S be an n × n bijective S-box and S a , b ( x ) = S ( x a ) b x { 0 , 1 } n , where a , b { 0 , 1 } n is an affine-shifted S-box given the initial S-box S. Let < S a , b > also be the HW class of S a , b (in particular, < S 0 , 0 > = < S > is the HW class of S); thus, the following sentence is true:
If a 1 , a 2 { 0 , 1 } n , a 1 a 2 , then the Hamming weight classes are different to each other ( < S a 1 , b > < S a 2 , b > ) and, in particular, they are different from the initial < S a 1 , b > < S > .
Proof. 
Let us assume that S a 1 , b and S a 2 , b belong to the same Hamming weight class. k ! { 0 , 1 } n : S a 1 , b ( k ) = 0 , which means that S ( k a 1 ) b = 0 , while a 1 a 2 . This implies that k a 2 k a 1 and, at the same time, implies S ( k a 2 ) S ( k a 1 ) , as S is bijective. Then, for all values of b, we get S ( k a 2 ) b S ( k a 1 ) b , leading to S ( k a 2 ) b 0 , which means S a 2 , b ( k ) 0 . Finally, S a 1 , b ( k ) = 0 and S a 2 , b ( k ) 0 , which contradicts the necessary condition given in [20] for S-boxes that are in the same HW class.

2.8. Comparison of Strategies for Optimize NL and CCV

The S-box’s space of 3 × 3 order was generated to calculate the NL and CCV values of a total of 8 ! , which equals 40,320 S-boxes. The results are shown in Figure 11 and Table 2.
The space of 40,320 S-boxes was reduced in [20] to 1120 HW classes, with 36 S-boxes per class, all with the same CCV value. Table 2 shows that among all 1120 HW classes, there are only three different CCV values; in other words, there are different HW classes with an equal CCV property value that allow us to define a new partition of the S-box space.
Considering that each HW class in 3 × 3 has exactly 36 S-boxes, the number of Hamming weight classes with the same CCV can be calculated by dividing the last row of Table 2 by 36, as shown in Table 3. All the classes grouped by the same CCV value can be viewed in the results’ document of the experiment at http://dx.doi.org/10.13140/RG.2.2.13012.31366.
From Table 3, we can see that the number of HW classes with equal CCV is not constant and is not an increasing function of the CCV value. If we compare Table 3 with Table 2, we can see that there are 224 HW classes with C C V = 0.489796 and 224 HW classes with C C V = 1.13265 ; however, in Table 2, there is a clear difference in the NL values in these two cases. To delve deeper into this aspect, the conditional probabilities of NL given CCV were calculated, as shown in Table 4.
Following Table 4, we obtain the following insights:
  • For NL values and as for CCV values, most probabilities are the lowest they can be, P ( N L = 0 ) 0.73 and P ( C C V = 0.27551 ) = 0.6 , which are not desirable in cryptographic terms.
  • The lowest probable value, P ( N L = 2 , C C V = 1.13265 ) 0.07 , is reserved for the higher values of NL and CCV simultaneously, which corresponds to good cryptographic properties.
  • The conditional probability for the maximum NL given the maximum CCV, P ( N L = 2 | C C V = 1.13265 ) 0.35 , is greater than the conditional probability for maximum CCV given the maximum NL, P ( C C V = 1.13265 | N L = 2 ) 0.26 .
Then, if only NL should be optimized, it is better to search for S-boxes with high CCV values first. Moreover, we sampled 1,000,000 and 100,000 S-boxes in 4 × 4 and 8 × 8 spaces, respectively, and we calculated the probabilities related with the maximum value of CCV and the maximum value of NL. The probabilities are shown in Table 5.
As can be seen in Table 5, in the first case it remains that P ( N L = m a x | C C V = m a x ) has the highest value. Then, the best search strategy is to move to where S-boxes have the maximum CCV value and keeping CCV invariant through HW classes, to where S-boxes have the maximum NL value. In the second case, it is less likely that we obtain S-boxes with high CCV values; therefore, optimizing the two properties is also better to ensure we obtain high CCV first.
Prioritizing CCV optimization in higher-dimensional S-box designs (for later do NL optimization in a second step) will be very efficient if the Hamming-Weight classes or the mega-classes are used to partitioning the search space. In relation to the CCV distribution, we want to mention that, in addition to doing some explorations and getting some insights, it is still an open problem. There is a notable difference between the cardinal of the HW-classes (which is constant for all classes and was estimated at [20] as a function of n) and the cardinal of the mega-classes, because the last one is not constant and depends on the CCV, as we illustrate in our work. The estimation of the different CCV values will be studied in future research. The estimation of the cardinal of each mega-class is also open for study; for n = 3 we just experimentally observe a symmetry of the cardinal that should be mathematically proved.

3. Conclusions

We define a new subset of affine-shifted S-boxes that have the same non-linearity and confusion coefficient variance values. Next, we resume our main theoretical and practical results. It is imperative to consider Propositions 1, 2, and 3 in conjunction with a generation method that is employed to obtain a subset, given an initial S-box. We provide several examples of S-boxes that belong to the affine-shifted subset with respect to the Picek S-box and the AES S-box, respectively. The method presented here identifies affine-shifted S-boxes that preserve both non-linearity and confusion coefficient variance, thus offering potential for heuristic search space reduction. However, the generated S-boxes are not suitable for deployment unless they also satisfy other critical cryptographic criteria, such as good differential uniformity, boomerang uniformity, and algebraic degree. Subsequent endeavors may entail the incorporation of filtering mechanisms or optimization stages with the objective of enhancing the cryptographic profile.
Furthermore, we demonstrate the existence of distinct Hamming weight classes that possess equivalent confusion coefficient values. In this paper, we put forward a definition of a mega-class and explore its potential application in the context of space-based search operations.
Future research endeavors must address the open question concerning the intersection set between the affine-shifted set and the Hamming weight class. This is due to the notion that S-boxes with the same confusion coefficient values could belong to different Hamming weight classes. Also, the study over non-bijective S-boxes should be taken into account.

Author Contributions

Conceptualization, I.M.-D. and C.M.L.-P.; methodology, G.S.-G. and C.M.L.-P.; data curation, I.M.-D. and G.S.-G.; validation, I.M.-D. and C.M.L.-P.; formal analysis, G.S.-G., I.M.-D. and C.M.L.-P.; investigation, G.S.-G. and C.M.L.-P.; writing—original draft preparation, C.M.L.-P., G.S.-G. and I.M.-D.; writing—review and editing, G.S.-G., I.M.-D. and C.M.L.-P.; supervision, C.M.L.-P. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data sharing is not applicable. No new data were created or analyzed in this study.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Van Tilborg, H.C.; Jajodia, S. Encyclopedia of Cryptography and Security; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
  2. Naseer, M.; Tariq, S.; Riaz, N.; Ahmed, N.; Hussain, M. S-box Security Analysis of NIST Lightweight Cryptography Candidates: A Critical Empirical Study. arXiv 2024, arXiv:2404.06094. [Google Scholar]
  3. Al-Dweik, A.Y.; Hussain, I.; Saleh, M.; Mustafa, M. A novel method to generate key-dependent s-boxes with identical algebraic properties. J. Inf. Secur. Appl. 2022, 64, 103065. [Google Scholar] [CrossRef]
  4. Thakor, V.A.; Razzaque, M.A.; Darji, A.D.; Patel, A.R. A novel 5-bit S-box design for lightweight cryptography algorithms. J. Inf. Secur. Appl. 2023, 73, 103444. [Google Scholar] [CrossRef]
  5. Cerini, S.Y. Empirical Evaluation of the Resilience of Novel s-Box Implementations Against Power Side-Channel Attacks. Ph.D. Thesis, Politecnico di Torino, Turin, Italy, 2021. [Google Scholar]
  6. Carlet, C.; Ding, C. Nonlinearities of S-boxes. Finite Fields Their Appl. 2007, 13, 121–135. [Google Scholar] [CrossRef]
  7. Picek, S.; Papagiannopoulos, K.; Ege, B.; Batina, L.; Jakobovic, D. Confused by Confusion: Systematic Evaluation of DPA Resistance of Various S-boxes. In Progress in Cryptology—INDOCRYPT 2014, Proceedings of the 15th International Conference on Cryptology, New Delhi, India, 14–17 December 2014, Proceedings; Meier, W., Mukhopadhyay, D., Eds.; Springer: Cham, Switzerland, 2014; pp. 374–390. [Google Scholar] [CrossRef]
  8. Nyberg, K. Differentially uniform mappings for cryptography. In Advances in Cryptology—EUROCRYPT ’93, Proceedings of the Workshop on the Theory and Application of Cryptographic Techniques, Lofthus, Norway, 23–27 May 1993 Proceedings; Helleseth, T., Ed.; Springer: Berlin/Heidelberg, Germany, 1994; pp. 55–64. [Google Scholar] [CrossRef]
  9. Picek, S. Applications of Evolutionary Computation to Cryptology. Doctoral Dissertation, University of Zagreb, Zagreb, Croatia, 2015. [Google Scholar]
  10. Picek, S.; Jakobovic, D. Evolutionary computation and machine learning in cryptology. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, Lille, France, 10–14 July 2021; GECCO ’21. pp. 1089–1118. [Google Scholar] [CrossRef]
  11. Mariot, L.; Jakobovic, D.; Bäck, T.; Hernandez-Castro, J. Artificial Intelligence for the Design of Symmetric Cryptographic Primitives. In Security and Artificial Intelligence: A Crossdisciplinary Approach; Springer International Publishing: Cham, Switzerland, 2022; pp. 3–24. [Google Scholar] [CrossRef]
  12. Kuznetsov, O.; Poluyanenko, N.; Frontoni, E.; Arnesano, M.; Smirnov, O. Evolutionary Approach to S-box Generation: Optimizing Nonlinear Substitutions in Symmetric Ciphers. arXiv 2024, arXiv:2407.03510. [Google Scholar]
  13. de la Cruz Jiménez, R.A. On some methods for constructing almost optimal S-Boxes and their resilience against side-channel attacks. IACR. 2018. Available online: https://eprint.iacr.org/2018/618.pdf (accessed on 8 June 2025).
  14. Carlet, C.; Djurasevic, M.; Jakobovic, D.; Mariot, L.; Picek, S. Evolving constructions for balanced, highly nonlinear boolean functions. In Proceedings of the Genetic and Evolutionary Computation Conference, Boston, MA, USA, 9–13 July 2022; GECCO ’22. pp. 1147–1155. [Google Scholar] [CrossRef]
  15. Mariot, L.; Picek, S.; Jakobovic, D.; Djurasevic, M.; Leporati, A. Evolutionary Construction of Perfectly Balanced Boolean Functions. In Proceedings of the 2022 IEEE Congress on Evolutionary Computation (CEC), Padua, Italy, 18–23 July 2022; pp. 1–8. [Google Scholar] [CrossRef]
  16. Kim, G.; Kim, H.; Heo, Y.; Jeon, Y.; Kim, J. Generating cryptographic s-boxes using the reinforcement learning. IEEE Access 2021, 9, 83092–83104. [Google Scholar] [CrossRef]
  17. Díaz, I.M. Búsqueda Local de S-Cajas con Alta Varianza del Coeficiente de Confusión. Master’s Thesis, Universidad de la Habana Havana, La Habana, Cuba, 2019. [Google Scholar]
  18. Martínez-Díaz, I.; Legón-Pérez, C.M.; Rojas, O.; Sosa-Gómez, G.; Oliva, D. Local Search Trajectories over S-box space. J. Inf. Secur. Appl. 2022, 69, 103272. [Google Scholar] [CrossRef]
  19. Leander, G.; Poschmann, A. On the Classification of 4 Bit S-Boxes. In Arithmetic of Finite Fields, Proceedings of the First International Workshop, WAIFI 2007, Madrid, Spain, 21–22 June 2007, Proceedings; Springer: Berlin/Heidelberg, Germany, 2007; pp. 159–176. [Google Scholar] [CrossRef]
  20. Legón-Pérez, C.M.; Sánchez-Muiña, R.; Miyares-Moreno, D.; Bardaji-López, Y.; Martínez-Díaz, I.; Rojas, O.; Sosa-Gómez, G. Search-Space Reduction for S-Boxes Resilient to Power Attacks. Appl. Sci. 2021, 11, 4815. [Google Scholar] [CrossRef]
  21. Baioletti, M.; Milani, A.; Santucci, V. An algebraic approach for the search space of permutations with repetition. In Evolutionary Computation in Combinatorial Optimization, Proceedings of the 20th European Conference, EvoCOP 2020, Held as Part of EvoStar 2020, Seville, Spain, 15–17 April 2020, Proceedings; Springer: Berlin/Heidelberg, Germany, 2020; pp. 18–34. [Google Scholar]
  22. Legón-Pérez, C.M.; Menéndez-Verdecía, J.A.; Martínez-Díaz, I.; Sosa-Gómez, G.; Rojas, O.; Veloz-Remache, G.d.R. Probabilistic Evaluation of the Exploration–Exploitation Balance during the Search, Using the Swap Operator, for Nonlinear Bijective S-Boxes, Resistant to Power Attacks. Information 2021, 12, 509. [Google Scholar] [CrossRef]
  23. Prouff, E. DPA attacks and S-boxes. In Fast Software Encryption, Proceedings of the 12th International Workshop, FSE 2005, Paris, France, 21–23 February 2005, Revised Selected Papers; Springer: Berlin/Heidelberg, Germany, 2005; pp. 424–441. [Google Scholar]
  24. Chakraborty, K.; Sarkar, S.; Maitra, S.; Mazumdar, B.; Mukhopadhyay, D.; Prouff, E. Redefining the transparency order. Des. Codes Cryptogr. 2017, 82, 95–115. [Google Scholar] [CrossRef]
  25. Li, H.; Zhou, Y.; Ming, J.; Yang, G.; Jin, C. The Notion of Transparency Order, Revisited. Comput. J. 2020, 63, 1915–1938. [Google Scholar] [CrossRef]
  26. Khalid, I.; Hassan, Z.; Rasheed, H. The Effect of Affine and Extended Affine Equivalence Class Against Various Cryptographic Profile. In Proceedings of the 2024 21st International Bhurban Conference On Applied Sciences And Technology (IBCAST), Murree, Pakistan, 20–23 August 2024; pp. 576–583. [Google Scholar]
  27. Wang, Y.; Zhang, Z.; Zhang, L.Y.; Feng, J.; Gao, J.; Lei, P. A genetic algorithm for constructing bijective substitution boxes with high nonlinearity. Inf. Sci. 2020, 523, 152–166. [Google Scholar] [CrossRef]
  28. Kneževi´c, K. Combinatorial optimization in cryptography. In Proceedings of the 2017 40th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 22–26 May 2017; IEEE: New York, NY, USA, 2017; pp. 1324–1330. [Google Scholar] [CrossRef]
  29. Fei, Y.; Luo, Q.; Ding, A.A. A statistical model for DPA with novel algorithmic confusion analysis. In Cryptographic Hardware and Embedded Systems—CHES 2012, Proceedings of the 14th International Workshop, Leuven, Belgium, 9–12 September 2012, Proceedings; Lecture Notes in Computer Science Series (Including Subseries Lect. Notes Artif. Intell. Lect. Notes Bioinformatics); Springer: Berlin/Heidelberg, Germany, 2012; Volume 7428, pp. 233–250. [Google Scholar] [CrossRef]
  30. Kim, J.; Picek, S.; Heuser, A.; Bhasin, S.; Hanjalic, A. Still Making Noise: Improving Deep Learning-based Side-channel Analysis. IEEE Design Test 2024, 42, 20–27. [Google Scholar] [CrossRef]
Figure 1. Histogram of the value of CCV for affine-shifted S-boxes to S P i c e k .
Figure 1. Histogram of the value of CCV for affine-shifted S-boxes to S P i c e k .
Cryptography 09 00045 g001
Figure 2. Three-dimensional plot of the value of CCV for affine-shifted S-boxes to S P i c e k in relation to a and b values.
Figure 2. Three-dimensional plot of the value of CCV for affine-shifted S-boxes to S P i c e k in relation to a and b values.
Cryptography 09 00045 g002
Figure 3. Scatter plot of b versus CCV, for affine-shifted S-boxes to S P i c e k .
Figure 3. Scatter plot of b versus CCV, for affine-shifted S-boxes to S P i c e k .
Cryptography 09 00045 g003
Figure 4. First block of Hamming weight vectors for affine-shifted S-boxes where b = 0 , including S P i c e k .
Figure 4. First block of Hamming weight vectors for affine-shifted S-boxes where b = 0 , including S P i c e k .
Cryptography 09 00045 g004
Figure 5. Histogram of the value of CCV for affine-shifted S-boxes to S A E S .
Figure 5. Histogram of the value of CCV for affine-shifted S-boxes to S A E S .
Cryptography 09 00045 g005
Figure 6. Scatter plot of b versus CCV for affine-shifted S-boxes to S A E S .
Figure 6. Scatter plot of b versus CCV for affine-shifted S-boxes to S A E S .
Cryptography 09 00045 g006
Figure 7. Box plot of CCV values for affine-shifted S-boxes to S P i c e k .
Figure 7. Box plot of CCV values for affine-shifted S-boxes to S P i c e k .
Cryptography 09 00045 g007
Figure 8. Box plot of CCV values, for affine-shifted S-boxes to S A E S .
Figure 8. Box plot of CCV values, for affine-shifted S-boxes to S A E S .
Cryptography 09 00045 g008
Figure 9. ED between S-boxes in (8)—outer points—and the AES S-box S A E S , the central point.
Figure 9. ED between S-boxes in (8)—outer points—and the AES S-box S A E S , the central point.
Cryptography 09 00045 g009
Figure 10. HD between S-boxes in (8)—outer points—and the AES S-box S A E S , the central point.
Figure 10. HD between S-boxes in (8)—outer points—and the AES S-box S A E S , the central point.
Cryptography 09 00045 g010
Figure 11. CCV vs. NL in 3 × 3 space, with frequency being shown in red.
Figure 11. CCV vs. NL in 3 × 3 space, with frequency being shown in red.
Cryptography 09 00045 g011
Table 1. Size of A in relation with n.
Table 1. Size of A in relation with n.
Size of BitsSize of the Subset
430
8510
Table 2. Frequencies of NL and CCV in 3 × 3 S-box’s space.
Table 2. Frequencies of NL and CCV in 3 × 3 S-box’s space.
CCV = 0.27551CCV = 0.489796CCV = 1.13265Total
NL = 2806402688 f ( N L ) = 10,752
NL = 016,12880645376 f ( N L ) = 29,568
Total f ( C C V ) = 24,192 f ( C C V ) = 8064 f ( C C V ) = 8064 40,320
Table 3. Number of HW classes with an equal CCV property value in 3 × 3 S-box’s space.
Table 3. Number of HW classes with an equal CCV property value in 3 × 3 S-box’s space.
CCV0.275510.4897961.13265Total
f ( C C V ) 24,1928064806440,320 Number of S-boxes in 3 × 3
f ( C C V ) / 36 6722242241120 Number of HW classes in 3 × 3
Table 4. Joint and marginal probabilities of NL and CCV in 3 × 3 S-box’s space.
Table 4. Joint and marginal probabilities of NL and CCV in 3 × 3 S-box’s space.
CCV = 0.27551CCV = 0.489796CCV = 1.13265Total
NL = 2 P = 0.2 P = 0 P 0.07 P ( N L ) 0.27
NL = 0 P = 0.4 P = 0.2 P 0.13 P ( N L ) 0.73
Total P ( C C V ) = 0.6 P ( C C V ) = 0.2 P ( C C V ) = 0.2 P = 1
Table 5. Joint and conditional probabilities of NL and CCV in 4 × 4 and 8 × 8 spaces.
Table 5. Joint and conditional probabilities of NL and CCV in 4 × 4 and 8 × 8 spaces.
4 × 4 8 × 8
Total of S-boxes1,000,000100,000
P(NL = max , CCV = max)0.00010
P(NL = max)0.08860.0017
P(CCV = max)0.0010 1 × 10 5
P(NL = max|CCV = max)0.09980
P(CCV = max|NL = max)0.00120
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Martínez-Díaz, I.; Legón-Pérez, C.M.; Sosa-Gómez, G. Generation of Affine-Shifted S-Boxes with Constant Confusion Coefficient Variance and Application in the Partitioning of the S-Box Space. Cryptography 2025, 9, 45. https://doi.org/10.3390/cryptography9020045

AMA Style

Martínez-Díaz I, Legón-Pérez CM, Sosa-Gómez G. Generation of Affine-Shifted S-Boxes with Constant Confusion Coefficient Variance and Application in the Partitioning of the S-Box Space. Cryptography. 2025; 9(2):45. https://doi.org/10.3390/cryptography9020045

Chicago/Turabian Style

Martínez-Díaz, Ismel, Carlos Miguel Legón-Pérez, and Guillermo Sosa-Gómez. 2025. "Generation of Affine-Shifted S-Boxes with Constant Confusion Coefficient Variance and Application in the Partitioning of the S-Box Space" Cryptography 9, no. 2: 45. https://doi.org/10.3390/cryptography9020045

APA Style

Martínez-Díaz, I., Legón-Pérez, C. M., & Sosa-Gómez, G. (2025). Generation of Affine-Shifted S-Boxes with Constant Confusion Coefficient Variance and Application in the Partitioning of the S-Box Space. Cryptography, 9(2), 45. https://doi.org/10.3390/cryptography9020045

Article Metrics

Back to TopTop