Bilibili Tech
Aug 23, 2022 · Information Security
Constant-Time Implementation and Optimization of SM2 Finite Field Inversion
The article analyzes constant‑time computation of the multiplicative inverse in SM2’s prime field, compares the variable‑time Extended Euclidean Algorithm with a constant‑time Fermat‑based square‑and‑multiply exponentiation, optimizes the fixed exponent using add‑chain generation, and shows this reduces multiplications from ~187 to ~41, making inversion the dominant cost in secure SM2 signing.
Fermat's little theoremGoSM2
0 likes · 12 min read