# Optimized Implementation of Argon2 Utilizing the Graphics Processing Unit
## 4 Evaluation
### Comparison with Existing CPU-GPU Implementation  
Figure 5 and Tables 2-4 compare the performance of our implementation with that of the previous one at the parallelism levels (p) of 1, 2, and 4 for the Argon2d id version. The relationship between the Number of Passwords and Total Time (ms) was compared. As seen in Figure 6, overall, the time approximately doubles each time the number of passwords doubles. The increase in time decreases as the number of passwords being processed increases. As illustrated in Table 1, the time per password decreases as the number of passwords increases. This is most prominent in GPU computation. When processing 4096 passwords, it deals with 128 times more passwords than when processing 32 but the computation time increases by about 25 times. This confirms that more efficient operations are possible when there are more passwords processed in parallel on the GPU. However, it is relatively inefficient in terms of data transfer time between the CPU and GPU. The greatest delay in GPU computation was confirmed to be the data transfer time between the CPU and the GPU. Generally, our implementation has a shorter processing time than the existing implementation. It was more efficient when there were more passwords being processed and when the level of parallelism was higher. The increase in the level of parallelism affected the delay in data transfer between the CPU and GPU. In the case of the existing implementation, computation was somewhat reduced but, in our implementation, the time taken increased when the number of passwords was large (more than 1024). The difference between the two implementations was not significant at a parallelism level of 1 but, as the level of parallelism increased, the performance difference became more significant and the difference increased as the number of passwords increased. In our work, as the fillblock operation and finalize operation run on the GPU, the amount of memory transfer between the CPU and GPU is reduced, and the computation time in the kernel increased. Therefore, although the computation was more efficient in the existing implementation, the overall time was reduced by reducing the larger delay factor, the data transfer time between the CPU and the GPU. Figure 6: Comparison of the performance of the implementation with that of the previous implementation at levels of parallelism (p) of 1, 2, and 4 for Argon2i versions. \begin{table}
\begin{tabular}{c c c c c c} \hline
**PWD Num** & **Writing (ms)** & **Computation (ms)** & **Reading (ms)** & **Total (ms)** & **Time Per Num** \\ \hline
4096 & 150.07/155.42 & 26.23/28.92 & 137.63/141.01 & 313.93/325.35 & 0.077/0.079 \\ \hline
2048 & 77.25/77.97 & 13.82/14.93 & 73.51/71.27 & 164.59/164.17 & 0.080/0.080 \\ \hline
1024 & 41.84/41.06 & 7.82/8.95 & 37.23/37.41 & 86.90/87.43 & 0.085/0.085 \\ \hline
512 & 21.14/21.06 & 3.76/4.76 & 18.00/18.01 & 42.89/43.83 & 0.084/0.086 \\ \hline
256 & 10.00/11.46 & 2.42/3.51 & 9.28/9.84 & 21.69/24.81 & 0.085/0.097 \\ \hline
128 & 5.09/5.97 & 2.05/3.05 & 4.78/4.93 & 11.91/13.95 & 0.093/0.109 \\ \hline
64 & 2.93/3.33 & 1.81/2.83 & 2.13/2.59 & 6.87/8.75 & 0.107/0.137 \\ \hline
32 & 1.91/1.52 & 1.80/2.83 & 1.41/1.31 & 5.13/5.65 & 0.160/0.177 \\ \hline \end{tabular}
\end{table} 
Table 2: Comparison of the performance of the implementation with that of the previous implementation at levels of parallelism (p) of 1 for Argon2 id versions (Ours/Mosnácek). Figure 7: Comparison of the performance of the implementation with that of the previous implementation at levels of parallelism (p) of 1, 2, and 4 for Argon2d versions.