07 / 11 · Modern cryptography
Elliptic curves
Add points on a curve: easy forward, hopeless backward, with keys 12 times shorter than RSA.
- Proposed
- 1985, Koblitz & Miller
- Hard problem
- Elliptic-curve discrete log
- Used in
- TLS 1.3, SSH, Signal, Bitcoin
In 1985 Neal Koblitz and Victor Miller independently proposed building public-key cryptography on elliptic curves. The idea is Diffie–Hellman's, moved to a different group: instead of multiplying numbers modulo a prime, you add points on a curve.
The payoff is size. No attack on a well-chosen curve does much better than generic search, so 256-bit keys give about 128-bit security, where RSA needs 3072 bits. Today most TLS 1.3 connections, SSH sessions and messaging apps agree on keys with a curve.
a = −1, b = 1 → 4a³ + 27b² = 23 ≠ 0
no cusp, no crossing
01 / 14 · Inside elliptic curves
Not an ellipse: a cubic
An elliptic curve is every point (x, y) with y² = x³ + ax + b; here a = −1 and b = 1. Because y is squared, the curve is a mirror image of itself across the x-axis. It must be smooth, with no cusp and no self-crossing: the test is below.
On a curve with a cusp or a crossing, the point arithmetic that follows collapses into ordinary arithmetic where the hard problem becomes easy.
How it works
- 1A curve y² = x³ + ax + b is taken over the integers modulo a large prime p. Its points, plus a point at infinity, form a group.
- 2Adding P and Q: draw the line through them, take the third point where it meets the curve, and reflect it across the x-axis. Mod p, the same formulas are used, with division replaced by a modular inverse.
- 3A private key is a number k; the public key is k·G, a fixed base point G added to itself k times, computed with double-and-add in about 2 log₂ k operations.
- 4In ECDH, Alice sends A = a·G and Bob sends B = b·G. Alice computes a·B, Bob computes b·A, and both get ab·G, whose x-coordinate becomes the shared secret.
Why it holds
- One-way hops
- Computing k·G takes a few hundred point operations, even for 256-bit k. Recovering k from k·G, the elliptic-curve discrete logarithm, has no known efficient algorithm on classical computers.
- No sub-exponential shortcut
- Factoring and classic discrete logarithms fall to the number field sieve. On good curves, the best known attack is still Pollard's rho, about √n steps: around 2¹²⁶ for Curve25519.
- Small and fast
- A Curve25519 key is 32 bytes against 384 bytes for RSA-3072, and key generation is far faster. That suits TLS handshakes, phones and smart cards.
What can go wrong
- Fragile implementations
- ECDSA leaks the private key if a signature nonce is ever reused or predictable: that is how Sony's PS3 signing key was recovered in 2010. Unvalidated points and non-constant-time code have broken others. Curve25519 and Ed25519 were designed to avoid these traps.
- Quantum computers
- Shor's algorithm solves the elliptic-curve discrete logarithm too, and estimates suggest it would need fewer qubits than for RSA-2048. TLS is therefore moving to hybrid exchanges such as X25519 with ML-KEM.