I'm a bit confused why it's hard to break Diffie–Hellman
Let's take the example
ALICE has G, a, and n
BOB had G, b and n
Eve (the third party) succeded to intercept G, n, $G^a, G^b$
ALICE generate the key G^(ab) mod n
BOB generate same key G^ba mod n
What I don't understand is why Eve cant' get a or b
by knowing G^a and G^b
.?
For me he can just use dichotomy:
Eve will take a random number r_a
.
if G^r_a$ < G^a /* already known */
increase(r_a); /* by power ietration for example, +1 +100, +1000, +10000 */
else
decrease(r_a);
adjust(r_a);