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).
To submit a flag, log in.