An Elementary Method For Fast Modular Exponentiation With Factored Modulus
Abstract
We present a fast algorithm for modular exponentiation when the factorization of the modulus is known. Let a,n,m be positive integers and suppose m factors canonically as Πi=1k piei. Choose integer parameters ti∈ [1, ei] for 1 i k. Then we can compute the modular exponentiation anm in O((ei/ti)+Σi=1k ti pi) steps (i.e., modular operations). We go on to analyze this algorithm mathematically and programmatically, showing significant asymptotic improvement in specific cases. Specifically, for an infinite family of m we achieve a complexity of O( m) steps, much faster than the Repeated Squaring Algorithm, which has complexity O( m). Additionally, we extend our algorithm to matrices and hence general linear recurrences. The complexity is similar; with the same setup we can exponentiate matrices in GLd(Z/mZ) in less than O((ei/ti)+d2Σi=1k ti pi) steps. This improves Fiduccia's algorithm and the results of Bostan and Mori in the case of Z/mZ. We prove analogous results for Z/pkZ ring extensions.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.