liveBook · Manning

Elliptic curve

As explained in Hacking Cryptography

An elliptic curve is a set of points satisfying a specified cubic equation and equipped with a defined point-addition operation.

An elliptic curve is a set of points satisfying y² = x³ + ax + b. Cryptographic implementations operate on these points with a specialized addition operation that keeps results on the same curve. section 3.2.2

Equation 3.2
\[y^2 = x^3 + ax + b \label{equation:elliptic-curves}\]

Use the defining equation to check whether coordinates can belong to the curve. section 3.2.2

The operations used by cryptographic code are:

  • Add two points P and Q using the curve's special addition operation; the result P + Q remains on the curve and satisfies properties such as P + Q = Q + P. section 3.2.2
  • Multiply a point P by an integer n through repeated point addition, written nP and implemented as scalar multiplication. section 3.2.2
  • Represent coordinates with arbitrary-precision integers and use Go's crypto/elliptic operations instead of implementing the point arithmetic directly. section 3.2.2

Go's crypto/elliptic package supplies standard curves, including P256, together with Add and ScalarMult operations. This lets cryptographic code work with curve points without relying on ordinary coordinate addition. section 3.2.2

Recovering a missing coordinate

DUAL_EC_DRBG exposes only 30 bytes of a 32-byte x coordinate. Trying the missing two bytes and computing y = √(x³ + ax + b) identifies valid curve points; failed modular square roots reject guesses, while P256 validation confirms candidates. section 3.2.4

How Hacking Cryptography covers it

How deep it goes
Defines the curve and operations, delegates arithmetic details to Go, and demonstrates coordinate validation during an attack.
Examples
Uses plotted curves, P256 operations, truncated-coordinate guesses, modular square roots, and Go exploit tests.
What it assumes
Introduces the curve model and operations directly, while using modular arithmetic and arbitrary-precision integers as implementation foundations.
What you can do after
Apply it via Go's crypto/elliptic package to add points, perform scalar multiplication, and validate candidate coordinates.
How it connects
Connects elliptic curves to cryptography, DUAL_EC_DRBG, scalar multiplication, modular arithmetic, and arbitrary-precision integers.

Also explained in

Compare how 4 books explain elliptic curve →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Hacking Cryptography. The section links point to the parts of the book it draws on.