# An Intrusion Resistant SCADA Framework Based on Quantum and Post-Quantum Scheme
## 6 Results
### Results Obtained in the Signature Generation Phase
#### 6.3.2 Comparative Analysis of SPHINCS-QRNG and SPHINCS-Chacha12 Based on Randomness
Table 8, Figures 19 and 20 exhibit the results of the randomness of Chacha-12 PRNG tested by NIST statistical test suite. We performed 15 statistical analysis on five random numbers for each algorithm. Thus, we performed 15 \(\times\) 5 = 75 tests. Out of 75 tests, Chacha-12 passed 70 tests and, QRNG passed all of them. Figure 21 exhibits a graph that shows Chacha-12 PRNG scored 93.3%, and QRNG scored 100% for successfully passing the tests. The Chacha-12 algorithm is feasible for resource-constrained devices [61]. However, [PERSON] et al. [57], showed that secure PRNG Chacha does not pass all the statistical tests of Monte-Carlo analysis. Moreover, ID Quantique has developed a QRNG chip for critical infrastructure involving the Internet of Things (IoT) and other resource constrained devices [19]. Table 9 provides a synthesis of results obtained from comparative analysis of the proposed algorithm, RSA, ECDSA and SPHINCS-256. Figure 18: Results of Random Excursions Variant Test on Quantum Random Number Generator(QRNG) used in SPHINCS-256. \begin{table}
\begin{tabular}{l l l l l l} \hline \hline \multicolumn{1}{c}{\(p\)**-Values of PRNG Used in SPHINCS-256**} & **PRN 1** & **PRN 2** & **PRN 3** & **PRN 4** & **PRN 5** \\ \hline Frequency Test (Monobit) & 0.756560956 & 0.61285665 & 1 & 0.87288107 & 0.76723008 \\ \hline Frequency Test within a Block & 0.466408066 & 0.2519857 & 0.66537382 & 0.05620039 & 0.27892162 \\ \hline Run Test & 0.046601502 & 0.41321088 & 0.95693516 & 0.93466707 & 0.13415598 \\ \hline Longest Run of Ones in a Block & 0.39001338 & 0.57336093 & 0.31763597 & 0.60612676 & 0.43188342 \\ \hline Binary Matrix Rank Test & 0.234372205 & 0.70947779 & 0.89969577 & 0.38005323 & 0.77390385 \\ \hline Discrete Fourier Transform (Spectral) Test & 0.520636833 & 0.87603089 & 0.52063683 & 0.21202315 & 0.4798148 \\ \hline Non-Overlapping Template Matching Test & 0.17548433 & 0.67642991 & 0.08873813 & 0.25081909 & 0.0158475 \\ \hline Overlapping Template Matching Test & 0.341609907 & 0.93826949 & 0.03571624 & 0.88583617 & 0.19903682 \\ \hline Maurer’s Universal Statistical test & 0.251209205 & 0.22365261 & 0.37912508 & 0.21287032 & 0.00739755 \\ \hline Linear Complexity Test & 0.636767031 & 0.43256403 & 0.95718573 & 0.68049537 & 0.26611467 \\ \hline Serial test 1 & 0.266168112 & 0.04303137 & 0.85174723 & 0.77514063 & 0.06351778 \\ \hline Serial test 2 & 0.111246791 & 0.36341311 & 0.71254001 & 0.62943052 & 0.1555089 \\ \hline Approximate Entropy Test & 0.991465303 & 0.50945017 & 0.72260759 & 0.55896218 & 0.70516401 \\ \hline Cumulative Sums (Forward) Test & 0.550993298 & 0.64760991 & 0.550134 & 0.6264806 & 0.39388365 \\ \hline Cumulative Sums (Reverse) Test & 0.834146968 & 0.85546589 & 0.550134 & 0.77562923 & 0.22547471 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: \(p\)-values of appropriate NIST Statistical Tests for Random and PRNG applied on Chacha-12 used in SPHINCS-256. Figure 19: Results of Random Excursions Test on Chacha-12 PRNG used in SPHINCS-256. Figure 21: Percentage of passed tests for randomness scored by Chacha-12 and QRNG. Figure 20: Results of Random Excursions Variant Test on Chacha-12 PRNG used in SPHINCS-256.