When someone collects lots of RSA public modulus, the first thing that comes to mind is;
$$\text{GCD them all}$$
If you calculate the GCD of two different RSA modulus and if the result is not 1 then you find one of the factors. This has been actively studied in
- 2012 - Heninger et. al Mining your Ps and Qs: Detection of Widespread Weak Keys in Network Devices
These researchers collected 5.8 million unique TLS certificates and 6.2 million unique SSH host keys. In the combined collection, there were 11 million distinct RSA moduli and they were able to factor 16,717 distinct public keys. I.e. breaking 23,576 (.4%) of their TLS certificates and 1,013 (.02%) of the RSA SSH host keys.
- 2012 - Lenstra et. al Ron was wrong, Whit is right
They collected 6.2 million digital certificates across the Internet they found that approximately 4.3% of these certificates fully share their RSA modulus with another.
- 2013 Bernstein et. al, Factoring RSA keys from certified smart cards: Coppersmith in the wild
The researchers investigate Taiwan’s national “Citizen Digital Certificate” database that contains more than two million RSA modulus. They have efficiently factored 184 distinct RSA keys. They are noticed that some of the primes occur more than was like p110 occurs 46-times. The reason was the flawed random-number generators in some of the smart cards.
- 2016 - Hasting et.al, Weak keys remain widespread in network devices
To see the response of the vendors and end-users, the authors examined 81 million distinct RSA keys and were able to factor 313,000 keys (.37%). They see that a significant number of new devices from Huawei, D-Link, and ADTRAN was vulnerable.
- 2016 Barbulescu at. al RSA Weak Public Keys available on the Internet
They crawled GitHub SSH-RSA keys between 22 December 2015 and 7 January 2016. They were only factor 1 with 512-bit. They also analyzed a ransomware database that contains 2048-bit RSA that contains none weakness.
From raw X.509 certificates collected during 2012, they tested 26177420 1024 bit RSA keys tested, 63502 (0.25%) keys were found to be factorized.
- 2018 - N. Amiet and Y. Romailler, researchers from Kudelski, Reaping and breaking keys at scale: when crypto meets big data.
They collected 340M RSA keys and 210k are broken. 1 key out of 1600 is vulnerable to batch-gcd by written by Chapel.
And recently;
- 2019 - Researchers at KeyFactor Factoring RSA Keys in the IoT Era
They scraped 75 million RSA certificates from the Internet between 2015 and 2017, a total of 250,000 could be completely broken. That is 1 in 172 shares a factor.
One solution to prevent the common factor is a public database. That is downloadable so that one can test their new modulus with the GCD. Of course, such a database has another issue. The reason that causes the same prime generation, the randomness process, can be exploited by some attackers. In any case, the attackers can scrape their database as researchers.
Questions:
Can A good random number generator solve this issue if we consider we are using RSA-2048 and let say we need 1 billion RSA modulus?
What is the probability that we can select a prime at least twice if we only consider 1024-bit numbers?
Why don't we generate the primes in different bit domains like 1024,1025,1026,1027-bit,...