# Performance Analysis of Post-Quantum Cryptography Algorithms for Digital Signature
## 5 Performance Analysis
### Measurement Results  
The performance of key pair generation for various post-quantum cryptographic algorithms was tested firstly. Figure 3 presents the results of this scenario. It can be observed that Dilithium algorithms had the best time performance. Algorithms from the SPHINCS+ group with the suffix 'f' also achieved a gratifying result, distinguishing themselves from the second part of this group. However, it should be remembered that they are optimized for speed, not size. Therefore, they generate a longer signature than thosewith the suffix's', as shown in Table 1. Both of these groups obtained times an order of magnitude larger than the Falcon and SPHINCS+ algorithms with the suffix's'. However, it is thought-provoking that the SPHINCS+SHA-192s-simple and SPHINCS+SHAKE-192s-simple algorithms exhibited longer execution times relative to their counterparts with longer keys, namely SPHINCS+SHA-256s-simple and SPHINCS+SHAKE-256s-simple, respectively. This performance trend was counter-intuitive and at odds with the behavior observed from the other algorithms. For example, the SPHINCS+ algorithms with the suffix 'f' and the Falcon algorithms demonstrated a dependency that the larger the key size, the longer the execution time. This unexpected behavior may be a direct consequence of the way certain algorithms are implemented in the library. Figures 4-6 refer to the file signing function. They show the average execution time obtained by each algorithm when signing files of size 10 MB, 100 MB, and 1 GB, respectively. It is a reasonable trend that the larger the size of the file to be signed, the longer this operation takes. In all three cases, the Dilithium and Falcon algorithm groups achieved the best time performance. Similar to Figure 3, showing the average key pair generation times, a disparity between the SPHINCS+ algorithms with's' and 'f' suffixes was noticeable in the advantage of the speed-optimized ones. This result is in accordance with expectations. However, the difference decreased as the size of the signed file increased. As in Figure 3, results that are counter-intuitive were also present, namely in the algorithms of the SPHINCS+ group--examples of each file size were visible where the algorithm operating with a shorter key achieved a worse time than its counterpart operating with a longer key. As the performance of the algorithms in the two groups, Dilithium and Falcon, were very similar, further analysis was carried out. The purpose of this additional research was to gain a detailed insight into their performance. The results are presented in Figure 7. Based on the analysis of the results, it can be concluded that the Dilithium algorithms achieve better performance even for relatively small signed data sizes. In accordance with intuition and measurements on larger files, the Falcon-1024 algorithm performed almost twice as long as its Falcon-512 equivalent due to the twice-as-long key. Figures 8-10 show the average verification time for signed files of 10 MB, 100 MB, and 1 GB, respectively. Figure 8 referring to the case with the smallest file size presents that the Dilithium algorithms performed the worst, which is completely different from the previous results. In this case, the SPHINCS+SHA2-192 and SPHINCS+SHA2-256 algorithms achieved the best result. The SPHINCS+ algorithm based on the SHAKE hash function achieved comparable results regardless of the key size. In the operation involving a 100 MB file as shown in Figure 9, the SPHINCS+SHAKE-256s-simple algorithm recorded the longest duration. The trio of SPHINCS+SHA2 algorithms also showed slight variations. However, apart from that, the results were relatively comparable. The results shown in Figure 10 (1 GB file) were the most consistent across all evaluated scenarios. The outlier  
Figure 3: Average key generation time. was a set of four algorithms from the SPHINCS+ group, specifically two variants each of SPHINCS+SHA2-192 and SPHINCS+SHA2-256, which recorded significantly improved results over the other tested examples.