A Self-adaptive Parallel Encryption Algorithm Based on Discrete 2d-logistic Map

A self-adaptive parallel encryption algorithm based on discrete 2D-Logistic map is developed according to the position scrambling and diffusion of multi-direction in variable space of spatial chaos. The binary sequences b 1 b 2 b 3 ···b n are obtained according to the user key, in which the binary sequence 0 and 1 denote distribution mode of processors and the number of binary sequence n denotes cycle number. Then the pseudorandom 2D matrix is generated by 2D-Logistic map, and adaptive segmentation is applied in image matrix and pseudorandom matrix according to the value and the number of binary sequence. The parallel operation is used among blocks to improve efficiency and meet real-time demand in transmission processes. However, the pixel permutation is applied in partitioned matrix through ergodic matrix generated by pseudo-random matrix-block to decrease the correlation of adjacent pixels. Then the pixel substitution is used for fully diffusing through cipher block chaining mode until n cycles. The proposed algorithm can meet the three requirements of parallel operation in image encryption and the real-time requirement in transmission processes. The security is proved by theoretical analysis and simulation results.


Introduction
With the rapid development of computer technologies and communication networks, especially the wide application of different Internet services, more and more digital information such as voice, image and critical data are transmitted on networks.However, much important data is stolen or destroyed in information transmission, it has been reported that there is one case of hacker invasion every 20 seconds in the world [1].Chaos theory has been established since 1970s by many different research areas, such as physics, mathematics and chemistry, etc.During the last decades, the use of chaos in cryptography and secure communication has aroused great interest of researchers because of its sensitivity to initial condition and control parameters, ergodicity and mixing, which are analogous to the confusion and diffusion properties of a good cryptosystem [2][3][4][5].As a response to this concern, a large number of chaotic cryptosystems have been proposed.An image scrambling encryption algorithm of pixel bit based on chaos map is proposed by Ye [6], in which each pixel is converted into binary numbers of 8 bits.However, Zhao pointed out that Ye's cryptosystem can not resist chosen-plaintext attack and known-plaintext attack [7].A chaos-based image encryption algo-rithm is presented by Guan [8], which position scrambling is based on Arnold map and Chen's chaotic system is used in pixel mixing.Chen proposed a symmetric image encryption scheme based on 3D chaotic cat maps.In the algorithm, three-dimensional Arnold map is used in image scrambling, and the mixing method is similar to cipher block chaining (CBC for short).Though the forms of chaotic image encryption algorithms are many and different, these algorithms can be concluded to one framework [9][10][11].Firstly, the image position is scrambled by chaotic map.Secondly, the pixel is mixed by similar-CBC mode.Finally, repeat the former two steps.However, the application of CBC makes algorithm steps become serial mode which cannot meet timeliness requirements in large data.The parallel mode can compensate the drawback of the problem mentioned above and can increase computing speed.A parallel encryption algorithm for color images based on Lorenz chaotic sequences is proposed by Wang [12], which encrypts three primary colors with parallel mode.In the algorithm, every primary color is encrypted by conventional encryption mode which is only suitable for color image and its application is limited.Zhou proposed a parallel image encryption algorithm based on discrete chaotic map [13], in which the original image is divided into several sub-images and each sub-image is encrypted by advanced encryption standards algorithm (AES for short), but the short period and weak statistical characteristics of S-box is well known.A new image encryption method [14]: parallel sub-image encryption with hyper chaos is pro-posed by Mirzaei.In the algorithm, the original image is divided into four subimages according to the up and down or so.Each subimage is scrambled by logistic sequences, then the while image is permuted and CBC mode is applied in every sub-image, which has a high encryption speed, a large key space and weak difference characteristics.To overcome the drawbacks of the existing parallel encryption algorithm, we present a self-adaptive parallel encryption algorithm based on discrete 2D-Logistic map, which can meet real-time requirement with fast calculating speed.And the security is verified by differential analysis, correlation analysis, sensitivity test and information entropy analysis.

Self-Adaptive Parallel Encryption
Algorithm Based on Discrete 2D-Logistic Map

Discrete 2D-Logistic Map
With the development of technology, more and more fields are related to discrete-time multivariable system which mathematical model is deviation equation.Those discrete-time multivariable systems are called space discrete dynamic system [15], that is, 2D-discrete dynamic system denoted as where f() is a nonlinear function, also known as forcing function.Ω  (-∞,+∞) is a real number.μ > 0 is a constant.m, n and x m,n are states of space system.In fact, difference Equation ( 1) is the discrete form of one-dimensional convection Equation (2).
Particularly, when n = n 0 , ω = 0, Equation ( 2) is denoted as Because n is constant n 0 , Equation (3) can be expressed as follows: Therefore, 1D-discrete dynamic system Equation ( 4) is a special case of 2D-discrete dynamic system Equation 2D-discrete dynamic system is denoted as: Study shows that the system Equation ( 6) is chaotic state with 2 > μ >= 1.55 and ω  (-1,1), and has two iteration variables which is known as 2D-Logistic map.
There are two control parameters in space chaotic system.Space chaotic orbits are extremely sensitive to the change of control parameters.When μ = 1.96, ω = -0.05, the chaotic behavior of space chaotic system is described as Figure 1.

Demands of Parallel Encryption Algorithm
Parallel encryption algorithm refers to encrypting one image simultaneously by two or more processing elements (PE for short).Each PE has its separate memory space and computing resource.One superior parallel encryption mode must meet the following demands [13]: 1) Good diffusion effect Small changes in plain text or key have a big influence on cipher text is called diffusion which is known as avalanche effect.Generally CBC mode is used to realize fully diffusing in existing encryption algorithms.However, the application of CBC makes algorithm steps become serial mode.Therefore, the encryption algorithm is not only parallel operation but also can achieve fully diffusing.
2) Load balance of computing quantity Computing time depends on the PE with the longest running time.Therefore, the calculated quantity of every PE should be equal for a good parallel encryption algorithm.
3) Critical section management Two or more PE may read and write one memory area in parallel operation, and this memory area is called critical section.Therefore, one good parallel algorithm should avoid this situation.

Inter-Block Encryption Algorithm
It is assumed that one original image of size M M  is encrypted by r processing elements Step 4. Go to Step 1 until the end of the loop.

Encryption Algorithm in Block
Assumed that the original image is P, and the pixel matrix is denoted as where  is produced according to 2D-discrete dynamical system, which is represented in Equation (8). where In the following, the steps of the proposed algorithm are described in detail.
Step 1.The distribution form of processing elements is defined according to binary sequences .
Equivalent to Then the numerical matrix block 0 i K is transformed into ergodic matrix in Equation (10).
When b n = 1, the numerical matrix K is divided into r blocks in column direction.The ith numerical matrix block

Equivalent to
Then the numerical matrix block K is converted into ergodic matrix in Equation (12).
Step 2. Position scrambling.We assume that the ith matrix block P i is scrambled according to ergodic matrix in PE i .
If b n = 0, the ith matrix block is scrambled according to ergodic matrix , after scrambling the ma- in Equation (13).
Equivalent to

If
, the ith matrix block is scrambled according to ergodic matrix , and after scrambling the matrix is denoted as in Equation ( 14).

Equivalent to
Step 3. Image scrambling can destroy correlation between two adjacent pixels, but it cannot change pixel value thus the histogram is the same with original image.Therefore, the scrambled image should be further encrypted.For example, to encrypt the ith scrambled matrix block 0 i P  with b n = 0, and the result is denoted as in Equation (15). where Go to step 1 until the end of the loop.The detailed encryption diagram is described in Figure 2.
When n = 1, the pixel mixing based on chaining structure can make a small change of one pixel have effect on other pixels in the same block.And when n = 2, the influence can spread into whole image, which meet the demands of parallel encryption algorithms.In addition, the data volume is exactly same for every processing element which can realize load balance.Finally, there is no problem of critical section.

Theoretical Analysis and Experimental Simulation
Experimental analysis of the proposed algorithm in this letter has been done.To estimate the performance of the proposed scheme, we carry out a series of experiments.The experimental simulation is all implemented using Matlab8.0 running on a personal computer with i7 -3770 s 2.8 GHz * 4 processor.The parameter is selected as  = 1.96, ω = -0.05.

Statistical Analysis
The distribution of cipher image is very important because it has to hide the redundancy of original image and should not leak any information about original image or any relation between encrypted image and original image.
In statistical simulation, the parameters are selected as b 1 = 0, b 1 = 1 and b 1 b 2 = 10 respectively.The simulation results are described in Figure 3.As can be seen form Figure 3, if n = 1, the proposed encryption in the paper can hide the redundancy of plain image completely, i.e., it can resist statistical attack effectively.

Differential Analysis
We know that two main cryptographic properties of a good cipher are confusion and diffusion.Confusion means to complicate the dependence of the statistics of cipher image on the statistics of plain image.Diffusion means to spread out the influence of a single plain image symbol over many cipher-image symbols so as to hide the statistical structure of plain image.Differential attack can be avoided effectively through confusion and diffusion.In order to illustrate the performance of resistance on differential attack directly, we change the pixel value  In the following, we illustrate the performance of resistance on differential attack numerically.The number of pixels change rate (NPCR for short) and the unified average change intensity (UACI for short) are the significant measure of resistance on differential attack.NPCR and UACI denote the number of pixels change and the unified average change intensity in cipher image respectively, while we change one pixel value in the plain image randomly.Assume that there are two cipher images ( X Y , X Y ) whose plain images only have one different pixel.The pixels in position We change the pixel value of Figure 3(a) from 81 to 85 in the position (169,236), and then based on Equation ( 16) and ( 17) with n = 2, NPCR and UACI can be calculated to be 99.63% and 31.26%,respectively.Therefore, one pixel change in plain image can lead to completely change of cipher image.We can draw conclusion that the proposed encryption algorithm can resist differential attack effectively.

Key Sensitivity Test
An encryption scheme has to be key-sensitive, meaning that a tiny change in keys will cause decryption failure completely.The key sensitivity test is performed in detail according to the following steps:

Conclusion
In this paper, the security property of a class of image encryption algorithms based on chaotic maps bas been discussed.And some findings on the security problem of the existing parallel encryption algorithms have been reported.Based on discrete 2D-Logistic map, a self-adaptive parallel encryption algorithm has been developed according to the position scrambling and diffusion of multidirection in variable space of spatial chaos.The results of numerical analysis show that the proposed algorithm can meet the three requirements of parallel operation in image encryption and the real-time requirement in transmission processes.The security has been proved by theoretical analysis and simulation results.

Figure 1 .
Figure 1.Chaotic behavior of space chaotic system.

Step 1 . 3 nStep 2 .
divisibility of r dividing M. The encryption process is as follows: Key generation.The binary sequence 1 2 is generated according to user key, where the binary values 0 and 1 represent two distribution forms of processing elements, and the number of binary sequence is cycle number.b b b b  Image segmentation.The plain-text matrix is divided into r blocks.If b n = 0, PE i encrypts the pixels of matrix block which is from the   to the  th iM r row of plain-text matrix.If b n = 1, PE encrypts the pixels of matrix block which is from the i column to the  th iM r column of plain-text matrix, where 1, 2, , i r   .Step 3.Each matrix block is scrambled and mixed by one processing element.

1 2 3 n
When b n = 0, the numerical matrix K is divided into r blocks in row direction.The ith numerical matrix block b b b b

 Figure 3
(a) is encrypted with the test key  = 1.96, ω = -0.05,respectively.And its corresponding decrypted image with the correct key is presented in Figure 5(a). Then, the corresponding decrypted image with  = 1.96001 is presented in Figure 5(b). Again, when one pixel in PE 3 is changed, the corresponding decrypted image with the correct key is presented in Figure 5(c), while b 1 is chosen as "1".Finally, when one pixel in PE 3 is changed, the corresponding decrypted image with the correct key is presented in Figure 5(d), while b 1 b 2 are chosen as "10", respectively.Based on the simulation mentioned above, we can draw a conclusion that if there is a tiny change in the key explained before, we can obtain a completely different image from the original image.And if there is a tiny change in the plain image, the decrypted image is completely different form the original image, while b 1 b 2 are chosen as "10" respectively.Those simulation results show high key-sensitivity and plain-text sensitivity of the 0

Table 2 . Comparison of running time and theirs perform- ance.
[14]e parallel algorithms are simulated in running time test.They are Zhou's algorithm[13], Mirzaei's algorithm[14]and the proposed algorithm.The encrypted image is gray 21.512 in USC-SIPI image database and the simulation results are described in Table2.