DOI: 10.3390/electronics15214896 ISSN: 2079-9292

An Optimized Cross-Platform PQC Implementation Using AVX2 Compiler Intrinsics

Charisee Zhi Ling Yip, Zhi Qian Seah, Huaqun Guo

Classical cryptographic standards such as RSA and ECC face existential threats from the advent of quantum computing, necessitating an urgent transition to quantum-resistant post-quantum cryptographic (PQC) algorithms. This article presents a cross-platform, AVX2-optimized implementation approach for PQC algorithms, achieving the performance optimization of platform-specific implementations and the portability of reference implementations. The core contribution is a systematic translation methodology that converts Linux AVX2 assembly routines written in AT&T syntax into C compiler intrinsics through an intermediate Intel syntax representation. This approach preserves 256-bit SIMD operations while enabling the optimized implementation to be compiled across supported operating environments. The methodology was applied to the ML-DSA algorithm, for which five AVX2 assembly routines were translated and integrated with the reference implementation, while an existing compiler-intrinsics implementation of ML-KEM was incorporated into the unified library. Functional validation was conducted using positive and negative test conditions, while cross-platform validation was performed by executing the same test program in both Windows and Linux environments and comparing the resulting outputs. Performance was evaluated using 20 runs of 300 iterations for each major cryptographic operation. The optimized implementation achieved more than threefold overall speed improvement for ML-DSA and more than twofold improvement for ML-KEM relative to their reference implementations, with selected operations exceeding fourfold improvement. The results demonstrate that compiler intrinsics can provide a practical approach for retaining AVX2-based performance optimization while improving the portability and integration of PQC implementations.

More from our Archive