Ask Your Question

How to check the primacy of large numbers [closed]

asked 2018-06-12 02:35:42 -0500

jackyjack gravatar image

In a Fedora terminal, what program can I use to verify the primacy of very large numbers?

ie. Those big enough for RSA

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by sideburns
close date 2018-06-12 12:21:28.330535



This question has nothing to do with Fedora and sounds like an attempt to get us to do your homework. Closing as not Fedora-related.

sideburns gravatar imagesideburns ( 2018-06-12 12:20:57 -0500 )edit

You are mistaken.

jackyjack gravatar imagejackyjack ( 2018-06-12 19:30:57 -0500 )edit

I am trying to use Fedora for my work, which is how it advertises itself. It is OK, I can go elsewhere for help.

jackyjack gravatar imagejackyjack ( 2018-06-12 19:31:40 -0500 )edit

Asking how to find large prime numbers in a terminal has nothing to do with Fedora. You would do it the same way in Ubuntu, Debian, Gentoo or Slack: write (or find) a program and run it. And I might point out that insulting a moderator isn't a good way to get an off-topic question re-opened.

sideburns gravatar imagesideburns ( 2018-06-12 19:46:30 -0500 )edit

BTW, I didn't close it because it looks like you were asking for homework help (that's allowed here) but because it's not Fedora related.

sideburns gravatar imagesideburns ( 2018-06-12 19:48:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-12 09:27:35 -0500

ed209 gravatar image

It is called primality, not primacy. For sure you don't have a computer powerful enough for your scope. However you could try this code in Python:

edit flag offensive delete link more


If compute power is a constraint, you could download a file that lists prime numbers and then write a simple script that looks up if your number is contained in the list of prime numbers.

florian gravatar imageflorian ( 2018-06-12 11:56:02 -0500 )edit

Probabilistic primality testing is very efficient. Embedded controllers, not to mention the OP's Fedora system, have plenty of power to generate their own secure keys, part of which is primality testing. If I had enough points, I'd downvote.

rickhg12hs12 gravatar imagerickhg12hs12 ( 2018-06-13 08:21:07 -0500 )edit

Question Tools

1 follower


Asked: 2018-06-12 02:35:42 -0500

Seen: 86 times

Last updated: Jun 12 '18