Improved Constant-Time Modular Inversion
摘要
Constant-time modular inversion ( \(\textsf{CTMI}\) ) is a critical operation in secure elliptic curve cryptosystems. Existing \(\textsf{CTMI}\) algorithms include those by Bos, Bernstein and Yang, and Jin and Miyaji, denoted as \(\textsf{BOS}\) , \(\textsf{BY}\) , and \(\textsf{JM}\) . While \(\textsf{BOS}\) is constant-time, it incurs redundant computations in its iteration function. \(\textsf{BY}\) reduces iteration cost but increases the number of iterations, whereas \(\textsf{JM}\) balances both by incorporating a table-lookup function. We propose two new \(\textsf{CTMI}\) algorithms, \(\mathsf{KM_{1}}\) and \(\mathsf{KM_{2}}\) , that improve upon \(\textsf{JM}\) by reducing table lookups and lowering iteration count. We prove that their iteration count is reduced by two compared to \(\textsf{JM}\) , and we implement both algorithms for practical evaluation. Experiments over NIST prime fields (P192, P224, P256, P384, P512) show that \(\mathsf{KM_{1}}\) and \(\mathsf{KM_{2}}\) achieve fewer average clock cycles than existing \(\textsf{CTMI}\) algorithms. These results demonstrate that the proposed algorithms are efficient and secure choices for modular inversion in side-channel-resistant elliptic curve cryptography.