Skip to content
Series 7 · The cryptography of signatures · 7.3

Elliptic curves without fear.

Adding points, multiplying by a number and understanding why 256 bits are enough where RSA needs 3072.

October 202610 min read

In 1985, Victor Miller at IBM and Neal Koblitz at the University of Washington independently proposed the same idea: to base public key cryptography not on the numbers modulo a prime, but on the points of an elliptic curve. The proposal took almost twenty years to catch on, held back by patents, distrust of unfamiliar mathematics and the comfort of RSA. Today elliptic curves protect most of the secure connections on the internet, sign inside the electronic identity documents of many countries and authorize every transaction on the major blockchains.

The reason is a number. For equal security, a 256 bit elliptic curve key replaces a 3072 bit RSA key. This article explains where that difference comes from, starting with something as concrete as adding two points with a ruler.

What an elliptic curve is

Despite the name, it has nothing to do with an ellipse; the name comes from elliptic integrals, which led to their study in the nineteenth century. For cryptography, an elliptic curve is the set of points (x, y) satisfying a Weierstrass equation, plus an extra point called the point at infinity, O:

y² = x³ + a·x + b,   with 4a³ + 27b² ≠ 0
The condition on a and b guarantees that the curve has no cusps or self intersections, so that every point has a unique tangent.

The remarkable thing is that these points can be added, and the addition has every property one would expect: it is associative and commutative, it has an identity element and every point has an inverse. In other words, they form a group, the same algebraic structure as the numbers modulo p in the article on the foundations, with a different geometry.

The chord and tangent rule

To add two points P and Q, draw the line through both. A cubic cut by a line has, counting multiplicities, three intersections, so the line meets the curve at a third point R. The result is defined as the reflection of R across the horizontal axis. If P = Q, the tangent is used. If the line is vertical, the third point is O, which is why the inverse of (x, y) is (x, y).

λ = (y2 y1) / (x2 x1)   if P ≠ Q
λ = (3x1² + a) / (2y1)   if P = Q (tangent)
x3 = λ² x1 x2    y3 = λ(x1 x3) y1

That this operation is associative is far from obvious; the proof requires a fair amount of algebraic geometry. But it can be checked in the drawing. The lab lets you move the two points and see the full construction.

LabAdding two points on y² = x³ x + 1
Position of P
Position of Q
P
Q
slope λ
P + Q

From geometry to the finite field

Cryptography does not use the real numbers, which have infinite precision and exploitable continuous properties. It uses the same formulas with arithmetic modulo a prime p. Division is replaced by multiplication by the modular inverse. The curve stops being a line and becomes a cloud of points with integer coordinates, seemingly disordered, but with its group structure fully intact.

How many points does it have? Hasse’s theorem, from 1933, answers with remarkable precision: the number of points on the curve over the field of p elements differs from p + 1 by at most 2√p. For cryptography, curves are chosen whose number of points is prime, or a large prime times a small factor called the cofactor.

LabThe same idea over a finite field: y² = x³ + 2x + 2 modulo 17
k
k · G

Multiplying by a number, and the inverse problem

Adding a point to itself k times is written k · G and is called scalar multiplication. Doing it one addition at a time would be impractical for a 256 bit k, but the double and add method handles it with about 256 doublings and, on average, 128 additions, just like fast exponentiation in modular arithmetic.

Private key: a random number k, 1 ≤ k < n
Public key: the point Q = k · G
G is a generator point fixed by the standard and n is the number of points in the subgroup it generates. Finding k from G and Q is the elliptic curve discrete logarithm problem.

Here the decisive difference from RSA appears. For factoring integers or computing discrete logarithms modulo a prime there are subexponential algorithms, from the index calculus family, which exploit the fact that integers break down into small factors. Points on an elliptic curve have no useful notion of “small factors”. For well chosen curves, the best known attack remains generic: Pollard’s rho method, which needs about √n operations. With a 256 bit n, that is 2128.

SecurityElliptic curveRSA or finite field logarithmRatio
112 bits224 bits2048 bits1 to 9
128 bits256 bits3072 bits1 to 12
192 bits384 bits7680 bits1 to 20
256 bits512 bits15360 bits1 to 30

The gap widens with the security level because attacks on RSA are subexponential while attacks on curves are exponential. In practice, this means smaller keys and signatures, faster private key operations and lower power consumption, which is decisive in smart cards and mobile devices. An ECDSA signature over P 256 takes 64 bytes; an RSA signature of comparable strength, 384.

Not every curve will do

Security depends on choosing the curve well, and history records several traps.

The named curves

For all these reasons, nobody generates their own curve: standardized curves are used, with public, well studied parameters.

CurveOriginNotable features
P 256, P 384, P 521NIST, since 1999; now in SP 800 186The most widespread in certificates and in legally binding signatures. Their coefficients were derived from seeds run through SHA 1, with no explanation of where the seeds came from, which bred distrust; no weakness whatsoever is known.
secp256k1SECG, SEC 2A Koblitz curve, y² = x³ + 7. Known for its use in Bitcoin.
BrainpoolGerman consortium, RFC 5639Parameters generated verifiably from mathematical constants. Common in European identity documents.
Curve25519 and Ed25519Bernstein, 2006 and 2011; RFC 7748 and 8032Over the prime 2255 19. Designed to be fast and hard to implement badly: formulas with no special cases and constant time. NIST incorporated Ed25519 in FIPS 186 5 and Curve25519 in SP 800 186.
With RSA you choose a key size. With elliptic curves you choose a curve, and that choice is half of the security.

Curve25519 deserves a note of its own, because it changed how people think about design. Bernstein did not merely look for a curve with no known weaknesses, but for one in which every decision had a public justification, and in which the simplest implementation was also the secure one. Its signature variant, in Edwards form, has a “complete” addition law: the same formula works for adding, doubling and operating with the identity, with no branches that leak information through computation time. The next article in the series shows how this curve is used in EdDSA and why its signature is deterministic.

Key takeaways

The points of an elliptic curve form a group under the chord and tangent rule. Over a finite field, the private key is a number k and the public key is the point k · G; recovering k takes about √n operations because no subexponential shortcuts are known. That is why 256 bits suffice where RSA needs 3072. Security depends on using standardized curves and validating every received point.

Sources

  1. Miller, “Use of Elliptic Curves in Cryptography”, CRYPTO 1985
  2. Koblitz, “Elliptic Curve Cryptosystems”, Mathematics of Computation, 1987
  3. NIST, SP 800 57 Part 1 Rev. 5, Recommendation for Key Management, 2020
  4. NIST, SP 800 186, Recommendations for Discrete Logarithm Based Cryptography: Elliptic Curve Domain Parameters, 2023
  5. SECG, SEC 2: Recommended Elliptic Curve Domain Parameters, version 2.0, 2010
  6. IETF, RFC 5639, Elliptic Curve Cryptography (ECC) Brainpool Standard Curves and Curve Generation, 2010
  7. Bernstein, “Curve25519: new Diffie Hellman speed records”, PKC 2006
  8. IETF, RFC 7748, Elliptic Curves for Security, 2016

← All notes

Trust Notes

Articles for those who decide how an organization signs: principles, practices and criteria that hold up as rules and technologies change.

A publication of Signing Flows, by Interfase.

Series