I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves.
Here is how DH works:
- Alice and Bob agree on a prime number $P$ and a generator $G$. (They use one from RFC 3526)
- Alice generates a long-enough (how long?) secret $S$ and calculates $R = G^S \pmod{P}$ and sends the result $R$ to Bob
- Bob does the same that Alice did in step 2.
- Alice and Bob exchange the values of $R$
- They both calculate $R^S \pmod{P}$ with the value send by the other party, and find the same value $SS$.
$SS$ is the Shared Secret.
How do points 1..4 differ when using elliptic curves?
What are the "equivalent" values of RFC 3526 for EC?