A novel colour image encryption based on fractional order Lorenz system

A colour image encryption algorithm based on fractional Lorenz system has been developed in this paper. Firstly, the colour image has been divided into three layers: R, G, and B, and Arnold map has been used for scrambling the three layers separately, and the plaintext pixel has been selected as the scrambling parameter. The Tent map has been used to associate the plain text to generate the initial values of the fractional Lorenz system, which has been iterated by the system to generate a pseudo-random sequence that can be used for two pixel diffusions. The first pixel diffusion is to diffuse the pixels of each layer to the other two layers, and the second pixel diffusion is to add modulus diffusion inside the layer. Simulation results illustrate that the plaintext image is encrypted into a meaningless noise image. The superior performance of proposed algorithm has been proved by the key space analysis, histogram analysis, correlation test, sensitivity analysis and information entropy analysis, and it can resist various common attack methods.


Introduction
In recent years, with the continuous development of science and technology, information communication methods and transmission channels are also increasingly rich, information security has become an important issue. But image information, as a kind of special data, are transmitted through the Internet in the form of plaintext, and its security needs to be solved urgently. In order to prevent the image information from being stolen, tampered and intercepted during transmission, it is necessary to encrypt it to a certain extent. At present, the common data encryption algorithms include symmetric algorithms such as AES, DES and asymmetric algorithms such as RSA. The commonly used encryption protocol in the Internet is TLS, which is used in the HTTPS communication protocol. These algorithms are widely used, but the image information is a kind of information with large amount of data, strong correlation and high redundancy. It is necessary to design a targeted encryption algorithm based on these characteristics of the image information.
Chaotic systems are characterized by unpredictability, pseudo-randomness and sensitivity to initial conditions, so they have unique advantages in generating pseudorandom sequences and transforming images (Simin et al., 2013). Since J. Fridrich proposed the image cryptography system for chaotic systems in 1998 (Jiri, 1998), in the application of chaotic systems to image encryption, the CONTACT Yongjin Yu yaydjto@163.com pseudo-random sequence generated by chaotic systems has become the mainstream of chaotic system encryption. When chaotic image encryption algorithm into the mature period, plaintext correlation encryption algorithm had become the focus of work. For example, Zhang W et al proposed an encryption algorithm that optimized the diffusion process with associating plaintext image, so that different ciphers can be generated when the same key was used to encrypt different images (Zhang et al., 2013). Zhang Y et al proposed a plaintext associated two-level key chaotic image encryption algorithm. Different chaotic sequences can be generated for different plaintext images, but the algorithm is too complex to influence encryption efficiency (Zhang Yong, 2016b;Zhang, 2014;Zhang et al., 2012). In recent years, colour image has become a mainstream research object. For example, a colour image encryption algorithm based on 'scrambling-diffusing-scrambling' was proposed by Liu et al. (2016) and Niyat et al. (2017), which divided the colour image into different layers and generates different encryption sequences for encryption respectively. Nowadays, more and more scholars have applied DNA coding to image encryption algorithms. Both Guesmi et al. (2016) and Jiyun and Hao (2018) proposed using dynamic DNA coding to scramble images. And a fast image encryption scheme with block permutation and block diffusion was introduced in 2017 ( Chai et al., 2017). In 2019, a novel chaotic image encryption algorithm based on a contentsensitive dynamic function switching mechanism was proposed by Yavuz (2019). However, this method does not carry out diffusion or scrambling between layers, so it is at risk of suffering from chosen-plaintext attack. With the development of nonlinear theory, fractional order chaotic systems have become a research hotspot due to their rich dynamic characteristics. In fact, fractional order systems can better describe natural phenomena than integer orders systems (Kehui, 2015). Therefore, it is of great practical significance to design an image encryption algorithm using fractional order chaotic system.
In this essay, a plaintext related colour image encryption algorithm based on fractional order chaotic system was proposed. Firstly, the plaintext image was expanded into a one-dimensional vector from top to bottom and from left to right. The Tent map was used to select the plaintext pixel points to generate chaotic sequence as the initial value of the fractional order Lorenz system. Then, the colour plain image was divided into three layers of RGB. R layer was scrambled by Arnold map. G layer was scrambled by Arnold map which its parameters was determined by the scrambled R layer. And the B layer was operated with the same way. Aiming at the insufficient diffusion in (Liu et al., 2016) and (Niyat et al., 2017), the chaotic sequence generated by the fractional Lorenz system was converted into a password for diffusion. In the diffusion process, the RGB three layers were cross-diffused so that the information of this layer was diffused to the other two layers. After that, the RGB layer was diffused twice to spread the information of each pixel to other pixels. Encrypted with the simulation experiment and result analysis, the plaintext image had been encrypted by the algorithm adequately, There was no useful information can be obtained from cipher text images. Finally, our algorithm was proved to resist various common attack means and have high security through analyzing the key space, histogram, correlation coefficient and NPCR, UACI.
The rest of this paper is organized as follows. Section 2 introduces three chaotic systems, and characters of the fractional order Lorenz system are analyzed. A colour image encryption algorithm based on fractional Lorenz system is developed in section3. Section4 carries on the simulation that the plaintext image is encrypted and dencrypted with error key. The encryption effect of our algorithm is analyzed in section5. Finally, conclusions drawn from the study are given in the section6.

Arnold map
Arnold map, also called cat map is a nonlinear 2D map, the Arnold map is defined as where a and b are real numbers, x n , y n ∈ [0, 1). Arnold map is often used in scrambling process of image encryption, in which x n , y n represents pixel position of original image, x n+1 , y n+1 represents pixel position of scrambled image. But the generalized Arnold map is not efficient, so an optimized Arnold mapp scrambling method is introduced (Zhang Yong, 2016a).
In this way, the position of pixel (1,j) and pixel (1,q) can be exchanged.

Tent map
The Tent map is defined as where, x n ∈ (0, 1), when 1 < a < 2, the system is chaos. The bifurcation diagram of the Tent map is shown in Figure 1.

Fractional order Lorenz system
The fractional order Lorenz system is defined as Where a, b, c and d are system parameters, α, β, γ are fractional order, a = 40, b = 3, c = 10, d = 25, α = β = γ = 0.95. Figure 2 shows the 3d phase diagram of the fractional order Lorenz system. At this time, the lyapunov exponent of the system is 0.4515. The fractional Lorenz system is chaotic.

Complexity analysis
Complexity analysis is a commonly used method for the analysis of chaotic systems. It can quantitatively measure the dynamic characteristics of the system, and has the same effect as Lyapunov exponent, bifurcation diagram, dissipation character, phase diagram observation and other methods. The SE (spectral entropy) complexity and C0 complexity were analyzed for the fractional order Lorenz system. Figure 3 shows the result of complexity analysis.
As shown in Figure 3, the SE complexity develops steadily with the increase of q, while the C0 complexity soon reaches a high point and gradually decreases. Figure 3 shows that the fractional order Lorenz system has higher complexity than the integer order Lorenz system.

Autocorrelation analysis
In this essay, autocorrelation analysis was carried out for sequences generated by integer order and fractional order Lorenz system respectively, and the results are shown in Figure 4. As can be seen from Figure 4, the amplitude of autocorrelation analysis of the fractional order Lorenz system is smaller and more concentrated around 0, and the z-sequence correlation is greatly reduced compareing with the integer Lorenz system. Therefore, the pseudo-randomness of the sequence generated by the fractional order Lorenz system is better.  Based on the above dynamic analysis of the fractional order Lorenz system, it can be seen that the fractional order Lorenz system has high complexity, and the chaotic sequence generated by the fractional order Lorenz system has better pseudo-randomness than the integer Lorenz system, which is more suitable for the design of image encryption algorithm.

Fractional order Lorenz image encryption algorithm
Combining the above three chaotic systems, a new colour image encryption algorithm based on fractional order chaotic systems was proposed in this paper. Firstly, the colour plaintext image was divided into three layers R,G and B. In the scrambling stage, three layers were scrambled with Arnold map, among which the initial value of the first scrambling Arnold map was from the key, and the initial value of the other two scrambling are from the R and G layers after scrambling. In the plaintext selection stage, the Tent map was iterated to obtain two sets of state values, which were used to locate the plaintext pixel position. The RGB gray value of this pixel is moulded and then used as the initial value of the fractional Lorenz system. In the diffusion stage, a part of the pseudorandom sequence generated by fractional Lorenz system was used to cross-diffuse the three layers of RGB. Then add-mode diffusion was been done in each layer. Finally the encrypted image was obtained. The plaintext image is denoted as A, the pixel matrix size is M × N × 3, and the encryption process is shown in Figure 5.
The specific encryption steps are as: Step 1: Enter the plaintext image P and the key K, and assume the size of A is M × N × 3. Read the initial value and parameters of Aronld map in K, then use Aronld map to scramble the plaintext image R layer. Expand the R layer into a one-dimensional vector. The diffusion process used the method introduced in section 2.1.
Select the last two pixels of R layer after scrambling, and take its gray value as the parameter of Arnold map when scrambling G layer, and use the same operation to scrambling B layer to get image P 1 .
Step 2: Read the initial value of the Tent map x t (0) from the key K. The Tent map is iterated 800 times, and the first 300 transition states were discarded, and taking the state value of the next 200,300,400,500 iterations which marked as K t Step 3: Use the formula (7) to make the K t into a coordinate s 1 and s 2 which used for positioning the pixels in P 1 . And read its RGB values as the second key K a used as the initial value of fractional order Lorenz system. Adomian algorithm is used to solve fractional order Lorenz system to generate chaotic sequence and abandon the first 500 transition state. The fractional Lorenz system is iterated MN times and 2MN times respectively, tiny perturbation of system every 3000 times to get the size of 3 × MN and 3 × 2MN of the original pseudo random sequence S 1 and S 2 that are trainsformed by formula (8) to password K 1 and Step 4: Aim at the problem of insufficient diffusion in (Liu et al., 2016;Niyat et al., 2017) and vulnerability to chosen-plaintext attack, our algorithm does the following processing in this step: Use the password K 1 to spread the information between the layers of the image. The specific calculation method is shown in equation (10): Where, the r (i), g (i), b (i) are the pixel values after diffuse for the first time. After pixel diffusion between layers, the plaintext information of each layer is diffused to the other two layers. This step can enhance the algorithm's ability to resist the chosen-plaintext attack. The password K 2 is used for the information diffusion inside the each layers, and the forward and backward diffusion is calculated according to formula (11) and (12) respectively: Forward diffusion: Backward diffusion: i = 1, 2, · · · , m j = 2m, 2m − 1, · · · , m + 1 That's the final ciphertext image C. The decryption process is the inverse operation of the encryption process of this algorithm.

Simulation results
All experiments of this algorithm were carried out in Matlab R 2014 a environment. Matlab was used on a computer with Intel Core i5, 2.40 GHz CPU, 8GB of memory and 250 GB of SSD with Windows 10. The experimental image of this algorithm was standard 512 × 512 Lena colour images. The key was set as [X t , p, a, b, X a , Y a , q], Where, X t , X a , Y a were the initial values of the Tent map and Aronld map, p was the parameter of the Tent map, a and b were the parameters of the Aronld map, and q was the fractional order of the fractional Lorenz system. The encrypted image with key [0.23,0.85,3,5,1,1,0.995] is shown in Figure 6.
It can be seen from Figure 6 that the Lena image encrypted by our algorithm can no longer show the original image and is distributed evenly without special texture. Therefore, this algorithm can protect the original image well and has a good application prospect in image encryption.

Key space
The size of key space has an important reference value for judging the result of encryption algorithms. Encryption algorithms with a large enough key space can well resist various violent attacks such as exhaustive attacks (Kehui, 2015). When the key changed a small amount, the decrypted image is completely different. For the image encryption algorithm is proposed in this article, according to the set of section3 for [X t , p, a, b, X a , Y a , q], in which the scope of X t , p, X a , Y a are in (0, 1), the step length of X t , X a and Y a is 10 −14, the step length of p is 10 −13 . The parameters a and b can theoretically take any real number, and the order of magnitude is 10 10 in consideration of calculation accuracy and algorithm running speed. If q uses double precision parameter, its precision magnitude can be set as 10 −14 .  In conclusion, the key space size of the whole algorithm is 10 84 . When the key space of an encryption algorithm is greater than 2 128 , the algorithm is considered safe (Ye & Huang, 2017), while the key space of the algorithm designed in this essay reaches 10 84 ≈ 2 279 , which is far greater than the theoretical security value. In addition, in this algorithm, the key image with the size of M × N is used for encryption. The space size is 2 8 × MN, and the key space is greatly increased. Therefore, this algorithm can effectively resist exhaustive attack. Compare with other literatures is shown in Table 1.

Speed performance analysis
The evaluation of an encryption algorithm not only includes security and effectiveness, but the efficiency of the algorithm is also important. Since our algorithm have used an improved Arnold map, there was no need for multiple cycles to scramble the image, which greatly improved computational efficiency. By comprehensively considering the diffusion process, the average time complexity of this algorithm is O(n). In this article, we have encrypted images of different sizes, and recorded the running time. The results of comparison with other algorithms are shown in Table 2.

Correlation analysis of adjacent pixels
The correlation of adjacent pixels in the image reflects the diffusion degree of the image pixels. The adjacent pixels in the plaintext image have a strong correlation while the adjacent pixels in the effectively encrypted image have no correlation (Zhang Yong, 2016a). As shown in Figure 7, layer R was taken as an example. Figure a, c and e are the adjacent correlation of the plaintext layer R while b, d, f are the correlation of the adjacent ciphertext layer R.    Guobo and Zhaoxi (2019) 0.0056 0.0100 0.0246 Guesmi et al. (2016) 0.0265 0.0792 0.0625 Yongju and Shijie (2020) 0.0080 0.0059 0.0051 Yao et al. (2017) 0.0373 0.0228 −0.0221 It can be seen that the pixel points of plaintext image have a strong correlation in all directions when they are concentrated near the line y = x, while ciphertext image has no correlation in all directions. At the same time, the correlation coefficient can be calculated to intuitively compare the correlation (Zhang et al., 2012) as Table 3. The correlation coefficient of the image tends to 1 before encryption and 0 after encryption. Compared with the encryption results in another literatures (Guesmi et al., 2016;Guobo & Zhaoxi, 2019), except for the slightly lower diagonal correlation in literature (Yongju & Shijie, 2020), the image correlation encrypted by our algorithm is lower.

The histogram analysis
Histogram is a statistical chart representing the gray distribution of an image, and counts the occurrence times of each gray value (Hong et al., 2013). When the histogram of an image has obvious distribution characteristics, it is easier to obtain information in the image, while the image with messy and evenly distributed histogram is less likely to show any valuable information (Zhang Yong, 2016a). Therefore, histogram analysis can be used as a criterion for evaluating encryption algorithms. It is the comparison between plaintext image and ciphertext image histogram shown in Figure 8. Figure a, c and e are the histogram of plaintext image, while b,d and f are the histogram of ciphertext image. It can be seen that the encrypted histogram no longer has obvious characteristics, and the number of pixel values differs very little, which qualitatively indicates that the encrypted image by the algorithm in this paper has a uniform diffusion of pixel values.
One side hypothesis test was carried out to measure the distribution of the histogram, as Table 4.
In the data obtained after one side hypothesis test, the chi-square statistics of the three layers were all smaller   (255), so it can be considered that the ciphertext images are evenly distributed (Zhang Yong, 2016a). It shows that our algorithm can resist statistical attack effectively.

Statistical randomness analysis
The randomness of the algorithm is very important to the password generator and ciphertext, and it affects the algorithm's ability to resist statistical attacks. This article uses the randomness detection kit provided by the National Bureau of Technology and Standards to conduct statistical randomness analysis of the algorithm in this article. In order to accept the randomness of the bit sequence, it is hoped that the significance level p of each test is above 0.01. The analysis results are shown in Table 5.

Ability of resisting differential attacks
In order to measure the sensitivity of image encryption algorithm, two indexes NPCR and UACI have been proposed. NPCR and UACI describe the ability of image encryption system against differential attack Mao et al., 2004). They are defined as: suppose that the plaintext image A 1 and A 2 are identical except that the  , j) is different of 1, the plaintext image A 1 and A 2 are encrypted by the same image cryptography system and the same key. C 1 and C 2 are the cipertext image encrypted from A 1 and A 2 , define, (15) The expected values of NPCR and UACI were 99.6094% and 33.4635%, respectively.
The experimental method in this paper was that change one pixel value of image A or key value to obtain two different plaintext image A 1 and A 2 . Obtain the cipertext image C 1 and C 2 by encrypting A 1 and A 2 . The change value of the keys were shown in eq (16). The UACI and NPCR of C 1 and C 2 were calculated. Repeat this step 50 times. ⎧ It can be seen from Tables 6-8, that the values of NPCR and UACI are close to ideal values, which proves that the algorithm has high plaintext and key sensitivity. Compared with literature (Guesmi et al., 2016;Guobo & Zhaoxi, 2019;Niyat et al., 2017), the algorithm in this essay has stronger plaintext sensitivity and can resist differential attack more effectively. Generally, higher NPCR and UACI scores represent higher resistance to differential attacks. However, for different images or images of different sizes, NPCR and UACI  have different scoring standards. Therefore, simply calculating the values of NPCR and UACI is not very good. Explain the performance of the algorithm. Yue Wu in [Wu et al., 2011], the expectations, variance and hypothesis tests of NPCR and UACI (randomness test) were derived to measure whether the algorithm really has a high resistance to differential attacks. According to the formula (16)-(19), we have tested three sizes and three pictures of each. If the NCPR score of the encrypted image is abov N * α , it can be considered a truly random image. If the UACI score of the encrypted image is between U * − α and U * + α , it prove that the image has passed the UACI test. The results are shown as Tables 9 and 10, all the images passed the test. In summary, the algorithm proposed in this paper can effectively resist differential attacks.
where F is the largest supported pixel value compatible with the ciphertext image format. M and N are the size of the image. −1 is the inverse of CDF of the standard Normal distribution N (0,1).

Information entropy analysis
Information entropy can be regarded as the probability of occurrence of discrete random events in mathematics (Fengming & Li, 2015). The larger the information entropy of an image, the higher the degree of confusion of the image, the less information it shows. Information entropy is defined by the formula (20), Where, H(P) denotes the information entropy of an information aource P, P(m i ) is the probability of symbol m i and the entropy is presented in bits.
For an encrypted 8-bit gray-scale image, its ideal entropy value is 8. The information entropy of the algorithm in this paper and other algorithms encrypted colour 512 × 512 Lena image is shown in Table 11.
It can be seen from the Table 11 that the information entropy of the Lena image encrypted by our algorithm is very close to the ideal value of 8, which proves that the image is very chaotic on the global level.
We used (k, T B )-local entropy test to measure the local randomness of the image, and combine different images to verify the effectiveness of the algorithm. The definition of local entropy was: for an image P, select k non-overlapping image blocks S 1 , S 2 , · · · S k , a total of T B pixels, and the calculation formula for local entropy is as follows,H Where S is the non-overlapping pixel block in the test image. H(S i ) is the information entropy of the pixel block. We set the parameter (k, T B ) = (30, 1936) and the significance level alpha = 0.05, then the ideal local entropy is 7.902469317 (Wu et al., 2013). If the local entropy of the  test image is between (7.901901305, 7.903037329), we think it has passed the test. As shown in Table 12, the local entropy of the ciphertext image is all greater than 7.9 and the test proves that our algorithm is safe and has the ability to resist entropy attacks.

Cut and tamper attack test
During the transmission of the ciphertext image, the attacker will cut and tamper with the ciphertext image, which will affect the decrypted image. In this paper, we cut 100 * 100 area of the ciphertext image and decrypt it. And add 2% salt and pepper noise to the ciphertext image and decrypt it. The results is shown in Figure 9. From the experimental results, the cut and tampered images can still reflect the original information after being revealed, which proves that our algorithm has a good ability to resist cut and tampering attacks.

Conclusion
In this paper, we have proposed a novel colour image encryption algorithm based on fractional order Lorenz system. In our algorithm, the colour image was divided into three layers and scrambled respectively, and the three scrambled images were not repeated by selecting clear pixels. Secondly, our algorithm conducted pixel diffusion twice. The first time, the information diffusion was carried out between layers, and the second time, the inside of each layer was add-mode diffusion twice. The pixel values were uniformly distributed at different positions of different layers. In addition, two plaintext associations were made in the algorithm. The Tent map was used to control the initial iteration values of fractional Lorenz system, which greatly improved the algorithm's ability to resist plaintext attack and known plaintext attack. Simulation results and analysis show that the key space of our algorithm is large enough, ciphertext correlation and plaintext sensitivity are close to theoretical values, and it can effectively resist exhaustive attack, differential attack, entropy attack and other attack methods.

Disclosure statement
No potential conflict of interest was reported by the author(s).