← back to crypto

Elliptic Curves

Wikipedia (CC BY-SA 4.0) ยท wpElliptic-curve cryptography

An elliptic curve is defined by y² = x³ + ax + b. Points on the curve form a group under geometric addition. Scalar multiplication in this group is easy; reversing it (the discrete log) is hard. This one-way door gives us public-key cryptography with keys 10x shorter than RSA.

The curve equation

An elliptic curve over the reals is the set of points (x, y) satisfying y² = x³ + ax + b, plus a special "point at infinity" that acts as the identity element. The curve must be non-singular: 4a³ + 27b² ≠ 0.

P Q R P+Q Line through P,Q hits curve at R. Reflect to get P+Q.

Point addition geometrically

To add points P and Q: draw a line through them. It intersects the curve at a third point R. Reflect R across the x-axis to get P+Q. When P = Q, use the tangent line instead. This operation is associative and commutative, making the points a group.

Scheme

Scalar multiplication

Scalar multiplication means adding a point to itself n times: nP = P + P + ... + P. Using double-and-add, this takes O(log n) steps. The reverse problem, finding n given P and nP, is the elliptic curve discrete logarithm problem (ECDLP). No efficient algorithm is known.

Scheme

ECDH key exchange

Elliptic Curve Diffie-Hellman works the same way as classical DH, but in the elliptic curve group. Alice picks secret a, publishes aG. Bob picks secret b, publishes bG. Both compute abG = baG. An eavesdropper sees G, aG, bG but cannot compute abG without solving ECDLP.

Scheme

Why ECC is more efficient than RSA

A 256-bit ECC key provides roughly the same security as a 3072-bit RSA key. Shorter keys mean faster computation, less bandwidth, and smaller certificates. The reason: the best known attack on ECDLP (Pollard's rho) runs in O(√n) time, while the best attack on RSA's factoring problem (number field sieve) runs in sub-exponential time. ECC's problem is harder per bit.

Security level RSA key size ECC key size Ratio
80 bit10241606:1
128 bit307225612:1
192 bit768038420:1
256 bit1536051230:1
Neighbors

This series

Foundations (Wikipedia)