Summary: | In applied cryptography, RSA is a typical asymmetric algorithm, which is used in electronic transaction and many other security scenarios. RSA needs to generate large random primes. Currently, primality test mostly depends on probabilistic algorithms, such as the Miller-Rabin primality testing algorithm. In 2002, Agrawal et al. published the Agrawal–Kayal–Saxena (AKS) primality testing algorithm, which is the first generic, polynomial, deterministic and non-hypothetical algorithm for primality test. This paper proves the necessary and sufficient condition for AKS primality test. An improved AKS algorithm is proposed using Fermat’s Little Theorem. The improved algorithm becomes an enhanced Miller-Rabin probabilistic algorithm, which can generate primes as fast as the Miller-Rabin algorithm does.
|