Encryption of Color Images with an Evolutionary Framework Controlled by Chaotic Systems

In the past decade, a large amount of important digital data has been created and stored in the form of color images; the protection of such data from undesirable accesses has become an important problem in information security. In this paper, a new approach based on an evolutionary framework is proposed for the secure encryption of color images. The image contents in a color image are first fully scrambled with a sequence of bit-level operations determined by a number of integer keys. A scrambled image is then encrypted with keys generated from an evolutionary process controlled by a set of chaotic systems. Analysis and experiments show that the proposed approach can generate encrypted color images with high security. In addition, the performance of the proposed approach is compared with that of a few state-of-the-art approaches for color image encryption. The results of the comparison suggest that the proposed approach outperforms the other approaches in the overall security of encrypted images. The proposed approach is thus potentially useful for applications that require color image encryption.


Introduction
With the rapid development of information technologies, a tremendous amount of image data has been created for the analysis, storage and transmission of important information. In practice, undesirable accesses to certain image data often need to be prevented and encryption is a computational technique extensively utilized to enhance the security of such images [1]. Since images encrypted by traditional encryption methods generally cannot reach the security levels required by many applications [2], researchers have proposed numerous methods that can encrypt images with improved security [2][3][4][5][6][7]. Most of the existing approaches use techniques from one of three major classes of methods for image encryption. These classes consist of approaches that apply the permutation of pixel positions [7,8], techniques that transform gray values of pixels [5,9,10] and methods that encrypt images with chaotic systems [6,11].
An important method for image encryption permutes the positions of pixels to generate a cipher image. For example, a skew tent map system is combined with a permutation-diffusion architecture in [7] for image encryption. In [8], cipher images are generated by changing both gray values and locations of pixels. The approach proposed in [12] utilizes ergodic matrices to change the locations of pixels for image encryption. The approach proposed in [13] uses an elliptic curve random generator and an AES to improve the security of cipher images. Peano-Hilbert curves are used in [14] to relocate pixels such that spatial correlations can be eliminated in cipher images. In [15], edge maps generated based on source images are used along with a number of different permutation techniques for image encryption.
Gray value transformation is another technique that has been extensively used for image encryption. The image contents in each pixel of an image are processed by a for image encryption. In [41], images are encrypted by chaotic data generated with Mixed Linear-Nonlinear Coupled Map Lattices (MLNCML).
Existing methods for image encryption have significantly improved the overall security of cipher images. However, most of the state-of-the-art approaches for image encryption only change the locations of pixels to reduce the local correlations among pixels. The image contents associated with a pixel are completely or partially retained after it is relocated to a different position in the image. The original image contents are thus not completely eliminated by the scrambling process. Moreover, the transformations utilized to change the image contents in each pixel are generally based on numeric functions only. The security of cipher images can possibly be further improved if more sophisticated transformations are available for encoding the image contents associated with each pixel in an image. A new approach that can perform the scrambling process more effectively and apply a more sophisticated transformation to change the image contents associated with each pixel is thus highly desirable to achieve further improved security for image encryption.
In this paper, a new method is proposed to encrypt color images with an evolutionary framework controlled by a set of chaotic systems. In the first phase of the encryption, pixels in a color image are grouped based on a virtual image constructed from the original image and arrays formed by the binary bits in the pixel groups are shuffled with a set of integer keys. The R, G and B components of pixels are then determined from the shuffled arrays as the result of scrambling. In the second phase of encryption, an evolutionary system comprised of integers obtained from a set of 3D chaotic systems is used to change the image contents in each pixel of the scrambled image. Integers in the evolutionary system are processed and changed by two operators, including cross-over and mutation. The operations of each operator are controlled by a set of one-dimensional logistic systems.
The proposed method has two major contributions for the encryption of color images. Firstly, a bit-level scrambling process is developed to change the location of each bit in the image contents of a color image. Correlations that usually exist between pixels that are spatially close in natural images can thus be significantly reduced. Secondly, due to the fact that it is difficult to simulate the outputs of an evolutionary process controlled by chaotic systems with numeric transformations, the underlying mechanisms of the proposed approach can be well hidden from adversary sides. The proposed method can thus significantly enhance the robustness and security of cipher images.
The results of an analysis on the key space of the proposed approach suggest that it is robust against exhaustive attacks. Experimental results on benchmark color images and a set of images selected from the BSD500 dataset [42] show that the proposed approach can generate cipher images with high security. In addition, the performance of the proposed approach is compared with that of other state-of-the-art encryption approaches on a variety of security measures for cipher images. The results of comparison show that the proposed approach is able to provide cipher images with security higher than those generated by other tested approaches.

Materials and Methods
The encryption of a color image with the proposed approach is performed in two phases. In the first phase, the binary bits of the R, G and B components in the pixels of the plain image are scrambled based on a set of integer keys and a virtual image constructed from the plain image. In the second phase, the R, G and B components in each pixel of the scrambled image are encoded by an evolutionary system constructed from the outputs of a set of 3D chaotic systems. The evolutionary process of the system is controlled by a set of one-dimensional logistic systems. Figure 1 illustrates the scrambling process in the proposed approach. In the first step, a virtual image is constructed from the plain image by a mapping that can place each pixel in the plain image to its mapped location in the virtual image. Pixels in the plain image are organized into groups based on the rows and columns of the virtual image. In the second step, the pixels in the same row are included in a group and the binary bits of the R, G and Entropy 2023, 25, 631 4 of 28 B components of the pixels in the same group are combined into an array of bits. The bits in each array are shuffled with an integer key associated with the corresponding row. The R, G and B components of pixels are replaced by bits from the corresponding locations in the shuffled arrays. In the third step, the pixels in the same column are included in a group and the same bit-shuffling operation is performed for pixels in each group. The resulting image is a scrambled image of the plain image. Figure 1 illustrates the scrambling process in the proposed approach. In the first step, a virtual image is constructed from the plain image by a mapping that can place each pixel in the plain image to its mapped location in the virtual image. Pixels in the plain image are organized into groups based on the rows and columns of the virtual image. In the second step, the pixels in the same row are included in a group and the binary bits of the R, G and B components of the pixels in the same group are combined into an array of bits. The bits in each array are shuffled with an integer key associated with the corresponding row. The R, G and B components of pixels are replaced by bits from the corresponding locations in the shuffled arrays. In the third step, the pixels in the same column are included in a group and the same bit-shuffling operation is performed for pixels in each group. The resulting image is a scrambled image of the plain image.  2 shows the steps followed by the proposed approach to encode the R, G and B components of pixels in a scrambled image. For each pixel, an evolutionary system is constructed from the outputs of a set of 3D chaotic systems. The integers in the evolutionary system are then varied by a number of cross-over and mutation operations controlled by a set of one-dimensional logistic systems. Finally, an integer is selected for each component of the pixel from the integers in the evolutionary system and the component is encoded by an integer key computed from the selected integer. The decryption of a cipher image can be performed in two steps. In the first step, the evolutionary system used for the encoding of each pixel is constructed and the corresponding cross-over and mutation operations are applied to the integers in the system. The integers selected for encoding the R, G and B components are obtained from the system and the components of the pixel in the scrambled image are computed from the  2 shows the steps followed by the proposed approach to encode the R, G and B components of pixels in a scrambled image. For each pixel, an evolutionary system is constructed from the outputs of a set of 3D chaotic systems. The integers in the evolutionary system are then varied by a number of cross-over and mutation operations controlled by a set of one-dimensional logistic systems. Finally, an integer is selected for each component of the pixel from the integers in the evolutionary system and the component is encoded by an integer key computed from the selected integer. Figure 1 illustrates the scrambling process in the proposed approach. In the first step, a virtual image is constructed from the plain image by a mapping that can place each pixel in the plain image to its mapped location in the virtual image. Pixels in the plain image are organized into groups based on the rows and columns of the virtual image. In the second step, the pixels in the same row are included in a group and the binary bits of the R, G and B components of the pixels in the same group are combined into an array of bits. The bits in each array are shuffled with an integer key associated with the corresponding row. The R, G and B components of pixels are replaced by bits from the corresponding locations in the shuffled arrays. In the third step, the pixels in the same column are included in a group and the same bit-shuffling operation is performed for pixels in each group. The resulting image is a scrambled image of the plain image.  2 shows the steps followed by the proposed approach to encode the R, G and B components of pixels in a scrambled image. For each pixel, an evolutionary system is constructed from the outputs of a set of 3D chaotic systems. The integers in the evolutionary system are then varied by a number of cross-over and mutation operations controlled by a set of one-dimensional logistic systems. Finally, an integer is selected for each component of the pixel from the integers in the evolutionary system and the component is encoded by an integer key computed from the selected integer. The decryption of a cipher image can be performed in two steps. In the first step, the evolutionary system used for the encoding of each pixel is constructed and the corresponding cross-over and mutation operations are applied to the integers in the system. The integers selected for encoding the R, G and B components are obtained from the system and the components of the pixel in the scrambled image are computed from the The decryption of a cipher image can be performed in two steps. In the first step, the evolutionary system used for the encoding of each pixel is constructed and the corresponding cross-over and mutation operations are applied to the integers in the system. The integers selected for encoding the R, G and B components are obtained from the system and the components of the pixel in the scrambled image are computed from the selected integers. In the second step, the virtual image used for the scrambling process in encryption is constructed and pixels are grouped by columns in the virtual image. A reversed bit-shuffling operation is performed to reset the R, G and B components of pixels for each group. In the third step, pixels are grouped by rows in the virtual image and a reversed bit-shuffling operation is performed to reset the R, G and B components of pixels for each group. The resulting image is the plain image decrypted from the given cipher image.

The Bit-Level Scrambling Process
Let I(m, n, 3) be a plain color image that contains m rows and n columns; the R, G and B components of the pixel in the jth row and kth column are denoted by I(j, k, 1), I(j, k, 2) and I(j, k, 3), respectively, where 1 ≤ j ≤ m and 1 ≤ k ≤ n hold for integers j and k. A bit-level scrambling of I considers the binary bits in the R, G and B components of all pixels in I and changes the location of each bit in the image, the resulting image S(m, n, 3) is a scrambled image of I.

Virtual Image
As the first step of the scrambling process, a virtual image V(p, q, 3) is generated from I, where q is a given integer that satisfies 2 ≤ q ≤ mn/2 and p = mn/q holds for p. V is obtained from I by a mapping Ψ that associates each pixel in I with a pixel in V. Specifically, for each pair of integers (j, k) where 1 ≤ j ≤ m and 1 ≤ k ≤ n hold, Ψ maps the pixel in the jth row and kth column in I to a pixel in row R(j, k) and column C(j, k) in V, where R(j, k) and C(j, k) are determined based on Equations (1) and (2).
In addition, the following equations hold for each pair of integers (j, k) where j and k satisfy 1 ≤ j ≤ m and 1 ≤ k ≤ n.

Scrambling Based on Rows in the Virtual Image
It is clear from Equations (1) and (2) that row p in V may contain less than q pixels mapped from I. For each integer h that satisfies 1 ≤ h ≤ p, let r h be the number of mapped pixels in row h of V; row h in V is assigned a positive integer k h for scrambling. k h is required to be coprime with 24q for 1 ≤ h < p and k p must be coprime with 24r p .
For each integer h that satisfies 1 ≤ h ≤ p, the 8-bit binary representations of the R, G and B components of the pixels in row h of V are sequentially combined into an array of 24r h binary bits. Specifically, let B h be the array of binary bits constructed for row h and l be an integer that satisfies 1 ≤ l ≤ r h ; the binary bits from positions 24(l − 1) + 1 through to 24(l − 1) + 8 in B h are the 8-bit binary representation of V(h, l, 1). Similarly, the binary bits from positions 24(l − 1) + 9 through to 24(l − 1) + 16 in B h are the 8-bit binary representation of V(h, l, 2) and the binary bits from positions 24(l − 1) + 17 through to 24l in B h are the 8-bit binary representation of V(h, l, 3). The order of bits in B h is changed for each integer h that satisfies 1 ≤ h ≤ p to complete the row-based scrambling operation.
Let s be an integer that satisfies 1 ≤ s ≤ 24r h ; B h (s) denotes the sth bit in B h . B h (s) is relocated to position t in B h , where t is determined from k h and r h based on Equation (6).
Since k h is coprime with 24r h , no two bits in B h are relocated to the same position in B h . Otherwise, there exists two different integers s 1 and s 2 that satisfy 1 ≤ s 1 ≤ 24r h and 1 ≤ s 2 ≤ 24r h , and are relocated to the same position based on Equation (6). This implies that Equation (7) holds for s 1 and s 2 . where u is an integer. Since k h is coprime with 24r h , Equation (7) implies that 24r h is a factor of s 1 − s 2 . However, due to the fact that 0 < |s 1 − s 2 | < 24r h holds, 24r h cannot be a factor of s 1 − s 2 , which is a contradiction. This implies that no such pair of integers exists and a relocation of all bits in B h can be performed based on Equation (6). Figure 3a shows the pseudocode for scrambling the binary bits of pixels in row h of the virtual image.
Since is coprime with 24 , no two bits in are relocated to the same position in . Otherwise, there exists two different integers and that satisfy 1 ≤ ≤ 24 and 1 ≤ ≤ 24 , and are relocated to the same position based on Equation (6). This implies that Equation (7) holds for and .
( − ) = 24 (7) where is an integer. Since is coprime with 24 , Equation (7) implies that 24 is a factor of − . However, due to the fact that 0 < | − | < 24 holds, 24 cannot be a factor of − , which is a contradiction. This implies that no such pair of integers exists and a relocation of all bits in can be performed based on Equation (6). Figure 3a shows the pseudocode for scrambling the binary bits of pixels in row ℎ of the virtual image.
(a) (b) After all bits in have been relocated, the R, G and B components of pixels in row ℎ of are reset based on . Specifically, for each integer that satisfies 1 ≤ ≤ , the 8-bit binary representation of (ℎ, , 1) is reset to be the binary bits from positions 24( − 1) + 1 through to 24( − 1) + 8 in . Similarly, the 8-bit binary representation of (ℎ, , 2) is reset to be the binary bits from positions 24( − 1) + 9 through to 24( − 1) + 16 in , and the 8-bit binary representation of (ℎ, , 3) is reset to be the binary bits from positions 24( − 1) + 17 through to 24 in .

Scrambling Based on Columns in the Virtual Image
Similarly, Equations (4) and (5) suggest that a column in may contain or − 1 pixels mapped from . For each integer that satisfies 1 ≤ ≤ , denotes the number of mapped pixels in column of . A positive integer is assigned to column in and must satisfy the requirement that it is coprime with 24 . For each integer such that 1 ≤ ≤ holds, an array of 24 binary bits is constructed from a sequential combination of the 8-bit binary representations for the R, G After all bits in B h have been relocated, the R, G and B components of pixels in row h of V are reset based on B h . Specifically, for each integer l that satisfies 1 ≤ l ≤ r h , the 8-bit binary representation of V(h, l, 1) is reset to be the binary bits from positions 24(l − 1) + 1 through to 24(l − 1) + 8 in B h . Similarly, the 8-bit binary representation of V(h, l, 2) is reset to be the binary bits from positions 24(l − 1) + 9 through to 24(l − 1) + 16 in B h , and the 8-bit binary representation of V(h, l, 3) is reset to be the binary bits from positions 24(l − 1) + 17 through to 24l in B h .

Scrambling Based on Columns in the Virtual Image
Similarly, Equations (4) and (5) suggest that a column in V may contain p or p − 1 pixels mapped from I. For each integer d that satisfies 1 ≤ d ≤ q, c d denotes the number of mapped pixels in column d of V. A positive integer w d is assigned to column d in V and w d must satisfy the requirement that it is coprime with 24c d .
For each integer d such that 1 ≤ d ≤ q holds, an array of 24c d binary bits is constructed from a sequential combination of the 8-bit binary representations for the R, G and B components of the pixels in column d of V. Specifically, D d denotes the array of binary bits obtained from pixels in column d; Let g be an integer that satisfies 1 ≤ g ≤ 24c d and D d (g) be the gth bit in D d . The location of D d (g) is changed to position y in D d , where y is determined from w d and c d based on Equation (8).
Based on an argument similar to the one presented in Section 2.1.2, no two bits in D d are relocated to the same position in D d due to the fact that w d is coprime with 24c d . Equation (8) Entropy 2023, 25, 631 7 of 28 thus generates a relocation of all bits in D d . Figure 3b shows the pseudocode for scrambling the binary bits of pixels in column d of the virtual image.
After the locations of all bits in D d have been changed, D d is used to reset the R, G and B components of pixels in column d of V. For each integer v that satisfies 1 ≤ v ≤ c d , the binary bits from positions 24(v − 1) + 1 through to 24(v − 1) + 8 in D d are assigned to V(v, d, 1), the binary bits from positions 24(v − 1) + 9 through to 24(v − 1) + 16 in D d are assigned to V(v, d, 2) and the binary bits from positions 24(l − 1) + 17 through to 24l in D d are assigned to V(v, d, 3). A scrambled image S(m, n, 3) is obtained for I(m, n, 3) after the column-based scrambling operation is completed. In practice, the operations in the scrambling process can be performed multiple times to further improve the security of encryption.

Recover a Plain Image from Its Scrambled Image
Let q be the number of columns in the virtual image used to scramble the plain image in encryption. The virtual image V(p, q, 3) used for the scrambling of the plain image is constructed from S, where p = mn/q . For each pair of integers (j, k) where 1 ≤ j ≤ m and 1 ≤ k ≤ n hold, the pixel that corresponds to (j, k) in V is obtained from S based on Equations (9)- (11).
where R(j, k) and C(j, k) are obtained based on Equations (1) and (2). For each integer d that satisfies 1 ≤ d ≤ q, let c d be the number of mapped pixels in column d of V and w d be the integer key associated with column d in V for scrambling. A sequential combination of the 8-bit binary representations for the R, G and B components of the pixels in column d of S are performed to construct an array D d of 24c d binary bits. Specifically, for each integer v that satisfies 1 ≤ v ≤ c d , the binary bits in positions 24(v − 1) + 1 through to 24(v − 1) + 8 of D d are the 8-bit binary representation of S(v, d, 1), the binary bits in positions 24(v − 1) + 9 through to 24(v − 1) + 16 of D d are the 8-bit binary representation of S(v, d, 2), and the binary bits in positions 24(v − 1) + 17 through to 24v of D d are the 8-bit binary representation of S(v, d, 3). Figure 4a shows the pseudocode for recovering the binary bits in column d of the virtual image. For each integer g such that 1 ≤ g ≤ 24c d holds, an integer y is determined from w d and c d using Equation (8). The location of D d (y) is changed to position g in D d . After the locations of all bits in D d are changed, D d is used to reset the R, G and B components of pixels in column is set to be the value of the binary bits from positions 24 is set to be the value of the binary bits from positions 24(v − 1) + 9 through to 24(v − 1) + 16 in D d and V(v, d, 3) is set to be the value of the binary bits from positions For each integer h that satisfies 1 ≤ h ≤ p, let r h be the number of mapped pixels in row h of V and k h be the integer key associated with row h for scrambling. The 8-bit binary representations of the R, G and B components of the pixels in row h of V are sequentially combined into an array B h of 24r h binary bits. Specifically, for each integer l that satisfies 1 ≤ l ≤ r h , the binary bits from positions 24(l − 1) + 1 through to 24(l − 1) + 8 in B h are set to be the 8-bit binary representation of V(h, l, 1), the binary bits from positions 24(l − 1) + 9 through to 24(l − 1) + 17 in B h are set to be the 8-bit binary representation of V(h, l, 2) and the binary bits from positions 24(l − 1) + 17 through to 24l in B h are the 8-bit binary representation of V(h, l, 3). , ( , , 1) is set to be the value of the binary bits from positions 24( − 1) + 1 through to 24( − 1) + 8 in , ( , , 2) is set to be the value of the binary bits from positions 24( − 1) + 9 through to 24( − 1) + 16 in and ( , , 3) is set to be the value of the binary bits from positions 24( − 1) + 17 through to 24 in .
(a) (b) For each integer ℎ that satisfies 1 ≤ ℎ ≤ , let be the number of mapped pixels in row ℎ of and be the integer key associated with row ℎ for scrambling. The 8-bit binary representations of the R, G and B components of the pixels in row ℎ of are sequentially combined into an array of 24 binary bits. Specifically, for each integer that satisfies 1 ≤ ≤ , the binary bits from positions 24( − 1) + 1 through to 24( − 1) + 8 in are set to be the 8-bit binary representation of (ℎ, , 1), the binary bits from positions 24( − 1) + 9 through to 24( − 1) + 17 in are set to be the 8-bit binary representation of (ℎ, , 2) and the binary bits from positions 24( − 1) + 17 through to 24 in are the 8-bit binary representation of (ℎ, , 3). Figure 4b shows the pseudocode for recovering the binary bits in row ℎ of the virtual image. For each integer that satisfies 1 ≤ ≤ 24 , an integer is determined from and based on Equation (6), and ( ) is relocated to position in . After all bits in have been relocated, the R, G and B components of pixels in row ℎ of are reset based on . For each integer that satisfies 1 ≤ ≤ , the value of the binary bits from positions 24( − 1) + 1 through to 24( − 1) + 8 in is assigned to (ℎ, , 1), the value of the binary bits from positions 24( − 1) + 9 through to 24( − 1) + 16 in is assigned to (ℎ, , 2) and the value of the binary bits from positions 24( − 1) + 17 through to 24 in is assigned to (ℎ, , 3). The plain image can be obtained after the pixels in have been reset.

A 3D Chaotic System
Recently, a new 3D chaotic system is proposed in [43]. The system is formulated in spherical coordinates, and it is shown in [43] that four hidden attractors and three unstable equilibrium points exist for the system. The hidden attractors include two limit cycles and two strange attractors. One of the strange attractors is inside a sphere of radius 7.0 and the other one is outside the sphere. A description of the system in spherical coordinates is shown in Equation (12).  Figure 4b shows the pseudocode for recovering the binary bits in row h of the virtual image. For each integer that satisfies 1 ≤ s ≤ 24r h , an integer t is determined from k h and r h based on Equation (6), and B h (t) is relocated to position s in B h . After all bits in B h have been relocated, the R, G and B components of pixels in row h of V are reset based on B h . For each integer l that satisfies 1 ≤ l ≤ r h , the value of the binary bits from positions 24(l − 1) + 1 through to 24(l − 1) + 8 in B h is assigned to V(h, l, 1), the value of the binary bits from positions 24(l − 1) + 9 through to 24(l − 1) + 16 in B h is assigned to V(h, l, 2) and the value of the binary bits from positions 24(l − 1) + 17 through to 24l in B h is assigned to V(h, l, 3). The plain image can be obtained after the pixels in V have been reset.

A 3D Chaotic System
Recently, a new 3D chaotic system is proposed in [43]. The system is formulated in spherical coordinates, and it is shown in [43] that four hidden attractors and three unstable equilibrium points exist for the system. The hidden attractors include two limit cycles and two strange attractors. One of the strange attractors is inside a sphere of radius 7.0 and the other one is outside the sphere. A description of the system in spherical coordinates is shown in Equation (12).
where ρ,ϕ and θ are the radial distance, polar angle and azimuthal angle, respectively. The simulation results show that the system demonstrates a chaotic behavior when parameters α and β are set to be 3.0 and 1.0, respectively. A more detailed analysis of the dynamical properties of the system can be found in [43].
where i is an integer that satisfies 1 ≤ i ≤ b and M is a large positive integer;x i,L , y i,L and z i,L are computed based on Equation (14).
where ρ i,L , θ i,L and ϕ i,L are the outputs of K i at time L∆t, given ρ i,0 , θ i,0 and ϕ i,0 as its initial values for ρ, θ and ϕ, respectively.∆t is a positive constant.
The integer sets E 1,0 , E 2,0 and E 3,0 together form the initial configuration of the evolutionary system for encoding the pixel in row j and column k in S(m, n, 3). The integers in E 1,0 , E 2,0 and E 3,0 are changed by a series of cross-over and mutation operations controlled by a set of one-dimensional logistic systems; the resulting sets are denoted by E 1, f , E 2, f and E 3, f . The integer keys for the encoding of S(j, k, 1), S(j, k, 2) and S(j, k, 3) are computed based on integers selected from E 1, f , E 2, f and E 3, f , respectively.

The Cross-Over Operation
A cross-over operation for the evolutionary system is controlled by a set of onedimensional logistic systems. A logistic system is defined by an initial value l 0 and the recursion relation shown in Equation (15).
where i is a positive integer. A well-known fact is that the logistic system defined in Equation (15) is a one-dimensional chaotic system when l 0 satisfies 0 < l 0 < 1 [44]. The system defined in Equation (15) generates a sequence of numbers l 1 , l 2 , . . . , l N , . . . for a given initial value l 0 . Due to the chaotic property of the system, a tiny amount of change in l 0 would lead to a significantly different l N if N is a large enough integer. Three one-dimensional logistic systems with different initial values are needed to complete a cross-over operation. The initial values of the three one-dimensional logistic systems are denoted by l 1,0 , l 2,0 and l 3,0 . For the pixel in row j and column k in S(m, n, 3), three sets of integers where M 0 is a large positive integer and l 1,Lb+i−1 , l 2,Lb+i−1 and l 3,Lb+i−1 are the Lb + i − 1th elements in the chaotic number sequences generated from Equation (15) with l 1,0 , l 2,0 and l 3,0 as the initial values, respectively.
The cross-over operation is performed based on V 1,0 , V 2,0 and V 3,0 . In addition, three positive integer keys g 1 , g 2 and g 3 are needed to determine the pairs of integers where the cross-over operations need to be performed in V 1,0 , V 2,0 and V 3,0 , respectively. g 1 ,g 2 and g 3 are all coprime with b.
To perform the cross-over operation on E 1,0 , for each integer e that satisfies 1 ≤ e ≤ b, X e,L is paired with X a 1 ,L for cross-over, where a 1 is determined by Equation (17).
Based on u e,L , two new integers X e,L and X a,L are generated by Equations (18) and (19).
X e,L = X e,L /2 u e,L + X a 1 ,L mod 2 u e,L X a,L = X a 1 ,L /2 u e,L + X e,L mod 2 u e,L As the result of the cross-over operation, X e,L is replaced by X e,L and X a 1 ,L is replaced by X a 1 ,L .
The cross-over operation on E 2,0 is performed with a similar method. For each integer e that satisfies 1 ≤ e ≤ b, a pair between Y e,L and Y a 2 ,L is formed for cross-over, and a 2 is obtained from Equation (20).
Two new integers Y e,L and Y a 2 ,L are obtained from v e,L by Equations (21) and (22).
The cross-over operation replaces Y e,L by Y e,L and Y a 2 ,L is replaced by Y a 2 ,L . Similarly, the cross-over operation on E 3,0 is performed on integer pairs formed based on g 3 . For each integer e such that 1 ≤ e ≤ b holds, an integer pair is generated between Z e,L and Z a 3 ,L for cross-over, and a 3 is computed based on Equation (23).
Two new integers Z e,L and Z a 3 ,L are determined from z e,L by Equations (24) and (25).
Z e,L = Z e,L /2 z e,L + Z a 3 ,L mod 2 z e,L Z a 3 ,L = Z a 3 ,L /2 z e,L + Z e,L mod 2 z e,L The cross-over operation substitutes Z e,L and Z a 3 ,L with Z e,L and Z a 3 ,L , respectively. Figure 5a shows the pseudocode for a cross-over operation.

The Mutation Operation
Let E 1,c = X 1,L , X 2,L , . . . , X b,L , E 2,c = Y 1,L , Y 2,L , . . . , Y b,L and E 3,c = Z 1,L , Z 2,L , . . . , Z b,L be the integer sets generated from E 1,0 , E 2,0 and E 3,0 by a cross-over operation. A mutation operation performs a rotational right shift on each integer in E 1,c , E 2,c and E 3,c . The number of bit positions by which the shift is performed for an integer is determined by a set of three one-dimensional logistic systems. Let m 1,0 , m 2,0 and m 3,0 be the initial values of the three logistic systems; three sets of integers M 1,0 = h 1,L, h 2,L , . . . , h b,L ,M 2,0 = s 1,L , s 2,L , . . . , s b,L and M 3,0 = t 1,L , t 2,L , . . . , t b,L are generated based on Equation (26) for the pixel in row j and column k in S(m, n, 3).
where N 0 is a large positive integer and m 1,Lb+i−1 , m 2,Lb+i−1 and m 3,Lb+i−1 are the Lb + i − 1th elements in the chaotic number sequences obtained from Equation (15) (27), (28) and (29), respectively. The resulting integer sets in the evolutionary system are denoted by E 1, f , E 2, f and E 3, f . Figure 5b shows the pseudocode for a mutation operation.
where N 1 is a large positive integer and s 3L , s 3L+1 and s 3L+2 are the 3lth, 3l + 1th and 3l + 2th elements, respectively, in the chaotic number sequences obtained from Equation (15) using an initial value of s 0 . Let C(m, n, 3) be the cipher image obtained from S(m, n, 3); the integer keys used to encode S(j, k, 1), S(j, k, 2) and S(j, k, 3) are denoted by I k (j, k, 1), I k (j, k, 2) and I k (j, k, 3), respectively. I k (j, k, 1), I k (j, k, 2) and I k (j, k, 3) are obtained based on Equation (31).
where H j,k is 1 when j = 1 and k = 1; otherwise,H j,k = ∑ 3 v=1 C j p , k p , v , where j p and k p can be computed from j and k with Equations (32) and (33).
Equations (31)- (33) show that the encryption keys I k (j, k, 1), I k (j, k, 2) and I k (j, k, 3) are dependent on the encrypted image contents associated with the pixel in row j p and column k p . This fact suggests that the proposed approach is plain-image-sensitive. In practice, the security of encryption can be further enhanced by applying the encoding process multiple times.

Decoding a Cipher Image
The scrambled image of a cipher image can be obtained based on the initial values of the 3D chaotic systems used to construct the evolutionary system for encoding and the initial values of the one-dimensional logistic systems that control the evolutionary system during the encoding.
To decode the pixel in row j and column k in C(m, h, 3), Equations (13) and (14) are used to obtain three integer sets E 1,0 = X 1,L, X 2,L , . . . , X b,L , E 2,0 = Y 1,L , Y 2,L , . . . , Y b,L and E 3,0 = Z 1,L , Z 2,L , . . . , Z b,L that together constitute the evolutionary system. A cross-over operation is then applied to E 1,0 , E 2,0 and E 3,0 as described in Section 2.2.3 to obtain three integer sets E 1,c = X 1,L , X 2,L , . . . , X b,L , E 2,c = Y 1,L , Y 2,L , . . . , Y b,L and Based on E 1, f , E 2, f and E 3, f , Equations (30)-(33) are utilized to generate I k (j, k, 1), I k (j, k, 2) and I k (j, k, 3), which are the encoding keys for the pixel. S(i, j, 1), S(i, j, 2) and S(i, j, 3) are obtained based on Equation (35). In practice, it is often desirable to perform the scrambling and encoding processes multiple times. For an encryption process that scrambles a plain image for n s times and encodes the scrambled image for n e times, a total amount of O((n s + n e b)mn) computation time is needed to complete the encryption.

Results
A computer program has been created to implement the proposed approach in MAT-LAB and its encryption security has been analyzed based on the cipher images generated for seven benchmark images and 100 color images selected from the BSD500 dataset [42]. In addition, a comparison of the proposed approach with several state-of-the-art encryption methods is performed based on a number of security measures. Other approaches tested for comparison are the methods proposed in [7,20,28,38,[43][44][45][46][47][48][49]. In the testing, an evolutionary system that contains five 3D chaotic systems is constructed to encode pixels in a scrambled image. A value of 10 12 is chosen for integers M, M 0 , N 0 and N 1 .

Brutal Force Attacks
The robustness of an encryption method against brutal force attacks can be evaluated based on the size of its key space. A larger key space usually implies stronger robustness against brutal force attacks. In the scrambling process of the proposed approach, each row or column in a virtual image is associated with an integer key for bit-level scrambling. Let Z 1 be the size of the integer set where a key for a row or column can be selected, for a virtual image with p rows and q columns, Z p+q 1 different combinations exist for the integer keys utilized in scrambling process. In the encoding process, Z 3d+7 2 different combinations exist for the initial values of d 3D chaotic systems and seven one-dimensional logistic systems; Z 2 is the size of the set of real numbers where the initial value for a chaotic system can be selected.
The key space of the proposed approach is thus Z p+q 1 Z 3d+7 2 . For a plain color image that contains at least 10 4 pixels, the value of p + q is at least 2 √ pq ≥ 200. When five 3D chaotic systems are used for the encryption of such an image, the key space size is at least Z 200 1 Z 22 2 . In practice, both Z 1 > 2 10 and Z 2 > 2 60 hold, and the key space size for a cipher image of the image is thus at least 2 3320 . Table 1 shows the key space sizes of a few encryption methods, including the proposed approach and several other state-of-the-art approaches. It is evident from Table 1 that the proposed approach has a key space size larger than those of the other encryption methods and its robustness against brutal force attacks is thus higher than that of the other methods. The key space sizes of the proposed approach and several other encryption methods.

Statistical Attacks
The proposed approach is applied to seven popular benchmark images for encryption and an analysis is performed on the obtained cipher images to evaluate the overall strength of the approach against potential statistical attacks. Five of the seven benchmark images, including Lena, Airplane, Fruits, Peppers and Baboon, have a size of 512 × 512 while the other two benchmark images, including Monarch and Girl, have a size of 768 × 512. The seven testing benchmark images are shown in Figure 6a-

Statistical Attacks
The proposed approach is applied to seven popular benchmark images for encryption and an analysis is performed on the obtained cipher images to evaluate the overall strength of the approach against potential statistical attacks. Five of the seven benchmark images, including Lena, Airplane, Fruits, Peppers and Baboon, have a size of 512 × 512 while the other two benchmark images, including Monarch and Girl, have a size of 768 × 512. The seven testing benchmark images are shown in Figure 6a-g.

Analysis of Histograms
The cipher image obtained by the proposed approach for each benchmark image is shown in Figure 7a-g. It is clear from Figure 7 that the image contents in a plain image are completely removed from its cipher image and all cipher images appear to be highly random.

Analysis of Histograms
The cipher image obtained by the proposed approach for each benchmark image is shown in Figure 7a-g. It is clear from Figure 7 that the image contents in a plain image are completely removed from its cipher image and all cipher images appear to be highly random. The histograms of the R, G and B components in the cipher images of the benchmark images are shown in Figure 8a-c. It can be seen from Figure 8 that the R, G and B components in cipher images all follow near-uniform distributions and the histograms of a cipher image do not contain information related to the image contents in its plain image. The histograms of the R, G and B components in the cipher images of the benchmark images are shown in Figure 8a-c. It can be seen from Figure 8 that the R, G and B components in cipher images all follow near-uniform distributions and the histograms of a cipher image do not contain information related to the image contents in its plain image. The histograms of the R, G and B components in the cipher images of the benchmark images are shown in Figure 8a-c. It can be seen from Figure 8 that the R, G and B components in cipher images all follow near-uniform distributions and the histograms of a cipher image do not contain information related to the image contents in its plain image. An important measure often used to evaluate the uniformity of a histogram is the variance of histograms [33]. Histogram contains a counting value for each integer between 0 and 255.The variance of histogram ( ) of is calculated by Equation (36).
where = 256 is the number of counting values in . and are the counting values associated with integers and in . Equation (36) clearly shows that histograms with lower values of variances of histograms generally are closer to a uniform distribution.
The variances of histograms for the cipher images are calculated and compared with those obtained with several other encryption methods, including methods proposed in [22], [33], [48] and [49]. The results of the comparison are shown in Table 2. Table 2 clearly shows that the proposed approach achieves the lowest value for variances of histograms on Airplane, Fruits and Monarch and it ranks the second position on Lena and Baboon. The results in Table 2 suggest that the overall performance of the proposed approach on the variances of histograms is better than that of the other methods.  An important measure often used to evaluate the uniformity of a histogram is the variance of histograms [33]. Histogram P contains a counting value for each integer between 0 and 255. The variance of histogram Var(P) of P is calculated by Equation (36).
where n = 256 is the number of counting values in P. p i and p j are the counting values associated with integers i and j in P. Equation (36) clearly shows that histograms with lower values of variances of histograms generally are closer to a uniform distribution. The variances of histograms for the cipher images are calculated and compared with those obtained with several other encryption methods, including methods proposed in [22,33,48,49]. The results of the comparison are shown in Table 2. Table 2 clearly shows that the proposed approach achieves the lowest value for variances of histograms on Airplane, Fruits and Monarch and it ranks the second position on Lena and Baboon. The results in Table 2 suggest that the overall performance of the proposed approach on the variances of histograms is better than that of the other methods.

Analysis of Correlations
A well-known fact is that strong correlations usually exist between pixels that are spatially close in a plain color image. Such correlations are often closely associated with the contents contained in a plain image and thus need to be reduced to values close to zero when encryption is complete. In general, the correlations among pixels that are adjacent in horizontal, vertical, diagonal and anti-diagonal directions in a cipher image are used as important measures on its strength over potential statistical attacks. The correlations between adjacent pixels in the above four directions in Lena and its cipher image are plotted based on 3000 pixels randomly chosen from the images.

Analysis of Correlations
A well-known fact is that strong correlations usually exist between pixels that are spatially close in a plain color image. Such correlations are often closely associated with the contents contained in a plain image and thus need to be reduced to values close to zero when encryption is complete. In general, the correlations among pixels that are adjacent in horizontal, vertical, diagonal and anti-diagonal directions in a cipher image are used as important measures on its strength over potential statistical attacks. The correlations between adjacent pixels in the above four directions in Lena and its cipher image are plotted based on 3000 pixels randomly chosen from the images. The correlations for pixels adjacent in the four directions have been obtained for all benchmark images and their cipher images; these are shown in Table 3. Table 3 suggests that the correlations between pixels adjacent in a cipher image reach values close to zero. This fact ensures that cipher images generated with the proposed approach cannot be deciphered by statistical attacks. The correlations for the R components of pixels adjacent in cipher images obtained with several different methods on Lena are compared in Table  4. The results in Table 4 suggest that the proposed approach can achieve a performance comparable with other state-of-the-art encryption methods on eliminating local correlations in cipher images.  The correlations for pixels adjacent in the four directions have been obtained for all benchmark images and their cipher images; these are shown in Table 3. Table 3 suggests that the correlations between pixels adjacent in a cipher image reach values close to zero. This fact ensures that cipher images generated with the proposed approach cannot be deciphered by statistical attacks. The correlations for the R components of pixels adjacent in cipher images obtained with several different methods on Lena are compared in Table 4. The results in Table 4 suggest that the proposed approach can achieve a performance comparable with other state-of-the-art encryption methods on eliminating local correlations in cipher images.

Differential Attacks
The strength of an encryption approach over differential attacks is generally evaluated by its sensitivities to tiny changes in encryption keys and plain image. The Number of Pixels Change Rate (NPCR) and unified average changing intensity (UACI) are two measures often used to evaluate such sensitivities [22,35,40,52].
Given a plain image I with m rows and n columns, a set of keys for encryption and the resulting cipher image C e 1 ,C e 2 is the cipher image generated after one of the keys in the key set, or one of the R, G and B components in one pixel in I is changed by a tiny amount. The NPCR and UACI for component t are calculated by Equations (37) and (38), respectively.
where X(i, j, t) is an integer that depends on a comparison between C e 1 (i, j, t) and C e 2 (i, j, t), its value is 1 if C e 1 (i, j, t) and C e 2 (i, j, t) are different and is 0 otherwise. In an ideal case, NPCR has a value of 99.6094 and UACI has a value of 33.4635.
To evaluate the key sensitivity of the proposed approach, a perturbation of 10 −16 is applied to the initial values of the chaotic systems used for the encoding process; the values of NPCR and UACI for the R, Gand B components are calculated with Equations (36) and (37) for each testing benchmark image. Table 5 shows the values of key sensitivity NPCR and UACI obtained for each testing benchmark image. It can be seen from Table 5 that, for all components, the values of key sensitivity NPCR and UACI obtained on all testing images are close to their ideal values. The results in Table 5 suggest that the mean key sensitivity NPCR of the proposed approach is larger than 99.6100 and its mean key sensitivity UACI is close to 33 for UACI randomness tests at levels 0.05, 0.01 and 0.001, respectively. Since the mean UACI of the proposed approach is close to 33.4571, it also passes the UACI randomness tests for all three levels. Table 6 shows the values of key sensitivity NPCR and UACI obtained with the proposed approach and several other encryption methods on Lena. It is evident from Table 6 that the mean value of key sensitivity NPCR of the proposed approach is 99.6133 on Lena and its mean value of key sensitivity UACI is 33.4600. Since the ideal values for NPCR and UACI are 99.6064 and 33.4635, respectively, the proposed approach has the best overall performance on key sensitivities. To evaluate the plain image sensitivity of the proposed approach, a pixel is randomly selected from a plain image and one of its R, G and B components is changed by 1. The cipher image of the resulting image is then compared with that of the original image; the NPCR and UACI for each component can then be calculated based on Equations (36) and (37).
The NPCR and UACI values for plain image sensitivity of the proposed approach on the testing images are shown in Table 7 [52], the proposed approach passes the random tests at all levels for UACI. Table 8 compares the plain image sensitivity values obtained with the proposed approach and those of several other encryption methods on Lena. Table 8 clearly suggests that the proposed approach achieves a mean value of NPCR 99.6200 on Lena for plain image sensitivity and its mean value of plain image sensitivity UACI is 33.4567. The overall performance of the proposed approach is thus the best of all tested methods on plain image sensitivities.

Analysis of Information Entropy
Information entropy is a measure often utilized to represent the randomness of a cipher image. Specifically, let C(m, n, 3) be a cipher image. Equation (39) is used to calculate the information entropy associated with the tth component of C(m, n, 3).
where d(i, C, t) is the probability that the tth component of a pixel is i. Since a uniform distribution has an entropy of 8.0, the information entropy for each component in an ideally encrypted image is 8.0. The information entropies of the R, G and B components in cipher images generated with the proposed approach are shown in Table 9. It can be seen from Table 9 that the information entropies for cipher images obtained by the proposed approach are all nearly ideal.
The information entropies of the cipher images generated with the proposed approach and several other encryption methods on Lena are shown in Table 10. Table 10 clearly suggests that the proposed approach achieves the highest entropies for components R and B and ranks the second position on component G. Its overall performance on Lena is thus the same as that of the approach proposed in [37] and better than that of the other tested methods. Table 9. The information entropy for the R, G and B components of pixels in the cipher images of testing images obtained with the proposed approach. The best values are shown in bold.

Analysis of Peak Noise Signal Ratio
The Peak Signal Noise Ratio (PSNR) provides a measure for the difference between a cipher image and its plain image. A higher PSNR value thus often suggests higher security for a cipher image [22]. The PSNR for a cipher image C(m, n, 3) is calculated based on its plain color image I(m, n, 3) with Equations (40) and (41).
PSNR(I, C) = 20log 10 255 √ 3mn MSE(I, C) The PSNR values of the cipher images generated by the proposed approach and several other encryption approaches on testing images are shown in Table 11. It is clear from Table 11 that the overall performance of the proposed approach on PSNR is comparable to that of the method in [28] and is higher than that of the other tested methods. deviations of the cipher images generated by the proposed approach and several other encryption methods. It is clear from Table 12 that the proposed approach outperforms the methods proposed in [22,33,38] on the variance of histograms. However, Table 12 suggests that the method in [28] is slightly better than the proposed approach on variances of histograms. Since the method in [28] optimizes the uniformity of the histograms of all components in cipher images with particle swarm optimization [53], it is not surprising that it can obtain cipher images with higher uniformity for histograms.  Table 13 compares the entropies of the cipher images obtained with the proposed approach and the other tested methods. Table 13 suggests that the proposed approach achieves the highest mean entropies for cipher images. Information on the PSNRs of the cipher images obtained with all tested methods is shown in Table 14. It can be seen from Table 14 that the proposed approach slightly outperforms all other methods in PSNR. Table 13. The means and standard deviations of the information entropies for the R, G and B components of the cipher images obtained with the proposed approach and other tested encryption methods. The best values are shown in bold.

R G B
Mean STD Mean STD Mean STD Table 14. The means and standard deviations of the PSNRs of the cipher images obtained with the proposed approach and other tested encryption methods. The best value is shown in bold.

Mean STD
The proposed 80.7231 0.0000 Ref. [28] 80.7229 0.0001 Ref. [38] 80.6343 0.0002 Ref. [22] 80.4352 0.0001 Ref. [33] 80.2396 0.0002 A comparison of the key sensitivities of the proposed approach with those of other tested methods is shown in Table 15. It is clear from Table 15 that the proposed approach can achieve mean values of NPCR and UACI closest to their ideal values. Table 16 compares the plain image sensitivities of all tested methods. The mean values of NPCR and UACI in Table 16 suggest that the overall plain image sensitivities of the proposed approach are slightly higher than those of the other tested methods. The computational efficiency of each tested method is evaluated based on the computation time needed by the method to encrypt a color image. Table 17 shows information on the amount of computation time each method requires to generate a cipher image. Table 17 clearly shows that the computational efficiency of the proposed approach is comparable with that of the other methods. Table 17. The means and standard deviations of the computation time each tested method needs to generate a cipher image. The best value is shown in bold.

Discussion
Although the proposed approach has been tested on a few benchmark images and general color images, additional experimental results are needed to evaluate its overall performance on general color images. Moreover, the virtual image in the scrambling process is constructed based on a pixel-level mapping, which can partially reorder the pixels in the image before the bit-level scrambling operations are performed. However, virtual images constructed based on bit-level mappings can separate bits in the same pixel well apart before the scrambling starts; scrambled images generated based on such virtual images thus may contain less information on the contents of their plain images. In addition, more sophisticated operations can possibly be developed for the evolutionary system to further improve the security of cipher images.
It is clear from Section 2 that the proposed approach may require a large number of keys to generate a cipher image. The encryption of images with large sizes thus could be computationally inefficient. In addition, the randomness of the chaotic systems used in the proposed approach may need to be further improved to enhance the security of cipher images.
A multi-dimension discrete chaotic map with excellent ergodicity and randomness is proposed in [54] for image encryption. The proposed approach can probably be combined with the chaotic map proposed in [54] for further improvement in security. Moreover, continuous chaotic systems proposed in [55] can be used with parameter perturbation to enhance randomness.
The proposed approach utilizes a set of randomly selected fixed keys for encryption and the round keys are obtained with modular operations. The method proposed in [56] can possibly be utilized to eliminate the potential weaknesses in the key expansion method used in the proposed approach.

Conclusions
In this paper, a new approach is proposed for the encryption of color images. The approach performs encryption in two phases. In the first phase, binary bits in the R, G and B components of pixels in a plain color image are scrambled based on the rows and columns of a virtual image constructed from the plain image. In the second phase, an evolutionary system controlled by a set of chaotic systems is utilized to generate the integer keys needed to encode the R, G and B components of pixels in a scrambled image. An analysis on the size of key space and testing results suggest that cipher images generated by the proposed approach are secure against various types of attacks. In addition, comparisons of the proposed approach with several other state-of-the-art approaches on a variety of security measures show that its overall performance is better than that of the other tested encryption methods.

Data Availability Statement:
The source code of the computer program developed in this study is available from the corresponding author upon request.