ECDH and ECDSA
What you'll learn: How elliptic curves provide efficient, modern alternatives to traditional Diffie-Hellman key exchange and digital signatures.
The Core Idea
You've learned about Diffie-Hellman key exchange (where two parties create a shared secret over a public channel) and the mathematical foundations of elliptic curve cryptography. ECDH (Elliptic Curve Diffie-Hellman) and ECDSA (Elliptic Curve Digital Signature Algorithm) are simply elliptic curve variants of classic cryptographic protocols.
ECDH: Key Exchange with Elliptic Curves
Instead of using modular exponentiation with large prime numbers (traditional Diffie-Hellman), ECDH uses point multiplication on elliptic curves:
- Alice and Bob agree on a public elliptic curve and a base point G
- Alice picks a secret integer
aand computesA = a × G(a point on the curve) - Bob picks a secret integer
band computesB = b × G - They exchange their public points A and B
- Alice computes
a × Bwhile Bob computesb × A— these yield the same shared secret point due to the commutative property
The discrete logarithm problem on elliptic curves makes recovering a or b from the public points computationally infeasible.
ECDSA: Digital Signatures
ECDSA provides authentication and non-repudiation using elliptic curves. It's the elliptic curve equivalent of DSA (Digital Signature Algorithm). A signer uses their private key and the message to generate a signature pair (r, s), which anyone can verify using the signer's public key.
Why Use Elliptic Curve Variants?
Much smaller keys provide equivalent security: a 256-bit ECC key offers roughly the same protection as a 3072-bit RSA key, meaning faster computation and less bandwidth.
Key Takeaway: ECDH and ECDSA bring Diffie-Hellman key exchange and digital signatures to elliptic curves, offering the same security with dramatically smaller keys and better performance.