ECC Basics Newx
ECC Basics Newx
ECC Basics Newx
Outline
• Introduction to Elliptic Curves
Y axis
X axis
y = x + ax + b
2 3
Examples
Points on the Elliptic Curve (EC)
• Elliptic Curve over field L
E ( L) = {∞} ∪ {( x, y ) ∈ L × L | y 2 + ... = x3 + ...}
• P + Q = Q + P (commutativity)
• (P + Q) + R = P + (Q + R) (associativity)
y
• Consider elliptic curve
E: y2 = x3 - x + 1
P2 • If P1 and P2 are on E, we
P1
can define
x
P3 = P1 + P2
P3 as shown in picture
• Addition is all we need
Addition in Affine Co-ordinates
y=m(x-x1)+y1 P = ( x1 , y1 ), Q = ( x2 , y2 )
R = ( P + Q) = ( x3 , y3 )
y
Let, P≠Q,
y2 − y1
m= ;
x2 − x1
To find the intersection with E. we get
(m( x − x1 ) + y1 ) 2 = x 3 + Ax + B
x or , 0 = x 3 − m 2 x 2 + ...
So, x3 = m 2 − x1 − x2
y2=x3+Ax+B ⇒ y3 = m( x1 − x2 ) − y1
Doubling of a point
• Let, P=Q
dy
2y = 3x 2 + A
dx
dy 3 x12 + A
⇒m= =
dx 2 y1
If , y1 ≠ 0 (since then P1 +P2 =∞):
∴ 0 = x3 − m 2 x 2 + ...
⇒ x3 = m 2 − 2 x1 , y3 = m( x1 − x3 ) − y1
y P2=O=∞
P1=P1+ O=P1
P1
Sum of two points
Define for two points P (x1,y1) and
Q (x2,y2) in the Elliptic curve
y 2 − y1
x − x for _ x1 ≠ x 2
λ = 22 1
3 x1 + a for _ x1 = x 2
2 y 1
x3 = λ − x1 − x2
y3 = λ ( x3 − x1 ) + y1
Point at infinity O
P+P = 2P
a(x,y)
b(x,y)
Alice, A Bob, B