How would you make a 2048 bit prime number randomizer?

Also for my secret project!

1 Like

No one is replying. :frowning:
@Anonymous - help please

Could you explain to me what that is
I’m dumb

Very, very long prime number


2048 bit is around 600 characters. @Blackhole927 do you have advice?

So a randomizer choose a number between 1 and 1024; thats a prime number?

No - around 600 characters . Thats 599 zeros! Thats 2048 bit.

So you are making 2048 the game? Sorry Im a bit confused. Please add a summary of the game u are making.

Basically I need to find a prime number (randomized) which is at least this long - 300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

No I don’t think that is possiable. Its too long. Let me test.

Its a secret!

So you need to generate a random prime number that is between 0 and the 2048 bit max?

Much more above zero - try guessing, you are taking AP CSP right? How do you PM someone?

Yes I am.
So you’re looking for a large prime number, basically?
You can’t PM people on the forums if you want to message me, j0in the gimkit discord.

Maybe smth like this will work?

As a start.

That won’t generate a prime number.
That checks if a random number from 0 to 0 is prime.

Hmpf. Then Im lost. Srry cant help with this. All yours BH.

This is a bit of a difficult problem due to it being a real clay institute problem, or something along those lines. (Assuming you’re looking for a simple formula)

1 Like

The math for primes like this is much over my head, but here is a wikipedia article you may find useful:

(Also- what are you doing with cryptography lol)