Non-Linear Hopped Chaos Parameters-Based Image Encryption Algorithm Using Histogram Equalization

Multimedia wireless communications have rapidly developed over the years. Accordingly, an increasing demand for more secured media transmission is required to protect multimedia contents. Image encryption schemes have been proposed over the years, but the most secure and reliable schemes are those based on chaotic maps, due to the intrinsic features in such kinds of multimedia contents regarding the pixels’ high correlation and data handling capabilities. The novel proposed encryption algorithm introduced in this article is based on a 3D hopping chaotic map instead of fixed chaotic logistic maps. The non-linearity behavior of the proposed algorithm, in terms of both position permutation and value transformation, results in a more secured encryption algorithm due to its non-convergence, non-periodicity, and sensitivity to the applied initial conditions. Several statistical and analytical tests such as entropy, correlation, key sensitivity, key space, peak signal-to-noise ratio, noise attacks, number of pixels changing rate (NPCR), unified average change intensity randomness (UACI), and others tests were applied to measure the strength of the proposed encryption scheme. The obtained results prove that the proposed scheme is very robust against different cryptography attacks compared to similar encryption schemes.


Introduction
Multimedia data such as text, audio, video, and image play a very important role in information security. One of the most important types of multimedia content is digital images due to their military applications, authentication of biometrics, medical science, and personal albums. In order to protect privacy and maintain the security of private images against unauthorized use or vulnerable attacks while passing through a public network, we need a trustable image encryption process. Many encryption schemes have been proposed, standardized, and widely adopted since the 1970s. These encryption schemes can vary between data encryption standard (DES) and advanced encryption standard (AES) techniques [1,2]. In 1963, Edward Lorenz applied chaos theory in computer systems [3]. Afterward, the cryptography schemes based on chaos theory were the primary choice for most cryptographers when proposing new encryption algorithms. Logistic map-based algorithms together with higher dimensional chaos functions lead to more secure encryption schemes against cryptanalytic attacks [4][5][6][7][8][9].
Recently, many low-dimensional chaotic systems have been developed [10][11][12]. These researchers proposed an encryption scheme with good chaos performance. Although these systems have low complexity, they are based on a fixed chaotic map which results in these low-dimensional systems becoming vulnerable to brute force attacks. Some encryption algorithms depending on logistic maps have been proposed in [13][14][15][16][17][18][19][20][21]. The digital image encryption schemes are mainly based on two processes, namely, position permutation, value transformation, or a combination of both processes. Position permutation is simply executed by fixing the pixel values and permuting the image position. On the other side, value transformation is accomplished by fixing the image position and assigning new values for the pixels. Due to its applicability and simplicity in implementation, the position permutation process is considered a primitive operation in most image encryption schemes. The encryption algorithms based on permutation-only processes show poor resistance against cipher text-only attacks and/or known/chosen-plaintext attacks and are only used in moderate or low-level security applications. The main purpose of the value transformation technique is to establish linear independency relations among several variables. Such operations can be accomplished simply through an XOR operation. The main advantage of the value transformation process is the non-reversibility manner, i.e., to reverse the value transformation operation we need the two arguments' initial values used to create such a process, which is impossible to achieve.
In order to maintain the optimal security performance, several researchers proposed encryption schemes based on both processes, starting with position permutation, then applying value transformation. Most of the proposed algorithms to generate new pixel value during the value transformation process were depending on a fixed 3D chaotic map. To further increase the security of such image encryption schemes, we suggest a new encryption cryptosystem to generate a logistic parameter hopped 3D chaotic map that is used to generate the new pixel values during the value transformation process. We applied our proposed digital image encryption scheme to previously analyzed well-known images to compare our tests results with previous encryption schemes. The obtained results for our encryption scheme showed better performance results compared to other encryption schemes based on a fixed 3D chaotic map in terms of several types of attacks.
The rest of the article is organized as follows: Related image encryption schemes depending on 3D chaotic maps are briefly covered in Section 2; Section 3 explains the proposed image encryption cryptosystem that depends on a logistic parameter hopped 3D chaotic; Statistical tests used to evaluate the performance of our encryption scheme and simulation results are presented in Section 4; And, finally, Section 5 concludes the proposed algorithm.

Related Work
In different encryption schemes, a variety of strategies and different chaotic algorithms are adopted. Xiaoling Huang et al. [22] offered an encryption algorithm depending on the permutation-diffusion operation. The chaotic map output was revised through a middle parameter influenced by secret keys yielding to a temporal delay. Xu, L et al. [23] introduced a bit-level image encryption algorithm depending on piecewise linear chaotic maps (PWLCM). The authors transformed the plain image into two identical binary sequences. The two sequences generated were diffused mutually through a new diffusion strategy. Finally, they applied bits permutation through swapping the binary sequences by means of the chaotic map.
El-khamy, S.E. et al. [24] proposed a new chaotic image encryption algorithm depending on permutation and substitution in the Fourier domain. The authors achieved a large degree of randomization by applying a Fractional Fourier transform. Baker map, together with a generated key depending on a modified logistic map, was used for the permutation process yielding to an increase in the space of the encryption key. Dongdong Lin et al. [25] offered an image encryption cryptosystem based on information entropy. The authors evaluated the security metric validity and security properties of the algorithm. They identified some unsecured issues, commonly generated in such algorithms, and how to avoid them.
Chengqing Li et al. [26] reevaluated the image scrambling encryption algorithm security. They stated that the internal correlation remaining in the cipher image disclosed corresponding information about the plain image. Finally, they concluded that the scrambling elements could be used to support plain text attacks. Chunhu Li et al. [27] presented an image encryption algorithm depending on the three-dimensional (3D) chaotic logistic map. A chaos-based key stream was generated through a modified 3D chaotic logistic map. The proposed encryption scheme included diffusion and confusion properties. Several security tests were applied to measure the performance of the proposed scheme in measuring the cryptographic application suitability.

Parameter Hopped 3D Chaotic Map Image Encryption Scheme
The proposed image encryption scheme is shown in Figure 1a and based on the parameter hopped 3D chaotic map. The image encryption scheme is generated through five main steps, namely parameter hopped 3D chaotic map generation, histogram equalization, row rotation, column rotation, and exclusive-OR (XOR) logic operation. Figure 1b represents the flowchart of the proposed algorithm.

Generation of Initial Conditions
In this section, we describe our proposed algorithm to generate a pseudorandom bit sequence based on a logistic parameter hopping 3D chaotic map. The varying parameters for the 3D hopping chaotic map are a i , b i and c i , and are generated through (1)-(4) under the specified initial conditions.

Generation of 3D Parameter Hopping Logistic Map
The 3D parameter hopping logistic map is generated through (5)-(7) as follows [28]: where a 1 = 3.7900, b 1 = 0.0185, c 1 = 0.0125, x 1 = 0.2350, y 1 = 0.3500, and z 1 = 0.7350. Figure 2a shows the chaos phenomena of the 3D parameter hopping logistic map depending on the varying parameters a i , b i and c i of the 3D hopping chaotic map. Figure 2b displays the bifurcation diagram of the 3D hopping parameters x, y and z obtained from Equations (5)- (7) with initial values of a 1 = 3.7900, b 1 = 0.0185, c 1 = 0.0125, x 1 = 0.2350, y 1 = 0.3500 and z 1 = 0.7350. It is clear that the bifurcation diagram of the proposed chaotic map has an enhancement in the parameter range of hopped chaotic sequence compared with the fixed chaotic parameters used in [28].  The generated values and histogram generation of hopped chaotic sequence x, y and z obtained through (1)-(7) are depicted in Figure 3. Figure 3a,c,e shows the generated values for x, y and z with initial values of a 1 = 3.7900, b 1 = 0.0185, c 1 = 0.0125, x 1 = 0.2350, y 1 = 0.3500 and z 1 = 0.7350, while, Figure 3b,d,f represents the histogram for each obtained value of x, y, and z, respectively. Obviously, the histogram of the generated chaotic sequence has non-uniform distribution that may have an effect on the security of the system.

Histogram Equalization
The generated histograms displayed in Figure 3 are non-uniformly distributed. To further increase the security of the generated histograms, we apply an equalization process for x, y, and z through (8)-(10) as follows where η 2 , η 4 and η 6 are large random numbers and they are chosen to be equal and greater than 100,000 for simplicity, while M and N are chosen to be equal to the image dimension (256 × 256). It is clear from Figure 4b,d,f that after applying the above constraints, we obtain the equalized histogram for x new , y new and z new .

Row Rotation
For a gray image of M×N dimensions, the row rotation is executed by applying an offset value 1 η , then selecting M elements of chaos sequence x beginning from the offset value 1 η , and finally applying the chaos value x obtained through Equation (5) to rotate the row. To increase the security of the generated sequence, the row rotation could be right or left rotation according to the chaos value (odd or even).

Column Rotation
The column rotation is similar to the row rotation and can be applied by selecting N elements of chaos sequence y, choosing 3 η to be an offset value, then starting from 3 η and applying the chaos value y obtained from Equation (6). Now, we have an encrypted image with row and column rotation but with the same histogram of the original image. x new = (integer(x × η 2 ))modN (8) y new = (integer(y × η 4 ))modM (9) z new = (integer(z × η 6 ))mod256

Row Rotation
For a gray image of M×N dimensions, the row rotation is executed by applying an offset value η 1 , then selecting M elements of chaos sequence x beginning from the offset value η 1 , and finally applying the chaos value x obtained through Equation (5) to rotate the row. To increase the security of the generated sequence, the row rotation could be right or left rotation according to the chaos value (odd or even).

Column Rotation
The column rotation is similar to the row rotation and can be applied by selecting N elements of chaos sequence y, choosing η 3 to be an offset value, then starting from η 3 and applying the chaos value y obtained from Equation (6). Now, we have an encrypted image with row and column rotation but with the same histogram of the original image. To overcome histogram attacks, we need to apply one more step to change the value of the image pixel as described in the following point.

XOR Operation
A final step in the encryption process is to XOR the generated sequence obtained through row and column rotations to get new pixel values other than the original ones. The XOR operation is done by converting the M×N image to a new 1 × MN image, then using an offset value η 5 , XOR the chaos sequence z starting from η 5 and select M × N elements to finally get a well-secured encrypted image.

Simulation Setup
The simulations were implemented in MATLAB R2015b (MathWorks, Natick, MA, USA) on a computer with Windows 10, Intel Duo Core I5 @2.53 GHz, 8 GB DDR3 RAM. The proposed cryptosystem was applied to a group of four gray images Lena, Deblur, Mandrill, and Peppers each with a dimension of 256 × 256 as shown in Figure 5a. The proposed 3D mapping encryption algorithm described in the previous section was applied by using the system parameters and initial values given in Table 1, which resulted in an encrypted version for the four selected images as shown in Figure 5b. Then we decrypted the cipher image to get the original image by using the correct key as shown in Figure 4c.

Statistical Analysis
Statistical attacks are a common type of image encryption attack due to the high correlation properties for adjacent pixels within an image. Such kinds of attacks could be avoided through randomly redistributing the pixels within the image and assigning a new value for each pixel. Figure 5 shows the histogram of the images under tests for both the original and encrypted versions. The encrypted images histograms are shown in Figure 6b,d,f and are uniformly distributed in terms of the pixel values compared to those in Figure 6a,c,e.Such uniformity distribution of the pixel values gives a good indication for the strength of the proposed encryption scheme.

Key Sensitivity Analysis
Key sensitivity is a reliable test to measure the encryption cryptosystem strength for a digital image. The better the encryption algorithm, the more sensitive (against even a slight change in a single key) it should be. Table 2 depicts the parameters and initial values used to measure the key sensitivity of our proposed cryptosystem. Even with a variation in one bit in a single parameter between the encryption correct key (K1) and wrong key (K2) for the same image, we realized a difference in the resulting histogram obtained in both cases such as that shown in Figure 7. Table 2. List of the keys used for key sensitivity analysis.

NPCR and UACI Randomness Tests
Two of the most common tests used to measure the image encryption algorithm against differential attacks are NPCR and UACI. Mao and Chen [5,21], first introduced both randomness tests in 2004.
To measure the differential attacks, a randomly pixel of a plain image was chosen and a slight change in the pixel value occurred to get a new plain image. Then, the encryption algorithm was applied on both images to produce the cipher images C 1 and C 2 of the original and new images, respectively. NPCR and UACI are calculated and listed in Table 3. Sufficiently high NPCR/UACI values for both cipher images are usually considered as a strong resistance to differential attacks. The results depicted in Table 3 demonstrate that a slight variation in the original image caused no effect on the existing cryptosystem. However, a significantly larger difference was recognized for our proposed method, i.e., high sensitivity of the proposed cryptosystem even for a slight variation in the original image. The comparison of NPCR and UACI for the proposed and different algorithms on Lena image is demonstrated in Table 4.

Correlation Properties Analysis and Tests
The correlation values between two neighboring pixels in the original image was high and near to 1 for horizontal, vertical, and diagonal positions. Cryptanalysts usually exploit correlation to cause cipher break. To avoid such ciphered image attacks, adjacent pixels must be de-correlated, with low value and close to 0. The correlation formula is given by: In Equation (14), N represents the total number of adjacent pixel and (p i , s i ) are the adjacent pixels' values. The correlation between two pixels for both original and ciphered images are depicted in Table 5, and Figure 8, respectively. Consequently, the proposed cryptosystem achieved zero-correlation and had a high privilege against correlation attacks.
The comparison of correlation coefficient for the proposed algorithm and other algorithms for Lena image is demonstrated in Table 6.

Peak Signal-to-Noise Ratio (PSNR)
PSNR is defined by the quality estimator for image after compression or some modification like mean square error (MSE). Equations (15) and (16) represent the calculation of the PSNR and MSE respectively PSNR = 20 log 10 where, P max is the highest pixel value of the gray image and its value is 255. P(i, j) and C(i, j) are the pixel value at a certain point (i, j) in the original image and the encrypted image, respectively. As long as the PSNR value is small, the resulted encryption algorithm will be more robust. The values of MSE and PSNR for the input tested images are listed in Table 7. The results of PSNR show that the proposed algorithm is very robust.

Noise Attack
During data transmission procedure, the opponent tries to decrypt the encrypted data. When the opponent fails to decrypt the ciphered data, he uses active or passive attacks to prevent the receiver from decrypting the encrypted data. Noise attack is one of most common ways used to distort the communication between the sender and receiver. Therefore, salt and pepper noise attacks were used with different intensity to measure the effect on the decrypted image. The results are provided in Figure 9. It may be visible that the proposed cryptosystem paper can be robust against the salt and pepper noise attack.

Entropy Analysis and Test Results
The entropy H of a message source S is obtained through the following formula: where P (S i ) denotes the probability of (Si). Assuming the message source (S) emitting 256 pixel values of equal probability, the resulting entropy would be near to 8. The obtained entropy represents a truly random source and with an ideal value of the message source S. The uniform distribution indicates greater entropy information. An encrypted image with information entropy less than the ideal value would result in a high risk for the possibility of certainty, which means real image security is threatened. The obtained information entropy values through our proposed encryption scheme as seen in Table 8 refers to ideal values close to 8. The information entropy test results obtained for our proposed encryption scheme would give a good indication of the strength of the proposed algorithm against security threats.

Local Shannon Entropy
Local Shannon Entropy (LSE) is a new performance test to adjust the exact randomness by selecting the non-overlapping blocks inside the cipher image. This performance can be measured by computing the mean of the entropy analysis calculated in the previous section on each block in the cipher image. LSE can be expressed by where, S 1 , S 2 . . . . . . S k are particular k image blocks while l is the amount of pixels for each block. Table 9 illustrates the LSE values for the cipher image.. The results show that the LSE value for the proposed algorithm is nearer to the optimum value (≈8). Therefore, the proposed cryptosystem has high randomness.

Time Efficiency
Time efficiency is running on a computer with Windows 10, Intel Duo Core I5 @2.53 GHz, 8 GB DDR3 RAM (Dell, Round Rock, TX, USA). The time is calculated on both encryption and decryption process. The test is applied on proposed images of size 256 × 256 pixels. Table 10 records the time efficiency of the proposed system and different encryption schemes. The results show that the proposed algorithm is sufficiently fast compared with other schemes, and meets real-time performance necessities. To summarize the performance analysis, Table 11 shows the analysis of the proposed algorithm compared with different schemes on the Lena image.

Conclusions
The main contribution described in this article is the proposal of a novel non-linear algorithm based on a logistic parameter hopped 3D chaotic map, using chaotic hopped parameters instead of fixed parameters for the chaotic map as well as the equalized histogram to increase the security of image encryption. First, dimensional permutation for the rows and columns of the image was obtained through our generated code. Secondly, we assigned the generated random values for the pixels during the value transformation stage. The steps required to build our encryption scheme involved starting with the code generation, followed by the position permutation and shuffling the rows and columns, then applying value transformation for the image pixels ending with the XOR operation. Most of the previous encryption techniques were depending on chaotic maps that used codebooks as a source for code generation. The modulated algorithm added more randomness and scattering for the generated code, which was very difficult to predict. The proposed encryption scheme was evaluated under several statistical tests such as: entropy analysis test, key sensitivity test, correlation properties, peak signal-to-noise ratio, noise attacks, and randomness tests including UACI and NPCR. The obtained test results were compared to similar encryption schemes based on 3D chaotic maps to evaluate the strength of our proposed scheme. The obtained results showed a significant improvement for the system security and resistance against different types of crypto analytical threats compared to other image encryption schemes based on similar algorithms.