Look-up the Rainbow: Efficient Table-based Parallel Implementation of Rainbow Signature on 64-bit ARMv8 Processors
Speeds up Rainbow multivariate signature on 64-bit ARMv8 by replacing F16 polynomial multiplication with a 256-byte 4x4 table look-up using vector registers.
Schemes: Rainbow, Karatsuba
Findings (quotes checked against the source text)
-
A 256-byte look-up table of 4x4 F16 products replaces Karatsuba-based polynomial multiplication, giving large speedups on ARMv8.
In this paper, we propose an efficient implementation technique to improve performance of Rainbow signature schemes.
-
The table approach exploits the fact that F16 operands are 4-bit, so only 256 products need precomputing.
Since the maximum combinations of a $4 \times 4$ multiplication is only 256, we constructed a 256-byte look-up table.
-
Rainbow III and V, defined over F256, can use the F16 sub-field multiplication replacement, omitting many operations.
Therefore, the sub-field multiplication can be replaced with the proposed table look-up technique, which in turn omitted a significant number of operations.
-
On Apple M1, the multiplier speedup reaches 167.2x and full Rainbow signing/verification speedup reaches 51.6x versus prior implementation.
We have carried out the experiments on the Apple M1 processor, which shows up to 167.2$\times$ and 51.6$\times$ better performance enhancement at multiplier, and Rainbow signatures, respectively, compared to the previous implementation.
Numbers (as extracted, not quote-checked)
- Look-up table size: 256 bytes
- Bytes loaded per look-up: 16 bytes
- Max speedup, multiplier (Apple M1): 167.2x
- Max speedup, Rainbow signatures (Apple M1): 51.6x
For builders
If a PQ chain uses Rainbow, ARMv8 table-based F16 multiplication is a fast implementation option, but Rainbow is a broken-risk, non-standardized candidate, so treat this as a speed trick rather than a design choice.
Limits
Based on the ePrint abstract only; full text was not read. Targets ARMv8 Apple M1 benchmarks; Rainbow was a NIST finalist and is known to have been broken in its cryptanalysis history.