Abstract
The XOR operator is a simple yet crucial computation in computer science, especially in cryptography. In symmetric cryptographic schemes, particularly in block ciphers, the AddRoundKey transformation is commonly used to XOR an internal state with a round key. One method to enhance the security of block ciphers is to diversify this transformation. In this paper, we propose some straightforward yet highly effective techniques for generating t-bit random XOR tables. One approach is based on the Hadamard matrix, while another draws inspiration from the popular intellectual game Sudoku. Additionally, we introduce algorithms to animate the XOR transformation for generalized block ciphers. Specifically, we apply our findings to the AES encryption standard to present the key-dependent AES algorithm. Furthermore, we conduct a security analysis and assess the randomness of the proposed key-dependent AES algorithm using NIST SP 800-22, Shannon entropy based on the ENT tool, and min-entropy based on NIST SP 800-90B. Thanks to the key-dependent random XOR tables, the key-dependent AES algorithm have become much more secure than AES, and they also achieve better results in some statistical standards than AES.
Introduction
Block ciphers are among the most widely used primitive ciphers in various fields today. Recently, dynamic block ciphers have garnered significant attention from cryptographers due to their potential to enhance the robustness of block ciphers against cryptographic attacks. The distinctive feature of dynamic block ciphers is that they alter the data encryption process based on changes in a predefined factor. This significantly complicates the task of cryptanalysts when attempting to carry out attacks compared to attacking static block ciphers. Currently, there are several approaches to dynamic block ciphers, such as key-dependent, time-dependent, data-dependent, and so on. The basic components of a block cipher typically include substitution boxes (S-boxes) [4, 31], MDS matrices [23, 33], and key addition operations.
Regarding the approach of making block ciphers dynamic based on the key, researchers continue to propose a variety of methods to make a component within the block cipher dynamically change depending on a pre-defined secret key. For example, in [2, 31], authors made block ciphers dynamic by generating new S-boxes depending on the key. In [3, 36], block ciphers are made dynamic based on key-dependent MDS matrices. In [1, 38], the authors combined multiple transformations within block ciphers to be dynamic, including S-boxes, MDS matrices, and ShiftRow transformations in AES [17, 18].
Specifically, with the dynamic S-box approach, in [9, 10], the authors made Twofish and Blowfish block ciphers dynamic by utilizing four key-dependent S-boxes. Blowfish [9] is a 64-bit block size cipher with a variable key length. The algorithm consists of two parts: key expansion and data encryption. The data encryption process employs a 16-round Feistel network. Each round includes a key-dependent permutation, a key-dependent substitution, and data mixing through dynamic S-boxes. Twofish [10] is a 16-round Feistel block cipher with a bijective F function. Twofish utilizes four 8 × 8 S-boxes that depend on the key, with distinct bijections. These S-boxes are constructed using two fixed 8 × 8 permutations and key-dependent components.
In [2], the authors presented a technique for producing key-dependent S-boxes through a dynamic strategy. They empirically assessed the key-dependent S-box, considering characteristics such as output balance, bits independence criterion (BIC), the strict avalanche criterion (SAC), non-linearity, and probabilities of differential and linear approximations. The authors in [4] introduced a novel encryption approach for images, utilizing AES and incorporating a flexible S-box. The plain image undergoes segmentation into uniform-sized blocks (128 bits each). Subsequently, each block undergoes encryption using AES, where the requisite S-box is dynamically generated through a hyperchaotic system. This implies that each block is encrypted utilizing a distinct S-box for AES. The sequence values are then arranged in ascending order, forming a sequence identified as the S-box for the AES algorithm. The final value in the preceding sequence serves as the foundation for constructing the S-box for the subsequent block, also serving as the original condition for the hyperchaotic system. In [7], the authors demonstrated the Field Programmable Gate Array (FPGA) realization of a True Random Number Generator (TRNG) that leverages dynamic key-dependent s-box architecture for processing. The suggested architecture for TRNG processing uses four autonomous 8-bit s-boxes. In [8], the authors presented an approach for creating key-dependent nxn S-boxes, influenced by an original S-box, with consistent algebraic attributes such as nonlinearity, SAC, bijection, and BIC. The technique relies on a symmetric group and its subgroup, employing group actions on Boolean functions of the S-box, affecting both columns and rows. Through the permutation of rows, the innovative approach allows the creation of 8! copies for every column arrangement. The primary innovation in [13] involves devising a method for constructing a cryptographically secured S-Box, utilizing a non-degenerate 3D map. Initially, a 3D map is formulated, and dynamic analysis showcases its ergodicity and heightened randomness within the phase space. Leveraging the 3D map, a method for constructing a dynamically secured robust S-Box is devised, fulfilling six criteria without encountering reverse fixed points, fixed points, short cycles. The security analysis and empirical statistics validate the algorithm’s security and efficacy. Furthermore, key-dependent S-boxes gained attention in block cipher design during Twofish’s candidacy as an AES finalist. The authors in [31] introduced insights into the cryptanalyst’s approach to working with key-dependent S-boxes, initiates the construction of a structure for the differential cryptanalysis of such S-boxes, and introduces fundamental techniques applied in the analysis of a limited-round Twofish variant.
In the case of dynamically constructing MDS matrices, in [3] the authors introduced an approach to enhance the AES block cipher by incorporating a new MixColumn operation. This novel MixColumn operation employs dynamic MDS matrices derived from key and DNA operations. The authors assessed the security of this updated MixColumn and subjected it to NIST tests to assess its randomness. In [15], the authors established six distinct adaptable binary diffusion models, four of which are reversible and two that are non-reversible. They proposed a binary multiplication method that utilizes a dynamic base matrix and its transpose, achieving the desired efficiency while also maintaining strong defense against modern attacks, all without compromising performance. In [27], the authors introduced a group of binary matrices of size n × n that meet various criteria, enabling the dynamic transformation of cyclic matrices and certain recursive MDS matrices with reduced software overhead. Leveraging the introduced matrix family facilitates the dynamic transformation of established diffusion layers, such as and recursive MDS diffusion layers and cyclic AES-like matrices, with minimal additional computational overhead. Consequently, this offers novel sets of MDS matrices suitable for deployment as dynamic diffusion layers, utilizing the provided matrix family. In [36], the author introduced an approach for the linear layer of substitution-permutation network (SPN) block ciphers, leveraging self-reciprocal recursive matrices with involution properties. This algorithm is capable of producing involutory matrices with multiplicative differential uniformity, enhancing their practicality in execution. They augmented the AES block cipher by integrating dynamic Mix-column transformations through devised algorithm. Additionally, they conducted a security analysis, evaluate conformity to NIST statistical standards, and measure the computational speed of the enhanced dynamic AES block cipher. The proposed algorithm demonstrates promise in fortifying the security aspects of the AES algorithm.
With the approach of combining multiple transformations dynamically in block ciphers, in [1] the authors presented an innovative key-dependent block cipher known as P-AES, which involves altering the parameters in AES for each key. To be more precise, the MixColumn, ShiftRow, and SubByte operations are adjusted according to the secret key, leading to distinct operations for each unique key. It has been demonstrated that the P-AES cipher is resistant to both linear and differential attacks. The authors in [32] introduced a conceptual framework aimed at fortifying the AES algorithm. It modifies the AES ShiftRow operation by incorporating key-dependent elements. The integration of key dependency contributes to heightened algorithmic security, with empirical findings revealing the dispersion of statistical patterns from plaintext to ciphertext. This, in turn, fortifies the plaintext against cryptanalysis. Experimental outcomes illustrate an increase in the dispersion ratio from 0.75 for AES to approximately 1 for the proposed model. Additionally, the model undergoes scrutiny using the coefficient of variation metric. In [34], an Internet data security solution using a modified AES cipher dependent on a key is presented. This cipher exhibits improved SAC and avalanche effects compared to the original AES cipher. The researchers in [37] asserted that AES was initially formulated without accounting for execution within the context of a white-box attack. Due to the fixed nature of confusion and diffusion operations, the white-box version of AES is susceptible to compromise. Consequently, they introduced an AES-like cipher by substituting AES’s S-boxes and MixColumn matrices with key-dependent elements, while preserving their favorable cryptographic attributes. Their findings demonstrate that the white-box implementation of our AES-like cipher can withstand current known attack methodologies. The authors in [38] introduced a Python-based symmetric data encryption technique designed for image encryption to ensure secure transmission. The primary computational procedures involved in this algorithm include Mix Columns, a key-dependent exclusive OR operation incorporating upper and lower triangular segments of the matrix, Shift Rows, and a tailored Sub Bytes transformation, contributing to diffusion and confusion. Outcomes from diverse analyses conducted on the algorithm substantiate its genuineness, confidentiality, and integrity.
In [16], the authors presented a novel approach involving a variable s-box that undergoes continual alterations independently of the encryption key. The updated s-box relies on the epoch timestamp inherent in every digital system and transmitted through digital satellite communication systems. The creation of the non-linear s-box is consistent in both the transmitter and receiver. The key advantage of this proposed method lies in the variability of the ciphertext while maintaining a constant encryption key, ensuring diverse encryption outcomes for identical data. The study also explores and assesses the efficacy and quality of the updated s-box using the avalanche effect method. In [30], the RC6 block cipher employs a data-dependent rotation operation. RC6 utilizes an additional multiplication operation to make the rotation operation dependent on each bit within a word, rather than just a few least significant bits. The enhanced characteristics of RC6 encompass the utilization of four operational registers in lieu of two, along with the integration of integer multiplication as an extra fundamental operation. The incorporation of multiplication significantly amplifies the dispersion achieved in each round, resulting in heightened security, reduced round requirements, and enhanced throughput.
Another method we want to highlight in this paper is the key-dependent XOR operation method. In [5, 6], Salih et al. proposed some key-dependent XOR tables based on Chaotic 3D mappings. The fixed XOR operation in the rounds of AES is replaced by a new dynamic XOR table. In [5], the authors used a separate XOR table, while in [6], the authors alternately used two XOR tables. Additionally, [6] employed a dynamic MixColumns transformation, in which a separate dynamic MDS matrix is used with a 3D affine mapping. However, there is a lack of comprehensive security assessments, and the evaluation of randomness based on NIST statistical standards is not entirely accurate. The dynamic MDS matrix proposed in [6] is not an MDS matrix. In general, there are still many flaws in these two papers.
The rest of the article is organized as follows. Section 3 presents various methods for generating random XOR tables and dynamic block cipher algorithms based on these tables. In Section 4, we apply our proposed dynamic algorithms using random XOR tables to AES, subsequently conducting security analysis and assessing randomness with NIST SP 800-22 [21], ENT [20], and NIST SP 800-90B [28]. Lastly, Section 5 contains the conclusion.
Preliminaries
Advanced Encryption Standard (AES)
AES operates based on a secret key, and the length of this key can be either 128 bits, 192 bits, or 256 bits, depending on the desired level of security. AES is an SPN block cipher with three transformations: key addition, substitution, and permutation. The key addition in AES involves XOR-ing a round key with an input state array. The XOR operation in key addition is a standard bitwise XOR. Figure 1 illustrates the XOR table used in AES.

The XOR table used in AES.
Through the original XOR table of AES, we observe the properties that a 4-bit XOR table must satisfy, including the following attributes: Each column and row of the XOR table consists of distinct numbers ranging from 0 to 15. The XOR table must be symmetrical across the main diagonal, meaning: u XOR v = v XOR u. For any elements u, v, t in the XOR table satisfying u XOR v = t, it is always true that u XOR t = v, and v XOR t = u.
A Hadamard matrix is defined in [29] as follows.
A Hadamard matrix of size n with elements of the first row being a0, a1, …, an-1 will be denoted as follows.
Sudoku [35], also referred to as Su Doku, is a widely popular number-based puzzle game. In its simplest and most common form, Sudoku consists of a 9 × 9 grid with numbers already filled in some of the squares. The objective of the puzzle is to complete the remaining squares by using each of the numbers 1 through 9 exactly once in every row, column, and within the nine 3 × 3 subgrids. Sudoku relies solely on logic, devoid of any arithmetic calculations, and the puzzle’s level of difficulty depends on the quantity and placement of the initially provided numbers. Interestingly, Sudoku has presented intriguing combinatorial challenges to mathematicians. In 2005, two mathematicians demonstrated that there are approximately 6.670 × 1021 possible Sudoku 9 × 9 grids.
These two strategies alone are often insufficient to entirely complete a Sudoku grid. Progress typically necessitates more intricate analytical techniques, and occasionally, one must resort to making educated guesses, reversing them if conflicts arise. One advanced strategy involves examining pairs or triples of cells within a row, column, or block. It’s possible to encounter a pair of cells with only two possible entries, yet their specific placements remain uncertain. However, this observation yields valuable information: those pair of numbers cannot exist elsewhere in the vicinity. Consequently, this reduces the number of potential entries for the other cells nearby, facilitating closer proximity to a solution. In a similar vein, a set of three cells with only three possible entry options among them serves to exclude those entries from all other cells within the corresponding neighborhood.
NIST SP 800-22 test suite
NIST SP 800-22 [21] stands out as a pivotal and extensively utilized tool for evaluating the statistical randomness of random or pseudorandom number generators in the field of cryptography. NIST’s comprehensive suite of randomness tests encompasses 15 distinct assessments, including the Frequency (Monobit) Test, Runs Test, Frequency Test within a Block, Test for the Longest Run of Ones in a Block, Discrete Fourier Transform (Spectral) Test, Binary Matrix Rank Test, Non-overlapping Template Matching Test, Maurer’s “Universal Statistical” Test, Overlapping Template Matching Test, Linear Complexity Test, Serial Test, Cumulative Sums (Cusum) Test, Approximate Entropy Test, Random Excursions Test, and Random Excursions Variant Test.
For a given input sequence, each test computes a corresponding p-value and compares it against the significance level α = 0.01. If p i ≥ α, the conclusion is drawn that the sequence is random; otherwise, if p i < α, the sequence is deemed non-random.
Shannon entropy and min-entropy
Entropy [11], or information entropy, quantifies the uncertainty in a person’s knowledge or an experiment’s output before observation, along with the associated deterministic behavior in predicting its value. Higher entropy signifies increased uncertainty in predicting observation values. Shannon entropy, introduced by Shannon in [11], is a specific measure of information entropy.
Shannon entropy gives the average entropy measure for a given distribution of random variables.
In 1961, R
When α→ ∞ we have an important quantity called min-entropy.
In cryptography, the unpredictability of secret values is crucial. The likelihood of correctly predicting a secret value on the first attempt is linked to the min-entropy of the distribution from which the secret value is generated. Consequently, min-entropy stands out as one of the paramount metrics in cryptography.
Generating random XOR tables using hadamard matrices and Sudoku game
Random XOR tables based on hadamard matrices
In this section, we propose an algorithm to create a random XOR table based on the Hadamard matrix and an algorithm for creating a dynamic block cipher using a key-dependent random XOR table derived from the Hadamard matrix.
From the Definition 1, we denote the Hadamard matrix with 2
n
elements a1, a2, ⋯ , a2
n
as Had (a1, a2, ⋯ , a2
n
), and it has the following form:
First, we demonstrate an XOR table based on Hadamard matrix that satisfies the conditions of an XOR table through the following proposition.
Then, A is an XOR table of n-bit values.
To prove that table A is an XOR table, we need to show that for any two elements a
i
, a
j
, we have:
By the property A ij = A ji , ∀ i, j, we get a i XORa j = a j XORa i , ∀ i, j.
From the property A ii = a1, ∀ i, 1 ≤ i ≤ 2 n , we have a i XORa i = a1 → a1XORa i = a i . So the first column and first row of the Hadamard matrix satisfy the properties of XOR operation.
Note that according to the construction, row (resp. column)
Row (resp. column)
Row (resp. column)
We need to check whether
Same argument for row (resp. column)
Please note that for convenience, we refer to the leftmost row and the topmost row of the XOR table as row 0 and column 0 of the XOR table, respectively.
From the above results, we propose an algorithm to generate a general random XOR table for t (t ≥ 2) bits as follows:
From Algorithm 1, it can be seen that the number of random XOR tables based on the Hadamard matrix is all XOR tables with the properties of elements on the main diagonal being equal, this number is greater than or equal to 16.
The new XOR table is shown in Table 1.
A new random XOR table based on Hadamard matrix
From Algorithm 1, we propose a general algorithm for creating a dynamic block cipher using a key-dependent random XOR table derived from the Hadamard matrix. Please note that in Algorithm 2, we generate a random XOR table, and this XOR table is dependent on a predefined secret key. Algorithm 2 is presented as follows.
For AES-128 block cipher, its XOR table is a 4-bit table (Fig. 1). Then we have a key-dependent dynamic block cipher algorithm, denoted DAES-128 (where D stands for Dynamic), according to Algorithm 2 as follows. In the step 1, we create a window at the first 4 bits of the key K, assigning the integer value of those 4 bits to a1. Perform a window shift to the right by 1 bit. If the integer value of the 4 bits in the window is different from a1, then assign that value to a2. If not, continue to shift the window to the right by 1 bit. Continue doing this until 16 distinct elements with values from 0 to 15 are obtained, denoted as (a1, a2, ⋯ , a16). The remaining steps are performed as in Algorithm 2. Finally, we obtain the key-dependent dynamic block cipher algorithm DAES-128.
Let (a1, a2, ⋯ , a s ) be a sequence of s integers, where 0 ≤ a i ≤ 2 k - 1 for 1 ≤ i ≤ s, and denote the number of distinct integers in the sequence (a1, a2, ⋯ , a s ) as the seed of the sequence, denoted as seed.
For a key with a length of 128 bits, reading 4 bits in turn and shifting one bit at a time, we obtain a sequence of 125 integers with values ranging from 0 to 15. Then, let t be the number of distinct integers in the sequence, we have the following probability table:
So, the probability of obtaining 16 distinct elements with values from 0 to 15, denoted as (a1, a2, ⋯ , a16) from a random key is 0.994989. More precisely, to obtain the sequence (a1, a2, ⋯ , a16) we only need to obtain 15 distinct elements with values from 0 to 15, and then the remaining value is added to the sequence to make it 16 distinct elements. Therefore, the probability is 0.994989 + 0.00500447 = 0.99999347 ≈ 1.
The probability of having t distinct integers in a sequence of 125 elements
In this section, we propose a random XOR table generation algorithm that is more powerful than Algorithm 1 in the sense that it can generate all XOR tables for t bits. Our method is inspired by a famous intellectual game, Sudoku [35].

All 2-bit XOR tables.
From Remark 1, we see that although Algorithm 1 creates a random XOR table, the resulting XOR tables have the special property that all elements on the main diagonal are equal. Therefore, the total number of randomly generated XOR tables based on the Hadamard matrix is restricted. In contrast, the randomly generated XOR tables inspired by Sudoku games are random and do not possess any specific properties like the previous method.
For 2-bit XOR tables, we can observe that only 4 out of 16 tables that have elements on the main diagonal equal to each other. Therefore, if we generate XOR tables randomly using Algorithm 1, we will only obtain 4 different 2-bit XOR tables. This number of XOR tables is relatively small compared to the total possible number (16 tables) of 2-bit XOR tables. To overcome this issue, we propose a method for generating random XOR tables inspired by the Sudoku game that can generate the maximum possible number of XOR tables
Firstly, we observe that each element in an XOR table appears exactly once in each row or column, similar to the rules of a Sudoku table. However, in Sudoku, each element also appears only once within a smaller square known as a “block”, which is a feature not present in XOR tables. Next, we propose a random XOR table generation algorithm inspired by the Sudoku game. Please note that, for the XOR table, we do not consider the condition that each element appears only once in blocks. Here, we rely on the Backtracking method to solve an XOR-Sudoku table.
The number of random XOR tables generated by Algorithm 3 will be much larger than that by Algorithm 1 with large t. In theory, Algorithm 3 can generate all possible XOR tables. Step 6 in the algorithm ensures that the new XOR table satisfies the necessary properties of an XOR table.
Number of iterations and run time for generating 10 XOR Random Table using Algorithm 3
We propose a more general random XOR table generation algorithm of Algorithm 3 as follows:
Number of iterations and run time for 10 XOR Random Table Generations using Algorithm 4 with r = 2, 3, 4
From Algorithm 3, we propose an algorithm to animate the XOR operation for a general key-dependent block cipher as follows.
Instance and parameters
As discussed above, the Random XOR Table Generation Algorithm based on Sudoku game can generate all possible XOR tables. Therefore, we choose AES-128 block cipher as a specific instance, and 4-bit XOR table. Then we have a key-dependent dynamic block cipher algorithm, denoted SDAES-128 (where SD stands for Strong Dynamic), according to Algorithm 5 as follows:
Security analysis
For block ciphers in general and AES in particular, the strongest attacks are differential attacks [14, 39], linear attacks [14, 26], or variations thereof. In particular, differential attacks require the assumption of specific differential trails to attack. Our SDAES block cipher makes the differential trails [15] change continuously and depends on the key, this helps the SDAES block cipher improve security because it is very difficult for an attacker to calculate the differential traces to apply attacks.
Furthermore, using randomly dependent XOR tables will complicate inference in key-related attacks [19] because the substituted XOR tables no longer exhibit the property that when two different inputs have the same difference, the output difference is equal to 0. Each relationship between input differences will continuously vary depending on the random key. This property of random XOR tables also enhances the security of block ciphers that employ them.
On the other hand, to execute linear and differential attacks, the attacker needs to gather an extremely large number of plaintext/ciphertext pairs before launching the attack. For example, with the AES block cipher, to successfully carry out a linear cryptanalysis using Matsui’s Algorithm 2 [26], approximately 247 pairs of plaintext/ciphertext are required. However, in the case of the SDAES block cipher, we employ dynamic XOR tables that depend on the key, making it challenging for the cryptanalysts to know which XOR table SDAES is actually using. This significantly increases the difficulty of cryptanalysis compared to AES. In AES, cryptanalysts have complete knowledge of every component within AES, including the XOR tables. Consequently, to conduct linear/differential attacks, the cryptanalysts must first predict which XOR table is being used in SDAES. Only then can they proceed to collect plaintext/ciphertext pairs for the attack. For instance, to successfully execute an attack on AES, it may require 290 pairs of plaintext/ciphertext, so they need to gather that many pairs if their initial prediction of the XOR table is incorrect. This process repeats until they can discover the key bits.
So, if the number of dynamic XOR tables using our method is assumed to be 2100, the data complexity for a successful linear/differential attack against SDAES will become 2100 × 290 = 2190, which is significantly higher compared to the 290 for AES.
From the analyses above, it can be observed that the dynamic AES block cipher with proposed random key-dependent XOR tables has created a much more secure dynamic AES block cipher compared to the original AES against powerful block cipher attacks.
Randomness assessment
To evaluate the randomness for dynamic block cipher SDAES-128, we perform encryption of the some types of input datasets for each round and perform some evaluations based on NIST SP 800-22, Shannon entropy [11] based on ENT [20], and min-entropy [22] based on NIST SP 800-90B.
Evaluation results on 15 tests of NIST SP 800-22
We use 106 plaintext of 128 bit that are integer numbers from 0 to 106 - 1. So the corresponding output length is 128 × 106. We encrypt plaintexts with random keys using AES and SDAES, and then evaluate the output data according to NIST SP 800-22. Parameters using in NIST Test suite are presented in Table 5.
Parameters are used in NIST Test suite
Parameters are used in NIST Test suite
The evaluation results are presented in the following Table 6.
Results of 10-round SDAES-128 and Original AES-128 with random key
The results in Table 6 indicate that, for the original AES block cipher, there are two tests, namely Linear Complexity and OTM, that detect the non-randomness of the data. However, all 15 tests do not detect any non-randomness in the data corresponding to the SDAES block cipher. Thus, it is evident that the SDAES block cipher meets higher randomness standards of NIST’s tests compared to the original AES.
In [12], the study investigated NIST standards suitable for short lengths that can be applied to the evaluation of block ciphers and hash functions. The non-random input datasets used included Low Weight, High Weight, Rotation, and Avalanche 1 Bit datasets. The evaluation results for SDAES-128 with LW input data are presented in Table 7. The results for HW, AV1 and Rot input data are similar so we do not present them here due to space constraints.
Level-2 p-values assessment results for the SDAES-128 based on tests for short sequences with LW input data
Level-2 p-values assessment results for the SDAES-128 based on tests for short sequences with LW input data
The summary results indicate that the SDAES-128 block cipher exhibits randomness properties with a number of rounds greater than or equal to 3. This result is entirely consistent with the original AES-128.
One of the most important measures of randomness is Shannon entropy. In this section, we evaluate the Shannon entropy change of the four data sets LW, HW, AV1 and Rot through each round of the SDAES block cipher to more clearly see its round-wise randomness. Using the ENT tool, we evaluated the datasets and obtained the results as in Fig. 3.

Shanon entropy assessment for data HW, LW, AV1, Rot in rounds.
The results in Fig. 3 demonstrate that after 3 rounds, the Shannon entropy of the datasets approaches approximately 8 bits per byte. This further confirms that after 3 rounds, the SDAES-128 block cipher exhibits randomness properties equivalent to the original AES-128.
More accurately than Shannon entropy, min-entropy is an extremely important measure of randomness. In NIST SP 800-90B, the authors presented a min-entropy estimation strategy for entropy sources. Here we use estimates for non-iid data sets to evaluate the min-entropy change of the 4 data sets LW, HW, AV1 and Rot over rounds of the SDAES-128 block cipher. The evaluation results are shown in the Fig. 4.

NIST SP 800-90B min-entropy assessment for data HW, LW, AV1, Rot in rounds.
The results in Fig. 4 demonstrate that after 3 rounds, the SDAES-128 block cipher exhibits randomness properties equivalent to the original AES-128.
In this section, we will point out the limitations of our method, as well as indicate the scope and directions for future research.
Our method has the potential to greatly bolster the strength of the AES block cipher. Nevertheless, it is not without its drawbacks and susceptibilities, including: In the execution phase, there is a requirement for extra memory allocation dedicated to the novel XOR table. Specifically, rather than precomputing all XOR tables, we dynamically create a fresh XOR table for every session associated with a confidential key. Subsequently, the newly generated XOR table is retained for the entire duration of the session. When progressing to a successive session with a different key, a new XOR table is created afresh. Consequently, it is imperative to secure and preserve this XOR table until the conclusion of that session. The process of creating XOR tables based on the secret key will affect the time required for encryption and decryption. Since, in every session where a secret key is utilized, both the sender and receiver need to implement the dynamic algorithm to produce a fresh XOR table before employing it for AES, a certain amount of time will be consumed at the start of each session for both entities to create a dynamic XOR table. The technique presented in this paper aims to bolster the strength of the AES block cipher, offering heightened resistance against formidable attacks like linear and differential cryptanalysis. Nevertheless, it is crucial to acknowledge that side-channel attacks pose a risk, as they can exploit physical system characteristics to extract information about the encryption key. Consequently, both dynamic or static block ciphers may be susceptible to this form of attacks. Thus, irrespective of the cryptographic system employed, users must implement effective safeguards to thwart side-channel attacks, such as incorporating secure hardware or deploying software-based protective measures.
Our suggested dynamic AES algorithm is suitable for applications requiring exceptionally robust security and can safeguard extremely confidential information. The dynamic AES algorithm proves most effective in systems utilizing session keys over extended durations, thereby minimizing administrative burdens. Conversely, fortifying the dynamic AES algorithm presents challenges since it evolves with the session key. Thus, users should judiciously apply the dynamic AES algorithm, considering their real-world context and application requirements, aiming to augment the robustness of their data security.
Our research direction holds significant future potential. With the emergence of quantum computers, there is a substantial threat to the security of current cryptographic algorithms. Implementing dynamic block ciphers will greatly enhance security, as it introduces significant complexity for attackers attempting various attacks. Therefore, in the upcoming period, our focus will be on researching and proposing diverse methods for dynamic block ciphering, causing more confusion for potential attackers while maintaining a balance between security, execution speed, and cost.
Conclusion
In this paper, we propose several efficient methods to generate t-bit random XOR tables. Specifically, we propose two methods, one based on the Hadamard matrix and the other inspired by the famous intellectual game Sudoku. Furthermore, we propose dynamic block cipher algorithms based on animating key-dependent random XOR tables. We implement and test the algorithms and statistical record for several 4-bit XOR tables. In particular, we choose the AES-128 block cipher as a specific example to apply our dynamic block cipher algorithms. We conduct a comprehensive security analysis of the key-dependent AES block cipher. We evaluate the randomness of the proposed block cipher through the NIST SP 800-22 standards as well as using a 2-level evaluation using tests for short sequences. Furthermore, we evaluate the change in Shannon entropy and min-entropy over each round of the proposed dynamic block cipher using the ENT tool and estimators in SP 800-90B. The results show that the proposed dynamic AES block cipher is more secure than the regular AES block cipher, and its statistical randomness properties are either better or equal to those of AES. This demonstrates the significance of our proposed dynamic approach based on random XOR tables, enhancing the security of the AES block cipher. In future research directions, we will explore methods to make other components of the AES block cipher dynamic.
