Regardless of my OS, good luck "rewinding"
iterated until reaching a prime, to give the private key (not shown). From which the public address, whose hash160 is prime too, is derived.
My knowledge in this topic is limited but the method to generate primes is not "iterate through numbers then check primality". Instead there are more efficient methods designed to quickly find prime numbers with a lot less effort.
https://en.wikipedia.org/wiki/Generation_of_primesThere is even a challenge to find the next "biggest" prime number to set a new record which is currently at 2
82589933−1 (a number which has 24,862,048 digits in base 10). In comparison 2
256 has 78 digits!
P.S. The problem with your "challenge" is that there is no reward involved since testnet coins have no value. So it can't prove anything.
You refer to so-called Mersenne primes, which indeed can be written like 2
n-1, where n is a positive integer (but not any positive integer). Fun fact: in base 2, all Mersenne primes are a (long) series of 1's.
In the strange game of finding very, very large primes, plugging in very large values for n in the Mersenne formula and testing for primality - in that order - is the way forward. Far from all primes are Mersenne, though.
In order to generate primes that are "only" 1-78 digits long (in base 10), you create a pseudorandom number and check it for primality. This is quicker than any other method. There is no known general formula for primes. Rather, a prime is a number that satisfies a certain set of criteria. (Why the number 1 is not prime is an interesting story in itself, if you like math.)
Also, this wasn't meant as a challenge, or a bounty, or the like. And, I am a little confused regarding testcoins - isn't this what they are for? Playing around with.
Further, I don't get why my OS is of interest here. My little script is Python 3, sure, but it runs equally well on Windows, Ubuntu, and macOS. These are the three I have tested it on. I am by no means a professional coder, but I don't like Python code that is "locked" to a certain OS.
RNG is very interesting, no doubt, but beside the point. OpenSSL is a nice library to create pseudorandom numbers, but there are other cryptographically sound methods and libraries too. The RNG in Bitcoin Core isn't fancier than this, and it is clearly good enough.
I thought it would be fun to see if I could come up with a method to create "perfect prime" Bitcoin key pairs, which - according to my own definition - means both the private key and public address (stripped of its script and presented as its hash160) are prime.
Nothing more. Just playing with math and applying it to Bitcoin.
If someone wants to take a look at my script, I can share it. The interest seems limited, and I'm totally cool with that.
All of this is just a result of my private fascination with primes and cryptography. The in my opinion utterly absurd story of
illegal primes led me into this.
That's all
Edit/addition: SSL-certificates (based on RSA) for webpages and PGP keys for encrypted email are "only" large primes (this is borderline overly simplified). The magic of
asymmetric encryption is a secret component, which is a very large prime, and a public component. Bitcoin uses
ECC instead of RSA, so I figured I'd try something with primes and Bitcoin - a recombination of different cryptographic methods experiment.