Rainbow on Cortex-M4
First Cortex-M4 implementation of Rainbow signatures on a 512 kB microcontroller, with bitsliced F16 arithmetic and faster public-map verification; beats Dilithium2 and Falcon on cycles.
Schemes: Rainbow, rainbowIclassic, Dilithium2, Falcon-512
Findings (quotes checked against the source text)
-
Rainbow signing on Cortex-M4 is about 4x faster than the state-of-the-art Dilithium2 implementation and 45x faster than Falcon-512.
Signing of rainbowIclassic requires roughly 957 000 clock cycles which is 4× faster than the state of the art Dilithium2 implementation and 45× faster than Falcon-512.
-
Verification takes about 239 000 cycles, 5x faster than Dilithium2 and 2x faster than Falcon-512.
Verification needs about 239 000 cycles which is 5× and 2× faster respectively.
-
A constant-time bitsliced F16 multiplication handles 32 field elements in 32 clock cycles.
We present fast constant-time bitsliced F_16 multiplication allowing multiplication of 32 field elements in 32 clock cycles.
-
The target platform has 512 kB of RAM, enough to hold RainbowI keys.
We target the Giant Gecko EFM32GG11B which comes with 512 kB of RAM which can easily accommodate the keys of RainbowI.
-
Storing the secret key in bitsliced form cuts signing cost by a further 20%.
The cost of signing can be further decreased by 20% when storing the secret key in a bitsliced representation.
Numbers (as extracted, not quote-checked)
- rainbowIclassic signing cycles on Cortex-M4: 957 000 clock cycles
- rainbowIclassic verification cycles on Cortex-M4: 239 000 cycles
- Speedup of signing vs Dilithium2: 4x
- Speedup of signing vs Falcon-512: 45x
- Target device RAM (EFM32GG11B): 512 kB
- Further signing cost reduction with bitsliced secret key: 20%
For builders
Multivariate Rainbow is a fast, small-footprint signature option for constrained devices, but its security is the bigger concern for a chain design.
Limits
Abstract only; no key or signature sizes shown. Rainbow was later broken by a 2022 key-recovery attack (outside this text), so these speeds do not imply a usable scheme.