Optimizing ML-KEM with OpenMP: A Multilevel Parallelization Study - Lagrota, Vinícius; Souza Neto, Tertuliano; Sousa, Thiago do Rêgo; Maia, Fábio (Anais do Simpósio Brasileiro de Cibersegurança (SBSeg); 2026: Anais do XXVI Simpósio Brasileiro de Cibersegurança, 2026)
In this work, we present libcesarpq, a cryptographic library that integrates an optimized implementation of the post-quantum Key Encapsulation Mechanism ML-KEM. We perform a detailed analysis of the algorithm’s source code to identify opportunities for parallelization using OpenMP directives. We show that, since most core ML-KEM functions have very short execution time, the overhead introduced can severely limit performance gain. Therefore, we evaluate different parallelization strategies at both the core-layer functions and the API-layer, as well as the batched API-layer. The results are compared with the widely used post-quantum library liboqs in both single-threaded and multithreaded environments, showing comparable performance on the x86-64 platform and a performance advantage for libcesarpq on the optimized aarch64 platform.