## 2 Motivation
According to the results in [50], for \(\alpha_{1}=0.01\) and \(\alpha_{2}=0001\), observed values are obtained that satisfy the theoretically expected values; in this way, these were the chosen values. ### Experiments on the SAC Criterion

When evaluating the SAC criterion, \(E(T_{i})=m\cdot\alpha_{1}=32\times 0.01=0.32\) avalanche variable uniformity rejections for each change of bit \(i\), with \(1\leq i\leq n\), and

\(E(T)=n\cdot m\cdot\alpha_{1}=2048\times 32\times 0.01\approx 656\) rejects on all changes. Table 1 shows the expected value and the observed values for each cipher, while Figure 1 shows the distribution of the fails per bit changed when evaluating the SAC. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **Expected** & **RC4** & **RC4A** & **NGG** & **VMPC** & **RC4+** & **GGHN** \\ \hline Number of failures T & 656 & 26,251 & 53,168 & 36,522 & 679 & 664 & 719 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Expected value and observed values for each cipher in SAC. It is observed that the RC4A and NGG ciphers do not satisfy the SAC; they even have worse performance than the RC4 stream cipher. This result is not surprising since both variants do not add greater randomness to the operation of the RC4. In the case of the RC4A, the internal state is increased by using two permutation tables instead of one. While in the NGG, the internal state is also increased, but this time, the size in bits of each component of the permutation is increasing. Based on the results achieved, none of these two modifications eliminate this weakness of the RC4; it could even be said that they make it more detectable. On the other hand, the RC4+, VMPC and GGHN ciphers do satisfy the SAC criterion since they have an observed value of failures very close to the expected value, for the significance level \(\alpha_{2}\) chosen. Table 2 shows the \(Z_{T}\) values for each cipher against the critical value \(Z_{1-\alpha_{2}}=3.09\). Remarkably, the NGG and GGHN algorithms are very similar. The difference is that GGHN adds a variable \(k\) to the input-dependent internal state. To measure the implication of this variable, the same \(a\) arrangement of initial random values was used in both cases for the permutation that is used in the KSA. From the results obtained, it is experimentally demonstrated that this variable makes the difference in the behavior between both variants of RC4. ### Experiments on the BIC Criterion

In the application of the BIC to the ciphers, \(E(T_{i})=C_{2}^{m}\cdot\alpha_{1}=496\times 0.01=4.96\) avalanche variable uniformity rejections are expected for each bit change \(i\), with \(1\leq i\leq n\), and \(E(T)=n\cdot C_{2}^{m}\cdot\alpha_{1}=2048\times 496\times 0.01\approx 10,158\) rejects on all you change. Table 3 shows the expected value and the observed values for each cipher, while Figure 2 shows the distribution of the fails per bit changed when evaluating the BIC. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **RC4** & **RC4A** & **NGG** & **VMPC** & **RC4+** & **GGHN** \\ \hline \(Z_{T}\) & 1004.87 & 2061.61 & 1408.10 & 0.90 & 0.34 & 2.50 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Values of \(Z_{T}\) for each cipher. Figure 1: Distribution of the fails per bit changed in SAC for \(n=2048,m=32\), and \(l=16,384\). In this case, RC4A and NGG do not satisfy the BIC and maintain a worse behavior than the RC4 stream cipher. However, it is important to highlight how the RC4A from bit \(i=1150\), approximately, has a slightly better performance than the NGG. This is due to the rapid trend of the NGG towards the maximum value of possible failures. The RC4+, VMPC, and GGHN ciphers satisfy the BIC criterion showing stable behavior, with the significance level \(\alpha_{2}\) chosen. Table 4 shows the \(Z_{T}\) values for each cipher against the critical value \(Z_{1-\alpha_{2}}=3.09\). These results show that it is possible to obtain different results in both criteria.