# 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  
As shown in Figure 2, the image can be encrypted after obtaining the voice key information used for encryption. Here we use the chaotic map for encryption. Chaotic mapping has a wide range of applications in image encryption. The output of a chaotic system that has iterated a certain number of times is sensitive to the initial value and exhibits randomness. Image encryption can take advantage of this sensitivity and randomness. In this paper, we use logistic chaotic mapping to iterate the chaotic system based on the voice key as shown by Equation (3), which is used to calculate the two initial data sets required by the image displacement formula [19]. \[\left\{ \begin{array}{l}L_{nL1+1}=L_{nL1}\times\mu_{1}\times(1-L_{nL1})\\ L_{nL1}=n_{w}1/k1\\ \mu_{1}=k2+n_{w}3/k3\\ L_{nL2+1}=L_{nL2}\times\mu_{2}\times(1-L_{nL2})\\ L_{nL2}=n_{w}2/k4\\ \mu_{2}=k5+n_{w}4/k6\end{array} \right. \tag{3}\]  
Figure 1: Speech feature extraction. (**a**) Original voice. (**b**) Step1: Single-syllable audio; (**c**) Step2: Single waveform of single-syllable audio; (**d**) Step3: Repetitive synthetic audio of a single waveform; (**e**) Step4: DFT conversion of a single waveform repeatedly synthesized for three seconds of audio. Figure 2: Encryption process. In Equation (3), \(L_{nL}\) is the generated chaotic data; \(\mu_{1}\) and \(\mu_{2}\) are the logistic map parameters; and \(k1\) to \(k6\) are the preset parameters. According to the chaotic mapping conditions, the initial values of \(L_{nL1}\) and \(L_{nL2}\) should be between zero and one, and \(\mu_{1}\) and \(\mu_{2}\) can be between 3.5699456 and 4. In addition, the number of iterations for the chaotic map must be sufficient to allow the output data to enter the random oscillation region as shown in Figure 3.  
In Figure 3, \(\mu\) is set to 3.9; the initial values of the two oscillations are selected as 0.100001 and 0.100002; the ordinate represents the difference between the two chaotic data sets; and the abscissa is the number of iterations of the chaotic map. It can be observed from the output that when the number of iterations is greater than 20, the chaotic map enters a random oscillation zone. When performing image encryption, we set the values of \(k1\) to \(k6\) and the number of iterations after determining the voice key to ensure that the output data are in the random oscillation area. Next, it is necessary to map the iteratively calculated value in Equation (3) to the value range corresponding to the encryption formula. The mapping relationship is shown in Equation (4). \[\left\{ \begin{array}{l}m_{1}=round((L_{nL1}(n_{w}5+k9\times f_{m}+k7)+1)/2 \times s)\\ b=round((L_{nL2}(n_{w}6+k9\times f_{m}+k8)+1)/2\times s)\end{array} \right. \tag{4}\]  
In Equation (4), \(L_{nL1}\) and \(L_{nL2}\) are the vectors generated by the iterative Equation (3); round(.) is the rounding function; \(f_{m}\) is the peak frequency obtained after the DFT transformation of the synthesized speech waveform; \(s\) is the number of lines of the image to be encrypted; and \(k7\) and \(k8\) are two adjustable parameters. A slight change in the values of \(k7\) and \(k8\) will cause a significant change in the encryption result. After each identity authentication, the \(k7\) and \(k8\) can be reset to strengthen the system security. The parameter \(k9\) is an integer multiple of either one or ten. The capacity of the key space can be increased by increasing the resolution of \(f_{m}\) and adjusting \(k9\). Algorithm 1 describes the process of image encryption. \[\left\{ \begin{array}{l}f(i_{1})=f(j_{1})\;i_{1}=1,\;2,\;\ldots\;m_{1}\;j_{1 }=n_{1}-m+1,\;\ldots,n_{1}-1,\;n_{1}\\ f(i_{1})=f(j_{1})\;i_{1}=m_{1}+1,\;\ldots,\;n_{1}-1,\;n_{1}\;j_{1}=1,\;2,\; \ldots,\;n_{1}-m_{1}\\ m_{1m+1}=m_{1m}+b\end{array} \right. \tag{5}\]  
Figure 3: The output of logistic map.