# A New Multistage Encryption Scheme Using Linear Feedback Register and Chaos-Based Quantum Map

Authors: Adel R. Alharbi; Jawad Ahmad; Arshad; Sajjad Shaukat Jamal; Fawad Masood; Yazeed Yasin Ghadi; Nikolaos Pitropakis; William J Buchanan
Journal: Complexity
 (2022)

---

## Abstract

With the increasing volume of data transmission through insecure communication channels, big data security has become one of the important concerns in the cybersecurity domain. To address these concerns and keep data safe, a robust privacy-preserving cryptosystem is necessary. Such a solution relies on chaos encryption algorithms over standard cryptographic methods that possess multistage encryption levels, including high speed, high security, low compute overheads, and procedural power, among other characteristics. In this work, a secure image encryption scheme is proposed using linear feedback shift register (LFSR) and chaos-based quantum chaotic map. The focus of the scheme is mainly dependent on the secret keys from the input of the algorithm. The threat landscape, the statistical test analysis, along critical comparisons with other schemes indicate that the presented algorithm is significantly secure and is resistant to a wide range of different attacks such as differential and statistical attacks. The proposed method has sufficiently higher sensitivity and security when compared to existing encryption algorithms. Several security parameters validated the security of proposed work such as correlation coefficient analyses among the neighboring pixels, entropy, the number of pixels change rate (NPCR), unified average change intensity (UACI), mean square error (MSE), brute force, key sensitivity, and peak signal to noise ratio (PSNR) analyses. The randomness of the ciphers produced by the proposed technique is also passed through NIST-800-22. The results of NIST indicate that the ciphers are highly random and do not produce any type of periodicity or pattern.


---

## Body

## 1. Introduction

With the fast progression of data technology, a high volume of multimedia data, comprising digital images, video, and audio, is produced and distributed across various networks. Multimedia data, particularly digital images, is one of the most extensively used data formats in modern times. Since digital images contain information that can be sensitive at times, unauthorized access to a secret image can result in serious information security incidents. As a result, it is critical to add a security layer to protect sensitive digital images. Researchers in this area have recently established numerous methodologies to securely communicate digital images, such as information hiding, data encryption, steganography, and digital watermarking. Contents in an image can be protected via image encryption algorithms. An image data encryption algorithm converts meaningful information into cipher data that is unrecognizable, thus preventing the potential intruders from extracting the original information. The original data can be fully retrieved by using the proper key. The sensitive data cannot be retrieved by using the wrong key. Among all image encryption techniques, chaos theory is the most extensively utilized and operational technique that provides security to the data without introducing considerable overheads. This is because chaos theory shares many properties with image encryption principles [1–3].On the other hand, chaos deprivation occurs due to precision limitations when a chaotic system is employed in a digital stage. As a result, image encryption methodologies that rely solely on chaotic schemes have numerous security flaws. Combining chaotic systems with other techniques is one effective way to solve this problem. Furthermore, several image encryption procedures based on other methodologies, such as frequency domain transformation and compressive sensing, have been suggested in the literature [2, 3].Encrypted multimedia information such as chaos-based image security plays an essential role in the upcoming quantum computers era. With the introduction of quantum systems, concerns regarding chaos-based classical systems have drawn the attention of the cyber security community. As time passes, the classical chaos-based dynamical system becomes quantized; thus, researchers need to study the combined effect of quantum and chaotic systems. The quantum chaotic map with the bifurcation explanation was initially proposed in [4]. After that, the quantized baker’s transformation was studied in [5]. The structure of the trace formula for quantum maps on a compact phase space was analyzed in [6]. Many other aspects of quantum chaos were discussed in [7–10]. The new version of the study is known as the quantum version of the classical chaotic system. The innovative quantized version of the chaos-based system using chaotic quantum system possesses better properties and provides deep insight into the nature of quantum chaos. The sensitive dependence of chaotic systems gives rise to chaos for some specific initial conditions. The new map, the quantized version (chaotic quantum map), is based on canonical transformation; however, there is no proper technique for quantizing the classical map. Many cryptographers and researchers are working on using quantum maps for image encryption in the context of quantum chaos combination.Numerous image data encryption technique has been examined and concluded that symmetric cipher-based encryption systems require limited options and have larger bandwidth, making them appropriate for multimedia data security. Chai et al. proposed an image encryption technique based on DNA encryption and chaos [11]. Praveen et al. developed a new cryptosystem for medical image Trans receiving based on the chaos [12]. Kadir et al. utilized the concept of a hyperchaotic system of 6th order CNN and skew tent map for color image encryption [13]. Masood et al. employed the combination of chaos and DNA genetic encoding for the construction of a secure encryption scheme [14]. Fawad et al. offered a secure medical encryption algorithm based on Brownian motion, Henon chaotic map, and Chen’s chaotic system with elevated security [15]. Shah et al. proposed a privacy-preserving mechanism using Dynamic Newton Leipnik and Modified logistic maps [16]. Butt et al. applied the combination of Lucas series and Pseudo Quantum map to offer a digital image confidentiality scheme [17]. Private key ciphers are further categorized into two types: stream ciphers and block ciphers. Numerous existing block and stream ciphers produce high randomness that might be resistant to different classical attacks. However, it has been discovered that stream ciphers are slow as they encrypt one bit or one byte at a time. The stream cipher’s basic operation is to yield a high-quality long pseudorandom keystream, which is then used to encode the image data. The output from several Linear Feedback Shift Register (LFSRs) can be fed into an appropriate nonlinear Boolean function to create a stream cipher. Furthermore, the utilization of bit-positioned operations in the LFSR-based algorithm, this image encryption has higher bandwidth. Because of its high throughput and low computational resource requirements, arbitrary number initiation may be a promising method for data encryption. Moreover, current workstations support the word process, and the price of creating a one bit is the equivalent as that of producing a w-bit word, where w is the machine processor’s word size [18, 19]. The block size of a processor can range from 16 to 64 bits. The current review encourages us to use word-LFSR based on nonlinear functions for data encryption. Many encryption schemes based on the quantum chaotic map along with some other structures have been proposed in the literature [20–22]. But the key generation procedures in the recent quantum-based chaotic structures are independent of the plaintext which makes it vulnerable against the differential and classical attacks. Therefore, our proposed encryption structure includes the key generation based on plaintext and changes concerning the change in the input.In this work, the combination of LFSR and quantum chaotic map has been utilized to offer an efficient image encryption approach. The suggested system is completely key-dependent. The input of the algorithm generates the initial seeds to LFSR and quantum chaotic map. The proposed encryption technique comprises confusion-diffusion architecture. Some cryptographic analysis ensures the security of the offered system. The simulation results of performance analysis indicate that the suggested encryption technique yields ciphers with high randomness and low correlation. Therefore, the proposed encryption structure is robust and secure for data transmission. The contributions of this work can be summarized as follows:(i)
A novel multistage encryption scheme using a linear feedback register and a chaos-based quantum map is proposed(ii)
Security of the proposed methodology against known attacks is extensively analyzed(iii)
A comparison of the proposed methodology against competing approaches found in the literature is conductedThis manuscript is structured as follows: Section2 offers basic concepts about cryptosystem; Structure of offered approach is defined in Section 3; In Section 4, security analyses are performed; Section 5 presents comparative analysis; Finally, Section 6 concludes our work while giving some pointers for future work.


## 2. Some Basic Concepts

### 2.1. Linear Feedback Shift Register

LFSR is based on a logic circuit that works in a sequential order used in digital circuits to store digital data. It is built up in a linear form with inputs/outputs coupled. The process of data starts once the circuit is triggered. The input bit of LFSR yields a linear function of two or further of its preceding states, also known as taps. An LFSR of sizen is made up of n stages as, 0,1,…,n−1, each of which may store one bit, and a clock that controls data interchange. The shift register would be initialized with a vector containing elements p0,…,pn−1. The following operations are carried out at time i.(i)
The output includespi (the content of stage 0)(ii)
The data of stagei is relocated to phase i−1, for 1≤i≤n−1(iii)
The new data (the feedback bit) of stagen−1 is acquired by XORing a subsection of the n stages’ dataAn LFSR’s initial input is referred to as a seed. Because any register can only have a restricted number of taps, it must ultimately become periodic. An LFSR with a carefully designed feedback function and seed, on the other hand, can generate a structure of bits that seems random (and has strong statistical features) and has a long period. Pseudorandom numbers, rapid digital counters, pseudo-noise sequences, cryptography, whitening sequences, and other applications can all benefit from LFSRs, which can be employed in hardware and software. There are many alternative setups such as Figure1 illustrates a simple setup that starts with an input of all 1’s and is very simple to employ in hardware and software. An LFSR of this category will never encompass only 0’s and will stop if a binary string containing only 0’s is input into it. Only certain tap combinations (i.e., the nonzero coefficients ci described below) will result in a maximum sequence with a period of 2n−1 series. If the initial (left) 4 bits are given to the LFSR, the subsequent sequence will be generated:Figure 1
LFSR with five stagespi, and feedback bit p4=p1⊕p3.1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1.If the content of the phasepi is pi,0≤i≤m−1, then pm−1,…,p1,p0 is known as the initial state of the LFSR. From the description of an LFSR, the yielded sequence p0,p1,… will satisfy the subsequent recursion(1)pj=∑i=1mcipj−i,j≥m.The polynomialCx=1+c1x+⋯+cmxm is the feedback (or connection) polynomial of the sequence cjj=pj:j=0,1,…. The LFSR is nonsingular if cm=0, that is, the degree of its feedback polynomial is m .As the powers in the linear feedback function are 16, 14, 13, 11, the bits at these situations are XORed. The bits are shifted by 1, and then the XORed value is maintained as the first bit. The pseudoalgorithm explaining the general scenario of the linear feedback shift register is presented in Algorithm 1.Algorithm 1: Algorithm of Linear Feedback Shift Register.
Input: keyOutput: pseudorandom numbers sequence(1)while value! = 0 and value is not reiterating,Do(2)Bin ⟵ attain the binary configuration of the Value.(3)Pad until bin has 16 bits with leading zeros.(4)XOR the bits at situations respective to LF function and save it in m.(5)Bin ← shift the bin by one toward the right.(6)Pad until bin has 16 bits with leading zeros.(7)The first bit is replaced withm in the bin.(8)Value ← attain the decimal value of the obtained binary configuration.(9)
End


### 2.2. Quantum Chaotic Map

This section presents a high-level summary of the quantum logistic map. The logistic map is discussed in [23] when the dissipation parameter is increased. Goggin et al., [24] developed a chaos-based quantum map that was dissipative by attaching a harmonic oscillator (quantum kicked) and observing the resulting dissipation. They write p=p+δp to explore the properties of quantum corrections, where δp signifies a quantum fluctuation about p [24], and p represents a quantum correction. The following differential equations govern this map with the lower order quantum corrections:(2)ai+1=rai−ai2−rbi,bi+1=−bie−2β+e−βr2−ai−ai∗bi−aici∗−ai∗bi,ci+1=−cie−2β+e−βr21−ai∗ci−2aibi−ai,where a=p,b=δa†δa,c=δaδa, and β,r are bifurcation parameters. In general, ai+1, bi+1, and ci+1 are all complex numbers, with ai∗ signifying the complex conjugate of ai and ci∗ symbolizing the complex conjugate of ci, respectively. If it is established that the initial values are real numbers, it can be concluded that all following values will also be real numbers. The logistic map with additive noise has the same shape as in equation (1) a. It should be mentioned that the noise is generated entirely by the computer system. The noise in this circumstance serves as a gauge for the strength of quantum correlations. The quantum corrections biand ci⟶∞reduce equation (1) to the classical, one-dimensional logistic map in the presence of the quantum corrections. The resilient dissipation limit β⟶∞ of the quantum logistic map also provides the classical logistic map, which is a further benefit. The quantum map depicts a road to chaos that doubles in length every period. When using an unsigned binary representation, the fixed point at 1 can be avoided by rounding down, whereas the fixed point at 0 is more difficult to avoid. Options include reseeding the circuit with a new randomly chosen initial condition (which must be coordinated with synchronized circuits), adding a constant value (which leads to known state conditions to any source that knows the constant and arithmetic precision), or limiting the valid range of chaotic parameter values so that the mapping cannot generate a value less than LSB/2 [25]. Figure 2 shows the bifurcation diagram of equation (1).Figure 2
Bifurcation diagram of parametersβ at r=3.88 in (a) x-direction; (b) y-direction; (c) z-direction.
(a)(b)(c)


## 2.1. Linear Feedback Shift Register

LFSR is based on a logic circuit that works in a sequential order used in digital circuits to store digital data. It is built up in a linear form with inputs/outputs coupled. The process of data starts once the circuit is triggered. The input bit of LFSR yields a linear function of two or further of its preceding states, also known as taps. An LFSR of sizen is made up of n stages as, 0,1,…,n−1, each of which may store one bit, and a clock that controls data interchange. The shift register would be initialized with a vector containing elements p0,…,pn−1. The following operations are carried out at time i.(i)
The output includespi (the content of stage 0)(ii)
The data of stagei is relocated to phase i−1, for 1≤i≤n−1(iii)
The new data (the feedback bit) of stagen−1 is acquired by XORing a subsection of the n stages’ dataAn LFSR’s initial input is referred to as a seed. Because any register can only have a restricted number of taps, it must ultimately become periodic. An LFSR with a carefully designed feedback function and seed, on the other hand, can generate a structure of bits that seems random (and has strong statistical features) and has a long period. Pseudorandom numbers, rapid digital counters, pseudo-noise sequences, cryptography, whitening sequences, and other applications can all benefit from LFSRs, which can be employed in hardware and software. There are many alternative setups such as Figure1 illustrates a simple setup that starts with an input of all 1’s and is very simple to employ in hardware and software. An LFSR of this category will never encompass only 0’s and will stop if a binary string containing only 0’s is input into it. Only certain tap combinations (i.e., the nonzero coefficients ci described below) will result in a maximum sequence with a period of 2n−1 series. If the initial (left) 4 bits are given to the LFSR, the subsequent sequence will be generated:Figure 1
LFSR with five stagespi, and feedback bit p4=p1⊕p3.1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1.If the content of the phasepi is pi,0≤i≤m−1, then pm−1,…,p1,p0 is known as the initial state of the LFSR. From the description of an LFSR, the yielded sequence p0,p1,… will satisfy the subsequent recursion(1)pj=∑i=1mcipj−i,j≥m.The polynomialCx=1+c1x+⋯+cmxm is the feedback (or connection) polynomial of the sequence cjj=pj:j=0,1,…. The LFSR is nonsingular if cm=0, that is, the degree of its feedback polynomial is m .As the powers in the linear feedback function are 16, 14, 13, 11, the bits at these situations are XORed. The bits are shifted by 1, and then the XORed value is maintained as the first bit. The pseudoalgorithm explaining the general scenario of the linear feedback shift register is presented in Algorithm 1.Algorithm 1: Algorithm of Linear Feedback Shift Register.
Input: keyOutput: pseudorandom numbers sequence(1)while value! = 0 and value is not reiterating,Do(2)Bin ⟵ attain the binary configuration of the Value.(3)Pad until bin has 16 bits with leading zeros.(4)XOR the bits at situations respective to LF function and save it in m.(5)Bin ← shift the bin by one toward the right.(6)Pad until bin has 16 bits with leading zeros.(7)The first bit is replaced withm in the bin.(8)Value ← attain the decimal value of the obtained binary configuration.(9)
End


## 2.2. Quantum Chaotic Map

This section presents a high-level summary of the quantum logistic map. The logistic map is discussed in [23] when the dissipation parameter is increased. Goggin et al., [24] developed a chaos-based quantum map that was dissipative by attaching a harmonic oscillator (quantum kicked) and observing the resulting dissipation. They write p=p+δp to explore the properties of quantum corrections, where δp signifies a quantum fluctuation about p [24], and p represents a quantum correction. The following differential equations govern this map with the lower order quantum corrections:(2)ai+1=rai−ai2−rbi,bi+1=−bie−2β+e−βr2−ai−ai∗bi−aici∗−ai∗bi,ci+1=−cie−2β+e−βr21−ai∗ci−2aibi−ai,where a=p,b=δa†δa,c=δaδa, and β,r are bifurcation parameters. In general, ai+1, bi+1, and ci+1 are all complex numbers, with ai∗ signifying the complex conjugate of ai and ci∗ symbolizing the complex conjugate of ci, respectively. If it is established that the initial values are real numbers, it can be concluded that all following values will also be real numbers. The logistic map with additive noise has the same shape as in equation (1) a. It should be mentioned that the noise is generated entirely by the computer system. The noise in this circumstance serves as a gauge for the strength of quantum correlations. The quantum corrections biand ci⟶∞reduce equation (1) to the classical, one-dimensional logistic map in the presence of the quantum corrections. The resilient dissipation limit β⟶∞ of the quantum logistic map also provides the classical logistic map, which is a further benefit. The quantum map depicts a road to chaos that doubles in length every period. When using an unsigned binary representation, the fixed point at 1 can be avoided by rounding down, whereas the fixed point at 0 is more difficult to avoid. Options include reseeding the circuit with a new randomly chosen initial condition (which must be coordinated with synchronized circuits), adding a constant value (which leads to known state conditions to any source that knows the constant and arithmetic precision), or limiting the valid range of chaotic parameter values so that the mapping cannot generate a value less than LSB/2 [25]. Figure 2 shows the bifurcation diagram of equation (1).Figure 2
Bifurcation diagram of parametersβ at r=3.88 in (a) x-direction; (b) y-direction; (c) z-direction.
(a)(b)(c)


## 3. Proposed Encryption Algorithm

The combination of quantum chaotic map and LFSR is created for use in the encryption system that is being suggested. Using this function in combination with word-based LFSR, it is possible to generate extremely high-quality pseudorandom numbers. In cryptography, developing a robust LFSR with extraordinary periodicity and great cryptological characteristics is a current research topic. This function can preserve a wide range of cryptographic characteristics. The secret key generation, with the addition presented technique using encryption and decryption, is structured as follows:


### 3.1. Key Generation

The key generation of the proposed cryptosystem is completely dependent on the input of the encryption technique. The private key’s dependency on plaintext makes it secure against chosen-plaintext attack, chosen-ciphertext attack, and known-plaintext attack. The two parts of encryption diffusion and key-based substitution depend on the plaintext-based key. The first part is the generation of the LFSR sequence for which the plaintext provides seed value. The produced LFSR sequences are diffused with the original image. The second part is the production of a quantum chaotic map-based key for key-based substitution. The chaotic map key is also plaintext dependent because the initial values of the differential equation set are induced by using input values.Consider the size of the input imageM is P×Q×3. After separating the image into three layers, R, G, B, we get each layer of size P×Q. The seed value for LFSR and initial conditions for the chaotic map is generated by(3)I=∑i=1P∑j=1QpiqjP×Q.After inserting this value ofI for image M the keys K1 and K2 are obtained by the LFSR and chaotic quantum map.


### 3.2. Encryption and Decryption

The encryption process of the presented structure follows the confusion and diffusion properties. Corresponding to Shannon’s theory [26], a resilient cryptosystem must contain confusion and diffusion effects. To achieve robust security, the system is subjected to input-dependent key and confusion-diffusion strategies. The encryption strides are defined as follows:Step 1.
Read an image inputM of size P×Q×3 and convert it into a red, green, and blue layer.Step 2.
Diffuse the original image layers secret keyK1 obtained by seeding input image to LFSR.Step 3.
The image layers obtained in Step2 are stored as diffused image DI,I=R,G,B.Step 4.
The keyK2 obtained by chaotic quantum map by using the original image based initial conditions is utilized for substitution as follows:Rule 1: if0≤k2ij≤150then putcijI=dijI⊕k2ijRule 2: if151≤k2ij≤255then putcijI=dijI⊕k2ij⊕a
Here,a∈Z256, is any fixed constant selected randomly, dijI∈DijI is the pixel value of diffused image DI, k2ij is the value of K2 and cijI∈CijI is the pixel value of the final cipher image CI,I=R,G,B, and position i and j, respectively.
The imageCI,I=R,G,B is the diffusion-substitution-based cipher obtained from the presented strategy.
A clear description of the presented encryption is defined in Figure3.
The decryption of the presented structure is based on a similar strategy in a reverse manner. The same keyK1 is first diffused with the encrypted image. After that, the key K2 is utilized for the process of inverse substitution. The substitution rules are defined in a reverse manner as:Rule 1: if0≤k2ij≤150then putdijI=cijI⊕k2ijRule 2: if151≤k2ij≤255then putdijI=cijI⊕k2ij⊕a
Wherea∈ℤ256, is any fixed constant selected randomly, dijI∈DijI is the pixel value of diffused image DI, k2ij is the value of K2 and cijI∈CijI is the pixel value of the final cipher image CI,I=R,G,B, and position i and j, respectively.
The inverse of the diffusion process is computed by the following way:(4)M=DijI⊕K1,where M is the decrypted plain image.Figure 3
Design of presented encryption scheme.


## 3.1. Key Generation

The key generation of the proposed cryptosystem is completely dependent on the input of the encryption technique. The private key’s dependency on plaintext makes it secure against chosen-plaintext attack, chosen-ciphertext attack, and known-plaintext attack. The two parts of encryption diffusion and key-based substitution depend on the plaintext-based key. The first part is the generation of the LFSR sequence for which the plaintext provides seed value. The produced LFSR sequences are diffused with the original image. The second part is the production of a quantum chaotic map-based key for key-based substitution. The chaotic map key is also plaintext dependent because the initial values of the differential equation set are induced by using input values.Consider the size of the input imageM is P×Q×3. After separating the image into three layers, R, G, B, we get each layer of size P×Q. The seed value for LFSR and initial conditions for the chaotic map is generated by(3)I=∑i=1P∑j=1QpiqjP×Q.After inserting this value ofI for image M the keys K1 and K2 are obtained by the LFSR and chaotic quantum map.


## 3.2. Encryption and Decryption

The encryption process of the presented structure follows the confusion and diffusion properties. Corresponding to Shannon’s theory [26], a resilient cryptosystem must contain confusion and diffusion effects. To achieve robust security, the system is subjected to input-dependent key and confusion-diffusion strategies. The encryption strides are defined as follows:Step 1.
Read an image inputM of size P×Q×3 and convert it into a red, green, and blue layer.Step 2.
Diffuse the original image layers secret keyK1 obtained by seeding input image to LFSR.Step 3.
The image layers obtained in Step2 are stored as diffused image DI,I=R,G,B.Step 4.
The keyK2 obtained by chaotic quantum map by using the original image based initial conditions is utilized for substitution as follows:Rule 1: if0≤k2ij≤150then putcijI=dijI⊕k2ijRule 2: if151≤k2ij≤255then putcijI=dijI⊕k2ij⊕a
Here,a∈Z256, is any fixed constant selected randomly, dijI∈DijI is the pixel value of diffused image DI, k2ij is the value of K2 and cijI∈CijI is the pixel value of the final cipher image CI,I=R,G,B, and position i and j, respectively.
The imageCI,I=R,G,B is the diffusion-substitution-based cipher obtained from the presented strategy.
A clear description of the presented encryption is defined in Figure3.
The decryption of the presented structure is based on a similar strategy in a reverse manner. The same keyK1 is first diffused with the encrypted image. After that, the key K2 is utilized for the process of inverse substitution. The substitution rules are defined in a reverse manner as:Rule 1: if0≤k2ij≤150then putdijI=cijI⊕k2ijRule 2: if151≤k2ij≤255then putdijI=cijI⊕k2ij⊕a
Wherea∈ℤ256, is any fixed constant selected randomly, dijI∈DijI is the pixel value of diffused image DI, k2ij is the value of K2 and cijI∈CijI is the pixel value of the final cipher image CI,I=R,G,B, and position i and j, respectively.
The inverse of the diffusion process is computed by the following way:(4)M=DijI⊕K1,where M is the decrypted plain image.Figure 3
Design of presented encryption scheme.


## 4. Statistical Analysis of Recovered Image

Good encryption procedures should be resistant to a wide range of different attacks such as the differential, statistical attacks, and brute force attacks. We carried out a security analysis of our proposed scheme. The enciphered images yielded by the presented encryption structure are illustrated in Figure4.Figure 4
(a-c), (g-i) Original standard images of size512×512; (d-f), (j-k) Respective cipher images.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)


### 4.1. Entropy

Entropy analysis was performed to examine the randomness that can be used to define image texture and information content. It refers to the pixel’s ability to detect various gray levels. Entropy is high if image pixels are uniformly scattered, while entropy is low in the case of the plain image. Scientifically it can be inscribed as(5)HS=−∑i=0255psilog2psi.The numerical outcomes of the information entropy are displayed in Table1. The results were calculated for plain and encrypted layers of some standard images with sizes. 512×512×3 From the listed results, it can be perceived that the entropies for enciphered images are near enough to the epitome value that is 8 compared to the original ones. Therefore, the presented scheme produces uniform ciphers with a higher value of entropy.Table 1
Entropy measures for different images.
ImageOriginal imageEnciphered imageColorRGBColorRGBBaboon7.76247.70677.47447.75227.99967.99927.99957.9991Peppers7.66987.33887.49637.05837.99987.99917.99837.9994House7.06866.43116.53896.23207.99867.99727.99867.9983Brain7.01567.01567.01567.01567.99917.99867.99897.9989X-ray7.23697.23697.23697.23697.99937.99937.99897.9996Lena7.75627.58897.10606.81477.99957.99907.99927.9993The entropy calculated above in Table2 is the global entropy. The global Shannon entropy does not always measure actual randomness. Unlike global Shannon entropy, local Shannon entropy Hk,TB can capture local image block unpredictability, while global Shannon entropy cannot. The local entropy Ek,TB can be calculated as(6)Hk,TB¯S=∑i=1kHSik,where Si denotes the nonoverlapping blocks of image S, k shows the number of blocks, TB represents the total size of the image, and L shows the intensity of the pixels.The calculation of local entropy of Lena image for different sizes of the image is shown in Table2 which depicts the maximum randomness of the ciphers produced from the proposed algorithm.Table 2
Local entropy measures for different sizes of Lena image.
Lena imageEntropy valuekTBRGB1632×325.96355.87405.99543264×646.89516.01476.521464128×1286.05895.995956.0028128256×2566.52306.50246.5804256512×5127.81117.80477.98525121024×10247.89747.96327.9841


### 4.2. Histogram Analysis

The distribution of pixel numerical information within any image can be revealed using histogram analysis. If the image histogram after the encryption is distributed uniformly, this is considered a robust encryption system. Featured image histograms show complete similarity and differ from the dynamic histograms of explicit images, which is important in resisting any cryptographic assault. The similarity to the grayscale of the embedded image proves that no practical information can be obtained when performing any mathematical attack on the compiled image. 3D color histograms for Brain images of size512×512×3are depicted in Figure 5. From Figures 5(a)–5(d), we can perceive the pattern of original data in histogram distribution, and in the case of encrypted ones Figures 5(e)–5(h), the distribution is uniform. Therefore, the presented encryption design is robust against all the linear and differential attacks due to the ideal uniformity in the encrypted data.Figure 5
(a–d) 3D histogram of brain original image layers; (e–h) 3D histograms of brain encrypted image layers, respectively.
(a)(b)(c)(d)(e)(f)(g)(h)In addition to the visual examination of the encrypted image histogram distribution, we perform the chi-square testχ2 to prove that the encrypted image has a uniform histogram distribution more precisely. The p value of the chi-square test is a real number in the range [0, 1]. For a test image to pass, the p value must be larger than a significant level α. Table 3 shows the p values for some standard cipher images encrypted by the proposed algorithm, using an a priori of 0.05. The cipher image has a uniform histogram distribution based on the results of the chi-square test in Table 3. The depicted results show that the proposed approach accepts null hypotheses and confirms the uniformity of histograms.Table 3
Chi-square test measures for different images.
ImageColorRGBBaboon0.45610.36980.41570.3687Peppers0.51510.90020.69580.2589House0.51020.09470.51790.4763Brain0.50890.89620.65270.6215X-ray0.40110.09400.85260.1258Lena0.06470.08710.96540.7521


### 4.3. Correlation Analysis

Pixel correlation is a frequent approach for measuring the picture encryption algorithm’s performance. In the image, a secure encryption algorithm requires a reduction in the correlation of contiguous pixels. The subsequent formula is utilized to quantify the correlation between two neighboring pixels:(7)γxy=Ex−μxy−μyδxδy,where μ is the expected value and δ shows variance, the results obtained from correlation analysis are presented in Table 4. The values between two neighboring pixels are significantly lowered. The results show that the presented technique is resilient against different assaults as the correlation value is close to zero, so the scheme meets the standard criteria.Table 4
Correlation coefficient measures for enciphered images.
ImageOrientationEncryptedRGBBaboonDiagonal−0.0001−0.00090.0007Vertical0.00020.00100.0010Horizontal−0.0003−0.00110.0001PeppersDiagonal0.00430.0001−0.0005Vertical0.0013−0.0003−0.0004Horizontal−0.00050.00020.0090HouseDiagonal0.0014−0.00150.0012Vertical−0.00430.0014−0.0054Horizontal0.0015−0.00020.0003BrainDiagonal0.00320.0003−0.0020Vertical0.0011−0.0002−0.0010Horizontal−0.0021−0.00020.0003X-rayDiagonal0.00040.0030−0.0011Vertical−0.0012−0.00110.0040Horizontal−0.00070.0012−0.0056LenaDiagonal0.0001−0.00210.0003Vertical−0.00010.0031−0.0019Horizontal−0.0031−0.00110.0003Figure6(a)–6(f) depicts the scattering of neighboring pixels in various directions. The Lena image in Figures 6(a)–6(c) displays a substantial correlation among neighboring pixels for horizontal, vertical, and diagonal of the plain image. The correlation diagrams of the enciphered image are displayed in Figures 6(d)–6(f). The dots in the encrypted image are dispersed randomly, with no evident distribution features.Figure 6
Correlation diagram of Lena original image in (a) horizontal direction; (b) diagonal direction; (c) vertical direction; correlation diagram of Lena encrypted image in (d) horizontal direction; (e) diagonal direction; (f) vertical direction.
(a)(b)(c)(d)(e)(f)


### 4.4. Randomness Analysis

#### 4.4.1. NIST Test

The NIST-800-22 trial was designed to test the pseudorandom number generator (PRNG). It can be examined that a complex binary sequence is appropriate for a cryptosystem based on the outcomes of the NIST test. The NIST-800-22 trial comprises 15 test approaches, comprising frequency test, run test, cumulative test, longest run test, etc. The number ofp can measure the random sequence of the test sequence. If P≥0.01, the sequence is random. If P<0.01, the sequence is nonrandom and predictable. If P=1, the structure is completely set. If p=0, the structure is by no means random. In addition, the greater the p value; the better the random sequence. The results of NIST for chaotic sequences and some standard images are presented in Table 5. The depicted results reflect that the sequence generated from the chaotic map is highly random and ideal for encryption. The results can be scrutinized using the presented encryption algorithm that helps to generate highly random ciphers with P≥0.01.Table 5
NIST measures for chaotic map and different standard color images.
Test nameP valueStatusChaotic sequenceBaboonPeppersHouseFrequency0.56320.74120.81910.8421PassBlock frequency0.01250.21560.01820.1355PassRuns0.95230.15340.95420.9018PassLongest run0.03570.03570.03570.0357PassRank0.29190.29190.29190.2919PassSerial 10.96350.82610.11440.6021PassSerial 20.88520.59630.73440.3740PassCumulative sums0.35620.31100.58100.5520PassOverlapping template0.88990.95680.86250.8752PassUniversal0.76160.99810.99870.9986PassApproximate entropy0.95230.20820.13420.7566PassNonoverlapping template0.85360.99890.96850.9452PassRandom excursionsX=−410.99710.01140.1526PassX=−30.05630.22510.25860.3698PassX=−20.66770.36980.25890.0058PassX=−10.51470.99620.44110.6398PassX=10.24310.81440.63250.9990PassX=20.88910.00070.00810.5858PassX=30.69740.52220.00140.0025PassX=40.25470.02580.99810.0097PassX=−70.01450.11840.88940.0001PassX=−60.00210.02150.62350.0147PassRandom excursions variantsX=−50.54490.05230.74120.9638PassX=−40.12540.96320.96320.9965PassX=−30.802510.52580.1963PassX=−20.36980.06390.02580.6687PassX=−10.22500.02590.26490.2991PassX=10.58960.94170.32580.3447PassX=20.15690.26980.01430.7319PassX=30.01470.69430.09840.7982PassX=40.25890.58610.95840.9963PassX=50.12670.99740.74630.2210PassX=60.01450.22550.88470.0009PassX=70.00120.00060.36980.1717Pass


### 4.5. Differential Attack

In the plain image, some pixels are faintly modified to attain the respective enciphered image. The opponent recurrently makes the connection between the encrypted images and the plain ones. If a small modification in the pixels of the image can significantly disturb the cipher image, it indicates that the structure has a resilient capability to withstand differential assaults. Differential attacks are usually inspected by the number of pixels change rate (NPCR) and unified average changing intensity (UACI) values [27, 28]. These two gauges are examined as follows:NPCR is employed to enumerate plaintext sensitivity, i.e., the outcome of converting a lone pixel in the plain image into an encrypted image. It also describes the arbitrariness and modification among the original image and its respective cipher and can be written as(8)NPCR=∑i=1M∑j=1NDi,jw×h.The larger the value of NPCR, is better the original image sensitivity offered by the encryption algorithm. The UACI is defined as(9)UACI=∑i=1w∑j=1hC1i,j−C2i,j28−1×w×h×100%,where C1 is the first encrypted image and C2 is the second encrypted image, and w and h are the width and height of cipher images C1 and C2. 28 represents the number of bits in one pixel of red, green, and blue layers in a color image.It can be observed from Table6 that the results for NPCR and UACI are designated as over 99% and 33%, respectively. These results indicate that the suggested scheme can withstand differential attacks.Table 6
NPCR and UACI measures for standard images.
ImageNPCRUACIRGBRGBBaboon99.5799.6499.6034.4633.4233.14Peppers99.6299.6999.6333.4332.4433.32House99.6399.6499.6232.5033.4334.52Brain99.7499.7099.6333.4933.4733.37X-ray98.8298.6498.7232.4534.0334.12Lena99.6099.6299.5833.4933.4834.62The strength of the algorithm against differential attack varies concerning the change in the size of input data [29]. Therefore, we have performed NPCR and UACI measures for different sizes of images to check the deviation of results. The results of NPCR and UACI for various sizes of Lena images are depicted in Table 7. The key generation of the offered encryption algorithm entirely depends on the input data. Therefore, a minor change in input refers to a large change in output. The data in Table 7 indicates that the algorithm resists differential attacks for various sizes of input data.Table 7
NPCR and UACI measures for different sizes of Lena images.
ImageNPCRUACIRGBRGB128×128×399.0198.9099.3032.2132.9532.01256×256×399.7099.6099.8033.3633.5833.44512×512×399.6699.5499.6433.4033.4933.611024×1024×399.6799.6399.6333.9533.6033.69


### 4.6. Key Analysis

#### 4.6.1. Key Sensitivity Test

In the encryption-decryption process, an ideal cryptographic algorithm must be sensitive to the private keys. To inspect the key sensitivity test, an enciphered image is deciphered using the different keys, which are one bit different from the correct key. Lena’s standard color image of size512×512×3 is evaluated for the test. Figure 7 depicts the results of this test and one can see that when the decryption key was only one bit different, the output (Figures 7(a), 7(b), and 7(c)) shows that it does not reveal the contents of the original information. Figure 7(d) shows that decryption is possible only with the correct key.Figure 7
(a–c) Images decrypted from one-bit change key; (d) Image decrypted from the original key.
(a)(b)(c)(d)


#### 4.6.2. Brute Force Attack

Space support is critical in countering a brute force attack. The authors of [1] proposed that the private keys of a cryptographic algorithm be greater than 2100 to avoid Brute force attacks. To encrypt the plain image, a chaotic map seed value and a 256 bit key/seed value of a special LFSR to yield pseudorandom numbers are utilized. The proposed encryption system has a key space greater than 2256 that is sufficient to withstand a Brute force attack. The integer value of the chaotic map when computing key space is not considered.


### 4.7. Known and Chosen Plain Text Attacks

Any cryptosystem with an excellent diffusion property is capable to withstand chosen and known-plaintext attacks. Overall, the opponent selects a distinct set of plaintexts consisting of sequential 0 and 1 data to demonstrate the algorithm’s uncertainty. In the aforementioned attacks, plaintext and their corresponding ciphertext are selected. It permits our cryptosystem to produce enciphered images that are highly random.The first step of the generation of encryption/decryption keys depends upon plaintext. The dependency of the algorithm on plaintext increases its security in contrast to chosen-plaintext attacks and chosen-ciphertext attacks. The substitution part of the suggested algorithm is also sensitive to initial conditions because it changes with the respective plaintext. Therefore, in the presented structure, the chosen-plaintext and the chosen-ciphertext attack do not give any information about the secret keys of the system. As a result, the presented cryptosystem can efficiently endure chosen and known-plaintext attacks.


### 4.8. Robustness Analysis

While encrypted images are transported across the public network, one must take care of the noise issue. The noise enhancement may seem in modification, damage, and a condensed procedure of image data. The high level of noise creates it meaningfully tricky to retrieve the original images from the enciphered images. Therefore, repelling noise is an important benchmark to examine the strength of the cryptosystem.To examine the strength of the presented encryption scheme two types of noises are added. The decrypted images are understandable though different types of noises were provided. From the decrypted image maximum information can be recovered. To check the quality of decrypted images, various tests are carried out such as peak signal-to-noise ratio (PSNR), mean-square error (MSE), homogeneity, and contrast.


#### 4.8.1. Mean Square Error (MSE)

MSE is a square measure of the error (pixel difference) of two images, obtained by taking a square root of a square error dispersed by the number of pixels in the image. Mathematically, it can be written as(10)MSE=1H∗W∑y=0H−1∑x=0W−1fx,y−f′x,y21/2,where MSE is the mean square error, in image cryptography that means a larger number of MSE possess better image encryption capability. Average MSE values greater than 6000 for each channel are shown in Table 5 which depicts that the presented scheme is highly secure.


#### 4.8.2. Peak Signal to Noise Ratio (PSNR)

PNSR is defined as(11)PSNR=10log102552MSE,a larger number of PSNR means better-deciphered images, and a smaller number means better image encryption.The results of PSNR consequences of decrypted images with dissimilar levels of alterations are presented in Table8. After incorporating numerous levels of noise concentrations in the encrypted image, it is perceived that the PSNR value reduces when noise concentration rises. The graphic excellence of the decrypted image is abridged, but the content is still noticeably predictable.Table 8
MSE and PSNR measures for different standard images.
ImageMSEPSNRRGBRGBBaboon9231.28911.08952.339.601136.741239.3691Peppers9742.210356.111652.137.003148.852339.0001House7763.29954.17633.1138.373729.569847.1102Brain6953.17836.28951.947.018637.814229.0997X-ray8642.29214.28686.139.179648.698159.1475Lena6651.49961.010029.239.786549.134539.1239The PSNR value increases the fidelity of the encrypted picture to the original plain image [27]. When the PSNR is above 30 dB, it becomes difficult to distinguish between the original and decrypted pictures. The original Elaine test picture is encrypted twice. The resulting cipher pictures are then subjected to 33% data block loss, 99% data block loss, 0.005% Salt and Pepper noise, and 0.025% Salt and Pepper noise. Figures 8 show the outcomes for PSNR after including noise. In the 3 × 3 data block loss test, the proposed method provides a PSNR of slightly under 35 dB (excellent quality). PSNR lowers to around 21 dB when testing for 9 × 9 data block loss. A PSNR approaching 30 dB is achieved for the cipher image damaged by 0.005% Salt and Pepper noise. When the degradation reaches 0.02 percent, the PSNR nears 20 dB. Overall, the findings show that the suggested approach is somewhat robust to data loss and noise.Figure 8
Data loss and noise attacks on encrypted images. (a) The untouched encrypted image and (b) its decrypted image; (c) the encrypted image with 3 × 3 data block loss and (d) its decrypted image; (e) the encrypted image with 9 × 9 data block loss and (f) its decrypted image; (g) the encrypted image deteriorated with 0.005% Salt and Pepper noise and (h) its decrypted image; (i) the encrypted image deteriorated with 0.02% Salt and Pepper noise and (j) its decrypted image.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)


### 4.9. Execution Time Analysis

The speed at which an encryption-decryption method is executed is one of the most important quantifiable parameters. To determine the time for the presented system, three important processes are taken into consideration: parameter initialization, diffusion, and key-based substitution operation. Section4 of this document contains a description of the presented system specification. Table 9 depicts the time requirements (in seconds) for encryption and decryption in this case. The demand for encryption and decryption time implies that the suggested algorithm is well-suited to dealing with a huge capacity of image data as compared to the existing results [30, 31].Table 9
Time complexity analysis (in seconds) of offered structure.
Image sizeParameter initializationDiffusionKey-based substitutionEncryptionDecryption128×128×30.0500.1980.3110.5590.418256×256×30.1910.2240.2980.7130.691512×512×30.2830.3560.4891.1280.9181024×1024×30.4120.5170.5111.4401.3111Both the approximation of rounds as well as operations are required to achieve the enciphering and deciphering mechanism which is necessary to determine the computation difficulty. To estimate the computational complexity, the plain image had a dimension ofM×M is assumed. Initially, the pixel-level scrambling technique requires OM×M time to complete. Following that, the keystream size is like the image size, M×M, and OM×M is known as the complexity of generation in nature. Finally, the diffusion operation requires OM×M. As a result, the encryption approach has a total time complexity OM2.


## 4.1. Entropy

Entropy analysis was performed to examine the randomness that can be used to define image texture and information content. It refers to the pixel’s ability to detect various gray levels. Entropy is high if image pixels are uniformly scattered, while entropy is low in the case of the plain image. Scientifically it can be inscribed as(5)HS=−∑i=0255psilog2psi.The numerical outcomes of the information entropy are displayed in Table1. The results were calculated for plain and encrypted layers of some standard images with sizes. 512×512×3 From the listed results, it can be perceived that the entropies for enciphered images are near enough to the epitome value that is 8 compared to the original ones. Therefore, the presented scheme produces uniform ciphers with a higher value of entropy.Table 1
Entropy measures for different images.
ImageOriginal imageEnciphered imageColorRGBColorRGBBaboon7.76247.70677.47447.75227.99967.99927.99957.9991Peppers7.66987.33887.49637.05837.99987.99917.99837.9994House7.06866.43116.53896.23207.99867.99727.99867.9983Brain7.01567.01567.01567.01567.99917.99867.99897.9989X-ray7.23697.23697.23697.23697.99937.99937.99897.9996Lena7.75627.58897.10606.81477.99957.99907.99927.9993The entropy calculated above in Table2 is the global entropy. The global Shannon entropy does not always measure actual randomness. Unlike global Shannon entropy, local Shannon entropy Hk,TB can capture local image block unpredictability, while global Shannon entropy cannot. The local entropy Ek,TB can be calculated as(6)Hk,TB¯S=∑i=1kHSik,where Si denotes the nonoverlapping blocks of image S, k shows the number of blocks, TB represents the total size of the image, and L shows the intensity of the pixels.The calculation of local entropy of Lena image for different sizes of the image is shown in Table2 which depicts the maximum randomness of the ciphers produced from the proposed algorithm.Table 2
Local entropy measures for different sizes of Lena image.
Lena imageEntropy valuekTBRGB1632×325.96355.87405.99543264×646.89516.01476.521464128×1286.05895.995956.0028128256×2566.52306.50246.5804256512×5127.81117.80477.98525121024×10247.89747.96327.9841


## 4.2. Histogram Analysis

The distribution of pixel numerical information within any image can be revealed using histogram analysis. If the image histogram after the encryption is distributed uniformly, this is considered a robust encryption system. Featured image histograms show complete similarity and differ from the dynamic histograms of explicit images, which is important in resisting any cryptographic assault. The similarity to the grayscale of the embedded image proves that no practical information can be obtained when performing any mathematical attack on the compiled image. 3D color histograms for Brain images of size512×512×3are depicted in Figure 5. From Figures 5(a)–5(d), we can perceive the pattern of original data in histogram distribution, and in the case of encrypted ones Figures 5(e)–5(h), the distribution is uniform. Therefore, the presented encryption design is robust against all the linear and differential attacks due to the ideal uniformity in the encrypted data.Figure 5
(a–d) 3D histogram of brain original image layers; (e–h) 3D histograms of brain encrypted image layers, respectively.
(a)(b)(c)(d)(e)(f)(g)(h)In addition to the visual examination of the encrypted image histogram distribution, we perform the chi-square testχ2 to prove that the encrypted image has a uniform histogram distribution more precisely. The p value of the chi-square test is a real number in the range [0, 1]. For a test image to pass, the p value must be larger than a significant level α. Table 3 shows the p values for some standard cipher images encrypted by the proposed algorithm, using an a priori of 0.05. The cipher image has a uniform histogram distribution based on the results of the chi-square test in Table 3. The depicted results show that the proposed approach accepts null hypotheses and confirms the uniformity of histograms.Table 3
Chi-square test measures for different images.
ImageColorRGBBaboon0.45610.36980.41570.3687Peppers0.51510.90020.69580.2589House0.51020.09470.51790.4763Brain0.50890.89620.65270.6215X-ray0.40110.09400.85260.1258Lena0.06470.08710.96540.7521


## 4.3. Correlation Analysis

Pixel correlation is a frequent approach for measuring the picture encryption algorithm’s performance. In the image, a secure encryption algorithm requires a reduction in the correlation of contiguous pixels. The subsequent formula is utilized to quantify the correlation between two neighboring pixels:(7)γxy=Ex−μxy−μyδxδy,where μ is the expected value and δ shows variance, the results obtained from correlation analysis are presented in Table 4. The values between two neighboring pixels are significantly lowered. The results show that the presented technique is resilient against different assaults as the correlation value is close to zero, so the scheme meets the standard criteria.Table 4
Correlation coefficient measures for enciphered images.
ImageOrientationEncryptedRGBBaboonDiagonal−0.0001−0.00090.0007Vertical0.00020.00100.0010Horizontal−0.0003−0.00110.0001PeppersDiagonal0.00430.0001−0.0005Vertical0.0013−0.0003−0.0004Horizontal−0.00050.00020.0090HouseDiagonal0.0014−0.00150.0012Vertical−0.00430.0014−0.0054Horizontal0.0015−0.00020.0003BrainDiagonal0.00320.0003−0.0020Vertical0.0011−0.0002−0.0010Horizontal−0.0021−0.00020.0003X-rayDiagonal0.00040.0030−0.0011Vertical−0.0012−0.00110.0040Horizontal−0.00070.0012−0.0056LenaDiagonal0.0001−0.00210.0003Vertical−0.00010.0031−0.0019Horizontal−0.0031−0.00110.0003Figure6(a)–6(f) depicts the scattering of neighboring pixels in various directions. The Lena image in Figures 6(a)–6(c) displays a substantial correlation among neighboring pixels for horizontal, vertical, and diagonal of the plain image. The correlation diagrams of the enciphered image are displayed in Figures 6(d)–6(f). The dots in the encrypted image are dispersed randomly, with no evident distribution features.Figure 6
Correlation diagram of Lena original image in (a) horizontal direction; (b) diagonal direction; (c) vertical direction; correlation diagram of Lena encrypted image in (d) horizontal direction; (e) diagonal direction; (f) vertical direction.
(a)(b)(c)(d)(e)(f)


## 4.4. Randomness Analysis

### 4.4.1. NIST Test

The NIST-800-22 trial was designed to test the pseudorandom number generator (PRNG). It can be examined that a complex binary sequence is appropriate for a cryptosystem based on the outcomes of the NIST test. The NIST-800-22 trial comprises 15 test approaches, comprising frequency test, run test, cumulative test, longest run test, etc. The number ofp can measure the random sequence of the test sequence. If P≥0.01, the sequence is random. If P<0.01, the sequence is nonrandom and predictable. If P=1, the structure is completely set. If p=0, the structure is by no means random. In addition, the greater the p value; the better the random sequence. The results of NIST for chaotic sequences and some standard images are presented in Table 5. The depicted results reflect that the sequence generated from the chaotic map is highly random and ideal for encryption. The results can be scrutinized using the presented encryption algorithm that helps to generate highly random ciphers with P≥0.01.Table 5
NIST measures for chaotic map and different standard color images.
Test nameP valueStatusChaotic sequenceBaboonPeppersHouseFrequency0.56320.74120.81910.8421PassBlock frequency0.01250.21560.01820.1355PassRuns0.95230.15340.95420.9018PassLongest run0.03570.03570.03570.0357PassRank0.29190.29190.29190.2919PassSerial 10.96350.82610.11440.6021PassSerial 20.88520.59630.73440.3740PassCumulative sums0.35620.31100.58100.5520PassOverlapping template0.88990.95680.86250.8752PassUniversal0.76160.99810.99870.9986PassApproximate entropy0.95230.20820.13420.7566PassNonoverlapping template0.85360.99890.96850.9452PassRandom excursionsX=−410.99710.01140.1526PassX=−30.05630.22510.25860.3698PassX=−20.66770.36980.25890.0058PassX=−10.51470.99620.44110.6398PassX=10.24310.81440.63250.9990PassX=20.88910.00070.00810.5858PassX=30.69740.52220.00140.0025PassX=40.25470.02580.99810.0097PassX=−70.01450.11840.88940.0001PassX=−60.00210.02150.62350.0147PassRandom excursions variantsX=−50.54490.05230.74120.9638PassX=−40.12540.96320.96320.9965PassX=−30.802510.52580.1963PassX=−20.36980.06390.02580.6687PassX=−10.22500.02590.26490.2991PassX=10.58960.94170.32580.3447PassX=20.15690.26980.01430.7319PassX=30.01470.69430.09840.7982PassX=40.25890.58610.95840.9963PassX=50.12670.99740.74630.2210PassX=60.01450.22550.88470.0009PassX=70.00120.00060.36980.1717Pass


## 4.4.1. NIST Test

The NIST-800-22 trial was designed to test the pseudorandom number generator (PRNG). It can be examined that a complex binary sequence is appropriate for a cryptosystem based on the outcomes of the NIST test. The NIST-800-22 trial comprises 15 test approaches, comprising frequency test, run test, cumulative test, longest run test, etc. The number ofp can measure the random sequence of the test sequence. If P≥0.01, the sequence is random. If P<0.01, the sequence is nonrandom and predictable. If P=1, the structure is completely set. If p=0, the structure is by no means random. In addition, the greater the p value; the better the random sequence. The results of NIST for chaotic sequences and some standard images are presented in Table 5. The depicted results reflect that the sequence generated from the chaotic map is highly random and ideal for encryption. The results can be scrutinized using the presented encryption algorithm that helps to generate highly random ciphers with P≥0.01.Table 5
NIST measures for chaotic map and different standard color images.
Test nameP valueStatusChaotic sequenceBaboonPeppersHouseFrequency0.56320.74120.81910.8421PassBlock frequency0.01250.21560.01820.1355PassRuns0.95230.15340.95420.9018PassLongest run0.03570.03570.03570.0357PassRank0.29190.29190.29190.2919PassSerial 10.96350.82610.11440.6021PassSerial 20.88520.59630.73440.3740PassCumulative sums0.35620.31100.58100.5520PassOverlapping template0.88990.95680.86250.8752PassUniversal0.76160.99810.99870.9986PassApproximate entropy0.95230.20820.13420.7566PassNonoverlapping template0.85360.99890.96850.9452PassRandom excursionsX=−410.99710.01140.1526PassX=−30.05630.22510.25860.3698PassX=−20.66770.36980.25890.0058PassX=−10.51470.99620.44110.6398PassX=10.24310.81440.63250.9990PassX=20.88910.00070.00810.5858PassX=30.69740.52220.00140.0025PassX=40.25470.02580.99810.0097PassX=−70.01450.11840.88940.0001PassX=−60.00210.02150.62350.0147PassRandom excursions variantsX=−50.54490.05230.74120.9638PassX=−40.12540.96320.96320.9965PassX=−30.802510.52580.1963PassX=−20.36980.06390.02580.6687PassX=−10.22500.02590.26490.2991PassX=10.58960.94170.32580.3447PassX=20.15690.26980.01430.7319PassX=30.01470.69430.09840.7982PassX=40.25890.58610.95840.9963PassX=50.12670.99740.74630.2210PassX=60.01450.22550.88470.0009PassX=70.00120.00060.36980.1717Pass


## 4.5. Differential Attack

In the plain image, some pixels are faintly modified to attain the respective enciphered image. The opponent recurrently makes the connection between the encrypted images and the plain ones. If a small modification in the pixels of the image can significantly disturb the cipher image, it indicates that the structure has a resilient capability to withstand differential assaults. Differential attacks are usually inspected by the number of pixels change rate (NPCR) and unified average changing intensity (UACI) values [27, 28]. These two gauges are examined as follows:NPCR is employed to enumerate plaintext sensitivity, i.e., the outcome of converting a lone pixel in the plain image into an encrypted image. It also describes the arbitrariness and modification among the original image and its respective cipher and can be written as(8)NPCR=∑i=1M∑j=1NDi,jw×h.The larger the value of NPCR, is better the original image sensitivity offered by the encryption algorithm. The UACI is defined as(9)UACI=∑i=1w∑j=1hC1i,j−C2i,j28−1×w×h×100%,where C1 is the first encrypted image and C2 is the second encrypted image, and w and h are the width and height of cipher images C1 and C2. 28 represents the number of bits in one pixel of red, green, and blue layers in a color image.It can be observed from Table6 that the results for NPCR and UACI are designated as over 99% and 33%, respectively. These results indicate that the suggested scheme can withstand differential attacks.Table 6
NPCR and UACI measures for standard images.
ImageNPCRUACIRGBRGBBaboon99.5799.6499.6034.4633.4233.14Peppers99.6299.6999.6333.4332.4433.32House99.6399.6499.6232.5033.4334.52Brain99.7499.7099.6333.4933.4733.37X-ray98.8298.6498.7232.4534.0334.12Lena99.6099.6299.5833.4933.4834.62The strength of the algorithm against differential attack varies concerning the change in the size of input data [29]. Therefore, we have performed NPCR and UACI measures for different sizes of images to check the deviation of results. The results of NPCR and UACI for various sizes of Lena images are depicted in Table 7. The key generation of the offered encryption algorithm entirely depends on the input data. Therefore, a minor change in input refers to a large change in output. The data in Table 7 indicates that the algorithm resists differential attacks for various sizes of input data.Table 7
NPCR and UACI measures for different sizes of Lena images.
ImageNPCRUACIRGBRGB128×128×399.0198.9099.3032.2132.9532.01256×256×399.7099.6099.8033.3633.5833.44512×512×399.6699.5499.6433.4033.4933.611024×1024×399.6799.6399.6333.9533.6033.69


## 4.6. Key Analysis

### 4.6.1. Key Sensitivity Test

In the encryption-decryption process, an ideal cryptographic algorithm must be sensitive to the private keys. To inspect the key sensitivity test, an enciphered image is deciphered using the different keys, which are one bit different from the correct key. Lena’s standard color image of size512×512×3 is evaluated for the test. Figure 7 depicts the results of this test and one can see that when the decryption key was only one bit different, the output (Figures 7(a), 7(b), and 7(c)) shows that it does not reveal the contents of the original information. Figure 7(d) shows that decryption is possible only with the correct key.Figure 7
(a–c) Images decrypted from one-bit change key; (d) Image decrypted from the original key.
(a)(b)(c)(d)


### 4.6.2. Brute Force Attack

Space support is critical in countering a brute force attack. The authors of [1] proposed that the private keys of a cryptographic algorithm be greater than 2100 to avoid Brute force attacks. To encrypt the plain image, a chaotic map seed value and a 256 bit key/seed value of a special LFSR to yield pseudorandom numbers are utilized. The proposed encryption system has a key space greater than 2256 that is sufficient to withstand a Brute force attack. The integer value of the chaotic map when computing key space is not considered.


## 4.6.1. Key Sensitivity Test

In the encryption-decryption process, an ideal cryptographic algorithm must be sensitive to the private keys. To inspect the key sensitivity test, an enciphered image is deciphered using the different keys, which are one bit different from the correct key. Lena’s standard color image of size512×512×3 is evaluated for the test. Figure 7 depicts the results of this test and one can see that when the decryption key was only one bit different, the output (Figures 7(a), 7(b), and 7(c)) shows that it does not reveal the contents of the original information. Figure 7(d) shows that decryption is possible only with the correct key.Figure 7
(a–c) Images decrypted from one-bit change key; (d) Image decrypted from the original key.
(a)(b)(c)(d)


## 4.6.2. Brute Force Attack

Space support is critical in countering a brute force attack. The authors of [1] proposed that the private keys of a cryptographic algorithm be greater than 2100 to avoid Brute force attacks. To encrypt the plain image, a chaotic map seed value and a 256 bit key/seed value of a special LFSR to yield pseudorandom numbers are utilized. The proposed encryption system has a key space greater than 2256 that is sufficient to withstand a Brute force attack. The integer value of the chaotic map when computing key space is not considered.


## 4.7. Known and Chosen Plain Text Attacks

Any cryptosystem with an excellent diffusion property is capable to withstand chosen and known-plaintext attacks. Overall, the opponent selects a distinct set of plaintexts consisting of sequential 0 and 1 data to demonstrate the algorithm’s uncertainty. In the aforementioned attacks, plaintext and their corresponding ciphertext are selected. It permits our cryptosystem to produce enciphered images that are highly random.The first step of the generation of encryption/decryption keys depends upon plaintext. The dependency of the algorithm on plaintext increases its security in contrast to chosen-plaintext attacks and chosen-ciphertext attacks. The substitution part of the suggested algorithm is also sensitive to initial conditions because it changes with the respective plaintext. Therefore, in the presented structure, the chosen-plaintext and the chosen-ciphertext attack do not give any information about the secret keys of the system. As a result, the presented cryptosystem can efficiently endure chosen and known-plaintext attacks.


## 4.8. Robustness Analysis

While encrypted images are transported across the public network, one must take care of the noise issue. The noise enhancement may seem in modification, damage, and a condensed procedure of image data. The high level of noise creates it meaningfully tricky to retrieve the original images from the enciphered images. Therefore, repelling noise is an important benchmark to examine the strength of the cryptosystem.To examine the strength of the presented encryption scheme two types of noises are added. The decrypted images are understandable though different types of noises were provided. From the decrypted image maximum information can be recovered. To check the quality of decrypted images, various tests are carried out such as peak signal-to-noise ratio (PSNR), mean-square error (MSE), homogeneity, and contrast.


### 4.8.1. Mean Square Error (MSE)

MSE is a square measure of the error (pixel difference) of two images, obtained by taking a square root of a square error dispersed by the number of pixels in the image. Mathematically, it can be written as(10)MSE=1H∗W∑y=0H−1∑x=0W−1fx,y−f′x,y21/2,where MSE is the mean square error, in image cryptography that means a larger number of MSE possess better image encryption capability. Average MSE values greater than 6000 for each channel are shown in Table 5 which depicts that the presented scheme is highly secure.


### 4.8.2. Peak Signal to Noise Ratio (PSNR)

PNSR is defined as(11)PSNR=10log102552MSE,a larger number of PSNR means better-deciphered images, and a smaller number means better image encryption.The results of PSNR consequences of decrypted images with dissimilar levels of alterations are presented in Table8. After incorporating numerous levels of noise concentrations in the encrypted image, it is perceived that the PSNR value reduces when noise concentration rises. The graphic excellence of the decrypted image is abridged, but the content is still noticeably predictable.Table 8
MSE and PSNR measures for different standard images.
ImageMSEPSNRRGBRGBBaboon9231.28911.08952.339.601136.741239.3691Peppers9742.210356.111652.137.003148.852339.0001House7763.29954.17633.1138.373729.569847.1102Brain6953.17836.28951.947.018637.814229.0997X-ray8642.29214.28686.139.179648.698159.1475Lena6651.49961.010029.239.786549.134539.1239The PSNR value increases the fidelity of the encrypted picture to the original plain image [27]. When the PSNR is above 30 dB, it becomes difficult to distinguish between the original and decrypted pictures. The original Elaine test picture is encrypted twice. The resulting cipher pictures are then subjected to 33% data block loss, 99% data block loss, 0.005% Salt and Pepper noise, and 0.025% Salt and Pepper noise. Figures 8 show the outcomes for PSNR after including noise. In the 3 × 3 data block loss test, the proposed method provides a PSNR of slightly under 35 dB (excellent quality). PSNR lowers to around 21 dB when testing for 9 × 9 data block loss. A PSNR approaching 30 dB is achieved for the cipher image damaged by 0.005% Salt and Pepper noise. When the degradation reaches 0.02 percent, the PSNR nears 20 dB. Overall, the findings show that the suggested approach is somewhat robust to data loss and noise.Figure 8
Data loss and noise attacks on encrypted images. (a) The untouched encrypted image and (b) its decrypted image; (c) the encrypted image with 3 × 3 data block loss and (d) its decrypted image; (e) the encrypted image with 9 × 9 data block loss and (f) its decrypted image; (g) the encrypted image deteriorated with 0.005% Salt and Pepper noise and (h) its decrypted image; (i) the encrypted image deteriorated with 0.02% Salt and Pepper noise and (j) its decrypted image.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)


## 4.8.1. Mean Square Error (MSE)

MSE is a square measure of the error (pixel difference) of two images, obtained by taking a square root of a square error dispersed by the number of pixels in the image. Mathematically, it can be written as(10)MSE=1H∗W∑y=0H−1∑x=0W−1fx,y−f′x,y21/2,where MSE is the mean square error, in image cryptography that means a larger number of MSE possess better image encryption capability. Average MSE values greater than 6000 for each channel are shown in Table 5 which depicts that the presented scheme is highly secure.


## 4.8.2. Peak Signal to Noise Ratio (PSNR)

PNSR is defined as(11)PSNR=10log102552MSE,a larger number of PSNR means better-deciphered images, and a smaller number means better image encryption.The results of PSNR consequences of decrypted images with dissimilar levels of alterations are presented in Table8. After incorporating numerous levels of noise concentrations in the encrypted image, it is perceived that the PSNR value reduces when noise concentration rises. The graphic excellence of the decrypted image is abridged, but the content is still noticeably predictable.Table 8
MSE and PSNR measures for different standard images.
ImageMSEPSNRRGBRGBBaboon9231.28911.08952.339.601136.741239.3691Peppers9742.210356.111652.137.003148.852339.0001House7763.29954.17633.1138.373729.569847.1102Brain6953.17836.28951.947.018637.814229.0997X-ray8642.29214.28686.139.179648.698159.1475Lena6651.49961.010029.239.786549.134539.1239The PSNR value increases the fidelity of the encrypted picture to the original plain image [27]. When the PSNR is above 30 dB, it becomes difficult to distinguish between the original and decrypted pictures. The original Elaine test picture is encrypted twice. The resulting cipher pictures are then subjected to 33% data block loss, 99% data block loss, 0.005% Salt and Pepper noise, and 0.025% Salt and Pepper noise. Figures 8 show the outcomes for PSNR after including noise. In the 3 × 3 data block loss test, the proposed method provides a PSNR of slightly under 35 dB (excellent quality). PSNR lowers to around 21 dB when testing for 9 × 9 data block loss. A PSNR approaching 30 dB is achieved for the cipher image damaged by 0.005% Salt and Pepper noise. When the degradation reaches 0.02 percent, the PSNR nears 20 dB. Overall, the findings show that the suggested approach is somewhat robust to data loss and noise.Figure 8
Data loss and noise attacks on encrypted images. (a) The untouched encrypted image and (b) its decrypted image; (c) the encrypted image with 3 × 3 data block loss and (d) its decrypted image; (e) the encrypted image with 9 × 9 data block loss and (f) its decrypted image; (g) the encrypted image deteriorated with 0.005% Salt and Pepper noise and (h) its decrypted image; (i) the encrypted image deteriorated with 0.02% Salt and Pepper noise and (j) its decrypted image.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)


## 4.9. Execution Time Analysis

The speed at which an encryption-decryption method is executed is one of the most important quantifiable parameters. To determine the time for the presented system, three important processes are taken into consideration: parameter initialization, diffusion, and key-based substitution operation. Section4 of this document contains a description of the presented system specification. Table 9 depicts the time requirements (in seconds) for encryption and decryption in this case. The demand for encryption and decryption time implies that the suggested algorithm is well-suited to dealing with a huge capacity of image data as compared to the existing results [30, 31].Table 9
Time complexity analysis (in seconds) of offered structure.
Image sizeParameter initializationDiffusionKey-based substitutionEncryptionDecryption128×128×30.0500.1980.3110.5590.418256×256×30.1910.2240.2980.7130.691512×512×30.2830.3560.4891.1280.9181024×1024×30.4120.5170.5111.4401.3111Both the approximation of rounds as well as operations are required to achieve the enciphering and deciphering mechanism which is necessary to determine the computation difficulty. To estimate the computational complexity, the plain image had a dimension ofM×M is assumed. Initially, the pixel-level scrambling technique requires OM×M time to complete. Following that, the keystream size is like the image size, M×M, and OM×M is known as the complexity of generation in nature. Finally, the diffusion operation requires OM×M. As a result, the encryption approach has a total time complexity OM2.


## 5. Comparison Analysis

Some of the critical performance measures, including key space analysis, the NPCR and UACI analysis, the correlation coefficient test for adjacent pixel analysis, and information entropy, are used to compare the performance of the suggested encryption scheme to that of current works in this section. Table10 illustrates the comparison results between the given performance metrics of a Lena picture size 256 × 256 × 3 based on the suggested technique and the comparison results between existing methods. According to the tabulated results, the presented strategy outperforms the competition by a significant margin. One can see from Table 7 that the correlation in diagonal, horizontal, and vertical directions shows that the proposed scheme has significantly low correction values when compared to other state-of-the-art encryption schemes. Therefore, our proposed algorithm is perfect because it comprises ideal correlation values. NPCR and UACI of the proposed scheme are greater than 99.6 and 34, respectively. Our offered algorithm possesses perfect values of NPCR and UACI measures as compared to recently proposed work. The information entropy of the proposed scheme is near to the ideal value of 8 and it is also greater than other schemes. The greater value of information entropy as compared to other schemes indicates the robustness of the offered encryption algorithm. Through the comparison table, it is evident that the proposed scheme security is higher. However, the key space of the proposed scheme is lower than Reference [32], Reference [11], and Reference [13]. In the future, we will use coupled multi-chaotic maps for the higher key space.Table 10
Comparison of statistical results of the suggested scheme with existing work.
FeaturesProposedRef. [32]Ref. [11]Ref. [12]Ref. [13]Key space22562512261721042393Diagonal correlationR0.0001−0.0060−0.00260.00910.0167G−0.00210.0127−0.0039−0.00120.0171B0.0003−0.00410.00120.00890.0170Horizontal correlationR−0.0031−0.0033−0.00290.06810.0021G−0.0011−0.0067−0.00320.06820.0023B0.0003−0.00050.00400.06830.0024Vertical correlationR−0.00010.00550.0013−0.00810.0017G0.0031−0.0048−0.00320.00400.0013B−00019−0.0016−0.0018−0.00390.0011NPCRR99.6099.5199.6099.8799.57G99.6299.5399.6199.8899.56B99.5899.5499.6199.8999.57UACIR33.4933.3733.5633.4733.81G33.4833.3933.4533.4933.83B34.6233.3733.4933.4833.81Information entropyR7.99907.99927.99737.99537.9874G7.99927.99927.99697.99537.9871B7.99937.99927.99717.99537.9866


## 6. Conclusion

Ensuring data security during the processes of communication and storage is mandatory these days as potential information leakage might have unwanted consequences. In this work, LFSR and chaos-based quantum map image encryption algorithm is presented. Both confusion and diffusion steps are utilized in the presented encryption. The proposed methodology can be used to encrypt images of different sizes. The entropy values of the encrypted images are significantly high when compared to the entropy values of original images. The presented scheme provides a security layer for images, and its effectiveness was validated through various experimental results such as key space and key sensitivity analysis. Furthermore, the proposed scheme has low correlation values and higher NPCR, and UACI test results. The algorithm is resistant to most known attacks such as differential and statistical attacks etc. These security metrics prove that the proposed scheme achieved a higher security level, and it is well suited for digital image encryption for robust communications. The suggested technique has a low computing overhead and produces a secure ciphertext image within a few seconds. Our work can be further improved and modified to encrypt sensor data, biomedical data [33, 34] in the future. Furthermore, the system can be improved using the concept of parallelism to encrypt massive amounts of multimedia data.



---

*Source: 7047282-2022-04-18.xml*