A Nonlinearly Modulated Logistic Map with Delay for Image Encryption

: Considering that a majority of the traditional one-dimensional discrete chaotic maps have disadvantages including a relatively narrow chaotic range, smaller Lyapunov exponents, and excessive periodic windows, a new nonlinearly modulated Logistic map with delay model (NMLD) is proposed. Accordingly, a chaotic map called a ﬁrst-order Feigenbaum-Logistic NMLD (FL-NMLD) is proposed. Simulation results demonstrate that FL-NMLD has a considerably wider chaotic range, larger Lyapunov exponents, and superior ergodicity compared with existing chaotic maps. Based on FL-NMLD, we propose a new image encryption algorithm that joins the pixel plane and bit-plane shufﬂe (JPB). The simulation and test results conﬁrm that JPB has higher security than simple pixel-plane encryption and is faster than simple bit-plane encryption. Moreover, it can resist the majority of attacks including statistical and differential attacks.


Introduction
Because of pseudo-randomness, orbital unpredictability, and sensitivity of the initial values, chaotic maps have been widely applied in the encryption system, especially image encryption [1][2][3][4][5][6][7][8][9][10]. For example, a symmetric image encryption algorithm based on mixed linear-nonlinear coupled map lattice was proposed by Zhang et al. [11], a novel image encryption algorithm based on cycle shift and chaotic system was proposed by Wang et al. [4], and an image encryption algorithm using the two-dimensional logistic chaotic map was proposed by Wu et al. [1].
One-dimensional (1D) chaotic maps, such as Logistic map [12], usually have relatively narrow chaotic range, smaller Lyapunov exponent, and excessive periodic windows, and their structure and chaotic orbit are rather simple. With the development of chaotic cracking technology, the trajectory of 1D chaotic maps may be estimated [13]. So using 1D chaotic maps in image encryption may be insecure. There is a report that Logistic map-based image encryption algorithm proposed in [14] was proved to be not safe [15].
To address the disadvantages of 1D chaotic maps, researchers have developed several methods. In [16], a two-dimensional (2D) Sine Logistic modulation map (2D-SLMM) is proposed combining a 1D Logistic map and sinusoidal map. In [17], a new 1D chaotic map is constructed by superimposing any two chaotic maps from Logistic, sinusoidal, and tent maps. In [18], Zhou et al. designed a new parameter switching chaotic system and applied this to image encryption.
However, the chaotic maps proposed in these papers realise better performance only by increasing the nonlinearity of the chaotic map. In this study, we add delay and nonlinear modulation into the 1D chaotic map [19] and propose a new nonlinearly modulated Logistic map with delay model (NMLD). Since the parameter of Logistic map varies over a larger range than most other chaotic maps, such as Bernoulli map, applying it to our model may result in a larger chaotic interval, which provides greater

First-Order Delay Feigenbaum-Logistic NMLD
In the NMLD model, when F(x) is set as a traditional 1D Logistic map and N(x) is set as the Feigenbaum formula [23], we can obtain the FL-NMLD as Equation (2) indicates.

Performance Evaluation of FL-NMLD
To evaluate the performance of FL-NMLD, we analyse this chaotic map using trajectory, Lyapunov exponent [24], and permutation entropy [25].
2.3.1. Trajectory Figure 2 displays the trajectories of FL-NMLD, 2D-SLMM [16], and 2D-SIMM [21]. The larger the region where the trajectory distributes, the better the ergodicity of the chaotic map. From the figure, we can observe that the trajectory of FL-NMLD distributes in a larger region than 2D-SLMM and 2D-SIMM, virtually covering the entire phase plane. This means FL-NMLD has excellent ergodicity. Further, using this map, we can obtain sequences that have superior randomness.

Lyapunov Exponent
Initial sensitivity is an important property of a chaos system. This means the trajectories of two similar initial values that evolve through systematic evolution are exponentially separated over time, which causes the system's future state to be unpredictable. The Lyapunov exponent can be used to quantitatively describe the initial sensitivity of a chaos system. For delay differential equations, the number of positive Lyapunov exponents increases linearly with the delay [26][27][28]. There is a delay item in the FL-NMLD equation; hence, FL-NMLD has two positive Lyapunov exponents.
We increase the parameter of chaotic map by 0.05 each time to draw a Lyapunov exponent, and the results are shown in Figure 3. From Figure 3b, we can observe that λ1 is greater than zero when α ∈ [0.885, 1], which means 2D-SLMM is chaotic in this range. Further, if the number of directions of spreading is more than one, the system has hyperchaotic behavior [29]. Both λ1 and λ2 are greater than zero when α ∈ [0.905, 1], which means 2D-SLMM is hyperchaotic in this range.
As indicated in Figure 3c, 2D-SIMM is virtually chaotic when α ∈ [0.7, 4], except for three large periodic windows, and is hyperchaotic when α ∈ [0.7, 2.7]. The three large periodic windows make the available chaotic range discontinuous.
As indicated in Figure 3a, FL-NMLD is chaotic when α ∈ [1.1, 4] and is hyperchaotic when α ∈ [1.1, 2] and [2.1, 4]. The greatest advantage of FL-NMLD is that it has a considerably wider chaotic range and there is no periodic window. This means it has more available continuous chaotic range. Further, it is beneficial to have a larger key space when this map is used for image encryption. Moreover, the maximum Lyapunov exponent (MLE) of FL-NMLD is relatively large, which means it is difficult to predict the chaotic sequence.

Permutation Entropy
Permutation entropy (PE) is a useful method to indicate the complication of chaotic dynamical systems; the greater the entropy, the more complex the dynamical behaviours of the chaotic system. In the simulation, we calculate the PE using the method proposed in [25]. Figure 4 displays the PE of FL-NMLD, 2D-SLMM, 2D-SIMM, 2D-Logistic map, and Logistic map. Clearly, the PE value of FL-NMLD is greater than that of the other maps. The PE of 2D-SIMM is greater than FL-NMLD in certain ranges, although it has three large periodic windows. Conversely, the PE value of FL-NMLD is stable and is close to the ideal value of one. This means that FL-NMLD has more complex dynamical behaviours.

Joint Pixel-Plane and Bit-Plane Image Encryption
The shuffle process of an image encryption algorithm can operate on the pixel plane or bit plane. A pixel-plane shuffle has higher efficiency than bit-plane scrambling; however, its security is not sufficiently acceptable. Conversely, a bit-plane shuffle process is more secure; however, it requires more execution time.
The information contained in different bits may vary in one pixel. For example, a "1" at the 8th bit of a pixel represents 128 (2 7 ). In contrast, a "1" only represents 1 (2 0 ) at the first bit, which contains less information. According to Equation (3), we calculated the ratio p(i) of information contained in ith bit, as shown in Table 1.
Considering that more than 90% of the information of one pixel is concentrated in the higher four bits, we separate the higher four-bit planes to perform bit-plane shuffle. Simultaneously, we reassemble the lower four-bit planes into a pixel plane for pixel-plane shuffle. Then, through conversions, we can obtain eight shuffled bit planes. Next, after reassembling these bit planes into a pixel plane, we can obtain the shuffled image. Then, we perform a diffusion operation to alter the value of each pixel in the shuffled image. Based on the joint operations of bit and pixel plane, we propose an improved chaotic image encryption scheme, as displayed in Figure 5. In Figure 5, the symbol M * N indicates the size of the matrix. Moreover, the shuffle process is related to the plaintext; hence, the encrypted image can effectively resist chosen plaintext attacks. Figure 6 displays the structure of the secret key. The key is 256 bits long. x 1 , x 2 , α, and H are decimals generated by a 53-bit string {b 53 , b 52 , ..., b 1 } according to the IEEE 754 format, as indicated in Equation (4).

Secret Key Structure
The computational precision of the double-precision number is considered as 10 16 ≈ 2 53 ; hence, x 1 , x 2 , α, and H are set as 53 bits long. G 1 and G 2 are integers generated by a 22-bit string. We can obtain the initial values x 1,1 , x 1,2 , x 2,1 , and x 2,2 , and chaotic parameters α 1 and α 2 of the chaotic map using Equation (5).
where the value of i is '1' or '2'. To ensure that FL-NMLD has acceptable chaotic performance, the calculated initial values should be in the range of [0, 1], and the chaotic parameters should be limited to [1.1, 4].

Shuffle Process
Before performing the bit-plane and pixel-plane shuffle, the higher four-bit planes and lower four-bit planes must be first separated. Further, we must perform conversions to facilitate the shuffle process. Finally, we must obtain the chaotic sequence used for the shuffle based on the input secret key.
Input The security key K = {x 1 , x 2 , α, G 1 , G 2 , H} and plaintext image P with size of M * N.
Step 1 Convert P into a binary matrix B, with size MN * 8. Each column of matrix B has the same elements as the bit plane.
Step 2 Separate the first four columns of B as B1, with size MN * 4. Reshape matrix B1 into M * 4N to obtain matrix HB. Matrix HB is a combination of the higher four-bit planes. From the first five columns of HB in Figure 7, we can see how to get the HB matrix. The four elements of the first column in HB come from elements of the same color in B1, and the following columns are similar. We can use the reshape command in MATLAB to implement this transformation.
Step 3 Separate the last four columns of B as B2. Convert B2 into a decimal matrix LB, with size MN * 1. Matrix LB is reassembled by the lower four-bit planes. Figure 7 displays the process in Steps 1-3 using an example. Step 4 Obtain the initial values x 1,1 and x 1,2 , and chaotic parameter α 1 based on secret key K, and update the initial value x 1,1 using Equation (6).

Bit-Plane Shuffle
In this process, we perform row and column cyclic shifts on HB, which is the combination of the higher four-bit planes.
Step 1 Rotate the ith row of matrix HB cyclically to the right r(i) times to obtain matrix HB1. r(i) is obtained by x 2 using Equation (8).
where i = 1, 2, ...M and f loor(x) is the largest integer not greater than x.
Step 2 Cyclically shift the ith column of matrix HB1 from top to bottom c(i) times to obtain matrix HB2. c(i) is obtained by x 3 using Equation (9).

Pixel-Plane Shuffle
In this process, we use a chaotic sequence to sort matrix LB transformed from the lower four-bit planes.
Step 1 Sort the chaotic sequence x 1 in ascending order. Then, we can obtain the sorted sequence h and index sequence t.
Step 2 Sort matrix LB with t to obtain sorted matrix LB1. The specific method is illustrated below.
f or i = 1 : MN LB1(t(i)) = LB(i) Figure 8 displays the process of pixel-plane shuffle. After the bit-plane and pixel-plane shuffle processes, we can obtain the shuffled matrices HB2 and LB1. Then, according to the inverse process of the operations displayed in Figure 7, the two matrices are transformed to obtain the shuffled image Q.

Diffusion Process
The diffusion process can alter the value of each pixel in the image to meet the requirement of the diffusion characteristic of the encryption algorithm. The diffusion strategy includes pixel-by-pixel diffusion [30] and block diffusion [31]. Pixel-by-pixel diffusion typically provides superior security compared to the others. Hence, in the proposed algorithm, we perform diffusion pixel-by-pixel.
Step 1 Obtain the initial values x 2,1 and x 2,2 , and chaotic parameter α 2 based on the secret key K. Iterate Equation (2) (MN + r 2 ) times with the initial values x 2,1 and x 2,2 , and discard the former r 2 items to obtain sequence y. Use the following formula to improve the randomness of the chaotic sequence. y1 = mod(y * 10 7 , 1); Then, reshape the sequence y1 into matrix Y with size M * N.
Step 2 Perform diffusion of the shuffled image Q; the specific method is displayed below.
f or i = M : −1 : 1 where ⊕ is the operation where two numbers are bit-XORed by their binary values, and f loor(x) is the largest integer not greater than x. Q1 is the encrypted image after diffusion. An example of this process is provided below. The diffusion process starts with i = M and j = N, which are the blue numbers in Figure 9. The specific calculation process is as follows:

Decryption
The decryption procedure is the reverse process of encryption. Input The security key K = {x 1 , x 2 , α, G 1 , G 2 , H} and the encrypted image Q1.
Step 1 Obtain the chaotic matrix Y based on K.
Step 2 Perform the inverse process of diffusion; the specific method is displayed below.
This process starts with i = 1 and j = 1, where ⊕ is the operation where two numbers are bit-XORed by their binary values, and f loor(x) is the largest integer not greater than x. Q is the shuffled image.
Step 3 Transform matrix Q according to the method displayed in Figure 7 to obtain HB , LB , and B .
Step 4 The shuffle process only changes the position of '1' and '0', without changing the number of them. Hence, the number of '1's in the original matrix B and the shuffled matrix B is the same. Hence, we can calculate sum1 by B using Equation (7).
Then, we can obtain the chaotic sequence x based on the initial values and parameter obtained by K and sum1 .
Step 5 Perform the inverse operation of the pixel-plane shuffle process on matrix LB . Perform the inverse operation of the bit-plane shuffle process on matrix HB . After these operations, we can obtain two matrices LB and HB .
Step 6 According to the inverse process of the operations displayed in Figure 7, the two matrices LB and HB are transformed to obtain the decrypted image P .

Simulation Results
We used 256 × 256 sized Lena and Cameraman grey scale images as test images; Figure 10 displays the simulation results. From this figure, we can observe that the encrypted images are random-like images, and we can obtain the original images from these encrypted images.

Secret Key Space and Key Sensitivity Analysis
A sufficiently large key space and high sensitivity to the key are necessary for an effective encryption algorithm. JPB has a 256-bit secret key; hence, its key space is 2 256 . Based on the computation ability of current computers, this key space is sufficiently large to resist a violent attack.
We selected Lena to test the sensitivity of the key. As Figure 11 indicates, the decrypted images are incorrect if we add +10 −16 to the initial values x 1,1 and x 1,2 , or the parameter α 1 , respectively. This means that the decryption process is extremely sensitive to a change in the secret key. Figure 12 displays histograms of the original images and the encrypted images. Figure 12a,c indicate the uneven distribution of the grey values of the original images. Attackers can obtain useful information from the uneven distribution. Conversely, the grey values of the encrypted images distribute uniformly; hence, the attackers cannot obtain information from them.

Correlation Analysis
The pixels of the original image have high correlations with their neighbouring pixels. An effective encryption algorithm must minimise this correlation. Equation (11) displays the method to calculate the correlation coefficients between adjacent pixels. where x i is the mean of the pixels, and D(x) = 1 2 is the variance of the pixels. We obtained correlation coefficients of different 256 × 256 images and their encrypted images using Equation (11). The results are displayed in Table 2. Clearly, the correlation coefficients of the encrypted images in all three directions are significantly reduced. Further, we compared the correlation coefficients of the encrypted Lena images using different algorithms in Table 3. From the results, we can observe that the correlation coefficients using JPB are reduced compared to the others. That is, the JPB image encryption algorithm functions more effectively.  Table 3. Correlation coefficients of encrypted Lena using different algorithms.

Horizontal Vertical Diagonal
Lena 0.9455 0.9726 0.9212 JPB 0.0008 0.0015 0.0032 [16] 0.0024 -0.0086 0.0402 [21] 0.0030 −0.0024 −0.0013 [2] −0.0230 0.0019 −0.0034 [32] −0.0226 0.0041 0.0368 We selected 10,000 pairs of adjacent pixels in the horizontal, vertical, and diagonal directions randomly. Figure 13 displays the distributions of the adjacent pixels in the original image and the encrypted image. As the figure indicates, pixels are highly correlated in the original image, whereas correlation is significantly reduced in the encrypted image.

Information Entropy Analysis
Information entropy [33] can be used to measure the uncertainty of information. A large entropy means that the image pixels are approximate to the random distribution. Suppose that m is a source of information, then its information entropy calculation formula is defined by Equation (12).
For an image of 256 grey levels, the ideal information entropy is eight. From Table 4, we can observe that the entropy of the encrypted Lena using the JPB image encryption algorithm is 7.9974, which is extremely close to eight. We compare the entropies of the encrypted images using different algorithms in Table 4.

Differential Attack
Differential analysis is a type of chosen plaintext attack. The number of pixel change rate (NPCR) and unified average changing intensity (UACI) [34] are frequently used to measure the ability to resist differential attack. Equation (13) displays the method to calculate NPCR and UACI between images C and C . where The ideal values of NPCR and UACI are 99.6094% and 33.4635%, respectively. To test the performance, we chose 150 pictures, selected a pixel randomly, and changed the lowest bit in each image. Then, we encrypted the original images and changed images to calculate the NPCR and UACI using Equation (13). As Figure 14 indicates, the values of NPCR and UACI of the images encrypted from the original and the changed images using JPB are extremely close to the ideal values, and in Table 5, we compare them with several other algorithms. From Table 5 we can see that the UACI of [4] is only 0.0001 different from the ideal value, but its NPCR is 0.2120 different from the ideal value. In contrast, the NPCR and UACI of JPB differ from the ideal values by 0.0168, 0.0251, both of which are very close to ideal values.

Encryption Efficiency
There are numerous methods to measure the encryption efficiency of an algorithm, such as the encryption time, encryption throughput (ET), and number of cycles [35]. ET and the number of cycles are defined by Equations (14) and (15), respectively.
Number o f cycles per byte = CPU speed (Hertz) ET(byte) A large ET and a small number of cycles indicate high encryption efficiency. The experimental environment was MATLAB R2016a with Inter(R) Core(TM) i5-4210M CPU @ 2.60 GHz with 4.0 GB RAM on Windows 10. We encrypted 256 × 256 Lena 100 times and calculated the average encryption time. Table 6 shows the average encryption time of JPB and the encryption time of other algorithms presented in the references. In order to compare the encryption efficiency, we calculated the ET and the number of cycles of these encryption algorithms, which are shown in Table 7. From Tables 6 and 7, we can observe that the execution speed of JPB was faster than bit-level image encryption algorithm in [2,36], but slower than pixel-level image encryption algorithm in [30,37]. Considering the excellent encryption security of JPB, the running speed is acceptable. Because our algorithm strikes a balance between time and security, it can be used in applications where safety requirements are high and time requirements are moderate.
In Table 8, the time consumed by the different processes is listed. From Table 8, we can observe that the most time-consuming part in JPB is the diffusion process. This is because there are (3MN − M − N) XOR operations in the diffusion process. The next two time-consuming processes are the processes of transforming images. In these two processes, matrix transformation and conversion between decimal and binary are required, and these operations require a relatively long running time. Further, it requires relatively less time to obtain the chaotic sequences and transform them. The shuffle operations consume the least amount of time. The data to be processed in the bit-plane shuffle are four times that of the pixel-plane shuffle; hence, bit-plane shuffle requires more time than the pixel-plane shuffle.

Conclusions
To address the disadvantages of 1D chaotic maps, this paper proposed a new nonlinearly modulated chaotic model with delay. Based on this model, FL-NMLD, a new chaotic map, was proposed. Some analysis methods, such as trajectory, Lyapunov exponent, and permutation entropy are used to evaluate its chaotic performance. Simulation results demonstrated that it has a wider chaotic range, larger Lyapunov exponents, and superior ergodicity compared to existing chaotic maps.
In order to apply FL-NMLD to image encryption, JPB, a new image encryption algorithm was proposed. This algorithm separate the higher four-bit planes to perform bit-plane shuffle and reassemble the lower four-bit planes into a pixel plane for pixel-plane shuffle. Experimental results show that JPB can resist most attacks and has great security performance, and it has a lower time complexity than bit-level encryption.