You are on page 1of 53

A

Project Report on

ELLIPTIC CURVE CRYPTOGRAPHY


Submitted to
St.Thomas College (Autonomous),Thrissur
in partial fulfilment of the requirements for the degree of

Bachelor of Science
in
Mathematics
By

Ms.Athulya Kaladharan(Reg No:THAVSMT005)


Ms.Nandana T S(Reg No:THAVSMT010)
Ms.Sreedevi Das(Reg No:THAVSMT013)
Mr.Akash P Vasudev(Reg No:THAVSMT016)
Mr.Nawawy Abdul Kader K.(Reg No:THAVSMT046)

Under the Supervision of


Mr.Ashbin Mathew

Research and Post Graduate Department of Mathematics


St.Thomas College (Autonomous),Thrissur
2023-2024
Research and Post Graduate Department of Mathematics
St.Thomas College (Autonomous),Thrissur

CERTIFICATE

This is to certify that the project report entitled “ELLIPTIC CURVE

CRYPTOGRAPHY” submitted by Ms.Athulya Kaladharan with Regis-

tration Number: THAVSMT005 to St. Thomas College (Autonomous),

Thrissur, in partial fulfillment of the requirements for the degree of

Bachelor of Science in Mathematics, is a bona fide work done under my

supervision and guidance during the academic year 2023-2024.

Project Supervisor Head of the Department

Mr.Ashbin Mathew Dr.Viji M.

Assistant Professor Assistant Professor

Department of Mathematics Department of Mathematics

Place: Thrissur

Date: 14/03/2024

ii
Research and Post Graduate Department of Mathematics
St.Thomas College (Autonomous),Thrissur

CERTIFICATE

This is to certify that the project report entitled “ELLIPTIC CURVE

CRYPTOGRAPHY” submitted by Ms.Nandana T S with Registration

Number: THAVSMT010 to St. Thomas College (Autonomous), Thris-

sur, in partial fulfillment of the requirements for the degree of Bachelor

of Science in Mathematics, is a bona fide work done under my super-

vision and guidance during the academic year 2023-2024.

Project Supervisor Head of the Department

Mr.Ashbin Mathew Dr.Viji M.

Assistant Professor Assistant Professor

Department of Mathematics Department of Mathematics

Place: Thrissur

Date: 14/03/2024

iii
Research and Post Graduate Department of Mathematics
St.Thomas College (Autonomous),Thrissur

CERTIFICATE

This is to certify that the project report entitled “ELLIPTIC CURVE

CRYPTOGRAPHY” submitted by Ms.Sreedevi Das with Registration

Number: THAVSMT013 to St. Thomas College (Autonomous), Thris-

sur, in partial fulfillment of the requirements for the degree of Bachelor

of Science in Mathematics, is a bona fide work done under my super-

vision and guidance during the academic year 2023-2024.

Project Supervisor Head of the Department

Mr.Ashbin Mathew Dr.Viji M.

Assistant Professor Assistant Professor

Department of Mathematics Department of Mathematics

Place: Thrissur

Date: 14/03/2024

iv
Research and Post Graduate Department of Mathematics
St.Thomas College (Autonomous),Thrissur

CERTIFICATE

This is to certify that the project report entitled “ELLIPTIC CURVE

CRYPTOGRAPHY” submitted by Mr.Akash P Vasudev with Registra-

tion Number: THAVSMT016 to St. Thomas College (Autonomous),

Thrissur, in partial fulfillment of the requirements for the degree of

Bachelor of Science in Mathematics, is a bona fide work done under my

supervision and guidance during the academic year 2023-2024.

Project Supervisor Head of the Department

Mr.Ashbin Mathew Dr.Viji M.

Assistant Professor Assistant Professor

Department of Mathematics Department of Mathematics

Place: Thrissur

Date: 14/03/2024

v
Research and Post Graduate Department of Mathematics
St.Thomas College (Autonomous),Thrissur

CERTIFICATE

This is to certify that the project report entitled “ELLIPTIC CURVE

CRYPTOGRAPHY” submitted by Mr.Nawawy Abdul Kader K. with

Registration Number: THAVSMT046 to St. Thomas College (Au-

tonomous), Thrissur, in partial fulfillment of the requirements for the

degree of Bachelor of Science in Mathematics, is a bona fide work done

under my supervision and guidance during the academic year 2023-

2024.

Project Supervisor Head of the Department

Mr.Ashbin Mathew Dr.Viji M.

Assistant Professor Assistant Professor

Department of Mathematics Department of Mathematics

Place: Thrissur

Date: 14/03/2024

vi
DECLARATION

I, Ms.Athulya Kaladharan, hereby declare that the project entitled “EL-

LIPTIC CURVE CRYPTOGRAPHY” submitted to St. Thomas Col-

lege (Autonomous), Thrissur, in partial fulfillment of the requirements

for the degree of Bachelor of Science in Mathematics, is an original dis-

sertation conducted by me under the supervision of Mr.Ashbin Mathew,

Assistant Professor, Department of Mathematics, St. Thomas College

(Autonomous), Thrissur

Place: Thrissur Ms.Athulya Kaladharan

Date: 14/03/2024 Reg No:THAVSMT005

vii
DECLARATION

I, Ms.Nandana T S, hereby declare that the project entitled “ELLIP-

TIC CURVE CRYPTOGRAPHY” submitted to St. Thomas College

(Autonomous), Thrissur, in partial fulfillment of the requirements for

the degree of Bachelor of Science in Mathematics, is an original disser-

tation conducted by me under the supervision of Mr.Ashbin Mathew,

Assistant Professor, Department of Mathematics, St. Thomas College

(Autonomous), Thrissur

Place: Thrissur Ms.Nandana T S

Date: 14/03/2024 Reg No:THAVSMT010

viii
DECLARATION

I, Ms.Sreedevi Das, hereby declare that the project entitled “ELLIP-

TIC CURVE CRYPTOGRAPHY” submitted to St. Thomas College

(Autonomous), Thrissur, in partial fulfillment of the requirements for

the degree of Bachelor of Science in Mathematics, is an original disser-

tation conducted by me under the supervision of Mr.Ashbin Mathew,

Assistant Professor, Department of Mathematics, St. Thomas College

(Autonomous), Thrissur

Place: Thrissur Ms.Sreedevi Das

Date: 14/03/2024 Reg No:THAVSMT013

ix
DECLARATION

I, Mr.Akash P Vasudev, hereby declare that the project entitled “EL-

LIPTIC CURVE CRYPTOGRAPHY” submitted to St. Thomas Col-

lege (Autonomous), Thrissur, in partial fulfillment of the requirements

for the degree of Bachelor of Science in Mathematics, is an original dis-

sertation conducted by me under the supervision of Mr.Ashbin Mathew,

Assistant Professor, Department of Mathematics, St. Thomas College

(Autonomous), Thrissur

Place: Thrissur Mr.Akash P Vasudev

Date: 14/03/2024 Reg No:THAVSMT016

x
DECLARATION

I, Mr.Nawawy Abdul Kader K., hereby declare that the project

entitled “ELLIPTIC CURVE CRYPTOGRAPHY” submitted to St.

Thomas College (Autonomous), Thrissur, in partial fulfillment of the

requirements for the degree of Bachelor of Science in Mathematics,

is an original dissertation conducted by me under the supervision of

Mr.Ashbin Mathew, Assistant Professor, Department of Mathematics,

St. Thomas College (Autonomous), Thrissur

Place: Thrissur Mr.Nawawy Abdul Kader K.

Date: 14/03/2024 Reg No:THAVSMT046

xi
ACKNOWLEDGEMENTS
The success and final outcome of this project required a lot of guid-
ance and assistance from many people and I would like to thank all of
them. First and foremost, I pay my obeisance to God, the almighty to
have bestowed upon me good health, courage and inspiration. I express
my heartfelt thanks to Rev.Dr.Martin K A., Principal, St. Thomas Col-
lege (Autonomous), Thrissur.I owe my deepest gratitude to my super-
visor, Mr. Ashbin Mathew Assistant Professor, Department of Mathe-
matics, St. Thomas College (Autonomous), Thrissur, for his admirable
inspiration, constant courage and assistance in the preparation of this
project. I’m greatly indebted to Assistant Professor Dr. Viji M., Head
and all the faculty members of Department of Mathematics for their
support and cooperation. I am extremely thankful to my family and
friends for the whole hearted support, encouragement and love upon
me. I also place on record, my sense of gratitude to one and all who,
directly and indirectly, have lead their helping hand in this work

Place: Thrissur Ms.Athulya Kaladharan


Date: 14/03/2024 Reg No:THAVSMT005

xii
ACKNOWLEDGEMENTS
The success and final outcome of this project required a lot of guid-
ance and assistance from many people and I would like to thank all of
them. First and foremost, I pay my obeisance to God, the almighty to
have bestowed upon me good health, courage and inspiration. I express
my heartfelt thanks to Rev.Dr.Martin K A., Principal, St. Thomas Col-
lege (Autonomous), Thrissur.I owe my deepest gratitude to my super-
visor, Mr. Ashbin Mathew Assistant Professor, Department of Mathe-
matics, St. Thomas College (Autonomous), Thrissur, for his admirable
inspiration, constant courage and assistance in the preparation of this
project. I’m greatly indebted to Assistant Professor Dr. Viji M., Head
and all the faculty members of Department of Mathematics for their
support and cooperation. I am extremely thankful to my family and
friends for the whole hearted support, encouragement and love upon
me. I also place on record, my sense of gratitude to one and all who,
directly and indirectly, have lead their helping hand in this work

Place: Thrissur Ms.Nandana T S


Date: 14/03/2024 Reg No:THAVSMT010

xiii
ACKNOWLEDGEMENTS
The success and final outcome of this project required a lot of guid-
ance and assistance from many people and I would like to thank all of
them. First and foremost, I pay my obeisance to God, the almighty to
have bestowed upon me good health, courage and inspiration. I express
my heartfelt thanks to Rev.Dr.Martin K A., Principal, St. Thomas Col-
lege (Autonomous), Thrissur.I owe my deepest gratitude to my super-
visor, Mr. Ashbin Mathew Assistant Professor, Department of Mathe-
matics, St. Thomas College (Autonomous), Thrissur, for his admirable
inspiration, constant courage and assistance in the preparation of this
project. I’m greatly indebted to Assistant Professor Dr. Viji M., Head
and all the faculty members of Department of Mathematics for their
support and cooperation. I am extremely thankful to my family and
friends for the whole hearted support, encouragement and love upon
me. I also place on record, my sense of gratitude to one and all who,
directly and indirectly, have lead their helping hand in this work

Place: Thrissur Ms.Sreedevi Das


Date: 14/03/2024 Reg No:THAVSMT013

xiv
ACKNOWLEDGEMENTS
The success and final outcome of this project required a lot of guid-
ance and assistance from many people and I would like to thank all of
them. First and foremost, I pay my obeisance to God, the almighty to
have bestowed upon me good health, courage and inspiration. I express
my heartfelt thanks to Rev.Dr.Martin K A., Principal, St. Thomas Col-
lege (Autonomous), Thrissur.I owe my deepest gratitude to my super-
visor, Mr. Ashbin Mathew Assistant Professor, Department of Mathe-
matics, St. Thomas College (Autonomous), Thrissur, for his admirable
inspiration, constant courage and assistance in the preparation of this
project. I’m greatly indebted to Assistant Professor Dr. Viji M., Head
and all the faculty members of Department of Mathematics for their
support and cooperation. I am extremely thankful to my family and
friends for the whole hearted support, encouragement and love upon
me. I also place on record, my sense of gratitude to one and all who,
directly and indirectly, have lead their helping hand in this work

Place: Thrissur Mr.Akash P Vasudev


Date: 14/03/2024 Reg No:THAVSMT016

xv
ACKNOWLEDGEMENTS
The success and final outcome of this project required a lot of guid-
ance and assistance from many people and I would like to thank all of
them. First and foremost, I pay my obeisance to God, the almighty to
have bestowed upon me good health, courage and inspiration. I express
my heartfelt thanks to Rev.Dr.Martin K A., Principal, St. Thomas Col-
lege (Autonomous), Thrissur.I owe my deepest gratitude to my super-
visor, Mr. Ashbin Mathew Assistant Professor, Department of Mathe-
matics, St. Thomas College (Autonomous), Thrissur, for his admirable
inspiration, constant courage and assistance in the preparation of this
project. I’m greatly indebted to Assistant Professor Dr. Viji M., Head
and all the faculty members of Department of Mathematics for their
support and cooperation. I am extremely thankful to my family and
friends for the whole hearted support, encouragement and love upon
me. I also place on record, my sense of gratitude to one and all who,
directly and indirectly, have lead their helping hand in this work

Place: Thrissur Mr.Nawawy Abdul Kader K.


Date: 14/03/2024 Reg No:THAVSMT046

xvi
ABSTRACT
Cryptography is the practice and study of techniques for secure com-
munication in the presence of third parties. It involves encrypting and
decrypting data to ensure confidentiality, integrity, and authenticity.
Cryptography plays a crucial role in various applications such as se-
cure communication, digital signatures, secure transactions, and data
protection.There are mainly two types of cryptography : Symmetric
Cryptography and Asymmetric Cryptography. Classical cryptosystems
are those cryptosystems which were used in olden times. Now with
the advancement in technology modern cryptographic techniques have
gained popularity.
Elliptic curve cryptography is one such technique. The Elliptic Curve
Cryptography (ECC) is modern family of public-key cryptosystems,
which is based on the algebraic structures of the elliptic curves over fi-
nite fields and on the difficulty of the Elliptic Curve Discrete Logarithm
Problem (ECDLP). ECC implements all major capabilities of the asym-
metric cryptosystems: encryption, signatures and key exchange.Elliptic
curve analogue of Elgamal cryptosystem, Diffie Hellman key exchange
and comparison with RSA is studied. ECC has wide range of applica-
tions in the modern era.
There are several potential vulnerabilities to elliptic curve cryptogra-
phy.Although there are certain ways to attack ECC, the advantages of
elliptic curve cryptography for wireless security mean it remains a more
secure option. The increasing relevance and necessity of computers, on-
line data communication makes it necessary to learn how messages can
be conveyed securely.

xvii
Contents

CERTIFICATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
DECLARATION . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . xii
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
CONTENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii

0 PRELIMINARIES 1
0.1 Finite Field . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
0.2 Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
0.3 Congruent Modulo n . . . . . . . . . . . . . . . . . . . . . 2
0.4 Addition Modulo n . . . . . . . . . . . . . . . . . . . . . . . 2
0.5 Euler Totient Function . . . . . . . . . . . . . . . . . . . . 2
0.6 Primality and Factorization . . . . . . . . . . . . . . . . . 2

1 INTRODUCTION TO CRYPTOGRAPHY 3
1.1 Objectives of Cryptography . . . . . . . . . . . . . . . . . 3
1.2 Types of Cryprtography . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Secret Key Cryptography . . . . . . . . . . . . . . 4
1.2.2 Public Key Cryptography . . . . . . . . . . . . . . 4
1.3 Hash Functions . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 CLASSICAL CRYPTOSYSTEMS 6
2.1 The Shift Cipher: . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 The Substitution Cipher: . . . . . . . . . . . . . . . . . . . 7
2.3 The Vigenère Cipher: . . . . . . . . . . . . . . . . . . . . . 8
2.4 The Hill Cipher: . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 The Permutation Cipher: . . . . . . . . . . . . . . . . . . . 10

xviii
2.6 Rotor Mechanics: . . . . . . . . . . . . . . . . . . . . . . . . 10
2.7 Disadvantages of Classical Cryptosystems . . . . . . . . . 11

3 MODERN CRYPTOGRAPHIC SYSTEMS 13


3.1 Characteristics of Modern Cryptography . . . . . . . . . 13
3.2 Symmetric and Asymmetric Key Cryptosystems . . . . . 13
3.3 RSA Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.1 Working of RSA Algorithm . . . . . . . . . . . . . 14
3.4 ElGamal Cryptosystem . . . . . . . . . . . . . . . . . . . . 16
3.4.1 Ideal of ElGamal Cryptosystem . . . . . . . . . . . 16
3.5 Diffie-Hellman Key Exchange: . . . . . . . . . . . . . . . . 17

4 INTRODUCTION TO ELLIPTIC CURVES 19


4.1 Definition: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 Geometry of Elliptic Curves . . . . . . . . . . . . . . . . . 20
4.2.1 Adding Two Distinct Points on Elliptic Curves . 20
4.2.2 Adding a Point to itself on an Elliptic Curve . . . 22
4.2.3 Adding P and -P . . . . . . . . . . . . . . . . . . . 23
4.2.4 Adding P and -P if yp is 0 . . . . . . . . . . . . . . 23
4.3 Algebra of Elliptic Curves . . . . . . . . . . . . . . . . . . 24
4.3.1 Properties of Addition on E . . . . . . . . . . . . . 24
4.4 Elliptic Curves and Group . . . . . . . . . . . . . . . . . . 25
4.4.1 Finite Cyclic Groups: . . . . . . . . . . . . . . . . . 25
4.5 Elliptic Curve Over Finite Field . . . . . . . . . . . . . . . 25

5 ELLIPTIC CURVE CRYPTOGRAPHY 27


5.1 Elliptic Curve Cryptography over Finite Field . . . . . . 27
5.2 Elliptic Curve Discrete Logarithmic Problem . . . . . . . 29
5.3 Comparison : ECC and RSA . . . . . . . . . . . . . . . . . 29
5.4 Elliptic Analogue of ElGamal . . . . . . . . . . . . . . . . 30
5.5 Elliptic Analogue of Diffie Hellman . . . . . . . . . . . . . 30
5.6 Benefits of Elliptic Curve Cryptography . . . . . . . . . . 31
5.7 Limitations of Elliptic Curve Cryptography . . . . . . . . 31

Bibliography 34

xix
Chapter 0

PRELIMINARIES

0.1 Finite Field

Finite fields are any fields (abstraction of numbers) with a finite set of elements.It
also has mathematical operations (addition and multiplication) that can be per-
formed on the elements in the set and the following holds

1. These operators, addition (+) and multiplication (.), perform binary opera-
tions

2. The result of adding element c and d must be in the set, making addition
closed.

3. There exists a neutral element 0 such that 0 + c = c

4. There exists the identity element 1 such that 1.c = c

5. There exist -c such that -c + c = 0

6. There exists the inverse of c such that c.c−1 = 1

0.2 Group

In mathematics, a group is a set equipped with a binary operation that satisfies


certain properties. Such as, Closure, Associativity, Existence of Identity element,
Existence of Inverse element.

1
ELLIPTIC CURVE CRYPTOGRAPHY

0.3 Congruent Modulo n

For a positive integer n, two integers a and b are said to be congruent modulo
n (or a is congruent to b modulo n), if a and b have the same remainder when
divided by n (or equivalently if {(a-b)} is divisible by n). It can be expressed as
a ≡ b (mod n). Also,
a ≡ b (mod n) ⇔ n|(a − b)

Congruent Class Modulo n:


The set of all integers which have the same remainder as a when divided by n is
called the congruence class of a modulo n and is denoted by [a]

0.4 Addition Modulo n

For any positive integer n, let S be the complete set of residues {0, 1, 2, . . . , (n−1)}.
Then addition modulo n on S is defined as follows. For a and b in S , take the
usual sum of a and b as integers, and let r be the element of S to which the result
is congruent modulo n.

0.5 Euler Totient Function

The Euler totient function, denoted as φ(n), is a mathematical function that


counts the number of positive integers less than or equal to n that are relatively
prime to n. The formula for calculating the Euler totient function φ(n) of a
positive integer n is as follows:
     
1 1 1
φ(n) = n · 1 − · 1− · ... · 1 − (1)
p1 p2 pk

where n is the given positive integer, and p1 , p2 , . . . , pk are the distinct prime
factors of n.

0.6 Primality and Factorization

Primality refers to the property of a number to be prime. Factorization involves


breaking down a composite number into its prime factors.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 2


Chapter 1

INTRODUCTION TO
CRYPTOGRAPHY

Cryptography is the technique of securing information and communications through


use of codes so that only those person for whom the information is intended can
understand it and process it, thus preventing unauthorized access to information.
In Greek "Crypto” means hiding and "Graphy” means writings.
Encryption is the process by which a readable message is converted to an un-
readable form to prevent unauthorized parties from reading it. Decryption is the
process of converting an encrypted message back to its original (readable) format.
The original message is called the plaintext message. The encrypted message is
called the ciphertext message. Encryption algorithms take the plaintext, and
converts it into ciphertext, which is not understandable. A key allows the user to
decrypt the message, thus ensuring on they can read the message. The strength of
the randomness of an encryption is also studied, which makes it harder for anyone
to guess the key or input of the algorithm.

1.1 Objectives of Cryptography

Cryptography focuses on four different objectives:

1. Confidentiality

Confidentiality ensures that only the intended recipient can decrypt the mes-
sage and read its contents.

2. Non-repudiation

3
ELLIPTIC CURVE CRYPTOGRAPHY

Non-repudiation means the sender of the message cannot backtrack in the


future and deny their reasons for sending or creating the message.

3. Integrity

Integrity focuses on the ability to be certain that the information contained


within the message cannot be modified while in storage or transit.

4. Authenticity

Authenticity ensures the sender and recipient can verify each other’s identities
and the destination of the message.

1.2 Types of Cryprtography

Cryptography can be broken down into two different types:

1.2.1 Secret Key Cryptography

Secret Key Cryptography, or symmetric cryptography, uses a single key to encrypt


data. Both encryption and decryption in symmetric cryptography use the same
key, making this the easiest form of cryptography. The cryptographic algorithm
utilizes the key in a cipher to encrypt the data, and when the data must be accessed
again, a person entrusted with the secret key can decrypt the data. Examples:

• AES

• DES

• Caesar cipher

1.2.2 Public Key Cryptography

Public Key Cryptography, or asymmetric cryptography, uses two keys to encrypt


data. One is used for encryption, while the other key can decrypts the message.
Unlike symmetric cryptography, if one key is used to encrypt, that same key cannot
decrypt the message, rather the other key shall be used.One key is kept private,
and is called the “private key”, while the other is shared publicly and can be used
by anyone, hence it is known as the “public key”. The mathematical relation of
the keys is such that the private key cannot be derived from the public key, but
the public key can be derived from the private. The private key should not be

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 4


ELLIPTIC CURVE CRYPTOGRAPHY

distributed and should remain with the owner only. The public key can be given
to any other entity.

• ECC

• Diffie-Hellman

• DSS

1.3 Hash Functions

Hash functions are irreversible, one-way functions which protect the data, at the
cost of not being able to recover the original message. Hashing is a way to trans-
form a given string into a fixed length string. A good hashing algorithm will
produce unique outputs for each input given. The only way to crack a hash is
by trying every input possible, until you get the exact same hash. A hash can be
used for hashing data (such as passwords) and in certificates.

• MD5

• SHA-1

• Whirlpool

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 5


Chapter 2

CLASSICAL CRYPTOSYSTEMS

Definition: A cryptosystem is a five-tuple (P, C, K, E, D), where the following


conditions are satisfied:

1. P is a finite set of possible plaintexts

2. C is a finite set of possible ciphertexts

3. K is a finite set of possible keys, the keyspace

4. For each k ∈ K, there is an encryption rule ek ∈ E and a corresponding


decryption rule dk ∈ D. Each ek : P → C and dk : C → P are functions such
that dk (ek (p)) = p for every plaintext element p ∈ P .

2.1 The Shift Cipher:

The Shift Cipher is probably the most well know historical cipher. It is a monoal-
phabetic cipher, which is based on modular arithmetic. Ciphers are called monoal-
phabetic if, once a key is chosen, it maps each alphabetic character to a unique
alphabetic character. Here is the formal definition of the Shift Cipher:
Definition:
Let P = C = K = Z26 . For 0 ≤ k ≤ 25, define ek (p) = (p + k) mod 26 and
dk (c) = (c − k) mod 26, where (p, c ∈ Z26 ).
As can be seen from the definition the cipher has only 26 distinct keys. The famous
Caesar Cipher is a plain Shift Cipher with k = 3. In order to encipher a message
using the Shift Cipher one has to first choose a key. Using the table below a plain
text string should be converted to a string of integers. The next step is to add

6
ELLIPTIC CURVE CRYPTOGRAPHY

value of the key to each integer reducing it modulo 26. And at last sequence of
integers should be converted to a cipher text string.

Decryption works in the similar way. The difference is that during description
one should subtract value of the key instead of adding it. In order to encrypt a
word ”julius” using the Shift Cipher with key k = 3 one, as described above, would
convert the plaintext to a sequence of integers resulting (9 20 11 8 20 18). After
should be added to each of the integers reducing the result modulo 26 if needed.
9 + 3 = 11; 20 + 3 = 23; 11 + 3 = 14; 8 + 3 = 11; 20 + 3 = 23; 18 + 3 = 21

2.2 The Substitution Cipher:

The substitution cipher is another monoalphabetic cipher.


Definition:
Let P = C = Z26 . K consists of all possible permutations of the 26 symbols
0, 1, . . . , 25. For each permutation k ∈ K, define ek (p) = k(p) and dk (c) = k −1 (c),
where k −1 is the inverse permutation to k. The cipher is one of the oldest known
ciphers. Its key space consists out of 26! keys. Yet as will be demonstrated later
it is fairly easy to break it using basic cryptoanalysis techniques.To encrypt a
plaintext message one has to substitute all letters in the original text with the
corresponding ciphertext letters, using a permutation function. In the case of
English language a permutation function can be described by a mapping as given
below.

Using the mapping a word ”secret” can be encrypted to ”VUBTUX”. In order

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 7


ELLIPTIC CURVE CRYPTOGRAPHY

to decipher a ciphertext message one has to use the inverse function.

2.3 The Vigenère Cipher:

Unlike the cryptosystems described earlier, the Vigen´ere Cipher is a polyalpha-


betic cipher. That means it can map an alphabetic character to several others.
The cipher is named after Blaise de Vigen´ere who lived in 16th century. However
it was first described by Giovan Batista Belaso in 1553. The cipher is formally
defined as follows:
Definition:
Let m be a positive integer. Define P = C = K = (Z26 )m . For a key k =
(k1 , k2 , . . . , km ), define ek (p1 , p2 , . . . , pm ) = (p1 + k1 , p2 + k2 , . . . , pm + km ) and
dk (c1 , c2 , . . . , cm ) = (c1 − k1 , c2 − k2 , . . . , cm − km ), where all operations are per-
formed in Z26 .As can be seen from the definition the number of possible keywords
of length m is equal to 26m. To encipher a message one should first convert the
key and the plaintext message toa sequence of integers. For that purpose the table
given below is used.

After the integer string corresponding to the original message must be split on
n blocks of length m, where m is the length of the chosen key. The key is added
modulo 26 to each block.At last the blocks are concatenated and converted to
cipher text. As with the Shift Cipher tode crhhh h h njnk bhhhypt a message
one should subtract modulo 26 the key from each block. To demonstrate how
the procedure works we will encrypt a string ”attackatdown” using the keyword
”cipher” of length 6. The numerical equivalent of k is (2 8 15 7 4 17). The plain
text is transformed to integer string (0 19 19 0 2 10 0 19 3 14 22 13). Since m = 6
we split the plain text in two blocks and perform addition modulo 26.
Thus the ciphertext is ”CBIHGBCBSVAE”. In case if length of the plaintext is
not divisible by length of the key, only part of the key can be used for encoding the

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 8


ELLIPTIC CURVE CRYPTOGRAPHY

last several characters of the original message. To decrypt the ciphertext ”CBI-
HGBCBSVAE” we follow the same sequence of steps. The numerical equivalent
of k is (2 8 15 7 4 17). The ciphertext can be written using integers as (21 8 7 6 1
2 1 18 21 0 4). Now subtract value of the keyword modulo 26 from the ciphertext.

(0 19 19 0 2 10 0 19 3 14 22 13) corresponds to a string ”attracting”, which is


indeed the same as the encrypted message.

2.4 The Hill Cipher:

The Hill Cipher is another polyalphabetic cipher. It was invented by Lester S.


Hill in 1929,thus it is much younger than the ciphers described up to now. The
formal definition says:
Definition: Let m ≥ 2 be an integer. Let P = C = (Z)m and let K = {m × m
invertible matrices over Z26 }. For a key K ∈ K, define ek (p) = pK and dk (c) =
cK −1 , where all operations are performed in Z26 . The Hill Cipher applies a trans-
formation to a plaintext defined by a matrix K. To encipher a message, express
the plaintext as a sequence of integers.

The integer string should be split on blocks of length m so that each block would
have a form of Pn = (pn , 1, pn , 2, ..., pn , m). After multiplying each block 4Pn by a

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 9


ELLIPTIC CURVE CRYPTOGRAPHY

matrix K ciphertext is acquired.To decrypt, find the inverse linear transformation


 
11 3
K −1 . Example decryption of the ciphertext "CKHUMD" with key K =  
8 7
involves finding K −1
and applying it to the ciphertext.

2.5 The Permutation Cipher:

Another old cryptosystem described by Giovanni Porta in 1563.The Cryptosystem


is defined as follows:
Definition:
Let m be a positive integer. Let P = C = (Z)m and let K consist of all permuta-
tions of {1, 2, . . . , m}. For a key k (e.g. a permutation), we define ek (p1 , p2 , ..., p −
m)= (pk (1), pk (2), ..., pk (m)), and dk (c1 , c2 , ..., cm ) = (c−1 −1 −1
k (1), ck (2), ..., ck (m)),

where K −1 is the inverse permutation to k. Let us consider an example. First one


has to define a permutation such as the following.

The inverse permutation is defined as follows.


Since length of key m = 6 the plaintext message has to be broken on n groups
of length 6. If the last group consists of less than 6 letters a necessary number
of dummy symbols should be appended. Next step is to rearrange each group
according to the permutation defined previously.
To decipher a ciphertext message one should apply the inverse permutation.

2.6 Rotor Mechanics:

In the beginning of twentieth century mechanical encryption devices started to be


developed, in order to automate encryption/decryption process. They were called
rotor machines. The machines were using a substitution cipher, which was rotated

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 10


ELLIPTIC CURVE CRYPTOGRAPHY

each cycle. The idea was not new. It was already used during the American Civil
War. Probably the most well known rotor machine is Enigma.
The original Enigma was developed by Arthur Scherbius in 1919. During the
Second World War Germans used a variation of the original device. It used three
rotors chosen from a set of five. The three rotors were interconnected, so first rotor
would turn the second each full iteration, and second would turn the third. In
addition a number of extra mechanisms, a reflector for instance, were used to make
the cipher more secure. Due to incorrect usage of the devices Allies eventually
managed to break the code. The reading of information in the messages, Enigma
did not protect anymore, is sometimes credited with ending the war atleast a year
earlier than it would have otherwise.

2.7 Disadvantages of Classical Cryptosystems

1. Security Vulnerabilities: Many classical cryptosystems are vulnerable to known-


plaintext attacks, frequency analysis, and other techniques that exploit pat-
terns in the ciphertext.

2. Limited Key Space: Classical cryptosystems often have a limited number


of possible keys, making them susceptible to brute force attacks, where an
attacker systematically tries all possible keys until the correct one is found.

3. Lack of Scalability: Classical cryptosystems may not scale well for use in
modern computing environments, especially when dealing with large amounts
of data or high-speed communication channels.

4. Absence of Authentication: Many classical cryptosystems only provide confi-


dentiality and lack mechanisms for authentication, integrity, and non-repudiation,
which are essential for secure communication.

5. Difficulty in Key Management:Classical cryptosystems may require complex


key management procedures, such as securely exchanging keys between par-
ties, storing keys securely, and rotating keys periodically.

6. Susceptibility to Cryptanalysis: Classical cryptosystems may be susceptible


to cryptanalysis techniques that exploit weaknesses in the encryption algo-
rithm or the key management process, leading to the compromise of sensitive
information.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 11


ELLIPTIC CURVE CRYPTOGRAPHY

7. Limited Cryptographic Strength: Compared to modern cryptographic algo-


rithms based on mathematical principles like RSA or AES, classical cryp-
tosystems often lack the cryptographic strength necessary to withstand so-
phisticated attacks by modern computers and algorithms.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 12


Chapter 3

MODERN CRYPTOGRAPHIC
SYSTEMS

Modern cryptography is the cornerstone of computer and communications security.


Its foundation is based on various concepts of mathematics such as number theory,
computational-complexity theory, and probability theory.

3.1 Characteristics of Modern Cryptography

• It operates on binary bit sequences.

• It relies on publicly known mathematical algorithms for coding the informa-


tion. Secrecy is obtained through a secrete key which is used as the seed for
the algorithms. The computational difficulty of algorithms, absence of secret
key, etc., make it impossible for an attacker to obtain the original information
even if he knows the algorithm used for coding.

• Modern cryptography requires parties interested in secure communication to


possess the secret key only.

3.2 Symmetric and Asymmetric Key Cryptosystems

Asymmetric key cryptosystems, also known as public key cryptosystems, is more


modern practice than the symmetric key cryptosystems. In asymmetric key cryp-
tography, the decryption key is different than the key that was used to encrypt
the message.
Compared to symmetric key systems that are used to encrypt large amounts of

13
ELLIPTIC CURVE CRYPTOGRAPHY

data, asymmetric key cryptosystems are typically used to encrypt shorter mes-
sages. A combination of the two systems can be used for efficiency. A common
scenario is to use symmetric key encryption to encrypt large databases and ex-
change the shared key using asymmetric encryption.
The security of an asymmetric key cryptosystem relies on the security of the
private key.
Example : The Diffie-Hellman (D-H) key exchange protocol, the Digital Signature
Standard (DSS), and the Rivest, Shamir, Adleman (RSA) algorithm are some
examples of asymmetric key crypto-systems.

3.3 RSA Algorithm

The RSA algorithm (Rivest-Shamir-Adleman) is the basis of a cryptosystem -


a suite of cryptographic algorithms that are used for specific security services
or purposes - which enables public key encryption and is widely used to secure
sensitive data, particularly when it is being sent over an insecure network such as
the internet.
In RSA cryptography, both the public and the private keys can encrypt a
message. The opposite key from the one used to encrypt a message is used to
decrypt it. This attribute is one reason why RSA has become the most widely
used asymmetric algorithm: It provides a method to assure the confidentiality,
integrity, authenticity, and non-repudiation of electronic communications and data
storage.

3.3.1 Working of RSA Algorithm

1. Key Generation:

• Choose two large prime numbers, p and q.

• Compute their product n = p × q.

• Compute Euler’s totient function φ(n) = (p − 1) × (q − 1).

• Choose an integer e such that 1 < e < φ(n) and e is coprime to φ(n). e will
be the public exponent.

• Compute the modular multiplicative inverse d of e modulo φ(n). d will be


the private exponent.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 14


ELLIPTIC CURVE CRYPTOGRAPHY

2. Public and Private Keys:

• Public Key: (n, e)

• Private Key: (n, d)

3. Encryption:

• To encrypt a message M , the sender obtains the recipient’s public key (n, e).

• The sender computes the ciphertext C using the encryption function: C =


M e mod n.

4. Decryption:

• To decrypt the ciphertext C, the recipient uses their private key (n, d).

• The recipient computes the original message M using the decryption function:
M = C d mod n.

RSA Example:
Key Generation for Alice:

• Given primes: p = 11 and q = 13.

• Modulus: n = p × q = 143.

• Totient: φ(n) = (p − 1) × (q − 1) = 120.

• Public key: e = 7.

• Private key: Using Extended Euclidean Algorithm, d = 103.

Encryption by Bob:

• Bob encrypts his message M = 9 using Alice’s public key (n, e) = (143, 7).

• Ciphertext: C = M e mod n = 97 mod 143 = 48.

Decryption by Alice:

• Alice decrypts the ciphertext C = 48 using her private key (d, n) = (103, 143).

• Plaintext: M = C d mod n = 48103 mod 143 = 9.

Using RSA for Digital Signature and Confidentiality:

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 15


ELLIPTIC CURVE CRYPTOGRAPHY

• Alice can digitally sign a message by creating a hash of the message, encrypt-
ing the hash with her private key, and sending the encrypted hash along with
the message.

• Bob can verify the authenticity of the message by decrypting the hash with
Alice’s public key and comparing it with the hash of the original message.

• For confidentiality, Alice can encrypt her message with Bob’s RSA public key
before sending it.

• Digital certificates contain information about the certificate owner and their
public key, signed by a certificate authority, simplifying the process of ob-
taining and verifying public keys.

3.4 ElGamal Cryptosystem

ElGamal encryption is a public-key cryptosystem. It uses asymmetric key encryp-


tion for communicating between two parties and encrypting the message. This
cryptosystem is based on the difficulty of finding discrete logarithm in a cyclic
group, meaning even if we know g a and g k , it is extremely difficult to compute
g ak .

3.4.1 Ideal of ElGamal Cryptosystem

Suppose Alice wants to communicate with Bob.


Bob generates public and private keys:

• Bob chooses a very large number q and a cyclic group Fq .

• From the cyclic group Fq , he chooses any element g and an element a such
that gcd(a, q) = 1.

• Then he computes h = g a .

• Bob publishes Fq , h = g a , q, and g as his public key and retains a as private


key.

Alice Encrypts Data Using Bob’s Public Key:

• Alice selects an element k from cyclic group F such that gcd(k, q) = 1.

• Then she computes p = g k and s = hk = g ak .

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 16


ELLIPTIC CURVE CRYPTOGRAPHY

• She multiplies s with M . Then she sends (p, M ∗ s) = (g k , M ∗ s).

Bob Decrypts the Message:

• Bob calculates s′ = pa = g ak .

• He divides M ∗ s by s′ to obtain M as s = s′ .

3.5 Diffie-Hellman Key Exchange:

Diffie-Hellman key exchange is a method of digital encryption that securely ex-


changes cryptographic keys between two parties over a public channel without
their conversation being transmitted over the internet. The two parties use sym-
metric cryptography to encrypt and decrypt their messages.
For the sake of simplicity and practical implementation of the algorithm, we will
consider only 4 variables, one prime P and G (a primitive root of P ) and two
private values a and b. P and G are both publicly available numbers. Users (say
Alice and Bob) pick private values a and b and they generate a key and exchange
it publicly. The opposite person receives the key and that generates a secret key,
after which they have the same secret key to encrypt.
Step-by-step explanation:
Alice Bob
Public Keys available Public Keys available
P, G P, G
Private Key Selected Private Key Selected
a b
Key generated Key generated
x = Ga mod P y = Gb mod P
Exchange of generated keys takes place Exchange of generated keys takes place
Key received Key received
y x
Generated Secret Key Generated Secret Key
ka = y a mod P kb = xb mod P
Algebraically, it can be shown that Algebraically, it can be shown that
ka = kb ka = kb
Users now have a symmetric secret key to encrypt Users now have a symmetric secret key to encrypt

“‘
Example:

1. Step 1: Alice and Bob get public numbers P = 23, G = 9

2. Step 2: Alice selected a private key a = 4 and Bob selected a private key
b=3

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 17


ELLIPTIC CURVE CRYPTOGRAPHY

3. Step 3: Alice and Bob compute public values


Alice: x = (94 mod 23) = (6561 mod 23) = 6
Bob: y = (93 mod 23) = (729 mod 23) = 16

4. Step 4: Alice and Bob exchange public numbers

5. Step 5: Alice receives public key y = 16 and Bob receives public key x = 6

6. Step 6: Alice and Bob compute symmetric keys


Alice: ka = y a mod P = 65536 mod 23 = 9
Bob: kb = xb mod P = 216 mod 23 = 9

7. Step 7: 9 is the shared secret

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 18


Chapter 4

INTRODUCTION TO ELLIPTIC
CURVES

. Elliptic curves are not the same as ellipses and hence has little relation to ellipses
and conic sections.The name comes from certain integrals involved in computing
the arc length of an ellipse, which involve square roots of cubic and quadratic poly-
nomials in x. Elliptic curves appear in many diverse areas of mathematics, ranging
from number theory to complex analysis, and from cryptography to mathematical
physics.

4.1 Definition:

An Elliptic Curve is a curve given by an equation of the form

y 2 = x3 + Ax + B (4.1)

where A and B are constants .This type of equation is called a Weierstrass equa-
tion, and said to be in Weierstrass form, or Weierstrass normal form.
The definition of elliptic curve also requires that the curve be non-singular. Geo-
metrically, this means that the graph has no cusps, self-intersections, or isolated
points. Algebraically, this holds if and only if the discriminant, ∆, is not equal to
zero.
∆ = 4A3 + 27B 2 ̸= 0 (4.2)

Equivalently, the polynomial x3 + Ax + B has distinct roots. This ensures that

19
ELLIPTIC CURVE CRYPTOGRAPHY

the curve is non singular. We define E as the set.

E = {(x, y) : y 2 = x3 + Ax + B} ∪ {O} (4.3)

In projective geometry the point O = [0 : 1 : 0], is the unique intersection of the


curve with the line at infinity . Since the curve is smooth, hence continuous, it can
be shown that this point at infinity is the identity element of a group structure.

Figure 4.1: An example for elliptic curve

4.2 Geometry of Elliptic Curves

P + Q = R is the additive property defined geometrically.


Elliptic curve groups are additive groups; that is, their basic function is addi-
tion. The addition of two points in an elliptic curve 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 elliptic curve, the point -P
is also on the curve.

4.2.1 Adding Two Distinct Points on Elliptic Curves

Suppose that P and Q are two distinct points on an elliptic curve, and the P is
not -Q. To add the points P and Q, a line is drawn through the two points. This
line will intersect the elliptic curve in exactly one more point, call -R. The point
-R is reflected in the x-axis to the point R. The law for addition in an elliptic

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 20


ELLIPTIC CURVE CRYPTOGRAPHY

curve group is P + Q = R.

Figure 4.2: Draw the vertical line through R. It hits E in another point.

Figure 4.3: We define the sum of P and Q on E to be the reflected point. We denote it by P ⊗ Q
or just P +Q

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 21


ELLIPTIC CURVE CRYPTOGRAPHY

4.2.2 Adding a Point to itself on an Elliptic Curve

To add a point P to itself, a tangent line to the curve is drawn at the point P. If
yP is not 0, then the tangent line intersects the elliptic curve at exactly one other
point, -R. -R is reflected in the x-axis to R. This operation is called doubling the
point P ; the law for doubling a point on an elliptic curve group is defined by:

P + P = 2P = R

Figure 4.4: If we think of adding P to Q and let Q approach P , then the line L becomes the
tangent line to E at P .

Figure 4.5: Then we take the third intersection point R, reflect across the x-axis, and call the
resulting point P ⊗ P or 2P

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 22


ELLIPTIC CURVE CRYPTOGRAPHY

4.2.3 Adding P and -P

The line through P and -P is a vertical line which does not intersect the elliptic
curve at a third point; thus the points P and -P cannot be added as previously.
It is for this reason that the elliptic curve group includes the point at infinity O.
By definition, P + (−P ) = O. As a result of this equation, P + O = P in the
elliptic curve group. O is called the additive identity of the elliptic curve group;
all elliptic curves have an additive identity.

Figure 4.6: The vertical line through P and -P does not intersect E in a third point

4.2.4 Adding P and -P if yp is 0

The tangent from P is always vertical if


yP = 0.
If a point P is such that yP = 0, then the tangent line to the elliptic curve at
P is vertical and does not intersect the elliptic curve at any other point.
By definition, 2P = O for such a point P .
If one wanted to find 3P in this situation, one can add 2P + P . This becomes
P + O = P . Thus 3P = P .
3P = P, 4P = O, 5P = P, 6P = O, 7P = P , etc.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 23


ELLIPTIC CURVE CRYPTOGRAPHY

4.3 Algebra of Elliptic Curves

Point Addition: Consider two distinct points P and Q such that P = (x1 , y1 )
and Q = (x2 , y2 ). Let R = P + Q where R = (x3 , y3 ), then

x3 = λ 2 − x1 − x2

y3 = λ(x1 − x3 ) − y1
(y2 − y1 )
λ=
(x2 − x1 )
, λ is the slope of the line through P and Q.
Point Doubling :Consider a point P in the elliptic curve such that P =
(x1 , y1 ), where y1 ̸= 0. Let R = 2P where R = (x2 , y2 ), then

x2 = λ2 − 2x1

y2 = λ(x1 − x2 ) − y1
3x21 + a
λ=
2y1
, λ is the tangent at point P and a is one of the parameters chosen with the elliptic
curve.
Scalar multiplication: What point doubling shows us is that we can perform
a new kind of operation called scalar multiplication where P + P = 2P and 2
is a scalar multiple. This property is nonlinear and gives rise to two important
considerations: finite cyclic groups and the discrete log problem.

4.3.1 Properties of Addition on E

Theorem 4.3.1. The addition law on E has the following properties:

• (a) P + O = O + P = P for all P ∈ E.

• (b) P + (-P) = O for all P ∈ E.

• (c) P + (Q + R) = (P + Q) + R for all P, Q, R ∈ E.

• (d) P + Q = Q + P for all P, Q ∈ E.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 24


ELLIPTIC CURVE CRYPTOGRAPHY

4.4 Elliptic Curves and Group

The set of points on an elliptic curve form an abelian group under elliptic curve
point addition.

• The binary operator is closed. It either intersects with a 3rd point on the
curve or the point at infinity (identity).

• Associativity: Point addition is associative P + (Q + R) = (P + Q) + R for


all P, Q, R ∈ E

• Additive Identity: Given a point P (x, y) on the elliptic curve, there exists an
identity element such that 0 + P = P . This identity element is known as the
point at infinity.

• Additive Inverse: Given a point P (x, y) on the curve, there exists another
point P (x, −y) such that −P + P = 0.

• Commutativity: When we pick two points, there is only one other third point.
You can’t get four intersections in an elliptic curve. Since we only have one
possible solution, then it is clear that A + B = B + A.

4.4.1 Finite Cyclic Groups:

Scalar multiplication is defined as P + P = 2P and 2 is a scalar multiple. At


some scalar multiple n of a select P , we compute the point at infinity nP = 0.
For the select P , this means that there exists a finite set of multiples of P
called a finite cyclic group. And plot of {P, 2P, 3P, 4P, . . . , nP } over a finite
field is a scattershot of points showing the non-linearity of point addition in
finite cyclic groups.
This non-linearity is a great property in cryptographic systems because com-
puting the scalar multiple of a select point is easy but predicting the value
of the scalar given a point is quite difficult. This is the discrete logarithm
problem (DLP).

4.5 Elliptic Curve Over Finite Field

Let K = Fq be the finite field with q elements and E an elliptic curve defined over
K. While the precise number of rational points of an elliptic curve E over K is in

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 25


ELLIPTIC CURVE CRYPTOGRAPHY

general difficult to compute, the points over a finite field is comparatively easy to
compute. The number of points on the curve grows proportionally to the number
of elements in the field.
The set of points E( Fq ) is a finite abelian group. It is always cyclic or the product
of two cyclic groups, depending whether q is even or odd. For example, the curve
defined by y 2 = x3 − x over F71 has 72 points (71 affine points including (0,0) and
one point at infinity) over this field.

Elliptic curves over finite fields are notably applied in cryptography and for
the factorization of large integers. These algorithms often make use of the group
structure on the points of E. Algorithms that are applicable to general groups,
can thus be applied to the group of points on an elliptic curve.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 26


Chapter 5

ELLIPTIC CURVE
CRYPTOGRAPHY

The Elliptic Curve Cryptography (ECC) is modern family of public-key cryp-


tosystems, which is based on the algebraic structures of the elliptic curves over
finite fields and on the difficulty of the Elliptic Curve Discrete Logarithm Problem
(ECDLP).
ECC implements all major capabilities of the asymmetric cryptosystems: encryp-
tion, signatures and key exchange.
The ECC cryptography is considered a natural modern successor of the RSA cryp-
tosystem, because ECC uses smaller keys and signatures than RSA for the same
level of security and provides very fast key generation, fast key agreement and fast
signatures.

5.1 Elliptic Curve Cryptography over Finite Field

Cryptography uses elliptic curves in a simplified form (Weierstrass form), which


is defined as:
y 2 = x3 + Ax + B

, where A and B are constants


Generally in mathematics elliptic curve operations are defined over real numbers.
However, operations over the real numbers are inaccurate and slow due to round
off errors, whereas cryptographic operations need to be accurate and fast. To make
operations on elliptic curve accurate and more efficient, the curve cryptography is

27
ELLIPTIC CURVE CRYPTOGRAPHY

2 (where the
defined over two finite fields: Fp (where p is prime and p > 3) or Fm
fields size p = 2m). This means that the field is a square matrix of size p × p and
the points on the curve are limited to integer coordinates within the field only.
All algebraic operations within the field (like point addition and multiplication)
result in another point within the field. The elliptic curve equation over the finite
field Fp takes the following modular form:
y 2 ≡ x3 + Ax + B mod p
An elliptic curve over the finite field Fp consists of:

• a set of integer coordinates (x, y), such that 0 ≤ x, y < p

• staying on the elliptic curve: y 2 ≡ x3 + Ax + B mod p

Example: The elliptic curve over finite field y 2 ≡ x3 + 7 mod 17 consists of the
blue points in the figure, i.e. in practice the "elliptic curves" used in cryptography
are "sets of points in square matrix", not classical "curves".

Figure 5.1: Example of elliptic curve over the finite field F 17: y 2 ≡ x3 + 7 mod 17

It is pretty easy to calculate whether certain point belongs to certain elliptic


curve over a finite field. For example, a point {x, y} belongs to the curve y 2 ≡ x3 +7
mod 17 when and only when:
x3 + 7 − y 2 ≡ 0( mod 17)

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 28


ELLIPTIC CURVE CRYPTOGRAPHY

The point P (5, 8) belongs to the curve but the point (9, 15) does not belong
to the curve

5.2 Elliptic Curve Discrete Logarithmic Problem

The security of ECC depends on the difficulty of Elliptic Curve Discrete Logarithm
Problem. Let P and Q be two points on an elliptic curve such that kP = Q, where
k is a scalar. Given P and Q, it is computationally infeasible to obtain k, if k is
sufficiently large. But it is relatively easy to find Q where k and P are known.
k is the discrete logarithm of Q to the base P . Thus, point multiplication is the
basic operation in ECC. For example, the multiplication of a scalar ‘k’ with any
point ‘P ’ on the curve in order to obtain another point ‘Q’ on the curve.

5.3 Comparison : ECC and RSA

The ECC algorithm works on the elliptic curve discrete logarithm problem (ECDLP).
This cryptography method is harder to crack since there is no known solution to
the mathematical problem given by the equation producing the elliptical curve in
a graph. Therefore, only one way remains for hackers: a brute-force attack —
or a trial-and-error approach, in other words. This complexity makes ECC more
secure compared to RSA.
ECC by structure is more secure compared to RSA because it offers optimal se-
curity with shorter key lengths. As a result, it requires a lesser load for network
and computing power, which translates into a better user experience.

Table 5.1: RSA vs ECC Key Length Comparison


Security(in bits) RSA Key Length Required ECC Key Length Required
80 1024 160-223
112 2048 224-255
128 3072 256-383
192 7680 384-511
256 15360 512+

Elliptic Curve Cryptography (ECC) provides an equivalent level of encryption


strength as RSA (Rivest-Shamir-Adleman) algorithm with a shorter key length.
As a result, the speed and security offered by an ECC certificate are higher than
an RSA certificate for Public Key Infrastructure (PKI).

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 29


ELLIPTIC CURVE CRYPTOGRAPHY

Table 5.2: RSA vs ECC: Side by Side Comparison


RSA ECC
A well-established method of public-key cryp- A newer public-key cryptography method
tography. compared to RSA.
Works on the principle of the prime factoriza- Works on the mathematical representation of
tion method. elliptic curves.
RSA can run faster than ECC thanks to its ECC requires bit more time as it’s complex in
simplicity. nature.
RSA has been found vulnerable and is heading ECC is more secure than RSA and is in its
towards the end. adaptive phase.
RSA requires much bigger key lengths to im- ECC requires much shorter key lengths com-
plement encryption. pared to RSA.

5.4 Elliptic Analogue of ElGamal

There is a fixed publicly known finite field Fa . Elliptic curve E is defined over it
and the base point B ∈ E. Alice and Bob choose a random integer a and keeping
it secret and computes aB. They publish this point.
To send a message Pm to Bob, Alice chooses a random integer k and sends
the pair of points (kB, Pm + k(av B)) where av is Bob’s public key. To read the
message, Bob multiplies the first point in the pair by ay and subtracts from the
second point:
Pm + k(av B) − k(av B) = Pm
If Mr.X can solve the ECDLP, then he can determine av from the publicly
known information B and av B.

5.5 Elliptic Analogue of Diffie Hellman

Suppose U and V want to agree upon a key which will later be used in conjunction
with a classical cryptosystem. They first publicly choose a finite field F , and an
elliptic curve E defined over it. Their key will be constructed from a random point
P on the elliptic curve. Their task is to choose the point P in such a way that all
of their communication with one another is public and yet no one other than the
two of them knows what P is.
U and V first publicly choose a point B ∈ E to serve as their base and the
order of B should be very large. To generate the key, first U chooses a random
integer u of the order of magnitude q which U keeps secret. Then U computes
uB ∈ E which makes public. V also does the same; V choose a random integer v
and makes public vB. The secret key they use is Puv ∈ E. Note that both users

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 30


ELLIPTIC CURVE CRYPTOGRAPHY

can compute this key. However, M r.X, the third party, knows only uB and B.
Without solving ECDLP, i.e., finding u knowing B and uB (or finding u knowing
B and B), there seems to be no way to compute uvB knowing only uB and B.

5.6 Benefits of Elliptic Curve Cryptography

• Fast key generation: ECC cryptography’s key creation is as simple as securely


producing a random integer in a specific range, making it highly quick. Any
integer in the range represents a valid ECC secret key. The public keys in
the ECC are EC points, which are pairs of integer coordinates x, and y that
lie on a curve.

• Smaller key size: Cipher text, signatures, and Elliptic-curve cryptography


(ECC) is a public-key encryption technique based on the algebraic structure
of elliptic curves with finite fields. Compared to non-EC encryption (based on
ordinary Galois fields), ECC allows for fewer keys to guarantee equal security.

• Low latency: Signatures can be computed in two stages, allowing latency


much lower. By computing signatures in two stages, ECC achieves lower
latency than the inverse throughout. ECC has robust protocols for authorized
key exchange, and the technology has widespread adoption.

• Less computation power: Since the ECC key is shorter the computation
power is also less computational power, ECC offers high security with faster,
shorter keys compared to RSA and take more energy to factor than it does
to calculate an elliptic curve objective function.

• High security: A 256-bit ECC public key ensures comparable security to


a 3072-bit RSA public key. With ECC, you may obtain the same level of
security with smaller keys. ECC provides strong security in a world where
mobile phones must do more and more encryption with fewer computational
resources.

5.7 Limitations of Elliptic Curve Cryptography

• Large encryption size: ECC increases the size of the encrypted message sig-
nificantly more than RSA encryption. The default key length for ECC private

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 31


ELLIPTIC CURVE CRYPTOGRAPHY

keys is 256 bits, but many different ECC key sizes are conceivable depending
on the curve.

• A more complex: The ECC algorithm is more complete and more difficult to
implement than RSA. Algorithms cost have been computed from the compu-
tation of the elliptic curve operation and finite field operations that determine
the running time of the scalar multiplication integer sub-decomposition (ISD)
method.

• Complex security: Complicated and tricky to implement securely, mainly the


standard curves. If the key size used is large enough, ECC is regarded to be
highly secure. For internal communications, the US government needs ECC
with a key size of either 256 or 384 bits, depending on the sensitivity level of
the material being communicated.

• Binary curves: Processing of binary curves is costly. Elliptic curve cryptogra-


phy (ECC) employs elliptic curves over finite fields p (where p is prime and p
> 3) or Fm
2 (where the field size p = 2 m). This means that the field is a p × p

square matrix, and the points on the curve can only have integer locations
within the field.

CONCLUSION
Cryptography is the process of hiding or coding information so that only the person
a message was intended for can read it. The art of cryptography has been used
to code messages for thousands of years and continues to be used in bank cards,
computer passwords, and e-commerce. In today’s age of computers, cryptography
is often associated with the process where an ordinary plain text is converted to
cipher text which is the text made such that intended receiver of the text can
only decode it and hence this process is known as encryption. The process of
conversion of cipher text to plain text this is known as decryption. There are
many cryptographic techniques.
ECC is a powerful cryptography approach. It generates security between key
pairs for public key encryption by using the mathematics of elliptic curves. ECC
creates keys that are more difficult, mathematically, to crack. ECC has gradually
been growing in popularity recently due to its smaller key size and ability to
maintain security. This trend will probably continue as the demand on devices

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 32


ELLIPTIC CURVE CRYPTOGRAPHY

to remain secure increases due to the size of keys growing, drawing on scarce
mobile resourcesto also makes sense to adopt ECC to maintain high levels of
both performance and security. Also ECC is increasingly in wider use as websites
strive for greater online security in customer data and greater mobile optimization,
simultaneously. More sites using ECC to secure data means a greater need for this
kind of quick guide to elliptic curve cryptography.

Department of Mathematics, St.Thomas College (Autonomous), Thrissur 33


Bibliography

1. https://cryptobook.nakov.com/asymmetric-key-ciphers/elliptic-curve-cryptography-
ecc
2. https://www.techtarget.com/searchsecurity/definition/elliptical-curve-cryptography
3. https://www.geeksforgeeks.org/blockchain-elliptic-curve-cryptography/
4.https://www.techtarget.com/searchsecurity/definition/RSA
5.https://www.geeksforgeeks.org/classical-cryptography-and-quantum-cryptography/
6.https://en.wikipedia.org/wiki/Elliptic-curvecryptography::text=Elliptic2Dcurve20
cryptography20(ECC),fields)20to20provide20equivalent20security.
7.https://ebooks.inflibnet.ac.in/csp11/chapter/elliptic-curve-cryptosystem/
8.https://www.researchgate.net/publication/272162532Implementationof
ElGamalEllipticCurveCryptographyoverprimefieldusingC
9.https://enigbe.medium.com/about-elliptic-curves-and-dlp-ed76c5e27497
10.https://avinetworks.com/glossary/elliptic-curve-cryptography/
11.https://www.keyfactor.com/blog/elliptic-curve-cryptography-what-is-it-how-does-
it-work/
12.https://docs.oracle.com/cd/E19047-01/sunscreen151/806-5397/i996724/
index.html: :text=Encryption20is20the20process20by,is20called20the20plaintext20message.

34

You might also like