# Bit Independence Criterion Extended to Stream Ciphers
## 4 Experiments and Discussion of the Results
### Scenario 1 (BIC in Random SAC Matrices)  
It is expected that under \(H_{0}\), we obtain \(E(Z_{T}|H_{0})=0\), \(\sigma^{2}(T|H_{0})=1\) and \(Z_{T}\sim N(0,1)\). The experiments in this scenario were carried out under uniform and independent randomly generated SAC matrices, to evaluate compliance, under \(H_{0}\), of the \(N(0,1)\) distribution of \(Z_{T}\). Taking into account Table 3, four sets of parameters were selected, two for \(n=m\) and two for \(n\
eq m\):  
* \(n=m\): (\(n=m=32\)) and (\(n=m=64\))
* \(n\
eq m\): (\(n=64,m=32\)) and (\(n=8,m=64\)). The values \(l\in\{4096,8192,16,384,32,678\}\) will be varied, in order to verify the influence of the variation of the parameters \(n\), \(m\) and \(l\) in the adjustment of \(Z_{T}\). The values of \(n\) and \(m\) with the lowest computational cost were selected, that is, the values of \(n\) and \(m\) that provide the lowest values of \(\lambda\) such that \(\lambda>\lambda_{0}=105\). The values \(n\) and \(m\) will be used as a power of two, since current ciphers work with inputs and outputs whose size has these characteristics and also \(l\) to speed up, in terms of execution time, the computation of the BIC method. However, it is important to note that the BIC method can be used for any value of \(n,m\) and \(l\), as long as the requirements outlined in the previous section are met. _Normality of \(Z_{T}\) in \(H^{i}\) random matrices._ Figure 1 corresponds to the observed distribution of 1000 values of \(Z_{T}\), for each pair of parameters \(n\) and \(m\), and each value of \(l\). Tables 4 and 5 show the values \(\widehat{E}(Z_{T}|H_{0})\) and \(\widehat{o^{2}}(Z_{T}|H_{0})\) respectively observed in each sample, for each value of \(n\), \(m\) and \(l\). The analysis of Figure 1 and Tables 4 and 5, suggests the fulfillment of the hypothesis \(H_{0}\) about the distribution of \(Z_{T}\sim N(0,1)\), for all the values of the parameters \(l,n,m\) selected. As can be seen in Tables 4 and 5, by varying \(l\), \(n\), \(m\), the values \(\widehat{E}(Z_{T}|H_{0})\) and \(\widehat{o^{2}}(Z_{T}|H_{0})\) of the observed distribution of \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{\((n,m)\)} & \multicolumn{4}{c}{\(l\)} \\ \cline{2-5}  & **4096** & **8192** & **16,384** & **32,768** \\ \hline (32, 32) & \(-0.150216\) & \(0.044674\) & \(0.214355\) & \(-0.210047\) \\ \hline (64, 64) & \(-0.268244\) & \(0.110717\) & \(0.137298\) & \(-0.383549\) \\ \hline (8, 64) & \(-0.154163\) & \(-0.0239\) & \(0.173869\) & \(-0.164926\) \\ \hline (64, 32) & \(-0.118008\) & \(0.05765\) & \(0.236807\) & \(-0.175659\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Observed \(\widehat{E}(Z_{T}|H_{0})\) values for each selected \(n,m,l\) value. Figure 1: Observed distribution of 1000 values of \(Z_{T}\) in random \(H^{i}\) matrices for various values of \(n,m\), and \(l\). \(Z_{T}\) maintain the fit to the parameters \(\mu=0\) and \(\sigma^{2}=1\) expected in a distribution \(N(0,1)\). Figure 1 shows the bell shape and approximate symmetry of the obtained distributions. _Normality Test._ The Shapiro-Wilks [48] test for normality was applied to all selected parameter sets. The results are shown in Figure 2 and Table 6.  
In Figure 2 we can see how the observed distribution of \(Z_{t}\) for all the values of \(l,n,m\), fit the distribution \(N(0,1)\). Table 6 shows the \(p\)-values corresponding to the Shapiro-Wilk normality test for each of the chosen parameter sets. \begin{table}
\begin{tabular}{c c c c c} \hline \(l\) & \(n=m=32\) & \(n=m=64\) & \(n=8\) and \(m=64\) & \(n=64\) and \(m=32\) \\ \hline
4096 & 0.252382 & 0.724504 & 0.262997 & 0.482318 \\ \hline
8192 & 0.127693 & 0.573267 & 0.161048 & 0.326505 \\ \hline
16,384 & 0.296125 & 0.653315 & 0.141577 & 0.524475 \\ \hline
32,768 & 0.309173 & 0.37739 & 0.210961 & 0.237133 \\ \hline \end{tabular}
\end{table} 
Table 6: \(p\)-values of the Shapiro-Wilk test of normality for samples of \(Z_{t}\), in random \(H^{i}\) matrices, that satisfy the BIC.