Barrett Multiplication for Dilithium on Embedded Devices
Speeds up Dilithium NTTs on Cortex-M3 and 8-bit AVR using Barrett multiplication with improved high-multiplication emulation, giving constant- and variable-time implementations.
Schemes: Dilithium, ML-DSA, Barrett multiplication, Montgomery multiplication
Findings (quotes checked against the source text)
-
Barrett multiplication beats Montgomery when long or high multiplication instructions are unavailable or slow, which is the case on small embedded cores.
We first point out the benefit of Barrett multiplication when long and high multiplication instructions are unavailable, unusable, or slow.
-
Constant-time Barrett-based NTT/iNTT on Cortex-M3 is 1.38-1.51 times faster than state-of-the-art assembly implementations.
Compared to the state-of-the-art assembly-optimized implementations on Cortex-M3, our constant-time NTT/iNTT are 1.38−1.51 times faster and our variable-time NTT/iNTT are 1.10−1.21 times faster.
-
On 8-bit AVR, switching from Montgomery to Barrett in C yields 6.37-7.27x faster NTT/iNTT, and assembly yields 14.10-14.42x.
On our 8-bit AVR, we outperform Montgomery-based C implementations of NTT/iNTT by 6.37−7.27 times by simply switching to the proposed Barrett-based implementation.
-
On Cortex-M3, the assembly Dilithium implementation cuts signature generation cycles by 23.29% versus prior state of the art, but only 2.30% for key generation and 0.69% for verification.
Compared to the state-of-the-art assembly implementation on Cortex-M3, our assembly implementation reduces the key generation, signature generation, and signature verification cycles by 2.30%, 23.29%, and 0.69%.
Numbers (as extracted, not quote-checked)
- Constant-time NTT/iNTT speedup vs state-of-the-art Cortex-M3 assembly: 1.38-1.51x
- Variable-time NTT/iNTT speedup vs state-of-the-art Cortex-M3 assembly: 1.10-1.21x
- AVR Barrett C vs Montgomery C NTT/iNTT speedup: 6.37-7.27x
- AVR Barrett assembly vs Montgomery C NTT/iNTT speedup: 14.10-14.42x
- Cortex-M3 assembly signature generation cycle reduction: 23.29%
For builders
If a PQ chain's signers run on constrained hardware, Barrett-based NTT arithmetic is a cheap speedup worth considering for lattice signature implementations.
Limits
Targets only Cortex-M3 and 8-bit AVR embedded cores; results are cycle counts on those platforms; the paper is about implementation speed, not chain design, and the full text was not read here.