# Chaos Based Cryptographic Pseudo-Random Number Generator Template with Dynamic State Change +
## 4 One-Time Pad Stream Cipher Application
### Results Analysis  
The ideal entropy for an encrypted grayscale image is 8 [39] as it can be deduced from:  
\[H(s)=-\sum_{k=0}^{2^{n}-1}p(k)\cdot log_{2}p(k) \tag{5}\]  
where \(k\) is a certain gray level, \(p(k)\) is the probability of occurrence of that particular gray level \(k\) and \(n\) is the number of bits per pixel (here \(n=8\)). An image obtained from a phone camera was enciphered in Figure 10. As it can be observed in the left side of Table 4, this plain-image (given in Figure 10, left side) already has a high entropy level. Next to it, the middle image shows the result of the encryption process when using \((a;b)=(0.15;0.1)\) (a pair not engendering chaotic behavior for the generalized Henon map). Its corresponding entropy is slightly greater than for the plain-image, 7.20 compared to 7.17, being still clearly visible. When \(E_{2}\) is used alone, the right image from Figure 10 and its corresponding entropy in Table 4 show a weak encryption. The image encrypted with \((a;b)=(1.76;0.1)\) (enabling chaos [40]), has a satisfying result of \(H(s)=7.99\), as it is the case for the entropy builder from [32] also. Switching the \(a\) parameter using  
Figure 9: Throughput of several generator configurations. \(E_{1}\) and \(b\) with \(E_{2}\) (see (4)) gives 7.99 as well, the encryption being indiscernible, the image being similar to the one in Figure 11, bottom right. An image characterized by a very low entropy was used to highlight the effect of the enciphering process in Figure 11. From the left to right and top to bottom, there are shown: the plain-image, the encryption with \((a;b)=(0.15;0.1)\), enciphering with \(E_{2}\), and the bottom right image is the result of successful encryption when using \((a;b)=(1.76;0.1)\), using \(E_{1}\), respectively \(E_{1}\) and \(E_{2}\). The visual effects are the same as for the high level entropy plain-image in Figure 10, but the entropy computed in Table 4 is more conclusive since it shows the differences between original and cipher more clearly. Inspired by a statistical test obtaining independent and identically distributed data from chaotic maps [20] and some pRNGs using it [41; 42], we enciphered the same images as in Figure 10 and in Figure 11 with different update period for the entropy builder \(E_{2}\). Entropy values are given in Table 5 and histograms of the enciphering in Figure 12. The bottom middle histogram appears empty because the values are concentrated in 0 and 255. While update periods of 10 and 70 improve the enciphering using the entropy builder \(E_{2}\), the distance of 20 iterations does not have the same satisfying result. Nevertheless, this is an issue that is to be thoroughly addressed in a future paper. \begin{table}
\begin{tabular}{l c c} \hline \hline  & **Entropy** & **Entropy** \\ \hline original image & 7.17 & original image & 0.19 \\ encrypted; \((a;b)=(0.15;0.1)\) & 7.20 & encrypted; \((a;b)=(0.15;0.1)\) & 1.19 \\ encrypted; \((a;b)=(1.76;0.1)\) & 7.99 & encrypted; \((a;b)=(1.76;0.1)\) & 7.99 \\ encrypted with \(E_{1}\) & 7.99 & encrypted with \(E_{1}\) & 7.99 \\ encrypted with \(E_{2}\) & 7.94 & encrypted with \(E_{2}\) & 5.55 \\ encrypted using \(E_{1}\) and \(E_{2}\) & 7.99 & encrypted with \(E_{1}\) and \(E_{2}\) & 7.99 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Entropy values for plain-images in Figures 10 and 11 and their enciphered versions. Figure 11: A low entropy plain-image and its encrypted versions. Figure 10: A high entropy plain-image and its poorly encrypted versions. Further, we analyzed the correlation between adjacent pixels of the encrypted images compared to those of the plain-image. Scatter diagrams for adjacent pixels were plotted for the high entropy level plain-image in Figure 10 (top) and for the low entropy-level image in Figure 11 (bottom). Results are given in Figure 13. The top left up corner depicts the almost perfect correlation existent in the original high entropy image, while the down left corner shows the two gray levels in the low entropy chosen image.