An Efficient Implementation of the Agrawal-Kayal-Saxena Primality Testing Algorithm For Very Large Numbers. A report on the research conducted to implement and compare the Agrawal-Kayal-Saxena polinomial time deterministic primality testing algorithm also known as cycotomic AKS Test.
Downloads
Full Report: Implementation of AKS Algorithm.pdf | Download |
Appendix A: NaiveMethods.jar | Download |
Appendix B: FermatTest.jar | Download |
Appendix C: AKSTestLarge.jar | Download |
Implementation of the Polynomial Time Deterministic Primality Testing Algorithm: AKS.pdf | Download |
Author Info
Abstract
Prime numbers are particularly important in ensuring security in networks and in computer systems. While prime numbers are easily defined, discovering a polynomial time deterministic algorithm for it required thousands of years of research. There are many ways of determining whether a number is a prime or not. In cryptography and in many other problems choosing very large prime numbers is important. It is known that factoring of an integer is NP-complete. But status of primality testing was unresolved till 2002 when Manindra Agrawal, Nitin Saxena and Neeraj Kayal found an elegant deterministic polynomial time algorithm. Along with the slower algorithms a faster solution like the Fermat’s little test was devised and implemented. But all of them were probabilistic although quite efficient in practice. In this research the main emphasis has been given on the work of Agrawal et al [], and the algorithm has been implemented to compare its performance with already known algorithms.
Usage
The implementations and details can be downloaded and used from here. The implementations are the commonly used naive methods, fermat's little test both in randomized and non-randomized codes and finally the AKS implementation. The AKS alogrithm implementation is done with polynomial time algorithm in every steps and implemented for large numbers that has hundreds of digits.