Establishing a shared secret over an insecure channel
Diffie-Hellman allows two parties to establish a shared secret over an insecure channel without prior key exchange. The security relies on the difficulty of the discrete logarithm problem - while computing g^a mod p is easy, recovering 'a' from the result is computationally infeasible for large numbers. This shared secret can then be used as a key for symmetric encryption like AES.