A Novel S-Box Dynamic Design Based on Nonlinear-Transform of 1D Chaotic Maps

: In this paper, a method to enhance the dynamic characteristics of one-dimension (1D) chaotic maps is ﬁrst presented. Linear combinations and nonlinear transform based on existing chaotic systems (LNECS) are introduced. Then, a numerical chaotic map (LCLS), based on Logistic map and Sine map, is given. Through the analysis of a bifurcation diagram, Lyapunov exponent (LE), and Sample entropy (SE), we can see that CLS has overcome the shortcomings of a low-dimensional chaotic system and can be used in the ﬁeld of cryptology. In addition, the construction of eight functions is designed to obtain an S-box. Finally, ﬁve security criteria of the S-box are shown, which indicate the S-box based on the proposed in this paper has strong encryption characteristics. The research of this paper is helpful for the development of cryptography study such as dynamic construction methods based on chaotic systems.


Introduction
Substitution box (S-box) is an important nonlinear module, used to substitute and permutate elements in block cipher, which ensures the security of the block cipher to a large extent. From the point of view of mathematics, an n × n S-box can be regarded as a nonlinear function S : F n 2 → F n 2 , where F n 2 stands for the vector space of the n-tuple elemental form GF(2), i.e., {0, 1} n . A secure block cipher cryptosystem should possess confusion and diffusion to resist some known attacks, including linear analysis, differential analysis, the known plaintext attack, and so on. Chaos precisely has some characteristic sensitivity to initial values, intrinsic randomness, ergodicity, and nonlinearity properties, which can make it suitable to protect digital images. Some work such as information hiding, watermarking, and image encryption is done to protect the security of digital images [1][2][3].
In recent years, many S-boxes based on the continuous-time chaotic system have been proposed by scholars. The output value generated by a chaotic system can be converted through a series of processes into a number between 0 and 2 n − 1. Then, we can put the numbers directly into an n × n table in order. The S-box construction based on the Lorenz system was proposed by Ozkaynak and Ozer [4]. In order to improve the cryptography characteristics, several S-boxes were constructed using chaotic systems with more complex dynamics behaviors. Ozkaynak et.al [5] proposed S-boxes based on time-delay chaotic systems. The S-box constructions based on fractional-order chaos were presented [6][7][8]. The S-box constructions based on hyperchaotic systems have been shown [9,10]. Besides, there are many other methods to generate S-boxes based on chaos theory. However, the above-mentioned continuous time chaotic system needs to be discretized in a simulation experiment because the computer does not support the continuous nature of a chaotic system. Thus, an increasing number of the S-box construction methods based on discrete-time have been proposed [11][12][13][14][15][16]. Iqtadar [17] proposed an S-box construction method based on a Logistic system, and dynamic S-box construction methods based on chaotic systems were proposed [18,19]. Then, an S-box construction method, based on the combined 2D Baker system and Chebyshev system, was proposed in [20]. A low-dimensional chaotic system is easier to be used in the actual secure communication due to its simple form, fast encryption speed, and easier implementation in hardware and software compared with a hyperchaotic system [21,22]. However, the low dimensional discrete-time chaotic map shares some common potential dangers: weak parameter space, short periodic behavior, blank window, and uneven output distribution, which limit its application in the construction methods of the S-box.
In this paper, nonlinear changes are proposed to enhance the chaotic properties of low-dimensional chaotic systems. In order to overcome the above weakness of the low dimensional discrete-time chaotic map, linear combinations of the output values of existing chaotic systems are proposed to enhance the chaotic characteristics in [23][24][25][26][27]. Because the linear combination cannot change the output value of the original system, only the linear combination of these values, the performance of the presented system is not very good. In order to furthermore enhance its chaotic characteristics, we use linear coupling first and then nonlinear transform based on existing chaotic systems (LNECS). A numerical chaotic map (CLS), based on a Logistic map and Sine map, is given. Through the analysis of the bifurcation diagram, LE and SE, we can see that CLS has overcome the shortcomings of the low-dimensional chaotic system and can be used in the field of cryptology. Another innovation in this article is the construction of eight functions designed to convert a decimal number into eight binary numbers. Turning an 8-bit binary number back into a decimal number is exactly between 0 and 255. Then, the 256 numbers can be converted to an S-box by line, whose security analysis shows that it can resist the well-known attacks and cryptanalysis. The main contributions and novelty of this paper are summarized as follows.

1.
The linear coupling followed by the nonlinear transform based on existing chaotic systems (LNECS) was proposed. A numerical chaotic map (CLS) was generated to indicate the feasibility of the methods.

2.
We present a novel S-box dynamic design based on CLS produced by LNECS.

3.
The simulation and security analysis demonstrate that the S-box can resist well-known attacks and cryptanalysis. Some security criteria, such as nonlinearity and difference uniformity, are better than several other S-boxes based on dynamic design.
The rest of the paper is organized is as follows: a new 1D chaotic map (CLS) is proposed in Section 2, and a bifurcation diagram, LE and SE of CLS are presented. In Section 3, we introduce eight functions in order to transform the output values of CLS into binary numbers and then present the generation method of the S-box. Some basic security analysis of the proposed S-box is presented in Section 4. Finally, some conclusions are drawn in Section 5.

Enhanced 1D Discrete Chaotic Maps
This section presents a method for strengthening one-dimensional discrete chaotic systems and analyzes their chaotic properties. To demonstrate the effectiveness of this approach, a chaotic system is generated using an existing chaotic system.

New Chaotic Map
The method, i.e., strengthening one-dimensional discrete chaotic systems, is designed to solve the drawback of existing chaotic maps with respect to frail chaos and weak dynamic behaviors. In this paper, we propose to increase the characteristics of chaotic systems by nonlinear transforms, such as Sin function, Cos function, modular operation, and the product of linear terms. In this paper, the selected nonlinear function is the Cos function. Two basic one-dimensional chaotic systems are used as a seed map. The final output values are obtained through linear coupling and Cosine transform. The block diagram of constructing the LNECS is shown in Figure 1. Mathematically, LNECS can be defined as follows: x k+1 = cos(π(F(α, where F(α, x k ) and G(β, x k ) are two existing chaotic maps, α and β are their system parameters, and γ is a control parameter. If the seed map chooses the Logistic and Sine maps, the new chaotic system, called LCLS, is represented as where system parameters α and β are set as r and (1 − r), and control parameter γ is set as 0.5. The next subsection analyzes CLS from the bifurcation diagram, Lyapunov exponent, and the sample entropy, which indicates CLS exhibits complex chaotic characteristics.
output values are obtained through linear coupling and Cosine transform. The block diagram of constructing the LNECS is shown in Figure 1.
where system parameters and  are set as r and (1 ) r − , and control parameter  is set as 0.5. The next subsection analyzes CLS from the bifurcation diagram, Lyapunov exponent, and the sample entropy, which indicates CLS exhibits complex chaotic characteristics.

Bifurcation Diagram
The bifurcation diagram of a dynamic system shows the points it traversed in phase space. It provides scholars with a visual method to study the properties of chaos. Figure 2 presents the bifurcation diagrams of the CLS, Logistic map, and Sine map. As Figure 2 shows, the Logistic map and Sine map both share fixed or periodic points in most parameter areas. Furthermore, their output values are not uniformly distributed in the phase space. However, the CLS has complex dynamic behaviors in all parameter ranges. Its output values fill the entire phase space, which indicates CLS has complicated dynamic behaviors and its output values are more random.

Bifurcation Diagram
The bifurcation diagram of a dynamic system shows the points it traversed in phase space. It provides scholars with a visual method to study the properties of chaos. Figure 2 presents the bifurcation diagrams of the CLS, Logistic map, and Sine map. As Figure 2 shows, the Logistic map and Sine map both share fixed or periodic points in most parameter areas. Furthermore, their output values are not uniformly distributed in the phase space. However, the CLS has complex dynamic behaviors in all parameter ranges. Its output values fill the entire phase space, which indicates CLS has complicated dynamic behaviors and its output values are more random. output values are obtained through linear coupling and Cosine transform. The block diagram of constructing the LNECS is shown in Figure 1. Mathematically, LNECS can be defined as follows: are two existing chaotic maps,  and  are their system parameters, and  is a control parameter. If the seed map chooses the Logistic and Sine maps, the new chaotic system, called LCLS, is represented as where system parameters and  are set as r and (1 ) r − , and control parameter  is set as 0.5. The next subsection analyzes CLS from the bifurcation diagram, Lyapunov exponent, and the sample entropy, which indicates CLS exhibits complex chaotic characteristics.

Bifurcation Diagram
The bifurcation diagram of a dynamic system shows the points it traversed in phase space. It provides scholars with a visual method to study the properties of chaos. Figure 2 presents the bifurcation diagrams of the CLS, Logistic map, and Sine map. As Figure 2 shows, the Logistic map and Sine map both share fixed or periodic points in most parameter areas. Furthermore, their output values are not uniformly distributed in the phase space. However, the CLS has complex dynamic behaviors in all parameter ranges. Its output values fill the entire phase space, which indicates CLS has complicated dynamic behaviors and its output values are more random.

Lyapunov Exponent
In the theory of nonlinear dynamics, the Lyapunov exponent (LE) is an important characteristic to describe the infinitesimal deviation of orbit in phase space. Sensitive dependence on initial conditions is an important characteristic of chaos, that is, two orbits in phase space that are close to each other will separate exponentially as time goes on. LE can be presented using Definition 1.

Definition 1.
The LE of a 1D discrete-time system x i+1 = F(x i ) is mathematically defined by as follows: where t is a small positive number. The LE represents a measure of the mean convergence or mean divergence of similar orbitals in phase space. The larger the value of LE, the faster the phase space trajectory diverges. This means that the more sensitive it is to initial conditions, the more chaotic the system. As Figure 3a shows, the Logistic map and Sine map both have positive LEs for only a few parameters. However, CLS can obtain positive LEs in all parameter ranges, which indicates CLS is a chaotic map with more complex chaotic dynamic behaviors. As can be seen from Figure 3b, the difference in the initial value is 0.01, and the value of the function has changed considerably, indicating that the initial value of this system is very sensitive.
characteristic to describe the infinitesimal deviation of orbit in phase space. Sensitive dependence on initial conditions is an important characteristic of chaos, that is, two orbits in phase space that are close to each other will separate exponentially as time goes on. LE can be presented using Definition 1. Definition 1. The LE of a 1D discrete-time system ( ) is mathematically defined by as follows: where t is a small positive number. The LE represents a measure of the mean convergence or mean divergence of similar orbitals in phase space. The larger the value of LE, the faster the phase space trajectory diverges. This means that the more sensitive it is to initial conditions, the more chaotic the system. As Figure 3 (a) shows, the Logistic map and Sine map both have positive LEs for only a few parameters. However, CLS can obtain positive LEs in all parameter ranges, which indicates CLS is a chaotic map with more complex chaotic dynamic behaviors. As can be seen from Figure 3 (b), the difference in the initial value is 0.01, and the value of the function has changed considerably, indicating that the initial value of this system is very sensitive.

Sample Entropy
At present, the approximate entropy (ApEn) algorithm [28] is widely used to measure the complexity of chaotic sequences. However, since the ApEn algorithm avoids errors by counting the number of templates that match its own data, if the threshold value is small, there will be a large number of template matches, resulting in the phenomenon that the effect of deviation is not obvious, so there is a margin for error. In 2000, a new quantization algorithm of time series complexity, called Sample Entropy (SE), was proposed [29], which is an improved algorithm of ApEn. The meaning of the parameters is consistent with that of ApEn. The algorithm uses the method of removing the comparison with its own template to enlarge the deviation value compared with the threshold value, which can estimate the probability of new data more accurately and reduce the error of ApEn; it is a more accurate algorithm to measure the complexity of time series. The SE of a time series is defined by as follows:

Sample Entropy
At present, the approximate entropy (ApEn) algorithm [28] is widely used to measure the complexity of chaotic sequences. However, since the ApEn algorithm avoids errors by counting the number of templates that match its own data, if the threshold value is small, there will be a large number of template matches, resulting in the phenomenon that the effect of deviation is not obvious, so there is a margin for error. In 2000, a new quantization algorithm of time series complexity, called Sample Entropy (SE), was proposed [29], which is an improved algorithm of ApEn. The meaning of the parameters is consistent with that of ApEn. The algorithm uses the method of removing the comparison with its own template to enlarge the deviation value compared with the threshold value, which can estimate the probability of new data more accurately and reduce the error of ApEn; it is a more accurate algorithm to measure the complexity of time series. The SE of a time series X = {x 1 , x 2 , · · · , x n } is defined by as follows: where m is a given dimension, r = 0.1 ∼ 0.25SD, SD represents the standard deviation of a time series, and A and B are the number of vectors, which are d[X m+1 (i), X m+1 (j) ] < r and d[X m (i), X m (j) ] < r, respectively. Figure 3c compares the SEs of chaotic maps. It can be observed that CLS has much larger SEs than the Logistic map and Sine map, which indicates CLS has more complex output sequences. In the next section, we will construct an S-box from the sequence generated by the chaotic system.

S-Box Dynamic Construction Method Based on CLS
A Boolean variable is a coordinate vector expressed in bits. If a and b represent two Boolean vectors, and the length of input and output of function f (x) : F n 2 → F m 2 is set as n and m, respectively, then the function where f (a) = b is called a Boolean function. An n × m S-box can be generally expressed as S : {0, 1} n → {0, 1} m , which is composed of m Boolean functions of n variables, i.e., S(x) = f i (x 1 , x 2 , · · · , x n ), i = 1, 2, · · · , m. For an 8 × 8 S-box, the eight functions based on CLS are defined as follows: where The output of the eight functions represents eight binary bits for the decimal value of some element of the S-box. The value of x i is taken from the output sequence of CLS. For the value of CLS at any time, the output values for eight functions will be calculated. Thus, the output values of eight functions are used to construct one element of the S-box. The detailed algorithm of constructing the S-box is described as Algorithm 1: The proposed algorithm for constructing the S-box is graphically illustrated in Figure 4. Further, an example of constructing the S-box is given. The process of the construction of the S-box is illustrated step by step in Table 1. The first column of the table k represents the given iteration number. Each iteration of the system produces one output value, and it is as fed as input for the eight functions. The outputs of the eight functions are shown in columns 2 through 9 of the table. The conversion of 8-bit binaries to decimal numbers is shown in the last column. Finally, the constructed S-box from the proposed one is shown in Table 2.  is shown in the last column. Finally, the constructed S-box from the proposed one is shown in Table 2.      38  239  242  221  93  182  189  224  195  210  71  97  6  68  116  96  73  143  117  244  85  102  138  88  110  119  230  217  74  64  203  137  165  184  60  153  238  211  63  155  76  201  240  133  176  57 171 205

Security Analysis of the Proposed S-box
In order to test the superiority of the proposed S-box compared with other existing S-boxes, we test five basic criteria: the bijective property, nonlinearity, difference uniformity, strict avalanche criterion (SAC), and output bits independence criterion (BIC). These criteria are widely used to evaluate the performance of an S-box.

Bijective Property
In general, S-boxes are invertible mappings. Therefore, an S-box is bijective if it satisfies the following formula [30]: where a i = {0, 1}, (a 1 , a 2 , · · · , a n ) = (0, 0, · · · , 0), f i (x) is the Boolean function of the components of the S-box and wt( ) is the hamming weight. In this paper, there are 255 linear combinations of 8 Boolean functions of the S-box. By calculating the hamming weight of the XOR value of the vectors in each combination, it can be found that the results are all 128, so the S-box satisfies bijective property.

Nonlinearity
Nonlinearity is a measure of the ability of a cryptographic function to resist linear attacks [31,32]. The greater the nonlinearity of the function, the stronger the ability to resist linear and correlation attacks. For the convenience of calculation, we give the definition of nonlinearity based on the Walsh spectrum. The nonlinearity of the n-bits Boolean function f (x) is defined by the following formula: where S f (ω) is the Walsh cyclic spectrum of f (x). The Walsh cyclic spectrum of f (x) is described by the following formula: where x·ω denotes the dot product of the vector x with ω and ω ∈ F n 2 . The nonlinearity of each Boolean function and the mean value of nonlinearity are computed, whose results are shown in Table 3, which shows the nonlinearity performance of other existing S-boxes. It is easy to see that the nonlinearity of the S-box proposed in this paper is better than that of other S-boxes. the ability to resist differential analysis. The difference uniformity of some S-boxes can be described as follows: Differential probability for a given function can be defined by: where X is the set of all possible input value. DP f represents the maximum probability that the output difference is ∆y when the input difference is ∆x. The XOR distribution of the proposed S-box is shown in Table 4. The maximum DP value of the proposed S-box is 10, which indicates it can resist differential attacks.

Strict Avalanche Criterion (SAC)
The strict avalanche criterion (SAC) combining completeness and the avalanche effect was introduced by Webster and Tavares [38]. SAC mainly analyzes changes in the behavior of ciphertext output bits. Suppose an S-box meets SAC, only half of one bit of the input change will cause the change in the output bits, namely, a change in the probability of each output bit by 0.5. The dependence matrix is used to obtain the SAC values of an S-box. If an S-box nearly satisfies SAC, each element of the dependence matrix is close to 0.5. The independence matrix of the proposed S-box is represented in Table 5. As Table 5 shows, these values are near to half of the better and optimum values.

Output Bits Independence Criterion (BIC)
The output bits independence criterion (BIC) was presented in the literature [39]. The Boolean function for any two outputs of an S-box f i (x) and f j (x) (i = j, i ≥ 1, j ≤ n), if the S-box satisfies BIC-nonlinearity and f i (x) ⊕ f j (x), should satisfy the nonlinearity property; if the S-box satisfies BIC-SAC, f i (x) ⊕ f j (x) should satisfy SAC. The results obtained from the proposed S-box are represented in Tables 6 and 7. As shown in Table 5, the mean values of nonlinearity are greater than 101, and the average value of the dependence matrix for BIC is near 0.5. Therefore, the proposed S-box shares have a good BIC property. As can be seen from Table 8, the results of the security analysis demonstrate that the proposed one is better than the related work in terms of security and performance. In view of the above security indicators, we can conclude that the S-box based on the proposed method in this paper has strong encryption characteristics, which is helpful for the development of cryptography studies such as dynamic construction methods based on chaotic systems.

Conclusions
In this paper, we have presented the generation method S-box based on CLS. First, a Logistic map and Sine map are linearly combined to enhance chaotic behaviors. Furthermore, the chaotic characteristics of the system are further enhanced by the nonlinear variation of the linear combination of the values. Through the analysis of the Bifurcation diagram, LE and SE, we can see that CLS has overcome the shortcomings of the lowdimensional chaotic system and can be used in the field of cryptology. In addition, we conducted a series of security analysis after obtaining the S-box, whose results showed that it can resist well-known attacks and cryptanalysis. In later work, we will use FPGA to achieve this S-box and the optimized algorithm to obtain an S-box with better performance.
Author Contributions: W.Y. was in charge of methodology, software, validation and writingoriginal draft preparation. Project administration and supervision were done by Q.D. All authors have read and agreed to the published version of the manuscript.