Challenges
One modulus, two exponents
Cryptography
Medium
Common modulus
Solves: 7
One modulus, two exponents
Author: CyberSamSU
Points
35
Because the key generator repeated random numbers, two services received the same modulus n, but with different public exponents (e1 = 3 and e2 = 65537). The same message was sent to both.
If gcd(e1, e2) = 1, we find the Bezout coefficients: a·e1 + b·e2 = 1. Then c1^a · c2^b = m^(a·e1 + b·e2) = m mod n — the message is revealed without the private key!
n =
5067258516924559998123412845163930367933120122688858846728658862
0794655588913459281900326154161737378353094972009842447670853607
52538922759793823415485647
c1 = (with e1)
1458915999433123361531615736828058856178439088937673686934207572
9753055157721176476290597694559684703666484108163584439480539583
29021704511457279997441585
c2 = (with e2)
6160981293404467205578854311557653113754094415840179753862671076
6118593534945930641739714305064279561141057983157653579913831439
7445335265848635246033393
One of the Bezout coefficients will be negative — use the modular inverse for it: c^(-b) = (c^-1)^b mod n.
To submit a flag, log in.