A New Image Encryption Scheme Based on a Novel One-Dimensional Chaotic System

This article introduces a novel one-dimensional sine chaotic system (1DSCS) with large parameter interval. The evaluation of 1DSCS indicates that the system has good chaotic characteristics and large parameters space. Based on 1DSCS, a new image encryption scheme is proposed. First, the image is scrambled by the row and column indexes, and then scrambled by the dynamic parameters Arnold map. This scheme avoids the inadequacy of row-column index scrambling and the periodicity of Arnold map. Second, four highly sensitive dynamic diffusion formulas related to plaintext are designed, and the dynamic formulas are selected through the chaotic sequence generated by 1DSCS. Third, the scheme proposed in this article can also be applied to color image encryption. The experimental results demonstrate that the 1DSCS system is suitable for image encryption and the encryption scheme has good security to resist common attacks.


I. INTRODUCTION
The era of big data has come, and the transmission rate of information and communication has developed rapidly. Compared with text, image is gradually becoming the most important information carrier of daily information transmission because of its rich information. Image has been involved in the daily chat of personal privacy, military information, medicine, high technology and other key areas. With the further influence of image in various fields of society, it is extremely important for us to ensure the information security of image [1]- [3].
With the development of chaos theory, more and more scholars apply chaos to image encryption [4]- [7]. The chaotic system is sensitive to its parameters and initial values. The chaotic sequence generated by the chaotic system has ergodicity, non-convergence and pseudo-randomness. These characteristics can effectively improve the information security of image encryption system [8], [9]. Therefore, many image encryption algorithms based on chaotic system have been proposed [10], [11]. Because one-dimensional The associate editor coordinating the review of this manuscript and approving it for publication was Yizhang Jiang . chaotic system is easy to realize, a variety of image encryption schemes are designed based on one-dimensional chaotic system. Ye and Huang [12] introduced a self-adaptive image encryption algorithm based on an intertwining logistic map. Belazi and El-Latif [13] applied the sine map to enhance the image encryption algorithm. However, one-dimensional chaotic system has the defects of short period, small parameter ranges and unequal distribution of chaotic sequence. To solve those problems, some scholars proposed new onedimensional chaotic systems. Zhou et al. [14] applied a new one-dimensional chaotic system based on seed map, which extends the system parameter range to [0,4]. Patro et al. [15] proposed PWLCM system, which avoid the weakness of using a single chaotic map. In this article, a novel onedimensional sine large parameter interval chaotic system is designed. It is controlled by two parameters. The system analysis shows that the two parameters have a wide range of values. Compared with other 1D chaotic systems, 1DSCS has better chaotic behavior. We apply 1DSCS to generate chaotic sequence and propose a new image encryption scheme based on 1DSCS.
At present, the mainstream image encryption algorithm is composed of scrambling and diffusion [16]- [20]. Common VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ scrambling algorithms include magic square transformation, Arnold map, row-column index scrambling, etc. Although these methods have good scrambling effect, they also have their own shortcomings. Arnold map and magic square transformation have periodicity, which means that the image will return to the original image after a certain number of transformations. For row-column index scrambling, row and column indexes are used as scrambling units. Although the method is fast, each column is indexed with repeated row index, which makes the scrambling insufficient. In order to solve these problems, a scrambling algorithm is proposed in this article. This algorithm makes Arnold parameters dynamic and combines Arnold map with row-column index scrambling. In the diffusion stage, we proposed a remainder selection diffusion method, which selects the dynamic diffusion formula by taking the residual of the chaotic sequence generated. The remaining structure of this article is as follows. The second chapter introduces the 1D chaotic systems, Arnold map and 1DSCS system. The third chapter presents the image encryption steps based on 1DSCS chaotic system. The fourth chapter shows the simulation results and the various tests results of the encryption algorithm. The simulation results and test results of color image are shown in the fifth chapter. Finally, the conclusion is in the sixth chapter.

II. RELATED WORK
This chapter introduces the proposed chaotic system and related analysis.

A. LOGISTIC MAP
Logistic map is a very classical one-dimensional chaotic system, which was used to present the changes of biological population [21]. In recent years, because of its simple structure and unpredictable iterative behavior, it is often used in the field of cryptography to improve the security of encryption [22]. The mathematical definition of Logistic map can be expressed as follow: where λ is the control parameter, x n is the output chaotic sequence. The bifurcation of Logistic map is shown in Fig. 1(a). We can see from Fig. 1(a) that when λ ∈ (0.87, 1], the range of x n is (0, 1). This means that the chaotic system has a good chaotic behavior.

B. SINE MAP
Sine map is also a 1D chaotic system with simple structure but very complex unpredictability. The definition of sine map can be expressed as follow: where x n ∈ (0, 1), when the control parameter γ ∈ (0.87, 1]. Fig. 1(b) shows the bifurcation of Sine map. As shown in Fig. 1(b), sine map has many similar characteristics with logistic map.
The range of parameter µ that makes 1DSCS in chaotic state will change with the value of parameter λ. After many experiments, we found that 1DSCS has stable and good chaotic behavior when the control parameter λ ∈ (0, +∞) and µ ∈ (4, +∞). 1DSCS was designed based on Sine map. Moreover, the use of two parameters gives the 1DSCS better chaotic characteristics. When the initial value x 0 ∈ (0, 1), the x n generated by 1DSCS iteration is uniformly distributed in [0, 1].

D. 1DSCS BIFURCATION DIAGRAM
Theoretically, the trajectory of a good chaotic system is random and non-adjacent [23]. After the parameters and initial values are determined, the chaotic sequence generated by the system iteration is distributed uniformly in the form of pseudo-random. To observe the 1DSCS dynamic behavior, the bifurcation diagrams of 1DSCS are given in Fig. 2.  bifurcation of 1DSCS when λ = 0.2807. We can find that when the output of the 1DSCS exhibits chaotic behavior with the increase of the parameter µ. As can be seen from Fig. 1, in the chaotic state, the range of both sine map and logistic map are narrow. Compared with sine map and logistic map, the track distribution of 1DSCS covers most of the intervals.

E. LYAPUNOV EXPONENTS OF 1DSCS
Chaotic systems have initial value sensitivity, which means that small changes in the input value will cause unpredictable changes in the output value. The Lyapunov exponent (LE) is an important index to evaluate the nonlinear dynamic behavior of chaotic systems [24]. LE can reflect the separation degree of adjacent orbits with time, which can effectively indicate whether there is chaotic behavior in the system. In this section the LE is used to evaluate the sensitivity of chaotic system. The formula for calculating LE is as follow: where g(x i ) is the chaotic system. A negative LE value indicates that the system is contracting on this timeline. A positive LE value indicates that the system is constantly expanding and folding on this timeline. Therefore, the system has good chaotic behavior when the value of LE is positive. Fig. 3 shows the LE results of 1DSCS and different maps. We noticed that 1DSCS has larger exponents than sine map and logistic map in Fig. 3(a). As shown in Fig. 3(b), all the values of LE are positive and become larger as the value of λ increases when µ = 5. We can infer that when the parameter λ is in the range of [0, +∞), 1DSCS has chaotic behavior. Fig. 3

F. SHANNON ENTROPY
Shannon entropy (SE) reflects the chaotic degree of the sequence generated by chaotic system [25]. The more ordered the chaotic sequence generated by the system, the lower SE it has. Conversely, the higher the value of SE, the more disorderly the chaotic sequence generated by the system. Fig. 4 depicts the SE value of the proposed 1DSCS and compares it with the classic chaotic system Logistic and Sine's SE. It can be seen from Fig. 4 that 1DSCS has larger and more stable SE values than logistic and sine systems. We can conclude that 1DSCS has better ergodicity and randomness.

G. ARNOLD MAP
Arnold map can make the image continuously pull and fold, so the image can hide the image information well [26]. However, the periodicity of Arnold map makes the image return to its original state after a certain number of transformations. Arnold map is defined as follow: where M is the side length of the image. The p and q are the control parameters of Arnold map. The following formula is the inverse transformation of Arnold map:

III. 1-DSCS-BASED ENCRYPTION ALGORITHM
In this chapter, an image encryption algorithm based on 1DSCS is introduced. In the scrambling stage, a method of VOLUME 8, 2020  combining row-column sorting index and Arnold map is proposed. The method of selecting dynamic diffusion formula based on remainder is proposed in the diffusion stage.

A. SECRET KEY GENERATION
The secret key is divided into two parts: the first part K 1 is generated by SHA-512, and the second part K 2 is user-defined key. The steps to generate K 1 are as follows: Step 1: Convert the plain image P to a hexadecimal string by SHA-512.
Step 2: Convert the hexadecimal string to a binary array, then convert the first 504 digits of the array to 12 decimals.
Step 3: Take the average of every 4 decimals as k 1 , k 2 , k 3 . K 1 is composed of k 1 , k 2 , and k 3 . And K 2 is composed of k 4 , k 5 . Refer to the range of 1DSCS system parameters, k 4 can be taken in [4, +∞), k 5 can be taken in [0, +∞). The parameters and initial values required for the encryption process are generated according to the following formula: B. SCRAMBLING ALGORITHM In scrambling stage, there are two scrambling operations. The first scrambling is performed by the row-column index.
And the second scrambling is performed by Arnold map. The specific scrambling steps are as follows: For the plain image P of size M × M to be encrypted, the specific scrambling algorithm is as follow. In particular, if the image P does not satisfy M × M , it needs to reach this scale by filling 0.

1) FIRST SCRAMBLING OPERATIONS
Step 1: Iterate 1DSCS 2 × M times to generate two sequences r 1 and r 2 with size of 1 × M . The parameters and initial values of 1DSCS are given in (7).
Step 2: Build two two-dimensional arrays H 1 and H 2 with 2-row and M -column. The first row of both two arrays is set to 1, 2, 3. . . M . and put the two sequences r 1 and r 2 into the second row of the two arrays H 1 and H 2 separately. When sorting H 1 and H 2 according to the second row, the positions of the elements of the first row will change. Then, separately take the first row of H 1 and H 2 as the row index S 1 and column index S 2 .
Step 3: Use the following formula to get the first scrambled image P 1 : 2) SECOND SCRAMBLING OPERATIONS Step 1: Continue to iterate 1DSCS 40 times to get the sequence E. In (5), the parameters of Arnold map include p and q, define the parameters p and q as: 174466 VOLUME 8, 2020 Step 2: Do Arnold map on P 1 of 20 rounds, and then the scrambled image P 2 is generated.

C. DIFFUSION ALGORITHM
In diffusion stage, the dynamic diffusion formula is selected by the modulus of chaotic sequence. Compared with the diffusion algorithm with only one formula, the diffusion algorithm proposed in this article is more complicated and difficult to crack. Use the following steps to complete the diffusion of the image: Step 1: Convert the scrambled image P 2 to a onedimensional array R. Iterate 1DSCS system to construct a sequence D with size of M × M , the initial value is set to E (40). Perform the following operations: T = floor(R × 10 10 ) mod 256.
Step 2: Use the following operation to get the diffusion sequence c.
Step 3: Convert the sequence c into matrix C with size of M × M .
Finally, the encrypted image C is obtained. Fig. 5 is a flow chart that more intuitively describes the steps of image encryption.

D. DECRYPTION ALGORITHM
For a known secret key K , since the decryption process is the inverse of the encryption process, the generation steps of F, T , G, E, S 1 , S 2 are the same as the encryption process. The other specific steps are as follows: Step 1: Convert the encrypted image C to a onedimensional array c. Use the following formulas to get the sequence R: Step 2: Convert R into matrix P 2 with size of M ×M . Do the inverse transformation of Arnold map on P 1 of 20 rounds. The parameters of p and q are shown in (9).
Step 3: Use the following formula to get the plain image P:

IV. PERFORMANCE ANALYSIS OF GRAY IMAGES
In this chapter, the effect and security of the encryption algorithm are tested in various aspects through gray-scale images VOLUME 8, 2020

A. SIMULATION RESULTS
A good image encryption method can well hide the information contained in the original image [27]. The grayscale images of Lena, Pepper and Black-white with size of 512 × 512 are used to test the simulation experiments of encryption and decryption algorithms. The simulation results are shown in Fig. 6. It can be seen from Fig. 6 that the encrypted image cannot see any information of the original image.

B. KEY SPACE ANALYSIS
The size of secret key space is one of the important factors that affect the security of encryption. The secret key of the algorithm proposed in this article consists of two parts. K 1 is converted from 504-bit binary, and its space size is 2 504 . K 2 is a user-defined value, theoretically its spatial range is infinite.
The key space of both K 1 and K 2 can resist violent attacks.

C. KEY SENSITIVITY ANALYSIS
In order to resist violent attacks, encryption algorithm should be sensitive to secret key. This means that the decrypted image cannot obtain any useful information of the original image through the wrong key. In this article, the secret key K is composed of k 1 , k 2 , k 3 , k 4 , and k 5 . In this test, secret key K is used to encrypt image Pepper-512, where k 1 = 0.4774, k 2 = 0.5890, k 3 = 0.2667, k 4 = 14.14447, k 5 = 13.34587. The correct original image P can be obtained through the correct key K (shown in Fig. 7(a)). Add 10 −13 to k 1 , k 2 , k 3 , k 4 , and k 5 of K respectively to obtain secret keys K 1 , K 2 , K 3 , K 4 , and K 5 . Using K 1 , K 2 , K 3 , K 4 , and K 5 to decrypt the encrypted image cannot get the correct image (shown in Figs. 7(b)-(f)).

D. HISTOGRAM ANALYSIS
The histogram can reflect the distribution characteristics of an image pixel value. Finding useful information from the distribution of pixel values is often used as a means of knowncipher attacks. Therefore, the histogram of the ciphered image should be evenly distributed so that the information of the original image cannot be displayed. The Lena's, Pepper's and Finger's histograms of plain image and its ciphered images are shown in Fig. 8. As Fig. 8(b), Fig. 8(c) and    Fig. 8(a) and Fig. 8(d)). This indicates that it is difficult for attackers to obtain useful information by statistical analysis. We further perform histogram analysis of variance and Chi-square test (χ 2 test) on grayscale images of different sizes. Variance is a quantitative analysis of the histogram and is calculated by the following formula [28]- [30]: where y i is the number of pixels whose pixel value equals i and y j is the number of pixels whose pixel value equals j; Y is a one-dimensional array that records the number of  occurrences of each pixel value; var(Y ) is the variance of Y . The low var(Y ) indicates that the pixel value distribution of gray image is highly uniform. χ 2 test can be used to detect whether the pixel value distribution of the encrypted image is uniform. χ 2 can be calculated by using (19).
In (19), f i represents the number of statistics of pixel value i in the image and f 0 = (M × N ) 256. Here, M × N is the size of the image. In theory, if the value of χ 2 is larger, the pixel distribution is more uneven, and the image contains more information. Generally, when the significant level is α = 0.05, χ 2 0.05 = 293.24783. When the significant level is α = 0.01, χ 2 0.01 = 310.457 [28]. Table 1 shows the histogram variance of different size images from USC-SIPI database. It also shows the comparison between the proposed scheme and other schemes. In Table 1, we can see that the variance of the encrypted image is much smaller than that of the original image. We can also see that compared with other schemes, our scheme has smaller histogram variance for Lena image. Table 2 shows the χ 2 test results for six images. As seen in Table 2, compared with the plain image, the χ 2 values of the encrypted images are much smaller and all the results passed.

E. CORRELATION ANALYSIS
The correlation of adjacent pixels indicates the strength of the linear relationship between the two variables [31]. The original image contains useful information and has a high recognition rate, which indicates that the correlation between adjacent pixels of the image is high. The correlation between adjacent pixels of the image should be eliminated for the security of ciphered images. In order to test the correlation analysis, 6000 pixels are randomly selected from the vertical, diagonal and horizontal directions to test the plain image and the ciphered image. The correlation graphs of image Pepper are shown in Fig. 9. More intuitively, we use (20) and (21) to calculate the correlation value.
The test results of the correlation values of Lena, Pepper, Harbour, Boats, Black-white, and other 16 grayscale images are shown in Table 3.
We can see from Fig. 9 that the distribution between adjacent pixels of the ciphered image is more uniformly dispersed than the plain image. As can be seen from Table 3, all the values of the ciphered image are far smaller than the plain image in the three directions of correlation coefficient test. Therefore, the algorithm has good security to resist statistical attacks.

F. INFORMATION ENTROPY
Information entropy is used to describe the confusion degree of image information, which is calculated by using (22) [31]:      In (22), p(m i ) denotes the occurrence probability of pixel mi. In theory, encrypted image has higher information confusion and security when the value of information entropy is closer to 8. The test results of information entropy of five images are shown in Table 4. As seen in Table 4, the information entropy of the images encrypted by our algorithm has been significantly improved, and all are close to the ideal value 8. And compared with Ref. [34]- [36] in Table 5, our algorithm has better information entropy, which means that the encrypted image is very messy and it is difficult for an attacker to obtain useful information from it. Therefore, encrypted image has good security.

G. LOCAL INFORMATION ENTROPY
Local information entropy is an index that reflects the degree of information confusion of the local encrypted image [31] The local information entropy is calculated by using (23).
In (    Calculation results of local information entropy are shown in Table 6. As seen in Table 6, the local information entropy of the six images all passed the test.

H. ENCRYPTION QUALITY MEASUREMENT 1) ENERGY
Energy is the square sum of the elements of the Gray Level Co-occurrence Matrix (GLCM), which reflects the uniformity of the gray image. GLCM is a statistical combination of pixel gray levels [38]. Energy is calculated by the following formula: where p(x, y) is the number of GLMC matrices. The range of energy value is [0, 1]. Low energy values confirm high degree of image disorder. Table 7 shows the energy values of encrypted images.

2) CONTRAST
Contrast analysis calculates the brightness contrast of adjacent pixels, which reflects the depth and clarity of texture grooves [38]. A good image encryption scheme requires higher contrast to verify that the texture is non-homogeneous. Contrast can be expressed by the following formula: where p(x, y) is the number of GLMC matrices and M is the sum of rows and columns. The contrast test results are shown in Table 8.

3) HOMOGEMEITY
Homogeneity reflects the closeness of the distribution of elements in GLCM relative to the diagonal of GLCM [38]. VOLUME 8, 2020  Homogeneity is defined as the following formula: where p(x, y) is the number of GLMC matrices. The range of homogeneity value is [0, 1]. Low homogeneity values confirm high security of encrypted image. Table 9 shows the homogeneity values of encrypted images.

4) CORRELATION
Correlation is to calculate the similarity degree of GLMC in row or column direction, which reflects the local gray correlation. Correlation is calculated by the following formula: where p(x, y) is the number of GLMC matrices. The range of correlation value is [0, 1]. A low correlation value indicates that the local gray scale correlation is small, and the encryption algorithm has high security. Table 10 shows the correlation values of encrypted images. It can be seen from Table 10 that the correlation value of the encrypted image is far less than that of the original image.

I. DIFFERENTIAL ATTACK ANALYSIS
Sometimes the attacker will get the rules of the encryption algorithm by analyzing the encrypted images with slight changes in the two plain images, which is called differential attack. The number of pixel changes rate (NPCR) and the unified average changing intensity (UACI) can be used to evaluate the difference between the two images. For the images with size of M × N , NPCR and UACI are calculated by using (28) [31].
In (28), C(i, j) represents the value of position (i, j) in the image C, D is the grayscale level. In this test, C 2 is an image generated by randomly changing single pixel value of C 1 .
The critical value (N * σ ) of NPCR and critical interval (U * − σ , U * + σ ) of UACI are used to evaluate whether the algorithm passes the test. The algorithm can pass the test when the value of NPCR is higher than N * σ and the value of UACI is in the interval (U * − σ , U * + σ ). According to [40], N * σ and (U * − σ , U * + σ ) are defined as follows: and For more accurate experimental results, we tested 25 gray images of different sizes from USC-SIPI database. Following the discussion in [40], σ was set to 0.5. The results of NPCR and UACI are shown in Table 11 and Table 12. We can see that the average values of NPCR and UACA are 99.6091% and 33.4418%, which are close to the optimal values 99.609% and 33.464%. This shows that the proposed algorithm is highly sensitive to small changes in plaintext. Compared with other algorithms, our algorithm can pass the tests for all the pictures whereas other algorithms failed to pass the tests for individual images. This indicates that the algorithm has enough ability to resist differential attacks.

J. ROBUSTNESS ANALYSIS
In the process of image transmission or malicious interference, data loss or pixel change will occur. Robustness refers to the fact that the encrypted image can still get effective information when the data is missing or changed. In this section, clipping attack and noise attack are used to test the anti-interference ability of the algorithm.
In order to simulate clipping attack, some pixels are randomly selected in the encrypted image and their pixel values are changed to 0 (shown in Fig. 10(a)). And the decryption image of Fig. 10(a) is as shown in Fig. 10(b). It can be seen from Fig. 10 that even if data is lost from different locations, the decrypted image can still obtain the information of the plain image.  In the noise test, 0.02, 0.08 and 0.12 Salt-and-Peppers noise are used to interfere with the encrypted image (shown in Figs. 11(a)-(c)). Figs. 11(d)-(f) shows that the decrypted images can display the information of the plain image under different levels of noise attack. As can be seen from Fig. 11 that the algorithm can effectively resist the noise attacks.

K. COMPUTATIONAL TIME ANALYSIS
The time consumption of the algorithm proposed in this article is mainly generated by Arnold map, and as the image size becomes larger, the time for Arnold map is also longer. The time tests are performed on Matlab 2016a, Intel Core i5-7500 CPU with 8 GB RAM and Window 10 operating system. The results of the time test are shown in Table 13.

V. PERFORMANCE ANALYSIS OF COLOR IMAGES
In this chapter, we applied the proposed encryption scheme to the encryption of color images and tested the security of the encrypted images.

A. SIMULATION RESULTS
The color image contains more information and is composed of three grayscale images R, G, and B. For the encryption of color images, first use the algorithm proposed in this article to encrypt R, G, and B, and then synthesize the encrypted R, G, and B into an encrypted image. The results of color image encryption and decryption are shown in Fig. 12. It shows that the algorithm in this article also has a good encryption effect on color images.

C. ROBUSTNESS ANALYSIS
The robustness of the algorithm on color images is an important test indicator. Fig. 14 shows the clipping attack and noise attack on the color image. As seen from Fig. 14(b) and Fig. 14(d), the algorithm is very robust to color image, and the images decrypted by the attacked image can display the information of the plain image.

D. OTHER ANALYSIS
In this section, the information entropy, χ 2 , NPCR and UACI of encrypted images R, G, and B are tested respectively. Table 14 shows the test results. Furthermore, comparison for grayscale images and color images is shown in Table 15. From Table 14 and Table 15 we can see that the test result is close to the ideal value, which indicates that the encrypted color image has high security and the algorithm has good encryption effect for both grayscale image and color image.

VI. CONCLUSION
In this article, a new one-dimensional chaotic system 1DSCS is proposed. The bifurcation graph test and Lyapunov exponent test were carried out on 1DSCS. The experimental results show that 1DSCS has a good chaotic effect. Based on 1DSCS, a hybrid scrambling method and a dynamic diffusion method based on remainder are proposed. Then, the proposed encryption algorithm was simulated and tested in grayscale image and color image respectively. The tests include key space, correlation analysis, information entropy, χ 2 , NPCR, UACI, and robustness analysis. According to the simulation results and security analysis, it can be seen that the algorithm has a good encryption effect and can resist common attacks.
Although the experimental results show that our algorithm has high security, it has not been extended to practical applications at present. In future work, we will extend the algorithm from the theoretical stage to practical applications. In addition, we want to extend this algorithm to other fields, such as audio encryption and video encryption.