# A Novel Image Encryption Algorithm Based on Voice Key and Chaotic Map
## 2 Principles of the Proposed Method
### Proposed Image Encryption and Decryption Algorithm
#### 2.2.1 Encryption Process
```
Input:(\(n\)=1-\(n\)=6, \(k\)=1-\(k\), \(f_{w}\), image matrix \(a\)) begin for(\(i\) = 1, 3000) do \(L_{u1}\) = \(n\)=1/\(k\)1 \(\mu_{1}\) = \(k2\) + \(n\)=3/\(k3\) \(L_{u1}\) = \(L_{u1}\) + \(n\) + \((1-L_{u1})\) \(L_{u2}\) = \(n\)=0/\(k4\) \(\mu_{1}\) = \(k5\) + \(n\)=4/\(k6\) \(L_{u1}\) = \(L_{u1}\) + \((1-L_{u1})\)  end for\(m\) = round(\(\left(L_{u1}(n5+\beta\times f_{m}+k7)+1/2\times\text{the number of rows}\right)\) \(b\) = round(\(\left(L_{u1}(n5+\beta\times f_{m}+k8)+1/2\times\text{the number of columns}\right)\) for(\(i\) = 1, the number of rows) do for(\(j\) = 1, the number of columns) do  matrix scrambling  end for  end for return\(a\)
```  
**Algorithm 1**Image encryption  
Equation (5) is the formula for vector right shift and down shift scrambling of the image data: \(m_{1}\) is the number of shifted bits and \(b\) is the step length that the next row or column shift number should accumulate after each shift. When the image is encrypted, \(L_{uL1}\) and \(L_{uL2}\) perform multiple iterative calculations, and the calculation results are subsequently mapped to obtain the two parameters \(m_{1}\) and \(b\) required by the scrambling formula. In the calculation, the numbers of single-waveform peaks \(n_{w}1\) and \(n_{w}2\) corresponding to the first and second single syllables of the speech signal, respectively, are correlated with the initial value of the chaotic map. The parameters \(n_{w}3\) and \(n_{w}4\) are correlated with the logistic mapping parameter \(\mu\), and the peak frequencies of \(n_{w}5\), \(n_{w}6\) and audio DFT transformation are used to map the value calculated by chaotic map to the range of \(m_{1}\) and \(b\). In this way, the image encryption can be completed. Algorithm 2 describes the process of image matrix scrambling. ```
Input:(matrix \(a\), \(m\), \(b\)) begin for(\(i\) = 1, the number of rows) do \(m_{i}\)=mod(\(m\), the number of rows)  Left cyclic shift (\(m\)) \(m_{1}\) = \(m_{1}\) + \(b\)  end for for(\(j\) = 1, the number of columns) do \(m_{i}\)=mod(\(m\), the number of columns)  Downward cyclic shift (\(m\)) \(m_{1}\) = \(m_{1}\)+ \(b\)  end for return\(a\)
```  
**Algorithm 2**Matrix scrambling  
``` Input:(\(n\)=1-\(n\)=6, \(k\)=1-\(k\)=9, \(f_{w}\), image matrix \(a\)) begin for(\(i\) = 1, 3000) do \(L_{uL1}\) = \(n\)=1/\(k1\) \(\mu_{1}\) = \(k2\) + \(n\)=3/\(k3\) \(L_{uL1}\) = \(L_{u1}\) + \(n\) + \((1-L_{uL1})\) \(L_{uL2}\) = \(n

#### 2.2.2 Decryption Process

As shown in Figure 4, the image decryption is the reverse process of image encryption. The chaotic mapping formula in the decryption process is exactly the same as that in the encryption process. The shift formula for image decryption is shown in Equation (6). Furthermore, the code execution sequence for shifting image rows and columns in a decryption program is the opposite of that in the image encryption. \[\left\{ \begin{array}{c}f(i_{1})=f(j_{1})\;i_{1}=n_{1}-m+1,\ldots,n_{1}-1,n_{1 }\;j_{1}=1,\;2,\;\ldots m_{1}\\ f(i_{1})=f(j_{1})\;i_{1}=1,\;2,\;\ldots,\;n_{1}-m_{1}\;j_{1}=m_{1}+1,\;\ldots, \;n_{1}-1,\;n_{1}\\ m_{1m+1}=m_{1m}-b\end{array} \right. \tag{6}\]

## 3 Application of the Proposed Image Encryption Algorithm in Identification Technology

A novel application scheme is proposed in this paper. To the best of our knowledge, no similar application scheme has been proposed in the existing literature. The process of identity recognition can be designed on the basis of the encryption and decryption algorithms described in Section 2. As shown in Figure 5, it consists of several steps: (1) In the first step, the facial image of the user is obtained as the initial image. The frequency and time-domain features of the user's voice are extracted simultaneously. The voice features are used to encrypt the initial image, and the encrypted image is saved as the original comparison image. (2) In the second step, dual authentication of speech recognition and facial recognition is performed.