# Implementation of MS Circle Map in Digital Image Encryption
## 3 Results and Discussion
### Entropy Analysis  
Entropy analysis is a statistical method that can be used to measure the level of randomness in encrypted images [34]. A secure encrypted image should have an ideal entropy value equal to 8 [35]. The entropy value can be calculated using Equation (9), where \(P_{i}\) is the probability of occurrence of a pixel having the value \(i\) (\(i\) is the intensity value of the color component), and the constant 256 is the total variation in the value i in the image (for intensities encoded on 8 bits).  
\[\text{Entropy}=-\sum_{i=0}^{255}P_{i}log_{2}(P_{i})=\sum_{i=0}^{255}P_{i}log_{ 2}\bigg{(}\frac{1}{P_{i}}\bigg{)} \tag{9}\]  
Table 11 illustrates the results of the entropy test of encrypted color and grayscale images. The entropy values of all encrypted images are close to the ideal value of 8, with an average value of 7.9997 for encrypted color images and 7.9995 for encrypted grayscale images. This entropy value proves that all pixels in the encrypted image are perfectly scrambled so that all information is unreadable and safe from statistical attacks.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \multirow{2}{*}{**Test Data**} & \multicolumn{2}{c}{**Correlation Coefficient Values of**} & \multicolumn{2}{c}{**Correlation Coefficient Values of**} \\  & \multicolumn{2}{c}{**Plain Grayscale Images**} & \multicolumn{2}{c}{**Encrypted Grayscale Images**} \\ \cline{2-7}  & **Horizontal** & **Vertical** & **Diagonal** & **Horizontal** & **Vertical** & **Diagonal** \\ \hline
4 & 0.85548 & 0.84890 & 0.78851 & \(-\)0.0015 & \(-\)0.0005 & \(-\)0.0014 \\ \hline
5 & 0.89866 & 0.88655 & 0.83881 & 0 & 0.00101 & \(-\)0.0006 \\ \hline
6 & 0.95941 & 0.95327 & 0.92803 & 0.00056 & 0.0057 & 0.0024 \\ \hline
7 & 0.98501 & 0.97712 & 0.97292 & 0 & 0.0013 & 0.0006 \\ \hline
8 & 0.98710 & 0.98418 & 0.98073 & 0.00029 & 0 & \(-\)0.0006 \\ \hline
9 & 0.99159 & 0.98743 & 0.98439 & 0.00017 & 0.00035 & \(-\)0.0004 \\ \hline
10 & 0.96044 & 0.95203 & 0.93269 & \(-\)0.0025 & \(-\)0.0001 & 0.00328 \\ \hline
11 & 0.96776 & 0.96539 & 0.94798 & \(-\)0.0015 & \(-\)0.002 & \(-\)0.0013 \\ \hline
12 & 0.98155 & 0.98160 & 0.96920 & 0.00038 & 0 & \(-\)0.0013 \\ \hline
13 & 0.80676 & 0.73035 & 0.63572 & \(-\)0.0009 & 0.00256 & 0.00232 \\ \hline
14 & 0.84834 & 0.76068 & 0.68246 & \(-\)0.0009 & 0 & 0.00074 \\ \hline
15 & 0.93034 & 0.86319 & 0.80094 & \(-\)0.0001 & \(-\)0.0001 & \(-\)0.0003 \\ \hline Average & 0.9383 & 0.9156 & 0.8831 & \(-\)0.0007 & 0.0009 & 0.0002 \\ \hline \end{tabular}
\end{table}
Table 10: _Cont._  
\begin{table}
\begin{tabular}{c c c c} \hline \multirow{2}{*}{**Test Data**} & \multicolumn{2}{c}{**Entropy of Encrypted Color**} & \multirow{2}{*}{**Test Data**} & \multicolumn{2}{c}{**Entropy of Encrypted Grayscale**} \\  & \multicolumn{2}{c}{**Images**} & & **Image** \\ \hline
1 & 7.9992 & 16 & 7.9972 \\ \hline
2 & 7.9993 & 17 & 7.9993 \\ \hline
3 & 7.9999 & 18 & 7.9998 \\ \hline
4 & 7.9997 & 19 & 7.9998 \\ \hline
5 & 7.9999 & 20 & 7.9999 \\ \hline
6 & 7.9999 & 21 & 7.9999 \\ \hline \end{tabular}
\end{table}
Table 11: Entropy values of encrypted color and grayscale images.