Recent Advances in Information TechnologyView this Special Issue
Research Article | Open Access
Yuping Hu, Congxu Zhu, Zhijian Wang, "An Improved Piecewise Linear Chaotic Map Based Image Encryption Algorithm", The Scientific World Journal, vol. 2014, Article ID 275818, 7 pages, 2014. https://doi.org/10.1155/2014/275818
An Improved Piecewise Linear Chaotic Map Based Image Encryption Algorithm
An image encryption algorithm based on improved piecewise linear chaotic map (MPWLCM) model was proposed. The algorithm uses the MPWLCM to permute and diffuse plain image simultaneously. Due to the sensitivity to initial key values, system parameters, and ergodicity in chaotic system, two pseudorandom sequences are designed and used in the processes of permutation and diffusion. The order of processing pixels is not in accordance with the index of pixels, but it is from beginning or end alternately. The cipher feedback was introduced in diffusion process. Test results and security analysis show that not only the scheme can achieve good encryption results but also its key space is large enough to resist against brute attack.
With the rapid development of network communication technology, multimedia information such as digital images are more commonly and frequently transmitted in public communication network. Therefore, it is particularly important to protect images from piracy. As a result, image encryption technology becomes an important issue of cryptography. Image data have two features, namely, bulky data capacity and strong correlations among adjacent pixels. For this reason conventional cipher algorithms are not directly suitable for image encryption. Chaotic cryptography then was drawn attention by researchers due to its many good properties, such as ergodicity, sensitive dependence on initial conditions, random-like behavior, and high efficiency in image encryption.
In recent years, many image encryption algorithms have been proposed [1–11]. The confusion and diffusion processes in cryptography proposed by Shannon  are applied in image encryption successfully. These processes include a permutation-diffusion structure, while many proposed chaotic image encryption systems [8–11] adopted Arnold cat map to shuffle the positions of the pixels by confuse phase, and the permutation process was separated from diffusion process. Arnold cat map has some weaknesses . One is that the periodic states appear in very limited iteration times. Another one is that the width and height of the processed image must be equal, or the image cannot be permuted directly. What is more, each pixel position of different images in same size is fixed after the diffuse phase. Thus it is not suitable for the practical application in chaotic cryptography. If the permutation process was separated from diffusion process, efficiency will be reduced. In , Wang and Jin proposed an image encryption algorithm. They confuse the plain image by using logistic map and Game of Life instead of Arnold cat map firstly. Then they use piecewise linear chaotic map (PWLCM) to diffuse each pixel of the image. In this paper, we firstly proposed a improved piecewise linear chaotic map (MPWLCM) model. Then we use the MPWLCM to shuffle positions and diffuse values of pixels in plain image simultaneously. Test results and security analysis not only show that the scheme can achieve good encryption result but also show that the key space is large enough to resist against brute attack.
2. The MPWLCM Map
The PWLCM can be described as where , when control parameter , (1) evolves into a chaotic state , and can be served as a secret key. PWLCM system has uniform invariant distribution and very good ergodicity, confusion, and determinacy, so it can provide excellent random sequence, which is suitable for information encryption.
Based on the PWLCM, we propose an improved piecewise linear chaotic map (MPWLCM) model, which can be denoted by (2) (see also Figure 1): where is the control parameter and . denote the maximal integer less than or equal to .
Figures 2(a) and 2(b) show the state sequences of PWLCM and MPWLCM, respectively. From Figures 2(a) and 2(b), one can see that the sequence of MPWLCM has better performance in randomness than MPWLCM. Hence, MPWLCM is more suitable for information encryption.
3. The Proposed Cryptosystem
For a 256-gray-scale image of size , it is an integer matrix of rows columns, in which the values range from 0 to 255. Its data can be treated as a one-dimensional vector , where denotes the gray level of the image pixel at ceil row and column.
3.1. Generating Permutation Sequence
Given and , we firstly generate permutation sequence to change the position of image pixel. Different from most proposed methods, our scheme is based on ergodic matrix instead of sorting chaotic sequence. Suppose that is an ergodic matrix of size , where are integers, , and if . Our scheme takes the following steps.
Step 1. Iterate the PWLCM by using (2) for times to get rid of transient effect, where is a constant; set a one-dimensional matrix flag, which length is and each of its elements is zero; initialize the permutation sequence .
Step 2. Let .
Step 3. To iterate the PWLCM to obtain a new , compute a integer by using current according to the following formula:
Step 4. Checking the values and , if , or then repeat Step 3; else then go to Step 5.
Step 5. ; .
Step 6. Let , return to Step 3 until reaches .
3.2. Generating Diffusion Sequence
Step 1. Supposing the diffusion sequence is denoted by , set , .
Step 2. Let .
Step 3. To iterate the PWLCM to obtain a new , compute by using current according to the following formula:
Step 4. Checking , if , then .
Step 5. Let , return to Step 3 until reaches .
3.3. Encryption Algorithm
The encryption process uses the permutation sequence to shuffle the positions of image pixels and uses the diffusion sequence to diffuse the values of image pixels simultaneously. Namely, permutation process will move the pixel of position in plain image to the position in cipher image, where . At the same time, the pixel value of position in plain image is altered by using diffusion key and the previous encrypted pixel value. Different from most of usual algorithms, the process order is not equivalent to the pixel index , but it is from beginning or end alternately. Namely, . If is even, then the processed pixel index is . At other times the processed pixel index is . Figure 3 illustrates the block diagram of the proposed encryption algorithm.
The permutation and diffusion process may repeat rounds ( to , ). In the first round , denotes the th pixel in original plain image and denotes the th pixel in current ciphered image , where is the previously outputted cipher pixel value. For , is equal to a presetting value . In the th round , denotes the th pixel in the ciphered image outputted in the th turn and denotes the th pixel in current ciphered image . is the previously outputted cipher pixel value. For , is the last outputted cipher pixel value in the previous round, where denotes the nonlinear encryption function. The encryption formulas in our scheme are as follows:where and .
Our encryption algorithm takes the following steps.
Step 1. Let .
Step 2. If is even, then ; otherwise .
Step 3. Obtain by using the permutation sequence .
Step 5. Let .
Step 6. If , then return to Step 1; otherwise one round encryption is complete.
4. Experimental Results and Security Analysis
In our experiments, The images for testing are the traditional images with 8-bit grayscale. The system parameter and initial state of MPWLCM are and . , , and .
4.1. Key Space Analysis
Key space size is the total number of different keys which can be used in the encryption process. In the proposed algorithm, the secret keys set , where and are double-precision numbers, is a constant integer and , and is a integer. If the computational precision of and is , then . Therefore, the key space is bigger than , which is much larger than 2124. So the encryption algorithm has a large enough key space to resist all kinds of brute-force attacks.
4.2. Statistical Analysis
Shannon suggested two methods of diffusion and confusion for frustrating the powerful statistical analysis. Here, we demonstrated the confusion and diffusion properties of our MPWLCM chaotic encryption system. This is shown by a test on the histogram and the correlations of adjacent pixels in the cipher image.
Histograms of Encrypted Images. Select several 256 gray-level images with size of which have different contents and calculate their histograms. One typical example (Sailboat) among them is shown in Figure 4. From Figure 4, we can see that the histogram of the cipher image is fairly uniformed and is significantly different from that of the original image.
(2) Correlation Coefficients of two adjacent pixels. To test the correlation between two adjacent pixels in plain image and cipher image, all pairs of two-adjacent pixels (in vertical, horizontal, and diagonal direction) from plain image and cipher image were selected and the correlation coefficients were calculated by using the following formulas: where and are gray-scale values of two-adjacent pixels in the image and is the correlation coefficient of two adjacent pixels. The test results are shown in Table 1. It also shows the results of the existing algorithms in . From Table 1, it can be seen that the encryption scheme satisfies zero cocorrelation, which is of high-level security. Compared with the algorithms proposed by , it shows superior performance.
4.3. Information Entropy Analysis
Information entropy is the most important feature of randomness. Let be the information source, and the formula for calculating information entropy is where denotes the probability of symbol and is the total states of the information source. For a true random source emitting symbols, the entropy should be . Take a 256-gray-scale image, for example, and the pixel data have 28 possible values, so the ideal entropy of a 256-gray-scale image must be 8. The information entropy of the cipher-images is shown in Table 2. The obtained values are very close to the theoretical value 8.
4.4. Differential Attack
Generally speaking, an opponent may make a slight change (e.g., modify only one pixel) of the encrypted image to observe the change in the result. In this way, we may be able to find out a meaningful relationship between the plain image and the cipher image. This is known as the differential attack. However, if one minor change in the plain image can cause a significant change in the cipher image, with respect to diffusion and confusion, then the differential attack would become very inefficient and useless.
The proposed cryptosystem can ensure two ciphered images different completely, even if there is only one bit difference between plain images. We have done differential analysis by calculating the NPCR (net pixel change rate) and UACI (unified average changing intensity) for several images. Here are the formulas: where represents the difference between and . If , then ; otherwise . For an 8-bit gray image, the expected estimates are and .
We have done plaintext sensitivity analysis (differential analysis) by calculating the NPCR and UACI for plain-image Lena, Sailboat, Pepper, and Cameraman. In particular, we have randomly chosen 100 different pixels (one at a time, including the very first and very last pixels of the image) in each plain-image and changed their values slightly, and then we have computed NPCR and UACI for all the cases using (8). The results of NPCR and UACI for the plain-image Cameraman are shown in Figures 5(a) and 5(b), respectively. It is clear that the NPCR and UACI values remain in the vicinity of the expected values (shown by the horizontal lines); that is, the proposed image encryption technique shows extreme sensitivity on the plaintext. Also, Table 3 shows the average values of NPCR and UACI for the plain-image Lena, Sailboat, Pepper, and Cameraman. We can find that the mean NPCR is over 99% and the mean UACI is over 33%. The results show that the proposed algorithm is very sensitive to tiny changes in the plain image; even if there is only one bit difference between two plain images, the encrypted images will be different completely. Thus, the algorithm is robust against differential attack.
A good encryption algorithm should also be sensitive to the secret keys. For the MPWLCM system, the sensitivity to and is considered as ; Figure 6 shows the sensitivity to the key. Figure 6(a) is the decrypted Cameraman by correct key and Figure 6(b) is the decrypted Cameraman by the wrong key with a tiny change .
This paper proposes a symmetric cryptographic system using MPWLCM chaotic system to encrypt grayscale image. We can see that the proposed cryptosystem can process any size of image. Security analysis and experimental results demonstrated the effectiveness of the proposed scheme. The key space is large enough to resist brute-force attacks. Statistical analysis shows that the scheme can well protect the image from the statistical attack. The scheme possesses high sensitivity to plain image and key, so it has a good ability to resist differential attack. With high-level security, it can be used in secure image communications.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work is supported by the National Natural Science Foundation of China (nos. 61073187, 61373028, and 61070154) and Guangzhou City Science and Technology Planning Project of China (11C42140691).
- X. Tong and M. Cui, “Image encryption with compound chaotic sequence cipher shifting dynamically,” Image and Vision Computing, vol. 26, no. 6, pp. 843–850, 2008.
- F. Sun, S. Liu, Z. Li, and Z. Lü, “A novel image encryption scheme based on spatial chaos map,” Chaos, Solitons and Fractals, vol. 38, no. 3, pp. 631–640, 2008.
- H. Liu and X. Wang, “Color image encryption based on one-time keys and robust chaotic maps,” Computers and Mathematics with Applications, vol. 59, no. 10, pp. 3320–3327, 2010.
- Z. Liu, Q. Guo, L. Xu, M. A. Ahmad, and S. Liu, “Double image encryption by using iterative random binary encoding in gyrator domains,” Optics Express, vol. 18, no. 11, pp. 12033–12043, 2010.
- G. Zhang and Q. Liu, “A novel image encryption method based on total shuffling scheme,” Optics Communications, vol. 284, no. 12, pp. 2775–2780, 2011.
- M. François, T. Grosges, D. Barchiesi, and R. Erra, “A new image encryption scheme based on a chaotic function,” Signal Processing, vol. 27, no. 3, pp. 249–259, 2012.
- S. M. Seyedzadeh and S. Mirzakuchaki, “A fast color image encryption algorithm based on coupled two-dimensional piecewise chaotic map,” Signal Processing, vol. 92, no. 5, pp. 1202–1215, 2012.
- Z. Zhu, W. Zhang, K. Wong, and H. Yu, “A chaos-based symmetric image encryption scheme using a bit-level permutation,” Information Sciences, vol. 181, no. 6, pp. 1171–1186, 2011.
- Z. Guan, F. Huang, and W. Guan, “Chaos-based image encryption algorithm,” Physics Letters A, vol. 346, no. 1–3, pp. 153–157, 2005.
- D. Xiao, X. Liao, and P. Wei, “Analysis and improvement of a chaos-based image encryption algorithm,” Chaos, Solitons and Fractals, vol. 40, no. 5, pp. 2191–2199, 2009.
- T. Gao and Z. Chen, “A new image encryption algorithm based on hyper-chaos,” Physics Letters A, vol. 372, no. 4, pp. 394–400, 2008.
- C. E. Shannon, “Communication theory of secrecy systems,” Bell System Technical Journal, vol. 28, no. 4, pp. 656–715, 1949.
- H. Liu and X. Wang, “Color image encryption using spatial bit-level permutation and high-dimension chaotic system,” Optics Communications, vol. 284, no. 16-17, pp. 3895–3903, 2011.
- X. Wang and C. Jin, “Image encryption using Game of Life permutation and PWLCM chaotic system,” Optics Communications, vol. 285, no. 4, pp. 412–417, 2012.
Copyright © 2014 Yuping Hu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.