# Enhancing Visual Data Security: A Novel FSM-Based Image Encryption and Decryption Methodology
## 4 Results and Discussion
### Correlation Analysis  
The correlation coefficient is a critical metric for analyzing the relationship between adjacent pixel values within an image. In unencrypted (plain) images, adjacent pixel values typically exhibit a strong correlation, a characteristic that is markedly diminished in encrypted (cipher) images. The calculation of correlation coefficients encompasses three principal orientations: vertical, horizontal, and diagonal. According to the methodology deployed in the proposed encryption algorithm, it is possible to significantly disrupt the correlation between adjacent pixels within merely two rounds of encryption, thereby enhancing security. For the scope of this investigation, correlation coefficients for all test images were computed across the aforementioned orientations, with the results detailed in Figure 4. This quantitative analysis demonstrates that the proposed encryption technique effectively disperses both the pixel values of the plain images and the cryptographic key values throughout the encrypted images. Such dispersion results in a negligible correlation among adjacent pixel values. Conversely, the pixels in plain images display a pronounced correlation with one another, a relationship that is clearly visualized in both Figure 4 and Table 4. This contrast underscores the effectiveness of the encryption process in obfuscating the inherent patterns and relationships within the original image data. Analysis of Table 4 reveals that subsequent to the encryption process, the encrypted (cipher) images exhibit a significant reduction in the correlation among adjacent pixels. Moreover, Figure 4 illustrates a marked contrast in the distribution patterns of adjacent pixels between the original and encrypted images. Specifically, the distribution of adjacent pixels in the original images is observed to be highly concentrated, signifying a strong correlation among these pixel values. This concentration indicates that pixel values in unencrypted images tend to be similar to their immediate neighbors, reflecting inherent patterns and textures within the visual content. Conversely, the distribution of adjacent pixels within the cipher images is characterized by a random dispersion, which suggests a substantial diminution in correlation. This randomness in the pixel distribution of cipher images signifies an effective disruption of the original image's spatial relationships and patterns, as achieved by the encryption algorithm. The resultant low correlation among adjacent pixels in the encrypted images is indicative of the encryption process's efficacy in obfuscating the original content, thereby ensuring the confidentiality and integrity of the encrypted visual data. Table 4 presents correlation coefficients for encrypted images compared to their original counterparts across three orientations: vertical, horizontal, and diagonal. This quantitative analysis involves four distinct images: Lenna, Mandrill, Peppers, and Airplane. The correlation coefficients for the original images are predominantly high, signifying \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Image** & **Horizontal** & **Vertical** & **Diagonal** \\ \hline Original Lenna & 0.9740 & 0.9694 & 0.9507 \\ Encrypt Lenna & \(-\)0.0066 & \(-\)0.0106 & \(-\)0.0014 \\ Original Mandrill & 0.9587 & 0.9723 & 0.9385 \\ Encrypt Mandrill & 0.0034 & \(-\)0.0016 & 0.0027 \\ Original Peppers & 0.9535 & 0.9217 & 0.9106 \\ Encrypt Peppers & 0.0019 & \(-\)0.0037 & \(-\)0.0144 \\ Original Airplane & 0.9578 & 0.9622 & 0.9180 \\ Encrypt Airplane & \(-\)0.0127 & \(-\)0.0052 & \(-\)0.0134 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Correlation coefficient of encrypted images.