I see many (non cryptographic) hashes use prime numbers. Where can I find a list of primes that have 17-20digits? An unsigned 64 has 20digits (with the top 2 being 18) so I was thinking 19 digits would all fit and many 20 digits would be usable
Asked
Active
Viewed 74 times
3
-
You may get a better response on cryptography stack exchange. – reyna May 27 '22 at 17:40
-
Non need to refer to other pages. Just search. Here for example. – Dietrich Burde May 27 '22 at 18:27
-
@DietrichBurde why didn't you make it an answer? TYVM tho :) – Eric Stotch May 27 '22 at 18:30
-
6Estimating the number of primes with 17...20 decimals is $$\pi(10^{20})-\pi(10^{17})\approx 2.17\cdot10^{18}$$so that you won't find lists that are anywhere near to being complete. So you probably have additional criteria. Apart from that, the numbers are small enough that one can find such numbers easily, e.g. using Sage or similar (freely available) programming languages. – emacs drives me nuts May 27 '22 at 18:40
-
3If you need primes for crypto purposes, the way to do it would be to generate random integers, until you get a prime one. Primarity testing is cheap, and expected number of trials is ~linear in number of bits (by the Prime Number Theorem). – pmp May 27 '22 at 21:02