## 6 Cryptography
### Algorithms for Images  
#### 6.2.1 Image Encryption Algorithms  
Several algorithms for image encryption based on the Lozi map have been developed.  
An optical color image encryption scheme based on a fingerprint key and three-step phase-shifting digital holography was proposed by Su et al. [123]. In this scheme, the fingerprint directly serves as a secret key. The random phase masks generated from the fingerprint using a secure hash algorithm (SHA-256) and the chaotic Lozi map are used as interim variables. With the help of the fingerprint-based random phase masks located in the linear canonical transform domain and the three-step phase-shifting digital holography, the primary color image that is hidden in a grey-scale carrier image can be encrypted into three noise-like holograms. In addition, the parameters of the chaotic Lozi map and linear canonical transform can provide additional security to the proposed encryption scheme.  
The generation process of the fingerprint-based random phase masks mainly comprises the following steps [123]:  
* Step 1: Calculate the hash value of the fingerprint using the SHA-256; a 256-bit hash value expressed as a hexadecimal number array can be obtained as follows: \(H=[h_{1},h_{2},\ldots,h_{64}]\).
* Step 2: Use elements of the array \(H\) to generate the initial values of the chaotic Lozi map in the following way: \[\left\{\begin{array}{l}x=x_{0}+hexa2 dec(H(h_{i}:h_{i+7}))\times 10^{-16},\\ y=y_{0}+hexa2 dec(H(h_{i}:h_{i+7}))\times 10^{-16},\end{array}\right.\] (84) where \(i,j=1,2,\ldots 57\); \(x_{0},y_{0}\), and \(x,y\) denote the common and generated initial values of the chaotic Lozi map, respectively; and \(hexa2 dec(x)\) is used to convert hexadecimal number \(x\) to a decimal number.
* Step 3: Suppose that the size of fingerprint-based random phase mask to be generated is \(M\times N\) pixels. First, construct the chaotic Lozi map with initial values \(x\) and \(y\), then iterate \(\frac{M\times N}{2}\) times to obtain two random sequences \(X=\left\{x_{1},x_{2},\ldots,x_{\frac{M\times N}{2}}\right\}\) and \(Y=\left\{y_{1},y_{2},\ldots,y_{\frac{M\times N}{2}}\right\}\).  
Figure 9: Image on the \((x,y)\)-plane of 300,000 iterates of the cosine Lozi chaotic map (83) for initial values \(x_{0}=0.1\) and \(y_{0}=0.3\) and parameter values \(a=-1.8\), \(b=0.25\), and \(k=12.0\).  
* Step 4: Combine sequence \(X\) with sequence \(Y\) to form a new random sequence \(Z\) where \(Z=\left\{x_{1},x_{2},\ldots,x_{\frac{M\times N}{2}};y_{1},y_{2},\ldots,y_{\frac{ M\times N}{2}}\right\}\).
* Step 5: Reshape the random sequence \(Z\) to form a two-dimensional random matrix \(RM\) with size \(M\times N\), where \(RM=reshape(Z,M,N)\).
* Step 6: The fingerprint-based random phase mask \(FRPM\) can be generated in the following way: \(FRPM=exp(i\cdot\pi\cdot RM)\).  
It is worth noting that a series of fingerprint-based random phase masks can be generated using different elements of the array \(H\) to generate the initial values of the chaotic Lozi map from Equation (84) and repetition of steps 3-6.  
We do not describe the other parts of the algorithm that are not linked to the Lozi map here.  
This algorithm was tested numerically with common initial values of \(x_{0}=0.34\) and \(y_{0}=0.0\) and the common control parameters \(a=1.75\) and \(b=0.33\). Numerical simulation results showed that the proposed encryption scheme has a high security level and can resist statistical attacks, data loss attacks, and noise attacks.  
The same team from Hebei University developed a similar algorithm based on diffractive imaging and the Lozi map in [124].