# Analysis of Vulnerabilities That Can Occur When Generating One-Time Password
## 6 Results and Discussion
### Results  
The random variable X represents the frequency of occurrence of each \"element\" of range. Here, element means a decimal number obtained through each extraction algorithm. For this experiment, we collect a total of \(2^{20}\) elements and check the frequency of each decimal number. \(E(X)\) is the expected value. If the probability of occurrence of all elements is uniform, the frequency of each element in the range should be distributed equally by \(E(X)\). In addition, if the probability is uniform, the maximum number of element(s) in the range that occur most in the sample, \(MAX(X)\), should not be much different from \(E(X)\). In all ranges, the control group's \(MAX(X)\) is close to \(E(X)\) and the difference between each control group (static, dynamic) is 5 or less. The experimental group also shows a similar tendency to the control group when the range was less than or equal to \([0,10^{2}-1]\). However, the gap between the experimental group and the control group becomes wider when the range is greater than or equal to \([0,10^{3}-1]\). The \(MAX(X)\) of the experimental group differs from its \(E(X)\) by more than \(200\sim 300\). Similarly, the difference in \(MAX(X)\) between the control group and the experimental group can be seen that the difference is about 300.  
Based on the above analysis, we present Threshold \(H\), an experimentally obtained value that can clearly classify experimental and control groups. The samples in the control group appear to be close to the expected values, while the samples in the experimental group differ significantly from \(E(X)\). Therefore, the improved algorithm could be identified from the three algorithms using the  
\begin{table}
\begin{tabular}{l l l l l l l l l} \hline \hline
**Range** & \(E[X]\) & & \(MAX(X)\) & \(H\) & \(\#(X>H)\) & \(\#(X\leq H)\) & \(e\) \\ \hline \([0,10^{1}-1]\) & \(\approx\)\(10^{5}\) & - & & - & - & - & - & - \\ \hline \multirow{4}{*}{\([0,10^{2}-1]\)} & \multirow{4}{*}{\(\approx\)\(10^{4}\)} & static & 10,714 & static & 2 & static & 98 & 1.001 \\  & & dynamic & 10,679 & 10,700 & dynamic & 0 & dynamic & 100 & 0.998 \\  & & improved & 10,821 & improved & 10 & improved & 90 & 1.011 \\ \hline \multirow{4}{*}{\([0,10^{3}-1]\)} & \multirow{4}{*}{\(\approx\)\(10^{3}\)} & static & 1151 & static & 61 & static & 939 & 1.046 \\  & & dynamic & 1154 & 1100 & dynamic & 59 & dynamic & 941 & 1.050 \\  & & _improved_ & **1358** & & _improved_ & **256** & improved & 744 & **1.235** \\ \hline \multirow{4}{*}{\([0,10^{4}-1]\)} & \multirow{4}{*}{\(\approx\)\(10^{2}\)} & static & 148 & static & 0 & static & 10000 & 0.740 \\  & & dynamic & 151 & 200 & dynamic & 0 & dynamic & 10000 & 0.755 \\  & & _improved_ & **413** & & _improved_ & **256** & improved & 9744 & **2.065** \\ \hline \multirow{4}{*}{\([0,10^{5}-1]\)} & \multirow{4}{*}{\(\approx\)\(10^{1}\)} & static & 33 & static & 0 & static & 100,000 & 0.33 \\  & & dynamic & 29 & 100 & dynamic & 0 & dynamic & 100,000 & 0.29 \\  & & _improved_ & **333** & & _improved_ & **256** & improved & 99744 & **3.33** \\ \hline \multirow{4}{*}{\([0,10^{6}-1]\)} & \multirow{4}{*}{\(\approx\)\(10^{0}\)} & static & 9 & static & 0 & static & 1,000,000 & 0.257 \\  & & dynamic & 8 & 35 & dynamic & 0 & dynamic & 1,000,000 & 0.229 \\ \cline{1-1}  & & _improved_ & **320** & & _improved_ & **256** & improved & 999744 & **9.143** \\ \hline \hline \end{tabular}
\end{table}
Table 3: Results of Experiment 2: This table shows numerically how often certain numbers occur when the improved algorithm is used.  
threshold values for each range. If the improved algorithm is used, OTP is selected from the reduced set R (\(|\)R\(|\) = 256) with a probability of 1/16, which maps many times to 256 elements. Evidence for this is that the number of elements larger than the threshold (\(\#(X>H)\)) is 256 (in bold), and even one element in the rest of the controls does not exceed the threshold.