Efficient S-box construction based on quantum-inspired quantum walks with PSO algorithm and its application to image cryptosystem

Amidst the growth of the internet and communication technologies, the requirements for the security of data transmitted via these technologies are increasing. Visual data, like images and videos, are commonly utilized for representing the majority of data due to its having more detailed information. Until now, the physical implementation of quantum computers does not have enough capability for hacking any traditional image cryptosystem, but amidst the growth of quantum resources, enough capability may be available in the near future. Most data represented by images has a long lifetime, like personal, medical, military, etc. Therefore, new quantum-inspired-based designs for image cryptosystems are required to be performed on digital resources and have the capability of defying the potential attacks from digital and quantum resources. In this study, a new substitution box (S-box) mechanism is proposed, which is based on quantum-inspired quantum walks, Hénon map, and a customized particle swarm optimization algorithm. Performance analysis of the suggested S-box proves its effectiveness and its reliability in designing various cryptosystems. Based on the effectiveness of the presented S-box, a new image cryptosystem is proposed, in which its experiential outcomes prove its efficacy and security against various attacks. The average outcome of entropy is 7.99977, UACI is 33.484%, NPCR is 99.618%, and Chi-square is 249.481 for the constructed cipher images.


Introduction
Data security plays an essential task in daily life because of the increasing growth of the internet and communication technologies.Visual data, like images and videos, are commonly utilized for representing the majority of data due to its having more detailed information.Digital images can be secured during the transmission and storing process on local or cloud storage via utilizing one of several image data hiding or image cryptosystems [1,2].The main aim of image cryptosystems is to transform the image from a recognizable style to an unrecognizable format.There are many tools utilized in designing modern image cryptosystems, like chaotic maps, S-boxes, cellular automata, DNA, etc. [3][4][5].
Any well-designed image cryptosystem has mainly three phases: (1) key generation, which is related to the pristine

Motivation
Optimization algorithms play an essential role in constructing S-boxes to gain secure S-boxes with good nonlinearity [8,9].However, the role of optimization algorithms is to select a well-constructed S-box based on its performance analyses, not to utilize optimization algorithms in designing S-box mechanisms.Correspondingly, optimization algorithms play an essential role in developing image cryptosystems to gain secure cipher images with good cryptographic properties [10,11].However, the role of optimization algorithms is to select a well-constructed cipher image based on its performance analyses, not to utilize optimization algorithms in designing image cryptosystems.Optimization algorithms include particle swarm optimization (PSO) [12], artificial bee colony [13], ant colony optimization [14], and others, with the PSO algorithm having a low computational time, being simple to execute due to it does not need a large number of parameters, and having a high confluence rate.PSO focuses on a small number of random particles and uses recurrence to find an effective solution.Therefore, Luo et al. [15] utilized the benefits of the PSO algorithm and customized it to perform as a chaotic system for designing a novel image cryptosystem with good performance.
The physical implementation of quantum computers does not have sufficient capability for hacking any traditional cryptosystem yet, but amidst the growth of quantum resources, sufficient capability may be available in the near future and most digital cryptosystems may be breached because their design is based on mathematical models [16].Therefore, some researchers are concerned with developing quantum algorithms for securing data in the quantum era [17].However, most digital data have a long lifetime, like military, medical, personal, etc.Consequently, confidential data must be secured before powerful quantum computers are available for hacking these data.Based on the issues raised, we need to develop new cryptosystems with structures based on quantum-inspired models that can withstand possible assaults from both classical and quantum devices, and their structures are based on optimization techniques to provide extra security.Among quantum paradigms, there is a quantum walk (QW), which is a quantum computing model used in the development of quantum mechanisms and may be used as a quantum-inspired model for constructing current cryptosystems that can be run on both digital and quantum platforms.

Contribution
From the stated issues above, we present a new S-box whose design is based on quantum-inspired QW, Hénon map, and a customized PSO algorithm.In the suggested S-box approach, QW is utilized as a quantum-inspired model to be performed on digital resources, and the PSO algorithm is customized to be utilized in designing the proposed mechanism.Performance analysis of the presented S-box proves its effectiveness and its reliability in designing various cryptosystems.Based on the efficiency of the presented S-box, a new image cryptosystem is suggested.In the suggested image cryptosystem, the probability vector generated from operating quantum-inspired QW and the generated sequences from Hénon map are utilized to operate the customized PSO algorithm for generating two sequences (X and Y ), in which X and Y sequences are utilized for constructing different two permutation boxes to shuffle columns and rows of the pristine image.Then, the X sequence is utilized for constructing an 8 × 8 S-box to substitute the pixels of the permutated image, while the Y sequence is utilized for generating a pseudo-random sequence to construct the cipher image from the substituted image.Experimental results of the suggested image cryptosystem prove its efficiency and security against various attacks.
The summary of the key contributions of this study is listed below: 1.This study opens the door to utilizing quantum-inspired models with optimization algorithms in designing Sboxes.2. Designing a new S-box using quantum-inspired QW, Hénon map, and the customized PSO algorithm.3. Performance analysis of the presented S-box proves its effectiveness and its reliability in designing various cryptosystems.4. Suggesting a new image encryption approach using the presented S-box approach.5.The presented encryption approach has a high sensitivity for both pristine image and key sensitivity.

Organization
The remnant of this study is scheduled as given: the recent works related to the presented study are discussed in the next section, while the preliminaries for QW, Hénon map, and the customized PSO algorithm are given in "Preliminaries".The suggested S-box approach and its performance are delivered in "Proposed S-box algorithm and its analyses", while the proposed image cryptosystem and its performance analyses are provided in "Proposed encryption algorithm" and "Experimental outcomes and analyses".

Related work
Visual data, like images and videos, are commonly utilized for representing the majority of data due to its having more detailed information.Digital images can be secured during the transmission and storing process on local or cloud storage via utilizing one of several image encryption techniques.Recently, chaotic systems have been commonly utilized as a primary tool for developing image cryptosystems because of their chaotic behavior, ease of implementation, and sensitivity to control parameters and primary conditions.For example, Wang and Gao [18] presented a new chaos-based image encryption approach using the semi-tensor product.In the presented cryptosystem, the plain image is splitted into 4 blocks at random, then utilize several rounds of Arnold cat map to scramble each block.Based on the logistic map, Rupa et al. [19] presented a new medical multimedia cryptosystem, but the presented cryptosystem suffers from plain image-sensitivity attacks.Using logistic map and a 2D chaotic system, Askar et al. [20] presented an image encryption algorithm, but the suggested approach does not achieve the sensitivity of the pristine image.Vaidyanathan et al. [21] introduced a new 4D hyperchaotic system and demonstrated its use in developing a new image cryptosystem.Any well-designed image cryptosystem has mainly three phases: (1) key generation, which is associated with the original image; (2) confusion; and (3) diffusion.In addition to their main role in the diffusion process, S-boxes may be utilized as permutation boxes for fulfilling the confusion process.In [4], Naseer et al. presented an image encryption mechanism based on a 3D chaotic system, in which the permutation phase is based on a permutation box and the substitution phase is based on an S-box.However, plain image sensitivity is not achieved for the presented cryptosystem.Using a 1D chaotic system, Rehman et al. [22] offered a medical image cryptosystem for privacy-preserving the medical data during transmission before evaluating it for cancer detection, in which an S-box is used in the substitution phase of the encryption procedure.Recently, chaotic systems have been commonly utilized as a primary tool for constructing S-boxes because of their chaotic behavior, implementation easy, and parameters sensitivity and primary conditions.For example, Maazouz et al. [3] suggested a new 3D chaotic system and presented its purpose in constructing S-boxes and utilizing the generated S-box in designing a new image encryption scheme, but the final encrypted image is generated after several rounds of encryption.Based on a 3D chaotic system, El-Latif et al. [23] offered a new S-box construction algorithm and its application in designing a new image encryption scheme, in which the generated S-boxes are utilized in permutation and substitution phases.Also, El-Latif et al. [7] suggested a new 3D hyperchaotic system and presented its application in constructing S-boxes and utilizing the generated S-box in designing a new image cryptosystem.In [24], Belazi et al. presented a new approach for constructing Sboxes based on a 1D chaotic map and utilizing the generated S-box in designing a new image encryption scheme.Using the Latin square and a 1D chaotic map, Hua et al. [25] presented a new S-box construction algorithm and presented its purpose in designing an image encryption.Based on the Gingerbreadman chaotic system, Khan and Asghar [26] presented a new S-box construction algorithm.
Optimization algorithms play an essential role in constructing S-boxes to gain secure S-boxes with good nonlinearity.For example, Zamli [9] presented a new S-box construction based on the adaptive agent heroes and cowards (AAHC) algorithm and Tent map, in which the role of AAHC is to select a well-constructed S-box based on its strict avalanche criteria (SAC) and nonlinearity.Also, Zamli et al. [27] presented a new S-box construction algorithm based on selective chaotic maps, in which the Tiki-Taka algorithm is used to select a well-constructed S-box based on its nonlinearity.Based on a 1D chaotic map and the cuckoo search algorithm, Alhadawi et al. [28] presented a new S-box construction algorithm, in which the role of the cuckoo search algorithm is to select a well-constructed S-box based on its nonlinearity.In [29], Farah et al. integrated three 1D chaotic maps for the construction of a new chaotic system and presented its purpose in constructing S-boxes and utilized the Jaya optimization algorithm to select a well-constructed Sbox based on its nonlinearity.Then, the newly constructed S-boxes are utilized for designing a new image cryptosystem.Based on the optimization of control parameters for 1D chaotic maps, Tanyildizi and Ozkaynak [30] presented a new S-box construction algorithm, in which the Chi-square value is utilized as the objective function of optimization algorithms.Based on ergodic chaotic map and improved PSO, Hematpour and Ahadpour [8] presented a new S-box construction algorithm, in which the task of the improved PSO is to pick a well-constructed S-box based on its nonlinearity and entropy.However, the role of optimization algorithms stated in [8,9,[27][28][29][30] is to select a well-constructed S-box based on its performance analyses, not to utilize optimization algorithms in designing S-box mechanisms.
Likewise, optimization algorithms play an essential role in developing image cryptosystems to gain secure cipher images with good cryptographic properties.For example, based on the integration of PWLC and 2DLC maps and improved whale optimization, Saravanan and Sivabalakrishnan [10] presented an image cryptosystem in which the final cipher image is obtained by iterative improved whale optimization using the best values for information entropy.In [11], Noshadian et al. introduced an image encryption approach using evolutionary algorithms and the logistic map.The final cipher image is optimized using information entropy or correlation coefficient.Wang and Li [31] introduced an image encryption approach using PSO, DNA, and the logistic map, but the final cipher image is obtained by iterative PSO using the best values for information entropy and correlation coefficient.Using a 4D hyperchaotic map and PSO, Zeng and Wang [32] suggested an image encryption scheme in which the final cipher image is obtained by iterative PSO using the best values for correlation coefficients.In [33], Ahmad et al. suggested an image cryptosystem using PSO and the logistic map, but the final cipher image is obtained by iterative PSO using the best values for correlation coefficients.However, the role of optimization algorithms stated in [10,11,[31][32][33] is to select a well-constructed cipher image based on its performance analyses, not to utilize optimization algorithms in designing image cryptosystems.To overcome this issue, Luo et al. [15] integrate PSO with a 4D hyperchaotic system for designing a new image cryptosystem.
The physical implementation of quantum computers doesn't have sufficient capability for hacking any traditional cryptosystem yet, but amidst the growth of quantum resources, sufficient capability may be available in the near future and the majority of digital cryptosystems may be cracked because their design is based on mathematical models.Therefore, some researchers are concerned with developing quantum algorithms for securing data in the quantum age.For instance, Jiang et al. [17] suggested an quantum image encryption scheme based on the Henon map, but the suggested encryption approach suffers from plain imagesensitivity attacks.
Most digital data have a long lifetime, like military, medical, personal, etc.Consequently, confidential data must be secured before the availability of sufficiently powerful quantum computers for hacking this data.Therefore, El-Latif et al. [34] suggested a new S-box approach using quantum walks as a quantum-inspired model and a 1D chaotic map.Then the presented S-box approach is utilized for designing a new image cryptosystem, but the presented cryptosystem suffers from plain image-sensitivity attacks.In [16], Abd-El-Atty et al. presented an image encryption algorithm for cloud applications using quantum-inspired QW model, Henon map, and Gray code, in which the final encrypted image is generated after two rounds of encryption.
Based on the issues raised, we need to design new cryptosystems with structures based on quantum-inspired models that can withstand possible assaults from both classical and quantum devices, and their structure is based on optimization techniques to bring extra security.Accordingly, Abd-El-Atty integrates PSO and quantum walks in [35] to develop a novel medical image steganography algorithm that uses PSO in the embedding process.Therefore, we need to apply this idea to developing new S-box algorithms and their applications in image cryptosystems.

Preliminaries
In this part, we present the preliminaries for QW, Hénon map, and the customized PSO algorithm that are needed for developing the proposed S-box approach.

Quantum walk
There are two main elements for QW: coin particle H c = cos θ |0 + sin θ |1 and walker space H s [36].In every step t of acting QW on a cycle of V -node governed by a binary message S, a unitary revolution R1 (or R0 ) is applied on the whole quantum system if the tth-bit of S is 1 (or 0), otherwise R2 is applied.The mathematical expression of R1 is as in Eq. (1), where Ĥ is the shift operator of running QW on a cycle of V -node and can be represented as follows: and the coin operator Ô1 can be expressed as follows: where Similar R1 , R0 and R2 can be formed.
After operating QW t steps, the probability of finding the particle at vertex j can be stated as in Eq. ( 4): where c ∈ {0, 1, 2} and |ϕ 0 is the original quantum state of QW.

Hénon map
Chaotic systems have been commonly utilized as a primary tool for constructing S-boxes and image cryptosystems because of their chaotic behavior, ease of implementation, and sensitivity to control parameters and primary conditions.Hénon map is a two-dimensional chaotic map and is expressed in Eq. ( 5): where p 0 , q 0 are the primary conditions and a = 1.4,b = 0.3 are the control parameters of Hénon map.For more information about the chaotic Hénon map, go to Ref. [17].

Particle swarm optimization
Optimization algorithms play an essential role in constructing S-boxes to gain secure S-boxes with good nonlinearity.However, the role of optimization algorithms is to select a well-constructed S-box based on its performance analyses, not to utilize optimization algorithms in designing S-box mechanisms.Among optimization algorithms, there is the PSO algorithm, which has a low computational time, being simple to execute due to it does not need a large number of parameters, and having a high confluence rate.PSO focuses on a small number of random particles and uses recurrence to find an effective solution.In PSO, each particle represents an individual solution.Each particle k possesses an initial state, pbest (z k ), gbest (w k ), and two primary parts: velocity (x k ) and position (y k ), which are used to run the PSO algorithm.
To update each particle's location and velocity, Eq. ( 6) can be utilized [37]: (6) where i denotes the iteration number, k is the particle number, the particle's dimensions are j, α indicates the inertia coefficient, d1 is the subjective parameter, d2 is the collective parameter, and u j , v j ∈ (0, 1) are random numbers.
To adapt the PSO algorithm to be employed in the designing process of the suggested S-box algorithm, we customized it as reported in [15].The mathematical representation of the customized PSO algorithm is provided as follows: where sequence {U } is generated from running QW, and sequences {V }, {Z }, and {W } are generated from iterating Hénon map.

Proposed S-box algorithm and its analyses
S-boxes are considered the backbone component of designing modern cryptosystems.Recently, chaotic systems have been commonly utilized as a primary tool for constructing S-boxes because of their chaotic behavior, ease of implementation, and sensitivity to control parameters and primary conditions.Also, optimization algorithms play an essential role in constructing S-boxes to gain secure S-boxes with good nonlinearity.However, the role of optimization algorithms in the constructed S-boxes is to select a well-constructed S-box based on its performance analyses, not to utilize optimization algorithms in designing S-box mechanisms.Amidst the growth of quantum resources, sufficient capability may be available in the near future and most S-boxes may be hacked.Based on the issues raised, we need to develop new S-box mechanisms based on quantum-inspired models that can withstand possible assaults from both classical and quantum devices, and their structures are based on optimization techniques to provide extra security.In this regard, we present a new S-box algorithm to fulfill the requirements mentioned above.

S-box algorithm
The suggested S-box algorithm is based on quantum-inspired QW, Hénon map, and the customized PSO algorithm, in which QW is utilized as a quantum-inspired model to be performed on digital resources, and the PSO algorithm is customized to be utilized in designing the proposed mechanism.The detailed steps of the suggested S-box algorithm are itemized in the following points.
Step 1: Set the initial values of parameters (S, V , t, θ , σ 0 , σ 1 , σ 2 , p 0 , q 0 , a, b, α, d1, d2, x 0 , y 0 ).Step 2: Using S, V , t, θ , σ 0 , σ 1 , σ 2 operate QW for t steps on a circle of V -vertex as a quantum-inspired model, for producing a probability vector Prb of length V , then resize the elements of the Prb vector to another vector of length g, where g is the number of elements in the desired S-box Step 3: Using p 0 , q 0 , a, b iterate Hénon map for g times, and generating two chaotic sequences (P, Q) each of length g, then from these sequences generate three sequences as given below Step 4: Using parameters (α, d1, d2, x 0 , y 0 ) and the generated sequences (U, V, Z, W ) operate the customized PSO (7) for generating two sequences (X, Y ) each of length g.
Step 5: Organize the elements of a sequence X from the smallest to the largest as a sequence A, then locate the index of per element of A in X as an S-box of g-element.

S-box performance analyses
To verify the efficiency of the offered S-box algorithm, several analyses performed for the constructed 8 × 8 S-box.The most crucial requirements for a robust S-box have been laid forth in [38].Among these requirements, Bijectivity, NL ("nonlinearity"), SAC ("strict avalanche criterion"), BIC ("bit independence"), LP ("linear approximation probability"), and DP ("differential probability").The key parameters that utilized for constructing the S-box stated in Table 1

Bijective characteristic
An n × n S-box is bijective if it has 2 n distinct integer and all in the range [0, 2 n − 1].From the elements stated in Table 1, the provided S-box satisfies the bijective property.

Nonlinearity
The constructed S-box has nonlinearity scores of 108, 108, 108, 106, 102, 110, 106, and 108, respectively.The non-   the dependence matrix for our S-box and other S-boxes.The results show that our S-box has good SAC properties.

BIC
Tables 5 and 6 show the BIC results for our S-box.The BICnonlinearity is shown in Table 5 with an average value of 103.
According to Table 6, the BIC-SAC average is 0.5066, which is extremely close to the ideal value of 0.5000.Therefore, the constructed S-box satisfies the BIC criteria.The results from our S-box provide a realistically acceptable range, as shown by a comparison of the nonlinearities of BIC and BIC-SAC in Table 7.

Differential approximation probability
Table 8 shows the differential approximation values for the constructed S-box.The presented approach is robust against differential assaults, as shown by the DPs values of the constructed S-box, which is 0.03125.Table 9 provides the PDs of different S-boxes, and our S-box has an acceptable DP value when compared to other S-boxes.

LP
Table 10 provides the probability of linear approximation for our S-box with other S-boxes.As a result, the constructed Sbox exhibits acceptable LP properties.

Discussion
The proposed S-box approach was evaluated in terms of NL, SAC, BIC, LP, and DP in which Table 11 displays the values of these terms for our S-box with other related S-boxes  11 shows that the constructed S-box performs well in comparison to other S-boxes.4. The average of the S-box's BIC-SAC value is 0.5030, which is extremely close to the ideal value.5.The max value of DP, Table 9, is acceptable.6.The LP value, Table 10, is acceptable.

Proposed encryption algorithm
Images are commonly utilized for representing the majority of data due to their having more detailed information.Using image encryption methods, digital images may be protected in which S-boxes are extensively utilized in the designing process of image cryptosystems.Due to the effectiveness of the proposed S-box algorithm, we propose a new image cryptosystem as a cryptographic purpose of this S-box algorithm.In the suggested image cryptosystem, the probability vector generated from operating quantum-inspired QW and the generated sequences from the Hénon map are utilized to operate the customized PSO algorithm for generating two sequences (X and Y ), in which X and Y sequences are utilized for constructing different two permutation boxes to shuffle columns and rows of the pristine image.Then, the X sequence is utilized for constructing an 8 × 8 S-box to substitute the pixels of the permutated image, while the Y sequence is utilized for generating a pseudo-random sequence to generate the encrypted image from the substituted image.The framework of the suggested encryption algorithm is shown in Fig. 1, and the detailed steps of the encryption procedure are listed in the following points.
Step 1: Set the initial values of parameters (S, V , t, θ , σ 0 , σ 1 , σ 2 , p 0 , q 0 , a, b,α, d1, d2, x 0 , y 0 ).Step 2: Acquire the hash code (H = h 1 , h 2 , . . ., h 256 ) for the pristine image (PIm) using SHA-256 algorithm, and convert each 8-bit of H into integers (N = n 1 , n 2 , . . ., n 32 ), then update the initial values of p 0 , q 0 , and S using N as stated in the following equations: Step 3: Using S new , V , t, θ , σ 0 , σ 1 , σ 2 operate QW for t steps on a circle of V -vertex, for producing a probability vector Prb of length V, then resize the elements of the Prb vector to another vector of length R×C ×T , where R × C is the size of the original image PIm and T is the number of color components in PIm Step 4: Using p new , q new , a, b iterate Hénon map for g times, and generating two chaotic sequences (P, Q) each of length R × C × T , then from theses sequences generate three sequences as given below Step 5: Using parameters (α, d1, d2, x 0 , y 0 ) and the generated sequences (U, V, Z, W ) operate the customized PSO ( 7 PerIm (i, j, :) = PIm (PerR(i), PerC( j), :) Step 9: Construct an 8 × 8 S-box (Sb) using sequence X(1:256), and substitute the permutated image PerIm using Sb SubIm (i, j, k) = Sb (PerIm(i, j, k)) Step 10: To construct the final cipher image (CiphIm), convert the Y sequence to integer values (K) and use K to perform the BitXor operation with the substituted image SubIm K = floor Y × 10 14 mod 256 , (
The cipher images for the supplied dataset are shown in Fig. 2, in which no visual information about pristine images can be gained from encrypted images.In addition to visual effects, several analyses were carried out to validate the effectiveness of the proposed cryptosystem.

Complexity analysis
To check the efficacy of the suggested encryption scheme in terms of computational cost, we examine it from two viewpoints: computational complexity and encryption time.
The presented encryption approach primarily includes three phases: key generation, confusion, and diffusion.The utilized key streams are generated using Hénon map, QW, and the customized PSO.Hénon map iterates RC times, where RC is the dimensions of the original image, therefore the complexity of operating Hénon map is thus O(RC); and the complexity of acting QW on a cycle of V -vertex is O(V 2 ), while the complexity of operating the customized PSO (7) is O(RC).The confusion strategy is based on two permutation boxes, one for acting rows and the other for acting columns which both are based on sorting the elements and locating the index of per element, with an O(max(R log R, C log C)) computational complexity.The diffusion strategy is based on constructing an S-box with an O(256 log 256) computational complexity, and the bitwise XOR operation with an O(RC).According to the reported computational complexity for each component of the suggested encryption approach, the whole computational complexity of the encryption approach is O(max(RC, V 2 )).Encryption time is known as the time taken to cipher one image.Table 12 provided a quick comparison of the recommended scheme's encryption time in megabytes/second to that of other relevant techniques as reported in [7,10,15,18,20,23,24,29,41].Based on the data displayed in Table 12, the presented encryption technique has an admissible time complexity and broad applicability.
Note that the constructed S-box using our methodology is generated once, not several times as in other S-box mechanisms that are based on optimization algorithms.Also, the cipher image is constructed once, not several times as in other image cryptosystems that are based on optimization algorithms.Therefore, our methodology has better performance and usability than other related methodologies that are based on optimization algorithms.

Correlation analysis
The correlation coefficient (Crf) of adjoining pixels is utilized to appreciate the meaning of an image, in which pristine images have strong Crf values close to 1 and good cipher images have Crf values close to 0. To calculate the Crf values for our experimented dataset and its related cipher images, we randomly selected 10 4 pairs of adjacent pixels.Crf can be stated mathematically as follows where M represents the number of adjacent pixel pairs x j and y j .Table 13 states the Crf values for the investigated dataset, in which the Crf values for cipher images are very near to 0.
To support Table 13 visually, Figs. 3, 4, and 5 plot the correlation distribution for Peppers image before and after the encryption procedure.From the stated outcomes in this subsection, we can extrapolate that the proposed cryptosystem is secure against correlation analysis.

Differential analysis
Differential analysis is utilized to appreciate the number of differences between two encrypted images for one plain image with slight modifications in one bit.There are two measures that are utilized in differential analyses: NPCR ("Number of Pixel Change Rate") and UACI ("Unified Average Changing Intensity"), which are stated as given below where M signifies the complete number of pixels in the image and R1, R2 represent two encrypted images for one plain image with slight modifications in one bit.The results of

Key sensitivity analysis
Key sensitivity analysis is utilized to appreciate the decryption effects of cipher images with slight modifications in initial key parameters.Figure 6 displays the visual effects of deciphering the Ciph-Peppers image with slight modifications in initial key parameters, from which we can deduce that the presented encryption technique has high key sensitivity.

Histogram analysis
A histogram is used to appreciate the distribution of pixel values in an image.Cipher images generated by a welldeveloped cryptosystem should have indistinguishable histograms for different encrypted images.Figure 7 shows the histograms of the experimented dataset and its resulting encrypted images, in which the plots for the encrypted images are semi-similar to each other.To verify that the constructed cipher images have a regular distribution of histograms, we utilized a numerical test like the Chi-square (χ 2 ) test whose mathematical expression is given below where r i is the frequency of the pixel value i, and s represents the dimension of the image.If the χ 2 value does not exceed the threshold value χ 2 0.05 (255) = 293.3,then its histogram is regular, else the image has a non-uniform histogram.The outcomes of χ 2 are given in Table 15, in which the χ 2 values for all encrypted images are less than 293.3.Therefore, the suggested image cryptosystem can withstand histogram analysis attacks.

Entropy analysis
Image entropy test is used to appreciate the distribution of bit levels in an image.Cipher images constructed by a welldeveloped image encryption should have an entropy value very close to 8. The mathematical expression for entropy is given in Eq. ( 25)  ciphertext attacks, the cryptoanalyst has the plaintext for a chosen ciphertext.The chosen-plaintext attack is the most powerful known assault, in which the cryptoanalyst earns transitory access to the cryptosystem and constructs ciphertext associated with a picked plaintext, attempting to breach the secret key or devising a strategy to decipher the ciphertext even access to the secret key.If an encryption approach can endure the chosen-plaintext attack, it can also endure other types of assaults.Due to the fact that the used keystream in the encryption procedure for our cryptosystem is based on the pristine image, the cryptoanalyst for the suggested encryption algorithm cannot get any information about the original key parameters by examining the ciphertext.In another manner, for each pristine image, a one-time keystream is generated, while the original key parameters remain unmodified.Because the totally paralyzed responsibilities of permutation and substitution procedures, cryptoanalysts prefer to nom- inate full-back and full-white images in chosen-plaintext assaults.The cipher images for FullBlack and FullWhite images, as well as their related histograms, are shown in Fig. 9, where no visual information can be acquired, and some statistical analyses for those images are stated in Table 17.
As a consequence, the presented cryptosystem can withstand classical attacks.

Discussion
The presented encryption approach was evaluated from two viewpoints to prove its effectiveness: performance and withstanding cryptanalysis attacks.Regarding performance, the final cipher image is constructed once, not several times as in other image cryptosystems that are based on optimization algorithms; and based on the data displayed in Table 12, the presented encryption technique has an admissible time complexity and broad applicability.Therefore, our methodology has better performance and usability than other related methodologies that are based on optimization algorithms.
Regarding cryptanalysis attacks, we performed several analyses to evaluate the presented encryption approach for withstanding differential, statistical, occlusion, brute-force, and classical types of attacks.Table 13 states the correlation coefficients for the analyzed dataset, in which its values for cipher images are very near to 0. To support Table 13 visually, Figs. 3, 4, and 5 plot the correlation distribution for Peppers image before and after the encryption procedure.Cipher images constructed by a well-designed cryptosystem should have indistinguishable histograms for different cipher images.Figure 7 displays the histograms of the investigated dataset and its resulting encrypted images, in which  6. displays the visual effects of deciphering the Ciph-Peppers image with slight modifications in initial key parameters, from which we can deduce that the presented encryption technique has high key sensitivity.To appreciate the suggested encryption scheme against occlusion attacks, we made cuts out of some parts of the cipher image and then tried to decipher it.Figure 8 shows the results of occlusion attacks, in which the ciphered image is restored perfectly without lack of any visual information in the cutout part.If an encryption approach can resist the chosen-plaintext attack, it can also resist other types of assaults.Due to the fact that the used keystream in the encryption procedure for our cryptosystem is based on the pristine image, the cryptoanalyst for the suggested encryption algorithm cannot gain any information about the original key parameters by examining the ciphertext.The ciphered images for FullBlack and FullWhite images, as well as their related histograms, are shown in Fig. 9, where no visual information can be acquired, and some statistical analyses for those images are stated in Table 17.As a consequence, the proposed cryptosystem can resist classical attacks.To verify the effectiveness of the offered encryption scheme alongside other corresponding ones, Table 18 stated the average values of UACI, NPCR, Chi-square, entropy, and correlation coefficients for the suggested scheme and their values in other corresponding ones.From the given values in Table 18, we deduce that the suggested encryption algorithm is effective and has high security.

Conclusion
The key contribution of this study is to pave the way to utilizing quantum-inspired models with optimization algorithms in designing robust S-boxes.In this paper, a new S-box technique based on quantum-inspired QW, Hénon map, and the customized PSO algorithm is proposed.Several analyses were performed to assess the effectiveness of the presented S-box technique, and its outcomes were utterly acceptable.Also, a new image cryptosystem based on the presented Sbox approach is proposed.The stated experimental outcomes for the suggested cryptosystem prove its effectiveness and the reliability of the suggested S-box approach for various cryptographic purposes.But the proposed cryptosystem is only appropriate for transmitting images securely over communication channels; it is not appropriate for other data types, such as text, video, audio, etc.This is one of the study's drawbacks.Future modifications to the proposed technique will be made to support the secure transmission of diverse data types over communication channels.
) for generating two sequences (X, Y ) each of length R × C × T .Step 6: Constructing a permutation box to shuffle rows of PIm image by arranging the elements of a sequence A (where A = X(501:500 + R)) in ascending order as a sequence B, then locate the index of per element of B in A as permutation box PerR.Step 7: Similar to constructing PerR, construct PerC using sequence Y (1001:1000 + C) to shuffle columns.Step 8: Permutate the pristine image PIm using the constructed permutation boxes PerR and PerC

Fig. 2
Fig. 2 Utilized dataset and its cipher images using the suggested cryptosystem

Fig. 3
Fig.3The correlation distribution for Peppers image (red channel), in which the first row represents the original image, while the second row is for the cipher image

Fig. 4 Fig. 5
Fig.4 The correlation distribution for Peppers image (green channel), in which the first row represents the original image, while the second row is for the cipher image

Fig. 7
Fig. 7 Histograms of the investigated dataset and its resulting cipher images, in which the last three columns are devoted to cipher images, while other histograms are for the pristine images

Table 4
Comparison of SAC

Table 3
displays the dependence matrix for the generated Sbox.The average value of the generated dependence matrix is 0.5044, which is extremely close to the optimal value of 0.5000.Table4lists the max, min, and average values of

Table 5
BIC-nonlinearity of our S-box

Table 7
Comparison of BIC

Table 11
Values of NL, SAC, BIC, LP, and DP for the constructed S-box compared with other related S-box algorithms

Table 12
Comparison of the recommended scheme's encryption time in megabytes/second to that of other relevant techniques

Table 13
Crf outcomes for the investigated dataset

Table 15 The
outcomes of χ 2 test Image χ 2 values for each color component Result R G B

Table 16
Entropy results

Table 18
Comparison of the suggested encryption technique with other corresponding ones plots for the encrypted images are semi-similar to each other.To verify that the constructed cipher images have a regular distribution of histograms, χ 2 -test is utilized.The results of χ 2 are provided in Table15, in which the χ 2 values for all cipher images are < 293.3.Cipher images constructed by a well-developed cryptosystem should have an entropy value very close to 8. Table16states the results of the entropy test, in which cipher images have entropy values of very approximately 8 bits.From the results of correlation, histogram, and entropy analyses, we can extrapolate that the proposed cryptosystem is secure against statistical analysis.Differential analysis is utilized to appreciate the number of differences between two encrypted images for one plain image with slight modifications in one bit.There are two measures that are utilized in differential analyses: NPCR and UACI.The results of NPCR and UACI are given in Table14, in which NPCR values for all cipher images are > 99.60% and UACI values are around 33.46%.Therefore, the suggested encryption algorithm has high pristine image sensitivity.Figure the