TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Primes and Primality Testing

44 pointsby animeshkover 7 years ago

6 comments

hannobover 7 years ago
&quot;There&#x27;s no slick trick to check fast enough, whether or not a large number is prime. So much so that finding large prime numbers is one of the most challenging aspects of mathematics and computing.<p>This very fact, that large prime numbers are hard to find, is the basis of cryptography which is fundamental to cyber security.&quot;<p>That is simply flat out wrong.<p>What they probably are referring to is RSA. However the basis of RSA is not that it&#x27;s hard to find a large prime number. (Actually if that would be hard then RSA would be impossible, as it needs large primes for key generation.) The basis is that it&#x27;s hard to factorize a composite number.
评论 #15729284 未加载
评论 #15729467 未加载
btillyover 7 years ago
There is a mistake in the description of the Rabin-Miller test.<p>The test itself is deterministic. If you try it for more than half of the numbers in the range, it gives you an exact answer.<p>In practice we run it as a probabilistic test because we don&#x27;t want to test all of those numbers. :-)
评论 #15729511 未加载
coldcodeover 7 years ago
Primes have always fascinated me despite not being a mathematician. Counting numbers are regular yet the pattern of primes seems not to be (although there is a way of plotting them that makes pretty spiral like structures).
评论 #15729171 未加载
评论 #15729189 未加载
slitazover 7 years ago
Has typos.<p>Says that 199^883467 is difficult to factorise. Well, all 883467 factors are shown already.
评论 #15729340 未加载
finchiskoover 7 years ago
It might be late and me being tired, but isPrime function will return false for 1 and any other prime? Shouldn&#x27;t it be true when function is called isPrime?
评论 #15729568 未加载
mbidover 7 years ago
The two definitions of primality given in the beginning of the article are not equivalent -- one rules out 1, the other one doesn&#x27;t.
评论 #15729097 未加载