Designing 1D Chaotic Maps for Fast Chaotic Image Encryption

: Chaotic maps that can provide highly secure key sequences and ease of structure implementation are predominant requirements in image encryption systems. One Dimensional (1D) chaotic maps have the advantage of a simple structure and can be easily implemented by software and hardware. However, key sequences produced by 1D chaotic maps are not adequately secure. Therefore, to improve the 1D chaotic maps sequence security, we propose two chaotic maps: 1D Improved Logistic Map (1D-ILM) and 1D Improved Quadratic Map (1D-IQM). The proposed maps have shown higher efﬁciency than existing maps in terms of Lyapunov exponent, complexity, wider chaotic range, and higher sensitivity. Additionally, we present an efﬁcient and fast encryption method based on 1D-ILM and 1D-IQM to enhance image encryption system performance. This paper also introduces a key expansion method to reduce the number of chaotic map iteration needs, thereby decreasing encryption time. The security analyses and experimental results are conﬁrmed that 2D Correlation Coefﬁcient (CC) Information Entropy (IE), Number of Pixels Change Rate (NPCR), Uniﬁed Average Changing Intensity (UACI), Mean Absolute Error (MAE), and decryption quality are able to meet the encryption security demands (CC = − 0.00139, IE = 7.9990, NPCR = 99.6114%, UACI = 33.46952% and MAE = 85.3473). Furthermore, the proposed keyspace reaches 10 240 , and the encryption time is 0.025s for an image with a size of 256 × 256. The proposed system can yield efﬁcacious security results compared to obtained results from other encryption systems.


Introduction
Due to the massive multimedia technology progression, transmitting digital images through the Internet and mobile communications networks have gained increasing popularity. At the same time, digital image processing technology and the security of images transmitted through public networks have also gained much attention. Image encryption is an effective technique to prohibit unauthorised access of images from public networks. Due to the inherent characteristics of the digital images, such as the bulk data capacity, high redundancy, and robust correlation, conventional methods of the image encryption such as the International Data Encryption Algorithm, Data Encryption Standard (DES), and Advanced Encryption Standard (AES), could not meet the demands of acceptable digital image encryption [1]. To overcome this problem, the researchers suggested numerous cipher methods from several perspectives, in providing sufficient security for the multimedia information, for example, the substitution box (S-box)-based encryption [2], DNA coding-based encryption [3], wave function-based encryption [4], compressive sensingbased encryption [5], Latin square [6], and chaos [7][8][9]. Among the technologies, the Chaos method of image encryption is an excellent and effective one. This is so because chaotic maps have a significant level of sensitivity to the control parameters and initial values, and are characterised by non-convergence, chaotic, and ergodicity. For these reasons, a considerable number of algorithms of chaotic image encryption were developed by the direct

•
A new method to improve 1D chaotic maps is designed to overcome the problems of 1D chaotic maps. • A new key generation scheme is designed to update the initial keys according to information of plaintext image, and a new key expansion method is used to reduce the number of chaotic map iterations.

•
In the diffusion phase, not only is the value of pixel modified but it is also shifted based on the location value of pixels and chaotic sequences. • The proposed system not only provides a high degree of security but also ensures a low encryption time and a simple computational process.
This article is organised as follows. Section 2 presents related work. Section 3 reviews the performance of existing chaotic maps. Section 4 introduces the new chaotic map and demonstrate its accuracy. Section 5 includes the proposed encryption method. Section 6 provides experimental results and analysis, and Section 7 concludes the paper.

Related Work
Over the previous decade, many researchers have attention to present developed and improved image encryption algorithms.
In [26], Herbadji et al. presented an enhanced Quadratic map with enhanced chaotic range to be utilised in colour image cryptosystem. The encryption system includes two rounds of the permutation-diffusion process. The diffusion step is applied in which the Electronics 2021, 10, 2116 3 of 30 three image components are simultaneously encrypted. The security analysis demonstrates the efficiency of the proposed cryptosystem in colour images, although it is not able to encrypt grey-scale images.
In [27], Pak et al. proposed an improved 1D chaotic map made with output sequences of two of the same classical 1-D chaotic maps. The proposed map applications are successfully employed in colour and grey images cryptosystem consisting of permutation, diffusion, and linear transformation steps. In the case of colour image encryption, the chaotic sequence generated in this algorithm needs a high number of iterations to fit all image pixels, thus, taking up a high execution time.
In [28], Ge et al. proposed a symmetric encryption algorithm based on a new chaotic map. The proposed map is used in an encryption system, consisting of two phases: bit-pair level process and pixel-level diffusion. The proposed chaotic map has multiple parameters which can provide good security. On the other hand, the proposed map is relatively complex and needs a high execution time. This is because the map consists of complex trigonometric functions and many conditions determined in each iteration.
In [29], Huang et al. introduced a tweak-cube cryptosystem based on a new 1D chaotic map and a 4D hyper-chaotic map. The suggested map is associated with a 4D map to generate key streams utilised in diffusion and scramble steps. The proposed 1D map behaviour becomes chaotic only in specific regions. Tiny perturbation to the chaotic map parameter can make the parameter enter a nonchaotic part, thereby making the encryption key not secure.
In [30], Pak and Huang suggested enhanced 1D chaotic maps. The enhanced chaotic maps have been generated by combining two classical 1D chaotic maps. Based on those enhanced maps, a cryptosystem with steps of linear-nonlinear-linear conversion is introduced to improve the security of image encryption. The enhanced chaotic maps show superior chaotic properties compared with the classical maps. The proposed encryption system shows adequate security results, but the number of chaotic map iteration needs is considerably high, making the encryption system relatively slow.
In [31], Yavuz et al. suggested encryption based on two chaotic functions, where the encryption system consists of confusion and diffusion principles. In order to provide high resistance against differential attacks, additional operations of circular rotation and XOR are applied on the encrypted image. The algorithm has a good security analysis, but the process of encryption/decryption is complicated and hard to implement, thus making the encryption system not applicable. Furthermore, ideal encryption needs more than three encryption rounds.
Wang et al. [32] have suggested a fast algorithm for encrypting images based on logistic maps that simultaneously performed the operations of diffusion and permutation. Therefore, the number of iterations is decreased to reduce the computational time. The suggested algorithm is capable of resisting the chosen plain text attacks. However, its keyspace is not adequately large in order to endure the statistical attacks, and the effect of the scrambling step is not optimal.
In [33], Liu et al. introduced a fast scheme that simultaneously performs the diffusion and permutation. This cryptosystem has good capability for withstanding the chosen plaintext attacks and low execution time. Nonetheless, it was unsuccessful in resisting the data loss and noise attacks.
In [34], a grey image encryption scheme is presented using a 6D chaotic map combined with Fibonacci Q-matrix. The 6D chaotic map is used to scramble the positions of image pixels, where the Fibonacci Q-matrix is used to diffuse the pixels. The 6D chaotic map provides sufficient keyspace that is able to challenge the differential attacks.
In [35], Liu et al. have introduced a fast method for image encryption in which the processes of permutation and diffusion are simultaneously performed. The row and the column techniques are performed in this method to reduce the processing time. This proposed method showed efficient security and good speed performance.
In [36], Ding and Ding combine 2D chaotic map and 4D Chaotic map with 2D Discrete Wavelet Transform (DWT) to produce a new image encryption system. The authors prove that the encrypted image has high keyspace and security. However, the utilisation of HD chaotic map with DWT increases the complexity in hardware/software implementation.
In [37], a fast encryption method based on chaos, DNA encryption technique, and parallel compressive sensing is introduced. The parallel compressive sensing technique is employed to speed up the encryption system by minimizing the size of the image.

D Chaotic Map
The chaotic map has been produced with a non-linear dynamic system. A specific range of its control parameters can have a strong sensitivity to its initial values. In this section, we will discuss the Logistic map and Quadratic map in brief.

Logistic Map
The Logistic map is an efficient and simple 1D chaotic map that has a complicated, chaotic behaviour, and it can be represented by the equation below: m represents a control parameter with ranges of (0, 4], and x n represents the chaotic output sequence with range [0, 1]. The Logistic map can be chaotic only when m is in the range of [3.57, 4.0], and if the control parameter m is higher than the range, the logistic map cannot be having chaotic behaviours [30]. The bifurcation diagram of the map is capable of the objective reflection of the state and the region of a map's chaotic behaviour. The Logistic map's bifurcation diagram is depicted in Figure 1a. The 1D chaotic map includes a single largest Lyapunov exponent (LE), used to measure whether a map is chaotic. If the value of the LE is bigger than 0, the map can be considered chaotic and the other way around. With the increase of the value of the LE, the complexity of the map is increased (i.e., it becomes less predictable). The LE for the 1D maps is defined in Equation (2), and Figure 2a shows the LE diagram of the Logistic chaotic map.
where f (x) indicates the derivative function of function f (x), while f (x) indicates a 1D chaotic map. n is the number of chaotic map iterations. For the Logistic map output sequence, there are two main drawbacks that are illustrated as follows:

•
The sequence of the Logistic map can be chaotic only when parameter m in the range of [3.57, 4.0], which has been verified by the negative values in the curve of LE diagram that is shown in Figure 2a.

•
Even in the range of m ∈ [3.57, 4.0], there are values that result in no chaotic behaviours in the Logistic map. This has been verified by the blank area in the diagram of the bifurcation that is shown in Figure 1a.
The encryption system must have a close relation to the encryption key, so it is essential to use a sufficient and secure encryption key. The encryption key produced by the Logistic map is relatively small. Only parameter m and initial state x 0 are utilised as initial keys for the Logistic chaotic sequence causing the Logistic map applications to be narrowed down. As a result, it is essential to select a high complexity chaotic map to design the encryption algorithm.

Quadratic Map
The conventional Quadratic map can be defined as the famed chaotic map that has high complexity dynamic behaviour. This map is commonly utilised in the applications of cryptography. The Quadratic map equation can be seen below: Here, c represents the controlling parameter that has the range [0, 2], v n ∈ [−2, 2] represents the produced chaotic sequence. In the case of parameter c ∈ [1.4, 2.0], the Quadratic map has a chaotic behaviour [26]. Even when c ∈ [1.4, 2.0], there are some values that make the quadratic map has no chaotic sequence. Similar to the logistic map, the Quadratic map has the same problems. The bifurcation and LE diagrams are illustrated in Figures 1b and 2b. For the Logistic map output sequence, there are two main drawbacks that are illustrated as follows: • The sequence of the Logistic map can be chaotic only when parameter in the range of [3.57, 4.0], which has been verified by the negative values in the curve of LE diagram that is shown in Figure 2a.

New Chaotic Maps
This section includes the proposed new chaotic map. To verify its precision, the abovementioned 1D chaotic maps have been utilised.

System Designing
The new chaotic map has been characterised using the equation below, where F(m, x n , K, R) represents a new chaotic map. F chaos (m, x n ) is an existing 1D chaotic map (one of the abovementioned). m, K and R represent control parameters with a wide range. The mod represents module operation, which is utilised to make sure that the produced chaotic sequence is confined in the [0, 1] range. F(m, x n , K, R) has a chaotic characteristic in an expanded range that is larger than the existing range of 1D chaotic maps. In the case of the parameters K and R in the range of [2,26] and [1,3], respectively, the new suggested chaotic map has a high complex chaotic behaviour. The m, K and R range has been experimentally confirmed by bifurcation and LE in the following subsection.
The new suggested chaotic system structure is simple, and it can be easily implemented by hardware as well as software.

System Verified
To verify the suggested chaotic system's efficiency, the abovementioned 1D chaotic maps have been utilised as follows.

1D-ILM
In this subsection, the improved version of the Logistic map (1D-ILM) is presented using Equation (4). The presented chaotic map can overcome the problems mentioned in Section 3, making it more appropriate for designing cryptosystems. The improved Logistic map (1D-ILM) can be represented in Equation (5), where the parameter m ∈ (0, 10]. Parameters K and R in the range of [2,26] and [1,3], x n represents the initial value of the sequence, where x n = 0. n represents the number of iterations. The bifurcation diagram of 1D-ILM is shown in Figure 1c-e. The 1D-ILM sequence can exhibit uniform distributions in the range within [0, 1]. Additionally, according to the LE curve that is shown in Figure 2c-e, the results of LE are positive at all values of m ∈ (0.1, 10] K ∈ [2,26] and R ∈ [1,3]. As a result, the chaotic range and the chaotic characteristics of 1D-ILM are efficient, and 1D-ILM is appropriate to be employed in the encryption algorithm.

1D-IQM
For the purpose of generating a chaotic sequence that has an adequate chaotic efficiency, the Quadratic map is modified with the use of Equation (4). The map is referred to as the 1D-Improved Quadratic Map (1D-IQM). The modified equation is as follows: c, K, and R represent the control parameters, and v n represents the initial map's value within (0, 1]. K ∈ [2,26] and R ∈ [1,3]. According to the observations that have been provided in Figure 2f-h, the proposed 1D-IQM exhibits positive LE values (its chaotic conduct) when c ∈ [0, 10], K ∈ [2,26] and R ∈ [1,3]. The chaotic sequences that are generated using 1D-IQM are uniformly distributed in the range of [0, 1], as illustrated in Figure 1f-h.

Application to Other Maps
Numerous 1D chaotic maps are able to be improved with the use of the suggested system designing (Equation (4)).

Performance Evaluation
The new chaotic maps will be evaluated using phase diagram (Attractor), approximate entropy, sensitivity, and uniformity. For simplicity, the value of K and R of 1D-ILM and 1D-IQM are set to 12 and 1 respectively.

Phase Diagram of Chaotic Map
Chaotic systems have outputs of higher randomness in the case where its chaos phase diagram is capable of occupying a bigger phase space. As observed in Figure 3c,d, the output sequence of 1D-ILM and 1D-IQM maps fill a bigger region than the regular Logistic and Quadratic maps sequences in the 2D phase diagram. This means that the 1D-ILM and 1D-IQM sequences have better randomness and ergodicity and are more convenient to be used in image encryption systems. From Figure 4, the Logistic and Quadratic maps have a closed trajectory and significant structure in 3D phase space. On the contrary, the 1D-ILM and 1D-IQM show no closed trajectory, indicating better randomness.

Approximate Entropy (Complexity)
The fundamental concept of the Approximate Entropy (ApEn) algorithm is using a non-negative value to quantify the time series irregularity, unpredictability, and complexity. Moreover, the larger the computed value of the ApEn, the more complex is the sequence produced by a chaotic map [38]. The specific details of the ApEn calculation can be found in [39]. Besides the proposed chaotic maps, three chaotic maps (1DSP [20], LFHCM [29], EQM3 [26]) are compared with the proposed maps. The ApEn diagrams are shown in Figure 5. From Figure 5, the suggested chaotic maps have better ApEn, proving that they can produce sequences with higher unpredictability and complexity.

Approximate Entropy (Complexity)
The fundamental concept of the Approximate Entropy (ApEn) algorithm is using a non-negative value to quantify the time series irregularity, unpredictability, and complexity. Moreover, the larger the computed value of the ApEn, the more complex is the sequence produced by a chaotic map [38]. The specific details of the ApEn calculation can be found in [39]. Besides the proposed chaotic maps, three chaotic maps (1DSP [20], LFHCM [29], EQM3 [26]) are compared with the proposed maps. The ApEn diagrams are shown in Figure 5. From Figure 5, the suggested chaotic maps have better ApEn, proving that they can produce sequences with higher unpredictability and complexity.

Approximate Entropy (Complexity)
The fundamental concept of the Approximate Entropy (ApEn) algorithm is using a non-negative value to quantify the time series irregularity, unpredictability, and complexity. Moreover, the larger the computed value of the ApEn, the more complex is the sequence produced by a chaotic map [38]. The specific details of the ApEn calculation can be found in [39]. Besides the proposed chaotic maps, three chaotic maps (1DSP [20], LFHCM [29], Electronics 2021, 10, 2116 9 of 30 EQM3 [26]) are compared with the proposed maps. The ApEn diagrams are shown in Figure 5. From Figure 5, the suggested chaotic maps have better ApEn, proving that they can produce sequences with higher unpredictability and complexity.

Map Sensitivity
The chaotic maps used in the cryptosystem should be sensitive to the initial value and the control parameters [28]. In order to test the sensitivity level of the proposed chaotic maps, the following procedures will be followed:

•
The chaotic map is iterated 100 times to form the first chaotic sequence.

•
The chaotic map is re-iterated after tiny changes to one of its parameters to form the second sequence.

•
The trajectories of the two generated sequences are compared. Figure 6 shows the map sensitivity results. The difference between the two trajectories of 1D-ILM and 1D-IQM can be visually distinguishable after nearly five iterations, as shown in Figure 6c,d. In regard to the Logistic map and Quadratic map in Figure 6a,b, the difference is distinguishable after nearly 50 iterations. From this result, the 1D-ILM and 1D-IQM have better sensitivity to their parameters.

Map Sensitivity
The chaotic maps used in the cryptosystem should be sensitive to the initial value and the control parameters [28]. In order to test the sensitivity level of the proposed chaotic maps, the following procedures will be followed:

•
The chaotic map is iterated 100 times to form the first chaotic sequence.

•
The chaotic map is re-iterated after tiny changes to one of its parameters to form the second sequence.

•
The trajectories of the two generated sequences are compared. Figure 6 shows the map sensitivity results. The difference between the two trajectories of 1D-ILM and 1D-IQM can be visually distinguishable after nearly five iterations, as shown in Figure 6c,d. In regard to the Logistic map and Quadratic map in Figure 6a,b, the difference is distinguishable after nearly 50 iterations. From this result, the 1D-ILM and 1D-IQM have better sensitivity to their parameters.

Sequence Uniformity
The uniform distribution of the sequences is an indication of the fact that the sequence is robustly random and it has preferable secure performance [40]. On the other hand, in the case of the non-uniform distribution of the sequences, the sequences are not secure, and the statistical attacks have sufficient attack effects. The uneven distribution is an indication that the output sequence randomness is insufficient. The sequence uniformity analysis for chaotic maps can be shown in Figure 7, where the distribution of the Logistic map and Quadratic map is uneven. Consequently, their randomness is relatively poor, and their safety performance, weak. On the other hand, the proposed maps 1D-ILM and 1D-IQM are uniformly distributed, thereby proving significant randomness and preferable security performance.

Sequence Uniformity
The uniform distribution of the sequences is an indication of the fact that the sequence is robustly random and it has preferable secure performance [40]. On the other hand, in the case of the non-uniform distribution of the sequences, the sequences are not secure, and the statistical attacks have sufficient attack effects. The uneven distribution is an indication that the output sequence randomness is insufficient. The sequence uniformity analysis for chaotic maps can be shown in Figure 7, where the distribution of the Logistic map and Quadratic map is uneven. Consequently, their randomness is relatively poor, and their safety performance, weak. On the other hand, the proposed maps 1D-ILM and 1D-IQM are uniformly distributed, thereby proving significant randomness and preferable security performance.

Image Encryption System Based on 1D-ILM and 1D-IQM
The architecture for the proposed encryption system is shown in Figure 8, which consists of two main phases: permutation phase and diffusion phase.

Image Encryption System Based on 1D-ILM and 1D-IQM
The architecture for the proposed encryption system is shown in Figure 8, which consists of two main phases: permutation phase and diffusion phase.

Key Generation Scheme
Key generation scheme steps of the encryption scheme with the use of Message-Digest Algorithm (MD5) are introduced in this subsection, where MD5 is a cryptographic hash function that plays an essential role in image encryption. MD5 can generate a 128-bit

Key Generation Scheme
Key generation scheme steps of the encryption scheme with the use of Message-Digest Algorithm (MD5) are introduced in this subsection, where MD5 is a cryptographic hash function that plays an essential role in image encryption. MD5 can generate a 128-bit hash value [41]. As MD5 is irreversible, it can resist different types of attacks, such as known-plaintext attacks.
In the proposed encryption scheme, the initial values, and parameters of 1D-ILM and 1D-IQM are the secret keys. To make the secret key mainly dependent on image pixels and image size, the following steps will be followed: Step 1: Suppose the plaintext image P(M, N), where M indicates the number of the rows while N indicates the number of columns, we calculate sum P , where sum P represents the sum of all pixel values of P.
Step 2: We calculate two vectors: sum R with the size of M and sum C with the size of N, where sum R is the sum of each row of P and sum C is the sum of each column of P. Then, the MD5 hash of sum R and sum C is calculated to generate R hash and C hash with 128-bit hash value. Divide R hash and C hash into 8-bit (2-byte) blocks in decimal format as expressed in the following equations.
Since the MD5 is very sensitive to any minor changes, one-bit change in P can lead to a significant difference in the hash values (R hash , C hash ). After that, we generate four values based on hash values (R hash , C hash ) using XOR operation (⊕) as in the following equations, Step 3: Suppose the initial keys ..
..      c 2 are randomly selected. Then, the initial keys are updated according to the plain image pixel value as follows: Step 4: 1D-ILM is firstly iterated (M + 100 times) using x 1 and m 1 and secondly iterated using x 2 and m 2 to form two chaotic sequences X1 and X2, respectively. After that, the 1D-IQM is firstly iterated (N + 100 times) using v 1 and c 1 and secondly iterated using v 2 and c 2 to form two chaotic sequences Y1 and Y2, respectively. The First 100 elements of sequences X1, X2, Y1 and Y2 are discarded in order to improve the sensitivity of initial values and parameters of the map (to avert transient effect).
Step 5: After the chaotic sequences X1(M, 1), X2(M, 1), Y1(1, N) and Y2(1, N) are generated by 1D-ILM and 1D-IQM, we propose a key expansion method to reduce the number of iteration as well as the encryption time especially in large-sized images. By using a multiply operation between X1(M, 1) and Y1(1, N) and between X2(M, 1) and Y2(1, N), we obtain two chaotic matrices S 1 (M, N) and S 2 (M, N) respectively. Then, they are manipulated together to form a chaotic matrix S(M, N) as expressed in Equation (13), which has the same size as the input image. (13) where E key is a secret key. For each value of E key , we have a unique chaotic sequence of S. Numerical example of the key expansion method is depicted in Figure 9. The chaotic sequences of the proposed encryption system are directly related to the plaintext image. In the case of minor changes in pixel value or size of plaintext image that occurs, the value of sum P , sum R and sum C will change. Consequentially, the initial value (x 1 , x 2 , v 1 , v 2 ), parameters (m 1 , m 2 , c 1 , c 2 ) and chaotic sequences (X1, X2, Y1, Y2) will significantly change. This is because the proposed chaotic maps and the proposed key generation scheme are extremely sensitive to any minor changes.  N), we obtain two chaotic matrices S 1 (M, N) and S 2 (M, N) respectively. Then, they are manipulated together to form a chaotic matrix ( , ) as expressed in Equation (13), which has the same size as the input image. (13) where E key is a secret key. For each value of E key , we have a unique chaotic sequence of S. Numerical example of the key expansion method is depicted in Figure 9. The chaotic sequences of the proposed encryption system are directly related to the plaintext image.
In the case of minor changes in pixel value or size of plaintext image that occurs, the value of , and will change. Consequentially, the initial value (x 1 , parameters (m 1 , m 2 , c 1 , c 2 ) and chaotic sequences ( 1, 2, Y1, Y2) will significantly change. This is because the proposed chaotic maps and the proposed key generation scheme are extremely sensitive to any minor changes.

Permutation Phase
There is a natural high correlation between the neighbouring pixels in the relevant plaintext image. A good encryption method has to be capable of decreasing that correlation and obscuring the positions of the pixels and making the original image to meaningless chaotic image so that the pixel positions are arranged in a random and unorderly manner.
In the proposed permutation phase, a new permutation scheme using chaotic matrix to alter the location of all pixels of plaintext image chaotically is proposed. The permutation phase is illustrated in the following steps: Step 1: Sort the in ascending order by performing Equation (14) S sorted , S index = sort(S), where S sorted represents the sorted sequence of S, and S index represents the index value of S sorted .
Step 2: The pixels positions of P are re-arranged according to the index matrix (S index ). After all the pixels of P are moved to their new positions, the permuted image P P is generated.

Diffusion Phase
Chosen plaintext attacks have been designed for breaking the encryption system by examining how a minor change in plaintext images can affect the system's encryption results. An efficient diffusion phase is able to make an image encryption system withstand

Permutation Phase
There is a natural high correlation between the neighbouring pixels in the relevant plaintext image. A good encryption method has to be capable of decreasing that correlation and obscuring the positions of the pixels and making the original image to meaningless chaotic image so that the pixel positions are arranged in a random and unorderly manner.
In the proposed permutation phase, a new permutation scheme using chaotic matrix S to alter the location of all pixels of plaintext image chaotically is proposed. The permutation phase is illustrated in the following steps: Step 1: Sort the S in ascending order by performing Equation (14) [S sorted , where S sorted represents the sorted sequence of S, and S index represents the index value of S sorted .
Step 2: The pixels positions of P are re-arranged according to the index matrix (S index ). After all the pixels of P are moved to their new positions, the permuted image P P is generated.

Diffusion Phase
Chosen plaintext attacks have been designed for breaking the encryption system by examining how a minor change in plaintext images can affect the system's encryption results. An efficient diffusion phase is able to make an image encryption system withstand those types of attacks. In the proposed diffusion phase, the column diffusion and row diffusion techniques are used in which the pixels of an image are diffused by columns and then by rows. The diffusion steps are illustrated in the following steps: Step 1: Convert the chaotic sequences X1, X2, Y1 and Y2 into integer sequences by using the following equations, where . represents floor function, L1, L2, L3, and L4 are integer values ∈ (1000, 4000).
Step 2: Chaotic matrix S is converted into integer form to produce diffusion matrix D as in Equation (16).
Step 3: Apply Column Diffusion. The image pixels can be chaotically encrypted by using the value of two previous encrypted pixels to encrypt the current one. For column diffusion, Equation (17) is applied.
where j from 3 to N. And then chaotic column shift is applied to shuffle the columns as in the following expression, where i from 1 to M, j from 1 to N.
Step 4: Apply row Diffusion. Encrypt the image rows according to Equation (19).
where i from 3 to M. After that, shift the rows of image as in Equation (20), where i from 1 to M, j from 1 to N. The chaotic row and column shift is used to increase the security and is also used to increase the encryption system sensitivity. After the diffusion phase is completed, the encrypted image is generated. It is evident that the decryption process is similar to the encryption process but in a reverse way. The encrypted images can be shown in Figure 10.

Extended to Colour Images
In the case of a colour image, it is encrypted by splitting the image components, Red (R), Green (G) and Blue (B). We then treat each component as a grey image. In consequence, the encryption of each component is exactly similar to the proposed encryption steps. Following that, we combine the result of the encryption process of each component to obtain the encrypted image. The encrypted colour images are shown in Figure 11.

Extended to Colour Images
In the case of a colour image, it is encrypted by splitting the image components, Red (R), Green (G) and Blue (B). We then treat each component as a grey image. In consequence, the encryption of each component is exactly similar to the proposed encryption steps. Following that, we combine the result of the encryption process of each component to obtain the encrypted image. The encrypted colour images are shown in Figure 11.

Performance Analysis
The test images consist of standard Lena image of size 512 × 512, and 9 grey images have been chosen from the USC-SIPI Image Database. The secret keys in the encryption algorithm are selected as follows:

Performance Analysis
The test images consist of standard Lena image of size 512 × 512, and 9 grey images have been chosen from the USC-SIPI Image Database. The secret keys in the encryption algorithm are selected as follows: ..        2 = 3, L1 = 2600, L2 = 3500 , L3 = 3000 and L4 = L5 = 1000. K and R for 1D-ILM and IQM are set to 12 and 1, respectively. MATLAB R2015a with Intel Core i7-4600 CPU @2.7GHz and 8GB RAM on Windows 10 operating system.

Statistical Analysis
In this work, three indicators used to evaluate the capability of the proposed image encryption system towards resisting statistical attacks are histogram analysis, correlation analysis, and entropy.

Histogram Analysis
The histogram exhibits the pixel intensity value distribution for a grey image. Figure 12a illustrates plain image histograms. Figure 12b shows that the encrypted image results of even distribution at a [0, 255] interval. It entirely differs from the histogram of the plain image. Based on Figure 12c, the decrypted image results completely preserve the plain image information. In consequence, it becomes hard for the attackers to predict plain images using statistical analyses.

Statistical Analysis
In this work, three indicators used to evaluate the capability of the proposed image encryption system towards resisting statistical attacks are histogram analysis, correlation analysis, and entropy.

Histogram Analysis
The histogram exhibits the pixel intensity value distribution for a grey image. Figure  12a illustrates plain image histograms. Figure 12b shows that the encrypted image results of even distribution at a [0, 255] interval. It entirely differs from the histogram of the plain image. Based on Figure 12c, the decrypted image results completely preserve the plain image information. In consequence, it becomes hard for the attackers to predict plain images using statistical analyses. To further prove the histogram uniformity of the proposed encryption system, the Chi-square test (x 2 ) is utilised, where the Chi-square test (x 2 ) indicates a statistical measure of the distribution of pixels. The formula of the Chi-square test (x 2 ) can be justified below [42].
where represents the levels number of the grey-scale and P i ∈ (0-255) represents the observed frequency occurrences of the grey levels. The value of the Chi-square test (x 2 ) for the encrypted images should be close or below the theoretical value 293.24783 [35]. The results of Chi-square test (x 2 ) are tabulated in Table 1, where the Chi-square test (x 2 ) of encrypted images are close to the theoretical one.  To further prove the histogram uniformity of the proposed encryption system, the Chisquare test x 2 is utilised, where the Chi-square test (x 2 ) indicates a statistical measure of the distribution of pixels. The formula of the Chi-square test (x 2 ) can be justified below [42].
where i represents the levels number of the grey-scale and P i ∈ (0-255) represents the observed frequency occurrences of the grey levels. The value of the Chi-square test (x 2 ) for the encrypted images should be close or below the theoretical value 293.24783 [35]. The results of Chi-square test (x 2 ) are tabulated in Table 1, where the Chi-square test (x 2 ) of encrypted images are close to the theoretical one.

Adjacent Pixels Correlation
The adjacent pixel correlation (C xy ) can be defined as one of the common ways for the evaluation of the image encryption algorithm's performance, and an efficient cryptosystem must eliminate such intrinsic relation for the purpose of improving the resistance against the statistical analyses [43]. Equation (22) is used to calculate the correlation of adjacent pixels (C xy ). where x and y represent the grey-scale values of two pixels that are adjacent in location. N represents the entire number of the x and y obtained from an image. Table 2 lists the Correlation (C xy ) values for various plain images as well as their equivalent encrypted images. The correlation values of the ideal ciphering system have to approach the 0 value. Table 2 shows that the correlation values of encrypted images are noticeably decreased (the values are very close to the 0 value). Additionally, Table 3 lists the comparison with different algorithms. In addition, the adjacent pixel distributions in three various directions are illustrated in Figure 13. As can be seen, from Figure 13a,c,e, the plaintext image has a robust correlation between the neighbouring pixels in the three directions; vertical, horizontal and diagonal. From Figure 13b,d,f, the cipher image points are full of space and are chaotically distributed. Evidently, the pixel value correlations between two neighbouring encrypted image points are considerably decreased.   Figure 13. Adjacent pixels correlation. Figure 13. Adjacent pixels correlation.

Correlations between Original and Encrypted Image
The 2D Correlation Coefficient (CC) between different plain/cipher-image pairs have been analysed through the calculation of the 2D Correlations Coefficient (CC) between the plaintext image and its corresponding encrypted image [47]. The CC can be computed as in the following equation: X ij denotes plaintext image and Y ij denotes cipher-image. X and Y represent the average values of X ij and Y ij elements, respectively. M and N indicate the number of rows and columns of the cipher and plaintext images, respectively. The values of the CC of various plain images have been listed in Table 2. The values in Table 2 are very close to optimal value. i.e., 0.

Information Entropy (IE)
Here, IE is utilised for the evaluation of image randomness, and an information source entropy is: n i denotes a source of the image, N represents a total number of the symbols and P(n i ) denotes the symbol n i probability [48]. For the grey level images, the maximal IE equals 8. Results for various images are given in Table 4. In addition, the entropy comparison of the encrypted Lena image is listed in Table 5. IE of the proposed algorithm remains tightly close to 8 in Tables 4 and 5. Consequently, it is nearly impossible to obtain visual information from encrypted images. A secure encryption system must have a massive keyspace that can resist attacks adequately. The keyspace size is obligated to be bigger than 2 100 to provide a high-security level [49]. For proposed image encryption, the parameters and initial values of chaotic maps are secret keys. The 1D-ILM has one initial value and three control parameters when R and K are considered, and 1D-IQM also has one initial value and three control parameters when R and K are considered. In the proposed scheme, each map is used twice to generate the key sequence. As a consequence, we have twelve control parameters and four initial values. In the case of precision of the initial values and parameter, it is set to 10 −15 , the keyspace equals 10 15×16 = 10 240 ≈ 2 797 , which is bigger than 2 100 . As a result, the suggested method has quite a sufficient keyspace to resist various brute-force attack types. Table 6 lists the keyspace comparison between different algorithms. Table 6. Keyspace comparison.

Key Sensitivity
An efficient method of encryption must have efficient sensitivity to the secret keys. In our method, sensitivity is split into the two points below: 1. Changing the key's value throughout the encryption process causes a significant alteration to the encrypted image. The m 1 is tested in original secret keys. The results of the test following the slight change of m 1 by 10 −15 are observed in Figure 14. The remaining secret keys are the same as above. Based on the results, the encrypted image undergoes a dramatic change in the case where the individual key has been changed 10 −15 . From such results, the proposed method has an efficient sensitivity of the encryption key. 2. The slight change of the key value throughout the decryption process will have a considerable difference in the decrypted image. The test results in the case where the decryption key differs from the key of the encryption by 10 −15 may be observed in Figure 15. Here, a considerable difference is seen between correctly and incorrectly decrypted images in the case where the decryption key differs from the key of encryption by 10 −15 . The accurately decrypted image in Figure 15d restores the original image successfully, while the inaccurately decrypted image in Figure 15c does not recognise any information compared to the original image. From this result, the proposed scheme has sufficient key sensitivity.
maps are secret keys. The 1D-ILM has one initial value and three control parameters when R and K are considered, and 1D-IQM also has one initial value and three control parameters when R and K are considered. In the proposed scheme, each map is used twice to generate the key sequence. As a consequence, we have twelve control parameters and four initial values. In the case of precision of the initial values and parameter, it is set to 10 −15 , the keyspace equals 10 15×16 = 10 240 ≈ 2 797 , which is bigger than 2 100 . As a result, the suggested method has quite a sufficient keyspace to resist various brute-force attack types. Table 6 lists the keyspace comparison between different algorithms.

Key Sensitivity
An efficient method of encryption must have efficient sensitivity to the secret keys. In our method, sensitivity is split into the two points below: 1. Changing the key's value throughout the encryption process causes a significant alteration to the encrypted image. The is tested in original secret keys. The results of the test following the slight change of by 10 −15 are observed in Figure 14. The remaining secret keys are the same as above. Based on the results, the encrypted image undergoes a dramatic change in the case where the individual key has been changed 10 −15 . From such results, the proposed method has an efficient sensitivity of the encryption key.
2. The slight change of the key value throughout the decryption process will have a considerable difference in the decrypted image. The test results in the case where the decryption key differs from the key of the encryption by 10 −15 may be observed in Figure 15. Here, a considerable difference is seen between correctly and incorrectly decrypted images in the case where the decryption key differs from the key of encryption by 10 −15 . The accurately decrypted image in Figure 15d restores the original image successfully, while the inaccurately decrypted image in Figure 15c does not recognise any information compared to the original image. From this result, the proposed scheme has sufficient key sensitivity.  (d) the difference between two encrypted images.

Analysis of the Permutation Performance
According to the permutation performance evaluation method [44], a white image with a small black square in the middle is permuted using the suggested permutation phase. The permutation phase aims to prevent the attackers from recognition of image information. If the permuted image has entirely failed in recognising the original image, it is an indication that the permutation phase is efficient. The permutation result is illustrated in Figure 16, where the black block pixels are dispersed over the whole image.

Analysis of the Permutation Performance
According to the permutation performance evaluation method [44], a white image with a small black square in the middle is permuted using the suggested permutation phase. The permutation phase aims to prevent the attackers from recognition of image information. If the permuted image has entirely failed in recognising the original image, it is an indication that the permutation phase is efficient. The permutation result is illustrated in Figure 16, where the black block pixels are dispersed over the whole image.

Diffusion Performance Analysis
The Differential attack, plaintext attack analysis and avalanche criterion analysis are widely utilised for the assessment of the diffusion efficiency.

Differential Attack Analysis
The Differential attack is considered to be a kind of plaintext attack [44]. The attackers usually make small changes to plain images and utilise the suggested encryption algorithm to encrypt the plain image of prior and post changes. By comparing those two encrypted images, they discover the correlations between the plaintext and cipher images. This type of attack is referred to as the differential attack. For the purpose of resisting the differential attacks, a small plaintext image change must result in a massive alteration in the corresponding encrypted image [50,51]. The number of Pixels Change Rate (NPCR), Unified Average Changing Intensity (UACI), and Mean Absolute Error (MAE) are three

Analysis of the Permutation Performance
According to the permutation performance evaluation method [44], a white image with a small black square in the middle is permuted using the suggested permutation phase. The permutation phase aims to prevent the attackers from recognition of image information. If the permuted image has entirely failed in recognising the original image, it is an indication that the permutation phase is efficient. The permutation result is illustrated in Figure 16, where the black block pixels are dispersed over the whole image.

Diffusion Performance Analysis
The Differential attack, plaintext attack analysis and avalanche criterion analysis are widely utilised for the assessment of the diffusion efficiency.

Differential Attack Analysis
The Differential attack is considered to be a kind of plaintext attack [44]. The attackers usually make small changes to plain images and utilise the suggested encryption algorithm to encrypt the plain image of prior and post changes. By comparing those two encrypted images, they discover the correlations between the plaintext and cipher images. This type of attack is referred to as the differential attack. For the purpose of resisting the differential attacks, a small plaintext image change must result in a massive alteration in the corresponding encrypted image [50,51]. The number of Pixels Change Rate (NPCR), Unified Average Changing Intensity (UACI), and Mean Absolute Error (MAE) are three

Diffusion Performance Analysis
The Differential attack, plaintext attack analysis and avalanche criterion analysis are widely utilised for the assessment of the diffusion efficiency.

Differential Attack Analysis
The Differential attack is considered to be a kind of plaintext attack [44]. The attackers usually make small changes to plain images and utilise the suggested encryption algorithm to encrypt the plain image of prior and post changes. By comparing those two encrypted images, they discover the correlations between the plaintext and cipher images. This type of attack is referred to as the differential attack. For the purpose of resisting the differential attacks, a small plaintext image change must result in a massive alteration in the corresponding encrypted image [50,51]. The number of Pixels Change Rate (NPCR), Unified Average Changing Intensity (UACI), and Mean Absolute Error (MAE) are three common measures that are often utilised. The NPCR and UACI can be measured according to the following equation [52].
where E 1 and E 2 are equally sized images, which represent the cipher image prior and postmodification. E 1 represents the original ciphered image, while E 2 represents ciphered image after one pixel in the plaintext image is changed. The expected NPCR and UACI values for the random grey images should be within 99.6094% and 33.4635%, respectively [53]. The encrypted image results are given in Table 7, and the comparison of the encrypted Lena image is listed in Table 8. The NPCR and UACI of the encrypted image in Table 7 are close to the expected value (NPCR = 99.6094% and UACI = 33.4635). Therefore, the proposed encryption method has a high capability to resist differential attacks. The Mean Absolute Error (MAE) test is another examination used to prove the validation of the encryption system in terms of differential attack [52]. MAE can be described as in the following equation.
In order to reach better encryption security, large value of MAE is needed. Table 7 shows the values of MAE.

Plaintext Attacks Analysis
The conventional cryptanalysis attacks include known-plaintext attacks, ciphertextonly attacks, chosen-ciphertext attacks, and chosen-plaintext attacks. In those four attacks, the chosen-plaintext attacks can be considered the most powerful type of attacks [54]. For this reason, it is presumed that when an encryption system is capable of resisting chosen plaintext attacks, it is capable of withstanding the other three as well [55]. Attackers usually use white or black image to recover the original images. For this reason, they are used to determine the resistance of the algorithm to the chosen plaintext attacks. The results are shown in Figure 17 and Table 9. The encrypted white and black images are not comprehensible, and their histograms are uniform, as can be seen in Figure 17. From Table 9, it can be seen that the correlation in different directions is considerably decreased, and the two image entropies are close to the ideal value. Moreover, their NPCR and UACI are close to optimal values. As all tests are close to the optimum value, the chosen-plaintext attacks are efficiently resisted in the suggested algorithm of diffusion. this reason, it is presumed that when an encryption system is capable of resisting chosen plaintext attacks, it is capable of withstanding the other three as well [55]. Attackers usually use white or black image to recover the original images. For this reason, they are used to determine the resistance of the algorithm to the chosen plaintext attacks. The results are shown in Figure 17 and Table 9. The encrypted white and black images are not comprehensible, and their histograms are uniform, as can be seen in Figure 17. From Table 9, it can be seen that the correlation in different directions is considerably decreased, and the two image entropies are close to the ideal value. Moreover, their NPCR and UACI are close to optimal values. As all tests are close to the optimum value, the chosen-plaintext attacks are efficiently resisted in the suggested algorithm of diffusion. histogram of (a); (f) histogram of (b); (g) histogram of (c), (h) histogram of (d). Evidently, changing a single bit in a plaintext image must theoretically result in a 50% difference in the bits of the cipher image [56]. The plain image will be encrypted in order to form cipher image E 1 , and after that, a single bit of the original image is changed and the image is encrypted for forming E 2 . Avalanche Criterion (AC) is applied between E and E 2 based on Equation (28). The results are depicted in Figure 18  (e) histogram of (a); (f) histogram of (b); (g) histogram of (c); (h) histogram of (d). Evidently, changing a single bit in a plaintext image must theoretically result in a 50% difference in the bits of the cipher image [56]. The plain image will be encrypted in order to form cipher image E 1 , and after that, a single bit of the original image is changed and the image is encrypted for forming E 2 . Avalanche Criterion (AC) is applied between E 1 and E 2 based on Equation (28). The results are depicted in Figure 18. As shown in Figure 18, Avalanche Criterion (AC) results of the suggested model are quite close to the theoretical value.

AC =
Number of changed bit between E 1 and E 2 Total number of bit × 100% (28)

Noise and Data Loss Attacks Analysis
In this subsection, the noise attacks and the data loss attacks of the proposed encryption algorithm are analysed, which is highly important in encrypted image transmission. Avalanche (%) Figure 18. Avalanche criterion.

Noise and Data Loss Attacks Analysis
In this subsection, the noise attacks and the data loss attacks of the proposed encryption algorithm are analysed, which is highly important in encrypted image transmission.

Noise Attack Analysis
For the purpose of testing the robustness of the suggested approach against the noise attacks, the following process has been performed. The original image O I has been encrypted with the use of the suggested algorithm of encryption. After that, a different density noise has been added to the encrypted image. Then, the noisy encrypted image is decrypted to form D I . Results of the encrypted image with 1%, 5%, and 10% of noise density are shown in Figure 19. The Mean Square Error (MSE) is widely used to measure the average difference between O I and D I . The MSE is calculated using Equation (29). (29) M and N denote the entire number of rows and columns, while Peak Signal-to-Noise Ratio (PSNR) is a quantitative evaluation of similarity between O I and D I . PSNR is calculated as follows: where I max 2 is the maximum value of pixels of MSE. Both Figure 19 and Table 10 confirmed that the encrypted images can be retrieved properly.

Noise Attack Analysis
For the purpose of testing the robustness of the suggested approach against the noise attacks, the following process has been performed. The original image O I has been encrypted with the use of the suggested algorithm of encryption. After that, a different density noise has been added to the encrypted image. Then, the noisy encrypted image is decrypted to form D I . Results of the encrypted image with 1%, 5%, and 10% of noise density are shown in Figure 19. The Mean Square Error (MSE) is widely used to measure the average difference between O I and D I . The MSE is calculated using Equation (29). (29) M and N denote the entire number of rows and columns, while Peak Signal-to-Noise Ratio (PSNR) is a quantitative evaluation of similarity between O I and D I . PSNR is calculated as follows: where I 2 max is the maximum value of pixels of MSE. Both Figure 19 and Table 10 confirmed that the encrypted images can be retrieved properly. Data in a different size in the encrypted image have been eliminated (Cropped) by substituting them with zeros. Following that, we try to recover the plaintext image from the encrypted image with data loss. Results of encrypted images with 1/16 data crop, 1/4 data crop and 1/2 data crop are illustrated in Figure 20. Those recovered images are also evaluated by calculating the respective MSE and PSNR. The larger calculated value of PSNR means better resistance to attacks. The result of MSE and PSNR are listed in Table 10. As can be seen from Figure 20 and Table 10, the suggested algorithm can resist various attacks (i.e., data loss attacks) in the spatial domain. Electronics 2021, 10, x FOR PEER REVIEW 28 of 32 Figure 19. Noise attack analysis. Data in a different size in the encrypted image have been eliminated (Cropped) by substituting them with zeros. Following that, we try to recover the plaintext image from the encrypted image with data loss. Results of encrypted images with 1/16 data crop, 1/4 data crop and 1/2 data crop are illustrated in Figure 20. Those recovered images are also evaluated by calculating the respective MSE and PSNR. The larger calculated value of PSNR means better resistance to attacks. The result of MSE and PSNR are listed in Table  10. As can be seen from Figure 20 and Table 10, the suggested algorithm can resist various attacks (i.e., data loss attacks) in the spatial domain.

The Quality of Decryption
Decryption quality was assessed through the calculation of the 2D Correlation Coefficient (CC). For adequate decryption, CC has to be near or equal to 1. For the suggested decryption, the CC of every decrypted image equals 1, and it is proven that each decryption process is highly accurate. In other words, the decrypted image is identical to its corresponding plaintext image. Therefore, good quality has been shown in the suggested decryption.

The Quality of Decryption
Decryption quality was assessed through the calculation of the 2D Correlation Coefficient (CC). For adequate decryption, CC has to be near or equal to 1. For the suggested decryption, the CC of every decrypted image equals 1, and it is proven that each decryption process is highly accurate. In other words, the decrypted image is identical to its corresponding plaintext image. Therefore, good quality has been shown in the suggested decryption.

Execution Time
Encryption speed is a necessary condition for evaluating the efficiency of cryptosystems. The experimental environment was the MATLAB R2015a with Intel Core i7-4600 CPU @2.7 GHz and 8 GB RAM on Windows 10 operating system. Taking the 256 × 256 image as an example, the results are shown in Table 11. In our algorithm, the result proves that the proposed encryption system has low encryption time as compared with the referenced systems.

Conclusions
Firstly, this paper improved two chaotic maps: 1D-ILM and 1D-ILM based on Logistic and Quadratic maps. Their performance evaluation showed that the improved maps have a large Lyapunov exponent, high complexity, wider chaotic range, and high sensitivity. Thus, they proposed efficient chaotic performance to be used in an image encryption system. Secondly, an image encryption system based on proposed maps is designed with a high-security level. The proposed scheme is very sensitive to the secret keys in which any changes can produce a completely different encrypted image. The NPCR and UACI values are close to the expected values, and the black and white image test has proven the capability of resisting the chosen-plaintext attacks. A high level of randomness of the encrypted image is proven by entropy measure and is very close to the ideal entropy value, i.e., eight. The histogram distribution is uniform for the encrypted image, and the correlation coefficient is considerably decreased between the adjacent pixels.
Additionally, the proposed scheme can effectively withstand noise and data loss attacks. Lastly, encryption schemes with a sufficient keyspace can be characterised by a long execution time. Nonetheless, the suggested system has sufficient keyspace in comparison with referenced schemes along with a shorter encryption time. This is because the proposed key expansion method can reduce the number of chaotic map iteration needs for the encryption/decryption process and thereby the execution time of the encryption system is enhanced. The proposed encryption system has a large keyspace that reaches 10 240 , and the encryption time for an image of the size of 256 × 256 is 0.025 s. In consequence, it can be efficiently utilised to transmit digital images in public networks. In future work, we will try to study three main points: (1) the effect of altering the chaotic maps on the encryption system efficiency; (2) the effect of simultaneously performing permutation and diffusion operations on processing time; (3) the effect of combining other encryption technique such as DNA technique and S-box technique with the proposed technique on encryption system robustness and security.