Skip to main content
Challenges Common prime number (gcd)
Cryptography Easy RSA — weak RNG Solves: 14

Common prime number (gcd)

Author: CyberSamSU
Points
15

The RSA modulus n = p·q is the product of two large prime numbers. It cannot be factored quickly — if the primes are truly random. But on some devices, the random number generator (RNG) is weak and two different keys accidentally use the same prime number.

Two services used the following public moduli. They have one common prime number. If you find the common prime, both moduli will be factored immediately:

n1 =

1016200159319972552580895963998281786110156739925098319115525140
2596212968259760704814533788909636681402448702808297881680088195
409573129445324192658261989

n2 =

6006461512842586029681847805357728222333432651420152340091654987
4091647267816594491207498030750530854688061566390258668732049250
82273490212994180815668507

The public exponent is e = 65537. The flag is encrypted under n1:

c =

3184250678167689697744968536875038361653576076150513200389992299
8886760529631233723801593427569063212264504577241852371612156165
60875935775474379805003370

Evklid algoritmi (gcd) finds the common prime instantly: p = gcd(n1, n2).

Hints 2
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −1 pts Log in
Hint 2 −3 pts Log in
To submit a flag, log in.

First solvers

1. Абдул 08.09.2026
2. Лазиз 04.10.2026
3. Mirjaxon Qaxxarov 27.10.2026
4. Odam 06.11.2026
5. ya_d0na 11.11.2026
6. Doston Allayarov 12.11.2026
7. Jasmin Xuseinova 15.11.2026
8. akobir 15.11.2026
9. jasmina_05 16.11.2026
10. Zulxumor 19.11.2026