Loading...
Loading...
Cryptography · Axiom Academy
Understanding how to add two distinct points on an elliptic curve To add two distinct points P and Q on an elliptic curve, we follow a simple geometric procedure: Draw a line through points P and Q This line will intersect the curve at exactly one more point (call it R') Reflect R' across the x-axis to get the final result R = P + Q This geometric construction is not just visualization - it defines the addition operation on elliptic curves! The geometric construction translates into precise algebraic formulas. Given two distinct points P = (x₁, y₁) and Q = (x₂, y₂) on the elliptic curve, we compute R = P + Q = (x₃, y₃) as follows: These formulas work for any elliptic curve of the form y² = x³ + ax + b, and the resulting point R is guaranteed to also be on the curve. There are important edge cases to consider when adding points on an elliptic curve: The point at infinity O serves as the identity element. Adding O to any point P gives back P. If P = (x, y), then -P = (x, -y). Adding a point to its inverse gives the identity: P + (-P) = O. When P = Q (adding a point to itself), we use a different formula involving the tangent line at P. This is called point doubling and requires a modified slope calculation. Let's work through a complete example using the curve y² = x³ + 7 (the same curve used in Bitcoin's secp256k1). Let's verify these are on the curve: 5² = 25 and 2³ + 7 = 15. These don't match, so we'll use simplified example values for demonstration.
This is the written version of the interactive lesson above. See the full Cryptography course.