Yes, Elliptic Curve Diffie-Hellman is very much like Diffie-Hellman, but it uses a different math basis for the same "using paint" algorithm.
Classic Diffie-Hellman is a based on Finite Field Cryptography (FFC), with the formula s = mod(exp(mod(exp(g, a), p), b), p)
(which produces the same value if a and b are flipped). That's a fairly unfriendly formula.
EC Diffie-Hellman is based on Elliptic Curve Cryptography (ECC), with the formula s = a*b*G
, which only requires believing in the commutativity of multiplication to understand why it works (only the X coordinate is used in the end, and... of course, the actual math of multiplying by G
is pretty ugly; but both a
and b
are just (large) integers).
To use the paint colors analogy of classic DH:
- A common curve is used by both parties. Every "curve" in ECC has an established start point (
G
=generator); to compare with the Wikipedia picture, call it yellow.
- Alice has a private key,
a
, that says how many times to let the Press Your Luck game board advance around the color wheel. The selected color combined with G produces the color peach.
- Bob has a private key,
b
. Using the Press Your Luck analogy he gets light blue after combining with G.
Just like the classic DH picture, merging Alice's peach with Bob's secret Press Your Luck color produces the same color as merging Bob's light blue with Alice's secret Press Your Luck color.
For mathy reasons, ECC keys are more "densely secure". So a 160-bit ECC DH key is as secure as a 1024-bit FFC DH key. So it lets the same security go much more quickly, which is why ECDH is replacing DH and ECDSA is replacing DSA. Using the more common secp256r1 curve (which uses 256-bit ECC keys) it gains up to the equivalence of a 3072-bit FFC DH key.