High-sensitivity synchronous image encryption based on improved one-dimensional compound sine map

An improved one-dimensional compound sine map is introduced. The evaluation of this chaotic system shows that it has high sensitivity and random chaotic behaviour. Based on this chaotic system, a new fast image encryption scheme is proposed. Through the cross-processing of multiple chaotic sequences, two high-sensitivity pseudo-random sequences are generated, and the generated high-sensitivity random sequence is used for synchronization cross-processing in four directions. Using the symmetry of the image, the image is divided into four directions, and the processing of each direction is different based on the high-sensitivity sequence and the chaotic value. Through one traversal, the entire image is processed four times differently. The encryption process is uncontrollable and invisi-ble depending on the chaotic sequence. Simulation test results show that the algorithm has good encryption results, is sensitive to the initial secret key and provides satisfactory security capabilities compared with other algorithms.


INTRODUCTION
At present, the Internet is developing rapidly, and people can quickly obtain image information through the Internet. However, the Internet is an open platform. Images are easily stolen or attacked during transmission. Digital image encryption is an important way to protect image information, and it is of great significance to protect the transmission security of digital images. With the development of chaos theory [1][2][3][4], due to its pseudo-randomness, initial value sensitivity, parameter sensitivity, ergodicity and unpredictability of chaotic systems, image encryption using chaos theory has achieved novel results [5][6][7]. Image encryption based on chaos theory has become a hot spot in computer science and cryptography [8][9][10][11][12][13]. This makes the transmission of digital images on the network more secure, and there are many encryption algorithms to choose from [14][15][16][17][18]. Nowadays, many encryption algorithms of chaotic systems require multiple matrices processing to obtain better encryption effect and security. For example, the encryption  [19,20] needs to convert the original image into 8-bit binary [21,22] and then encode it, or the encryption method based on bit position, which needs to be processed after the original matrix is transformed into 8 matrices in the encryption process. The algorithm proposed by ref. [23] also needs to process more than 2 rounds to obtain better diffusion effect and safety, which leads to higher time complexity. In addition, some traditional image encryption is executed sequentially [24,25]. The encrypted pixels in this way are related to their neighbouring pixels and chaotic interference values. Random execution can hide the encryption process to a certain extent, using random locations of pixels and chaotic interference values.
For basic chaotic systems such as logistic mapping and sine mapping, there are problems with too small initial value range and control parameter range. [26,27] We propose to combine logical mapping and sine mapping to generate a twodimensional chaotic system and increase the complexity of the chaotic system to avoid this problem. This paper proposes to combine logistic mapping and sine mapping to produce a onedimensional complex chaotic system to expand the range of initial values and control parameters, which is more sensitive than common basic chaotic systems.
Based on the research and comparison of existing technologies, a high-sensitivity synchronization processing algorithm is proposed. First, based on the common logistic mapping and sine mapping, a new chaotic system is proposed, which has a larger control parameter range and initial value range than common chaotic systems. Then a highly sensitive sequence is generated by the proposed new chaotic system improved onedimensional compound sine (I1DCSL), which is used to locate the position of the pixel to be changed each time. Taking the central axis and the horizontal axis of the image as the symmetry line, the image is scrambled and diffused in four directions at the same time. According to the different operation matrix, the final positions of the pixels in the four directions are not symmetrical, and are randomly distributed according to the chaotic sequence, and the chaotic interference values used for diffusion in different directions are also different. The key sensitivity, histogram analysis, information entropy, number of pixel change rate (NPCR), unified average changed intensity (UACI) and other experiments have proved the safety and reliability of the algorithm.
The rest of this article is organized as follows. Section 2 introduces the basic chaotic system, the new chaotic system called I1DCSL. Section 3 introduces the proposed encryption algorithm. Section 4 presents simulation tests and results. Finally, section 5 is the conclusion of this article.

Logistic map
Logistic chaotic system is one of the basic chaotic systems. The mathematical formula is simple but has complicated chaotic behaviour. The formula is shown in Equation (1).
Among them, initial value x 0 ∈ (0,1), when the parameter u ∈ [3.5699456,4] the logistic mapping is a chaotic state, and the generated sequence x n is aperiodic, non-convergent and very sensitive to the initial value.
In Figure 1(a), you can see the bifurcation diagram of the logistic chaotic system. It can be seen that when u belongs to the interval of [3.5699456, 4], the logistic chaotic system in the bifurcation diagram is in a chaotic state, and u belongs to [0, 3.57), the chaotic system has periodicity and converges to a specific value. It can be seen in Figure 1(c) that the value of Lyapunov exponent (LE) [28] is greater than 0 in the interval where u belongs to [3.5699456 4]. The LE provides a description of the average separation rate and dispersion of two trajectories with similar initial values. Therefore, a full LE value indicates the presence of chaotic behaviour, and a larger LE value indicates the presence of more obvious chaotic behaviour.

Sine map
The Sine map is also one of the basic chaotic systems. When the control parameters are appropriate, it presents a pseudorandom numerical distribution with an infinite period. The formula is as described in Equation (2).
Among them, η is the control parameter, η ∈ (0, 1), x 0 is the initial value of the chaotic system, x 0 ∈ (0, 1) range, x n is the pseudo-random number generated by the chaotic system and x n ∈ (0, 1). Figure 1(b) is the bifurcation diagram of the sine map. It can be seen that the sine map is in a chaotic state when η ∈ [0.8,1]. Figure 1(d) shows that when η is in this interval, LE is greater than 0, indicating that the chaotic sequence mapped by the sine in this interval is aperiodic and does not converge.

Improved one-dimensional composite sine mapping
After analysing the logistic chaotic system and the sine chaotic system, it can be found that both have the characteristics of complex dynamic behaviour. However, the control parameters that make the chaotic system in a chaotic state are in the range between [3.7, 4] and [0. 8,1], which makes the range of the secret key for image encryption too small and difficult to resist brute force cracking.
Therefore, on the basis of logistic mapping and Sine mapping, a new chaotic system, I1DCSL chaotic system, is proposed. For the convenience of expression, the new chaotic system is called DCSL in the following. The DCSL chaotic system nests logistic into the composite sine map, uses the characteristics of the periodic chaos of the sine map to expand the range of control parameters, and the composite sine map increases the complexity of the chaotic system, and uses the remainder function mod to control the generated sequence x n ∈ [0,1], to generate a pseudo-random sequence between 0 and 1. The mathematical formula of DCSL chaotic system is defined in Equation (3).

2.3.1
Dimensional compound sine's Lyapunov exponent and bifurcation diagram In Figure 2, the trajectory of the DCSL chaotic system is drawn with a bifurcation. In Figure 2(a), it can be seen that there is a periodic movement at the beginning, and the period gradually increases with the increase of the control parameter λ, and the obtained x n is an irregular point between (0,1). In Figure  2(b),(c), it can be seen that as λ > 0.5, the chaotic system has been in a chaotic state. It shows that with the increase of λ, the chaotic system evolves into pseudo-random motion, which has the characteristics of pseudo-randomness of the chaotic system. Figure 3 is the relationship diagram of the Lyapunov exponent (LE) that varies with the control parameter λ. Through observation, it can be seen in (a) that when the control parameter λ is greater than 0.4356, a positive LE is obtained. As the parameter λ increases, the LE gradually becomes larger. It can be seen from (b) and (c) that as λ increases, Lyapunov presents a positive increase. It shows that with the increase of the control parameter u, the LE value of the DCSL chaotic system is gradually greater than 0, while the LE value indicates the presence of chaotic behaviour, and a larger LE value indicates more obvious chaotic behaviour, that is, as u increases, DCSL has obviously chaotic behaviour.

Sample entropy
Sample entropy [29] is a time series complexity evaluation method, which quantitatively describes the self-similarity in the sequence generated by the dynamic system. For time series {x 1 , x i+m-1 }, dimension m, and acceptance tolerance r, The formula of SE is shown in Equation (4).
Among them, A and B respectively represent the number of vectors d[X m+1 (i), X m+1 (j)] < r and d[X m (i), X m (j)] < r. d[X m (i), X m (j)] is the Chebyshev distance between X m (i) and X m (j). The larger the SE, the lower the regularity, so there is a higher complexity. We set m = 2 and r = 0.2 × std [18], where std is the standard deviation of the time series. Figure 4 is a comparison diagram of the SE results of logistic mapping, sine mapping and DCSL mapping. Figure 4(a) is the SE comparison chart where the control parameter belongs to (0, 4]. (b) is the SE comparison chart where the control parameter belongs to (0,8], and evenly take points for display. Through comparison, it can be seen that the output generated by DCSL has a higher SE value, which means that the DCSL chaotic system can generate chaotic sequences with higher complexity. Sensitivity test We evaluate the sensitivity of the initial value of DCSL based on the number of iterations. By choosing two initial values with extremely small differences, DCSL is used to generate two chaotic sequences, and the trajectories of the two sequences are compared. Figure 5 shows the trajectory diagrams of the chaotic sequence Y 1 and Y 2 obtained by 40 iterations with initial values of x 1 = 0.542142133213167, x 2 = 0.542142133213168, which can be regarded as indicators of initial sensitivity. The results show that the trajectories of the two sequences are completely different after a brief overlap of the chaotic sequences, indicating that the DCSL chaotic system is sensitive to the initial value.

NIST test
The NIST test includes 15 tests. It is used to estimate the randomness of a binary sequence. Each test is given a significant row level α (α = 0.001), and the probability value (P-value) is obtained after the statistical result. If P-value ≥ α, the sequence is non-random. For random sequences, P-value should be greater than α. Table 1 lists the results of the NIST test of the DCSL chaotic system. It is obvious that the DCSL chaotic system has passed these tests, that is, the chaotic system is random.

Joseph ring
The Joseph ring used here is a ring sequence that cyclically moves. In this article, two chaotic sequences are added to the ring, which are used to control the starting position, the step length each time, and the forward direction. The calculation process of the three control sequences is shown in Equations (10) and (12). As shown in the Figure 6, there are three sequences respectively, namely Direction, Initial position and Step length, each time through the Joseph ring, a high sensitivity value is obtained. By traversing the entire Joseph ring, a complete high sensitivity sequence is obtained. Figures 7 and 8  are clockwise and counter clockwise acquisition of high sensitivity values, the left side is the acquisition process and the right side is the processed Joseph ring. For example, we have an initial Joseph ring, the sequence is shown in Figure 6, and there is a sequence Direction{0.75, 0.12, …} that controls the direction, and a sequence Position{8, 2, …} that controls the initial position controls, and a control step length sequence Step{3, 1, …}. The first high-sensitivity value is obtained through the operation in Figure 7, Direction(1) > 0.5, so the clockwise traversal is performed. The initial position is 8 and the step size is 3. The second high-sensitivity value is obtained through the operation in Figure 8, Direction(2) < 0.5, so the counter clockwise traversal is performed. The initial position is 2 and the step size is 1.

Improved Fisheryz scrambling diffusion
The traditional Fisher-Yezi scrambling used in image encryption is to obtain random pixels in a row or column in line units to scrambling the image. This article improves the Fishery Scrambling, and expands the scrambling range to the entire image matrix, instead of confining it to one row or one column. When transposing each pixel, the diffusion process is performed at the same time. The transposition of each pixel combines the high-sensitivity random value generated by the Joseph ring to diffuse and transpose the three pixels. And based on the four directions of the image, the entire image is traversed once. As shown in Figures 9 and 10, you can see the process of improving Fisher's scrambling and diffusion for one pixel.

Encryption process
Based on the DCSL chaotic system, this paper proposes a secure image encryption algorithm. Different from the traditional algorithm, this algorithm adopts the method of synchronous scrambling diffusion crossover, and introduces the non-linear diffusion value into the encryption process. Get good performance through one-time encryption. The encryption flow chart is shown in Figure 11. The encryption and decryption process are as follows: Input: The plain image P which is size of M rows and N columns.
Step 1: For the original image P, use SHA-512 to generate a 512-bit key K, and convert every 8 bits of the key K into a decimal number to obtain K ′ , which belongs to [0, 255] and the length of the array K ′ is 64. The initial value x i is obtained by Equation (5), the control parameter λ i is obtained by Equation (6), the control parameter x h is obtained by Equation (7), and the control parameter u h is obtained by Equation (8).  8,9,10). Step 3: Get the sorted sequence by processing J 1 , J 2 through Equation (9). Processing J i (i = 3,4,5, 6) by Equation (10) to obtain a pseudo-random sequence J ′ i with a value between [0, 255]. Use Equation (11) to process A 1 , A 2 , A 3 , A 4 sequence. .
Where, the sort() function is a sorting function. In S = sort(B), the values in B will be sorted, and the sorted sequence will be in ascending order. Store the original position of each value in the sequence after sorting in S. And the reshape() function is a function to resize the matrix. In Equation (11), it adjusts the onedimensional matrix A i to a matrix with M rows and N columns.
Step 4: J ′ 1 , J ′ 4 are the original pseudorandom chaotic sequence. Connect the pseudo-random sequence end to end. J ′ 2 and J ′ 5 are respectively used to locate the starting position of pseudorandom chaotic sequence selection. J ′ 3 and J ′ 6 are the step lengths when the coordinates are selected for pseudorandom chaotic sequence selection. And the forward direction is obtained by Equation (12). When d i > 0.5, the pseudorandom chaotic sequence moves clockwise, and when d i ≤ 0.5, the pseudorandom chaotic sequence moves counter clockwise, where (i = 1, 2). Are the directions of the two pseudorandom chaotic sequences J ′ 1 and J ′ 4 respectively. Take the value of the position after each movement and put it into a one-dimensional matrix. R, C finally produce two matrices, Rwith length M and C with length N. .. (12) Step 5: The image is processed by a multi-directional synchronous cross-processing algorithm, in which highly sensitive random sequences R and C are used simultaneously. The synchronization starts from the upper left corner, upper right corner, lower left corner, and lower right corner respectively. The image P is processed through Equations (13)- (16). After completing one encryption, the encryption ends and an encrypted image P ′ is obtained. The synchronous cross processing algorithm can be seen in Figures 9 and 10.
In this algothrim, m belongs to M, n belongs to N, and m, n increases from 1 to M or N respectively. Taking m, n as the benchmark, each time the row is incremented by 1, the column is incremented to N. Until m is incremented to M, the entire image is traversed. At this point, the entire image has been fully encrypted Output: Encrypted image P ′ .

Decryption process
Input: Encrypted image P ′ and secret key K.
Step 1-Step 4: Pre-processing the secret key and pseudorandom sequence, the process is the same as the encryption process.
Step 5 : Contrary to the steps when encrypting images, use m and n to decrease from M and N to 1 respectively. Perform the inverse operation with the steps starting from the lower right corner, the lower left corner, the upper right corner, and the upper left corner, respectively, as shown in Equations (17)- (20) to get Decrypt the image P.
Output: Decrypt image P.

PERFORMANCE ANALYSIS
This section analyses multiple aspects of encryption algorithms to evaluate performance, such as key space, histogram analysis, sensitivity analysis, correlation analysis, NPCR, UACI, information entropy etc. The analysis results show that the algorithm is safe and reliable. The analysis results of the simulation test are as follows: Figure 12 shows the encryption results of the Lena graph and the black graph of 512 × 512 size.

Key space
The size of the secret key space can be expressed as the ability of the algorithm to resist brute force attacks. The larger the key space, the greater the possibility of resisting brute force attacks. In this algorithm, the secret key K is a 512-bit binary value. Therefore, the size of the key space should be 2 512 . Therefore, the algorithm can resist brute force attacks.

Sensitivity analysis
A good algorithm should be sensitive to secret keys. We randomly change one bit of the secret key K to decrypt the encrypted Lena image, and the decrypted image obtained is shown in Figure 13.

Histogram analysis
The histogram can be used to describe the distribution of image pixel values. Figure 14 shows the histogram of the ordinary image and its cipher image. It can be observed that the histogram of the cipher image is evenly distributed compared with the histogram of the original image, so the algorithm can resist known cipher attacks.

Correlation between adjacent pixels
The correlation between adjacent pixels includes horizontal, vertical and diagonal correlation. Low correlation can effectively prevent statistical attacks [30]. This paper randomly selects 10,000 pairs of adjacent pixels from the ordinary image P and the encrypted image, and calculates the correlation coefficient of each pair of pixels through the Equation (21). Table 2 is a comparison between the correlation of the original image and the correlation coefficient of the image after being encrypted by the encryption algorithm. Table 3 is the FIGURE 14 Histograms of plain images and ciphered images comparison between the image correlation coefficients of the encryption algorithm proposed in this paper and other algorithms. It can be seen that the encryption algorithm proposed in this paper fully reduces the correlation between the pixels of the image, and can effectively prevent statistical attacks. Figure 15(a) shows the pixel value distribution of the Lena map in space. It is obvious that there are many peaks and valleys. Because the pixel distribution has a sense of hierarchy, it carries a lot of useful information. In image encryption, all pixels of the encrypted image should be evenly distributed between [0, 255], as shown in (b), it is not observed that the image carries effective information.

Differential attack
Differential attacks are effective security attacks. It focuses on establishing the relationship between the two by analysing the  impact of changes in ordinary images on the encryption results. A good encryption algorithm should have diffusion characteristics to resist differential attacks. The diffusion characteristic is the ability to diffuse the changes in the ordinary image to the entire encrypted image. We use the NPCR and UACI to evaluate the diffusibility of encryption algorithms [28]. We use the encrypted image C 1 and the encrypted image C 2 that is encrypted after changing a bit of the original image. The calculation formula is shown in Equation (22).
Where W × H is the number of pixels and the calculation method of D is shown in Equation (23) According to ref. [28], if the NPCR value of an image's encryption scheme is higher than the critical value N * , and its UACI score falls within the critical interval (U * − , U * + ) of UACI, the image passes the diffusion test. The calculation for-mula for the significance level , N * , (U * − , U * + ) is as follows: Where  Tables 4 and 5 respectively show the NPCR and UACI results of several encryption schemes. In order to make the result closer to the real situation, we encrypt each image 100 times to calculate the average NPCR and UACI values. Through comparison, we can find that the 25 images encrypted by the encryption algorithm proposed in this article all pass the test, while some of the images in other encryption schemes cannot pass the test. This shows that the algorithm in this paper has good security and ability to resist differential attacks.

Information entropy
Information entropy is used to describe the statistical measure of randomness of disordered information. For grayscale images, the information entropy in an ideal state should be 8. The definition formula of information is shown in Equation (26).
Where p(s i ) represents the probability of pixels i . Table 6 is a comparison between the information entropy of the encrypted image of this article and other algorithms. It can be seen that the information entropy of this article is close to the ideal state 8, and the information described by the encrypted image is disordered enough to obtain useful information from it.

Local information entropy
Local information entropy can be used to analyse the uniformity of local image distribution. The definition of local information entropy is shown in Equation (27).
where S i means randomly selecting kT B Tb pixels, H (S i ) from the image to represent the information entropy of S i (see Equation (26)). It can be seen from the ref. [37] that when T B is 1936, k is 30 and confidence is 0.01,H (k,T B )(S ) should be in the range of [7.901722822, 7.903215812]. Table 7 shows the local information entropy of the encrypted image proposed in this paper. It can be seen that several encrypted images have passed the local information entropy test. The results show that the local image distribution is sufficiently uniform.

Robustness analysis
During image transmission, it may be lost or subject to cropping attacks and noise attacks. Therefore, the encryption algorithm should have better robustness. Figure 16 shows the decrypted results of the encrypted image processed by the pruning attack and the noise attack. Experimental results show that the algorithm has good anti-cutting ability and anti-noise attack ability, and has good robustness.

2 test
Use 2 to describe the degree of deviation of the image from the absolute uniform distribution. The formula is defined in Equation (28).
wherep represents the average frequency of all pixels, namely (M × N )∕256, p i represents the frequency of pixel i in the image. The smaller the 2 , the more uniform the pixel distribution. Table 8 shows the a value of normal image and encrypted image. It can be clearly seen that the a value of the ciphertext image is much lower than that of the plaintext image, indicating that the ciphertext image has a higher degree of mixing distribution.

4.11
The speed performance The algorithm encryption process only traverses the image once, and processes the image simultaneously in four directions. For a 256 × 256 Lena image, it takes 0.416718s to complete a complete encryption Table 9 is a comparison between the time consumed by this encryption algorithm and the time consumed by other encryption algorithms.  The encryption speed is highly dependent on CPU/GPU performance, RAM size and programming environment. Therefore, for different platform tests, the results only represent approximate comparison results.

CONCLUSION
This paper proposes a compound sine chaotic map called I1DCSL. The evaluation shows the superiority of DCSL compared with other one-dimensional chaotic systems. And further designed a novel image encryption scheme based on DCSL. Make full use of the pseudo-random sequence generated by the chaotic system, and apply the chaotic system to image scrambling and diffusion. The simulation test results show that the encryption scheme can obtain a certain security ciphertext image, and the security evaluation shows that it is sensitive to the secret key and has a certain degree of resistance to reduction attacks and noise attacks. Compared with other schemes, this encryption scheme has better resistance to differential attacks. This work promotes the expansion of chaotic systems and the choice of encryption schemes. In the future, we will try to study the expansion of high-dimensional chaotic systems and design more secure encryption schemes.