← Wiki Index / Computation & Algorithms / Elliptic-Curve Cryptography
💻 Computation & Algorithms

Elliptic-Curve Cryptography

Elliptic-curve cryptography (ECC) is an asymmetric public-key cryptographic framework based on the algebraic group structure of elliptic curves over finite fields and the computational intractability of the Elliptic Curve Discrete Logarithm Problem (ECDLP).

Elliptic-curve cryptography (ECC) is an approach to asymmetric public-key cryptography in computation and algorithms based on the algebraic structure of elliptic curves defined over finite fields. Proposed independently in 1985 by Neal Koblitz at the University of Washington and Victor S. Miller at the IBM Thomas J. Watson Research Center, ECC replaces the multiplicative group of integers modulo a large prime p (used in classic Diffie–Hellman and DSA) and the ring of integers modulo a composite product N = pq (used in RSA) with the finite abelian group of rational points E(Fq) on a plane cubic curve.

In computational complexity theory, the security of RSA and finite-field Diffie–Hellman is governed by the General Number Field Sieve (GNFS), an index-calculus algorithm that factors composite integers and computes multiplicative discrete logarithms in subpolynomial LN[1/3, (64/9)1/3] time, forcing RSA keys to grow to 3,072–15,360 bits to maintain 128–256 bits of cryptographic security. By contrast, generic prime-field elliptic curves possess no natural "smoothness" basis for index calculus; consequently, the fastest known classical algorithm for solving the Elliptic Curve Discrete Logarithm Problem (ECDLP) is John M. Pollard's 1978 rho collision walk, which requires O(√n) ≈ 2b/2 group operations on a b-bit prime subgroup of order n. A 256-bit elliptic-curve key therefore provides comparable classical security to a 3,072-bit RSA key while reducing key sizes by 12× and accelerating signature generation and TLS key exchange by an order of magnitude.

Algebraic Geometry of Elliptic Curves over Finite Fields

Short Weierstrass Equation and Non-Singularity

Let Fp = Z/(*p*Z) be a prime finite field of characteristic p > 3. An elliptic curve E over Fp is the locus of affine coordinate pairs (x, y) ∈ Fp × Fp satisfying the short Weierstrass equation:

y2 ≡ x3 + ax + b (mod p)

together with a distinguished projective point at infinity, denoted 𝒪 (which serves as the neutral identity element of the group), where the coefficients a, b ∈ Fp must satisfy the non-zero discriminant condition:

Δ = −16 · (4a3 + 27*b*2) ≢ 0 (mod p)

The condition 4a3 + 27*b*2 ≢ 0 (mod p) guarantees that the cubic polynomial x3 + ax + b has three distinct roots in the algebraic closure of Fp, ensuring that the curve is smooth (non-singular) with no self-intersecting node or cusp. (If Δ ≡ 0 mod p, the group of smooth points degenerates isomorphically into either the multiplicative group Fp× or the additive group (Fp, +), rendering the discrete logarithm easy to solve.)

The Chord-and-Tangent Abelian Group Law

By Bézout's theorem in projective algebraic geometry, any projective line intersects a cubic curve in three points counted with multiplicity. This geometric incidence defines an associative, commutative binary operation + on E(Fp) known as the chord-and-tangent rule: if three points P, Q, R′ ∈ E(Fp) are collinear, their sum is defined to be the identity (P + Q + R′ = 𝒪), so P + Q = −R′ is obtained by reflecting the third intersection point R′ across the x-axis.

In affine coordinates over Fp, for any two non-identity points P = (x1, y1) and Q = (x2, y2):

  1. Identity and Inverse: P + 𝒪 = 𝒪 + P = P, and the additive inverse of P = (x1, y1) is −P = (x1, −y1 mod p), since the vertical line x = x1 passes through P, −P, and 𝒪.
  2. Point Addition (P ≠ ±Q, so x1 ≢ x2 mod p): The secant chord through P and Q has modular slope:

λ = (y2 − y1) · (x2 − x1)−1 mod p

  1. Point Doubling (P = Q and y1 ≢ 0 mod p): Implicit differentiation of y2 = x3 + ax + b gives 2y dy = (3x2 + a) dx, so the tangent line at P has modular slope:

λ = (3x12 + a) · (2y1)−1 mod p

  1. Coordinates of R = P + Q = (x3, y3): Substituting y = λ(x − x1) + y1 into the cubic equation and applying Vieta's root-sum formula yields:

x3 = (λ2 − x1 − x2) mod p y3 = (λ(x1 − x3) − y1) mod p

To avoid computing costly modular multiplicative inverses (z−1 mod p via the extended Euclidean algorithm) at every intermediate addition, high-speed implementations represent points in Jacobian projective coordinates (X : Y : Z) where x = X / Z2 and y = Y / Z3, deferring a single modular inversion to the end of scalar multiplication.

Hasse's Theorem and Group Order (N = h · n)

How many points lie on E(Fp)? Because roughly half of the p elements of Fp are quadratic residues modulo p (each yielding two square roots ±y), the point count N = |E(Fp)| stays close to p + 1. Specifically, Hasse's theorem on elliptic curves (proved by Helmut Hasse in 1936, the Riemann hypothesis for function fields of genus 1) states that:

| N − (p + 1) | ≤ 2√p

In 1985, René Schoof discovered a deterministic polynomial-time algorithm (the Schoof–Elkies–Atkin [SEA] algorithm) that computes the group cardinality N = |E(Fp)| for 256-bit primes in milliseconds by evaluating the Frobenius endomorphism modulo small primes ℓ. Cryptographic standards select curves whose total order factors as N = h · n, where n is a large prime and the cofactor h ∈ {1, 4, 8} is tiny.

Scalar Multiplication, ECDLP, and Pollard's Rho Bound

Given a public base generator point G ∈ E(Fp) of large prime order n and a secret integer scalar k ∈ {1, 2, ..., n − 1}, scalar multiplication computes the k-fold point sum:

Q = kG = G + G + ··· + G (k times)

Using binary double-and-add or Peter L. Montgomery's constant-time Montgomery ladder (which executes one point addition and one point doubling per bit of k regardless of whether the bit is 0 or 1), computing Q = kG requires only Θ(log n) field operations.

Conversely, the Elliptic Curve Discrete Logarithm Problem (ECDLP) asks: given the curve parameters, base point G, and public key point Q = kG, recover the private scalar k ≡ logG(Q) (mod n). For safe curves (avoiding anomalous curves with N = p where Smart's p-adic attack runs in linear time, and supersingular curves with N = p + 1 where the Menezes–Okamoto–Vanstone [MOV] Weil-pairing reduction embeds E(Fp) into Fp2×), the fastest classical attack is Pollard's rho method. By iterating a pseudorandom partition walk Wi+1 = f(Wi) = aiG + biQ via a Monte Carlo method birthday paradox collision (aiG + biQ = ajG + bjQ, yielding k ≡ (ai − aj)(bj − bi)−1 mod n), Pollard's rho requires an expected √(πn / 2) ≈ 0.886 · 2b/2 point additions for a b-bit prime n.

Symmetric Security Level (Bits)Classical Pollard's Rho OperationsElliptic-Curve Key Size (b = log2 n)Equivalent RSA / Diffie–Hellman Modulus SizeKey Size Ratio (RSA : ECC)
128-bit (AES-128)~2128 group operations256 bits (Curve25519, NIST P-256, secp256k1)3,072 bits12 : 1
192-bit (AES-192)~2192 group operations384 bits (NIST P-384)7,680 bits20 : 1
256-bit (AES-256)~2256 group operations512–521 bits (Curve448, NIST P-521)15,360 bits30 : 1

ECDH, ECDSA, Curve25519, and Post-Quantum Transition

Core Cryptographic Protocols: ECDH and ECDSA / EdDSA

  1. Elliptic-Curve Diffie–Hellman (ECDH / X25519): Alice generates secret scalar dA and sends public point QA = dAG; Bob generates secret scalar dB and sends public point QB = dBG. Both parties independently compute the shared secret point S = dAQB = dBQA = (dAdB)G and pass its x-coordinate through a key derivation function (HKDF).
  2. ECDSA and EdDSA Digital Signatures: To sign a message digest h = H(m) with private key dA, the signer draws an ephemeral scalar k ∈ [1, n − 1] (in EdDSA / RFC 8032, k is derived deterministically by hashing the private key and message m so that nonce reuse can never leak dA), computes R = (x1, y1) = kG, and outputs signature (r, s) where r = x1 mod n and s = k−1(h + r · dA) mod n.

Curve25519 (Montgomery Form) and Complete Edwards Curves

Because the Weierstrass addition formulas have conditional exception branches when P = Q (point doubling) or P = −Q (𝒪), naive software implementations can leak secret scalar bits through CPU branch-prediction and cache-timing side channels. In 2006, Daniel J. Bernstein introduced Curve25519, a Montgomery curve y2 = x3 + 486662*x*2 + x over the pseudo-Mersenne prime field p = 2255 − 19, alongside birationally equivalent twisted Edwards curves (ax2 + y2 = 1 + dx2y2, used in Ed25519). When the Edwards parameter d is a non-square modulo p, the Edwards addition law has zero exceptional points—a single unified polynomial formula adds any two points P, Q ∈ E(Fp) (including P = Q and P = 𝒪) in constant time with zero conditional branches.

Frequently Asked Questions

Why does a 256-bit elliptic curve provide the same classical security as a 3,072-bit RSA modulus?

An RSA modulus N = pq embeds inside the ring of integers Z, where smooth prime factorizations allow the General Number Field Sieve (GNFS) to build a linear system of congruences and factor N in subexponential time exp((1.923 + o(1))(ln N)1/3(ln ln N)2/3). Points on a prime-field elliptic curve have no notions of prime factorization or smoothness, forcing classical attackers back to generic group algorithms like Pollard's rho, which require 2128 operations on a 256-bit group.

Why can reuse of the ephemeral nonce k in ECDSA immediately expose the private key?

In ECDSA, signing two different message hashes h1 ≠ h2 with the identical ephemeral scalar k produces two signatures (r, s1) and (r, s2) sharing the same r = (kG)x mod n. Subtracting s1 − s2 ≡ k−1(h1 − h2) (mod n) reveals k ≡ (h1 − h2)(s1 − s2)−1 (mod n), from which the private key dA ≡ r−1(k · s1 − h1) (mod n) is recovered in two modular divisions. Deterministic nonce generation (as in Ed25519 and RFC 6979) eliminates this vulnerability.

How does Shor's quantum algorithm affect elliptic-curve cryptography?

On a fault-tolerant quantum computer, Peter Shor's 1994 period-finding algorithm—which applies the quantum Fast Fourier transform to a superposition of group elements |a⟩|b⟩|aG + *bQ*⟩—solves both integer factorization and the ECDLP in polynomial O((log p)3) quantum gate operations. Because a 256-bit elliptic curve has a smaller state register than a 3,072-bit RSA key, breaking 256-bit ECC via Roetteler et al.'s quantum circuit requires roughly 2,330 logical qubits, prompting TLS 1.3 and SSH deployments to pair X25519 with lattice-based post-quantum key encapsulation (X25519MLKEM768).

References

  1. Koblitz, N. (1987). Elliptic curve cryptosystems. Mathematics of Computation, 48(177), 203–209. https://doi.org/10.1090/S0025-5718-1987-0866109-5
  2. Miller, V. S. (1986). Use of elliptic curves in cryptography. In Advances in Cryptology — CRYPTO '85 Proceedings (Lecture Notes in Computer Science, Vol. 218, pp. 417–426). Springer. https://doi.org/10.1007/3-540-39799-X_31
  3. Bernstein, D. J. (2006). Curve25519: New Diffie-Hellman speed records. In Public Key Cryptography — PKC 2006 (Lecture Notes in Computer Science, Vol. 3958, pp. 207–228). Springer. https://doi.org/10.1007/11745853_14
  4. Bernstein, D. J., Duif, N., Lange, T., Schwabe, P., & Yang, B.-Y. (2012). High-speed high-security signatures. Journal of Cryptographic Engineering, 2(2), 77–89. https://doi.org/10.1007/s13389-012-0027-1
  5. Pollard, J. M. (1978). Monte Carlo methods for index computation (mod p). Mathematics of Computation, 32(143), 918–924. https://doi.org/10.1090/S0025-5718-1978-0491431-9
🧬 Support Open Science
Explore interactive science games on LowKey Games or browse scientific apparel & accessories in the CRV Science Shop.
💡 Spot an inaccuracy or have primary literature to expand this article?
Submit a citation or revision note using your shared CRV Science / LowKey Games profile ID.
Suggest Revision