On the Inversion Modulo a Power of an Integer
Guangwu Xu, Yunxiao Tian, and Bingxin Yang

TL;DR
This paper introduces a flexible and efficient algorithm for computing modular inverses modulo powers of any integer, extending existing methods and optimizing for computer architecture, with experimental validation.
Contribution
It generalizes modular inverse algorithms to any integer base, improving efficiency and flexibility, and explores implementation benefits using computer architecture features.
Findings
Significant performance improvements in modular inverse computations.
Successful generalization of existing algorithms to broader classes of moduli.
Experimental results demonstrate practical efficiency gains.
Abstract
Recently, Ko\c{c} proposed a neat and efficient algorithm for computing \[ x = a^{-1} \pmod {p^k} \] for a prime based on the exact solution of linear equations using -adic expansions. The algorithm requires only addition and right shift per step. In the first part of this paper, we design an algorithm that computes \[ x = a^{-1} \pmod {n^k} \] for any integers with . The algorithm has a motivation from the schoolbook multiplication and achieves both efficiency and generality. The greater flexibility of our algorithm is explored by utilizing the built-in arithmetic of computer architecture, e.g., , and experimental results show significant improvements. This paper also contains some results on modular inverse based on an alternative proof of correctness of Ko\c{c} algorithm. For the computation of modular inverses when the modulus is a special…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsPolynomial and algebraic computation · Cryptography and Residue Arithmetic · advanced mathematical theories
