Optimizing Authenticated Encryption: Enhancements and Performance Analysis of ChaCha20 and Blake3 Algorithms
摘要
This study investigates the optimization of authenticated encryption algorithms, focusing on ChaCha20 and Blake3. Our analysis demonstrates that the ChaCha20 single-threaded implementation achieves a notable 1.25× speedup over the libsodium library. The parallel version of ChaCha20 exhibits impressive scalability, reaching a peak throughput of 130 GB/s and showing linear speedups up to 32 threads, constrained by CPU memory bandwidth. In comparison, the Blake3 implementation, both single-threaded and parallelized, exhibits performance on par with the reference implementation. The stack approach for Blake3 offers substantial performance improvements over traditional methods, while the divide-and-conquer approach shows scalability with increasing core counts, promising efficiency for large-scale file sizes. Future research will explore advanced vectorization strategies, multi-CPU scalability, and thorough security analysis to further enhance performance and robustness.