A Novel Grayscale Image Encryption Scheme Based on the Block-Level Swapping of Pixels and the Chaotic System

Hundreds of image encryption schemes have been conducted (as the literature review indicates). The majority of these schemes use pixels as building blocks for confusion and diffusion operations. Pixel-level operations are time-consuming and, thus, not suitable for many critical applications (e.g., telesurgery). Security is of the utmost importance while writing these schemes. This study aimed to provide a scheme based on block-level scrambling (with increased speed). Three streams of chaotic data were obtained through the intertwining logistic map (ILM). For a given image, the algorithm creates blocks of eight pixels. Two blocks (randomly selected from the long array of blocks) are swapped an arbitrary number of times. Two streams of random numbers facilitate this process. The scrambled image is further XORed with the key image generated through the third stream of random numbers to obtain the final cipher image. Plaintext sensitivity is incorporated through SHA-256 hash codes for the given image. The suggested cipher is subjected to a comprehensive set of security parameters, such as the key space, histogram, correlation coefficient, information entropy, differential attack, peak signal to noise ratio (PSNR), noise, and data loss attack, time complexity, and encryption throughput. In particular, the computational time of 0.1842 s and the throughput of 3.3488 Mbps of this scheme outperforms many published works, which bears immense promise for its real-world application.


Introduction
Different hardware and software products are changing the way we live. From telecommunications to natural language processing, from cloud server storage to artificial intelligence software, from robotics to varied computer vision applications-one can see the tremendous influences these products have on humanity. Moreover, digital cameras are all around us, which means pictures are being taken around the clock. Images are ubiquitous, e.g., in the form of selfies, family pictures, party pictures, pictures of different dignitaries, etc. Among these images, some are sensitive, e.g., images of spies in military and espionage settings or images of new products made by multinational companies. Storing these images on gadgets and transmitting them through public networks are risky since hackers seek

•
The scheme is efficient regarding the computational time. Thus, it has good chances for its real-world application. • This scheme has achieved better throughput. Moreover, the incorporation of plaintext sensitivity is a good way to avert the potential threats of cryptanalytic attacks.

•
The majority of instructions of the suggested scheme are repetitive. Thus this scheme can be easily customized to run in some parallel settings.
The remainder of this paper is divided into five sections. In Section 2, the basic principles of block-level swapping and the chaotic system are discussed. The mechanisms for key stream generation and encryption/decryption procedures are discussed in Section 3. The simulation, security, and performance analyses using the varied validation metrics are presented in Sections 4 and 5. Finally, the concluding remarks are provided in Section 6.

Basic Principles
The basic working principles upon which the current work depends are discussed in this section.

Chaotic System
The chaos theory probes into the systems that are highly dynamical in their characters and orientations. Moreover, they are extremely sensitive to the two components. These are the system parameters and the initial values of the chaotic system/map. In this work, the intertwining logistic map (ILM) has been used [49]. (1) In the above equation, 0 < µ ≤ 3.999, |k 1 | > 33.500, |k 2 | > 37.970, and |k 3 | > 35.700 are the initial values. The ILM produces three chaotic streams, (l, m, n) as can be seen in the above equation. This map is better than its antecedent logistic map since it has better chaoticity and contains no blank spaces [49]. This map has a desirable feature of chaoticity as this surpasses its predecessor maps. Additionally, there are no empty values and it has an even distribution as depicted in Figure 1a-c. Moreover, it has positive Lyapunov exponents, as shown in Figure 1d.

Block Swapping
Blocks are fixed-size groups of pixels treated as one unit. They can help in improving the computational time of the cipher. In image encryption technology, a pixel is usually treated as a single unit, which is time-consuming. In contrast to that, the proposed scheme has treated 8 pixels as a single unit, dubbed a block. Figure 2 shows the block-wise swapping of the 8 pixels.

Proposed Block-Based Image Encryption Scheme
In this section, we discuss how the chaotic data were generated as well as the suggested scheme for the encryption of images.

Block Swapping
Blocks are fixed-size groups of pixels treated as one unit. They can help in improving the computational time of the cipher. In image encryption technology, a pixel is usually treated as a single unit, which is time-consuming. In contrast to that, the proposed scheme has treated 8 pixels as a single unit, dubbed a block. Figure 2 shows the block-wise swapping of the 8 pixels.

Block Swapping
Blocks are fixed-size groups of pixels treated as one unit. They can help in improving the computational time of the cipher. In image encryption technology, a pixel is usually treated as a single unit, which is time-consuming. In contrast to that, the proposed scheme has treated 8 pixels as a single unit, dubbed a block. Figure 2 shows the block-wise swapping of the 8 pixels.

Proposed Block-Based Image Encryption Scheme
In this section, we discuss how the chaotic data were generated as well as the suggested scheme for the encryption of images.

Proposed Block-Based Image Encryption Scheme
In this section, we discuss how the chaotic data were generated as well as the suggested scheme for the encryption of images.

Generation of the Initial Values and System Parameters
Two different types of keys are used in this scheme: a 256-bit hash code generated from the input image and a 256-bit user key given by the user. The hash key of the plain image helps in the realization of the plain text sensitivity. The hash key and the user key were mixed to generate the system parameters and the initial values of the chaotic map. Both the hash value and user key are split into four blocks of 64 bits each. The 256-bit hash value HV and User key UK are stated as follows: (2) subject to hv a = {hv a,0 , hv a,1 , . . . , hv a,63 }, where in hv a,b , a denotes the character number and b denotes the bit number in hv a,b . Analogously, in the User key UK: uk a = {uk a,0 , uk a,1 , . . . , uk a,63 }, where in uk a,b , a denotes the character number and b denotes the bit number in uk a,b . The following steps show the initial value and key stream generations for the ILM.
Step 1: Both the HV and UK are reshaped into 4 × 64 tables.
Step 2: The XOR operation is made between HV and UK, starting from the first row of the first table and the last row of the second table, as described by the following equations.
where the symbol ⊕ represents the XOR operation. Moreover, R 1,b is the first row of the key table obtained after an XOR operation between HV 1,b and UK 4,b . Similarly, other rows have been treated. Lastly, R is the new 256-bit key value.
Step 3: After adding the values of columns for all four rows, we obtain the following: Step 4: The equations below were used to calculate the ILM system parameters: Step 5: The initial values of the ILM were calculated as where mod(y, z) calculates the remainder when z divides the y.
Step 7: The three chaotic streams of ILM i.e., l, m, and n are further modified as follows.

Encryption Procedure
The proposed image encryption scheme is shown in Figure 3. The encryption procedure is explained in the steps below.

values.
Step 7: The three chaotic streams of ILM i.e., l, m, and n are further m lows. where denotes the number of blocks. Further, − 2, and − are the new key streams according to the alg we conceived. i = 1, 2, …., MN.

Encryption Procedure
The proposed image encryption scheme is shown in Figure 3. The encr dure is explained in the steps below.   Step 1: This involves inputting the grayscale image and decomposing it into the 1D array. The grayscale plain image img of size M × N is input. The input image is then decomposed into the one-dimension (1D) array, i.e., Array. The size of this 1D array is 1 × M × N.
Step 2: This involves decomposing the 1D array into blocks. Decompose the 1D array into blocks; each block size is 64 bits or 8 pixels. The total number of blocks is NoB, obtained as follows.
Step 3.2: Block selection. Select the first and second blocks and assign them to bs1 and bs2, as follows.
The following steps were carried out to perform the swapping operations over the selected blocks. emp = Array(bs1 : bs1 + 8) Here, the variable Temp was used to store the block of the pixels.
Step 3.6: Let Array = Array. Array' is the scrambled image.
Step 4: Diffusion operation. Diffusion effects were realized through the XOR operation between Array and the key − image.
where a = 1, 2, . . . , MN. Reshape the image Array to M × N to obtain the final cipher image.
In the domain of cryptography, two approaches exist for the task of encryption, i.e., the private key and the public key. In this work, we adopted the former approach. Thus, the decryption procedure does not need to be explained in detail. This procedure would just be a reversal of the steps of the encryption procedure.

Simulation
A good cipher must be capable of handling a variety of attacks launched by potential antagonists. The differential attacks, chosen plaintext attack, brute force attack, entropy attack, cipher attack, statistical attack, and many others, are common in the realm of image encryption. To demonstrate it, eight grayscale images were chosen, each with a size of 256 × 256. The grayscale images were downloaded from the online repository of images using the link: http://sipi.usc.edu/database/ (accessed on 4 December 2021). The selected grayscale images were: Lena, baboon, bridge, cameraman, airplane, clock, moon, and ship. MATLAB version R2018a (64-bits), double-precision, was used (according to the IEEE [50] standard 754). The variable values used in the ILM were: k 1 = 33.5, k 2 = 37.9, k 3 = 35.7, Figures 4-7 show the original plain (input) images, scrambled images, encrypted images, and decrypted images, respectively. These figures clearly show that the inputted plain images were converted into unrecognizable formats. The attacker would have no clue on how to retrieve the original input images from the scrambled and output encrypted images.
standard 754). The variable values used in the ILM were: k1 = 33.5, k2 = 37.9, k3 = 35.7, x0 = 0, y0 = 0, z0 = 0, = 0. Figures 4-7 show the original plain (input) images, scrambled images, encrypted images, and decrypted images, respectively. These figures clearly show that the inputted plain images were converted into unrecognizable formats. The attacker would have no clue on how to retrieve the original input images from the scrambled and output encrypted images.   standard 754). The variable values used in the ILM were: k1 = 33.5, k2 = 37.9, k3 = 35.7, x0 = 0, y0 = 0, z0 = 0, = 0. Figures 4-7 show the original plain (input) images, scrambled images, encrypted images, and decrypted images, respectively. These figures clearly show that the inputted plain images were converted into unrecognizable formats. The attacker would have no clue on how to retrieve the original input images from the scrambled and output encrypted images.  standard 754). The variable values used in the ILM were: k1 = 33.5, k2 = 37.9, k3 = 35.7, x0 = 0, y0 = 0, z0 = 0, = 0. Figures 4-7 show the original plain (input) images, scrambled images, encrypted images, and decrypted images, respectively. These figures clearly show that the inputted plain images were converted into unrecognizable formats. The attacker would have no clue on how to retrieve the original input images from the scrambled and output encrypted images.   (e) (f) (g) (h)

Security Analysis
In this section, the performance and security analyses based on different validation metrics are carried out.

Key Space Analysis
In any encryption scheme, one of the most important features is the key space. A large key space provides resistance against a brute force attack. There are four blocks. Each block consists of 64 bits, contributing (2 64 ) 4 = 2 256 to the key space. Further, the ILM has four system parameters and three initial values making up seven variables. Moreover, 10 −15 is taken as the computer precision. Thus, this contributes (10 15 ) 7 = 10 105 to the key space. Therefore, the overall key space comes out as 2 256 × 10 105 = 1.16 × 10 182 . This value is sufficient to counter the brute force threat since it crosses the minimum threshold 2 100 [17,22]. Table 1 highlights the key space of our proposed scheme and its comparison with other published works.

Security Analysis
In this section, the performance and security analyses based on different validation metrics are carried out.

Key Space Analysis
In any encryption scheme, one of the most important features is the key space. A large key space provides resistance against a brute force attack. There are four blocks. Each block consists of 64 bits, contributing (2 64 ) 4 = 2 256 to the key space. Further, the ILM has four system parameters and three initial values making up seven variables. Moreover, 10 −15 is taken as the computer precision. Thus, this contributes (10 15 ) 7 = 10 105 to the key space. Therefore, the overall key space comes out as 2 256 × 10 105 = 1.16 × 10 182 . This value is sufficient to counter the brute force threat since it crosses the minimum threshold 2 100 [17,22]. Table 1 highlights the key space of our proposed scheme and its comparison with other published works.  [19] 10 105 [45] 2 197 ≈ 2 × 10 59 [51] 10 128 [52] 10 90 [53] 2 197 ≈ 2 × 10 59 [54] 2 199 ≈ 8 × 10 59

Statistical Analysis
In image encryption technology, another significant metric is the statistical analysis. Two types of tests have been conducted by researchers, i.e., the histogram analysis and correlation coefficient analysis.

Histogram Analysis
In a given image, the pixel intensity value distribution is provided through the histogram. For a plain image, the histogram has slanting bars, which can be exploited by a hacker to obtain useful information about the image. To resist the statistical attack, a cipher must be capable of converting the slanting bars into a well-organized plain bar with almost the same distribution. In this way, a hacker would not be able to obtain any useful information. The histograms of both plain and cipher images of Lena are shown in Figure 8. Figure 8a shows that the histogram of the Lena plain image has curved slanting bars. In contrast, Figure 8b shows that the histogram is a well-organized plain bar with uniform distribution. These well-organized plain bars provide great immunity against the histogram attack. This shows that the proposed scheme is efficient.

Histogram Analysis
In a given image, the pixel intensity value distribution is provided through the histogram. For a plain image, the histogram has slanting bars, which can be exploited by a hacker to obtain useful information about the image. To resist the statistical attack, a cipher must be capable of converting the slanting bars into a well-organized plain bar with almost the same distribution. In this way, a hacker would not be able to obtain any useful information. The histograms of both plain and cipher images of Lena are shown in Figure  8. Figure 8a shows that the histogram of the Lena plain image has curved slanting bars. In contrast, Figure 8b shows that the histogram is a well-organized plain bar with uniform distribution. These well-organized plain bars provide great immunity against the histogram attack. This shows that the proposed scheme is efficient.

Analysis of the Correlation Coefficient
For any plain and natural images, the pixels are arranged in systematic ways. The close pixels are correlated in an intense manner. The correlation coefficient (CC) is another security parameter by which the inter-pixel correlation is found. These adjacent pixels are diagonally, vertically, or horizontally aligned to one another. Image ciphers are expected to disrupt these adjacent pixels. To analyze the CC of the proposed scheme, we took 3000 pairs of consecutive pixels from both the cipher and original images in an arbitrary way. CC was calculated using the following equation: Here, A denotes the number of pixels; the neighboring pixels are referred to by x and y. The correlation distribution for the adjacent pixels is shown in Figure 9.

Analysis of the Correlation Coefficient
For any plain and natural images, the pixels are arranged in systematic ways. The close pixels are correlated in an intense manner. The correlation coefficient (CC) is another security parameter by which the inter-pixel correlation is found. These adjacent pixels are diagonally, vertically, or horizontally aligned to one another. Image ciphers are expected to disrupt these adjacent pixels. To analyze the CC of the proposed scheme, we took 3000 pairs of consecutive pixels from both the cipher and original images in an arbitrary way. CC was calculated using the following equation: Here, A denotes the number of pixels; the neighboring pixels are referred to by x and y. The correlation distribution for the adjacent pixels is shown in Figure 9.
hacker to obtain useful information about the image. To resist the statistical attack, a cipher must be capable of converting the slanting bars into a well-organized plain bar with almost the same distribution. In this way, a hacker would not be able to obtain any useful information. The histograms of both plain and cipher images of Lena are shown in Figure  8. Figure 8a shows that the histogram of the Lena plain image has curved slanting bars. In contrast, Figure 8b shows that the histogram is a well-organized plain bar with uniform distribution. These well-organized plain bars provide great immunity against the histogram attack. This shows that the proposed scheme is efficient.

Analysis of the Correlation Coefficient
For any plain and natural images, the pixels are arranged in systematic ways. The close pixels are correlated in an intense manner. The correlation coefficient (CC) is another security parameter by which the inter-pixel correlation is found. These adjacent pixels are diagonally, vertically, or horizontally aligned to one another. Image ciphers are expected to disrupt these adjacent pixels. To analyze the CC of the proposed scheme, we took 3000 pairs of consecutive pixels from both the cipher and original images in an arbitrary way. CC was calculated using the following equation: Here, A denotes the number of pixels; the neighboring pixels are referred to by x and y. The correlation distribution for the adjacent pixels is shown in Figure 9.  Figure 9 demonstrates that the cipher and plain images are extremely distinct from each other, asserting the success of the suggested image cipher.

Analysis of Information Entropy
The metric of information entropy (IE) could be used to judge the randomness and arbitrariness in some images. Shannon [55] in 1949 provided the concept of IE using the following mathematical equation: where ( ) is the IE of the information source . The probability of is represented by ( ), and the number of the given image pixels is represented by n. Moreover, the largest value of this metric is calculated as 8 for any encrypted image with 256 grayscale values. Table 2 demonstrate that the cipher and plain images are extremely distinct from each other, asserting the success of the suggested image cipher. It also observed that the cipher and plain images are extremely distinct from each other, asserting the success of the suggested image cipher. The results of IE of our proposed scheme are presented in Table 3. The calculated average IE for the encrypted images is 7.9955, which is near 8.

Analysis of Information Entropy
The metric of information entropy (IE) could be used to judge the randomness and arbitrariness in some images. Shannon [55] in 1949 provided the concept of IE using the following mathematical equation: where E(k) is the IE of the information source k. The probability of k i is represented by d(k i ), and the number of the given image pixels is represented by n. Moreover, the largest value of this metric is calculated as 8 for any encrypted image with 256 grayscale values. Table 2 demonstrate that the cipher and plain images are extremely distinct from each other, asserting the success of the suggested image cipher. It also observed that the cipher and plain images are extremely distinct from each other, asserting the success of the suggested image cipher. The results of IE of our proposed scheme are presented in Table 3. The calculated average IE for the encrypted images is 7.9955, which is near 8.

Plaintext Sensitivity Analysis (Differential Attack)
Cryptanalysts exhaust all possibilities to hack the hidden key of a security product. In this vast range of attacks, the differential attack is included. In the special attack dynamics, the cryptanalyst encrypts a plain image and obtains its encrypted version. Further, one more encrypted image is obtained after making a tiny alteration in the same input image by changing a single pixel value. The discovery of the confidential key can potentially be achieved by closely inspecting these two cipher images. In the literature, two validation metrics were employed to investigate the prowess and immunity of an encryption scheme for the images against differential attacks. These were the unified average changing intensity (UACI) and the 'number of pixels change rate' (NPCR). The following mathematical equations are used to find these two metrics.
Here, the dimensions of the images are denoted by C and D. Further, D(a, b) is defined as: In these equations, C and C denote the encrypted images with a change in the pixel value and no change in the pixel value, respectively. Table 4 shows the average values of NPCR and UACI for the chosen eight images, i.e., 99.6282 and 33.2459, respectively.
A comparison has also been made in Table 5. Additionally, Table 5 shows CC results between neighboring pixels for the input Lena plain image and its encrypted version. It is clear from Table 5 that the results approximate to one for the plain image and zero for the cipher image. Moreover, Table 5 presents a comparison of this security parameter between the published works and the proposed scheme. One can see that the results are comparable. The NPCR results of the proposed scheme are better than the ones in [40,45,[51][52][53][54]. Moreover, the proposed cipher could only beat [53] regarding UACI.  [40] 99.6091 33.4437 [45] 99.6000 33.4000 [51] 99.6000 33.4000 [52] 99.6200 33.4500 [53] 99.6100 33.4200 [54] 99.6110 33.2320

Peak Signal-to-Noise Ratio (PSNR) Analysis
The basic aim of any image encryption scheme is to cause a maximum difference between the plain image and its encrypted version. This metric is employed for this purpose by the cryptographers whose mathematical formula is PSNR = 20 log 10 255/ √ MSE dB where A and B are the dimensions of the image. P 0 (k, l) and P 1 (k, l) refer to the intensity values of pixels of plain and cipher images. The mean squared error (MSE) is the error between the two images. PSNR and MSE are inversely proportional to each other, as the equation implies. The higher the MSE value, the better the scheme will be. Analogously, a lower value of PSNR is desirable. Table 6 shows the PSNR values for the plain, cipher, and decrypted images. The first row of this table has the entries of infinity (Inf) for (O-D). This indicates that plain and decrypted images are exactly the same. Further, this occurred due to the factor MSE = 0. This further implies that the proposed scheme is lossless. Moreover, the second row of Table 6 shows the values for (O-C), which are better than the ones given in [58][59][60]. These stats depict that the proposed scheme is better. A comparative analysis between the published works and the suggested scheme can be seen in Table 6. The IE of the Lena image and the mean values of all the chosen images of the suggested scheme are superior to the one in [39]. Hence, the suggested image cipher is immune to the entropy attack.  9.0348 [59] PSNR(O-C) 8.6878 [60] PSNR(O-C) 9.0486

Noise and Data Loss Analysis
In a real-time scenario, the images are vulnerable to the assaults of data loss and noise. A good scheme is expected to successfully cope with them. Figure 10 shows the noise analysis. The pepper and salt noise was mixed with various densities of 0.1, 0.2, 0.3, and 0.4 in the cipher images of Lena, baboon, cameraman, and airplane (Figure 10a-d).
The images restored after applying the decryption algorithm over them were redrawn in Figure 10e-h, respectively. Obviously, these decrypted images are still recognizable, which demonstrates that the suggested scheme can avert the noise attack. Similarly, a data loss analysis is demonstrated in Figure 11. Figure 11a-d represent the encrypted images with 0%, 25%, 50%, and 50% data losses in the encrypted images of Lena, Lena, airplane, and cameraman, respectively. The decrypted images are shown in Figure 11e-h. One can see that the plain images can be appreciated easily, implying that the proposed image cipher has the capability to foil data loss attacks.   9.0348 [59] PSNR(O-C) 8.6878 [60] PSNR(O-C) 9.0486

Noise and Data Loss Analysis
In a real-time scenario, the images are vulnerable to the assaults of data loss and noise. A good scheme is expected to successfully cope with them. Figure 10 shows the noise analysis. The pepper and salt noise was mixed with various densities of 0.1, 0.2, 0.3, and 0.4 in the cipher images of Lena, baboon, cameraman, and airplane (Figure 10a-d).
The images restored after applying the decryption algorithm over them were redrawn in Figure 10e-h, respectively. Obviously, these decrypted images are still recognizable, which demonstrates that the suggested scheme can avert the noise attack. Similarly, a data loss analysis is demonstrated in Figure 11. Figure 11a-d represent the encrypted images with 0%, 25%, 50%, and 50% data losses in the encrypted images of Lena, Lena, airplane, and cameraman, respectively. The decrypted images are shown in Figure 11e-h. One can see that the plain images can be appreciated easily, implying that the proposed image cipher has the capability to foil data loss attacks.

Computational Time Analysis
Apart from security concerns, speedy ciphers are more demanding in this modern world. The proposed work was carried out using the system with the specification of Intel ® Core™ i7-3740QM CUP@2.70 GHz, 8GB RAM. Further, the Windows 10 Education version operating system was used with MATLAB R2018a. Table 7 shows the execution times for the encryption and decryption algorithms against the chosen images. Upon calculating the average values for encryption and decryption algorithms of the chosen images, we obtained 0.1830 and 0.1831 s. Moreover, the execution time was far better than the published works [40,61] because this scheme is based on the block-level swapping of pixels, due to which we gained a dramatic increase in computational time.  [40] 4.0200 - [61] 1.4800 -Apart from this, there is another associated concept called encryption throughput (ET). This refers to the dimensions of the image is encrypted/decrypted in some unit time. Its equation is

Computational Time Analysis
Apart from security concerns, speedy ciphers are more demanding in this modern world. The proposed work was carried out using the system with the specification of Intel ® Core™ i7-3740QM CUP@2.70 GHz, 8GB RAM. Further, the Windows 10 Education version operating system was used with MATLAB R2018a. Table 7 shows the execution times for the encryption and decryption algorithms against the chosen images. Upon calculating the average values for encryption and decryption algorithms of the chosen images, we obtained 0.1830 and 0.1831 s. Moreover, the execution time was far better than the published works [40,61] because this scheme is based on the block-level swapping of pixels, due to which we gained a dramatic increase in computational time.  [40] 4.0200 - [61] 1.4800 -Apart from this, there is another associated concept called encryption throughput (ET). This refers to the dimensions of the image is encrypted/decrypted in some unit time. Its equation is Table 8 demonstrates the encryption throughout the suggested scheme along with its comparison with other works. The results show that the proposed scheme vividly outperforms these works regarding the important metric of the ET.  [16] 0.4240 [40] 0.1419 [62] 2.3861 The time complexity calculation of the proposed algorithm is as follows.
Step 6 of Section 3.1 takes O(3MN) to generate the three streams of random numbers of the chaotic map employed in this work. Now, we work on Section 3.2.  [11,16,63]  at M = 256 and M = 256. As the dimensions of the input images increase, this factor will also increase.

Conclusions
Upon surveying images from the literature cryptography, one will find that many schemes for image encryption have been written at different granularity levels. These include bits, pixels, DNA strands, and block-level. To expedite the speed, we proposed a new image encryption algorithm in this study. The underlying idea that differentiates it from the other works is that the whole block of pixels has been swapped with another block of pixels. This act gave competitive results as far as the speed and encryption throughput are concerned. The given image is reshaped into a linear array. Through the streams of random numbers, two blocks were selected, consisting of eight pixels. After selection, they were swapped with each other. This action was repeated for an arbitrary number of times. The scrambled image was further XORed with the last and third streams of chaotic data to obtain the final cipher image. The intertwining logistic map was employed in this work. The essential feature of plaintext sensitivity was realized by adding SHA-256 hash codes. An exhaustive security analysis and machine experiments vividly demonstrated the robust defiance of ubiquitous threats from the cryptanalysis community and the chances for real-world applications of the suggested image cipher. In particular, we gained encryption and decryption speeds of 0.1842 and 0.1861 s, respectively, which no doubt gave a major push to the state-of-the-art. In the future, we intend to inject the DNA strands to come up with more security and defiance to potential threats. Moreover, one limitation plagues the proposed cipher, i.e., the sides of the resolution of the given input image must be a multiple of 8. In the future, we will extend our work so that it may cater to all dimensions of the given images. Data Availability Statement: The simulation files/data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest:
The authors declare no conflict of interest.