## 4 The SEME-TDHM Algorithm
### Encryption Process
The formula for computing information entropy is as Equation (10):

\[H(channel)=-\Sigma p(pixel)\log_{2}(p(pixel)) \tag{10}\]

where _p(pixel)_ is the probability of a pixel value in the channel. For a color image, the information entropy of each channel is calculated separately. These channel-specific entropies are then weighted and averaged according to their proportions in the image to obtain the overall information entropy of the color image [34]. This approach provides a thorough assessment of the image's information richness and uncertainty. An information entropy of 8 signifies the highest degree of uncertainty and maximum information. As illustrated in Table 1, the information entropy of the SEME-TDHM algorithm is calculated and compared with that of existing algorithms. The results demonstrate that the information entropy of the encrypted images in this study approaches the ideal value of 8, surpassing other algorithms. This indicates a greater level of randomness, underscoring the robustness, security, and effectiveness of the encryption algorithm. ### Histograms

Histogram counts the occurrences of each pixel value or determines the probability of each value by examining each pixel in the image. In general, the histogram of an unencrypted image displays distinct brightness and darkness levels, forming concave and convex patterns with clearly defined distributions of individual pixel values [35]. In contrast, the histogram of an encrypted image, especially one using an ideal cryptographic method, shows uniform pixel value frequencies and an even distribution throughout the image. As depicted in Figure 12, the histograms of both the original image and its corresponding encrypted image are displayed. The results unequivocally reveal that the histogram of the encrypted image exhibits a uniform distribution, effectively enhancing its ability to resist attacks. Figure 11: Decryption with different keys. ### Correlation of Adjacent Pixels

A key objective of encryption algorithms is to eliminate the correlation between pixels in an image, ensuring that the encrypted image is resistant to restoration or decryption. In this paper, the correlation between pixels is effectively obscured, and the confidentiality of the encryption is strengthened by applying operations such as scrambling and diffusion to neighboring pixels [36]. These techniques significantly enhance the security of the encrypted image, making it resistant to simple restoration or decryption attempts. To

Figure 12: Histogram analysis of images and cipher images: Red represents the R channel; green represents the G channel; blue represents the B channel. quantify the correlation among encrypted images, the correlation coefficient of pixel values is computed using Equation (11):

\[\left\{ \begin{array}{l}E(x)=\frac{1}{N}\sum\limits_{i=1}^{N}x_{i}\\ D(x)=\frac{1}{N}\sum\limits_{i=1}^{N}[x_{i}-E(x)]^{2}\\ Conv(x,y)=\frac{1}{N}\sum\limits_{i=1}^{N}[x_{i}-E(x)][y_{i}-E(y)]\\ R_{xy}=\frac{Conv(x,y)}{\sqrt{D(x)}\sqrt{D(y)}}\end{array} \right. \tag{11}\]

where \(x\) and \(y\) are the gray values of two neighboring pixels in the image. Figure 13 shows the distribution of correlation coefficients among adjacent pixels in different directions. In the original image, a strong correlation is observed between neighboring pixels. Post-encryption, the pixel distribution becomes evenly spread across the image, and the correlation between neighboring pixels in various directions is negligible. The outcomes of the correlation assessment between adjacent pixels are presented in Table 2, and obviously the pixel correlation of the encrypted image is drastically reduced. The correlation coefficient of the unencrypted image is approximated to be 1, while the correlation coefficient of the encrypted image is approximated to be 0. This demonstrates the effectiveness of the encryption process in breaking pixel correlations and enhancing the confidentiality of the image.