Why is ECDH better than DH?
ECDH is a more flexible and easier to use alternative to Diffie-Hellman.
DH is used as an example of this article.
For a full definition of what Diffie-Hellman does and why it is useful, read this Wikipedia article on Diffie-Hellman Key Exchange. Diffie-Hellman has several problems which made me start using ECDH instead: it requires key generation, that is, you need a party who is willing to share its public key (or a trusted third party). It is really complicated, it requires a lot of maths. You can easily get security issues when you get stuck with the key generation step and have to trust someone (eg: if they use a weak random number generator). If we take the above problems as security holes in Diffie-Hellman, then ECDH solves these problems: it doesn't require key generation, so no parties have to be trusted. We don't need to worry about the complex maths. We don't need to make extra effort or run through extra hoops to avoid security issues (because we can use existing libraries and rely on them for security). There is plenty of academic research into ECDH, and it can be used to secure a lot of different applications. We use ECDH to secure things like TLS connection, WebSockets connections and our own application protocol we call "Pidgin-C". We use ECDH to connect to services too: we use OAuth 1.0a for Twitter and Facebook (and also have tried using ECDSA).
ECDH is more flexible and easier to use than DH. You may notice from the above bullet list that ECDH has many of the problems DH had! Why are we switching? The way we explain it is that Diffie-Hellman was invented because it was too complicated for non-experts to use. We want to let people use ECDH for whatever applications they want to use it for.
The main use for ECDH is in applications where you want to use a shared secret for security, such as WebSockets or Twitter OAuth (to use the above two as examples). There are also other use cases where you would use ECDH, even if it's not completely suitable (notably, it is more widely used in TLS).
What is the difference between Diffie-Hellman and ECC?
Diffie-Hellman is named after Whitfield Diffie and Martin Hellman.
Both the Whitfield Diffie National Security Agency (NSA) and Martin Hellman contributed to theory of public key cryptography, that led to the development of Diffie-Hellman Key Exchange (DHKE).
ECD is named after Edmund Diffie and Victor Miller who came up with ECDHE (Edmund Diffie-Hellman Ephemeral cipher). This is an EC-based variant of Diffie-Hellman keying.
Diffie-Hellman was originally conceived by Diffie and Hellman for secure authentication and key exchange (for symmetric encryption), but was later applied for its original purpose of ensuring the non-repudiation of electronic communications. The Diffie-Hellman protocol was published in 1978 (or 1976, depending on whom you ask) and published a patent for the application to communication in 1982.
While the algorithm has undergone several improvements in theory and practice since it was first published, it is still one of the most popular public-key algorithm, and has been adopted by most standards governing communications. For example, IEEE 802.11 wireless networking equipment includes Diffie-Hellman.
Note that "ECD" and "ECCH" are often used interchangeably and confusingly; ECD relies on the same underlying curve as DHKE. Diffie & Hellman themselves used "ECDHE", to contrast it with "EKE" ("Elliptic curve key exchange") which is another public key based on elliptic curve group.
The Diffie-Hellman protocol is a key exchange mechanism where two parties can compute a shared secret to be used for some time and securely exchanged without additional communication between them. A typical scenario where Diffie-Hellman protocol is used is when Alice and Bob are participants in a secure communications exchange with third party. In this scenario, Alice and Bob wish to exchange a symmetric encryption key that both parties know beforehand and does not need to be revealed to the third party. They negotiate over a public key.
Diffie and Hellman came up with a way to accomplish this without exposing Alice and Bob's public key.
Related Answers
Is ECDSA better than RSA?
I'm going to buy a phone with a screen as soon as they start getting good enough, b...
Is there a free program to convert PDF to Excel?
I've seen a few programs that are supposed to be able to c...
Is Diffie-Hellman still used?
As we discussed earlier, Diffie-Hellman is an asymmetric key exchange a...