An Efficient Modular Exponentiation Proof Scheme
We present an efficient proof scheme for any instance of left-to-right modular exponentiation, used in many computational tests for primality. Specifically, we show that for any $(a,n,r,m)$ the correctness of a computation $a^n\equiv r\pmod m$ can be proven and verified with an overhead negligible compared to the computational cost of the exponentiation. Our work generalizes the Gerbicz-Pietrzak proof scheme used when $n$ is a power of $2$, and has been successfully implemented at PrimeGrid, doubling the efficiency of distributed searches for primes.