← All challenges
Diffie-Hellman & ECC·medium·40 pts
Intercepted Exchange
You've intercepted a Diffie-Hellman public value. Recover the private exponent behind it.
You've captured one side of a Diffie-Hellman exchange: the prime, the generator, and the public value. The private exponent itself was never transmitted — that's the whole point of DH. Recover it anyway.
Brute force from zero will take too long. There's a faster way.
p
1000000007
g
5
h (= g^x mod p)
208627527
Hints
Checked entirely in your browser — nothing you submit here leaves your device.
Background on this technique
Up next
A Suspicious Generator →An active attacker swapped the generator before the exchange completed. The shared secret only has two possible values now.