原书出处
Introduction to Algorithms, Fourth Edition
31 第31章 数论算法
tial operation in many primality-testing routines and in the RSA public-key cryptosystem.
The method of repeated squaring solves this problem efficiently. Repeated squaring is based on the following formula to compute ab for nonnegative integers a and b: The last case, where b is odd, reduces to the one of the first two cases, since if b is odd, then b − 1 is even. The recursive procedure MODULAR-EXPONENTIATION on the next page computes ab mod n using equation (31.34), but performing all
computations modulo n. The term “repeated squaring” comes from squaring the intermediate
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter031.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea