S-Box Based Image Encryption Application Using a Chaotic System without Equilibrium

Chaotic systems without equilibrium are of interest because they are the systems with hidden attractors. A nonequilibrium system with chaos is introduced in this work. Chaotic behavior of the system is verified by phase portraits, Lyapunov exponents, and entropy. We have implemented a real electronic circuit of the system and reported experimental results. By using this new chaotic system, we have constructed S-boxes which are applied to propose a novel image encryption algorithm. In the designed encryption algorithm, three S-boxes with strong cryptographic properties are used for the sub-byte operation. Particularly, the S-box for the sub-byte process is selected randomly. In addition, performance analyses of S-boxes and security analyses of the encryption processes have been presented.

There is a large volume of published works relating to the role of S-box in encryption algorithms [19,20].S-box is an important unit to provide higher security properties.S-box construction has been the subject of many studies [21][22][23].Especially, chaos-based S-boxes have received critical investigation [24][25][26][27][28][29].Chaotic S-box has attractive features and is an interesting research topic [30][31][32][33][34][35].Based on chaotic maps, Tang et al. designed S-boxes [25].S-boxes based on tent maps were reported in [26] while S-boxes based on chaotic Boolean functions was presented in [28].Strong S-boxes were constructed by using a chaotic Lorenz systems [32].Hussain et al. proposed a novel approach for designing S-boxes with a nonlinear chaotic algorithm [33].A chaotic scaled Zhongtang system was applied to generate strong a S-box algorithm [30].Moreover, by using a time-delay chaotic system, Özkaynak and Yavuz introduced chaotic S-boxes [29].
In this work, we investigate a non-equilibrium system, which attracts interest because its attractor is "hidden" [36][37][38][39].A hidden attractor cannot be localized numerically by a standard computational procedure [38,39].Because there is no limitation of equilibrium, such a chaotic system without equilibrium is appropriate for the area of information encryption [40].Chaotic time-series obtained from the proposed system are used to construct S-boxes and develop an image encryption application.In this study, unlike the S-box based encryption algorithms in the literature, S-box production with high randomness bit sequences and strong cryptographic properties is performed using chaotic system based random number generator (RNG) with rich dynamical properties.An algorithm has been proposed that performs pixel-based encryption on image files and uses a different S-box in each cycle with random selection of S-boxes.

A Nonequilibrium System with Ten Terms and Its Feasibility
Recently, there has been considerable critical attention on nonequilibium systems with chaos [40][41][42][43][44].Such chaotic systems are totally different from common chaotic ones, in which there are some unstable equilibrium points.Investigating new chaotic systems without equilibria is a continuing concern [45].For studying new nonequilibrium systems, we consider a general three-dimensional form: in which parameters are denoted as a i (i = 1, . . ., 10), and a i = 0.The origin of the system (1) is based on the published work [42].
By used a search procedure [42], we have found the parameter set (2), for which there is no any real equilibrium in the three-dimensional form (1), with a, b, c, d > 0.
Thus, form (1) becomes the following system: It is trivial to confirm that for a = 2, b = 2.5, c = 0.2, and d = 0.3 system (3) does not have any real equilibrium.It is noted that there are some sets of values which make a system without real equilibria.We have selected such a set of values because in this case the system is elegant [46][47][48].Especially, the system exhibits chaos (see Figure 1).Chaotic dynamics was verified by calculated Lyapunov exponents L 1 = 0.2376, L 2 = 0, L 3 = −0.5231as presented in Figure 2.For calculating the Lyapunov exponents, we applied the known Wolf's algorithm [49].Entropy was used to estimate the transfer rate of information in a particular system [50].Moreover, entropy indicates the level of chaos in a dynamical system [51,52].Here we measured the approximate entropy (ApEn) [53,54] for system (3).The calculated approximate entropy of the system without equilibrium (3) is 0.1503, which presents the level of chaotic behavior.Circuit implementation provides an effective tool for verifying the feasibility of theoretical models [55][56][57][58][59]. Therefore, we have designed and realized the nonequilibrium system via a real circuit as shown in Figures 3 and 4. The circuit was implemented with selected components: R1 = 200 kΩ, R2 = R3 = R7 = R8 = R15 = R16 = 100 kΩ, R4 = R9 = R11 = 400 kΩ, R5 = 160 kΩ, R6 = R14 = 8 kΩ, R10 = 2 MΩ, R12 = 30 MΩ, R13 = 26.6 kΩ, and C1 = C2 = C3 = 1 nF.The phase portraits are displayed by the oscilloscope as reported in Figure 5. Figure 1 is a theoretical figure obtained by solving the system at noequilibrium conditions, while Figure 5 was obtained experimentally by using the implemented electronic circuit.

The S-Box Generation Algorithm Design and Performance Analysis
S-box is one of the most basic structures used in block encryption algorithms.S-box structures in encryption algorithms are used for byte change operations.In this section, a new S-box production algorithm is designed using the developed chaotic system and new S-box productions are realized.Performance analyses of the produced S-boxes are made and compared with the S-boxes in the literature.

The S-Box Generation Algorithm Design
In this section, the S-box production algorithm is designed to be used in the encryption algorithm.Three different S-box generations are realized with the S-box production algorithm developed in the study.In the algorithm design, a chaotic system with rich dynamic characteristics introduced to the model is used.The pseudo code block for the algorithm design is shown in Algorithm 1. Firstly, the system parameters (a, b, c, d) and initial conditions (x(0), y(0), z(0)) of the chaotic system are entered.Then, in order to obtain a more random output, the appropriate sampling step range is determined.This value is set at 0.001.The chaotic system RK-4 (Runge-Kutta 4) algorithm is solved with the specified sampling step interval.The float values from each phase are obtained from the RK-4 algorithm.The generated float values are taken from the first three digits after the decimal point, and mod-256 operation is applied.Remain and round operations have also been applied to obtain the first three steps after the decimal point.As a result of this process, 0-256 values are obtained from each phase.The values obtained from the x and y phases for the proposed S-box1, x, y and z phases for S-box2, y and z phases for S-box3 bitxor operation are applied.It is then checked whether the values produced are on the S-box, in other words whether it has been produced before.If produced, this value is discarded, otherwise it is added to the S-box.In this way a 256 element S-box is produced.Subsequently, S-box performance tests are conducted to test the produced S-boxes.

Performance Analysis Results of Proposed S-Boxes
In order to be able to use the generated S-boxes in the encryption process, performance tests are required.S-box structures with strong cryptographic properties play a major role in encryption.By using the developed S-box generation algorithm, three different S-boxes have been proposed to be used in image encryption processes and the performance tests of these S-boxes have been carried out.The performance results of the proposed S-boxes are compared with the S-box structures in the literature.The proposed S-box that uses the cryptography process are shown in Tables 1-3.S-box productions are realized using different phases of chaotic systems.Performance tests have been applied to show the cryptographic performance values of the produced S-boxes.Nonlinearity [21] is one of the most important features in the S-box value evaluation criteria.The min.and max.nonlinearity values of produced S-boxes are found as follows: min.value of 104, max.value of 110 for S-box1; min.value of 104, max.value of 108 for S-box2; min.value of 106, max.value of 108 for S-box3.The min., avg.and max.nonlinearity values of the S-boxes suggested in Table 4 are given.It shows the best values after the Advanced Encryption Standard (AES) algorithm application for the max., min.and avg.nonlinearity values of proposed S-box1, 2 and 3 respectively.The strict avalanche criterion (SAC) is a another important performance measure method that calculates the probability of change in output bits based on the change in input bits.This method was developed by Webster and Tavares [22].The optimum value for the calculated coefficient is 0.5.This method calculates the probability of a change in half of the output bits when a single change occurs from the input bits.Table 4 shows that the SAC values of the proposed S-boxes are very close to the ideal value of 0.5.The bit independence criteria (BIC) is a performance criterion recommended by Webster and Tavares [22] and is evaluated in two different ways.In these tests, it is tested whether the vector set generated with the plaintext inverse bit is independent of all the avalanche variable sets.BIC-SAC and BIC-nonlinearity values of S-boxes are calculated in BIC performance evaluation.BIC-SAC and BIC-nonlinearity values of the S-boxes suggested in Table 4 are shown.Suggested S-boxes have been found to have good values.Differential approximation probability (DP) [23] is a differential cryptanalysis evaluation criterion that examines the the exclusive or XOR distribution balance between the input and output bits of an S-box.Each output XOR value must have equal probability when compared to input values.The close XOR distribution between the input and output bits and the low DP value suggests that the S-box is more resistant to differential cryptanalysis.As shown in Table 4, the AES S-box has the lowest DP value.Compared to all the S-boxes given in Table 4, it is seen that the proposed S-boxes have the lowest DP values.As a result, as shown in Table 4, the proposed S-boxes have good nonlinearity and DP values after AES S-box construction compared to the S-boxes presented in the literature.SAC, BIC-SAC and BIC-nonlinearity values of proposed S-boxes were found to be close to optimum values.When examining the S-box studies in the literature, it is seen that the S-box produced by the AES algorithm has the best values.The studies in the literature are trying to realize S-box production with low load processing and high cryptographic properties by using different methods.

Design, Implementation and Analysis Results of the Image Encryption Algorithm
In this section, a S-box based encryption algorithm is proposed for image encryption.In the developed algorithm, the S-box structures generated by the chaos-based S-box algorithm described in the previous section are used.First, the design of the S-box based encryption algorithm has been presented, then the image encryption process has been performed and the performance and security analysis results of the encryption processes have been given.

Design of Image Encryption Algorithm
In the algorithm developed for image encryption, encryption is realized by performing sub-byte operations with S-box structure used for confusion in block encryption algorithms.An S-box structure with strong cryptographic features makes the encryption process very robust and resistant to attacks.In this study, by using the developed S-box generation algorithm, three S-boxes with strong cryptographic properties have been generated and the performance results of S-boxes are given in the previous section.The block diagram for the designed encryption algorithm is shown in Figure 6.In the encryption algorithm, first, the random number obtained from the random bit sequences generated by the chaos-based RNG and the image file are subjected to "bitxor" process over pixels.Number generation by chaos-based RNG is performed as described in the S-box generation algorithm.Then, sub-byte process is performed on the image with S-boxes having strong cryptographic properties generated by the S-box generation algorithm.In the sub-byte process, row and column positions of pixels of the image are replaced with the eight-bit value on the S-box.The S-box to be used during this replacement is also determined by mod-3 operation over the numbers in the random number array generated from the x-phase of the chaos-based RNG.In this way, the S-box for sub-byte process is randomly selected.After sub-byte process, an encrypted image file is obtained.By applying the reverse of these operations for decryption, the original image is obtained.

Image Encryption Application and Security Analysis
In this section, by using the developed image encryption algorithm, encryption and decryption processes have been performed on three different images.Also, security analyses of encryption processes have been realized.Original image files, 256×256, that were used in encryption can be seen in Figure 7a-c encrypted images are in Figure 7d-f and decrypted image files are located in Figure 7g-i.When the original and decrypted image files are compared, it appears that the encryption process has been successful.Following the encryption process, performance analyses have been performed to determine the quality of the encryption process.First, a histogram analysis of the encryption process has been performed.In Figure 8a-c, histogram distribution graphs of the encrypted image files are shown.Histogram distribution shows the distribution of pixel values in the image file.The more balanced the distribution, the more successful the encryption has been performed.Correlation coefficient and correlation analysis [62] shows the independence of the relation of the two random variables.When the correlation distribution is linear, there is strong relation between variables and the encryption is not good.So, the distribution should be nonlinear.Correlation distribution graphs are shown in Figure 8d-f, and the calculated correlation coefficients are located in Table 5.When the correlation distribution graphs are examined, it is seen that the encryption processes had a good correlation distribution and the correlation coefficients are close to zero in Table 5.Other analyses performed on the encryption process is the number of pixels change rate (NPCR) and unified average changing intensity (UACI) [23].They are cryptanalysis methods to determine resistance of encryption against differential attacks.They are used for detection of effects of small changes in the original images to encrypted images.Table 5 shows the calculated NPCR and UACI values of the performed encryption processes.It has been found that the NPCR values are very close to the results in [63].That means the pixel values of the images have been changed because of the encryption.Also UACI values are very close to optimum.Information entropy [64] is used to measure randomness and complexity of encrypted data.Encrypted data should be very complex and there must not be any information about the original data.Optimum value of information entropy is eight for an gray scale information.When the entropy values of the encryption processes in Table 5 are examined, it is seen that they are very close to eight.This means that the encryptions in this study are good.Encryption quality is obtained by calculating the differences of the pixel values between the encrypted and original images.If the difference values are greater, the encryption quality is higher.In Table 5, the values of encryption quality are given as 35.8046, 45.3828 and 61.4676 for three images.
From the results, it can be seen that the baboon image has the best encryption quality.The encryption and decryption time of the algorithm is very important for performance and usefulness.To show performance of the developed encryption algorithm, encryption and decryption times have been determined as in Table 5.As seen from the results, all of the encryption and decryption processes are performed in approximately 1 s totally.In Table 6, the comparison of the encryption times of the proposed algorithm and some studies in the literature is given.When Table 6 is examined, it is seen that the proposed algorithm completes the encryption processes in a shorter time than studies in the literature.

Conclusions
A no-equilibrium system exhibiting chaos has been studied in our work.Experimental results of the implemented circuit verify the system's feasibility.We have designed an S-box generation algorithm using a system without equilibrium.Using the developed S-box algorithm, three different S-boxes are produced.The outputs of the different phases of the chaotic system are used in the S-box generation algorithm.The performance tests of the generated S-boxes are performed.They are compared with the studies in the literature.Then a new image encryption algorithm is developed using the generated S-boxes.With the random S-box selection in the encryption algorithm, each pixel has been encrypted with different S-box.This is the most important specificity aspect of the developed encryption algorithm.With the developed encryption algorithm, encryption operations are performed on different images, and security and performance analyses are performed.According to the analysis results, the developed encryption algorithm has been shown to have good correlation, NPCR, UACI, information entropy, encryption quality and encryption time.As a result, it is proven that S-box based encryption algorithm can be used safely in image encryption operations.
Funding: The author Xiong Wang was supported by the National Natural Science Foundation of China (No. 61601306) and Shenzhen Overseas High Level Talent Peacock Project Fund (No. 20150215145C).

Conflicts of Interest:
The authors declare no conflict of interest.

Figure 4 .Figure 5 .
Real electronic circuit implemented using a board.(a) the electronic board, (b) the measurement of the circuit by using the oscilloscope.Experimental attractors displayed by using an oscilloscope in (a) X − Y plane, (b) X − Z plane, and (c) Y − Z plane.

Figure 6 .
Figure 6.The proposed new encryption algorithm.

8 .
(a) Fan image (b) City image (c) Baboon image (d) Fan image (e) City image (f) Baboon image Figure The result of Histogram and Correlation Analysis.(a) histogram of fan image, (b) histogram of city image, (c) histogram of baboon image, (d) correlation analysis of fan image, (e) correlation analysis of city image, (f) correlation analysis of baboon image.

Table 4 .
The comparison of chaos-based S-box.

Table 5 .
The security and performance analysis results.