As a quick reminder, a logarithm is, in general, an "inverse exponentiation". That is, if
A discrete logarithm is in contrast to a normal, or continuous, logarithm. It's discrete nature means it's dealing with integers (as opposed to real numbers) and that you are working with modulo's, and therefore in a particular group, or field of numbers (e.g.,
As it turns out, no efficient algorithm is known for calculating discrete logarithms (except for Shor's quantum algorithm, though it is allegedly infeasible for the foreseeable future (see cryptography#post-quantum cryptography)). This is known as the "discrete logarithm problem". The most efficient methods seem to be (according to the Wikipedia page) based on the naive strategy of brute-forcing the answer. That is, if you were trying to find
It is pretty mind blowing how such a simple-to-express problem is not computationally feasible to solve. The sniffer, Z from above, can know
I won't do better than the explanation on Wikipedia: DHKE: Cryptographic Explanation, but I'll try anyways.