Abstract
Classic McEliece is a leading candidate for post-quantum cryptography (PQC) due to its long-standing security profile. However, its high computational and memory overhead makes it challenging to implement efficiently on ARM-based mobile and edge devices. This paper introduces RACE (Rapid ARM Cryptographic Engine), a framework designed to accelerate Classic McEliece on ARMv8 architectures. By employing NEON SIMD instructions, novel algorithmic fusions like LUP decomposition, and batch-loading strategies, RACE achieves significant performance improvements across all phases of the Key Encapsulation Mechanism (KEM), outperforming standard libraries by orders of magnitude in decapsulation.
Introduction
As quantum computing matures, the vulnerability of traditional public-key encryption (RSA, ECC) necessitates a transition to Post-Quantum Cryptography (PQC). Classic McEliece stands out for its security but suffers from large public keys and intensive matrix operations. While x86 platforms benefit from AVX optimizations, the ARM ecosystem—dominant in mobile and IoT—has lacked a highly optimized, architecture-aware implementation. RACE addresses this gap by providing a systematic acceleration framework for ARMv8.
The RACE Framework
The RACE framework targets the specific bottlenecks within the three phases of the Classic McEliece Key Encapsulation Mechanism (KEM): Key Generation, Encapsulation, and Decapsulation.
Key Generation
RACE replaces standard Gaussian elimination with LUP decomposition using an "implicit data layout." This approach allows the lower (L) and upper (U) triangular matrices to be stored within the original matrix space, significantly reducing memory overhead. ARM NEON SIMD instructions are utilized to vectorize row-swapping and XOR operations.
Encapsulation
To mitigate the memory-intensive nature of matrix-vector multiplication, RACE introduces a batch-loading strategy. Multiple rows of the public key are processed simultaneously against a single loaded segment of the error vector, reducing redundant memory accesses by factors of 2 or 4.
Decapsulation
Decapsulation is the most complex phase, optimized through two primary fusion techniques:
- Inter-Multiplication Batch Parallelism (IMBP): This technique fuses two independent finite-field multiplications into a single NEON pipeline.
- Dual-Lane Butterfly Fusion (DLBF): This parallelizes "butterfly" operations in the Fast Fourier Transform (FFT) by processing adjacent units across the two 64-bit lanes of a 128-bit NEON register.
Architectural Optimizations
A core innovation in RACE is the exploitation of lane-level parallelism within ARM NEON registers. By treating 128-bit registers as two independent 64-bit lanes, RACE can fuse operations that are typically sequential.
This structural reorganization, combined with constant-time design principles, ensures both high performance and resistance to side-channel attacks.
Evaluation and Results
RACE was evaluated across standard NIST parameter sets on high-performance (Kunpeng 920) and consumer-grade (Apple M1, M2 Pro) ARMv8 platforms. Compared to the official "vec" implementation, RACE achieved:
- Key Generation: Speedups of 1.33× to 2.04×.
- Encapsulation: Improvements between 1.23× and 1.33×.
- Decapsulation: Speedups of 1.27× to 1.68×.
Most notably, RACE outperformed the liboqs library by several hundred times in decapsulation on the Apple M1, reducing execution time from nearly 100,000 microseconds to approximately 177 microseconds.
Conclusion
RACE demonstrates that through architecture-aware algorithmic design and SIMD exploitation, heavy PQC schemes like Classic McEliece can be made practical for the ARM ecosystem. Future work will explore energy consumption metrics and scaling these strategies to the wider Scalable Vector Extension (SVE) registers in newer ARM architectures.
Summary updated