CSP L7
CSP L7
CSP L7
Debayan Gupta
Lecture 7
February 19, 2019
Elliptic Curves
E : y 2 + a1 xy + a3 y = x 3 + a2 x 2 + a4 x + a6 ,
where the polynomial on the right hand side has no double roots.
For particular fields K , the Weierstrass equation takes a simpler
form, as we shall see.
Definition
Let a, b ∈ R be constants such that 4a3 + 27b2 6= 0.
A non-singular elliptic curve is the set E of solutions
(x, y ) ∈ R × R to the equation
y 2 = x 3 + ax + b
Example
Each choice of the numbers yields a different elliptic curve.
EC Operations
EC Operations
EC Modulo a Prime
For prime p, the integers in Zp form a field Fp , so every non-zero
element has a multiplicative inverse modulo p.
Elliptic curves over Fp are defined exactly as they are over real
numbers but with all arithmetic being performed over Fp .
Definition
Let p > 3 be a prime. The elliptic curve y 2 = x 3 + ax + b over Fp
is the set of solutions (x, y ) ∈ Fp × Fp to the congruence
y 2 ≡ x 3 + ax + b (mod p),
Example
E : y 2 = x 3 − x over a finite field F61
Example
Example
Elliptic curves mod p are finite sets of points. These are the elliptic
curves we are interested in.
Example
E : y 2 ≡ x 3 + 4x + 4 (mod 5) creates the following group:
(0, 2), (0, 3), (1, 2), (1, 3), (2, 0), (4, 2), (4, 3), O
Finding points:
I Substitute each possible value of x = {0, 1, 2, 3, 4} into the
equation and find the values of y that solve the equation.
I For example, x ≡ 0 ⇒ y 2 ≡ 4 ⇒ y ≡ 2, 3 (mod 5), which
gives us two points (0, 2) and (0, 3).
y 0 1 2 3 4
y 2 mod 5 0 1 4 4 1
Adding Points
Adding Points
Adding Points
4. Add two points with different x-coordinates.
P +Q =R
xR = λ2 − xP − xQ
yR = λ(xP − xR ) − yP
λ = (yQ − yP )(xQ − xP )−1
Adding Points
5. Add a point to itself (point doubling).
P +P =R
xR = λ2 − 2xP , yR = λ(xP − xR ) − yP
λ = (3xP2 + a)(2yP )−1
and
ν = yP − λxP = yQ − λxQ
(λx + ν)2 = x 3 + ax + b
x 3 − λ2 x 2 + (a − 2λν)x + b − ν 2 = 0
Since the equation is cubic, there are three roots. The sum of
three roots must be the negative of the coefficient of the quadratic
term, or λ2 . Therefore:
xR 0 = λ2 − xP − xR
If we use the points (xP , yP ) and (xR , −yR ) to compute this slope,
we get:
−yR − yP
λ=
xR − xP
or
yR = λ(xP − xR ) − yP
EC Groups
Notation:
E (Fp ) denotes an elliptic curve group over Fp .
#E (Fp ) denotes the order (cardinality) of E (Fp ).
Definition
A group (G , ◦) is a set G with a binary operation ◦ : G × G → G
such that the following three axioms are satisfied:
Associativity: For all a, b, c ∈ G the equation
(a ◦ b) ◦ c = a ◦ (b ◦ c) holds.
Identity element: There is an element e ∈ G s.t. for all a ∈ G the
equation e ◦ a = a ◦ e = a holds.
Inverse element: For each a ∈ G there exists an element b ∈ G s.t.
a ◦ b = b ◦ a = e.
?
Associativity: (P + Q) + Z = P + (Q + Z )
Identity element: What is it?
Inverse element: What is it?
Therefore, (E , +) is a group.
Additionally, the group operator + is commutative since
P + Q = Q + P. Hence, (E , +) in an abelian group.
Other Operations
2
Note that we do not define a multiplication operator over E .
CS 302, Lecture 7 28/57
Outline Elliptic Curves Basics Elliptic Curve Cryptography
EC Cryptosystems
Why ECC?
Representing Plaintext
Encoding Plaintext
Koblitz’s Method
Koblitz’s Method
Encoding
1. Choose an auxiliary base parameter k and verify that m
satisfies (m + 1)k < p.
2. The message m is represented by x = mk + j, where 0 ≤ j ≤ k
3. For j = 0, 1, 2, . . . , k − 1, compute x 3 + ax + b and solve for y .
4. If there is a square root y , then Pm = (x, y ), otherwise,
increment j and try again.
Decoding
1. Compute m0 = x
k and set m to be the greatest integer ≤ m0 .
EC Domain Parameters
Diffie-Hellman
EC Diffie-Hellman
EC Diffie-Hellman
ElGamal
EC ElGamal
Use of blinding
EC DSA
EC DSA: Signing
EC DSA: Verification
Bob verifies the signature as follows:
1. Computes V1 = x × B + s × R and V2 = m × A.
2. Declares the signature valid iff V1 = V2 .
The verification works because
V1 = x × B + s × R
= xa × A + k −1 (m − ax)(k × A)
= xa × A + (m − ax) × A
= m×A
= V2
Prime modulus p
6277101735386680763835789423207666416083908700390324961279
Order n
6277101735386680763835789423176059013767194773182842284081
Coefficient a
64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1
Coefficient b
3099d2bb bfcb2538 542dcd5f b078b6ef 5f3d6fe2 c745de65
The base point x coordinate Gx
188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012
The base point y coordinate Gy
07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811
Additional Resources