Fundamental
Fundamental
1
Introduction to Elliptic Curves (EC)
2
Graphical Representation of EC
Y - axis
X - axis
It is a single curve.
Curves of this nature are called ELLIPTIC CURVES.
3
Graphical Representation of EC
5
Introduction to ECC
History of ECC
• In 1985, Neal Koblitz and Victor Miller independently proposed ECs to design
public key cryptosystems.
• In the late 1990’s, ECC was standardized by a number of organizations and it
started receiving commercial acceptance.
• Nowadays, ECC is mainly used in the resource constrained environments, such as
• ad-hoc wireless networks, and
• mobile networks.
• There is a trend that conventional public key cryptosystems are being replaced
with ECC systems.
6
Introduction to ECC
Motivation
Public (or asymmetric) key cryptography algorithms play an important role in
providing security services:
• Key management
• User authentication
• Signature
• Certificate
Public key cryptography systems are constructed by relying on the hardness of
mathematical problems:
• RSA - based on the Integer Factorization Problem
• DH - based on the Discrete Logarithm Problem
7
Introduction to ECC
Motivation …
The main problem of conventional public key cryptography systems
• The key size has to be sufficiently large in order to meet high-level security
requirement.
• This results in consumption of more bandwidth and lower speed.
Solution: Elliptic Curve Cryptography system.
8
Introduction to ECC
9
Introduction to ECC
• The mathematical operations of ECC is defined over the elliptic curve Y - axis
10
Introduction to ECC
11
Introduction to ECC
• Why ECC?
• Sub-exponential algorithms are available for factoring or solving DLP.
• But for ECC, the breaking of sub-exponential algorithm has not been found.
• That is, ECC is more secured than RSA, ElGamal
• Using much smaller key size of ECC can achieve the same security as RSA
or ElGamal with larger key size, so it is more efficient.
12
Elliptic Curve Cryptosystem (ECC)
• The security of ECC depends on the difficulty of Elliptic Curve Discrete Logarithm
Problem.
• If P and Q are any two points on an EC and 𝑘 is any scalar such that 𝑘𝑃 = Q.
• If P and Q are given, it is computationally infeasible to obtain 𝑘, if 𝑘 is sufficiently
large.
• Finding 𝑘 is the discrete logarithm of Q to the base P.
• The main operation involved in ECC is point multiplication.
• i.e., multiplication of a scalar 𝑘 with any point P on the curve to obtain another
point Q on the same curve, i.e., 𝑘P = Q.
13
Elliptic Curves
14
Elliptic Curves
15
Elliptic Curves
y
• Elliptic Curve over any field K is
𝐸𝐶(𝐾) = *∞+ U *(𝑥, 𝑦) ∈ 𝐾 × 𝐾 | 𝑦2 = 𝑥3 + 𝑎𝑥 + 𝑏+ x
• The point at infinity is sitting at the top of the y-axis and any vertical line is said
to pass through the point at infinity.
• The point at infinity is both at the top and bottom of the y-axis.
16
Elliptic Curves (EC)
y
Definition: EC x
• An Elliptic Curve (EC) over K is the set of points (x, y) with x, y K which satisfy
the equation
y2 = x3 + ax + b ……. (1)
together with a single element, called point at infinity, denoted as O.
17
Elliptic Curves (EC)
Definition: EC
• If K is a field of characteristic 2
• The EC over K is the set of points together with a point at infinity O satisfying an
equation of type either
y2 + cy = x3 + ax + b …. (2a)
or
y2 + xy = x3 + ax2 + b …. (2b)
(Here we do not care whether or not the cubic polynomial on the right has
multiple root)
18
Elliptic Curves (EC)
Definition: EC
• If K is a field of characteristic 3
• The EC over K is the set of points together with a point at infinity O satisfying the
equation
y2 = x3 + ax2 + bx + c .……. . (3)
• (Here the cubic polynomial on the right has no multiple roots)
19
Elliptic Curves (EC)
Definition
• Let E be an EC over the real numbers, and let P and Q be two points on E.
• We define the negative of P and the sum of P + Q y
• The point at infinity, O serves as the additive identity (or zero element) of the
group points.
20
Elliptic Curves (EC)
The Negative of P
y
21
General Form of EC
Examples of EC
22
Elliptic Curve Group over Real Numbers
• All points (𝑥, 𝑦) satisfying the above equation and with the Elliptic Curve
point at infinity O, the addition operation forms a group.
23
Elliptic Curves
Identity: P + O = O + P = P, ∀ P ∈ E
Inverse: P + (– P) = (– P) + P = O, ∀ P ∈ E
Commutative: P + Q = Q + P, ∀ P, Q ∈ E
Associative: (P + Q) + R = P + (Q + R), ∀ P, Q, R ∈ E
24
Elliptic Curve - Example
25
Elliptic Curves
26
Elliptic Curves
27
Elliptic Curves
28
Elliptic Curves
29
Elliptic Curves
Basic Operations on EC
30
Elliptic Curves
• An EC over real numbers may be defined as the set of points (𝑥, 𝑦) which satisfy
an EC equation of the form:
𝒚𝟐 = 𝒙𝟑 + 𝒂𝒙 + 𝒃, where 𝒙, 𝒚, 𝒂 & 𝒃 are real numbers,
with 4𝑎3 + 27𝑏 2 ≠ 0.
31
Elliptic Curves
One important fact about the set of points on an EC is that it forms an abelian
group.
To explain that how does it work, assume that K = R.
i.e., the EC is an ordinary curve in the plane plus a point O ‘point at infinity’.
32
Elliptic Curves
33
Elliptic Curves
y
Addition of two points in EC
• EC groups are additive groups; that is, their basic function is addition. Elliptic Curve
The addition of two points on an EC is defined geometrically.
• The negative of a point P = (xP, yP) is its reflection in the x-axis:
the point −P is (xP, −yP).
Notice that for each point P on an EC, the point −P is also on the same EC.
• We define P + (−P) = O
34
Elliptic Curves
35
Elliptic Curve
36
The Geometry of Elliptic Curves
37
The Geometry of Elliptic Curves
Q
⋅
P ⋅
38
The Geometry of Elliptic Curves
Q
⋅
P ⋅
39
The Geometry of Elliptic Curves
Q ⋅
⋅
P ⋅
40
The Geometry of Elliptic Curves
Q ⋅ -R
⋅
P ⋅
41
The Geometry of Elliptic Curves
Q ⋅ -R
⋅
P ⋅
⋅ E
42
The Geometry of Elliptic Curves
Q ⋅ -R
⋅
P ⋅
⋅ RE
43
The Geometry of Elliptic Curves
Q ⋅ -R
⋅
P ⋅
⋅ R E= P + Q
44
Elliptic Curves
Adding the points P and –P (A Geometry Approach)
• By definition, P + (-P) = O.
• As a result, P + O = O + P = P in the EC group.
• O is called the additive identity of the EC group.
• All ECs have an additive identity.
45
Elliptic Curves
46
Point Doubling on EC
47
The Geometry of Elliptic Curves
⋅P
48
The Geometry of Elliptic Curves
⋅P
49
The Geometry of Elliptic Curves
50
The Geometry of Elliptic Curves
51
The Geometry of Elliptic Curves
⋅ E
52
The Geometry of Elliptic Curves
⋅ R E= 2P
53
Elliptic Curves
Doubling the point P if yP = 0
54
The Geometry of Elliptic Curves
P ⋅
55
The Geometry of Elliptic Curves
P ⋅
⋅
E
56
The Geometry of Elliptic Curves
P ⋅
⋅
Q = −P
E
57
The Geometry of Elliptic Curves
Q = -P
⋅
E
58
Algebra of Elliptic Curves
59
Algebra of Elliptic Curves
1Equation (5.1) can be used to define an elliptic curve over any field GF(pn), for p > 3 prime.
An elliptic curve over GF(2n) or GF(3n) is defined by a slightly different equation.
60
Elliptic Curve
• Choose two non-negative integers a and b less than p (> 3) such that
4a3 + 27b2 (mod p) ≠ 0.
• Then Ep(a, b) denotes the elliptic group mod p, whose elements (x, y) are pairs of
non-negative integers less than p satisfying
y2 ≡ x3 + ax + b (mod p) …… (5.1)
together with the point at infinity O.
61
Algebra of Elliptic Curves
• Let (x1, y1), (x2, y2) and (x3, y3) denote the coordinates of P, Q and P + Q,
respectively.
• (x3, y3) ← (x1, y1) + (x2, y2)
• The x3 and y3 can be expressed in terms of x1, y1, x2, y2.
62
Elliptic Curve
(x1, y1)
Elliptic Curve: Algebraic Addition of two Points P ⋅
• Suppose P = (x1, y1) and Q = (x2, y2) are two points on E.
• If x2 = x1 and y2 = -y1, then P + Q = O, otherwise
Q = -P
⋅(x , y )
2 2
• Suppose 𝑃 = (𝑥1, 𝑦1) and 𝑄 = (𝑥2, 𝑦2) are two different points on 𝐸. Then
𝑷 + 𝑸 = 𝑥1, 𝑦1 + (𝑥2, 𝑦2)
Geometric Approach
= (𝒙𝟑, 𝒚𝟑),
where Q ⋅ -R
2 ⋅
𝑥3 =
𝑦2 ; 𝑦1
𝑥2 ; 𝑥1
− 𝑥1 − 𝑥2 ; P ⋅
𝑦2 ; 𝑦1
𝑦3 = −𝑦1 + 𝑥1 − 𝑥3 . … (4)
𝑥2 ; 𝑥1
⋅ R E= P + Q
64
Elliptic Curve
where
⋅
L
⋅ -R
2
3𝑥12 :𝑎
𝑥3 = − 2𝑥1 ;
2𝑦1
3𝑥12 : 𝑎
𝑦3 = −𝑦1 + 𝑥1 − 𝑥3 . …. (5)
2𝑦1
E
⋅ R = 2P
With the above definition of addition, it can be shown that E is an abelian group
with identity element O.
65
Elliptic Curve
Example 2: On the EC y2 = x3 – 36x, let P = (-3, 9) and Q = (-2, 8). Find P + Q and 2P.
Solution: 𝒚𝟐 = 𝒙𝟑 + 𝒂𝒙 + 𝒃
𝑦2 ; 𝑦1 2 For P + Q 2 For 2P
𝑥3 = − 𝑥1 − 𝑥2 3𝑥12 + 𝑎
𝑥2 ; 𝑥1 𝑥3 = − 2𝑥1 …. (5)
… (4) 2𝑦1
𝑦2 ; 𝑦1 3𝑥12 : 𝑎
𝑦3 = −𝑦1 + 𝑥1 − 𝑥3 . 𝑦3 = −𝑦1 + 𝑥1 − 𝑥3 .
𝑥2 ; 𝑥1 2𝑦1
66
Elliptic Curve
Example 5.7
• Let E be an elliptic curve y2 x3 + x + 6 over Z11. 𝒚𝟐 = 𝒙𝟑 + 𝒂𝒙 + 𝒃
67
Elliptic Curve
Elliptic Curve Points Quadratic Residue mod 11
68
Elliptic Curve
Elliptic Curve Points
Table 5.2 Points on the EC y2 x3 + x + 6 over Z11 {1, 3, 4, 5, 9} are QR modulo 11.
x 𝑦 2 x3 + x + 6 mod 11 Is y2 QR(11)? y a is called a quadratic residue modulo m if
0 6 no the congruence
x2 a mod m ... (4.1)
1 8 no
has a solution (i.e., if a is a “perfect square
2 5 yes 4, 7 modulo m”).
3 3 yes 5, 6 Calculation of y from x
4 8 no For x = 2,
𝑦 2 ≡ 23 + 2 + 6 mod 11
5 4 yes 2, 9 ≡ 16 mod 11
6 8 no ≡ 5 mod 11
5
To check for , we have
7 4 yes 2, 9 11
42 ≡ 5 mod 11 => y = 4
8 9 yes 3, 8 72 ≡ 5 mod 11 => y = 7
9 7 no So, for x = 2, the coordinates are {(2, 4), (2, 7)}.
69
Elliptic Curve
Elliptic Curve Points
Table 5.2 Points on the EC y2 x3 + x + 6 over Z11
x 𝑦 2 x3 + x + 6 mod 11 is QR(11)? y {1, 3, 4, 5, 9} are quadratic
0 6 no residue modulo 11.
1 8 no
2 5 yes 4, 7 E11(1, 6) = {(2, 4), (2, 7), (3, 5), (3, 6), (5, 2),
→ (5, 9), (7, 2), (7, 9), (8, 3), (8, 8),
3 3 yes 5, 6 (10, 2), (10, 9), O}
4 8 no
5 4 yes 2, 9
6 8 no
7 4 yes 2, 9
8 9 yes 3, 8
9 7 no
10 4 yes 2, 9
70
Elliptic Curve
Elliptic Curve Points y2 x3 + x + 6 over Z11
Table 5.2 Points on the EC y2 = x3 + x + 6 over Z11
E11(1, 6) = {(2, 4), (2, 7), (3, 5), (3, 6), (5, 2), (5, 9), (7, 2), x 𝑦 2 x3
+x+6 in y
(7, 9), (8, 3), (8, 8), (10, 2), (10, 9), O} mod 11 QR(11)?
0 6 No
• E has 13 points on it. 1 8 No
2 5 yes 4, 7
• Since any group of prime order is cyclic, it follows that E
3 3 yes 5, 6
is isomorphic to Z13, and any point other than the point
4 8 no
at infinity is a generator of E.
5 4 yes 2, 9
6 8 no
• Suppose we take the generator α = (2, 7).
7 4 yes 2, 9
• Then we can compute the “powers” of α (which we will 8 9 yes 3, 8
write as multiples of α, since the group operation is 9 7 no
additive). 10 4 yes 2, 9
71
Elliptic Curve
Elliptic Curve Points E11(1, 6) = {(2, 4), (2, 7), (3, 5), (3, 6), (5, 2), (5, 9), (7, 2),
Let α = (2, 7) be a generator. (7, 9), (8, 3), (8, 8), (10, 2), (10, 9), O}
λ = (3 × 22 + 1) (2 × 7)-1 mod 11
= 2 × 3-1 mod 11 𝑦2 − 𝑦1
, 𝑖𝑓 𝑃 ≠ 𝑄
= 2 × 4 mod 11 ∵ 3 . 4 1 mod 11 𝑥2 − 𝑥1
𝜆=
3𝑥12 + 𝑎
= 8. , 𝑖𝑓 𝑃 = 𝑄
2𝑦1
• Computation of (x3, y3)
x3 = λ2 – x1 – x2
x3 = 82 – 2 – 2 mod 11 = 5, and
y3 = λ(x1 – x3) – y1
y3 = 8 (2 – 5) – 7 mod 11 = 2.
• (i.e.) 2α = (5, 2).
72
Elliptic Curve
Elliptic Curve Points
α = (2, 7), 2α = (5, 2) y2 x3 + x + 6 over Z11
73
Elliptic Curve
E11(1, 6) = {(2, 4), (2, 7), (3, 5), (3, 6), (5, 2), (5, 9), (7, 2), (7, 9), (8, 3), (8, 8), (10, 2), (10, 9), O}
Example 5.8 Consider the elliptic curve E : y2 = x3 + 3x + 8 over the field F13.
• We can compute the points of E(F13) by substituting all possible values of x = 0, 1, 2, ..., 12
and checking for which x values the quantity x3 + 3x + 8 is a square modulo 13.
12
75
Elliptic Curve
Example 5.8: Consider the elliptic curve E : y2 = x3 + 3x + 8 over the field F13.
• For x = 0, y2 = 8, and 8 is not a square modulo 13.
• Next for x = 1, which gives y2 = 1 + 3 + 8 ≡ 12 mod 13.
• In fact, it has two square roots 5 and 8. ∵ 52 ≡ 12 mod 13 & 82 ≡ 12 mod 13.
• This gives two points (1, 5) and (1, 8) in E(F13).
• The set of EC points
E(F13) = {O, (1, 5), (1, 8), (2, 3), (2, 10), (9, 6), (9, 7), (12, 2), (12, 11)}.
• Thus E(F13) consists of nine points.
76
Elliptic Curve Cryptography
• For this elliptic group, we are only interested in the non-negative integers in the
quadrant from (0, 0) to (p, p) that satisfy the equation mod p.
• Table 6.4 lists the points (other than O) that are part of E23(1, 1).
77
Elliptic Curve Cryptography
Example EC y2 = x3 + x + 1 mod 23
Table 6.4 Points on the Elliptic Curve E23(1, 1)
(0, 1) (6, 4) (12, 19)
(0, 22) (619) (13, 7)
(1, 7) (7, 11) (13, 16)
(1, 16) (7, 12) (17, 3)
(3, 10) (9, 7) (17, 20)
(3, 13) (9, 16) (18, 3)
(4, 0) (11, 3) (18, 20)
(5, 4) (11, 20) (19, 5)
(5, 19) (12, 4) (19, 18)
78
Elliptic Curve Cryptography
Example: y2 = x3 + x + 1
79
Elliptic Curve Cryptography
Table 6.4 Points on the Elliptic Curve E23(1, 1)
(0, 1) (6, 4) (12, 19)
Example
(0, 22) (619) (13, 7)
(1, 7) (7, 11) (13, 16)
• Let 𝑃 = (3, 10) and 𝑄 = (9, 7), compute 𝑃 + 𝑄. (1, 16) (7, 12) (17, 3)
(3, 10) (9, 7) (17, 20)
(3, 13) (9, 16) (18, 3)
7 − 10 −3 −1
𝜆= = = ≡ 11 mod 23. (4, 0) (11, 3) (18, 20)
9−3 6 2 (5, 4) (11, 20) (19, 5)
(5, 19) (12, 4) (19, 18)
;1 𝑦2 − 𝑦1
mod 23 = −1 . 2;1 mod 23 , 𝑖𝑓 𝑃 ≠ 𝑄
2 𝑥2 − 𝑥1
= 22 . 12 mod 23 𝜆=
3𝑥12 + 𝑎
= 264 mod 23 , 𝑖𝑓 𝑃 = 𝑄
= 11 2𝑦1
x3 = λ2 – x1 – x2
y3 = λ(x1 – x3) – y1
80
Elliptic Curve Cryptography
𝑦2 − 𝑦1
Example , 𝑖𝑓 𝑃 ≠ 𝑄
𝑥2 − 𝑥1
𝜆=
3𝑥12 + 𝑎
, 𝑖𝑓 𝑃 = 𝑄
• Let 𝑃 = (3, 10) and 𝑄 = (9, 7), compute 𝑃 + 𝑄. 2𝑦1
7 − 10 −3 −1 x3 = λ2 – x1 – x2
𝜆= = = ≡ 11 mod 23. y3 = λ(x1 – x3) – y1
9−3 6 2
Table 6.4 Points on the Elliptic Curve E23(1, 1)
x3 = 112 – 3 – 9 = 109 ≡ 17 mod 23 (0, 1) (6, 4) (12, 19)
(0, 22) (619) (13, 7)
y3 = 11(3 – (-6)) – 10 = 89 ≡ 20 mod 23. (1, 7) (7, 11) (13, 16)
(1, 16) (7, 12) (17, 3)
(3, 10) (9, 7) (17, 20)
So, 𝑃 + 𝑄 = (x3, y3) = (17, 20).
(3, 13) (9, 16) (18, 3)
(4, 0) (11, 3) (18, 20)
(5, 4) (11, 20) (19, 5)
(5, 19) (12, 4) (19, 18)
81
Elliptic Curve Cryptography
Example …
E23(1, 1)
• To find 2P, P = (3, 10)
3 . 32 + 1 5 1
𝜆= = = ≡ 6 mod 23. 𝑦2 − 𝑦1
2 . 10 20 4 , 𝑖𝑓 𝑃 ≠ 𝑄
𝑥2 − 𝑥1
𝜆=
3𝑥12 + 𝑎
x3 = 62 – 3 – 3 = 30 ≡ 7 mod 23 , 𝑖𝑓 𝑃 = 𝑄
2𝑦1
y3 = 6(3 – 7) – 10 = -34 ≡ 12 mod 23.
x3 = λ2 – x1 – x2
So, 2P = P + P = (7, 12). y3 = λ(x1 – x3) – y1
Similarly, 4P = P + P + P + P = 2P + 2P.
That is, multiplication can be obtained as repeated additions.
82
Algebra of Elliptic Curves
𝑦2 − 𝑦1
, 𝑖𝑓 𝑃 ≠ 𝑄
𝑥2 − 𝑥1
𝜆=
3𝑥12 + 𝑎
, 𝑖𝑓 𝑃 = 𝑄
2𝑦1
x3 = λ2 – x1 – x2
y3 = λ(x1 – x3) – y1
83
Algebra of Elliptic Curves
7 27 𝑃 = 1, 2
Let 𝑄 = − , − . 7 27
4 8
𝑄 = − ,−
Using the secant line or secant constructions, we can find 4 8
553 11950
3𝑃 = 𝑃 + 𝑄 = ,− .
121 1331
Similarly,
45313 8655103
4𝑃 = ,− .
11664 1259712
84
Elliptic Curves
85
Elliptic Curves
Theorem. Working over a finite field, the group of points 𝐸 𝐹𝑝 is always either
a cycle group or the product of two cyclic groups.
86
Elliptic Curves
87
Elliptic Curve on a Finite set of Integers
DEFINITION 5.3
• Let p > 3 be prime. The elliptic curve y2 = x3 + ax + b over Zp, is the set of
solutions (x, y) Zp × Zp to the congruence y2 ≡ x3 + ax + b (mod p) …(5.1)
• where a, b Zp are constants such that 4a3 + 27b2 ≠ 0 (mod p), together
with a special point O called the point at infinity.
88
Elliptic Curve on a Finite set of Integers
x = 3 y2 = 36 = 1 y = 1, 4 (mod 5) 0 3 no
1 1 yes 1, 4
x = 4 y2 = 75 = 0 y = 0 (mod 5)
2 0 no
• Then points on the elliptic curve are 3 1 yes 1, 4
4 0 no
{(1, 1), (1, 4), (3, 1), (3, 4), O}.
89
Elliptic Curves
90
Elliptic Curves
91