## 2 Materials and Methods
### Diffusion Stage--Multilevel Encryption Scheme  
After obtaining the shuffled subimage through Sub-Section 2.1, the multilevel encryption scheme is applied to encrypt this subimage, which raises the security level by simultaneously ciphering the data with two hyperchaotic systems and a logistic map; the proposed encryption scheme is outlined in Figure 5.  
In Figure 5, we can see that the hyperchaotic systems and the second logistic map are driven by the initial conditions provided before iterating the encryption system, and they then generate chaotic sequences for subimage encryption. In addition, the data generated via the logic map were designed here to equip two considerable functions--the first being the second-level ciphering tool and the other choosing a combination of states given from the two hyperchaotic systems for first-level encryption in each column pixel. The classical [PERSON] system and [PERSON]'s system were considered as the hyperchaotic systems in this paper, and their chaotic sequences with different kinds of possible combinations were applied to provide the random data in this encryption process. The classical Lorenz system can be described as  
\[\left\{ \begin{array}{l}\dot{x}_{1}=\sigma(x_{2}-x_{1}),\\ \dot{x}_{2}=-x_{1}x_{3}+px_{1}-x_{2},\\ \dot{x}_{3}=x_{1}x_{2}-\beta x_{3},\end{array} \right. \tag{6}\]  
Figure 5: Flowchart of the multilevel encryption scheme. where \(x_{1}\), \(x_{2}\), \(x_{3}\) are system states; \(\sigma\), \(\rho\), and \(\beta\) are system parameters; and when \(\sigma=10\), \(\rho=28\), and \(\beta=8/3\), the system reveals chaotic behavior as shown in Figure 6a. Further, [PERSON]'s system is represented in Equation (7):  
\[\left\{ \begin{array}{l}\dot{x}_{4}=a(x_{5}-x_{4}),\\ \dot{x}_{5}=(c-a)x_{4}-x_{4}x_{6}+cx_{5},\\ \dot{x}_{6}=x_{4}x_{5}-bx_{6},\end{array} \right. \tag{7}\]  
where \(x_{4}\), \(x_{5}\), \(x_{6}\) are system states; \(a\), \(b\), and \(c\) are system parameters; and when \(a=35\), \(b=3\), and \(c=28\), chaos attractors are stimulated, which are given in Figure 6a,b. According to the selected window size of \(16\times 4\), four pixels of the subimage were chosen to be ciphered in each iteration of the dynamic systems; therefore, four states of the hyperchaotic systems in Equations (6) and (7) are systematically selected for image encryption following the designed combinations of states in Table 1, as given below:  
Figure 6: Three-dimensional chaotic motion of classical a Lorenz system and Chen’s system. In this step, the second logistic map represented by Equation (8), as shown in Figure 5, is applied to select the possible combinations for encryption in Table 1; initial conditions generate a new sequence after iteration using Equation (9). The generated serial numbers are 0-14. \[y_{n+1}=ry_{n}(1-y_{n}). \tag{8}\]  
\[SN_{n}=\text{mod}(\text{floor}(y_{n}\times 10^{14}),\ 14). \tag{9}\]  
In accordance with the selected combination in Equation (9), the first-level ciphering data generated via the two hyperchaotic systems can be obtained from Equation (10):  
\[P_{i}=\text{mod}(\text{floor}((|x_{i}|-\text{floor}(|x_{i}|))\times 10^{14}),\ 255), \tag{10}\]  
where \(I=1,\,2,\,3,\,\ldots,\,6\) represent six states, and \(|x_{i}|\) returns the absolute value of \(x_{i}\). \(\text{floor}(x_{i})\) returns the value of \(y_{i}\) to the nearest integer less than or equal to \(x_{i}\) and \(\text{mod}(x,y)\) returns the remainder after division. Finally, \(P_{i}\in[0,\,255]\) refers to enciphering values applied to the encryption process. Further, the second-level ciphering data generated via the second logistic map in Equation (8) can be obtained as follows:  
\[Py_{n}=\text{mod}(\text{floor}(y_{n}\times 10^{14}),\ 255). \tag{11}\]  
Finally, the encryption operation is the result of XOR among four consecutive pixels, which represents one row of shuffled moving window \(S_{(M,N)}\) and the selected combinations states \(SN_{n}\); this step represents the first-level encryption.