A Self-adaptive Bit-level Color Image Encryption Algorithm Based on Generalized Arnold Map

A self-adaptive bit-level color image encryption algorithm based on generalized Arnold map is proposed. The red, green, blue components of the plain-image with height H and width W are decomposed into 8-bit planes and one three-dimensional bit matrix with size 24 H W × × is obtained. The generalized Arnold map is used to generate pseudo-random sequences to scramble the resulted three-dimensional bit matrix by sort-based approach. The scrambled 3D bit matrix is then rearranged to be one scrambled color image. Chaotic sequences produced by another generalized Arnold map are used to diffuse the resulted red, green, blue components in a cross way to get more encryption effects. Self-adaptive strategy is adopted in both the scrambling stage and diffusion stage, meaning that the key streams are all related to the content of the plain-image and therefore the encryption algorithm show strong robustness against known/chosen plaintext attacks. Some other performances are carried out, including key space, key sensitivity, histogram, correlation coefficients between adjacent pixels, information entropy and difference attack analysis, etc. All the experimental results show that the proposed image encryption algorithm is secure and effective for practical application.


Introduction
With the rapid development of computer network and multimedia processing technology, large amounts of information like audio, image and video transmitted by the network. More than 70% of the information transmitting in the network is related to image information. The security transmission and storage of image information attract more and more attention. Image encryption is usually adopted to handle the security issue. Image with large data volume, strong correlation and high redundancy, makes the traditional encryption algorithms like the International Data Encryption Algorithm (IDEA) and Advanced Encryption Standard (AES) reduce encryption efficiency, which cannot meet the requirements of real-time applications. Therefore, the traditional encryption algorithms cannot be suitable for encrypting digital images [1]. Thanks to the inherent natures of chaotic sequences generated by chaotic systems, such as pseudo-randomness, strong sensitivity to initial conditions and control parameters, unpredictability, etc., chaos-based image encryption technology has a broad application prospect. In the last two decades, many chaotic image encryption algorithms had been presented and investigated extensively [2][3][4][5][6][7].
Color image contains the red (R) , green (G), blue (B) color components, among which provides more abundant information. Many of existed color image encryption algorithms used the same method to encrypt R, G, B components, which means that the image is encrypted three times independently, ignoring the correlation between R, G, B components, and those components are easily attacked. In this paper, we present a novel self-adaptive color image encryption algorithm with a sort-based scrambling strategy for the 3D bit matrix and color components' diffusion in a cross way. The R, G, B color components of the plain-image with size of H W × and 256 grayscale levels are decomposed into 8-bit planes and one three-dimensional (3D) bit matrix with size 24 H W × × is yielded. One generalized Arnold map is used to generate pseudo-random sequences to scramble the resulted 3D bit matrix by sort-based approach. The scrambled 3D bit matrix is then rearranged to be one scrambled color image. Such a kind of operation changes the pixels' positions as well as pixels color components' intensity values. It reduces the correlation between R, G, B components and therefore improves the security and performance significantly. Another generalized Arnold map is applied to diffuse the resulted R, G, B components in a cross way to get more encryption effects. To achieve desirable key sensitivity and plaintext sensitivity, both the scrambling stage and the diffusion stage adopt self-adaptive strategy, where the key streams are all related to the content of the plain-image and therefore the encryption algorithm show strong robustness against known/chosen plaintext attacks. Some other performances are carried out, including key space, key sensitivity, histogram, correlation coefficients between adjacent pixels, information entropy and difference attack analysis. All the experimental results show that the proposed image encryption algorithm is highly secure and demonstrates excellent performance.

The Proposed image encryption algorithm
A color plain-image P can be expressed by a 3D matrix of size 3 H W × × meaning that the image is of height H and width W . We assume that the three base color components are denoted by 2D matrices , , R G B respectively. The three base color components , , R G B are all composed of 8 bit planes. We rearrange the color plain-image in bit planes mode to get one 3D bit-plane matrix P3D sized 24 H W × × . One generalized Arnold map is appied to generate chaotic sequences to scramble P3D at bit-level and another generalized Arnold map is used to diffuse the resulted R, G, B components in a cross way to achieve more encryption effect. The complete proposed image encryption algorithm is composed of one round of 3D bit matrix permutation and one diffusion process of the R, G, B components. It is outlined as follows.
Step 1. Generation of pseudo-random sequences , x y for 3D bit matrix P3D's permutation process.
With cipher keys 0 0 , x y , , We note that N is set to be related to the content of plain-image to enhance the encryption algorithm's robustness against known plaintext and chosen plaintext attacks. N is calculated by mod(sum1, 100)+30 where sum1 is the number of one in the 3D bit-plane matrix P3D and function mod(e, f) resturns the remainder of integer e divided by integer f.
Step Step 3. Permute the 3D bit-plane matrix P3D by P-boxes , , T S U respectively to get one new 3D bit matrix P3D1: 3 1( , , ) 3 ( , , ), 1,..., ; 1,..., , 1,..., 24 The resulted 3D bit matrix P3D1 is converted to be one color image PI with height H and width W such that each color component consisting of 256 grayscale levels. The corresponding color components for PI are still denoted by , , R G B . where function floor(x) returns the largest integer less than or equal to x. The vectors x(n), y(n),n = 1,2, , HW are then converted into two 2D matrices , X Y with size H W × .
Step 5. We Calculate the sum of all the pixels' gray values of , R G and determine the value of 2, 3 k k by The resulted color cipher-image of plain-image Lena (Figure 1(a)) consists of the three base color components 1, 1, 1 R G B , as shown in Figure 1

Performance analysis
An ideal cryptosystem requires high sensitivity to cipher keys, i.e., the cipher-text should have high correlation with cipher keys [1]. Furthermore, an ideal cryptosystem should have a large key space to make brute-force attack infeasible; it should also well resist various kinds of attacks like statistical attack, differential attack, etc. Some performance and security analysis will be carried out in this section, including the most important ones like key sensitivity, key space, statistical analysis (histogram analysis, information entropy analysis, correlation coefficients between adjacent pixels), and differential attack analysis. All the analysis shows that the proposed image encryption algorithm is secure enough thanks to its high sensitivity of the control parameters and initial conditions of the considered chaotic systems, large key space, and satisfactory self-adaptive approach.

Histogram analysis
Histogram analysis is applied to demonstrate the pixel distribution over the available intensity levels of an image. Regarding a 24-bit true color image, three histograms can be depicted for each 8-bit red, green and blue color components. We encrypt the color plain-image Lena one round with cipher keys  Figure 1(c)-(h). It follows from the histograms of the cipher-image that they are fairly uniform and significantly different from the corresponding histograms of the plain-image, and therefore the proposed image encryption algorithm is strongly robust against histogram analysis.

Correlation analysis between adjacent pixels
It is a common sense that each pixel is highly related to its adjacent pixels either at horizontal, vertical or diagonal direction for one nature image with definite visual content. An ideal cryptosystem should where , i i x y form the i-th pair of horizontally, vertically or diagonally adjacent pixels and for the three cases respectively. The correlation coefficients of horizontally, vertically, diagonally adjacent pixels for plain-image Lena and its cipherimage are given in Table 1. One can observe from Table 1 that the proposed image encryption algorithm significantly reduces the correlation between the adjacent pixels of the plain-image. We also calculate the correlation coefficients between the red, green, blue components of the plain-image and the cipher-image. The numerical results are given in Table 2, Table3. We can see from Table 2 that the coefficients Crg, Crb, Cgb between the R, G, B components of the plain-image is close to 1, while those of the cipher-image is close to zero. The correlation coefficients between the red, green, blue components of the plain-image and cipher-image are all close to zero. All these results indicate that the proposed image encryption algorithm reduces the correlations of the three base color components significantly.

Information entropy analysis
Information entropy is an index to measure the randomness of information sequence [8]. It can be sharing equal probability, its entropy equals to 8. For a 24-bit color image, the information entropy for red, green, blue color components can be calculated respectively. We have calculated the information entropy for plain-image Lena and its cipher-image. The results are shown in Table 4. The values of information entropy for the cipher-image are very-very close to the expected value of truly random image, i.e., 8bits, implying that the proposed encryption algorithm is extremely robust against entropy attacks.

Difference attack analysis
Differential cryptanalysis of a block cipher is the study of how differences in a plaintext can affect the resultant differences in the ciphertext with the same cipher key. It is usually done by implementing the chosen plaintext attack. Regarding image cryptosystems, attackers generally make a minor change (e.g., modify only one pixel) of the plain-image, and compare two cipher-images (obtained by applying the same cipher key on two plain-images having one pixel difference only) to find out some meaningful relationships between the plain-image and the cipher-image. If a meaningful relationship between plain-image and cipher-image can be found, it may further help the opponents to determine the cipher keys or equivalent key streams. If one slight change in the plain-image will cause significant, random and unpredictable changes in the cipher-image, then the encryption algorithm will resist differential attack efficiently.
Usually two most common measures NPCR (number of pixel change rate) and UACI (unified average changing intensity) are used to test the robustness of image cryptosystems against the differential cryptanalysis. If We have performed the differential analysis by calculating NPCR and UACI on plain-image Lena. The analysis has been done by randomly choosing 10 pixels in plain-image, and changing one of the three color intensity values by one unit randomly at the selective pixel as well. The averages of 10 NPCR values and 10 UACI values thus obtained for all three color components are given in Table 5. It is clear that the NPCR and UACI values are very close to the expected values, thus the proposed image encryption technique shows good sensitivity to plaintext and hence invulnerable to differential attacks.

Key sensitivity analysis
The key space of an encryption algorithm is composed of the total number of different cipher keys that can be used in the encryption procedure. The high sensitivity of the cipher-image to initial conditions and control parameters is inherent to any chaotic system. A good image encryption algorithm should contain sufficiently large key space. It should be sensitive to cipher keys as well, and thus can effectively prevent invaders decrypting original data even after they invest large amounts of time and resources. Strong key sensitivity is an essential feature of an effective cryptosystem. Key sensitivity of a cryptosystem can be observed and simulated from two aspects: (i) significantly different cipher-images should be generated even if keys with tiny difference are applied to encrypt the same plain-image; (ii) the cipher-image cannot be decrypted even if there is minor difference between encryption and decryption keys. We will use the following cipher keys to perform the simulations (one is master cipher key MKEY, the other keys are set by introducing a slight change to one of the parameters of master cipher key with all other parameters unchanged). Master cipher key is set to be 0 0 (i) To estimate the key sensitivity for the first case, we encrypt plain-image Lena with MKEY and get the first cipher-image, then we encrypt Lena with SKEY1-SKEY9 and get nine cipher-images respectively. The correlation coefficients between the first cipher-image and the other nine cipherimages are calculated by Eq. (2). The experimental results are shown in Table 6. From the results, we can see that all the correlation coefficients are very small which indicate that even there is only slightly difference between the cipher keys, the cipher-images are greatly different. Hence the proposed encryption algorithm is extremely sensitive to the cipher keys.
(ii) Decryption using keys with minor difference is also performed in order to evaluate the key sensitivity of the second case. Firstly, we decrypt the cipher image using MKEY and we get the plainimage Lena. Secondly, nine decrypted images are produced as we decrypt the cipher-image using SKEY1-SKEY9 respectively. We have computed the correlation coefficients between Lena and nine decrypted images. The results are given in Table 7. It follows from Table 7 that there is even only a tiny difference between the decipher keys, the decrypted images have low correlation coefficients with the plain-image Lena. As for the second case, the proposed encryption algorithm also shows highly sensitivity to the cipher keys.
Since the permutation process is irrelevant to the diffusion process, the key space consists of the cipher keys in both the scrambling process and the diffusion process. We can conclude from the sensitivity analysis that the key space of the encryption algorithm is as large as 14 8 3 10 10 × × = 75 10 , if we set the seed 1 N to be one integer between 0 and 1000.

Conclusions
In this paper, we present a novel self-adaptive bit-level color image encryption algorithm using generalized Arnold maps. The 2D generalized Arnold maps are applied to generate chaotic sequences for both the sort-based scrambling stage and the color components' cross diffusion stage. The key streams are all related to the content of the plain-image and therefore the proposed image encryption algorithm show strong resistance against known-plaintext and chosen-plaintext attacks. All the experimental results show that the proposed image encryption algorithm is highly secure and demonstrates excellent performance.