Primality Testing
暂无分享,去创建一个
A great deal of modern cryptography is based on the fact that factoring is apparently hard. At least nobody has published a fast way to factor yet. Of course, certain numbers are easy to factor – numbers with small prime factors, for example. So often, for cryptographic purposes, we may want to generate very large prime numbers and multiply them together. How can we find large prime numbers? We are fortunate to find that prime numbers are pretty dense. (That is, there are an awful lot of them.) Let π(x) be the number of primes less than or equal to x. Then π(x) ≈ x lnx , or more exactly