Abstract
As the era of large-scale quantum computing approaches, traditional public-key cryptography faces an existential threat. This paper presents a significant performance optimization for Rainbow, a leading candidate in the NIST Post-Quantum Cryptography (PQC) standardization project. By leveraging specialized hardware instructions found in modern Intel processors, the authors demonstrate how to drastically reduce the computational overhead of this signature scheme, achieving speedups of up to 4.7x for signing.
Introduction
NIST is currently selecting "quantum-resistant" algorithms to replace RSA and ECC. One such candidate is Rainbow, a signature scheme based on the complexity of solving multivariate quadratic equations. While Rainbow offers small signature sizes and relatively fast operations, its performance relies heavily on arithmetic in the finite field $GF(2^8)$. Existing implementations often use software-based tricks that leave a performance gap on modern hardware. This work bridges that gap by using dedicated hardware acceleration for Galois Field operations.
Optimization Strategies
The researchers focused on the IIIc-Classic variant of Rainbow, implementing several key optimizations:
Hardware Acceleration and Field Representation
The authors utilized new instructions available on Intel "Ice Lake" processors, specifically Galois Field New Instructions (GF-NI) like VGF2P8MULB. However, these instructions are designed for the "AES field" representation ($F_{AES}$), while Rainbow typically uses a "tower field" representation ($F_{Tower}$).
To resolve this, the authors developed efficient 8x8 bit-matrix transformations to convert elements between these two representations. Because all representations of $GF(2^8)$ are isomorphic, the choice of representation is purely an implementation detail that can be optimized for hardware without compromising security.
AVX512 and Manual Pipelining
Rainbow’s computations often involve 72-byte rows. Since AVX512 registers are 64 bytes wide, the authors used AVX512 masking to handle the "remainder" of these rows efficiently. Furthermore, they found that hand-written assembly-level pipelining provided superior performance over standard compiler optimizations by better utilizing the processor's execution units.
Performance Evaluation
The authors compared their optimized versions (Impl1 through Impl4) against the original NIST Round-2 baseline. Performance was measured in CPU cycles on an Intel Core i7-1065G7 processor.
As shown in the results table, the most optimized version (Impl4) yielded dramatic improvements:
- Signing: Achieved a 4.7x speedup, reducing cycles from approximately 699k to 143k.
- Key Generation: Achieved a 2.44x speedup, reducing cycles from 102M to 41.8M.
- Verification: Achieved a 2.13x speedup, reducing cycles from 106k to 50k.
Conclusion
The results demonstrate that the overhead of converting between field representations is negligible compared to the massive speedup gained by using hardware-native instructions. The authors recommend that the Rainbow team consider adopting the $F_{AES}$ representation as part of official modifications to make the scheme natively faster on modern hardware. While these speedups are currently specific to newer Intel architectures supporting GF-NI, they highlight the potential for hardware-software co-design in the post-quantum era.
Summary updated