You are on page 1of 66

BCSE309L – Cryptography and Network

Security
Elliptic Curve Cryptography
Elliptic Curve Cryptography
• ECC, as the name implies, is an asymmetric encryption algorithm
that employs the algebraic architecture of elliptic curves with finite
fields.
• Elliptic Curve Cryptography (ECC) is an encryption technology
comparable to RSA that enables public-key encryption.
• While RSA’s security is dependent on huge prime numbers, ECC
leverages the mathematical theory of elliptic curves to achieve the
same level of security with considerably smaller keys.
• Victor Miller and Neal Koblitz separately proposed elliptic curve
ciphers in the mid-1980s. On a high level, they are analogs of actual
public cryptosystems in which modular arithmetic is substituted by
elliptic curve operations.
Elliptic Curve Cryptography
Elliptic Curve Cryptography

• Faster
• Small key size
• High security
• Less processing over head

• Elliptic curve  set of points that satisfy a specific mathematical


equation  uses cubic equations

y2=x3+ax+b (for some constants a and b)

5
Elliptic Curve Cryptography
Elliptic Curve Cryptography

An equation with degree three is called a cubic equation


Construct an Elliptic Curve over a Finite Field

8
Construct an Elliptic Curve over a Finite Field
Finite Field Z/11
Z/11  GF(11)
11 mod 11 = 0
0 mod 11 = 0
12 mod 11 = 1
1 mod 11 = 1
13 mod 11 = 2
2mod 11 = 2
14 mod 11 = 3
3 mod 11 = 3
15 mod 11 = 4
4 mod 11 = 4
5 mod 11 = 5
GF(11)={0,1,2,3,4,5,6,7,8,9,10}
6 mod 11 = 6
7 mod 11 = 7
8 mod 11 = 8
9 mod 11 = 9
10 mod 11 = 10
9
Construct an Elliptic Curve over a Finite Field

Construct an elliptic curve over a finite field Z/11

1. y2 ≡ x3+ax+b mod p , where a & b are no greater than p


2. 4a3+27b2 mod p ≠ 0

To select a and b, use Eqn. 2


To compute all the points, use Eqn.1

10
Construct an Elliptic Curve over a Finite Field
Let a=1, b=1
Here p=11
To select a and b, use Eqn.2
4a3+27b2 mod p ≠ 0
4+27 mod 11 ≠ 0
31 mod 11 ≠ 0
9≠0
Selection of a and b is fine
Construct an Elliptic Curve over a Finite Field
Let a=1, b=1
Here p=11
To select a and b, use Eqn.2
4a3+27b2 mod p ≠ 0
4+27 mod 11 ≠ 0
31 mod 11 ≠ 0
9≠0
Selection of a and b is fine

To compute all the points, use Eqn.1


y2 ≡ x3+ax+b mod p
y2 mod p = x3+ax+b mod p
y2 mod 11 = x3+x+1 mod 11
Construct an Elliptic Curve over a Finite Field
Let a=1, b=1
Here p=11
To select a and b, use Eqn.2
4a3+27b2 mod p ≠ 0
4+27 mod 11 ≠ 0
31 mod 11 ≠ 0
9≠0
Selection of a and b is fine

To compute all the points, use Eqn.1


y2 ≡ x3+ax+b mod p
y2 mod p = x3+ax+b mod p
y2 mod 11 = x3+x+1 mod 11
Construct an Elliptic Curve over a Finite Field
Let a=1, b=1
Here p=11
To select a and b, use Eqn.2
4a3+27b2 mod p ≠ 0
4+27 mod 11 ≠ 0
31 mod 11 ≠ 0
9≠0
Selection of a and b is fine

To compute all the points, use Eqn.1


y2 ≡ x3+ax+b mod p
y2 mod p = x3+ax+b mod p
y2 mod 11 = x3+x+1 mod 11
Construct an Elliptic Curve over a Finite Field
Let a=1, b=1
Here p=11
To select a and b, use Eqn.2
4a3+27b2 mod p ≠ 0
4+27 mod 11 ≠ 0
31 mod 11 ≠ 0
9≠0
Selection of a and b is fine

To compute all the points, use Eqn.1


y2 ≡ x3+ax+b mod p
y2 mod p = x3+ax+b mod p
y2 mod 11 = x3+x+1 mod 11
Construct an Elliptic Curve over a Finite Field
Plotting the Elliptic Curve E11(1,1)
12

10

0
0 2 4 6 8 10

16
Construct an Elliptic Curve over a Finite Field
Check whether a point falls on the curve

Ex: Test the point (2,0) E11(1,1)

y2 mod 11 = x3+x+1 mod 11


02 mod 11 = 23+2+1 mod 11
0 mod 11 =8+2+1 mod 11
0 = 11 mod 11
0=0

17
Adding Two Points on the Curve

18
Adding Two Points on the Curve -
Different points

19
Adding Two Points on the Curve

Adding two points on the curve

20
Adding Two Points on the Curve
Elliptic Curve Cryptography
Example
Elliptic Curve Cryptography
Example
Elliptic Curve Cryptography
Elliptic Curve Cryptography

25
Elliptic Curve Cryptography
Elliptic Curve Cryptography
Elliptic Curve Cryptography
Elliptic Curve Cryptography
Elliptic Curve Cryptography
Elliptic Curve Cryptography
Elliptic Curve Cryptography
Adding Two Points on the Curve
The rules for addition of P with P over the
elliptic group Ep(a,b) is

Adding two points on the curve

35
Adding Two Points on the Curve -
Similar points

36
Adding Two Points on the Curve
The rules for addition of P with P over the
elliptic group Ep(a,b) is

Adding two points on the curve

37
Adding Two Points on the Curve

2P=P+P
3P=2P+P
4P=3P+P

38
Adding Two Points on the Curve

“POINT DOUBLING”
Adding Two Points on the Curve

2P=P+P
3P=2P+P
4P=3P+P
Adding Two Points on the Curve

P(4,6)
E11(1,1)

41
Adding Two Points on the Curve

P(4,6)
E11(1,1)

42
Adding Two Points on the Curve
P(4,6)
E11(1,1)

43
Adding Two Points on the Curve
P(4,6)
E11(1,1)

(x3,y3)  (6,6)
44
Adding Two Points on the Curve
P(4,6)
E11(1,1)

(x3,y3)  (6,6)
Check whether the point falls on the curve

45
Properties of Elliptic Curves

46
Elliptic Curve Cryptography

47
Elliptic Curve Cryptography

Steps:

1. Encode a plaintext message as a point on the curve


2. Establish the public key and private key
3. Encrypt the message using public key
4. Decrypt using private key

48
Elliptic Curve Cryptography
Step 1: Encode a plaintext message as a point on the curve
M ∈ E11(1,1)
Ex: (4,6) ∈ E11(1,1)
Step 2: Establish the public key and private key
 Choose a generator point G ∈ Ep(a,b),
o Ex: (1,5) ∈ E11(1,1)
 Select a private key n , n should be in the range 1 to 10
o Ex: Choose n=2
 Compute the public key as Pu ∈ nG
o Ex: Pu ∈ 2G  Pu ∈ G +G

49
Elliptic Curve Cryptography
Step 1: Encode a plaintext message as a point on the curve
Check whether the point G =
M ∈ E11(1,1) (1,5) falls on the curve

Ex: (4,6) ∈ E11(1,1) y2=x3+ax+b


52 mod 11 = 13+1+1 mod 11
Step 2: Establish the public key and private key 25 mod 11 = 3 mod 11

 Choose a generator point G ∈ Ep(a,b), 3=3


The generator point G = (1,5)
o Ex: (1,5) ∈ E11(1,1) falls on the curve
 Select a private key n , n should be in the range 1 to 10
o Ex: Choose n=2
 Compute the public key as Pu ∈ nG
o Ex: Pu ∈ 2G  Pu ∈ G +G

50
Elliptic Curve Cryptography
Step 1: Encode a plaintext message as a point on the curve
Check whether the point G =
M ∈ E11(1,1) (1,5) falls on the curve

Ex: (4,6) ∈ E11(1,1) y2=x3+ax+b


52 mod 11 = 13+1+1 mod 11
Step 2: Establish the public key and private key 25 mod 11 = 3 mod 11

 Choose a generator point G ∈ Ep(a,b), 3=3


The generator point G = (1,5)
o Ex: (1,5) ∈ E11(1,1) falls on the curve
 Select a private key n , n should be in the range 1 to 10
o Ex: Choose n=2
 Compute the public key as Pu ∈ nG
o Ex: Pu ∈ 2G  Pu ∈ G +G

51
G = (1,5)
Elliptic Curve Cryptography
n=2
P = 2G
E11(1,1)

52
G = (1,5)
Elliptic Curve Cryptography
n=2
P = 2G

53
G = (1,5)
Elliptic Curve Cryptography
n=2
P = 2G

54
G = (1,5)
Elliptic Curve Cryptography
n=2
P = 2G

Public key PU = 2G = (x3,y3) = (3,3)


Private key n =2
Generator point G=(1,5)
55
Elliptic Curve Cryptography

Step 3: Encrypt the message using public key


C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]

56
Elliptic Curve Cryptography
Step 3: Encrypt the message using public key
C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]

57
Elliptic Curve Cryptography
Step 3: Encrypt the message using public key
C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]

58
Elliptic Curve Cryptography
Step 3: Encrypt the message using public key
C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(3,3)+(3,3)]

59
Elliptic Curve Cryptography
Step 3: Encrypt the message using public key
C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(3,3)+(3,3)]

60
Elliptic Curve Cryptography
Step 3: Encrypt the message using public key
C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(6,5)]

61
Elliptic Curve Cryptography
Step 3: Encrypt the message using public key
C = [(kG), (M+kPU)] k is a random number, ranges from 1 to p-1, 1 to 10
k=2, G=(1,5), M=(4,6), PU=(3,3)
C = (c1, c2)
C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(6,5)]

62
Elliptic Curve Cryptography

C = [(2*(1,5)), ((4,6)+2*(3,3))]
= [(1,5)+(1,5),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(3,3)+(3,3)]
= [(3,3),(4,6)+(8,5)]
= [(3,3),(4,5)]
C = [(3,3),(4,5)]

63
Elliptic Curve Cryptography

Step 4: Decrypt the cipher text using private key


M=C2-[nC1] Plain text M = (4,6)
Ciphertext C= [(3,3),(4,5)]
Private Key n=2
M=C2-[nC1]
= (4,5)-[2(3,3)]
= (4,5)-[(3,3)+(3,3)]
= (4,5)-(6,5)
= (4,5)+(-(6,5))
= (4,5)+(6,-5)
= (4,5)+(6,6) [i.e -5 mod 11 = 6]
64
Elliptic Curve Cryptography

M = (4,6)
65
Elliptic Curve Cryptography

Step 4: Decrypt the cipher text using private key


M=C2-[nC1] Plain text M = (4,6)
Ciphertext C = [(3,3),(4,5)]
Private Key n=2
M=C2-[nC1]
= (4,5)-[2(3,3)]
= (4,5)-[(3,3)+(3,3)]
= (4,5)-(6,5)
= (4,5)+(-(6,5))
= (4,5)+(6,-5)
= (4,5)+(6,6) [i.e -5 mod 11 = 6]
M = (4,6) 66

You might also like