Research Article

Crystals-Dilithium on ARMv8

Algorithm 5

Butterfly method on the NEON engine.
(1)Input:in1, in2             ⊳ 8 (in1:4, int2:4) coefficient on NEON
(2)Output: out1, out2             ⊳ 8 (out1:4, out2:4) coefficient on NEON
(3)// Zetas(twiddle factor) multiplication
(4)             ⊳ in2 (2 coefficient ) zetas
(5)             ⊳ in2 (2 coefficient ) zetas
(6)// Masking
(7)             ⊳ Narrow Extract(Lower)
(8)             ⊳ Narrow Extract(Upper)
(9)// Montgomery reduction
(10)             ⊳ in2 (4 coefficient)
(11)             ⊳ (2 coefficient )
(12)             ⊳
(13)             ⊳ (2 coefficient )
(14)             ⊳
(15)// Masking, Addition, and Subtraction
(16)             ⊳ Narrow Extract ( : Lower)
(17)             ⊳ Narrow Extract ( :Upper)
(18)             ⊳ Addition of Butterfly
(19)             ⊳ subtraction of Butterfly