# A Chaotic Compressive Sensing Based Data Transmission Method for Sensors within BBNs
## 7 Security Analysis
### Correlation Analysis  
Correlation analysis refers to the analysis of values of two or more variables' correlation, with the aim of measuring the correlation level between different variables. The correlation value is calculated by  
\[r_{XY}=\frac{cov(X,Y)}{\sqrt{D(X)}\sqrt{(D(Y)}} \tag{25}\]  
where \(X\) and \(Y\) represent two variables. The mathematical expectations of \(X\) and \(Y\) are \(E(X)=\frac{1}{N}\sum\limits_{i=1}^{N}X_{i}\) and \(E(Y)=\frac{1}{N}\sum\limits_{i=1}^{N}Y_{i}\). The covariance between \(X\) and \(Y\) is \(cov(X,Y)=\frac{1}{N}\sum\limits_{i=1}^{N}(X_{i}-E(X))(Y_{i}-E(Y))\). The variances of \(X\) and \(Y\) are \(D(X)=E(X^{2})-\left(E(X)\right)^{2}\) and \(D(Y)=E(Y^{2})-\left(E(Y)\right)^{2}\). Tables 5-7 list the correlation values of adjacent pixels of original images as well as of signal \(Y_{c}\). Values are calculated based on pixel pairs from horizontal, vertical, and diagonal directions, respectively. Tables 5-7 indicate that the correlation values of adjacent pixels of original images are approximate to 1, which means that a pixel of an original image is highly likely to leak information about the pixels surround it. Taking advantage of this feature, attackers may infer or predict a pixel value according to a known pixel value next to it and then apply even more to the recovery of the whole image. In addition, it also can be seen that all the correlation values of adjacent pixels of signal \(Y_{c}\) are nearly 0, whi  
Figure 7: The first, second, and third columns show the histograms of pixel distribution that are calculated based on pixels from red, green, and blue channels of original RGB images that are named Ilama, car, and football, respectively. Correspondingly, the fourth, fifth, and sixth columns show the histograms of pixel distribution that are calculated based on pixels from signal \(Y_{c}\). The compression rate is 0.7.  
correlations of pixels in the original images are broken, and, therefore, attackers could use little information about adjacent pixels to launch statistical attacks. In addition, we randomly select 1000 pairs of adjacent pixels from the original image and related signal \(Y_{c}\), respectively, and record pixel values through the coordinate system to reveal the correlation of adjacent pixels in another form. Figure 8 shows the results drawn based on image llama, which implies that the correlation of adjacent pixels in the original image is rather tough and the correlation of adjacent pixels in signal \(Y_{c}\) is very weak. Figures 9 and 10 exhibit the results generated by pixel pairs of image car, image football, and their related signal \(Y_{c}\). Similarly, points drawn according to original pictures are distributed unevenly, which indicates a high value of pixel correlation, whereas points drawn from signal \(Y_{c}\) are distributed arbitrarily, which means the value of pixel correlation of signal \(Y_{c}\) is rather low. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{5}{c}{**Pixels from Original Image**} \\ \hline horizontal & 0.982515 & 0.979078 & 0.977904 & 0.979832 \\ vertical & 0.979157 & 0.974894 & 0.974456 & 0.976169 \\ diagonal & 0.979092 & 0.974866 & 0.974478 & 0.976145 \\ \hline \multicolumn{5}{c}{**pixels from \(Y_{c}\)**} \\ \hline
**Direction** & **Channel r** & **Channel g** & **Channel b** & **Average** \\ \hline horizontal & 0.003977 & 0.002792 & 0.000689 & 0.002486 \\ vertical & 0.022264 & 0.026053 & 0.029963 & 0.026093 \\ diagonal & 0.027555 & 0.031170 & 0.034890 & 0.031205 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Correlation values of adjacent pixels in image car.