Abstract
With the increasing popularity and usage of cryptography and network security, prime generation and primality testing has become a significant issue. Various primality tests have been introduced in the past and we compare and contrast some popular primality tests and formulate our own results by implementing and testing them on a million numbers. Primality tests can be classified on the basis of whether they are general or specific, polynomial, deterministic or probabilistic and conditional or unconditional. We have considered AKS which is simultaneously general, polynomial, deterministic and unconditional while the other primality tests considered do not satisfy all these four properties simultaneously. Although AKS is an important algorithm theoretically, it is not used in practice due to it's poor performance versus the other primality test for large inputs. The results from our implementation show that Bailie-PSW performs the best while Fermat performs the poorest in probabilistic algorithms in terms of accuracy. AKS and Pocklington were found to perform as expected on the first five lakh numbers. Prime generation techniques are popular for generation of small primes. The most popular among these are the prime sieves. We implement, compare and contrast two of these namely, Sieve of Eratosthenes and Sieve of Sundaram on various ranges of numbers.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.