# Automatic Selective Encryption of DICOM Images
## 4 Performance Analysis and Discussion
### Approach I
#### 4.1.3 Time Performance and Discussion  
The dataset in Section 4.1 is encrypted using the proposed multi-region encryption approach, two-region encryption approach [25], two-region encryption/compression approach, Naive encryption approach, and Naive encryption/compression approach. In the two-region encryption/compression approach, the ROI and ROB were compressed using LZ4 after the segmentation process and before the encryption process using AES-256 and XXTEA-128, respectively. In Figure 10, the saved time using the proposed multi-region encryption approach is compared with other encryption approaches. Figure 10,b illustrate the saved time in percentage with respect to the two-region encryption approach without and with compression, respectively. The proposed approach can save between 51-58% of the encryption time with respect to the two-region encryption approach, while it saves between 10-17.5% with respect to the two-region encryption/compression approach. On the other hand, the proposed approach saves almost ~60% with respect to the Naive encryption approach as shown in Figure 10, while Figure 10 shows that the saved time varies between 44-49.5% with respect to the Naive encryption/compression approach. Another important aspect of the proposed approach is the compression ratio. Figure 11 shows the compression ratio based on different approaches. Even though LZ4 was used with all encryption approaches, the compression ratio differs significantly among these approaches. It is believed that the reason behind this variation is the consistency of the pixel data, where splitting ROI into multi-region creates more consistent groups of pixels, which results in a better compression ratio as in SL1 and SL2. This can also be confirmed by looking at the low compression ratio of the Naive and two-region encryption approaches in comparison with the other approaches. Table 2 depicts a brief comparison with similar selective encryption approaches in the literature. The approaches were executed using different datasets, hardware, and software implementations, and it is not fair to directly compare them with the proposed approaches in this paper. The reason for mentioning these works is that they have similarities with some of the proposed approaches in this paper, but their datasets and software implementations are not available and clear in order to compare them fairly with the proposed approaches in this paper. Additionally, any implementation in MATLAB (specifically the mentioned approaches in Table 2) will be several times slower than the C implementation that has been \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Segmentation** & **Security** & \multirow{2}{*}{**CoRR**} & **Entropy** & \multirow{2}{*}{**MAE**} & **NPCR** & **Chi-Square** & **PSNR (dB)** & **UACI** \\
**Approach** & & & & & & & & & \\ \hline \multirow{4}{*}{LSE} & 0 & \(-37.87\times 10^{-3}\) & 14.54 & \(3.07\times 10^{8}\) & 100 & \(2.99\times 10^{6}\) & 3.82 & \(4.68\times 10^{5}\) \\  & 1 & \(-50.57\times 10^{-3}\) & 15.15 & \(2.64\times 10^{8}\) & 100 & \(3.78\times 10^{6}\) & 3.77 & \(4.03\times 10^{5}\) \\  & 2 & \(31.11\times 10^{-3}\) & 15.13 & \(2.15\times 10^{8}\) & 100 & \(3.49\times 10^{6}\) & 3.74 & \(3.28\times 10^{5}\) \\  & Average & \(-39.84\times 10^{-3}\) & 14.94 & \(2.62\times 10^{8}\) & 100 & \(3.42\times 10^{6}\) & 3.78 & \(4.00\times 10^{5}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Cryptanalysis results of the 60 CBIS-DDSM Mammography DICOM frames for the multi-region encryption approach. conducted in this paper (Cython was used to compile the Python script of the proposed approaches of this paper into C code). Figure 11: Compression ratio of the multi-region, two-region approach/compression, and Naïve approach/compression encryption approaches. Figure 10: Saved time (%) with respect to (**a**) two-region encryption approach, (**b**) two-region encryption/compression approach, (**c**) Naïve encryption approach, and (**d**) Naïve encryption/compression approach.