# A Two-Dimensional mKdV Linear Map and Its Application in Digital Image Cryptography
## 2 Formulation of the Problem
### Construction of a Two-Dimensional Linear Map (Case Study: Sine-Gordon Map)
\begin{array}{cc}\frac{2\left(\mu^{ 2}-1\right)}{\left(1-\mu\right)^{2}}&-1\\ 1&0\end{array} \right)\left( \begin{array}{c}x_{1}\\ x_{2}\end{array} \right) \tag{23}\]  
Together with the two-dimensional ACM (2D ACM), Equation (23) becomes [2; 4; 5; 9; 28]:  
\[\left( \begin{array}{c}{x_{1}}^{\prime}\\ {x_{2}}^{\prime}\end{array} \right)=\left( \begin{array}{cc}1&p\\ q&pq+1\end{array} \right)\left( \begin{array}{c}x_{1}\\ x_{2}\end{array} \right) \tag{24}\]  
where \(p,q\in\mathbb{R}\). The map described in Equation (23) and Equation (24) can be used for a cryptographic algorithm for a digital image. The maps will be used to change the pixel position of an image without eliminating any information from the image. Note that, due to the reversible map, for the decryption process, we can use the inverse of Equation (24) and the preimage of Equation (23). Encryption Scheme for Image Cryptography Based on a Mapping: A Case Study Involving ACM and a 2D Linear Sine-Gordon Map  
After developing a mathematical tool, an experiment can be carried out to see how different encryption results will differ using the previous sections mappings. In our experiments, an original image was selected by the authors. Let us consider Lena plain image in Figure 2. Assume that this image is a private image that will be hidden. An encryption-decryption scheme for this digital image based on the mappings of (23) and (24) can be constructed as a flow chart in Figure 3.  
Based on the encryption algorithm (Figure 2(a)), the plain image in Figure 2 can be hidden by the following Algorithm 1:  
Input:  
I: PlainImage (* Figure 2 *);  
Procedure 2 DPlanarMap (\(A_{1},A_{2},B_{1},B_{2}\): real, numits, dimimage: integer): real;  
(* numits = number of iterations,  
\(A_{1},A_{2},B_{1}\), and \(B_{2}\) are the entry of matrix coefficient described in Equation (24) *);  
Begin  
For \(i=1\) to numits do  
For \(j=1\) to dimimage do  
Begin  
\(\textbf{x}^{\prime\,(i)}\left(x_{1}(j),x_{2}(j)\right)\leftarrow\left(A_{1}x_{ 1}(j)+A_{2}x_{2}(j)\right),\left(B_{1}x_{1}(j)+B_{2}x_{2}(j)\right);\)  
(*'\(\textbf{x}^{\prime}\) is the map described in Equation (24) and  
\(\textbf{x}^{\prime\,(i)}=\textbf{x}^{\prime}\left(\textbf{x}^{\prime}\left( \textbf{x}^{\prime}\left(\textbf{x}^{\prime}\left((A_{1}x_{1}(j)+A_{2}x_{2}(j) \right),\left(B_{1}x_{1}(j)+B_{2}x_{2}(j)\right)\right)\right)\right)\) *)  
\(\textbf{numits times}\)  
End {for i};  
End[2 DPlanarMap ]  
Figure 3: A flow chart for an encryption (**a**) and decryption (**b**) algorithm. Figure 2: An example of an original (plain) image. This encryption algorithm for hiding the plain image in Figure 2 in a cipher image is shown in Figures 4 and 8. In Figure 4, the cipher images are the diagrams of the results of the randomization of the original image pixels using a 2D ACM linear map from Equation (24) (Figure 4a) and the 2D sine-Gordon linear map from Equation (23) (Figure 4b). The key parameter values that must be kept secret are \(\mu\), \(p\), \(q\), and number of iterations of the map (\(N\)). The decryption process requires the same key parameters to retrieve the plain image. To obtain the cipher images based on 2D ACM, we used Equation (24) for \(\{p,q\}=\{0.75,1.25\}\) and Equation (23) for \(\mu=0.995\), respectively. Note that the cipher images look similar, although they are actually different. To see these differences, pixel data correlations and covariances can be calculated (see Table 1). \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Covariance** & **Correlation** \\ \hline Plain Image (Figure 2) & 0.000919690 & 0.024302828 \\ Cipher Image Generated by Equation (24) (Figure 4a) & \(-0.000001413\) & \(-0.000078930\) \\ Cipher Image Generated by Equation (23) (Figure 4b) & 0.000005278 & 0.000295260 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The computation of the covariances and correlations of the image data based on the weighted data (gradient orientation filter, gradient filter) for the images.