Multiple-Image Encryption Algorithm Based on the 3 D Permutation Model and Chaotic System

Abstract: Large numbers of images are produced in many fields every day. The content security of digital images becomes an important issue for scientists and engineers. Inspired by the magic cube game, a three-dimensional (3D) permutation model is established to permute images, which includes three permutation modes, i.e., internal-row mode, internal-column mode, and external mode. To protect the image content on the Internet, a novel multiple-image encryption symmetric algorithm (block cipher) with the 3D permutation model and the chaotic system is proposed. First, the chaotic sequences and chaotic images are generated by chaotic systems. Second, the sender permutes the plain images by the 3D permutation model. Lastly, the sender performs the exclusive OR operation on permuted images. The simulation and algorithm comparisons display that the proposed algorithm possesses desirable encryption images, high security, and efficiency.


Introduction
Massive electronic shooting devices can generate a huge mass of images in many fields every day, such as vehicular traffic, medical care, and commerce.According to a statistics report, millions of video monitors were installed for the Chinese sky net project.These electronic shooting devices can generate billions of traffic images every day.In the hospital, X-ray, CT, or MRI examinations for patients generate many medical images.The famous retail platform-Taobao website-possesses billions of commodity images.These massive images are always related to the business secrets and even national security.How to protect these images attracts the attention of many scientists and engineers.
To protect image security, the experts of multimedia security have presented a variety of image encryption algorithms.Wang et al. proposed an image encryption algorithm with mixed hash functions [1].Chai et al. presented an image encryption algorithm using a chaotic system and compressive sensing [2].Wu et al. presented a color image DNA encryption with an NCA map-based CML [3].Gan et al. proposed an image encryption algorithm using S-boxes and a chaotic system [4].Ahmad et al. presented an image encryption algorithm using SHA-512 and hyper-chaos [5].Bashir et al. presented an image encryption algorithm with Lv's hyper-chaotic system [6].Hua et al. presented an image encryption algorithm with two-dimensional Logistic-Sine-coupling map (2D-LSCM) [7].Wu et al. presented an image encryption algorithm with two-dimensional Henon-Sine map (2D-HSM) [8].Nevertheless, these algorithms are single-image encryption algorithms, which cannot make full use of the features of massive images.
The experts of multimedia security have paid more attention to the multiple-image encryption (MIE) technology in recent years.To protect the optical images, they have designed some MIE algorithms.Liu et al. presented an MIE algorithm with an asymmetric cryptosystem [9].Di  proposed an MIE algorithm by the phase retrieval [10].Xiong et al. presented an MIE algorithm in the Fourier domain [11].Zhang et al. presented an MIE algorithm with compressive sensing [12].Li et al. designed an MIE algorithm with the lifting wavelet transform [13].Deng et al. presented an MIE algorithm with the Fourier transform [14].Yuan et al. proposed an MIE algorithm with a single-pixel detector [15].However, these MIE algorithms are designed with the features of optical images, which are not suitable for encrypting the digital images.Therefore, they have also presented some MIE algorithms to protect digital images.Li et al. proposed an MIE algorithm in the wavelet transform domain [16].However, the decryption image is lossy and only contains the low-frequency coefficients of the plain images.Zhang et al. proposed two MIE algorithms by scrambling mixed image elements [17,18].These algorithms are very efficient, but they stimulate the block effect especially for the large size of the image blocks.Meanwhile, Zhang et al. proposed an MIE algorithm with DNA encoding [19].This algorithm is secure, but it is a little complex for the DNA encoding and decoding operations.Suri et al. presented an MIE algorithm with Cramer's rule [20].Das et al. presented an MIE algorithm with genetic operators [21].However, these two algorithms can only encrypt two plain images at once.To simultaneously protect multiple images, this paper establishes a three-dimensional (3D) permutation model and then designs a novel MIE algorithm with the 3D permutation model.Simulation results display the superiority of the proposed algorithm.
The main contributions of this manuscript include the following.(1) Inspired by the magic cube game, we establish a 3D permutation model, which includes three permutation modes, i.e., internal-row mode, internal-column mode, and external mode.(2) We propose an MIE algorithm based on the 3D permutation model and chaotic system.(3) We compare the proposed algorithm with eight similar algorithms, i.e., Hua's Algorithm, Wu's Algorithm, Li's algorithm, Zhang's Algorithms 1, 2, and 3, Suri's algorithm, and Das's Algorithm.(4) Simulation results and algorithm analyses show the superiority of the proposed algorithm in terms of the security and efficiency.
The paper is organized as: Section 2 establishes a 3D permutation model and introduces the chaotic systems.Section 3 proposes a novel MIE algorithm.Section 4 describes eight existing algorithms.Section 5 is the experiment.The performance of the proposed algorithm are discussed in Section 6. Section 7 concludes the whole paper.

3D Permutation Model
Rubik's cube is a famous 3D intelligence game, which was invented by a Hungarian professor named Rubik in 1974 [22].It is also called the magic cube.Figure 1a-c show the magic cubes with three, four, and five orders, respectively.For the three-order magic cube, the blocks can be rotated in three different directions, as shown in Figure 2, and the number of its variation cases is 43,252,003, 274,489,856,000 in total.With the increase of the order, the difficult degree increases exponentially.Therefore, it is very difficult to successfully combine a magic cube for a layman.proposed an MIE algorithm by the phase retrieval [10].Xiong et al. presented an MIE algorithm in the Fourier domain [11].Zhang et al. presented an MIE algorithm with compressive sensing [12].Li et al. designed an MIE algorithm with the lifting wavelet transform [13].Deng et al. presented an MIE algorithm with the Fourier transform [14].Yuan et al. proposed an MIE algorithm with a single-pixel detector [15].However, these MIE algorithms are designed with the features of optical images, which are not suitable for encrypting the digital images.Therefore, they have also presented some MIE algorithms to protect digital images.Li et al. proposed an MIE algorithm in the wavelet transform domain [16].However, the decryption image is lossy and only contains the low-frequency coefficients of the plain images.[21].However, these two algorithms can only encrypt two plain images at once.
To simultaneously protect multiple images, this paper establishes a three-dimensional (3D) permutation model and then designs a novel MIE algorithm with the 3D permutation model.Simulation results display the superiority of the proposed algorithm.
The main contributions of this manuscript include the following.(1) Inspired by the magic cube game, we establish a 3D permutation model, which includes three permutation modes, i.e., internalrow mode, internal-column mode, and external mode.(2) We propose an MIE algorithm based on the 3D permutation model and chaotic system.(3) We compare the proposed algorithm with eight similar algorithms, i.e., Hua's Algorithm, Wu's Algorithm, Li's algorithm, Zhang's Algorithms 1, 2, and 3, Suri's algorithm, and Das's Algorithm.(4) Simulation results and algorithm analyses show the superiority of the proposed algorithm in terms of the security and efficiency.
The paper is organized as: Section 2 establishes a 3D permutation model and introduces the chaotic systems.Section 3 proposes a novel MIE algorithm.Section 4 describes eight existing algorithms.Section 5 is the experiment.The performance of the proposed algorithm are discussed in Section 6. Section 7 concludes the whole paper.

3D Permutation Model
Rubik's cube is a famous 3D intelligence game, which was invented by a Hungarian professor named Rubik in 1974 [22].It is also called the magic cube.Figures 1a-c show the magic cubes with three, four, and five orders, respectively.For the three-order magic cube, the blocks can be rotated in three different directions, as shown in Figure 2, and the number of its variation cases is 43,252,003, 274,489,856,000 in total.With the increase of the order, the difficult degree increases exponentially.Therefore, it is very difficult to successfully combine a magic cube for a layman.The image permutation and diffusion are two main means for the image encryption technology.The operation of image permutation only changes pixel positions.Conversely, the operation of image diffusion only changes pixel values.Inspired by the magic cube, we built a 3D permutation model for image encryption.For k plain images with the same size mn  , we can combine them into an image cube with the size mnk  , which is shown in Figure 3.The pixel in the image cube is the counterpart of the block in the magic cube.Similarly, three permutation modes are designed for image encryption, i.e., internal-row mode, internal-column mode, and external mode.The first two modes permute pixel positions in one plain image.The last mode permutes pixel positions among all the plain images.These modes are described in detail below.(2) Internal-column mode: for a plain image r can be generated by the chaotic system here.For the i th-columns pixels, this mode performs the cyclic-shift operation with i r pixel positions to the up or down directions.If the sender performs the cyclic-shift operation to the up direction at the encryption stage, then the recipient should carry out the same operation to the down direction at the decryption stage.Otherwise, the recipient should carry out the same operation to the up direction at the decryption stage.
(3) External mode: the size of plain images 12 , , , k I I I are mn  .To permute their pixel positions, a random number The image permutation and diffusion are two main means for the image encryption technology.The operation of image permutation only changes pixel positions.Conversely, the operation of image diffusion only changes pixel values.Inspired by the magic cube, we built a 3D permutation model for image encryption.For k plain images with the same size mn  , we can combine them into an image cube with the size mnk  , which is shown in Figure 3.The pixel in the image cube is the counterpart of the block in the magic cube.Similarly, three permutation modes are designed for image encryption, i.e., internal-row mode, internal-column mode, and external mode.The first two modes permute pixel positions in one plain image.The last mode permutes pixel positions among all the plain images.These modes are described in detail below.(1) Internal-row mode: for a plain image I 1 m×n , its pixels are listed in m rows.To permute its pixel positions, a random number r i ∈ {1, 2, • • • , n}, i = 1, 2, • • • , m is chosen for every row.A random sequence {r i } m can be generated by the chaotic system here.For the ith-row pixels, this mode performs the cyclic-shift operation with r i pixel positions to the right or left directions.If the sender performs the cyclic-shift operation to the right direction at the encryption stage, then the recipient should carry out the same operation to the left direction at the decryption stage.Otherwise, the recipient should carry out the same operation to the right direction at the decryption stage.
(2) Internal-column mode: for a plain image I 1 m×n , its pixels are listed in n columns.Regarding its permute pixel positions, a random number r i ∈ {1, 2, • • • , m}, i = 1, 2, • • • , n is chosen for every column.A random sequence {r i } n can be generated by the chaotic system here.For the ith-columns pixels, this mode performs the cyclic-shift operation with r i pixel positions to the up or down directions.If the sender performs the cyclic-shift operation to the up direction at the encryption stage, then the recipient should carry out the same operation to the down direction at the decryption stage.Otherwise, the recipient should carry out the same operation to the up direction at the decryption stage.
(3) External mode: the size of plain images I 1 , I 2 , • • • , I k are m × n.To permute their pixel positions, a random number r ij ∈ {1, 2, • • • , k} is chosen for the pixel I 1 ij ∈ I 1 .A random matrix R = r ij m×n can be obtained by the chaotic system in this case.For the pixel I 1 ij , this mode performs the cyclic-shift operation with r ij pixel positions to the front or back directions.If the sender performs the cyclic-shift operation to the front direction at the encryption stage, then the recipient should carry out the same operation to the back direction at the decryption stage.Otherwise, the recipient should carry out the same operation to the front direction at the decryption stage.

Chaotic Systems
The two-dimensional (2D) Logistic map and the Piece-Wise Linear Chaotic Map (PWLCM) are two commonly used chaotic systems.They can generate chaotic sequences to encrypt images.In this paper, two chaotic sequences generated by two PWLCM systems are used to permute pixel positions with the internal-row and internal-column modes, respectively.At the same time, the 2D Logistic map can generate two chaotic sequences.One is used to permute pixel positions with the external mode.The other is used to diffuse the pixel values.
where z i ∈ [0, 1) and p ∈ (0, 0.5).Its initial value z 0 and p are keys for the proposed algorithm.

Key Generation
Secure hash algorithm (SHA) is a type of hash functions.SHA is primarily designed for the integrity services [25].SHA-256 is widely used and its output is a 256-bit hash value.The proposed algorithm uses SHA-256 to generate keys as follows.To further improve the efficiency, users can use other much faster hash functions (such as Message Digest Algorithm-5, MD5) to substitute for SHA-256.
The proposed algorithm uses SHA-256 to generate the 256-bit hash value K of k plain images. where One 2D Logistic map and two PWLCM systems are used in the proposed algorithm.The initial values x 0 , y 0 and control parameters r 1 , r 2 , s 1 , s 2 of the 2D Logistic map are calculated by using the equations below.
Symmetry 2018, 10, 660 where ⊕ denotes the exclusive OR (XOR) operation in the binary system.The initial values z 1 0 , z 2 0 and control parameters p 1 , p 2 of two PWLCM systems are calculated by using the formulas below.

Alice's Encryption Process
Figure 4 is the encryption flowchart.First, k plain images are scrambled with the 3D permutation model.Second, k permuted images are diffused with the XOR operation.For an easy description, the sender and recipient are named as Alice and Bob, respectively.The encryption steps are described in detail as follows.
where  denotes the exclusive OR (XOR) operation in the binary system.The initial values 1 2 0 0 , z z and control parameters 1 2  , p p of two PWLCM systems are calculated by using the formulas below.

Alice's Encryption Process
Figure 4 is the encryption flowchart.First, k plain images are scrambled with the 3D permutation model.Second, k permuted images are diffused with the XOR operation.For an easy description, the sender and recipient are named as Alice and Bob, respectively.The encryption steps are described in detail as follows.Step 1: Generating the Key Step 1: Generating the Key k plain images are I 1 , I 2 , • • • , I k , whose sizes are m × n.She computes the variables x 0 , y 0 , r 1 , r 2 , s 1 , s 2 of the 2D Logistic map and the variables z 1 0 , z 2 0 , p 1 , p 2 of two PWLCM systems with the method described in Section 3.1.
Step 2: Generating the Chaotic Sequence The sender iterates PWLCM m times with z 1 0 and p 1 and then obtains a chaotic sequence where is the rounded-down function, and mod(•) is the modulo operation.Similarly, she iterates PWLCM n times with z 2 0 and p 2 and then obtains a chaotic sequence where Step 3: Generating the Chaotic Image Alice iterates the 2D Logistic map m × n times with x 0 , y 0 , r 1 , r 2 , s 1 , s 2 and then obtains two chaotic sequences X = {x i } mn and Y = {y i } mn .After that, she computes the following equations. where Step 4: Permutation with the Internal-Row Mode Alice performs the permutation with the internal-row mode on the plain image I 1 with the chaotic sequence R 1 .For the ith-row pixels, she performs the cyclic-shift operation with r i ∈ R 1 pixel positions to the right direction.Similarly, she performs the permutation with the internal-row mode on I 2 , I 3 , • • • , I k with R 1 .The permuted results are I 1r , I 2r , • • • , I kr .In addition, Alice can enhance the algorithm security by a different chaotic sequence for a different plain image.
Step 5: Permutation with the Internal-Column Mode Alice performs the permutation with the internal-column mode on I 1r with the chaotic sequence R 2 .For the ith-column pixels, she performs the cyclic-shift operation with r i ∈ R 2 pixel positions to the up direction.Similarly, she performs the permutation with the internal-column mode on I 2r , I 3r , • • • , I kr with R 2 .The permuted results are I 1c , I 2c , • • • , I kc .In addition, Alice can enhance the algorithm security by a different chaotic sequence for different I 1r , I 2r , • • • , I kr .
Step 6: Permutation with the External Mode Alice performs the permutation with the external mode on I 1c , I 2c , • • • , I kc with the chaotic matrix C 1 .For the pixel I 1c ij ∈ I 1c , she performs the cyclic-shift operation with c ij ∈ C 1 pixel positions to the front direction among I 1c , I 2c , • • • , I kc .The permuted images are I 1e , I 2e , • • • , I ke .
Step 7: Image Diffusion To diffuse the images, Alice performs the XOR operation between I 1e , I 2e , • • • , I ke and C 2 , The diffused results J 1 , J 2 , • • • , J k are the final encryption images.

Bob's Decryption Process
Figure 5 is the image decryption flowchart.First, Bob performs the XOR operation on k encrypted images.Second, he performs the inverse process of the 3D permutation model to recover the pixel positions.After Bob receives the keys x 0 , y 0 , r 1 , r 2 , s 1 , s 2 , z 1 0 , z 2 0 , p 1 , p 2 , he can decrypt J 1 , J 2 , • • • , J k with the following steps.
Step 1: Generating the Chaotic Sequence Bob iterates PWLCM m times with z 1 0 and p 1 and then obtains a chaotic sequence i m can be calculated with Equation (14).Similarly, he iterates PWLCM n times with z 2 0 and p 2 and then obtains a chaotic sequence Z 2 = z 2 i n .R 2 = r 2 i n that can be calculated with Equation (15).Step 2: Generating the Chaotic Image Bob iterates the 2D Logistic map m × n times with x 0 , y 0 , r 1 , r 2 , s 1 , s 2 and then obtains two chaotic sequences X = {x i } mn and Y = {y i } mn .According to the element positions and Equations ( 16) and ( 17), he can convert c 1 i mn into a chaotic matrix C 1 m×n and c 2 i mn into a chaotic image C 2 m×n .
Figure 5 is the image decryption flowchart.First, Bob performs the XOR operation on k encrypted images.Second, he performs the inverse process of the 3D permutation model to recover the pixel positions.After Bob receives the keys , , , , , , , , , x y r r s s z z p p , he can decrypt , , , k J J J with the following steps.
Step 1: Generating the Chaotic Sequence Bob iterates PWLCM m times with 1 0 z and 1 p and then obtains a chaotic sequence can be calculated with Equation (14).Similarly, he iterates PWLCM n times with 2 0 z and 2 p and then obtains a chaotic sequence that can be calculated with Equation (15).
Step 2: Generating the Chaotic Image Bob iterates the 2D Logistic map mn  times with 0 0 1 2 1 2 , , , , , x y r r s s and then obtains two chaotic sequences . According to the element positions and Equations ( 16) and ( 17), he can convert  Step 3: Image Diffusion Bob performs the XOR operation between 1 2  , , , k J J J and 2 C , The diffused results  Step 3: Image Diffusion Bob performs the XOR operation between J 1 , J 2 , • • • , J k and C 2 , The diffused results I 1e , I 2e , • • • , I ke are the permuted images.
Step 4: Permutation with the External Mode Bob performs the permutation with the external mode on I 1e , I 2e , • • • , I ke with the chaotic matrix C 1 .For the pixel I 1e ij ∈ I 1e , he performs the cyclic-shift operation with c ij ∈ C 1 pixel positions to the back direction among I 1e , I 2e , • • • , I ke .The permuted results are I 1c , I 2c , • • • , I kc .
Step 5: Permutation with the Internal-Column Mode Bob performs the permutation with the internal-column mode on I 1c and with the chaotic sequence R 2 .For the ith-column pixels, he performs the cyclic-shift operation with r i ∈ R 2 pixel positions to the down direction.Similarly, he performs the permutation with the internal-column mode on I 2c , I 3c , • • • , I kc with R 2 .The permuted results are I 1r , I 2r , • • • , I kr .
Step 6: Permutation with the Internal-Row Mode Bob performs the permutation with the internal-row mode on the image I 1r with the chaotic sequence R 1 .For the ith-row pixels, he performs the cyclic-shift operation with r i ∈ R 1 pixel positions to the left direction.Similarly, he performs the permutation with the internal-row mode on other images I 2r , I 3r , • • • , I kr with R 1 .The permuted results are the decryption images I 1 , I 2 , • • • , I k .

Hua's Algorithm
Hua et al. proposed an image algorithm (short for Hua's algorithm) [7].The encryption steps are described as follows.
Step 1: Alice generates two chaotic matrices S M×N and R M×N with the 2D-LSCM.
Step 2: Alice simultaneously permutes the row and column positions of the plain image P M×N in one operation and the permuted result is T.
Step 3: Alice diffuses T by where C is the encrypted image, G = N for the row diffusion, and G = M for the column diffusion.

Wu's Algorithm
Wu et al. proposed an image algorithm (short for Wu's algorithm) [8].The encryption steps are described below.
Step 1: the plain image is P m×n and Alice computes temp = ∑ i P i mod256.
Step 2: Alice generates the chaotic sequences x 1 , y 1 , x 2 , y 2 with the 2D-HSM and computes where round(•) is the function to obtain the nearest decimal or integer.
Step 3: Alice encodes R, P with the rules R z , R y , respectively, and the encoded results are DN A R , DN A P .
Step 5: Alice decodes DN A P1 with the rule R x , and the encoded result is New_P.
Step 6: Alice computes where D is the diffused result.
Step 7: Alice permutes D with x 1 to get the encrypted image C m×n .

Li's Algorithm
Li et al. proposed an MIE algorithm (short for Li's algorithm) [16].The encryption steps are described as follows.
Step 1: Alice performs the Discrete Wavelet Transform (DWT) for k plain images and combines low-frequency coefficients into the reassembled image.
Step 2: Alice scrambles the reassembled image with the Arnold cat map to get the confused image.
Step 3: Alice segments the confused image into k image blocks with an equal size.
Step 4: Alice scrambles, rotates, and diffuses these k image blocks with the chaotic map.
Step 5: Alice reassembles the result of Step 4 into the encryption image.

Zhang's Algorithm 1
Zhang et al. proposed an MIE algorithm (short for Zhang's Algorithm 1) [17].The encryption steps are described as follows.
Step 1: according to the given rule, Alice combines k plain images into a big image.After that, she segments the big image into image blocks, i.e., pure image elements.
Step 2: Alice scrambles pure image elements with PWLCM to obtain the mixed image elements.
Step 3: Alice generates the big-scrambled image with the mixed image elements.
Step 4: Alice segments the big-scrambled image into k encrypted images whose filenames are generated by PWLCM.
Step 1: Alice generates pure image elements.
Step 2: Alice scrambles pure image elements with PWLCM and then obtains the mixed image elements.
Step 3: Alice generates k scrambled images with mixed image elements.
Step 4: to get the encryption images, Alice performs the XOR operation on k scrambled images.
Step 1: according to the given rule, Alice encodes k plain images with the DNA codes.
Step 2: Alice scrambles the DNA sequences of plain images with PWLCM.
Step 3: Alice segments the scrambled DNA sequence into k parts and converts them into k scrambled DNA matrices.
Step 4: Alice performs the DNA XOR operation between k scrambled DNA matrices and the DNA matrix of the chaotic image generated by PWLCM and then obtains k diffused DNA matrices.
Step 5: Alice decodes k diffused DNA matrices to get the encryption images.

Suri's Algorithm
Suri et al. proposed an MIE algorithm (short for Suri's algorithm) [20].The encryption steps are described as follows.
Step 1: Alice encrypts two plain images with two different methods.Image 1 is encrypted by AES and Image 2 is encrypted by a chaotic-based image encryption algorithm.Encrypted images 1 and 2 can be obtained.
In this paper, the size of two plain images is m × n.For the chaotic-based image encryption algorithm, PWLCM is used to generate a chaotic sequence X = {x i } m×n .The integer chaotic sequence Y = {y i } m×n can be calculated by y i = mod f loor x i × 10 16 , 256 .Alice performs the XOR operation on Image 2 and Y.For the AES-based image encryption algorithm, Alice combines 16 pixel values to constitute the 128-bit data block and then uses AES-128 to encrypt the data block.
Step 2: inspired by the Cramer's rule, Alice combines two encrypted images by using the formulas below.
where w 11 , w 12 , w 21 , w 22 are weights, I , I are the encrypted images in Step 1, and I 1 , I 2 are the final encrypted images.In this paper, the weights are w 11 = 0.63, w 12 = 0.37, w 21 = 0.32, w 22 = 0.68.

Das's Algorithm
Das et al. proposed an MIE algorithm (short for Das's algorithm) [21].The encryption steps are described as follows.
Step 1: the pixel values of two plain images A = [a ij ] m×n and B = [b ij ] m×n can be expressed with 8 bits in the binary form, i.e., Step 2: Alice performs the crossover operation (i.e., exchanging bits between the pixel values a ij and b ij ) and mutation operation (i.e., complementing bits for pixel values a ij and b ij ).The pixel values of diffused images and ∼ denotes the complement operation.In this paper, r is simulated with the element of the integer chaotic sequence Y = {y i } m×n where y i = mod f loor x i × 10 16 , 8 + 1, x i ∈ X and X is a chaotic sequence generated by PWLCM.
Step 3: Alice performs the XOR operation on the diffused images C1 and C2 pixel-by-pixel with a random set E k to get encrypted images.In this paper, E k is simulated by a chaotic image generated by PWLCM.

Experiments
The experimental purpose is to encrypt nine plain images with the same size 512 × 512, as shown in Figure 6a-i, respectively.We developed the proposed algorithm, Hua's algorithm, Wu's algorithm, Li's algorithm, Zhang's Algorithms 1-3, Suri's algorithm, and Das's algorithm with Matlab R2016a.p = 0.378431372549020.For the proposed algorithm, the encryption images are shown in Figures 8a-i.The recipient can decrypt them with the decryption keys.The decrypted images are lossless, which means they are the same as plain images.
To encrypt the plain images in Figure 6 with Hua's algorithm, we repeatedly performed the encryption process nine times.The encryption images are shown in Figure 9.
To encrypt the plain images in Figure 6 with Wu's algorithm, we repeatedly performed the encryption process nine times.The encryption images are shown in Figure 10.
To encrypt the plain images in Figure 6 with Li's algorithm, Figure 11 is the reassembled image, which only contains the low-frequency coefficients of the plain images.Figure 12 is the encryption image.The decryption image is the same as Figure 11.For the proposed algorithm, the big image is in Figure 7. Figure 6a-i constitute the first-row, second-row, and third-row image blocks of the big image, respectively.Therefore, the size of the big image is 1536 × 1536.K = 0x 36fad8690b3812a24c2fa1e50a9d727c74a1e a2a48bca87f7fa20f543a8b8fc5.With Equations ( 3)-( 13), the variable values are x 0 = 0.07843137254902, y 0 = 0.352941176470588, r 1 = 3.392352941176471, r 2 = 3.043725490196079, s 1 = 0.203882352941176, s 2 = 0.143254901960784, z 1 0 = 0.203921568627451, z 2 0 = 0.039215686274510, p 1 = 0.190196078431373, and p 2 = 0.378431372549020.For the proposed algorithm, the encryption images are shown in Figure 8a-i.The recipient can decrypt them with the decryption keys.The decrypted images are lossless, which means they are the same as plain images.
To encrypt the plain images in Figure 6 with Hua's algorithm, we repeatedly performed the encryption process nine times.The encryption images are shown in Figure 9.
To encrypt the plain images in Figure 6 with Wu's algorithm, we repeatedly performed the encryption process nine times.The encryption images are shown in Figure 10.
To encrypt the plain images in Figure 6 with Li's algorithm, Figure 11 is the reassembled image, which only contains the low-frequency coefficients of the plain images.Figure 12 is the encryption image.The decryption image is the same as Figure 11.To encrypt the plain images in Figure 6 with Zhang's Algorithm 1, Figure 13a-i are the encryption images.In this scenario, the size of the mixed image elements is 32 × 32.To encrypt the plain images in Figure 6 with Zhang's Algorithm 2, the encryption images are shown in Figure 14a-i To encrypt the plain images in Figure 6 with Zhang's Algorithm 2, the encryption images are shown in Figures 14a-i.To encrypt the plain images in Figure 6 with Zhang's Algorithm 3, the encryption images are shown in Figures 15a-i  To encrypt the plain images in Figure 6 with Zhang's Algorithm 3, the encryption images are shown in Figure 15a-i.
To encrypt the plain images in Figure 6a,b with Suri's algorithm, the encryption images are shown in Figure 16a,b.
To encrypt the plain images in Figure 6a,b with Das's algorithm, the encryption images are shown in Figure 17a,b.
Therefore, the encryption images of Zhang's Algorithm 1 stimulate the block effect for the large size of image blocks.The encryption image of Li's algorithm is lossy and Bob can only recover the low-frequency coefficients of the plain images.However, the encryption images of the proposed algorithm, Hua's algorithm, Wu's algorithm, Li's algorithm, Zhang's Algorithms 2 and 3, Suri's algorithm, and Das's algorithm are very chaotic and have excellent encryption effects.To encrypt the plain images in Figures 6a,b with Suri's algorithm, the encryption images are shown in Figures 16a,b  To encrypt the plain images in Figures 6a,b with Das's algorithm, the encryption images are shown in Figures 17a,b   To encrypt the plain images in Figures 6a,b with Suri's algorithm, the encryption images are shown in Figures 16a,b  To encrypt the plain images in Figures 6a,b with Das's algorithm, the encryption images are shown in Figures 17a,b  Therefore, the encryption images of Zhang's Algorithm 1 stimulate the block effect for the large size of image blocks.The encryption image of Li's algorithm is lossy and Bob can only recover the   To encrypt the plain images in Figures 6a,b with Das's algorithm, the encryption images are shown in Figures 17a,b  Therefore, the encryption images of Zhang's Algorithm 1 stimulate the block effect for the large size of image blocks.The encryption image of Li's algorithm is lossy and Bob can only recover the

Algorithm Analyses
A desirable image encryption algorithm can resist several commonly used attacks.This paper discusses the performance of the proposed algorithm in detail.

Key Space Analysis
For the proposed algorithm, the keys are the variables x 0 , y 0 , r 1 , r 2 , s 1 , s 2 of 2D Logistic map and the variables z 1 0 , z 2 0 , p 1 , p 2 of two PWLCM systems.If the calculating precision is 10 −16 , the key space is 10 160 .For Hua's algorithm, its key space is 2 256 ≈ 1.16 × 10 77 .For Wu's algorithm, its key space is 10 128 .Nevertheless, for Zhang's Algorithms 1-3, Suri's algorithm, and Das's algorithm, their key spaces are 10 16×4 = 10 64 .Lastly, the key spaces of all these algorithm are very large, but the proposed algorithm has the largest key space.

Histogram Analysis
Figure 18a-i are the histograms of plain images, respectively.They are different from each other and these histograms concentrate on some gray levels.
algorithm, and Das's algorithm are very chaotic and have excellent encryption effects.

Algorithm Analyses
A desirable image encryption algorithm can resist several commonly used attacks.This paper discusses the performance of the proposed algorithm in detail.

Key Space Analysis
For the proposed algorithm, the keys are the variables 0 0 1 2 1 2 , , , , , x y r r s s of 2D Logistic map and the variables 1 2 1 2 00 , , , z z p p of two PWLCM systems.If the calculating precision is -16 10 , the key space is 160  10 .For Hua's algorithm, its key space is 256 77 2 1.16 10 .For Wu's algorithm, its key space is 128 10 .Nevertheless, for Zhang's Algorithms 1-3, Suri's algorithm, and Das's algorithm, their key spaces are 16 4   64 10 10   . Lastly, the key spaces of all these algorithm are very large, but the proposed algorithm has the largest key space.

Histogram Analysis
Figures 18a-i are the histograms of plain images, respectively.They are different from each other and these histograms concentrate on some gray levels.
( For the proposed algorithm, Figures 19a-i are the histograms of nine encryption images, respectively.They are similar to each other and the pixel number for the different gray levels is almost equal.For the proposed algorithm, Figure 19a-i are the histograms of nine encryption images, respectively.They are similar to each other and the pixel number for the different gray levels is almost equal. (g) ( For Wu's algorithm, Figures 21a-i are the histograms of nine encryption images, respectively.Wu's algorithm not only scrambles the pixel positions but also changes the pixel values.Therefore, the histograms of encryption images are desirable.(  For Wu's algorithm, Figure 21a-i are the histograms of nine encryption images, respectively.Wu's algorithm not only scrambles the pixel positions but also changes the pixel values.Therefore, the histograms of encryption images are desirable.For Wu's algorithm, Figures 21a-i are the histograms of nine encryption images, respectively.Wu's algorithm not only scrambles the pixel positions but also changes the pixel values.Therefore, the histograms of encryption images are desirable.(g) (h) (i) For Suri's algorithm, Figures 26a,b are the histograms of encryption images, respectively.Equations ( 27) and (28) obviously reduce the pixel numbers for the lower gray levels and higher gray levels.Therefore, these histograms are not uniform.For Suri's algorithm, Figures 26a,b are the histograms of encryption images, respectively.Equations ( 27) and (28) obviously reduce the pixel numbers for the lower gray levels and higher gray levels.Therefore, these histograms are not uniform.For Suri's algorithm, Figures 26a,b are the histograms of encryption images, respectively.Equations ( 27) and (28) obviously reduce the pixel numbers for the lower gray levels and higher gray levels.Therefore, these histograms are not uniform.For Suri's algorithm, Figure 26a,b are the histograms of encryption images, respectively.Equations ( 27) and (28) obviously reduce the pixel numbers for the lower gray levels and higher gray levels.Therefore, these histograms are not uniform.Therefore, for Zhang's Algorithm 1 and Suri's algorithm, the histograms of their encryption images are not uniform.However, for the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 2 and 3, and Das's algorithm, the histograms of their encryption images are desirable, which are very different from the histograms in Figure 18.

Correlation Analysis
The correlation coefficient of adjacent pixels is defined by the equations below.
where     , ED  denote the expectation and variance, respectively.
For the proposed algorithm, we take the first plain image and encryption image as examples to evaluate the performance of pixel correlation.We select randomly 5000 pixels from them and obtain their adjacent pixels.Figures 27 and 28 reflect their correlation.From Figure 27, we can see that the pixel correlation of the plain image is very strong.Figure 28 is very chaotic and shows that the pixel correlation of the encryption image is very weak.Therefore, for Zhang's Algorithm 1 and Suri's algorithm, the histograms of their encryption images are not uniform.However, for the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 2 and 3, and Das's algorithm, the histograms of their encryption images are desirable, which are very different from the histograms in Figure 18.

Correlation Analysis
The correlation coefficient of adjacent pixels is defined by the equations below.
where E(•), D(•) denote the expectation and variance, respectively.For the proposed algorithm, we take the first plain image and encryption image as examples to evaluate the performance of pixel correlation.We select randomly 5000 pixels from them and obtain their adjacent pixels.Figures 27 and 28 reflect their correlation.From Figure 27, we can see that the pixel correlation of the plain image is very strong.Figure 28 is very chaotic and shows that the pixel correlation of the encryption image is very weak.Therefore, for Zhang's Algorithm 1 and Suri's algorithm, the histograms of their encryption images are not uniform.However, for the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 2 and 3, and Das's algorithm, the histograms of their encryption images are desirable, which are very different from the histograms in Figure 18.

Correlation Analysis
The correlation coefficient of adjacent pixels is defined by the equations below.
where     , ED  denote the expectation and variance, respectively.For the proposed algorithm, we take the first plain image and encryption image as examples to evaluate the performance of pixel correlation.We select randomly 5000 pixels from them and obtain their adjacent pixels.Figures 27 and 28 reflect their correlation.From Figure 27, we can see that the pixel correlation of the plain image is very strong.Figure 28 is very chaotic and shows that the pixel correlation of the encryption image is very weak.Table 1 shows the correlation coefficients of plain images.For the proposed algorithm, Hua's algorithm, Wu's algorithm, Li's algorithm, and Zhang's Algorithms 1-3, Suri's algorithm, and Das's algorithm, the correlation coefficients are listed in Table 2.The data in Table 1 display that the correlation coefficients are very large.However, the data in Table 2 display that the correlation coefficients are very small for the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 2 and 3, Suri's algorithm, and Das's algorithm.However, for Zhang's Algorithm 1, the correlation coefficients in Table 2 are very large.Therefore, the proposed algorithm destroys the pixel correlation well.Table 1 shows the correlation coefficients of plain images.For the proposed algorithm, Hua's algorithm, Wu's algorithm, Li's algorithm, and Zhang's Algorithms 1-3, Suri's algorithm, and Das's algorithm, the correlation coefficients are listed in Table 2.The data in Table 1 display that the correlation coefficients are very large.However, the data in Table 2 display that the correlation coefficients are very small for the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 2 and 3, Suri's algorithm, and Das's algorithm.However, for Zhang's Algorithm 1, the correlation coefficients in Table 2 are very large.Therefore, the proposed algorithm destroys the pixel correlation well.where I (i, j) and I (i, j) denote two encrypted images.One corresponds to the plain image while the other corresponds to the changed plain image.The Unified Average Changing Intensity (UACI) is shown in the equation below.
Even if two images are very similar, their hash values of SHA-256 are completely different [27].We changed the gray value of I 1 (1, 1) from the original value 59 into 200.For the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 1-3, Suri's algorithm, and Das's algorithm, experimental data are shown in Table 3.For Hua's algorithm and Wu's algorithm, we list the NPCR and UACI values of the plain image 1.For the proposed algorithm, Hua's algorithm, Wu's algorithm, and Zhang's Algorithms 2 and 3, the NPCR and UACI values are very large.For Suri's algorithm, the UACI values are a little smaller.However, the NPCR and UACI values are zero for Zhang's Algorithm 1 and Das's algorithm.Therefore, the proposed algorithm is strong for the differential attack.

Lossy Analysis
The lossless image encryption algorithm is expected in most cases.For Li's algorithm, the decryption image is lossy, which only contains the low-frequency coefficients of plain images.For Suri's algorithm, the weights in Equations ( 27) and (28) are decimals.Therefore, the decryption images are slightly lossy.However, for the proposed algorithm, Hua's algorithm, Wu's algorithm, Zhang's Algorithms 1-3, and Das's algorithm, the decryption images are lossless.

Input Image Number Analysis
As an MIE algorithm, the input image number is expected to be suitable for many cases.For Hua's algorithm and Wu's algorithm, they can only encrypt one plain image at once.For Suri's algorithm and Das's algorithm, they can only encrypt two plain images at once.However, for the proposed algorithm, Li's algorithm, and Zhang's Algorithms 1-3, they can encrypt k plain images at once and their input image number can be determined by the user.Therefore, the superiority of the proposed algorithm is over both Suri's algorithm and Das's algorithm.

Symmetry 2018 ,
10, x FOR PEER REVIEW 2 of 31 algorithms.Liu et al. presented an MIE algorithm with an asymmetric cryptosystem [9].Di et al.

Figure 3 .
Figure 3. Image cube.(1)Internal-row mode: for a plain image 1 mn I  , its pixels are listed in m rows.To permute its pixel positions, a random number {1,2, , } i rn  , 1, 2, , im  is chosen for every row.A random

Figure 2 . 31 Figure 2 .
Figure 2. Magic cube rotation.The image permutation and diffusion are two main means for the image encryption technology.The operation of image permutation only changes pixel positions.Conversely, the operation of image diffusion only changes pixel values.Inspired by the magic cube, we built a 3D permutation model for image encryption.For k plain images with the same size m × n, we can combine them into an image cube with the size m × n × k, which is shown in Figure 3.The pixel in the image cube is the counterpart of the block in the magic cube.Similarly, three permutation modes are designed for image encryption, i.e., internal-row mode, internal-column mode, and external mode.The first two modes permute pixel positions in one plain image.The last mode permutes pixel positions among all the plain images.These modes are described in detail below.

Figure 3 .
Figure 3. Image cube.(1)Internal-row mode: for a plain image 1 mn I  , its pixels are listed in m rows.To permute its pixel positions, a random number {1,2, , }i rn  , 1, 2, , im is chosen for every row.A random

Figure 4 .
Figure 4.The encryption flowchart of the proposed algorithm.

Figure 4 .
Figure 4.The encryption flowchart of the proposed algorithm.

Figure 5 .
Figure 5.The decryption flowchart of the proposed algorithm.

1 C
1e 2e , , , ke I I I are the permuted images.Step 4: Permutation with the External Mode Bob performs the permutation with the external mode on 1e 2e , , , ke I I I with the chaotic matrix .For the pixel 1e 1e ij I I  , he performs the cyclic-shift operation with 1 ij c C  pixel positions to the back direction among 1e 2e , , , ke I I I .The permuted results are 1c 2c , , , kc I I I .Step 5: Permutation with the Internal-Column Mode

Figure 5 .
Figure 5.The decryption flowchart of the proposed algorithm.

Figure 12 .Figure 13 .
Figure 12.Encryption image of Li's algorithm.To encrypt the plain images in Figure6with Zhang's Algorithm 1, Figures13a-iare the encryption images.In this scenario, the size of the mixed image elements is 32 32  .

Figure 17 .
Figure 17.Encryption images of Das's algorithm: (a) Image 1.(b) Image 2. Therefore, the encryption images of Zhang's Algorithm 1 stimulate the block effect for the large size of image blocks.The encryption image of Li's algorithm is lossy and Bob can only recover the

Figure 27 .
Figure 27.Adjacent pixel correlation of the first plain image: (a) Horizontal direction.(b) Vertical direction.(c) Diagonal direction.

Figure 27 .
Figure 27.Adjacent pixel correlation of the first plain image: (a) Horizontal direction.(b) Vertical direction.(c) Diagonal direction.

Figure 28 .
Figure 28.Adjacent pixel correlation of the first encryption image: (a) Horizontal direction.(b) Vertical direction.(c) Diagonal direction.
et al.
Symmetry 2018, 10, 660; doi:10.3390/sym10110660www.mdpi.com/journal/symmetrySymmetry 2018, 10, 660 2 of 30 [20]18]t al.proposed two MIE algorithms by scrambling mixed image elements[17,18].These algorithms are very efficient, but they stimulate the block effect especially for the large size of the image blocks.Meanwhile, Zhang et al. proposed an MIE algorithm with DNA encoding[19].This algorithm is secure, but it is a little complex for the DNA encoding and decoding operations.Suri et al. presented an MIE algorithm with Cramer's rule[20].Das et al. presented an MIE algorithm with genetic operators

Table 1 .
Correlation coefficients of plain images.

Table 1 .
Correlation coefficients of plain images.

Table 2 .
Correlation coefficients of encryption images.