Next Article in Journal
Numerical Analysis of the Fractional-Order Belousov–Zhabotinsky System
Previous Article in Journal
Polarization of Gravitational Waves in Modified Gravity
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Strong S-Box Design Using Quantum Crossover and Chaotic Boolean Functions for Symmetric Cryptosystems

1
College of Engineering, University of Ha’il, Ha’il City 2240, Saudi Arabia
2
ISLAI Béja, University of Jendouba, Beja 9000, Tunisia
3
Laboratory of Electronics and Information Technology, National Engineering School of Sfax, Sfax University, Sfax 3038, Tunisia
4
CRISTAL LAB, National School of Computer Science, Manouba 2010, Tunisia
*
Author to whom correspondence should be addressed.
Symmetry 2023, 15(4), 833; https://doi.org/10.3390/sym15040833
Submission received: 22 February 2023 / Revised: 13 March 2023 / Accepted: 21 March 2023 / Published: 30 March 2023
(This article belongs to the Section Computer)

Abstract

:
In this paper, we propose a new method for drawing a cryptographically strong substitution box using the Lorenz system and quantum genetic algorithm techniques. We used the chaotic function to generate an initial random sequence of bits and the quantum crossover to provide a new and improved substitution box with increased non-linearity. The aim of the proposed algorithm was to generate a strong and secure substitution box that can be utilized in symmetric cryptosystems. The use of chaotic Boolean functions, genetic algorithm techniques, and the quantum crossover helped achieve this goal, and statistical tests further confirmed the randomness and efficiency of the generated substitution box. The results of the statistical test suite showed that the substitution box produced by the proposed algorithm is a “pass” in terms of randomness and has strong cryptographic properties. The tests include a frequency (monobit) test, a frequency test within a block, a linear complexity test, an approximate entropy test, and a cumulative sums test among others. The p-values obtained in the tests indicate that the randomness of the generated substitution box meets the requirements of a cryptographically secure substitution box.

1. Introduction

The impact of technological advancements on society in recent years has been substantial. Communication has been revolutionized by the arrival of social media platforms, such as Facebook, Twitter, and Instagram, making information exchange and communication faster and more convenient. Technology and communication have a symbiotic relationship, in which growing communication necessitates new solutions to privacy concerns. Secured communication is crucial to safeguarding privacy. To secure information transmitted online, various methods are employed, including encryption as a critical tool. However, encryption alone cannot provide sufficient protection. Hence, security researchers are continually exploring new technologies and enhancing current ones. The randomness, sensitivity to initial conditions, and ergodicity of chaotic systems hold promise in constructing robust cryptography systems. Protecting sensitive exchanged data is a main problem nowadays. The main purpose of the attacks is to break keys and hashes, penetrating through the canal of the exchange of information between clients and obtaining all of the information. To secure and protect the data in an efficient way, we have to generate strong keys that will be used for the encryption and decryption of information. This protects the exchange of data against third-party attackers. The generated key may satisfy a minimum of complexity to guarantee its security. Moreover, a greater randomness of the key hash sequence means that the cipher is more persistent and harder to break.
In cryptography, an S-box (substitution box) is a basic component of symmetric key algorithms, such as DES and AES [1]. It is a non-linear lookup table that takes an input of a fixed number of bits and produces an output of a fixed number of bits. The S-box is used to create confusion and diffusion during the encryption process, making the encrypted data more secure against attacks [2]. The S-box is designed to have certain properties, such as being injective, resisting linear and differential cryptanalysis, and providing a high level of non-linearity. The design and implementation of an S-box are important aspects of the security of a cryptographic system. An S-box is a fundamental component in many symmetric key cryptography algorithms. It performs substitutions of values and bit positions in a given input to produce the output, with the goal of making it difficult for an attacker to infer the original information from the encrypted data. The security of the S-box depends on its non-linearity, which can be achieved through complex mathematical transformations and algorithms. The design and implementation of S-boxes are crucial for the overall security of the cryptographic system. In fact, the security of an S-box in cryptography depends on its non-linearity, which refers to the measure of how much the output of the S-box depends on all of its inputs, as opposed to just a simple linear relationship between inputs and outputs. In cryptography, a highly non-linear S-box is desired because it makes the encryption more difficult to break as there is no simple relationship between the input and output, thereby making it harder for an attacker to predict the output based on the input. The non-linearity of the S-box can be achieved through complex mathematical transformations, such as chaotic systems, fractional transformations, permutation functions, and other algorithms. These transformations can create complex and unpredictable relationships between the input and output, increasing the overall security of the encryption. S-boxes can be implemented as lookup tables that use Boolean functions to map input values to output values. The security of the S-box depends on its non-linearity, and Boolean functions can provide the desired non-linearity. The design of S-boxes using Boolean functions involves selecting a suitable set of Boolean functions, determining the mapping between inputs and outputs, and verifying the non-linearity and other security properties of the S-box [3]. In order to generate a pseudo-random Boolean function, we used chaotic functions. They are often used as a source of randomness and unpredictability. By combining chaotic functions with Boolean functions, one can create a pseudo-random Boolean function that is difficult to predict or reverse engineer, which provides a higher level of security for the cryptographic system [4,5]. In our work, we utilized genetic algorithm techniques (GA), including the quantum crossover, to perform 65 permutation and substitution operations in S-boxes. In this approach, a genetic algorithm is utilized to search for a suitable S-box construction based on the desired properties, such as non-linearity and diffusion, that ensure the security of the encryption. The genetic algorithm operates on a population of candidate S-box solutions, evaluating them based on a fitness function that measures their cryptographic properties. The quantum crossover technique is used to generate new candidate solutions and, in combination with other genetic algorithm operations such as selection and mutation, can converge on a high-quality S-box construction that is well suited to the requirements of the encryption system. Through this approach, we were able to generate a cryptographically strong S-box with strong statistical properties, and our work highlights the potential for combining chaotic and genetic algorithms with the quantum crossover to produce secure cryptographic components [6].
This paper mainly contributes to developing a new approach for generating a secure S-box, a crucial component in symmetric cryptography.
(1)
The proposed S-box is based on the combination of chaotic Boolean functions, classical genetic algorithm techniques, and the quantum crossover. The chaotic Lorenz system provides a source of randomness, while the Boolean functions and genetic algorithm techniques ensure the cryptographic strength of the generated S-box. Chaotic Boolean functions offer several advantages for their use in symmetric cryptography. They can generate pseudo-random sequences that have a high level of entropy, meaning that they appear random to an observer even if they are generated deterministically. Moreover, chaotic Boolean functions are computationally efficient, which is important in cryptography as encryption and decryption must be performed in real time. They can be implemented in hardware with low resources.
(2)
The quantum crossover is used to generate new bitstrings by combining bits from two parent bitstrings. This technique takes advantage of quantum parallelism to evaluate multiple-bit combinations simultaneously, which can lead to faster convergence and better exploration of the search space.
(3)
The classical two-point crossover technique helps to improve the permutation phase of the algorithm.
(4)
The present work offers a comprehensive and meticulous investigation of the randomness properties of the S-box. The randomness is evaluated by applying the NIST statistical test suite. The distribution of p-values was analyzed to ensure its uniformity, which is a measure of the randomness of the S-box’s output. The results of the statistical tests, combined with the uniformity of the distribution of p-values, provided a comprehensive evaluation of the S-box’s randomness and cryptographic security. By passing the NIST tests, the generated S-box is confirmed to have the desired randomness properties, making it suitable for use in symmetric cryptography.
(5)
This paper makes a significant contribution to the field of cryptography by providing a novel and efficient method for generating secure S-boxes, which can be easily adapted for use in various symmetric cryptosystems.
The remaining part of this paper is organized as follows. In Section 2, we describe the literature review of chaotic S-boxes and quantum genetic algorithms. In Section 3, we provide an introduction to the fundamentals of quantum computing. Section 4 details the cryptographic properties of Boolean functions. Section 5 presents the fundamentals of classical genetic algorithm techniques. The Lorenz system and its chaotic behavior are described in Section 6. In Section 7, we detailed the proposed algorithm for generating the S-box. The experimental results and performance analysis of the generated S-box are discussed in Section 8. A detailed and in-depth study of the randomness of the S-box is presented and evaluated by the NIST statistical test suite in Section 9. The proposed method along with a description of future work is concluded in Section 10.

2. Related Work

In cryptography, the generation of secure S-boxes and hashed keys is a crucial aspect of protecting sensitive information. To achieve this, researchers have been exploring various methods, including the combination of optimization algorithms with chaotic functions. This approach aims to generate strong S-boxes and hashed keys that are capable of providing a high level of security for sensitive information. The goal of these studies is to find an optimal combination of chaos and optimization algorithms that results in secure and efficient S-boxes and keys. In [7], the authors used the Firefly algorithm (FA), which is a meta-heuristic optimization algorithm based on the flashing behavior of fireflies, with a discrete chaotic map to generate an improved S-box. The authors, in [8], utilized the Artificial Bee Colony (ABC) algorithm in combination with the chaotic logistic map function to create a new optimal S-box that offers strong encryption. The authors in the paper [9] used the Cuckoo search algorithm, which is a nature-inspired optimization algorithm, in combination with chaotic maps to design a new substitution box. The idea behind this approach was to optimize the S-box to have strong cryptographic properties such as non-linearity, avalanche effect, and bit independence, among others. The chaotic maps were used to introduce randomness in the optimization process and make it less prone to becoming stuck in local optima.
The combination of GA and chaos is used to generate new s-boxes that have high non-linearity values, which make them difficult to break [10,11]. By incorporating chaos into the GA, the researchers aimed to improve the randomness and diversity of the generated S-boxes, making them more secure. The chaotic function acts as a randomization tool that is integrated into the GA to improve its performance. In these studies, the chaotic functions can be used as a fitness function, initial population generator, or mutation operator. The goal of these studies is to find a new S-box that has the highest possible non-linearity and provides strong ciphers to protect sensitive information. The authors in [12] aimed to generate a highly non-linear S-box using Boolean functions. In other studies, such as [13] and [14], the use of a chaotic map was employed to strengthen image encryption through the S-box. The authors in [15] combined the Gingerbreadman chaotic map and the S8 permutation to encrypt images. In [16], the Feistel-like structure was improved with a chaotic S-box and a Rubik’s cube-based P-box for image encryption. The authors in [17,18,19] used the chaotic map to generate new, optimized and improved S-boxes. In [20], the authors used a polynomial function with a cubic equation to generate key-dependant substitution boxes (S-boxes). The key is used as one of the parameters in the cubic polynomial function, and the output of the function is used to define the entries in the S-box. The authors, in [21], demonstrated the usefulness of the chaotic behavior of the sine map in generating encryption keys that are hard to predict, thereby offering high levels of security. Sine–cosine using the enhanced dynamics of the chaotic map was used in [22]. The technique utilizes the dynamics of a chaotic map, such as the sine or cosine map, and enhances them to generate keys that are difficult to predict and provide a high level of security. This technique is based on the idea that chaotic systems are inherently unpredictable, and, by using them to generate encryption keys, the keys themselves become difficult to predict and provide a high level of security. The security offered by an S-box in a block cipher is dependent on its level of confusion. A higher degree of confusion results in better security. In many block encryption algorithms, their resistance to attacks is closely tied to the security provided by the use of one or more S-boxes. Although these algorithms may have multiple components, the S-box is often the only non-linear component, making it a critical factor in the overall security of the encryption [23,24,25]. Majid Khan’s proposal involves using a multi-chaotic S-box image encryption scheme that integrates the Lorenz and Rossler system. By incorporating chaotic systems and multi-parameter non-linear functional chaotic systems, the randomness and diffusion of the data are increased [26]. The design method of the S-box proposed by Dragan Lambić utilizes a discrete chaotic map based on permutation and combination to generate a chaotic sequence, which is then used to arrange the elements of the S-box [27]. An S-box design method based on the 4D-4Wing hyperchaotic system was proposed by F. Islam and colleagues [28]. This method leverages the complex non-linear behavior of the hyperchaotic system to generate two pseudo-random integer sequences and further enhances the randomness by exchanging the values of the two iterative sequences on the same map in G F ( 2 8 ) . In [29], an image cryptosystem is developed and proposed. In the proposed algorithm, the authors utilized the numerical solution of the Lorenz differential equations and a linear descent algorithm in the second encryption stage to create a robust and strong S-box. In [30], the proposed RGB image encryption scheme incorporates the concepts of confusion and diffusion from Shannon’s ideas. It consists of three stages, and, in the second stage, a carefully crafted S-box is employed to achieve the desired non-linearity and complexity. One of the earliest researchers to investigate this topic demonstrated the significance of the characteristic referred to as correlation immunity through the use of algebraic methods [31]. Symmetric ciphers are typically divided into two categories: block ciphers and stream ciphers. A crucial component in the design of both types of ciphers is the use of Boolean functions [32]. Quantum computing involves the use of various fundamental technologies, such as preparing and controlling physical qubits, measuring them, and building logical qubits. Currently, there are numerous experimental quantum computing platforms, such as the superconducting system [33], the trapped ions system [34], nitrogen-vacancy centers in diamonds [35], and ultra-cold atoms [36]. A recent breakthrough, made by Google, demonstrated quantum supremacy using a superconducting quantum computer [37], thus pushing the research on quantum computing to the forefront. The development of quantum computing [38] has led to the emergence of quantum-inspired classical algorithms for evolutionary computing. Classical genetic algorithms have also been used to evolve quantum circuits, but these algorithms are designed to work on classical computers [39,40]. Quantum genetic algorithms (QGAs), on the other hand, have received relatively little attention, with only a few works completed so far [41,42]. If QGAs can demonstrate significant improvements over their classical counterparts, evolutionary computing on quantum architectures will gain more attention. In [41,42], Malossini et al. claimed that their quantum algorithm’s computational complexity for an evolutionary step between generations is exponentially faster than that of a classical one, but they may have overlooked the complexity of index-to-string conversion circuits or the circuit complexity of a variant of the inversion-about-average operation.

3. Quantum Computing

Quantum computing is a type of computing that uses quantum mechanical phenomena, such as superposition and entanglement, to perform operations on data. Quantum computers use quantum bits or qubits to represent data, which can be in multiple states simultaneously. Quantum algorithms are designed to exploit these unique properties of qubits to perform certain types of computations more efficiently than classical computers. While still in its early stages, quantum computing has the potential to revolutionize fields such as cryptography, materials science, and drug discovery.

3.1. Quantum Bit

The unit of information in a quantum computer is the quantum bit or qubit, which is a two-state quantum system that can be used to store and process information. The two possible states of a qubit are denoted by | 0 and | 1 , and these states can be represented as vectors in a two-dimensional complex vector space. The notation | ψ is used to represent a qubit in its “coherent state” or “quantum superposition”, which is a linear combination of the states | 0 and | 1 .
| ψ = α | 0 + β | 1
where α and β are complex numbers known as the amplitudes of the states | 0 and | 1 . The normalization of the states to the unit ensures that the probabilities of finding the qubit in the states | 0 or | 1 are given by the squared moduli of the amplitudes, i.e., | α | 2 and | β | 2 , respectively. Since the total probability must be one, it follows that | α | 2 + | β | 2 = 1 .
The superposition of a qubit can also be represented in vector form using Dirac notation, which is a standard notation in quantum mechanics. In this notation, the state | ψ is represented as a column vector:
| ψ = α β
Similarly, the states | 0 and | 1 are represented as column vectors:
| 0 = 1 0
| 1 = 0 1
Using this notation, the superposition of a qubit can be written in matrix form as follows:
| ψ = α β = α 1 0 + β 0 1 = α | 0 + β | 1
This matrix representation makes it easy to perform operations on qubits, such as applying quantum gates and measuring their states.
Suppose we have a qubit in the state | ψ = 1 2 | 0 + 1 2 | 1 . We can represent this state as a column vector using Dirac notation as follows:
| ψ = 1 2 1 2
Similarly, the states | 0 and | 1 can be represented as column vectors:
| 0 = 1 0 | 1 = 0 1
Using this notation, we can write the superposition of a qubit in matrix form as follows:
| ψ = 1 2 1 2 = 1 2 1 0 + 1 2 0 1 = 1 2 | 0 + 1 2 | 1
This matrix representation makes it easy to perform operations on qubits, such as applying quantum gates and measuring their states.
In a quantum computer, the input is typically stored in a quantum memory register, which is represented as a tensor product of individual qubit states as follows.
| ψ = | ψ 1 | ψ 2 . . . | ψ n
The register state is obtained using the Kronecker or tensor product operation denoted by the symbol ⊗, which takes two or more qubits and produces a new, larger qubit register. For example, the tensor product of two qubits x and y can be represented as follows.
x y = x 0 x 1 y 0 y 1 = x 0 y 0 y 1 x 1 y 0 y 1 = x 0 y 0 x 0 y 1 x 1 y 0 x 1 y 1
This means that the tensor product of two qubits with two possible states each produces a new qubit register with four possible states. The tensor product operation can be extended to more than two qubits, and the resulting qubit register will have a number of states equal to the product of the number of states of the individual qubits.
For example, if we have an eight-bit sequence “01100100”, we can represent it in terms of the tensor products of the individual qubits as follows.
| 01100100 = | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0
where | 0 and | 1 represent the two possible states of a single qubit.

3.2. Quantum Gates

Quantum gates are the basic building blocks of quantum circuits. They are the equivalent of classical logic gates in classical digital circuits. Quantum gates are used to manipulate the state of qubits, which is the basic unit of information in a quantum computer. They are represented by unitary matrices that operate on the state of one or more qubits. These matrices are reversible, meaning that they can be applied in reverse to undo their effect on the state of the qubits. There are several types of quantum gates, including the Pauli-X, Pauli-Y, and Pauli-Z gates, which are the quantum counterparts of classical NOT, CNOT, and CZ gates, respectively. Other important quantum gates include the Hadamard gate, the phase gate, and the controlled-phase gate. Each gate has a specific effect on the state of the qubits, and different gates can be combined in a circuit to perform a specific quantum computation. The important quantum gates and their operations are illustrated in Table 1 and Figure 1.

4. Boolean Functions

In cryptography, Boolean functions (BFs) are crucial components in the design of both block and stream ciphers, as well as in the use of noisy channels. To enhance the security against cryptanalysis, it is important to increase the non-linearity of these BFs. A Boolean function is a mathematical function that maps binary inputs (0 or 1) to a binary output (0 or 1). In the mathematical definition provided, n is a positive integer and refers to the number of inputs to the function. The input space of the function is represented by F 2 n , which is the set of all binary vectors of length n. The output space of the function is represented by F 2 , which is the finite field with two elements, often denoted as 0 and 1. The Boolean function maps inputs in F 2 n to outputs in F 2 , indicating the binary value of the function’s output for a given set of binary inputs. We denote by B n the set of all n-variable Boolean functions. Every Boolean function f in B n has a unique representation as a multivariate polynomial over F 2 . The equation for a Boolean function f with n variables ( x 1 , x 2 , …, x n ) can be represented as follows.
f ( x 1 , x 2 , . . . , x n ) = i = 1 2 n c i j = 1 n x j a i , j
where c i is either 0 or 1 (elements of F 2 ), and a i , j is either 0 or 1.

4.1. Substitution Box

Let n be the number of bits in the input to the S-box, and let m be the number of bits in the output of the S-box. The S-box can be represented as a function S : 0 , 1 n 0 , 1 m , where 0 , 1 n is the set of all n-bit binary strings and 0 , 1 m is the set of all m-bit binary strings. The S-box takes an n-bit input value x and produces an m-bit output value y.
The S-box can be defined using a lookup table, where each input value x corresponds to a unique output value y. The lookup table can be represented as an array S with 2 n rows and m columns, where the entry S i , j corresponds to the jth bit of the output value for input i. The S-box function is then defined as:
S ( x ) = S [ x ] ,
where S [ x ] is the row of the lookup table corresponding to the input x. For example, if n = 8 and m = 4 , the S-box could be represented as a lookup table with 2 8 = 256 rows and four columns:
S = [ [ 0 x 0 , 0 x 4 , 0 x 8 , 0 x C ] , [ 0 x 1 , 0 x 5 , 0 x 9 , 0 x D ] , [ 0 x 2 , 0 x 6 , 0 x A , 0 x E ] , [ 0 x 3 , 0 x 7 , 0 x B , 0 x F ] , ]
In this case, the input x is an eight-bit binary string and the output y is a four-bit binary string. For example, if the input x is 10101010, the output y would be the row of the lookup table corresponding to the decimal value of x in binary:
S ( 10101010 ) = S [ 0 x A A ] = [ 0 x A , 0 x B , 0 x 2 , 0 x 3 ]
Alternatively, the S-box can be defined using a mathematical expression that maps each input value x to a unique output value y. The mathematical expression can be any function that satisfies particular cryptographic properties, such as non-linearity, diffusion, and resistance to differential cryptanalysis. One commonly used expression for an S-box is the inverse function of a finite field multiplication, which can be defined as:
S ( x ) = ( x 1 ) mod p ( x )
where x is the input value, p ( x ) is an irreducible polynomial over the finite field, and ( 1 ) denotes the multiplicative inverse in the finite field. This expression produces a non-linear mapping that exhibits good cryptographic properties and is used in many cryptographic algorithms such as the AES (the Advanced Encryption Standard).

4.2. Non-Linearity

This representation of a Boolean function as a multivariate polynomial over F 2 is often referred to as the algebraic normal form (ANF) of the Boolean function. In the ANF, the coefficients of the polynomial represent the truth table of the Boolean function. The ANF of a Boolean function provides a concise and compact representation of the Boolean function, and it can be used to study and analyze various properties of the Boolean function, such as its non-linearity, linearity, and correlation immunity, among others. Additionally, the ANF can be used to implement the Boolean function in hardware or software [3].
The algebraic degree of a cryptographic function is a measure of the complexity of the function and its resistance to attacks based on algebraic methods. It is defined as the maximum number of algebraically independent elements (i.e., variables) in a system of polynomial equations that define the function. Given a Boolean function f ( x 1 , x 2 , . . . , x n ) of n variables, the algebraic degree of f is the maximum number of variables that appear in a non-zero term in its algebraic representation. This representation can be obtained by constructing a system of polynomial equations that describe the function, where each equation corresponds to a specific input value and output value of the function. For example, if a Boolean function has an algebraic representation with the equation f ( x 1 , x 2 , x 3 ) = x 1 x 2 + x 1 x 3 + x 2 x 3 , then the algebraic degree of the function is two.
In cryptography, it is desirable to have a high algebraic degree, as it makes the function more resistant to algebraic attacks. The algebraic degree of an S-box, for example, is a commonly used metric for evaluating the security of cryptographic systems. In general, a higher algebraic degree corresponds to a stronger security guarantee, as the function becomes more difficult to analyze and predict. Let f be a cryptographic function with the input x F 2 n and output y x F 2 . The algebraic degree of f is defined as the maximum degree of the polynomials P ( x , y ) that describe the algebraic relations between the input and output of f. The non-linearity n l ( f ) of a Boolean function f is defined as the minimum Hamming distance between f and all affine functions g and can be represented as follows.
n l ( f ) = min g A n d ( f , g ) ,
where d ( f , g ) = w t ( f + g ) , and w t is the abbreviation for “weight”. In this context, the weight of a binary vector is the number of non-zero elements in the vector. So, w t ( f + g ) is the number of non-zero elements in the vector resulting from adding the binary vectors f and g.
The Walsh spectrum of a Boolean function f, denoted by W f , is defined as follows.
W f ( k ) = x F 2 n ( 1 ) f ( x ) + x · k ,
where k in F 2 n and x · k = i = 1 n x i k i ( m o d 2 ) is the inner product between x and k.
The non-linearity of a Boolean function f can be expressed via its Walsh spectra by the following formula [31].
n l ( f ) = 2 n 1 1 2 max k 0 | W f ( k ) | ,
where W f ( k ) is the Walsh coefficient of f at point k.

4.3. Cryptographic Properties

An S-box is an important component of many symmetric key cryptographic systems, and several properties are required to ensure the security of the encryption process. The first property is bijectivity, which ensures that each input maps to a unique output and vice versa. Non-linearity is another important property, which measures the cryptographic strength of the S-box. A high degree of non-linearity makes it more difficult to attack the S-box. Algebraic immunity is also necessary, which refers to the S-box’s resistance to algebraic attacks [43]. The S-box must have the property of being difficult to reverse engineer to access sensitive information. The strict avalanche criterion is a property that ensures that a small change in the input will produce a significant change in the output [44]. The output bit independence criterion is another important property, which requires that the output bits of the S-box are independent of each other. Finally, the equiprobable input and output XOR distribution is a property that ensures the distribution of the XOR of the input and output values is balanced, which makes it more difficult for attackers to perform differential attacks [45].

5. Classical Genetic Algorithm

The genetic algorithm (GA) is a computational method introduced by John Henry Holland [46]. It is designed to generate high-quality solutions by incorporating concepts from biology, such as crossover and mutation, to mimic the process of natural evolution. The GA is particularly effective in solving non-linear problems. It works by taking a set of genes with similar or different values and combining them to form parent chromosomes. Then, by using these parent chromosomes as a starting point, new chromosomes are generated randomly to form a new population. Each chromosome in this population has its own fitness value and unique characteristics. The new chromosomes are created through the inheritance of the best features and traits from the parent chromosomes. This is described in Algorithm 1.
Algorithm 1 Classical Genetic Algorithm
  • Input: Initial population, fitness function, stopping criteria.
  • Output: Optimal solution.
  • Procedure:
  • while stopping criteria is not met do
  •     Evaluate the fitness of each individual in the current population;
  •     Select the best individuals based on their fitness values to be the parents;
  •     Apply genetic operators (crossover and mutation) to generate a new population;
  •     Replace the current population with the new population.
  • end while
  • Return: The individual with the highest fitness value in the final population.
Crossover is a key operator in the genetic algorithm and plays a significant role in producing offspring from the parent chromosomes. It operates by selecting two parent chromosomes and randomly selecting a crossover point. The sequences of genes on either side of the crossover point are then exchanged between the two parents, producing two offspring with a combination of genetic material from both parents. Mutation is another operator in the genetic algorithm that contributes to the diversity of the population by randomly altering individual genes. This operator acts by swapping the sequences of two high-quality parent chromosomes, leading to a new chromosome with different genetic material. Mutation ensures that the genetic algorithm does not become stuck in a local optimum solution and can explore new solutions with different genetic material.
For example, say we have two parents, parent1 = 10111001 and parent2 = 01100111. The generated offspring are child1 = 10100101 and child2 = 01111011.
The algorithm describing the crossover and mutation operators in a genetic algorithm (Algorithm 2) is described as follows.
Algorithm 2 Crossover and Mutation in Classical Genetic Algorithm
  • Input: Initial population, fitness function, stopping criteria.
  • Output: Optimal solution.
  • Procedure:
  • 1. Initialize a population of chromosomes;
  • 2. Evaluate the fitness of each chromosome;
  • repeat
  •     3. Select two high-quality parents based on their fitness values;
  •     4. Choose a random crossover point;
  •     5. Apply the crossover operator by mating the parental chromosomes at the crossover point;
  •     6. The offspring chromosomes are generated from the combination of the two parent chromosomes;
  •     7. Evaluate the fitness of each offspring chromosome;
  •     8. Choose a random mutation point;
  •     9. Apply the mutation operator by swapping the bits at the mutation point;
  •     10. The offspring chromosomes are now mutated and have different characteristics from the parent chromosomes;
  •     11. Replace the weakest chromosomes in the population with the offspring chromosomes
  • until stopping criteria is met;
  • 12. The final population consists of high-quality chromosomes with good fitness values.

6. Lorenz System

The chaotic functions are applied to offer more randomness. They are used to produce symmetric distributions. There exist many chaotic functions, such as the Lorenz system [47], the logistic map [48], and the Gaussian map [49]. These functions are basically used to realize the symmetric distribution. In the proposed method, the Lorenz system is employed as a chaotic function to generate symmetrically distributed solutions. As mentioned, the Lorenz system is used to provide random sequences of bits, which is characterized by the symmetry of the distribution to encrypt and decrypt the generated sequence of bits. The Lorenz attractor is a three-dimensional non-linear dynamic system that models the behavior of a simple model of atmospheric convection. It is described by a set of non-linear differential equations that represent the behavior of a fluid in a confined space. The Lorenz system can be described as follows [47].
d x d t = σ ( y x ) d y d t = x ( ρ z ) y d z d t = x y β z
where σ , ρ , and β are parameters that determine the behavior of the system. The values of σ , ρ , and β that can induce chaotic behavior in the Lorenz system are σ = 10 , ρ = 28 , and β = 8 3 . The variables x, y, and z describe the evolution of the system over time. The Lorenz attractor has become well known because of its distinctive butterfly shape and its chaotic behavior. It is a popular example used in chaos theory to demonstrate the unpredictability of chaotic systems. The Lorenz attractor is sensitive to initial conditions, which means that small changes in the initial conditions can result in large changes in the long-term behavior of the system. This behavior is commonly referred to as the butterfly effect. In cryptography, the Lorenz system is used to generate random sequences of bits and is an important and widely used model in various fields due to its chaotic behavior and its ability to demonstrate the unpredictability of complex systems. The Lorenz attractor is shown in Figure 2.

7. The Proposed Algorithm

The proposed algorithm aims to improve the S-box by combining chaotic Boolean functions with the quantum crossover. The goal is to generate a new S-box with increased randomness and different random values in the interval (0, 255). The quantum crossover is used to perform substitutions and permutations in the S-box, while the Lorenz system is employed to provide random sequences of bits with a symmetrical distribution.

7.1. Quantum Crossover

The algorithm simulates a genetic crossover operation between two parents with classical chromosomes A and B, to produce a child chromosome C using a quantum circuit. The idea is based on the following steps.
Step 1.
Initialize the quantum circuit: The number of qubits in the circuit is equal to twice the length of the classical chromosome A. The first half of the qubits corresponds to the qubits of the first parent A, and the second half corresponds to the qubits of the second parent B.
Step 2.
Apply the Hadamard gate to the qubits of parent A: The Hadamard gate initializes the qubits in a superposition of the 0 and 1 states, which is necessary for the quantum parallelism used in the crossover operation.
Step 3.
Apply the controlled-NOT (CNOT) gate to each pair of corresponding qubits of parents A and B: The CNOT gate flips the target qubit (the qubit in the second half) if the control qubit (the qubit in the first half) is in the 1 state.
Step 4.
Measure the qubits corresponding to parent A: The measurement collapses the superposition of the qubits into a classical bitstring c with a probability proportional to the amplitude of the state.
Step 5.
Decode the classical bitstring c into the corresponding child chromosome C: The classical bitstring c represents a part of the child chromosome C that is inherited from parent A, which is obtained by applying the XOR operation between c and parent A.
Step 6.
Output the parent chromosomes A and B and the child chromosome C.
The quantum circuit is run once to generate a single child chromosome C. Multiple executions can be performed to obtain multiple child chromosomes. The algorithm can be used in combination with other genetic algorithm operators such as mutation, selection, and replacement to form a complete genetic algorithm. A quantum bitstring crossover is illustrated in Algorithm 3.
Algorithm 3 Quantum Bitstring Crossover
Require: Two classical parent bitstrings A and B of length n.
Ensure: One child bitstring C of length n.
1:
Initialize a quantum circuit qc with n * 2 qubits and n classical bits;
2:
fori in 0 to n 1  do;
3:
    Apply a Hadamard gate to the ith qubit of qc;
4:
end for;
5:
fori in 0 to n 1  do;
6:
    Apply a controlled-NOT (CNOT) gate to the ith qubit and the ith + n qubit of qc;
7:
end for;
8:
Measure the first n qubits of qc using a basis state measurement to obtain a bitstring c;
9:
Decode the classical bitstring c into the corresponding child chromosome C using the equation C i = A i c i ;
10:
return C.
An illustration of the quantum circuit of the Algorithm 3 is shown in Figure 3.
This circuit takes two input classical bitstrings, A and B, each of length n, and produces a single output classical bitstring, C, also of length n, through the process of quantum bitstring crossover. The circuit uses n qubits to represent the bits of the input bitstrings and n classical bits to store the output bitstring. The first n qubits are initialized in a superposition of 0 and 1 using Hadamard gates, and then, a controlled-NOT (CNOT) gate is applied between each pair of qubits, where the first qubit in each pair corresponds to the bits of A and the second qubit corresponds to the bits of B. Finally, a measurement is performed on the first n qubits in the standard basis to obtain a bitstring c, which is then used to compute the output bitstring C using the equation C i = A i c i , where ⊕ is the exclusive OR operation.
For example, the result of the quantum bitstring crossover of A = ‘11001100’ and B = ‘10101010’ will be a new bitstring C of length eight, where each bit is the result of a crossover between the corresponding bits of A and B. The exact output bitstring C cannot be determined without actually running the quantum circuit and measuring the qubits, as the output is probabilistic in nature and will depend on the specific quantum states of the qubits [50]. However, the expected outcome of the quantum bitstring crossover is a bitstring that shares some similarities with both A and B, while also containing some novel combinations of bits. This code should generate the output bitstring C = 01000110 for the input bitstrings A = 11001100 and B = 10101010.

7.2. S-Box Generation Algorithm

The proposed method is an eight-step process for generating an S-Box for encryption algorithms. It generates a chaotic binary sequence using the first equation of the Lorenz system, which is subjected to the quantum crossover to create eight sets of Boolean functions. The decimal values are derived from these bitstrings to produce a list of 256 elements, which are then adjusted to guarantee bijectivity. The eight steps are outlined as follows.
Step 1.
Create eight chaotic Boolean functions using the following steps.
  • Start with an empty binary sequence, SB.
  • Using the initial value x 0 , iterate the first equation of the Lorenz system (Equation (5)) 50 times to eliminate the transient effect.
  • Continue iterating the equation for 4096 times and, at each iteration, calculate the current state value, x . Then, using Equation (6), obtain a binary value, x, and add it to SB.
    x = m o d ( f l o o r ( 10 14 x ) , 2 )
    SB is a set of 512 eight-bitstrings.
  • Perform the quantum crossover between every two consecutive bitstrings to obtain 256 new bitstrings.
  • Divide these bitstrings into eight sets, each containing 256 elements. Each set represents a Boolean function.
Step 1 is shown in Figure 4.
Step 2.
The process of creating an S-box involves transforming every bitstring generated in Step 1 into decimal values. As a result, 256 decimal values are generated to form the S-box.
Step 3.
The S-box must satisfy the requirement of bijectivity, which means that each output value must be unique. To ensure this, the S-box must undergo an adjustment process, the steps of which are as follows.
  • Identify duplicates within the S-box and replace all duplicates except the first occurrence with −1.
  • Create an array (V) of missing elements in the range of 0 to 255.
  • Fill the missing elements (represented by −1) in the S-box with elements from the V array in sequence.
Step 4.
Generating crossover points: The proposed algorithm uses the two-point crossover operator for permutation. To determine the crossover points, the second equation of the Lorenz system (Equation (5)) is utilized, and the points are generated within the range from 0 to 255. The steps are illustrated in Algorithm 4.
  • Given the initial value y 0 .
  • Iterate the second equation of the Lorenz system (Equation (5)) to obtain the value of y.
  • Use the value of y to generate the crossover points within the range from 0 to 255 as follows.
    y = m o d ( f l o o r ( 10 14 y ) , 256 )
  • Repeat Steps 2 and 3 until the desired number of crossover points are generated.
Algorithm 4 Generating Crossover Points Using Lorenz System
1: procedureGenerate Crossover Points;
2:     Input: Initial value y 0 , Desired number of crossover points N;
3:     Output: Crossover points y;
4:     Set y y 0 ;
5:     for  i 1 to N do;
6:          y x ( ρ z ) y ▹ Iterate the second equation of the Lorenz system;
7:          y m o d ( f l o o r ( 10 14 · y ) , 256 ) ▹ Generate the crossover points;
8:     end for;
9: end procedure.
Step 5.
Reshaping process: Transform the obtained S-box from a vector of 256 values into a 16 × 16 matrix. This process is used to visualize the S-box as a matrix, which can help with analyzing and understanding its properties. An example of transforming a vector of six values into a 2 × 3 matrix is illustrated in Figure 5.
Step 6.
Permutation phase: Perform the two-point crossover operator by utilizing the two points generated previously to swap the sequences of values between the points. The two random points would be selected in each pair of consecutive rows, and the values between these two points would be swapped between the two rows to generate a new offspring matrix. The process is illustrated in Figure 6.
Step 7.
The mutation step is applied by swapping the two crosspoints that were generated previously. This step is used to introduce variation and diversity into the S-box values.
Step 8.
This process is repeated several times to achieve the desired degree of randomness in the final S-box.

8. Experimental Results and Performance Analysis of the Generated S-Box

The bijectivity, non-linearity, algebraic immunity, and output bits independence criterion (BIC) are the main chosen properties in order to test the generated S-box (Table 2).

8.1. Bijectivity

The S-box generated has unique output values from the interval [0;255], which fulfills the requirement of bijectivity.

8.2. Non-Linearity

The non-linearity of the generated S-box is equal to 107 (Table 3). We generated an S-box that has a high non-linearity value as compared to well-known S-boxes. A comparison table is illustrated in Table 4.

8.3. Algebraic Immunity

The S-box’s algebraic immunity is depicted using the dependence matrix. The matrix for the generated S-box can be found in Table 5. The mean value of the dependence matrix of the generated S-box is 0.49, which is quite close to the ideal value of 0.5. A good value for the mean of the dependence matrix is around 0.5 because this indicates that the S-box has a high level of non-linearity. The mean value of the dependence matrix ranges from 0 to 1, with 0 indicating that the S-box is a linear function, and 1 indicating that the S-box is a bijective function with a high level of non-linearity. A value close to 0.5 indicates that the S-box has a good balance between linear and non-linear properties, which is desirable in cryptography.

8.4. BIC

The mean value of the BIC-non-linearity of the S-box is 103.8571 (Table 6), and the mean value of the BIC-SAC (Table 7) is 0.5034, which indicates that the S-box fulfills the requirement of the BIC property. The value of 0.5034 for the mean value of the dependence matrix is considered good because it is close to the ideal value of 0.5. This ideal value of 0.5 indicates a high degree of non-linearity in the S-box. The value of 0.5 for the dependence matrix implies that for each output bit, approximately half of the possible input bit combinations will produce a “0” and half will produce a “1.” This means that there is no easily discernible pattern in the output, and it is difficult to predict the output based on the input. This property makes the S-box more secure and resistant to attacks.

9. Randomness Test of the S-Box

Randomness is a crucial aspect of cryptography, particularly for S-boxes, which are used to transform data in a cryptographic algorithm. The randomness test of the S-box ensures that the S-box has random behavior and is free from any patterns or biases. The NIST statistical test suite is a set of statistical tests designed to evaluate the randomness of a sequence of binary data.

9.1. NIST Statistical Test Suite

The NIST Statistical Test Suite is a collection of statistical tests used to evaluate the randomness of a sequence of numbers. The tests are used to assess the quality of random number generators and cryptographic systems. The NIST suite includes a range of tests that check various aspects of randomness, including statistical properties, distribution of numbers, runs of zeros and ones, etc. The tests aim to identify patterns or non-random features in the data that would compromise the security of cryptographic systems. The results of the NIST tests are used to determine the suitability of a random number generator for use in cryptography and other security-sensitive applications. The application of NIST tests on an S-box has the following advantages [62,63].
(1)
Evaluates the quality of the S-box: The NIST tests evaluate the randomness and uniformity of the S-box, which are important properties for cryptographic applications.
(2)
Helps to detect flaws: By evaluating the output of an S-box against the requirements for randomness and uniformity, the NIST tests can help to identify any flaws in the design or implementation of the S-box.
(3)
Industry standard: The NIST statistical test suite is widely accepted as the industry standard for evaluating the randomness and uniformity of digital sequences. This means that the results of NIST tests are easily recognizable and interpretable by others in the field.
(4)
Comprehensive testing: The NIST suite consists of 15 statistical tests, which evaluate different aspects of randomness and uniformity. This comprehensive approach provides a thorough evaluation of the S-box.
(5)
Improved security: By ensuring that the S-box has good randomness and uniformity properties, the NIST tests help to improve the security of the cryptographic system that uses the S-box.
Table 8 presents a summary of all NIST tests.

9.2. Uniform Distribution of p-Values

To evaluate the randomness of the output of an S-box, one of the measures is to analyze the uniformity of the distribution of p-values. A histogram is used to count the number of p-values that fall within sub-intervals, which are created by dividing the interval between 0 and 1. By visually representing the distribution of p-values, it is possible to determine whether the p-values are uniformly distributed across the range of values. When the distribution of p-values is uniform, it is an indication that the S-box output is random, and the cryptographic security of the algorithm that employs the S-box is guaranteed. The uniformity of the distribution of p-values can also be determined using a χ 2 test to assess the goodness-of-fit of the p-values obtained from an arbitrary statistical test. The observed frequency for each sub-interval is denoted as F i , and the expected frequency is 2 m 1 / 10 , where m is the number of bits in the output of the S-box. The χ 2 statistic is then calculated by summing the squared difference between the observed and expected frequencies in each sub-interval [64]. The formula for computing the χ 2 statistic is as follows.
χ 2 = i = 1 10 ( F i 2 m 1 / 10 ) 2 2 m 1 / 10
A p-value is then computed using the χ 2 distribution with 9 degrees of freedom, such that P valueT = χ 2 / igamc ( 9 / 2 , 2 ) , where igamc is the complementary regularized incomplete gamma function [65]. If P valueT is greater than or equal to 0.0001, the sequences can be considered uniformly distributed. However, to obtain statistically meaningful results, at least 55 sequences must be analyzed. Figure 7 shows that the distribution of the p-values is uniform. This can be seen from the histogram in which each sub-interval (bin) has approximately the same frequency of the p-values. The histogram shows the count of the p-values that fall into 20 different bins that are uniformly spaced between 0 and 1.

9.3. Results and Discussion

The NIST test suite is a collection of 188 tests that are usually run with default settings. Each test is executed 10 times using 1,000,000 input bits, and each repetition is referred to as a test instance. NIST reports the number of instances that pass each test, the p-value of each instance, and a p-value for the distribution of the instance p-values. A test instance fails if its p-value is less than 0.01, and a test fails if either the number of passed instances is below a certain threshold or the p-value for the distribution of the instance p-values is less than a critical value. To evaluate the randomness of the generated S-box, we applied all of the NIST tests, and Table 8 demonstrates that the generated S-box passed all tests. A histogram is used to visualize the distribution of the p-values of all tests performed on the generated S-box (Figure 8). The outcome of the NIST statistical test suite on the generated S-box was “pass”. This means that the S-box passed all the tests in the suite and produced outputs that are considered random enough for cryptographic purposes. This result indicates that the S-box has desirable properties, such as randomness, uniformity, independence, and lack of correlation in the generated outputs, which are important for the security of cryptographic systems. The p-value of 0.99366 for the frequency (monobit) test indicates that the sequence of random bits generated by the S-box has passed this statistical test for randomness. The test measures the proportion of ones and zeroes in a sequence of binary data, and a p-value close to one indicates that the distribution of ones and zeroes is roughly equal, which is an indicator of randomness. The value of 0.534109 for the frequency test within a block indicates that the distribution of bits is random and not biased toward any particular value. A p-value of 0.959774 for the linear complexity test means that the generated sequence has a low probability (0.04) of not being a random sequence, and it passes the test with a high degree of confidence. In other words, the sequence has good linear complexity, meaning that it is not highly predictable and has enough complexity to pass the test. A p-value of 0.0900 for the approximate entropy test suggests that there is a 9% chance that the results of the test were due to random chance, and, thus, there is a 91% confidence that the output of the S-box is not random but has a structure or pattern. The p-value of 0.658232 obtained in the cumulative sums test indicates that the randomness of the S-box generated passes this particular test with a moderate level of confidence. A p-value close to 0.5 indicates that the randomness of the data is random and passes the test, while a p-value of significantly more or less than 0.5 suggests that the data are not random and may fail the test. In this case, with a p-value of 0.658232, the S-box is considered to have passed the cumulative sums test with a moderate level of confidence.

10. Conclusions

In this paper, we presented a new and innovative approach to generating a cryptographically strong S-box by combining the use of chaotic Boolean functions and genetic algorithms techniques, including the quantum crossover. The proposed S-box was subjected to several cryptographic evaluations and was found to possess strong properties. The results of the NIST statistical test suite further affirm the strength of the generated S-box. Overall, this study highlights the potential for using the quantum crossover in combination with other techniques to produce secure cryptographic components. For future work, it is advisable to perform further evaluations of the S-box’s cryptographic strength. This could include a more extensive battery of tests, such as linear and differential cryptanalysis. Additionally, it may be of interest to study the potential application of the proposed S-box in modern cryptography, such as in block ciphers or stream ciphers. It may also be interesting to investigate the use of other optimization algorithms, such as particle swarm optimization or artificial neural networks, to optimize the parameters in the chaotic system and improve the performance of the S-box. Overall, the results presented in this paper open up exciting avenues for future research in the field of cryptography.

Author Contributions

Conceptualization, H.A., R.G. and A.K.; methodology, H.A. and R.G.; software, H.A. and T.G.; validation, A.K., B.M.A. and T.G.; formal analysis, A.K. and B.M.A.; investigation, B.M.A. and T.G.; resources, T.G.; writing—original draft preparation, H.A., R.G. and A.K.; supervision, T.G.; project administration, T.G.; funding acquisition, T.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by the Scientific Research Deanship at the University of Ha’il, Saudi Arabia, through project number RG-21 137.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rijmen, V. Efficient Implementation of the Rijndael S-Box; Katholieke Universiteit Leuven, Department of Electrical Engineering ESAT: Leuven, Belgium, 2000. [Google Scholar]
  2. Mister, S.; Adams, C. Practical S-box design. In Proceedings of the Workshop on Selected Areas in Cryptography, SAC, Kingston, ON, Canada, 1996; Volume 96, pp. 61–76. Available online: https://sacworkshop.org/SAC-history.html (accessed on 20 March 2023).
  3. Carlet, C.; Crama, Y.; Hammer, P.L. Boolean Functions for Cryptography and Error-Correcting Codes; Universiry of Paris: Paris, France, 2010. [Google Scholar]
  4. Zhang, R.; Cavalcante, H.L.d.S.; Gao, Z.; Gauthier, D.J.; Socolar, J.E.; Adams, M.M.; Lathrop, D.P. Boolean chaos. Phys. Rev. E 2009, 80, 045202. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Jiang, Z.; Ding, Q. Construction of an S-box based on chaotic and bent functions. Symmetry 2021, 13, 671. [Google Scholar] [CrossRef]
  6. Tito-Corrioso, O.; Borges-Trenard, M.A.; Borges-Quintana, M.; Rojas, O.; Sosa-Gómez, G. Study of Parameters in the Genetic Algorithm for the Attack on Block Ciphers. Symmetry 2021, 13, 806. [Google Scholar] [CrossRef]
  7. Ahmed, H.A.; Zolkipli, M.F.; Ahmad, M. A novel efficient substitution-box design based on firefly algorithm and discrete chaotic map. Neural Comput. Appl. 2019, 31, 7201–7210. [Google Scholar] [CrossRef]
  8. Ahmad, M.; Doja, M.N.; Beg, M.S. ABC optimization based construction of strong substitution-boxes. Wirel. Pers. Commun. 2018, 101, 1715–1729. [Google Scholar] [CrossRef]
  9. Akhtar, T.; Din, N.; Uddin, J. Substitution box design based on chaotic maps and cuckoo search algorithm. In Proceedings of the 2019 International Conference on Advanced Communication Technologies and Networking (CommNet), Rabat, Morocco, 12–14 April 2019; pp. 1–7. [Google Scholar]
  10. Guesmi, R.; Farah, M.A.B.; Kachouri, A.; Samet, M. A novel design of Chaos based S-Boxes using genetic algorithm techniques. In Proceedings of the 2014 IEEE/ACS 11th International Conference on Computer Systems and Applications (AICCSA), Doha, Qatar, 10–13 November 2014; pp. 678–684. [Google Scholar]
  11. Artuğer, F.; Özkaynak, F. An effective method to improve nonlinearity value of substitution boxes based on random selection. Inf. Sci. 2021, 576, 577–588. [Google Scholar] [CrossRef]
  12. Guesmi, R.; Farah, M.A.B.; Kachouri, A.; Samet, M. Chaos-based designing of a highly nonlinear S-box using Boolean functions. In Proceedings of the 2015 IEEE 12th International Multi-Conference on Systems, Signals & Devices (SSD15), Mahdia, Tunisia, 16–19 March 2015; pp. 1–5. [Google Scholar]
  13. Farah, M.; Farah, A.; Farah, T. An image encryption scheme based on a new hybrid chaotic map and optimized substitution box. Nonlinear Dyn. 2020, 99, 3041–3064. [Google Scholar] [CrossRef]
  14. Ahmad, M.; Ahmad, Z. Random search based efficient chaotic substitution box design for image encryption. Int. J. Rough Sets Data Anal. 2018, 5, 131–147. [Google Scholar] [CrossRef]
  15. Khan, M.; Asghar, Z. A novel construction of substitution box for image encryption applications with Gingerbreadman chaotic map and S 8 permutation. Neural Comput. Appl. 2018, 29, 993–999. [Google Scholar] [CrossRef]
  16. Mousavi, M.; Sadeghiyan, B. A new image encryption scheme with Feistel like structure using chaotic S-box and Rubik cube based P-box. Multimed. Tools Appl. 2021, 80, 13157–13177. [Google Scholar] [CrossRef]
  17. Ullah, A.; Jamal, S.S.; Shah, T. A novel scheme for image encryption using substitution box and chaotic system. Nonlinear Dyn. 2018, 91, 359–370. [Google Scholar] [CrossRef]
  18. Shafique, A. A new algorithm for the construction of substitution box by using chaotic map. Eur. Phys. J. Plus 2020, 135, 1–13. [Google Scholar] [CrossRef]
  19. Artuğer, F.; Özkaynak, F. A novel method for performance improvement of chaos-based substitution boxes. Symmetry 2020, 12, 571. [Google Scholar] [CrossRef] [Green Version]
  20. Zahid, A.H.; Arshad, M.J. An innovative design of substitution-boxes using cubic polynomial mapping. Symmetry 2019, 11, 437. [Google Scholar] [CrossRef] [Green Version]
  21. Usama, M.; Rehman, O.; Memon, I.; Rizvi, S. An efficient construction of key-dependent substitution box based on chaotic sine map. Int. J. Distrib. Sens. Netw. 2019, 15, 1550147719895957. [Google Scholar] [CrossRef]
  22. Alzaidi, A.A.; Ahmad, M.; Ahmed, H.S.; Solami, E.A. Sine-cosine optimization-based bijective substitution-boxes construction using enhanced dynamics of chaotic map. Complexity 2018, 2018, 9389065. [Google Scholar] [CrossRef]
  23. Lawnik, M.; Berezowski, M. New chaotic system: M-map and its application in chaos-based cryptography. Symmetry 2022, 14, 895. [Google Scholar] [CrossRef]
  24. Zhu, D.; Tong, X.; Zhang, M.; Wang, Z. A new S-box generation method and advanced design based on combined chaotic system. Symmetry 2020, 12, 2087. [Google Scholar] [CrossRef]
  25. Wan, P.Y.; Liao, T.L.; Yan, J.J.; Tsai, H.H. Discrete sliding mode control for chaos synchronization and its application to an improved El-Gamal cryptosystem. Symmetry 2019, 11, 843. [Google Scholar] [CrossRef] [Green Version]
  26. Khan, M. A novel image encryption scheme based on multiple chaotic S-boxes. Nonlinear Dyn. 2015, 82, 527–533. [Google Scholar] [CrossRef]
  27. Lambić, D. A novel method of S-box design based on discrete chaotic map. Nonlinear Dyn. 2017, 87, 2407–2413. [Google Scholar] [CrossRef]
  28. Islam, F.u.; Liu, G. Designing S-box based on 4D-4wing hyperchaotic system. 3D Res. 2017, 8, 1–9. [Google Scholar] [CrossRef]
  29. Gabr, M.; Younis, H.; Ibrahim, M.; Alajmy, S.; Khalid, I.; Azab, E.; Elias, R.; Alexan, W. Application of DNA Coding, the Lorenz Differential Equations and a Variation of the Logistic Map in a Multi-Stage Cryptosystem. Symmetry 2022, 14, 2559. [Google Scholar] [CrossRef]
  30. Alexan, W.; ElBeltagy, M.; Aboshousha, A. Rgb image encryption through cellular automata, s-box and the lorenz system. Symmetry 2022, 14, 443. [Google Scholar] [CrossRef]
  31. Xiao, G.Z.; Massey, J.L. A spectral characterization of correlation-immune combining functions. IEEE Trans. Inf. Theory 1988, 34, 569–571. [Google Scholar] [CrossRef] [Green Version]
  32. Pasalic, E. On Boolean Functions in Symmetric-Key Ciphers; Lund University: Lund, Sweden, 2003. [Google Scholar]
  33. Makhlin, Y.; Schön, G.; Shnirman, A. Quantum-state engineering with Josephson-junction devices. Rev. Mod. Phys. 2001, 73, 357. [Google Scholar] [CrossRef] [Green Version]
  34. Cirac, J.I.; Zoller, P. Quantum computations with cold trapped ions. Phys. Rev. Lett. 1995, 74, 4091. [Google Scholar] [CrossRef]
  35. Hanson, R.; Gywat, O.; Awschalom, D. Room-temperature manipulation and decoherence of a single spin in diamond. Phys. Rev. B 2006, 74, 161203. [Google Scholar] [CrossRef] [Green Version]
  36. Lewenstein, M.; Sanpera, A.; Ahufinger, V.; Damski, B.; Sen, A.; Sen, U. Ultracold atomic gases in optical lattices: Mimicking condensed matter physics and beyond. Adv. Phys. 2007, 56, 243–379. [Google Scholar] [CrossRef] [Green Version]
  37. Arute, F.; Arya, K.; Babbush, R.; Bacon, D.; Bardin, J.C.; Barends, R.; Biswas, R.; Boixo, S.; Brandao, F.G.; Buell, D.A.; et al. Quantum supremacy using a programmable superconducting processor. Nature 2019, 574, 505–510. [Google Scholar] [CrossRef] [Green Version]
  38. Gruska, J. Quantum Computing; McGraw-Hill: London, UK, 1999; Volume 2005. [Google Scholar]
  39. Barnum, H.; Bernstein, H.J.; Spector, L. A quantum circuit for OR. arXiv 1999, arXiv:quant-ph/9907056. [Google Scholar]
  40. Leier, A.; Banzhaf, W. Evolving Hogg’s quantum algorithm using linear-tree GP. In Proceedings of the Genetic and Evolutionary Computation—GECCO 2003: Genetic and Evolutionary Computation Conference, Chicago, IL, USA, 12–16 July 2003; pp. 390–400. [Google Scholar]
  41. Malossini, A.; Blanzieri, E.; Calarco, T. QGA: A quantum genetic algorithm. IEEE Trans. Neural Netw. Publ. IEEE Neural Netw. Counc. 2008, 12, 231–241. [Google Scholar]
  42. Malossini, A.; Blanzieri, E.; Calarco, T. Quantum genetic optimization. IEEE Trans. Evol. Comput. 2008, 12, 231–241. [Google Scholar] [CrossRef] [Green Version]
  43. Carlet, C.; Dalai, D.K.; Gupta, K.C.; Maitra, S. Algebraic immunity for cryptographically significant Boolean functions: Analysis and construction. IEEE Trans. Inf. Theory 2006, 52, 3105–3121. [Google Scholar] [CrossRef]
  44. Webster, A.; Tavares, S. On the design of S-boxes in Advances in Cryptology. In Proceedings of the CRYPTO’ 85, Santa Barbara, CA, USA, 18–22 August 1985. [Google Scholar]
  45. Biham, E.; Shamir, A. Differential cryptanalysis of DES-like cryptosystems. J. Cryptol. 1991, 4, 3–72. [Google Scholar] [CrossRef]
  46. Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
  47. Lorenz, E.N. Deterministic nonperiodic flow. J. Atmos. Sci. 1963, 20, 130–141. [Google Scholar] [CrossRef]
  48. Weisstein, E.W. Logistic Equation. 2003. Available online: https://mathworld.wolfram.com/ (accessed on 20 March 2023).
  49. Bouman, C.; Sauer, K. A generalized Gaussian image model for edge-preserving MAP estimation. IEEE Trans. Image Process. 1993, 2, 296–310. [Google Scholar] [CrossRef] [Green Version]
  50. Aharonov, D.; Kitaev, A.; Nisan, N. Quantum circuits with mixed states. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, Dallas, TX, USA, 24–26 May 1998; pp. 20–30. [Google Scholar]
  51. Wang, J.; Zhu, Y.; Zhou, C.; Qi, Z. Construction method and performance analysis of chaotic S-box based on a memorable simulated annealing algorithm. Symmetry 2020, 12, 2115. [Google Scholar] [CrossRef]
  52. Alshammari, B.M.; Guesmi, R.; Guesmi, T.; Alsaif, H.; Alzamil, A. Implementing a symmetric lightweight cryptosystem in highly constrained IoT devices by using a chaotic S-box. Symmetry 2021, 13, 129. [Google Scholar] [CrossRef]
  53. Tian, P.; Su, R. A Novel Virtual Optical Image Encryption Scheme Created by Combining Chaotic S-Box with Double Random Phase Encoding. Sensors 2022, 22, 5325. [Google Scholar] [CrossRef]
  54. Lambić, D. A new discrete-space chaotic map based on the multiplication of integer numbers and its application in S-box design. Nonlinear Dyn. 2020, 100, 699–711. [Google Scholar] [CrossRef]
  55. Hematpour, N.; Ahadpour, S.; Sourkhani, I.G.; Sani, R.H. A new steganographic algorithm based on coupled chaotic maps and a new chaotic S-box. Multimed. Tools Appl. 2022, 81, 39753–39784. [Google Scholar] [CrossRef]
  56. Çavuşoğlu, Ü.; Zengin, A.; Pehlivan, I.; Kaçar, S. A novel approach for strong S-Box generation algorithm design based on chaotic scaled Zhongtang system. Nonlinear Dyn. 2017, 87, 1081–1094. [Google Scholar] [CrossRef]
  57. Tong, X.; Liu, X.; Liu, J.; Zhang, M.; Wang, Z. A novel lightweight block encryption algorithm based on combined chaotic S-box. Int. J. Bifurc. Chaos 2021, 31, 2150152. [Google Scholar] [CrossRef]
  58. Hua, Z.; Li, J.; Chen, Y.; Yi, S. Design and application of an S-box using complete Latin square. Nonlinear Dyn. 2021, 104, 807–825. [Google Scholar] [CrossRef]
  59. Zheng, J.; Zeng, Q. An image encryption algorithm using a dynamic S-box and chaotic maps. Appl. Intell. 2022, 52, 15703–15717. [Google Scholar] [CrossRef]
  60. Özkaynak, F.; Çelik, V.; Özer, A.B. A new S-box construction method based on the fractional-order chaotic Chen system. Signal Image Video Process. 2017, 11, 659–664. [Google Scholar] [CrossRef]
  61. Jakimoski, G.; Kocarev, L. Chaos and cryptography: Block encryption ciphers based on chaotic maps. IEEE Trans. Circuits Syst. Fundam. Theory Appl. 2001, 48, 163–169. [Google Scholar] [CrossRef]
  62. Crocetti, L.; Nannipieri, P.; Di Matteo, S.; Fanucci, L.; Saponara, S. Review of Methodologies and Metrics for Assessing the Quality of Random Number Generators. Electronics 2023, 12, 723. [Google Scholar] [CrossRef]
  63. de la Fraga, L.G.; Ovilla-Martínez, B. Generating Even More Chaotic Instances in Hardware. Electronics 2023, 12, 332. [Google Scholar] [CrossRef]
  64. Rukhin, A.; Soto, J.; Nechvatal, J.; Smid, M.; Barker, E. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; Technical Report; Booz-Allen and Hamilton Inc.: Mclean, VA, USA, 2001. [Google Scholar]
  65. Bassham, L.E., III; Rukhin, A.L.; Soto, J.; Nechvatal, J.R.; Smid, M.E.; Barker, E.B.; Leigh, S.D.; Levenson, M.; Vangel, M.; Banks, D.L.; et al. SP 800-22 Rev. 1a. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; National Institute of Standards & Technology: Gaithersburg, MD, USA, 2010. [Google Scholar]
Figure 1. Circuit representation of elementary quantum gates.
Figure 1. Circuit representation of elementary quantum gates.
Symmetry 15 00833 g001
Figure 2. The Lorenz attractor.
Figure 2. The Lorenz attractor.
Symmetry 15 00833 g002
Figure 3. Quantum bitstring crossover circuit (n = 4).
Figure 3. Quantum bitstring crossover circuit (n = 4).
Symmetry 15 00833 g003
Figure 4. Chaotic Boolean functions.
Figure 4. Chaotic Boolean functions.
Symmetry 15 00833 g004
Figure 5. From vector to matrix.
Figure 5. From vector to matrix.
Symmetry 15 00833 g005
Figure 6. Two-point crossover.
Figure 6. Two-point crossover.
Symmetry 15 00833 g006
Figure 7. Histogram of p-values.
Figure 7. Histogram of p-values.
Symmetry 15 00833 g007
Figure 8. NIST statistical test suite.
Figure 8. NIST statistical test suite.
Symmetry 15 00833 g008
Table 1. Important quantum gates and their operations.
Table 1. Important quantum gates and their operations.
GateNameOperation
XPauli-X gateFlips the state of a qubit
YPauli-Y gateFlips the state of a qubit and adds a phase of i
ZPauli-Z gateAdds a phase of −1 to the | 1 state
HHadamard gateCreates a superposition of | 0 and | 1
CNOTControlled-NOT gateFlips the second qubit if and only if the first qubit is | 1
CCNOTToffoli gateFlips the third qubit if and only if the first two qubits are both | 1
SWAPSWAP gateSwaps the states of two qubits
SPhase shift gateAdds a phase of i to the | 1 state
TPhase shift gateAdds a phase of 1 + i 2 to the | 1 state
Table 2. The generated S-box.
Table 2. The generated S-box.
23232282221252432191761991077217250205229139
30168353214773610423311815112653206169183
511502451572091381224614884851131547710523
20725564254929611557741903120812711913093
149180102203722523824124214317310922523919780
54175153195152671848117049139996679
6113571230944575461651161221941346819158
1912372683716325225127234184861179821540
69417018858361963821421848161224177167189
11161002442132232276219217132247145235226124
15624788720017129821601592531783911142221
1122026514891822496033212108166123131142187
210140231155103114186151625643349110195
10688101101461209012897198472482362055144
8328141210501375172133179164204136129185216
19376222111201217444591216322018124052
Table 3. Non-linearity and SAC of the generated S-box.
Table 3. Non-linearity and SAC of the generated S-box.
S-Box12345678Avg. Non-Linearity
S-Box108104108108106108108108107
Table 4. Comparison of the non-linearity of chaotic S-box with others.
Table 4. Comparison of the non-linearity of chaotic S-box with others.
S-Box12345678Non-Linearity
AES S-box112112112112112112112112112
[12]108110110108106106106110108
[51]108108108104106110108110108
[10]106108110106110106106108107.5
[52]108108106108106106108106107
The generated S-box108104108108106108108108107
[53]108110108104108106106106107
[27]108106106106106106108108106.5
[54]108108106106106106106106106.5
[55]102110102106108108108108106.5
[13]108104106106106106108106106.25
[56]108106104108106110104104106
[57]108106104108104106102106105.5
[58]108106104108104108102102105.25
[59]108102104106104104102102104
[60]107102101104106104106106104.5
[61]108102100102104104104102103.25
Table 5. The dependence matrix of S-box.
Table 5. The dependence matrix of S-box.
0.40750.501250.5156250.4840750.40750.5156250.4501250.484075
0.468750.5156250.56250.4840750.5156250.5156250.501250.5
0.468750.5468750.5468750.4840750.468750.501250.501250.421875
0.5156250.4501250.5156250.501250.50.501250.50.50125
0.468750.5156250.5156250.4840750.5156250.590750.5156250.50125
0.501250.501250.40750.4840750.50.5468750.5156250.4075
0.4501250.4840750.4501250.5156250.590750.50.468750.5
0.5156250.40750.501250.5156250.4840750.5156250.50.450125
Table 6. BIC-non-linearity criterion for S-box.
Table 6. BIC-non-linearity criterion for S-box.
-106106106106102100106
106-106104104104102104
104106-104104104106106
106102104-104106104106
106104104104-104104106
100104104106104-102100
102102106104104102-96
10610410610610696100-
Table 7. BIC-SAC criterion for S-box.
Table 7. BIC-SAC criterion for S-box.
-0.49600.50000.50190.50970.50190.48240.5058
0.4960-0.52920.51170.49020.49800.50970.5136
0.50000.5292-0.50190.50580.50580.52340.5019
0.50190.51170.5019-0.50580.51560.50970.5234
0.50970.49020.50580.5058-0.48240.48430.4746
0.50190.49800.50580.51560.4824-0.51170.5156
0.48240.50970.52340.50970.48430.5117-0.4843
0.50580.51360.50190.52340.47460.51560.4843-
Table 8. Randomness test of the S-box.
Table 8. Randomness test of the S-box.
Statistic Testsp-Value
Frequency (Monobit) test0.99366
Frequency test within a block0.534109
Runs test0.886973
Test for the longest run of ones in a block0.99889
Binary matrix rank test0.402188
Discrete Fourier transform (Spectral) test0.166021
Non-overlapping template matching testSuccess
Overlapping template matching test0.867599
Maurer’s “universal statistical” test0.895623
Linear complexity test0.959774
Serial test (1)0.772120
Serial test (2)0.095163
Approximate entropy test0.0900
Cumulative sums0.658232
Random excursions testSuccess
Random excursions variant testSuccess
ResultsPass
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

Alsaif, H.; Guesmi, R.; Kalghoum, A.; Alshammari, B.M.; Guesmi, T. A Novel Strong S-Box Design Using Quantum Crossover and Chaotic Boolean Functions for Symmetric Cryptosystems. Symmetry 2023, 15, 833. https://doi.org/10.3390/sym15040833

AMA Style

Alsaif H, Guesmi R, Kalghoum A, Alshammari BM, Guesmi T. A Novel Strong S-Box Design Using Quantum Crossover and Chaotic Boolean Functions for Symmetric Cryptosystems. Symmetry. 2023; 15(4):833. https://doi.org/10.3390/sym15040833

Chicago/Turabian Style

Alsaif, Haitham, Ramzi Guesmi, Anwar Kalghoum, Badr M. Alshammari, and Tawfik Guesmi. 2023. "A Novel Strong S-Box Design Using Quantum Crossover and Chaotic Boolean Functions for Symmetric Cryptosystems" Symmetry 15, no. 4: 833. https://doi.org/10.3390/sym15040833

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop