An efficient color image encryption scheme based on a matrix scrambling method and a new hybrid chaotic map

Abstract In this paper, an efficient chaos-based image encryption scheme for color images is proposed. This paper includes a strong displacement structure through a specified matrix scrambling method for pixel positions and a new hybrid chaotic map as a key generator for encryption. Chaotic Logistic map is used to generate binary bitstream for controlling diffusion process. The designed map exhibits superior performance in terms of key space range, complexity and chaotic substantiality that enhances security of the whole system. NPCR, UACI, MSE and PSNR values, which are frequently used in performance and security analysis in the field of image encryption, are at a satisfactory level and all parameters have successfully met the necessary conditions. For instance, in a good image encryption algorithm, ideal values of NPCR and UACI parameters should be 99.60% and 33.46%, respectively. The average results obtained in this study are very close to their ideal values as 99.6046 and 33.4733 for NPCR and UACI, respectively. According to a scientific study presented in the similar field, MSE value should be greater than 9,555; PSNR value must be less than 8.3875. In this study, average MSE and PSNR values calculated for six different test images are 10,315 and 7.9961, respectively. Some important analysis results have been compared to that of well-known Advanced Encryption Standard (AES) algorithm and a similar study presented in this field. Theoretical analysis and experimental results confirm that the proposed algorithm has great security and effectively encrypts and decrypts the color images with different sizes as well.


Introduction
Among the multimedia information, digital image plays an important role in people's daily life due to the increasing demand for real-time visual communication in social society. In this sense, security and protection of digital information gains importance. The first solution that comes to mind is use of data encryption algorithms for the protection of digital information confidentially. Most of the available encryption methods such as DES (Data Encryption Standard) and AES (Advanced Encryption Standard) are not generally used for image data (Liu et al., 2015;Qayyum et al., 2020) due to the requirement of much more processing power, bandwidth and longer time which causes low-level efficiency and significant latency during the encryption and decryption processes (Som & Sen, 2013). As a result, traditional encryption algorithms cannot be used effectively for image data.
Many chaos-based image cryptosystems are proposed in this field recently and most of them contain confusion and diffusion structures. However, some of them are successfully broken (Fan & Li, 2017;Mastan & Pandian, 2020) due to their small key spaces, limited key parameters and weak encryption algorithms (Alhadawi et al., 2019). Among these weaknesses, the most serious one is that system parameters that are used to generate secret key are limited due to the chaotic system used in the cipher does not have sufficient complexity. In this study, two different chaotic systems, Sine map and Cubic map are combined under a single model thus the total number of parameter belonging the system is increased and the result is a better, more complex and larger key space of the system. In the designed model, the existence of the chaos dynamics will ensure that the whole system will be sensitive to key parameters. A new hybrid chaotic model containing Sine map and Cubic map, called SINCU map is used as a key generator for the proposed image encryption structure in this paper. Chaos-based discrete time systems, shortly chaotic maps have high efficiency comparing with the continuous time chaotic systems because of their implementations in both software and hardware are easy to apply. However, these systems have disadvantages of limited or discontinuous range of chaotic behaviors and generally show non-uniform data distribution of output sequences. This situation may create serious drawbacks in a cryptosystem such as small key space, weak security and poor efficiency which threat the security of the whole cryptosystem (Alawida et al., 2019). As a result, there are many studies that use different approaches to develop weaker chaotic maps to achieve better chaotic features such as in Gong et al. (2020). In this field, these new chaotic maps have been used in real-time applications especially in secure multimedia data communication. For instance, in Al-Saidi et al. (2020), a new hyperchaotic map is designed for a secure data communication and successfully implemented on a digital hardware for real-time message data transmission. In another study presented by Ogras and Türk in 2017, the hardware simulation of the chaotic Cubic map was successfully applied in the FPGA environment. In short, these studies show that existing and improved chaotic maps can be successfully implemented in a real-time hardware environment.
In this paper, an effective and secure color image encryption scheme is proposed. Proposed algorithm involves permutation process of matrix scrambling in confusion stage and two mixing operations in diffusion stage. Mixing operation is designed such a current cipher pixel is dependent the previous one which accelerates the overall diffusion effect in the algorithm. Depending on the chaotic control bit series, the structure of the encryption algorithm used in the diffusion process also changes. This property offers a stronger and more secure diffusion effect to encryption. The scrambling operation used in the proposed scheme is a changeable matrix based permutation of all pixel coordinates. This operation is easy and simple which leads to increase computational speed of the algorithm. The proposed algorithm has an iteration structure for diffusion stage which enhances the security of the whole cryptosystem. For a secure encryption algorithm, key generator should be stochastic and supposed to yield uniform output which has sufficient randomness. SINCU system is designed to provide these properties well in this study.
The statistical and differential analyses performed in this study are provided in computer environment with MATLAB software. Some important analysis results are also compared with AES algorithm that is widely used in the field of electronic data encryption. In addition, the major security analysis result of the proposed algorithm is also compared with a similar study that is presented recently in image encryption field. The rest of the paper is organized as follows: Section 2 gives a brief overview of the Sine map, Cubic map and chaotic Logistic map. Section 3 introduces a hybrid chaotic map with its statistical analysis. Then, the proposed color image encryption algorithm is given in detail under Section 4. Security analyses and performance evaluation of the proposed algorithm have been given in Section 5. Finally, the conclusion will be discussed in Section 6.

Sine map
Sine map is one of the simplest discrete systems that exhibit chaos and defined by where K is a control parameter and has a range of 0<K � 1. Here, x n refers the state of the system with x n 2 ð0; 1Þ. When K ¼ 1, then the map demonstrates perfect chaotic behavior in which the output is not periodic, non-convergent and very sensitive to initial value x 0 .

Cubic map
Cubic map is a one-dimensional map that demonstrates chaos and having an iterated equation as in Equation (2).
Here, a refers a control parameter of the map and is limited to 3. If a is bigger than 2.3, then x n values spread from 0 to 1 and occur unpredictably. In this case, the map has pseudo-random output with sufficient uncertainty.

Logistic map
Logistic map is one of the well-known and probably the most frequently used chaotic system in the field where the concept of chaos is utilized. The map is defined by where r refers the control parameter of the map and has a real value satisfying 0<r � 4.When r is between 3.57 and 4, then the map is in chaos state where x n series have chaotic properties showing non periodicity and sensitivity to initial and system parameter.

Designing a hybrid chaotic map
Many of the standard chaotic maps have disadvantages of low level complexity, limited system parameters and small Lyapunov value which shows the degree of sensitivity for a dynamical system (Hathal et al., 2014). These shortcomings negatively affect the system security where such maps are used, as well as the cryptographic usability of the yielded key from the maps.
A chaotic system intended to be used as a key generator in a cryptographic algorithm is expected to generate random sequences with the greatest uncertainty possible. Furthermore, the entropy produced by the chaotic system must provide the necessary confusion and diffusion in the encryption algorithm used. Basically, the unpredictable and random-like behavior of the chaotic systems has contributed to the use of these systems in the design of cryptographic algorithms (Ahmad & Hwang, 2015). In this paper, firstly, a new discrete system with a higher degree of chaos and better complex behavior has been designed for generating encryption keys to be used in the proposed algorithm. This hybrid chaotic model uses two well-known different chaotic maps in a cascade form and is utilized as a key generator in the proposed encryption algorithm. The hybrid map is modeled by coupling Sine and Cubic maps, namely SINCU which is defined in Equation (4).
Now, SINCU has two independent system parameters and an initial value. Furthermore, SINCU has an extra key parameter in its mathematical equation that provides larger key space which leads to improve the security of the encryption algorithm. When considering the sensitivity of the system parameters on output, the more system parameters mean the more different output data. This feature will also help the encryption algorithm against brute-force cryptographic attack. Sine map and Cubic map are effectively coupled together resulting greater complexity that produces more complex behaviors, better randomness and uncertainty. In order to prove the superiority of the hybrid model, Sine map, Cubic map and hybrid one are compared in terms of statistical analysis such as chaotic trajectory, Lyapunov value and uncertainty. To perform performance comparison, the systems parameters for all chaotic maps are selected as K ¼ 1 and a ¼ 3 with the same initial value of x 0 ¼ 0:123.

Chaotic trajectory
Chaotic trajectory can be defined as a behavior movement over time with a specified initial value for a dynamical system. Since the chaotic systems exhibit aperiodic and random behavior, the trajectory of these systems is never in the form of repetitive curve. Thus, chaotic trajectory can be used to determine the degree of randomness for an output sequence of any chaotic system. If a trajectory of a system can cover a large area in phase space, then this system is more complex and shows better randomness. The trajectories in phase space for three chaotic maps are shown in Figure 1. According to the Figure 1 results, it is clear that the trajectory of SINCU map gets larger area than the other two maps. Therefore, SINCU map can produce much better output sequences in terms of randomness.

Lyapunov analysis
Lyapunov value refers to a degree of diverging for very close trajectories in a dynamical system. Hence, Lyapunov value can be used as a measure of a system's sensitivity to changes in its initial condition. It is defined in Equation (5).
λ indicates Lyapunov value and if this value is positive then the system is chaotic. Furthermore, bigger λ describes much more complicated behavior in the system, hence better performance of the chaotic behavior (Moysis et al., 2020). Lyapunov analyses for all chaotic maps are shown in Figure 2.
From the Lyapunov analysis, one can see that the largest Lyapunov values for Sine map is less than 1 and it is 0.6982. The maximum λ for Cubic map is around 1 and its value is 1.0977. On the other hand, the maximum λ for the SINCU map is 2.5729, which is significantly greater that the results of other two maps analysed. Thus, SINCU has better mixing property and chaotic performance than others. Furthermore, Cubic map and Sine map have a finite range of control parameter such as maximum limited value of K ¼ 1 for Sine map and a ¼ 3 for Cubic map. On the other hand, SINCU has an infinite range for its control parameter that leads larger key space as a key generator.

Uncertainty analysis
In this section, the entropy values for all the maps are calculated to perform uncertainty analysis. Information entropy, shortly entropy defines uncertainty of a specified random sequence (Yasser et al., 2020) and it is determined by where pðx i Þ shows the probability of x i . For example, suppose a uniform bitstream as x ¼ f0; 1; 0; 1g with equal probability of '0ʹ and '1ʹ, then the entropy for this sequence is 1, which is the maximum result. Big entropy value indicates uniform distribution and great uncertainty in a sequence as well as resists entropy attacks (N. R. Zhou et al., 2015). In order to perform uncertainty analysis, the output of the all chaotic maps should be converted to serial bitstream containing 0 and 1 values. To do this, Equation (7) Since Logistic map, Cubic map and Sine map have an output of between 0 and 1, threshold level is selected as 0.5 to get sequential chaotic series. On the other hand, SINCU map provides output between −1 and 1 if its control parameter is above 2.598. Hence, threshold level can be 0 for SINCU map to perform the analysis. As a result, the entropy values of the chaotic series from the all chaotic maps with same initial value are calculated and given in Table 1. Number of iteration is selected as 1 million for the uncertainty analysis.

Figure 2. Lyapunov analysis of (a) Cubic map (b) Sine map (c) SINCU map.
According to the entropy results, it is the SINCU map that is closest to 1. This means that SINCU has maximum uncertainty and unpredictability of all maps analyzed. From the all statistical analyses, it can be concluded that the new hybrid chaotic system has a potential to be used as a key generator in the proposed algorithm. Nevertheless, in a good cryptographic algorithm, encryption keys and cipher data are well random. Therefore, randomness degree of the output of the SINCU map must be evaluated before being used in the proposed image encryption algorithm.

Randomness test
Randomness means the lack of predictability or incomprehensible pattern in a sequence of data. NIST (National Institute of Standards and Technology) standard is used to evaluate the degree of randomness of the outputs. NIST consists of fifteen tests (Rukhin et al., 2001) and each test produces a p-value which is a real number in [0, 1]. If p-value is greater than a predefined threshold, called significance level (α ¼ 0:01), then the statistical test is passed successfully and the generator is considered as random with 99% confidence. It is required 1,000,000 bits to perform NIST and the results are given in Table 2. To obtain sequential bit streams, the transformation method in Equation 7 is applied to the SINCU map. According to the results, it can be concluded that SINCU map is quite stochastic and generates sequences which has sufficient randomness. Hence, it can be used as a key generator in the proposed encryption scheme.

The proposed color image encryption scheme
Chaos-based image encryption systems are generally composed of two stages: permutation of pixel positions by confusion process and modification of pixel gray values by diffusion process (Ye, 2011). In traditional chaos-based image cryptosystems, permutation is usually chosen as a first process and then confusion is performed to complete the encryption. In the proposed algorithm, confusion and diffusion stages are carried out one after the other. Both processes are simple and fast so the encryption time will be reduced. To increase the security of the cryptosystem, diffusion step can be iterated several times. However, the numerical results show that the high security and performance of the proposed image encryption algorithm can be achieved even in a single iteration. The architecture of the proposed algorithm is shown in Figure 3.
In the proposed scheme, a plain image can be a gray image or any component of a color image. If the control bit generated from the chaotic logistic system is '1ʹ, the diffusion structure in Algorithm-1 will be used for encryption, otherwise the encryption will continue with Algorithm-2. If the image to be encrypted is in color, then the encryption structure presented in Figure 3 will also be implemented for the three components of the color image. Then, all encrypted components of the image are combined to obtain the ciphered form of the corresponding color image. A 24-bit color image is an image consisting of three layers named Red, Green and Blue, where each pixel value is represented by 8-bit in the range [0,255]. Firstly, the RGB image is separated into Red, Green and Blue components before the encryption. Then each layer of the input image is permutated using matrix scrambling based permutation in confusion stage. In the rest of the section, confusion and diffusion stages are explained in detail.

Confusion stage
In any standard image, adjacent pixels have strong correlation and this correlation needs to significantly reduced or totally broken before the basic encryption. This may contributes much better cipher image at output. In the proposed algorithm, matrix scrambling method is used in the confusion stage to break strong correlations of the all adjacent pixels in the plain image. Here, the plain image defines a source image which is a layer of any color image or it can be a straight gray image. In mathematics, permutation refers the process of changing the linear order of an ordered sequence. In this study, permutation is used as the replacement of all pixel positions to their new positions with a user defined matrix-based algorithm. Thus, all pixel positions in a plain image are changed with permutation and as a result, the strong correlations between all adjacent pixels having close values are effectively broken. In the next section, matrix based scrambling process is discussed in detail.

Matrix-based scrambling
Matrix-based scrambling is a transformation method that can be generalized in Equation (8).
In Equation (8), A is a scrambling matrix with a size of n � n and k is a positive integer that refers scrambling times of the image. All the elements of A are integers such that detðAÞ�0. A matrixbased scrambling transformation can be given in Equation (9).
where ðx n ; y n Þ 2 ½0; N À 1� � ½0; N À 1� is the pixel position of the plain image with N � Nin size and ðx nþ1 ; y nþ1 Þ is the new pixel position for the permutated image. In order to make the scrambling reversible, detðAÞ ¼ a 11 :a 22 À a 12 :a 21 ¼ �1. In this study, A matrix in Equation (10) is used as scrambling operator for the plain image to be permutated.
where p is a positive integer and at all p values, detðAÞ ¼ 1 that makes the scrambling operation reversible. The inverse scrambling matrix is defined in Equation (11).
By choosing a different p value for each component of the Lena image, a completely meaningless permuted image can also be obtained as in Figure 5. Here, p values are used as 10, 15 and 20 for the Red, Green and Blue components, respectively for just one iteration. Table 3 shows the average correlation coefficients results of each layer for all directions as Horizontal (H), Vertical (V) and Diagonal (D) between original "Lena" image and permutated "Lena" image in Figure  5. The average correlation coefficient between adjacent pixels of "Lena" and its permutated is listed in Table 4.
Negative value of correlation means that for two variables, an increase in one of them is associated with a decrease in the other. According to the Tables 3 and 4 results, the strong correlations of adjacent pixels are decreased significantly for all directions. This result confirms an effective permutation has taken place in confusion stage.

Diffusion stage
A color image has three layers as Red, Green and Blue. In the proposed algorithm, different encryption key is used to change permutated pixel value for all components of the color image. This can be achieved by changing the initial value or system parameters of the SINCU map. In each component of a color image, each pixel has a decimal value between 0 and 255. To mix a pixel value with a secret key, the key must be identical data type with the pixel in order to change its value through an algorithm. Hence, Equation (12) is used at the output of SINCU for the key generation.
key ¼ modðroundðx n :10 9 Þ; 256Þ Multiplying the SINCU output by 10 9 will create an precision up to 9 digits for the key. If a small change of initial value or system parameters in SINCU map, then corresponding key is completely changed due to the chaos phenomenon. For instance, Table 5 shows the corelation coefficient value between two different keys generated with a very small initial value in SINCU map.
Table 5 result confirms that the generated encryption key from the SINCU map is highly sensitive to the initial value and system parameters. This also suggests that the encrypted data will be also extremely sensitive to such parameters. Hence, the proposed algorithm will effectively resist differential attacks. In order to increase the strength of the encryption, the proposed algorithm uses two mixing operations depend on the control bit series generated from the chaotic Logistic  map in diffusion stage. In addition, since the initial value of the Logistic map depends on the initial value of the SINCU map and all system parameters as in Equation (13), the small change in these parameters changes the encryption keys as well as the mixing process defined in Equation (14).
According to the Table 1 results, generated control bit series has uniform distribution so the probability of one of these two mixing operation is approximately 50 percent. The length of the bitstream generated is equal to the number of pixels in the plain image. Mixing operations for different control bits are shown in Equation (14).
cðiÞ ¼ kðiÞ � fpðiÞ þ ðcði À 1Þ þ kðiÞÞg mod 256 ; controlbit ¼ 0 1 0 kðiÞ � fpðiÞ À ðcði À 1Þ þ kðiÞÞg mod 256 ; controlbit Here,pðiÞ,cðiÞ,cði À 1Þand kðiÞ represent current plain pixel, output cipher pixel, previous cipher pixel and encryption key, respectively. Modular operation provides the cipher data to the range of [0,255]. Such a mixing operation is very efficient because simple modular arithmetic and logical operations can be performed in high speed. Furthermore, the current cipher pixel depends on the previous one that reflects the diffusion to whole cipher image. In this study, the first cipher value is encoded the first pixel data of the permutated image. However, it can also be used as a secret key parameter for the algorithm. The proposed encryption algorithm has a symmetric structure that means identical key has to be used for decryption process. The decryption is a reverse diffusion algorithm that is defined in Equation (15).

Security and performance analyses
The key space size tells the total number of different keys used in a cryptosystem. To make bruteforce attack infeasible, it should be larger than 2 100 (Fu et al., 2018) for a good encryption algorithm and this criterion is referred to as conditionally secure in cryptology. The computational precision for 64-bit double type gives 53 bits (Fu et al., 2018). In the proposed algorithm, key parameters as x 0 ,K,a,r are floating-point values. Even different matrix scrambling parameters for each layer and number of iteration are ignored, the total number of possible secret key is approximately, which is sufficiently large to resist brute-force attack.

Key sensitivity analysis
Key sensitivity analysis can be examined for two different situations: (i) if slightly different keys are used to encrypt the identical images, then completely different cipher images should be produced; (ii) if a very small difference exists in decryption key, then the cipher image should not be decrypted correctly. For the first case, a test plain image Lena is encrypted with a randomly chosen Key-1 as x 0 ¼ 0:123456; a ¼ 8:987654; K ¼ 0:999888; r ¼ 3:999999 in one iteration.
Then a very small change of one in a million is applied to the one of the parameters while others remain same and then repeats the encryption using the same plain image. Then, correlation coefficients for each component of the corresponding cipher images are computed and compared with other two results in Table 6. Here, Reference-A refers the (Murillo-Escobar et al., 2015) and Reference-B refers the study presented by (Patidar et al., 2011).
For the second case, another test plain image Baboon is encrypted using Key-1. Then the decryption processes are performed with four slightly different keys and Key-1. The visual results are shown in Figure 8.
According to the key sensitivity analyses, it is clear that if a slightly different key is used in decryption process, then the encrypted image could not be decrypted correctly. Hence, the proposed image cryptosystem is quite sensitive to all key parameters.

Histogram analysis
In an encrypted image, equal probability distribution of cipher pixels creates a uniform histogram which is more robust against statistical attacks H. Zhu et al., 2013). Hence, the ideal histogram of an encrypted image should be fairly uniform and very different from that of the plain image. For instance, the histograms of all components of the Tiger image and corresponding cipher one are shown in Figures 9 and 10, respectively. The histogram results show that the cipher image is significantly different from that of the plain image and uniformly distributed over the all possible intensity values.

Mean square error (MSE) and Peak signal-to noise ratio (PSNR) analyses
A cipher image must significantly differ from its original state. Mean square error (MSE) defines the cumulative squared error between original and corresponding cipher images (Ahmad and Hwang, 2016) and it is given by, where P(i, j) is the pixel value of the original image and C (i, j) is the encrypted pixel value at location (i, j) in the cipher mage. The MSE value can be considered as a criterion for the encryption level of a cryptosystem. Larger the MSE value means the better encryption security. PSNR analysis is a method that refers encryption quality level and the greater this value, the closer the encrypted image to the original image (Ahmad and Hwang, 2013). Thus, a smaller PSNR value means better encryption for a cryptosystem. PSNR is defined as in Equation (18).
PSNR ¼ 20:log 10 P max = ffi ffi ffi ffi ffi ffi ffi ffi ffi MSE Here, P max is the maximum value that a pixel can get in a gray image. In a presented scientific study (Norouzi et al., 2013), it was stated that the MSE value should be greater than 9,555 and PSNR value should be smaller than 8.3875 as an encryption security criterion. Different test images with different sizes have been used for MSE and PSNR analyses and the results are listed in Table 7.
The large MSE value obtained from the results proves that there is a significant difference between the plaintext image and the corresponding cipher image. The results show that the effectiveness of the proposed method is evident by bigger MSE values and lower values of PSNR and it also meets the security criterion.

Entropy analysis
Entropy is a measure of uncertainty associated with a random series and determines unpredictability of the series. Generally, the more uncertain or random source is, the more entropy it will contain (H. Zhu et al., 2013). Maximum entropy is achieved in the case of uniform probability distribution. The entropy of an information source with a length of N is determined in Equation (6). Five color test images with different sizes are encrypted using the proposed scheme. Table 8 shows the entropy results of the cipher images.
It is obvious that the entropies of the cipher images are very close to ideal value which means that the proposed encryption algorithm yields high unpredictability at output. Table 8 also shows that as the size of the plain image increases, the entropy value for the corresponding cipher image also increases. Some important analysis of the proposed encryption algorithm has also been compared with AES algorithm, which is frequently used today for data encryption. AES is a symmetric algorithm chosen by the U.S. government to protect classified information and can be implemented in software and hardware throughout the world. Entropy analysis results for both AES in (Arab et al., 2019) and proposed algorithm for three test images with same sizes is given in Table 9. Test images are grayscale images for entropy comparison.
According to the Table 9 results, the proposed algorithm is better at entropy comparison. The entropy results are also compared to a chaos-based color image encryption algorithm, Reference-C of (Fu et al., 2018) that has been recently presented in this field. Entropy results for Reference-C and the proposed scheme are listed in Table 10. The test images (Lena, Baboon and Pepper) used for entropy comparison are 512 × 512 in size.

Correlation analysis
A meaningful image has a property of strong correlation between all adjacent pixels since the adjacent pixels have close values. A good image cipher produces low pixel correlation of adjacent pixels. To evaluate the correlation coefficients for all the pairs of the adjacent pixels, Equation (19) is used for the analysis. cc ¼ ∑ N i¼1 ðx i À x Þ:ðy i À y Þ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi Here, (x , y ) are mean values defined as x ¼ 1 N ∑ N i¼1 x i and y ¼ 1 N ∑ N i¼1 y i . N shows the total number of pairs of adjacent pixels. The results of the correlation coefficients for diagonally adjacent pixels for three test images and their corresponding cipher images are given in Table 11.
It is clear that the proposed scheme significantly reduces the correlation between adjacent pixels of the plain image. Correlation coefficients of adjacent pixels in cipher images for both AES and Reference-C and the proposed algorithm are performed for three images with same size. The result is given in Table 12.   Figure 11 shows the diagonal correlation of the red component of the "Lena" image, where the graph has linear distribution due to the high correlation of adjacent pixels. On the other hand, Figure 11(d) shows correlation distribution of the corresponding component of the cipher image, where the graph has random distribution due to the low correlation. Hence, the proposed algorithm can resist statistical attacks.

Differential attack analysis
If a very small change in any key parameter in the algorithm changes the cipher image significantly, then the algorithm is resistant to differential attacks (Xu et al., 2015). Two common analysis, namely, NPCR (number of pixels change rate) and UACI (unified average changing intensity) are used to test the differential attack analysis. They are defined in Equation (20) and Equation (22), respectively.
where Dði; jÞ is defined as Here, W and H are the width and height of the cipher image and C 1 ,C 2 are the two cipher images corresponding to two plain images with a very small key parameter. NPCR measures how many pixels are different between C 1 and C 2 for the same plain image under a very small key parameter and UACI is used to measure the average intensity of differences between two images. In order resist differential attacks, the ideal values for NPCR and UACI should be 99.6% and 33.4%, respectively (Fu et al., 2012). Lena test image, denoted by P is encrypted to C 1 by the parameters of Key-1 with one iteration of encryption. Then, all system parameters as x 0 ; a; K and r are changed sequentially by one millionth using same plain image and encryption is repeated and results C 2 . The numerical results of NPCR and UACI are listed in Table 13.
It is obvious that both NPCR and UACI values are very close to their ideal values so the proposed scheme is highly sensitive at key parameters and has a good ability against differential attacks even one iteration of encryption. Results for differential attacks analysis of AES and proposed algorithm are given in Table 14.
Comparing NPCR and UACI values of the AES and proposed algorithm, it can be concluded that the security of the proposed algorithm against differential is more than AES one. NPCR and UACI values are also compared with the corresponding results of Reference-C for different iteration values between 1 and 4. In Reference-C, the authors obtained the relevant results by making a very small change in the plain image. The analysis results are listed in Tables 15 and 16.

Encryption and decryption speed analysis
In order to evaluate the running speed of the proposed cryptosystem, enough number of test images is encrypted 10 times by the proposed scheme. Then, the average encryption and

Conclusion
A fast and secure chaos based color image cryptosystem containing a new matrix scrambling method intended for confusion and a changeable encryption structure for diffusion is proposed in this paper. Using a simple but effective matrix scrambling operation in the confusion stage breaks the strong correlation of close pixels very well without iteration which reduces overall encryption time. The behavior of the newly chaotic model meets the requirements for sufficient randomness according to the NIST results and the encryption keys highly sensitive to the system parameters of the new map, hence the proposed algorithm has a good ability against differential attacks even one iteration of encryption. In addition, histogram and correlation coefficient analyses results show that the proposed encryption structure is resistant to statistical attacks. The results of NPCR and UACI show that the proposed encryption scheme takes only one round of iteration to achieve sufficient diffusion effect. Both theoretical and simulation results are satisfactory when compared with standard AES algorithm. Important security analyses have been carried out in detail to evaluate security level of the proposed algorithm and it is also concluded that the proposed scheme is highly secure thanks to its large key space, high sensitivity to the encryption keys. The practical usage of the proposed algorithm with the developed chaotic map is possible direction for future works.

Funding
The author received no direct funding for this research.