# Implementation of MS Circle Map in Digital Image Encryption
## 3 Results and Discussion
### Key Space  
A brute force attack is performed by trying all possible combinations of key parameter values to perform decryption to obtain the original image. To reduce the chances of a successful brute force attack, the keystream generating function must have a larger key space. The key space states the total number of different combinations of key parameter values that can be used to perform image encryption and decryption [30]. The proposed MS Circle Map function as a keystream generator has six parameters: \(x_{0}\), \(r\), \(K\), \(\Omega\), \(\lambda\), and iteration \(i\), with its domain \(x_{n}\in(0,1)\), \((\lambda,\ r,\ \Omega,\ K\in R)\), and \(i\in Z\), assuming that, in a programming language (such as Python), the maximum value of a float type number is \(1.7976931348623157e^{+308}\ \approx\ 1.80\times 10^{308}\). Meanwhile, the real numbers in the interval (0,1) have the precision level up to \(2^{52}\ \approx\ 4.50\times 10^{15}\), and integer data have the possible value of \(2^{64}\approx 1.84\times 10^{19}\). Referring to the assumptions above, then, overall, the key combination or key space of the MS Circle Map function that can be used to encrypt and decrypt images is as follows:  
\[1.80\times 10^{308}\times 1.80\times 10^{308}\times 1.80\times 10^{308} \times 1.80\times 10^{308}\times 4.50\times 10^{15}\times 1.84\times 10^{19}\ \approx 8.69\times 10^{1267}\.\]  
In addition, if the function used is only MS Map or Circle Map or a sequential combination of MS Map and Circle Map, then the key space that can be generated is shown in Table 6. From this table, it can be seen that the key space of the MS Circle Map function is greater than the key space of the MS Map function, Circle Map function, and the sequential combination of the MS Map + Circle Map functions. This means that the MS Circle Map function is more secure against brute force attacks.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**No.** & **Function** & **Parameter** & **Key Space** \\ \hline \multirow{2}{*}{1} & MS Circle Map & \multirow{2}{*}{\(x_{n}\in(0,1)\), \(\lambda,r\), \(\Omega\), \(K\in\mathbb{R},i\in\mathbb{Z}\)} & \multirow{2}{*}{\(8.69\times 10^{1267}\)} \\  & (proposed) & & & \\ \hline
2 & Circle Map & \multirow{2}{*}{\(x_{n}\in(0,1)\), \(\Omega\), \(K\in\mathbb{R}\)} & \multirow{2}{*}{\(1.8\times 10^{612}\)} \\  & & & & \\ \hline
3 & MS Map & \multirow{2}{*}{\(x_{n}\in(0,1)\), \(\lambda\), \(r\in\mathbb{R},i\in\mathbb{Z}\)} & \multirow{2}{*}{\(3.24\times 10^{634}\)} \\  & & & & \\ \hline
4 & Circle + MS Map & \multirow{2}{*}{\(x_{n(c)}\), \(x_{n(MS)}\in(0,1)\), \(\lambda\), \(r\), \(\Omega\), \(K\in\mathbb{R}\)} & \multirow{2}{*}{\(1.05\times 10^{1263}\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 6: Comparison of chaotic function key spaces.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Test** & **MSE** & **PSNR** & **Test** & **MSE** & **PSNR** & **Test** & **MSE** & **PSNR** \\
**Data** & **MSE** & **(dB)** & **Data** & **(dB)** & **Data** & **(dB)** \\ \hline
1 & 0 & \(\infty\) & 11 & 0 & \(\infty\) & 21 & 0 & \(\infty\) \\ \hline
2 & 0 & \(\infty\) & 12 & 0 & \(\infty\) & 22 & 0 & \(\infty\) \\ \hline
3 & 0 & \(\infty\) & 13 & 0 & \(\infty\) & 23 & 0