Discrete logarithm/ solving Diffie Hellman?

224 Views Asked by At

First, apologies. I'm decent at math, but i don't have a degree in it. Please excuse any ignorance on my part. And if any of my math is wrong, please correct me!

So, for anyone not familiar with the diffie-hellman problem it is:

given the following:

  • g = can be any number (but usually 2, and known before hand)
  • p = an absurdly large, known prime
  • X = (ga % p)
  • Y = (gb % p)

where only a and b are unknown, find K = (g^ab) % p

Using simple math, I notice that all of the following are equal:

  • XY % p
  • (ga % p)gb % p % p
  • (gabg % p)
  • (gab % p)g % p
  • Kg % p

As long as all that math is correct, and the knowledge that Diffie-Hellman is still unsolved, that means this is the furthest you can get. the real question: when both g and p are known, what makes solving for K in (Kg % p) so difficult?