diffiehellman
Diffie-Hellman key exchange is a method for two parties to establish a shared secret over an insecure channel without prior arrangements. It relies on public parameters and the difficulty of the discrete logarithm problem to allow both sides to derive the same value independently.
In the classic finite-field version, the participants agree on a large prime p and a generator g
History and usage. Diffie and Hellman introduced the protocol in 1976, presenting a method for secure key
Security considerations. Diffie-Hellman assumes authenticated endpoints; without authentication, it is vulnerable to man-in-the-middle attacks. Proper parameter