Optics and Lasers in Engineering 92 (2017) 6–16
Contents lists available at ScienceDirect
Optics and Lasers in Engineering journal homepage: www.elsevier.com/locate/optlaseng
Multiple-image encryption algorithm based on mixed image element and permutation
MARK
⁎
Xiaoqiang Zhang , Xuesong Wang School of Information and Electrical Engineering, China University of Mining and Technology, Xuzhou 221116, China
A R T I C L E I N F O
A B S T R A C T
Keywords: Multiple-image encryption (MIE) Single-image encryption (SIE) Chaotic system Permutation Encryption efficiency
To improve encryption efficiency and facilitate the secure transmission of multiple digital images, by defining the pure image element and mixed image element, this paper presents a new multiple-image encryption (MIE) algorithm based on the mixed image element and permutation, which can simultaneously encrypt any number of images. Firstly, segment the original images into pure image elements; secondly, scramble all the pure image elements with the permutation generated by the piecewise linear chaotic map (PWLCM) system; thirdly, combine mixed image elements into scrambled images; finally, diffuse the content of mixed image elements by performing the exclusive OR (XOR) operation among scrambled images and the chaotic image generated by another PWLCM system. The comparison with two similar algorithms is made. Experimental results and algorithm analyses show that the proposed MIE algorithm is very simple and efficient, which is suitable for practical image encryption.
1. Introduction A large quantity of images are generated in many fields, such as military detection, natural disaster monitoring, traffic monitoring, weather forecasting, electronic government, and personal affairs. Meanwhile, the appearance of all kinds of shooting devices accelerates the age of big data during the past decade. For example, a common single lens reflex camera can shoot several images per second, and a traffic camera can shoot thousands of images per day at least. In the age of big data [1], digital images often carry many secrets or much privacy information. With the rapid development of computer and Internet, multimedia security, especially for image security becomes a challenge both for the academic research and industry. To ensure the security of image transmission, people have proposed many single-image encryption (SIE) algorithms. The main SIE algorithms include the image encryption algorithm based on the modern cryptosystem [2,3], the image encryption algorithm based on the matrix transform [4,5], the image encryption algorithm based on the chaotic system [6,7], the image encryption algorithm in the transform domain [8,9], and the image encryption algorithm based on the DNA computing [10,11]. However, several cryptanalytic works are also reported in recent year. By applying chosen plaintext, Zhu, et al. have broken an image encryption scheme based on Brownian motion and PWLCM chaotic system to reveal the plain image [12]. Bechikh, et al. have pointed and proved two flaws of an image encryption scheme
⁎
based on a spatiotemporal chaotic system. Therefore, this encryption scheme cannot resist the chosen plaintext attack [13]. Norouzi, et al. have broken an image encryption algorithm based on the new substitution stage with chaotic functions, and pointed that all the secret parameters can be revealed with the chosen plaintext attack [14]. In the age of big data, although multiple images can be repeatedly encrypted by the SIE algorithm in theory, the encryption efficiency is always undesirable. As a new multimedia security technology, that possesses high efficiency of secret information transmission, multipleimage encryption (MIE) has received increasing attention. Researchers have proposed several MIE algorithms based on the optical information processing system [15–19]. For example, Zhu, et al. proposed a MIE algorithm based on the wavelet transform [20]. Li, et al. proposed a MIE algorithm based on the cascaded fractional Fourier transform [21]. Nevertheless, most of these algorithms encrypt images in the transform domain and combine with the image compression technology, so the decryption images are always with some obvious distortion. Meanwhile, these algorithms require the data conversion between the spatial domain and the transform domain. Therefore, their encryption efficiency is always undesirable [22]. Meanwhile, in terms of the digital information processing means, Tang, et al. have proposed a MIE algorithm based on bit-plane decomposition and chaotic maps [23]. For the complex computation, the encryption efficiency is also undesirable. The main contribution of this paper are described as follows. (1) To
Corresponding author. E-mail address:
[email protected] (X. Zhang).
http://dx.doi.org/10.1016/j.optlaseng.2016.12.005 Received 13 August 2016; Received in revised form 8 November 2016; Accepted 5 December 2016 0143-8166/ © 2016 Elsevier Ltd. All rights reserved.
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
improve the encryption efficiency, this paper presents a new MIE algorithm based on the mixed image element and permutation; (2) This paper defines the conceptions of pure and mixed image elements; (3) This paper offers a method to generate a permutation and chaotic image with the chaotic system; (4) This paper introduces two similar algorithms and makes the comparison analyses; (5) To verify the feasibility of the new algorithm, this paper makes experiments. Experimental results show that the proposed algorithm is efficient and secure. The rest of paper is organized as follows. Section 2 is the theoretical principle. A new MIE algorithm is presented in Section 3. Section 4 introduces two similar existing algorithms. Experiments and algorithm analyses are given in Section 5. Conclusions are drawn in Section 6. 2. Theoretical principle 2.1. Chaotic system Fig. 2. The distribution of x with different p in 5000 iterations.
The piecewise linear chaotic map (PWLCM) system is defined by
⎧ xi 0 ≤ xi < p p ⎪ ⎪ xi − p xi +1 = Fp (xi ) = ⎨ p ≤ xi < 0.5 , ⎪ 0.5 − p ⎪ Fp (1 − xi ) 0.5 ≤ xi < 1 ⎩
(1)
where xi ∈ (0, 1) and control parameter p ∈ (0, 0.5) [24,25]. p can be served as a key. The PWLCM system has uniform invariant distribution and excellent ergodicity, confusion and determinacy, so it can generate a random sequence, which is suitable for cryptosystem [26,27]. Eq. (1) can generate a chaotic sequence with a given initial value x 0 and control parameter p . x 0 and p are viewed as keys in our proposed algorithm. The plot of PWLCM system is shown in Fig. 1. The distribution of x with different p of the PWLCM system is shown in Fig. 2.
Fig. 3. Cats.
2.2. Pure and mixed image elements With the knowledge of matrix theory, a big matrix can be easily divided into several small matrixes. Conversely, some small matrixes can constitute a big matrix. In the field of image processing, a digital gray image can be viewed as a matrix in nature. Therefore, it is easy to segment an image into an orderly group of small images with the modern computer technology. Similarly, it is also much easier to restore the original image from these small images. For example, Fig. 3 "Cats" can be easily segmented into 16 small image blocks with the equal size, as shown in Fig. 4. Meanwhile, the original image can be easily restored from these 16 small image blocks. Suppose that k original images are Im1 × n, Im2 × n, …, Imk × n . Im1 × n can be
Fig. 4. Small image blocks of cats.
segmented into small image blocks {Bi1}, whose sizes may be different. Any element Bi1 ∈ {Bi1} is called as the pure image element. Similarly, k sets of pure image elements can be obtained, i.e., {Bi1}, {Bi2}, …, {Bik }, which correspond to Im1 × n, Im2 × n, …, Imk × n , respectively. If all these pure image elements are mixed together, a new set C = {Bi1} ∪ {Bi2} ∪ ⋯ ∪ {Bik } can be generated. Any element Ci ∈ C is defined as the mixed image element. Inspired by the jigsaw puzzle, this paper designs a new MIE algorithm based on mixed image element and permutation. Without the key, it is very difficult to recover the original images from mixed
Fig. 1. The plot of PWLCM system.
7
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
image elements, especially for the case that the sizes of mixed image elements are very small. 2.3. Permutation generated by chaos In mathematics, the notion of permutation relates to the act of arranging all the members of a set into some sequence or order, or if the set is already ordered, rearranging (reordering) its elements, a process called permuting [28]. E.g., written as tuples, all the permutations of the set {1, 2, 3} are (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2) and (3, 2, 1). To encrypt the image with the permutation, a method to generate a random permutation of the set {1, 2, …, n} is designed with the PWLCM system as follows. Step 1: Choosing the seed of chaos. Randomly choose the initial value x 0 ∈ (0, 1) and the control parameter p1 ∈ (0, 0.5) of the PWLCM system. Step 2: Generating a chaotic sequence. Using x 0 and p , a chaotic sequence X = {x1, x2, …, xn} can be generated by iterating n times with Eq. (1). Step 3: Generating a random permutation. By sorting the chaotic sequence X in the ascending order, a new sequence X ′ = {xt1, xt 2, …, xtn} can be obtained. Therefore, t1, t2, …, tn is a random permutation of the set {1, 2, …, n}. 2.4. Chaotic image generated by chaos To encrypt the original images by performing the exclusive OR (XOR) operation, a chaotic image Im × n can be generated by the PWLCM system as follows. Step 1: Choosing the seed of chaos. Randomly choose the initial value x 0 ∈ (0, 1) and the control parameter p1 ∈ (0, 0.5) of the PWLCM system. Step 2: Generating a chaotic decimal sequence. Using x 0 and p , a chaotic sequence X = {x1, x2, …, xm × n} can be generated by iterating m × n times with Eq. (1). Step 3: Generating a chaotic integer sequence. A chaotic integer sequence Y = {y1, y2, …, ym × n } can be generated by
yi = mod(xi × 1015, 256),
Fig. 5. The flowchart of image encryption.
where s < min{m, n} is a positive integer and satisfies mod(m, s ) = 0 and mod(n , s ) = 0 . Therefore, the total number of all the pure image elements is k × mx × n y . Step 2: Generating the permutation. Alice randomly chooses the initial value x 0 ∈ (0, 1) and the control parameter p1 ∈ (0, 0.5) of the PWLCM system. Using the designed method described in Subsection 2.3, a permutation of the set {1, 2, …, k × mx × n y} can be generated by the PWLCM system. Step 3: Scrambling all the pure image elements. According to the order of pure image elements, Alice numbers the pure image elements 1, 2, …, k × mx × n y , and adjusts the positions of pure image elements with the permutation generated in Step 2. After that, the set of mixed image elements can be obtained. Step 4: Combining mixed image elements. Combine all the mixed image elements into k scrambled images with the equal size m × n , i.e., Jm1 × n, Jm2 × n, …, Jmk × n . Step 5: Generating the chaotic image. Alice randomly chooses the initial value y0 ∈ (0, 1) and the control parameter p2 ∈ (0, 0.5) of the PWLCM system. Using the method described in Subsection 2.4, the chaotic image C can be generated by the PWLCM system with given y0 and p2 . Step 6: Diffusing the content of mixed image elements. To diffuse the content of mixed image elements, calculate
(2)
where xi ∈ X and i = 1, 2, …, m × n . Step 4: Convert the integer sequence into a matrix. By converting the integer sequence Y into a matrix, a chaotic image Im × n can be obtained. 3. Proposed the MIE algorithm To simultaneously encrypt many images, this paper presents a new MIE algorithm based on the mixed image element and permutation. Supposing the following scenario, Alice is the sender and Bob is the recipient. The flowchart of image encryption is as shown in Fig. 5. The detailed encryption and decryption processes are described as follows. 3.1. Alice's encryption steps Alice performs the following steps to encrypt k original images. Step 1: Segmenting original images into pure image elements. To encrypt k original gray images with the equal size m × n , i.e., Im1 × n, Im2 × n, …, Imk × n . Alice segments these k images into k sets of pure image elements. Here, let the size of pure image elements be equal, i.e., s × s . Compute
mx =
m , s
(3)
ny =
n , s
(4)
J ′1 = J1 ⊕ C , J ′2 = J 2 ⊕ C , …, J ′k = J k ⊕ C ,
(5)
where ⊕ is the XOR operation between two images, and J ′1 , J ′2 , …, J ′k are the encrypted images. Note that the initial values x 0 , y0 and control parameters p1 , p2 of PWLCM systems, are the secret keys of our proposed algorithm, which are shared between Alice and Bob.
8
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
original image in this way, a new image can be obtained. By iterating several times, we can choose the transformed image with excellent encryption effect as the final encryption image. To encrypt k original images, Alice's encryption process are described as follows. Step 1: Let k original images be Im1 × n, Im2 × n, …, Imk × n . Here, the original image should be a square image. Compute the period of Arnold transformation T . Step 2: Randomly choose an integer r ∈ (0, T ) as the key of this algorithm. Step 3: By iterating r times on Im1 × n, Im2 × n, …, Imk × n , the transformed results is viewed as the cipher images. To decrypt the cipher images, Bob's decryption process are described as follows. Step 1: Compute the period of Arnold transformation T . Step 2: By iterating T − r times, original images can be obtained.
3.2. Bob's decryption steps For the decryption process, the same chaotic sequences are used on the encrypted images to obtain the original images. Bob's decryption process is the inverse process of Alice's encryption. 3.3. Key generation algorithm Key generation steps for the proposed algorithm are described as follows. Step 1: Combining the original images. Combine k original gray images Im1 × n, Im2 × n, …, Imk × n into a big image Im × kn = [Im1 × n, Im2 × n, …, Imk × n]. Step 2: Compute the hash value. In cryptography, SHA-256 is a most-widely used hash function with a 256-bit hash value [29]. Let the SHA-256 hash value of Im × kn be v . Step 3: Generating the keys. According to the order of bits, we segment v into four 64-bit parts, i.e., v1, v2, v3, v4 , and compute the values of these parts in decimal numbers. By Eqs. (6)–(9), we can compute the initial values x 0 , y0 and control parameters p1 , p2 of PWLCM systems, which are viewed as the secret keys in the proposed algorithm. The method to generate these keys is expressed clearly in Fig. 6.
v1 , 264
(6)
v2 y0 = 64 , 2
(7)
v3 p1 = 65 , 2
(8)
v4 p2 = 65 . 2
(9)
x0 =
4.2. Tang's algorithm Encryption steps of the MIE algorithm proposed by Tang, et al. (short for Tang's algorithm) are described as follows [23]. The flowchart of encryption process is as shown in Fig. 7. (1) Convert the four input gray images Im1 × n, Im2 × n, Im3 × n, Im4 × n into 32 bitplanes; (2) Use Henon map to determine the random bit-block pattern; (3) Using the method in Ref. [33], divide bit-planes into overlapping bit-blocks, and randomly swap bit-blocks among different bitplanes by the regulation designed by authors; (4) Convert 1st–8th, 9th–16th, 17th–24th and 25th–32nd bit-planes to four scrambled gray imagesJm1 × n, Jm2 × n, Jm3 × n, Jm4 × n respectively. Use Logistic map to generate a secure matrix C . Calculate J ′1 = J1 ⊕ C , J ′2 = J 2 ⊕ C , J ′3 = J 3 ⊕ C and J ′4 = J 4 ⊕ C , where ⊕ is the XOR operation between the corresponding elements of two input matrices; (5) The diffused images J ′1 , J ′2 , J ′3 and J′4 are viewed as the red, green, blue, and alpha components of the PNG image. Consequently, an encrypted PNG image is obtained by assembling these chaotic images.
4. Similar existing algorithms 4.1. Arnold transform algorithm Arnold transformation is a chaotic transformation, which is proposed by Vladimir Arnold in his study of ergodic theory [30]. It possesses the characteristics of simple algorithm, easy understanding and realization, excellent decentralization, iterative periodicity, keeping the pixel number unchanging, etc [31]. Arnold transformation is defined by [32]
⎛ x′⎞ ⎛1 1 ⎞ ⎛ x ⎞ ⎟ ⎜ ⎟ mod N , ⎜ ⎟=⎜ ⎝ y′⎠ ⎝1 2 ⎠ ⎝ y ⎠
5. Experiments and analyses To verify the proposed algorithm, k = 4 original gray images are as shown in Fig. 8, whose sizes are equal 512 × 512 . According to Subsection 3.3, keys are generated by the SHA-256 hash value of combined Figs. 8(a)-(d), i.e., 4011cfda10c4412f7ac289e45085c8939 3d9b4a763145b2036814ac6c15f7a06. The calculated results are x 0 = 0.250271788347860, y0 = 0.479530924073081,
(10)
where (x, y ) ∈ {0, 1, 2, …, N − 1} is a pixel position of the image IN × N , and (x′, y′) is a new pixel position. By removing all the pixels of the
Fig. 7. The flowchart of image encryption for Tang's algorithm [23].
Fig. 6. The method to generate keys.
9
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
Fig. 8. Original images. Fig. 10. 4 cipher images.
Therefore, this key space is large enough to resist the brute-force attack. 5.2. Key sensitivity analysis An efficient encryption scheme is highly sensitive to changes in the encryption and decryption keys. Applying a minor change to the encryption key, the second encrypted image should be quite different from the first encrypted image. Also if a very small difference exists between the encryption and decryption keys, the cipher image cannot be decrypted correctly [40]. In the following experiment, the original key x 0 = 0.250271788347860 is changed to 0.250271788347864 (just changing the last digit), and other keys are unchanged. To decrypt the cipher images in Fig. 10 with the new keys, the corresponding decrypted images are as shown in Fig. 11. For the corresponding images in Figs. 8 and 11, the different rates of pixels are listed in Table 1. These results show that a slight change to keys can lead to the decrypted images having no connection with the original images. As the sensitivity of keys y0 , p1 and p2 is the same as x 0 , we omit their examples here.
Fig. 9. Chaotic image.
p1 = 0.288770337517726 and p2 = 0.1064551 70404558 of the PWLCM systems. Let the size of pure image elements be the equal 8 × 8, i.e., s = 8. According to Section 2.4, the chaotic image is as shown in Fig. 9, which is generated by the PWLCM system with y0 and p2 . The four encrypted images are as shown in Fig. 10. The decrypted images are the same as original images in Fig. 8. In the view of cryptography, an effective encryption algorithm should have desirable features for withstanding all kinds of known attacks [33–35], such as the brute-force attack and statistical attack. The performance analyses of the proposed MIE algorithm are shown in detail as follows.
5.3. Gray histogram analysis Figs. 12 and 13 show the gray histograms of original images and encrypted images respectively. These histograms show that the pixel gray values of the original images are concentrated on some values, and the histograms of original images are very different from each other. Meanwhile, the histograms of cipher images are almost all the same and very uniform. Therefore, the features of original images are destroyed during the encryption process.
5.1. Key space analysis Key space size is the total number of different keys that can be used in an encryption algorithm. A good encryption algorithm needs to contain sufficiently large key space to make the brute-force attack infeasible. The high sensitive to initial conditions inherent to any chaotic system, i.e. exponential divergence of chaotic trajectories, ensure high security [36–39]. The proposed encryption algorithm actually does have some of the following secret keys: the initial values x 0 , y0 and control parameters p1 , p2 of the PWLCM system. Supposing that the computer precision is 10−15, so the key space is 1015×4 = 10 60 .
5.4. Information entropy analysis Information entropy can reflect the distribution state of pixel gray values in a digital image. If the distribution of pixel gray values is more uniform, the information entropy is larger. For an ideal random image, the emergence probabilities of all the gray levels are equal. In this case, 10
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
Fig. 11. 4 decrypted images. Table 1 The difference rate between Figs. 8 and 11. Images
Difference rate
Fig. Fig. Fig. Fig.
99.803% 99.727% 99.729% 99.852%
8(a) VS Fig. 11(a) 8(b) VS Fig. 11(b) 8(c) VS Fig. 11(c) 8(d) VS Fig. 11(d)
the value of information entropy is 8. Therefore, an effective encryption algorithm should make the information entropy tend to 8 [41]. Information entropy is defined by, 255
H (m ) = − ∑ P (mi )log2 P (mi ), i =0
(11)
where mi is the i th gray level for a digital image with 256 gray levels, 255 P (mi ) is the emergence probability of mi , and ∑i =0 P (mi ) = 1. For the encrypted images in Fig. 10, the values of the information entropy are as shown in Table 2. Therefore, the proposed MIE algorithm can be effective to resist the statistical attack. 5.5. Efficiency analysis (1) Computational complexity analysis Let k original gray images be Im1 × n, Im2 × n, …, Imk × n . Let the size of image blocks be equal, i.e., s × s . The computational complexity for converting a decimal pixel into 8-bit binary number, converting 8bit binary number into a decimal pixel, scrambling the position of a pixel or pixel block, XOR operation between two pixels is D , B , S and X , respectively. Here, we omit the computational time of segmenting images into blocks and combining blocks into images. Meanwhile, the computational complexity for once chaotic iteration is C , where we omit the difference among chaos systems, including the PWLCM chaotic system, Logistic map, Arnold transform, etc. (a) New algorithm: For the presented algorithm in this paper, to
Fig. 12. The histogram of original images.
11
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
Table 2 The information entropy values for encrypted images. Images
Entropy
Fig. Fig. Fig. Fig.
7.9992 7.9993 7.9992 7.9994
10(a) 10(b) 10(c) 10(d)
encrypt k original images, the main computation complexity includes the operation for scrambling kmx n y pure image elements by the permutation, kmx n y + mn chaotic iteration and the XOR operation. Therefore, the computation complexity is kmx n y S + (kmx n y + mn )C + kmnX in total. (b) Tang's algorithm: For Tang's algorithm, to encrypt k (k = 4 ) original images, the main computation complexity includes the operation for converting k gray images into 32 bit-planes, the operation for scrambling 32kmx n y bit-blocks among different bitplanes, the operation for converting 32 bit-planes into k gray images, mn chaotic iteration and the XOR operation. Therefore, the computation complexity is kmnD + 32kmx n y S + kmnB + mnC + kmnX in total. (c) Arnold transform algorithm: For Arnold transform algorithm, to encrypt k original images, the main computation complexity includes the chaotic iteration of Arnold transform and scrambling krmn pixels. Therefore, the computation complexity iskrmnC + krmnS in total. (2) Computational time analysis Four original gray images are as shown in Fig. 8. The encrypted image for Tang's algorithm is as shown in Fig. 14. The encrypted images for Arnold transform algorithm are as shown in Fig. 15, where r = 192 and T = 384 . These three algorithms are implemented with Matlab R2012a, running on a personal computer with 3.4 GHz Intel Core i53570 CPU and 4.0 GB Memory. The computational time for encrypting four gray images is listed in Table 3. The experimental results show that the new algorithm is very simple and efficient, which is suitable for practical image encryption. 5.6. Correlation coefficients analysis To test the correlation between two adjacent pixels (horizontally, vertically and diagonally adjacent) in the encryption image, we carry out some simulations. The correlation coefficient of each pair is calculated with [42],
γXY =
cov(X , Y ) , D (X ) D (Y )
(12)
where X and Y are the sets composed of N pixel gray values, xi ∈ X and N 1 yi ∈ Y are two adjacent pixels, E (X ) = N ∑i =1 xi ,
D (X ) =
1 N
N
∑i =1 [xi − E (X )]2
Fig. 13. The histogram of encrypted images.
Fig. 14. Cipher image [23].
12
and
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
Fig. 15. Cipher images. Table 3 Computational time (unit: s). Algorithms
Time
Tang's algorithm Arnoldtransform algorithm New algorithm
9.656 [23] 955.5075 0.7103
1
N
cov(X , Y ) = N ∑i =1 [xi − E (X )][yi − E (Y )]. We randomly select 16,384 pairs of adjacent pixels (in horizontal, vertical and diagonal directions) from the original and encrypted images, and calculate their correlation coefficients of two adjacent pixels. Taking Figs. 8(a) and 10(a) as examples, Figs. 16 and 17 can reflect their horizontal, vertical and diagonal relevance for adjacent pixels respectively. Their correlation coefficients listed in Tables 4 and 5 show that the relevance of the adjacent pixels is reduced greatly. The correlation coefficients of original images are nearly equal to one, while the correlation coefficients of cipher images is nearly equal to zero. These results indicates that the proposed algorithm works well to protect the image data. 5.7. Histogram variance analysis The histogram variance for the gray image is defined by
Var (X ) =
1 256
Fig. 16. Adjacent pixel correlation of Fig. 8(a).
256
∑ [xi − E (X )]2 , i =1
(13)
algorithm, the values of histogram variances for corresponding cipher images are listed in Table 6, i.e., Figs. 14, 15 and 10. Here, we test the red, green, blue, and alpha components of the PNG image for the Tang's algorithm. Table 6 shows that the superiority of the new algorithm is obvious over other two algorithms.
where X is a vector of the pixel numbers for 256 gray levels, xi ∈ X is 256 1 the pixel number for the i th gray levels, and E (X ) = 256 ∑i =1 xi . The histogram variance can show the effect of the cipher image to some extent. For an ideal random image, the emergence probabilities of all the gray levels are equal. In this case, the value of histogram variance is 0. Therefore, an effective encryption algorithm should make the histogram variance tend to 0. For the Tang's algorithm, Arnold transform algorithm and new
5.8. Blocking effect analysis Generally speaking, the size of image blocks can affect the effect of 13
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
Table 5 Correlation coefficients of the cipher images. Directions
Horizontal
Vertical
Diagonal
Fig. Fig. Fig. Fig.
0.0003 −0.0033 0.0003 −0.0019
−0.0010 0.0021 0.0020 0.0038
0.0043 0.0057 0.0043 0.0022
10(a) 10(b) 10(c) 10(d)
Table 6 Histogram variances for three algorithms. Algorithms
Tang's algorithm
Arnold transform algorithm
New algorithm
Fig. Fig. Fig. Fig.
1261.8 1192.3 1213.1 8710.3
564,880 332,660 1,541,900 1,200,100
1155.5 989.6 1111.6 929.6
8(a) 8(b) 8(c) 8(d)
cipher images. This effect can be reduced by adjusting the size of the image blocks. However, for the proposed algorithm, the content of mixed image elements are diffused by performing the XOR operation among scrambled images and the chaotic image generated by another PWLCM system. Therefore, this block effect can be omitted here. The effect of cipher images is as shown in Fig. 10. 5.9. Differential attack analysis Attackers often use the encryption algorithm to encrypt the original image before and after changing, through comparing two encrypted images to find out the relationship between original image and encrypted image. This type of attack is called as the differential attack [43]. Therefore, an excellent encryption algorithm should have the desirable property of spreading the influence of slight change to the plaintext over as much to the cipher text as possible. The researcher usually utilizes NPCR (Number of Pixels Change Rate) and UACI (Unified Average Changing Intensity) as two criterions to examine the performance of resisting the differential attack. Their definitions are described as follows,
⎧ 0 I ′(i , j ) = I ″(i , j ) f (i , j ) = ⎨ , ⎩ 1 I ′(i , j ) ≠ I ″(i , j ) ⎪ ⎪
m n ∑i =1 ∑ j =1 f
NPCR =
m×n m
UACI =
(i , j ) × 100%,
(15)
n
∑i =1 ∑ j =1 I ′(i , j ) − I ″(i , j ) 255 × m × n
× 100%,
(16)
where I ′(i , j ) and I ″(i , j ) are the cipher images corresponding to the original image before and after slightly changing respectively. In the experiment, a pixel I (34, 56) = 140 in Fig. 8(a) is chosen randomly. To test the ability to resist the differential attack, the gray value of this pixel is changed to 225. The results of Figs. 8(a)-(d) are listed in Table 7. This result show that a slight change to the original images will result in a great change in all the encrypted images. The results also imply that the proposed algorithm has an excellent ability to resist the differential attack.
Fig. 17. Adjacent pixel correlation of Fig. 10(a). Table 4 Correlation coefficients of the original images.
Table 7 NPCR and UACI values.
Directions
Horizontal
Vertical
Diagonal
Fig. Fig. Fig. Fig.
0.9757 0.9228 0.9383 0.9439
0.9729 0.8597 0.9715 0.8687
0.9685 0.8476 0.9224 0.8334
8(a) 8(b) 8(c) 8(d)
(14)
14
Images
NPCR
UACI
Fig. Fig. Fig. Fig.
99.61% 99.64% 99.60% 99.62%
33.44% 33.50% 33.49% 33.55%
8(a) 8(b) 8(c) 8(d)
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang
[20] Zhu Wei, Yang Geng, Chen Lei, Xu Jian. Multiple-image encryption based on wavelet transform and improved double random phase encoding. J Nanjing Univ Posts Telecommun (Nat Science) 2014;34(5):87–92. [21] Li Yanbin, Zhang Feng, Li Yuanchao, Tao Ran. Asymmetric multiple-image encryption based on the cascaded fractional Fourier transform. Opt Lasers Eng 2015;72(6):18–25. [22] Zhang Xiaoqiang, Zhu Guiliang, Ma Shilong. Remote-sensing image encryption in hybrid domains. Opt Commun 2012;285(7):1736–43. [23] Tang Zhenjun, Song Juan, Zhang Xianquan, Sun Ronghai. Multiple-image encryption with bit-plane decomposition and chaotic maps. Opt Lasers Eng 2016;80(5):1–11. [24] Wang Xingyuan, Xu Dahai. A novel image encryption scheme based on Brownian motion and PWLCM chaotic system. Nonlinear Dyn 2014;75(1–2):345–53. [25] Xiang Tao, Liao Xiaofeng, Wong Kwok-wo. An improved particle swarm optimization algorithm combined with piecewise linear chaotic map. Appl Math Comput 2007;190(2):1637–45. [26] Liu Hongjun, Wang Xingyuan. Color image encryption using spatial bit-level permutation and high-dimension chaotic system. Opt Commun 2011;284(16– 17):3895–903. [27] Liu Hongjun, Wang Xingyuan. Color image encryption based on one-time keys and robust chaotic maps. Comput Math Appl 2010;59(10):3320–7. [28] Wikipedia: Permutation. 〈https://en.wikipedia.org/ wiki/Permutation〉. July 17th, 2016. [29] Michail Harris E, Athanasiou George S, Theodoridis George, Gregoriades Andreas, Goutis Costas E. Design and implementation of totally-self checking SHA-1 and SHA-256 hash functions’ architectures. Microprocess Microsyst 2016;45(B):227–40. [30] Arnold VI. Ergodic problems of classical mechanics. Mathematical physics monograph series. New York: WA Ben jams in Inc; 1968. [31] Zhang Xiaoqiang, Zhu Guiliang, Wang Weiping, Wang Mengmeng, Ma Shilong. Period law of discrete two-dimensional Arnold transformation. In: Proceedings of the 2010 fifth international conference on frontier of computer science and technology; 1968. p. 565–9. [32] The Free Encyclopedia: Arnold’s Cat Map. 〈https://en.wikipedia.org/wiki/Arnold %27s_cat_map〉. September 13, 2016. [33] Li Chengqing, Liu Yuansheng, Xie Tao, Michael , Chen ZQ. Breaking a novel image encryption scheme based on improved hyperchaotic sequences. Nonlinear Dyn 2013;73(3):2083–9. [34] Zhu Congxu, Xu Siyuan, Hu Yuping, Sun Kehui. Breaking a novel image encryption scheme based on Brownian motion and PWLCM chaotic system. Nonlinear Dyn 2014;79(2):1511–8. [35] Zhang Yushu, Xiao Di, Wen Wenying, Li Ming. Breaking an image encryption algorithm based on hyper-chaotic system with only one round diffusion process. Nonlinear Dyn 2014;76:1645–50. [36] Yao Wang, Zhang Xiao, Zheng Zhiming, Qiu Wangjie. A colour image encryption algorithm using 4-pixel Feistel structure and multiple chaotic systems. Nonlinear Dyn 2015;81(1–2):151–68. [37] Zhao Jianfeng, Wang Shuying, Chang Yingxiang, Li Xianfeng. A novel image encryption scheme based on an improper fractional-order chaotic system. Nonlinear Dyn 2015;80:1721–9. [38] Tong Xiao Jun, Wang Zhu, Zhang Miao, Liu Yang, Xu Hui, Ma Jing. An image encryption algorithm based on the perturbed high-dimensional chaotic map. Nonlinear Dyn 2015;80(3):1493–508. [39] Cheng Pingguang, Yang Huaqian, Wei Pengcheng, Zhang Wei. A fast image encryption algorithm based on chaotic map and lookup table. Nonlinear Dyn 2015;79(3):2121–31. [40] Parvin Zahra, Seyedarabi Hadi, Shamsi Mousa. Breaking an image encryption algorithm based on the new substitution stage with chaotic functions. Multimed Tools Appl 2016;75(17):10631–48. [41] Tang Zhenjun, Zhang Xianquan, Lan Weiwei. Efficient image encryption with block shuffling and chaotic map. Multimed Tools Appl 2015;74(15):5429–48. [42] Liu Hongjun, Wang Xingyuan. Color image encryption based on one-time keys and robust chaotic maps. Comput Math Appl 2010;59(10):3320–7. [43] Belazi Akram, Abd El-Latif Ahmed A, Belghith Safya. A novel image encryption scheme based on substitution-permutation network and chaos. Signal Process 2016;128(11):155–70.
6. Conclusions This paper proposes a MIE algorithm based on the mixed image element and permutation, which can encrypt k images at once, where k can be designated by the user. This paper defines the conceptions of pure and mixed image elements, and designs a method to generate a permutation and chaotic image with the chaotic system. Comparison experiments with Arnold transform algorithm and Tang's algorithm are made. To encrypt 4 original images with the equal size 512 × 512 , the encryption processing time is only 0.7103 s for the new algorithm. Experimental results and algorithm analyses show that the new algorithm is very efficient and secure, which is suitable for practical image encryption. E.g., the new algorithm can be applied in military, aerospace, national security, electronic government, personal affairs, and other fields. Acknowledgments The research work of this paper is supported by the Fundamental Research Funds for the Central Universities (2015QNA68). Authors would like to express their sincere thanks to the Editor Anand K Asundi, Ph.D. and two anonymous reviewers for their constructive comments and suggestions. References [1] Wei Guiyi, Shao Jun, Xiang Yang, Zhu Pingping, Lu Rongxing. Obtain confidentiality or / and authenticity in Big Data by ID-based generalized signcryption. Inf Sci 2015;318(10):111–22. [2] Zhu Guiliang, Zhang Xiaoqiang. Mixed image element encryption algorithm based on an elliptic curve cryptosystem. J Electron Imaging 2008;17(2):1–5. [3] Wadi Salim M, Zainal Nasharuddin. Rapid encryption method based on AES algorithm for grey scale HD image encryption. Procedia Technol 2013;11(12):51–6. [4] You Suping, Lu Yucheng, Zhang Wei, Yang Bo, Peng Runling, Zhuang Songlin. Micro-lens array based 3-D color image encryption using the combination of gravity model and Arnold transform. Opt Commun 2015;355(15):419–26. [5] Zhu Hegui, Zhao Cheng, Zhang Xiangde, Yang Lianping. An image encryption scheme using generalized Arnold map and affine cipher. Opt-Int J Light Electron Opt 2014;125(22):6672–7. [6] Zhou Guomin, Zhang Daxing, Liu Yanjian, Yuan Ying, Liu Qiang. A novel image encryption algorithm based on chaos and Line map. Neurocomputing 2015;169(12):150–7. [7] Chen Junxin, Zhu Zhiliang, Fu Chong, Yu Hai, Zhang Libo. A fast chaos-based image encryption scheme with a ynamic state variables selection mechanism. Commun Nonlinear Sci Numer Simul 2015;20(3):846–60. [8] Liu Zhengjun, Xu Lie, Liu Ting, Chen Hang, Li Pengfei, Lin Chuang, Liu Shutian. Color image encryption by using Arnold transform and color-blend operation in discrete cosine transform domains. Opt Commun 2011;284(1):123–8. [9] Kumar Singh Amit, Mayank Dave, Anand Mohan. Multilevel encrypted text watermarking on medical images using spread-spectrum in DWT domain. Wirel Pers Commun 2015;83(3):2133–50. [10] Zhang Qiang, Liu Lili, Wei Xiaopeng. Improved algorithm for image encryption based on DNA encoding and multi-chaotic maps. AEU-Int J Electron Commun 2014;68(3):186–92. [11] Wang Xingyuan, Zhang Yingqian, Bao Xuemei. A novel chaotic image encryption scheme using DNA sequence operations. Opt Lasers Eng 2015;73(10):53–61. [12] Zhu Congxu, Xu Siyuan, Hu Yuping, Sun Kehui. Efficient image encryption with block shuffling and chaotic map. Multimed Tools Appl 2015;74(15):5429–48. [13] Bechikh Rabei, Hermassi Houcemeddine, Abd El-Latif Ahmed A, Rhouma Rhouma, Belghith Safya. Breaking an image encryption scheme based on a spatiotemporal chaotic system. signal processing. Image Commun 2015;39(A):151–8. [14] Norouzi Benyamin, Mirzakuchaki Sattar. Breaking an image encryption algorithm based on the new substitution stage with chaotic functions. Optik 2016;127(14):5695–701. [15] Wan Yuhong, Wu Fan, Yang Jinghuan, Man Tianlong. Multiple-image encryption based on compressive holography using a multiple-beam interferometer. Opt Commun 2015;342(5):95–101. [16] Liu Wei, Xie Zhenwei, Liu Zhengjun, Zhang Yan, Liu Shutian. Multiple-image encryption based on optical asymmetric key cryptosystem. Opt Commun 2015;335(1):205–11. [17] Wang Qu, Guo Qing, Lei Liang. Multiple-image encryption system using cascaded phase mask encoding and a modified Gerchberg-Saxton algorithm in gyrator domain. Opt Commun 2014;320(6):12–21. [18] Qin Yi, Gong Qiong. Multiple-image encryption in an interference-based scheme by lateral shift multiplexingle. Opt Commun 2014;315(3):220–5. [19] Zhao Haozhi, Liu Juan, Jia Jia, Zhu Nan, Xie Jinghui, Wang Yongtian. Multipleimage encryption based on position multiplexing of Fresnel phase. Opt Commun 2013;286(3):85–90.
Xiaoqiang Zhang received the Ph.D. degree from Beihang University in 2013. He is currently a lecturer in the School of Information and Electrical Engineering, China University of Mining and Technology. His main research interests include multimedia security and signal processing.
15
Optics and Lasers in Engineering 92 (2017) 6–16
X. Zhang, X. Wang Xuesong Wang received the Ph.D. degree from China University of Mining and Technology in 2002. She is currently a professor in the school of Information and Electrical Engineering, China University of Mining and Technology. Her main research interests include machine learning and pattern recognition.
16