# A Novel Fractional Sine Chaotic Map and Its Application to Image Encryption and Watermarking
## 5 Analysis of Image Encryption and Decryption
### Security Attacks
#### 5.2.3 Salt-and-Pepper Noise (Spn) Attacks  
A secure image encryption algorithm must be able to resist the attack of distortion on the encrypted image. The quality of the image that is able to be restored after noise attacks are studied with the peak signal to noise ratio (_PSNR_) estimated in decibels (dBs) by  
\[PSNR=10\log\left(\dfrac{255^{2}}{MSE(\Theta(u,w),\Psi(u,w))}\right), \tag{19}\]  
where \(\Theta\) and \(\Psi\) represent the original and decrypted image, respectively. _MSE_ denotes the mean squared error. The similarity of the images restored after the attack with the input image is presented with the _MSSIM_ (multi-scale structural similarity index method). The _MSSIM_ actually provides information on the deformity of the decrypted image due to the attack. Noise affects the quality of the image, reducing the quality of the decrypted image obtained after the Spn attack under different intensities on the encrypted image for different images, and is calculated in the form of _PSNR_ and _MSSIM_, as shown in Table 9.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Pixel Change Position** & _NPCR (\%)_ & _UACI (\%)_ \\ \hline \((210,136)\) & 99.601746 & 33.495807 \\ \((245,114)\) & 99.626160 & 33.402231 \\ \((118,245)\) & 99.690247 & 33.592948 \\ \((243,134)\) & 99.633789 & 33.450850 \\ \hline \hline \end{tabular}
\end{table}
Table 8: _NPCR_ and _UACI_ of the peppers image (256 \(\times\) 256) with level 3 watermarking.  
Spn at intensities 0.0005, 0.001 and 0.01 are employed, and the changes in the decrypted images are visualised in Figure 13. Typical \(PSNR\) values for an image with good quality are around 30-50 dB. The tabulated \(PSNR\) values for the different images clearly lie within the range, and thus, it is evident that our algorithm is capable of withstanding the Spn noise attack and recovering the image with good quality.  
The impact of the Spn attack is validated for secret images watermarked at the noise levels 0.005, 0.001 and 0.01, and the simulations are presented in Figure 14. The \(PSNR\) and similarity of the extracted watermarked images with and without noise are tabulated in Table 10. It can be observed that the Spn attack has a considerably greater effect on the objective image than the watermarked secret images. This change can be observed from the \(PSNR\) values of the objective image at a noise level of 0.01, where the similarity between the original and decrypted images is 0.28(28%). In the case of secret images, the similarity between the noiseless extracted image and the noisy image is around 87% for a noise level of 0.01, meaning the information loss is very low and a higher level of information can be recovered.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \multirow{2}{*}{**Images**} & \multicolumn{2}{c}{**0.0005**} & \multicolumn{2}{c}{**0.001**} & \multicolumn{2}{c}{**0.01**} \\ \cline{2-7}  & \(PSNR\) **(dB)** & \(MSSIM\) & \(PSNR\) **(dB)** & \(MSSIM\) & \(PSNR\) **(dB)** & \(MSSIM\) \\ \hline Lena & 36.267275 & 0.994674 & 31.577759 & 0.984377 & 29.896230 & 0.873192 \\ Fingerprint & 37.017159 & 0.996788 & 32.713040 & 0.986345 & 29.571403 & 0.875736 \\ \hline \end{tabular}
\end{table}
Table 10: The \(PSNR\) and \(MSSIM\) of secret images at different noise levels.  
Figure 13: Spn attack for the peppers image at 0.0005, 0.001 and 0.01 with corresponding noisy decrypted images.