EC Cryptography Tutorials - Herong's Tutorial Examples - v1.02, by Dr. Herong Yang
Elliptic Curve Point Addition Example
This section provides algebraic calculation example of adding two distinct points on an elliptic curve.
Now we have algebraic formulas to calculate the addition operation on elliptic curves. Let's try them with some examples.
The first example is adding 2 distinct points together, taken from "Elliptic Curve Cryptography: a gentle introduction" by Andrea Corbellini at andrea.corbellini.name/2015/05/17 /elliptic-curve-cryptography-a-gentle-introduction/:
For the elliptic curve given below: y2 = x3 + ax + b, where (a=-7 and b=10) Or: y2 = x3 - 7x + 10 And two given points: P = (xP, yP) = (1,2) Q = (xQ, yQ) = (3,4) Find the sum of P and Q: R = P + Q = (xR, yR) From equation (10): yP - yQ m = --------- (10) xP - xQ We get: m = -2/-2 = 1 From equations (8) and (9): xR = m2 - xP - xQ (8) yR = m(xP - xR) - yP (9) We get: xR = 1*1 - 1 - 3 = -3 yR = 1*(1 + 3) - 2 = 2 So: R = (-3,2)
Here is how we can verify the result:
Point, -R=(-3,-2), must be on the elliptic curve, which can be verified as: y2 = x3 - 7x + 10 Or: (-2)*(-2) = (-3)*(-3)*(-3) - 7*(-3) + 10 4 = -27 + 21 + 10 4 = 4 Point, -R=(-3,-2), must be on the straight line passing through P and Q, which can be verified as: y = m(x - xP) + yP Or: -2 = m(-3 - 1) + 2 -2 = 1*(-4) + 2 -2 = -2
Table of Contents
Geometric Introduction to Elliptic Curves
►Algebraic Introduction to Elliptic Curves
Algebraic Description of Elliptic Curve Addition
Algebraic Solution for Symmetrical Points
Algebraic Solution for the Infinity Point
Algebraic Solution for Point Doubling
Algebraic Solution for Distinct Points
Elliptic Curves with Singularities
►Elliptic Curve Point Addition Example
Elliptic Curve Point Doubling Example
Abelian Group and Elliptic Curves
Discrete Logarithm Problem (DLP)
Generators and Cyclic Subgroups
tinyec - Python Library for ECC
ECDH (Elliptic Curve Diffie-Hellman) Key Exchange
ECDSA (Elliptic Curve Digital Signature Algorithm)