Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 1
    Note that GNU coreutils (like some other Unices such as Solaris) has factor but not primes (even though both were introduced in Unix v7 in the late 70s). FreeBSD factor seems to support larger numbers than GNU factor. ITYM primes 10 50 | xargs -n1 openssl prime instead of openssl prime primes 11 13 17 19 23 29 31 37 41 43 47 Commented Aug 5, 2017 at 13:55
  • 1
    Good find about openssl prime BTW. It doesn't seem to be documented. Even the help message with the version on my system doesn't mention the -generate/-bits option. To find out about the -checks option (20 by default as seen in the code), you need to look at the BN_is_prime_ex(3) man page that says it performs a Miller-Rabin probabilistic primality test with nchecks iterations. Commented Aug 5, 2017 at 14:16
  • The primes I have reports BSD Games Manual, so yes it should be from BSD (one of them). But it fails above 32 bits, it lists as primes numbers like 65539 square (4295360521). The number of incorrect primes grows as closer it gets to 64 bits. So, the (February 3, 2008) BSD primes has at least this (important) bug. @StéphaneChazelas Commented Aug 7, 2017 at 1:21
  • GNU factor support quite large numbers, from the manual: factoring the eighth Fermat number 2^{256}+1 takes about 20 seconds on the same machine. Assuming the large number option was compiled in (read info factor). Commented Aug 7, 2017 at 1:22
  • 1
    Really @StéphaneChazelas ? Open ssl 1.1.0 was released on (25 Aug 2016), close to a year ago. Openssl must be updated as soon as possible, there are many vulns to correct, it is presently at 1.1.0f, the fifth release of that version. Please update as soon as possible. And it is openssl prime, without the s. Commented Aug 7, 2017 at 17:05