# Hash Based DNA Computing Algorithm for Image Encryption
## 3 Methods
### Content-Aware Encryption Module
As shown in Figure 7, we choose an 8-bit image as the plain image and use the initial key 'GOOD-LUCK' to encrypt the image, obtaining the 'pseudo initialize factor' (\(x_{1}=0.401894441844344,p=0.33533929244635197\)). Afterwards, we change the pseudo-initialized factor to generate a new cipher image \(E_{0}\). Moreover, we define \(x_{1}=x_{1}+10^{-14}\) and \(p=p+10^{-14}\) to generate another two cipher images \(E_{2}\) and \(E_{3}\). The average NPCR and UACI values for different images are shown in Table 3. In fact, [PERSON] et al. (2018) state that the expected UACI value should be 33.4635% for an image with ranging values from 0 to 255. It is noted that all results are close to the expected UACI values, which proves that the proposed is capable of resi

Figure 7: We demonstrate differential cipher images achieved by the proposed method, offering samples on sensitivity and key sensitivity analysis. ### Ablation Analysis

To verify the effectiveness of the proposed content-aware encryption module, we make an ablation analysis with \"Lena\" image as input, which is considered as the most commonly used test image [27]. As shown in Table 4, the performance without the proposed module is relatively poor, since simply adopting DNA encoding without content modeling fails in encoding as muchinformation of the input image. In fact, the proposed content-aware encryption module uses a permutation and a diffusion process to describe informative information remaining in the encoded data, greatly improving the complexity for breaking. ### Comparison Experiments

For comparative experiments, we follow the rules in [PERSON] et al. [27], which are currently used by the vast majority of image encryption articles. Table 5 shows the experimental results with the comparing methods. It's noted that results achieved by other methods are directly obtained from their papers. Essentially, correlation refers to the capability of resistance to statistical attack. Information entropy represents the capability of resistance to entropy attack; meanwhile, sensitivity represents the capability of resistance to the differential attack. It can be observed from Table 5 that the proposed method cannot achieve the best performance on all measurements. For example, [PERSON] et al. [23] has the best performance in correlation, but the worst in NPCR. Such a phenomenon means their method cannot bear a differential attack. [PERSON] et al. [28] has the best performance in NPCR, but the worst in entropy and correlation. Such an observation means it would fail under an entropy attack and statistical attack. The proposed method has achieved a balanced performance in three measurements, which represents it does not have as much weaknesses as the other two \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Ablation Methods**} & \multicolumn{2}{c}{**Correlation**} & \multirow{2}{*}{**Entropy**} & \multicolumn{2}{c}{**Sensitivity**} \\  & **V** & **H** & **D** & & **NPCR** & **UACI** \\ \hline Ours (without CAEM) & 0.1425 & 0.0986 & 0.0483 & 7.0145 & 93.2143 & 32.4218 \\ \hline Ours (Full) & 0.0032 & 0.0019 & 0.0004 & 7.9982 & 99.6442 & 33.4732 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of ablation analysis on “Lena” image, where CAEM indicates content-aware encryption module. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Images** & **NPCR** & **UACI** \\ \hline Poster & 99.6732 & 33.4836 \\ Street & 99.5890 & 33.4821 \\ Subway & 99.6016 & 33.5104 \\ ID Card & 99.6232 & 33.4302 \\ Hohai University & 99.6278 & 33.4886 \\ Key: \(E_{1}\leftrightarrow E_{2}\) & 99.5982 & 33.3821 \\ Key: \(E_{1}\leftrightarrow E_{3}\) & 99.6107 & 33.4442 \\ Key: \(E_{2}\leftrightarrow E_{3}\) & 99.5198 & 33.4250 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of NPCR and UACI achieved by the proposed method to evaluate sensitivity against differential attacks.