Image confusion and diffusion based on multi-chaotic system and mix-column

Received Mar 3, 2021 Revised May 13, 2021 Accepted Jun 17, 2021 In this paper, a new image encryption algorithm based on chaotic cryptography was proposed. The proposed scheme was based on multiple stages of confusion and diffusion. The diffusion process was implemented twice, first, by permuting the pixels of the plain image by using an Arnold cat map and, the second time by permuting the plain image pixels via the proposed permutation algorithm. The confusion process was performed many times, by performing the XOR operation between the two resulted from permuted images, subtracted a random value from all pixels of the image, as well as by implementing the mix column on the resulted image, and by used the Lorenz key to obtain the encrypted image. The security analysis tests that used to exam the results of this encryption method were information entropy, key space analysis, correlation, histogram analysis UACI, and NPCR have shown that the suggested algorithm has been resistant against different types of attacks.


INTRODUCTION
Due to the rapid growth of IT and computer networks, massive quantities of data are being interchanged over different network types. The main portion of transmitted digital data, that has been either private or confidential, needs the security techniques to provide wanted protection. Thus, security became a significant case during the transmission and storage of digital data [1]. Recently, numerous image encryption algorithms that were based on chaos theory have been designed and implemented, because of the desirable features which make them appropriate for image encryption such as pseudorandomness, arbitrary behavior, and sensitivity to control parameters and initial conditions [2].
Recently, several studies have emerged in the field of image encryption using chaotic systems such as, Narendra K. et al. [1] who have proposed algorithm for the encryption of gray-level images by the use of a confidential key of 128-bits size. At first, image quality was degraded by mixing up procedure. The resulting image was separated to key dependent dynamic blocks and, furthermore, those blocks were exceeded by key dependent substitution and diffusion procedures. A total of sixteen rounds were utilized in the encryption algorithm. Apeksha Waghmare et al. [3] designed a cryptographic algorithm that was based on ACM and logistic map. They used the cat map for the permutation operation and the Logistic map for the key generation. Ekhlas A. and Tayseer K. [4] proposed a novel chaotic permutation and substitution technique for image encryption. In this algorithm they made a combination of the block cipher and the chaotic map. The proposed algorithm was utilized to encrypt and decrypt a block of 500 bytes. Every block  [5] implemented an algorithm for image encryption based upon chaotic sequences that have been created by the Lorenz system. Kayhan C. and Erol K. [6] was proposed an innovative image encryption method based on the Lorenz chaotic system and pixel shuffling. For the pixel shuffling process, they have used two initial vectors, one of columns and another of rows. Firstly, they performed the XOR operation between the initial column vector and image columns, then XORed the initial row with image rows to generate encrypted image. Ali Soleymani et al. [7] presented a new encryption system for images security depending on ACM and Henon maps. The system used ACM for a bit-and pixel-level permutation cases on the plain and encrypted images, while the Henon map created cipher images and specified parameters for permutations. Sura F. [8] proposed a novel system for grayscale image encryption. She divided the image evenly into four blocks, every one of the blocks was rotated 90 o in a clockwise orientation. The confusion was implemented by generating a permutation sequence, and the diffusion was implemented by generating a masking sequence for the alteration of image pixel values. Four various chaotic map variants were utilized, one for every block and those were Cross map, Quadratic map, the Ikeda map, and Chebyshev map. Finally, through commingle the 4 encrypted blocks, the cipher-image has been acquired. Ibtisam A. and Sarab M. [9] suggested a colored image encryption scheme based on a combination of 1D logistic and Sine chaotic maps. Behrang Chaboki and Ali Shakiba [10] proposed a chaotic-based image encryption algorithm, they used chaotic coupled lattice mapping for permutation and use a sorting approach to construct the diffusion matrix. Arwa Benlashram et al. [11] were used image pixel shuffling and the 3D chaotic map to propose a new method of image encryption. Ahmed M. Elshamy et al. [12] proposed a hybrid encryption technique for image encryption by using the Baker map, the Arnold cat map, and the Henon map, they applied each to a single channel. Ehsan Hasanzadeh and Mahdi Yaghoobi [13] were used S-box, fractals, and hyper chaotic dynamical systems to propose a colored image encryption method. Muna KH. and Sura Mazin [14] proposed an algorithm for image encryption by using the ElGamal public key algorithm and the 3D Arnold cat map. Using the proposed 2D chaotic map and discrete wavelet transform (DWT), Ibrahim Yasser et al. [15] proposed a new method for image encryption. By combining the chaotic scheme with mix-column, a new color image encryption algorithm is proposed in this paper. This algorithm increases the security and efficiency of image encryption via high confusion that provided by XOR operation, mixcloumn and, the Lorenz system and high diffusion that was provided by the permutation method and ACM. The remainder of this paper has been organized in the following manner. The methods that were used in the proposed algorithm will be explained in section 2. The proposed system has been explained in detail in section 3. Section 4 demonstrates the security analysis. Finally, in section 5, the conclusions are presented.

CHAOTIC SYSTEM
This paper used two chaotic systems, which are, Arnold cat map [16] and the Lorenz system [17] that were employed in the proposed system for the key generation.

Arnold cat map
Arnold's cat map is a two-dimension chaotic map which can be utilized to alter the position of the pixel of the image without eliminating any information from that image [18], This 2-D transformation depends upon a matrix that has a determinant of 1, making this conversion reversible and described as [19]: Where, and are integers and ( , ) is the original position which has been mapped to the new position ( ', '). This conversion is utilized for the randomization of the original arrangement of bits or pixels in an image. Yet, after enough reiteration, the original image has been reconstructed. Inverse mapping using (2) is a decryption phase procedure to convert the scrambled image to the input image. The number of repetitions in the permutation phase should be equal to the number of repetitions of the reverse transmutation [20]. In (2) shows the reverse mapping:

Lorenz system
The Lorenz system, which initially has been researched by E. Lorenz in 1963, is a dynamic scheme which has been described through the following non-linear scheme of ordinary differential equations (ODEs) [21]: The actual numbers α, β, γ have been known as control parameters, while x, y, z have been known as the status variables. As shown in Figure 1, the scheme presents a periodic behavior for parameters value α=10, γ=8/3 and β=28. Figure 1. The plot of the Lorenz system along x-y-z axis, for α=10, γ=8/3, β=28

PROPOSED SCHEME
The proposed scheme contains six major steps, which conitain multiple steps of diffusion and confusion, that are: a. The first stage is the diffusion process, which will be implemented twice. In the first one, the plain image is permuted by ACM that has been explained in the section (2.1), and in the second one is the plain image is permuted by the proposed permutation method which will be explained in the section (3.1). b. The second stage is the confusion which will be implemented four times. The first one, is by implementing XOR operation between the results of the two permutation output. The second one, is by subtracting the random value in the range of [0-255] from all image pixels and this value is saved in a parameter will be used with chaotic parameters as a key. The third one, divides the resulting image to many blocks each block in size 16-byte and implement mix-column for each one. After that, collecting the blocks to generate the resulting image. Finally, implements the XOR operation between the resulting image and the Lorenz key to generate the encrypted image. Figure 2 illustrates the structure of the proposed model.

Permutation method
The permutation is a very important stage for impeding the rising correlation amongst image pixels to increment the encrypted image security. In this method, we relied on scrambling columns and rows depending on the sum invariance of row and column through a circular shift process. In the beginning, the plain image is divided into three bands (red, green, and blue) and shift each row in each band by the total sum of the row and column's pixel values and save the result in a variable, then implementing the same method in each column and saving the result in another variable has been performed. After that, transpose operation has been implemented for each band and the previous steps have been repeated for each row and column in each band, then, collecting the bands to generate the resulting image. Table 1 illustrate the permutation method of 5x5 sub-image and Figure 3 The new pixel location  216  159  162  283  215  99  283  129  224  187  190  245  111  129  154  142  215  154  180  159  187  191  224  180  182  198  96  216  182  156  198  192  156  150  148  245  148  192  190  150  96  107  138  99  142  138  162  111 107 191

Mix-column
In this scheme, the mix-column transformation matrix has been implemented in the AES algorithm which has been explained in detail by [22]. The mix-column transformation is applied to a block of columns one by one. It is performed by transforming each column of four bytes and takes it as input, which contains 4 bytes, and outputs a totally different 4 bytes by transforming the original column. Each byte in the product matrix is the summation products of bytes of one row and one column. The resultant matrix is the same as the input block size. Figure 4 explains the mix-column transformation process and Figure 5 shows the mixcolumn implementation of Lena's image.

Proposed algorithm
In this section, the encryption and decryption algorithm will be explained: a.

RESULTS AND DISCUSSION
In this section, we review the results of the series of tests to proof the efficiency of the proposed method. The evaluation consists of many practical experiments. The experiments are performed via MATLAB R2013a on a computer with Intel Core i7 CPU 1.99 GHz, 8 GB of RAM.

Key space analyses
Key space size is the aggregate number of various keys which may be utilized in the encryption and decryption. The key space has to be large enough in order to resist against robust attacks, which makes the finding of the key very hard for the attackers. In the systems that were based on chaotic systems, key space increases by increasing the number of parameters and the chaotic system size. In this approach, the key space is (10 14 ) 6 which is nearly equal to 2 279 and it's sufficient to resist each type of brute-force attacks. Table 2 shows the key space compared to some related works.

Information entropy analysis
One of the very important measures to compute the randomness is information entropy. It can be computed by: In (4), m is a sample, n is the number of samples, and p (m) is the likelihood of symbol m. The ideal value of H (m) can be obtained according to (4) is 8, this indicates that random information in the image [23]. The values of information entropy that has been obtained from the proposed system are closer to eight, this shows that the suggested scheme has good randomness. Table 3 shows the values of information entropy for the different plain images and Table 4 shown the information entropy comparison with some of the related works.

Correlation analysis
The correlation among contiguous pixels in the normal image is always strong, and the correlation coefficient values are so close to 1. For this reason, the correlation must be decreased significantly in an efficient encryption algorithm and the value extremely close to 0 [21]. The correlation coefficients can be calculated for three orientations, which are diagonal, horizontal, and vertical shown in below.  In (5), x and y represent values of 2 contiguous pixels in an image. Figure 6 illustrates the diagonal, horizontal, and vertical correlation coefficients in the plain and encrypted Lena image, and Table 5 displays the results of the correlation for different plain and encrypted images. Table 6 lists the comparison of the correlation coefficients with some of the related works.

Resisting differential attack analysis
In cryptography, a pixel from a plain image is compared to a pixel from a cipher image to obtain the beneficial relation, that moreover defines the secret key. This type of analysis has been known as the differential attack cryptanalyses [24]. This study used the number of unified averaged modified intensity (UACI) values and the pixels change rate to determine the effect of changing a small portion of the pixels in the normal image of the encrypted image (NPCR). The NPCR index can be used to estimate the number of pixels in the original image that have the same location in the encrypted image, and it is determined as follows: Where, the image width (w) and height (h), C1(i, j) & C2(i, j) are two encrypted images whose corresponding plain images I1(i, j) & I2(i, j) have only 1-pixel value variation. D(i, j)=0, if C1(i, j)=C2(i, j); otherwise D(i, j)=1. The UACI index is utilized for knowing the influence of the encrypted image in the case where onepixel has been changed in the plain image, and it has been determined according to: The optimum value of UACI and NPCR are 33.46 and 99.61 [25]. In this paper we implement NPCR and UACI measures on ten colored images and the results of two indicators are near to idealistic value. Table 7 shown the results of UACI and NPCR in the suggested scheme. Table 8 shows the UACI and NPCR comparison with some of the related works.

Histogram analysis
The histogram analysis has been utilized in order to explain the diffusion and confusion characteristics of the encryption algorithm. Figure 7 shows the difference in the image distribution between the plain and encrypted tree images.

CONCLUSION
In the present paper, a new image encryption algorithm was suggested to provide a high security level of image encryption, based upon the combinations of permutation method, the chaotic system and mixcolumn. Whereas the random permutation method provides a high level of diffusion, and mix-column process provides high confusion. Also, the use of the chaotic system offers high randomness, key sensitivity, and confusion. The effectiveness of this method has been confirmed by the experimental results above. It can be seen that according to these results, the suggested system shows high resistance against the statistical and differential attack types.