nurul alia eryana binti mohd zamri

47
DATA CONFIDENTIALITY FOR CAR-TO-CAR COMMUNICATIONS IN NS2 NURUL ALIA ERYANA BINTI MOHD ZAMRI BACHELOR OF COMPUTER SCIENCE (COMPUTER NETWORK SECURITY) WITH HONOURS UNIVERSITI SULTAN ZAINAL ABIDIN 2021

Upload: others

Post on 18-Dec-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NURUL ALIA ERYANA BINTI MOHD ZAMRI

DATA CONFIDENTIALITY FOR CAR-TO-CAR

COMMUNICATIONS IN NS2

NURUL ALIA ERYANA BINTI MOHD ZAMRI

BACHELOR OF COMPUTER SCIENCE (COMPUTER

NETWORK SECURITY) WITH HONOURS

UNIVERSITI SULTAN ZAINAL ABIDIN

2021

Page 2: NURUL ALIA ERYANA BINTI MOHD ZAMRI
Page 3: NURUL ALIA ERYANA BINTI MOHD ZAMRI

DATA CONFIDENTIALITY FOR CAR-TO-CAR

COMMUNICATIONS IN NS2

NURUL ALIA ERYANA BINTI MOHD ZAMRI

BACHELOR OF COMPUTER SCIENCE (COMPUTER

NETWORK SECURITY) WITH HONOURS

Universiti Sultan Zainal Abidin

2021

Page 4: NURUL ALIA ERYANA BINTI MOHD ZAMRI

i

DECLARATION

I hereby declare that this report is based on my original work except for quotations and

citations, which have been duly acknowledged. I also declare that it has not been

previously or concurrently submitted for any other degree at Universiti Sultan Zainal

Abidin or other institutions. I understand that cheating and plagiarism constitute a

breach of university regulations and will be dealt with accordingly.

_____________________________________

Name : Nurul Alia Eryana binti Mohd Zamri

Date : ............................................................

Page 5: NURUL ALIA ERYANA BINTI MOHD ZAMRI

ii

CONFIRMATION

This is to confirm that:

This project report entitled Data Confidentiality for Car-to-Car Communications in NS2

by Nurul Alia Eryana binti Mohd Zamri with matric number BTBL18050522 has been

satisfactory and conducted under my supervision.

________________________________

Name: Mr. Ahmad Faisal Amri Bin Abidin @ Bharun

Date: ........................................................

Page 6: NURUL ALIA ERYANA BINTI MOHD ZAMRI

iii

DEDICATION

Praise to Allah, the Most Gracious and the Most Merciful. Alhamdulillah, for

blessing me and giving me the strength and opportunity to complete this final year

project entitled Data Confidentiality for Car-to-Car Communications in NS2.

Firstly, my greatest appreciation to my family for always giving me advices and

for being supportive throughout this project. Next, I would like to take this opportunity

to express my appreciation and gratitude to my supervisor, Mr. Ahmad Faisal Amri bin

Abidin @ Bharun for the encouragement, guidance, comments, and motivation.

Without his continuous support, I will not be able to complete the whole project. Thank

you.

To Faculty of Informatics and Computing, and all lecturers in this faculty, I would

like to thank everyone for the opportunity and motivation that they gave towards us in

order to complete the project even though we are in the pandemic COVID-19.

Last but not least, I would like to take this chance to thank my best friends who

always been there when I was at my lowest. All the kind and supportive words and

helping hands during the completion of this project, I can’t express enough gratitude

how thankful I am. For that, I am grateful for having you guys.

Page 7: NURUL ALIA ERYANA BINTI MOHD ZAMRI

iv

ABSTRACT

The rapid advancement and growing an interest towards wireless communications have

been very much developed in the last decade. These technologies have given humans a

lot of convenience and changing many aspects to our lifestyles. An application area

which is expected to give a great benefit towards us is the car-to-car communications.

We also known this as Vehicular Ad-Hoc Networks (VANETs) which enables

information or data to be exchange among vehicles. VANETs is one of the subgroups

of Mobile Ad-Hoc Networks (MANETs) in which that vehicles or road-side units

(RSUs) nodes act both as end points and routers. It was believed that VANETs have a

wide range of applications such as prevention of collisions, road safety, blind crossing,

real time traffic condition monitoring, etc. However, such network may have

experienced some difficulty that need to be resolved first before they get implemented

in practice and people would use it comfortably. Most of the problems associated with

the security and privacy of VANETs. Hence, this project is to propose data

confidentiality for car-to-car communications in Network Simulator 2 (NS2) and also

using cryptography algorithm to encrypt the data send securely between vehicles.

Page 8: NURUL ALIA ERYANA BINTI MOHD ZAMRI

v

ABSTRAK

Kemajuan yang semakin pesat dan timbulnya minat terhadap komunikasi tanpa wayar

telah berkembang dengan banyak sejak dekad yang lalu. Teknologi ini telah

memberikan manusia banyak kemudahan dan mengubah banyak aspek dalam

kehidupan seharian kita. Satu kawasan aplikasi yang dijangka dapat memberikan

faedah kepada kita adalah komunikasi kereta ke kereta. Kita juga mengenali ia sebagai

“Vehicular Ad Hoc Network“ (VANETs) dimana ia membolehkan informasi atau data

dapat bertukar antara kenderaan. VANETs merupakan salah satu daripada kumpulan

rangkaian mudah alih iaitu MANET dimana kenderaan ataupun nod “road-side units”

(RSUs) yang bertindak sebagai titik akhir dan penghala. Ianya dipercayai bahawa

VANETs mempunyai pelbagai aplikasi yang luas seperti percenggahan perlanggaran,

keselamatan jalan, lintasan buta, pemantauan keadaan trafik secara masa nyata dan

lain lain. Walaubagaimanapun, rangkaian sebegini mungkin mengalami beberapa

masalah yang perlu diselesaikan terlebih dahulu sebelum ia dapat dilaksanakan secara

praktik dan orang dapat menggunakannya dengan selesa. Kebanyakan masalah-

masalah ini berkaitan dengan keselamatan dan privasi VANETs. Oleh itu, projek ini

adalah untuk mencadangkan kerahsiaan data antara kereta menggunakan “Network

Simulator 2” (NS2) dan juga menggunakan algoritma kriptographi untuk mengekripsi

data yang dihantar antara kenderaan dengan selamat.

Page 9: NURUL ALIA ERYANA BINTI MOHD ZAMRI

vi

CONTENTS

DECLARATION ........................................................................................................... i

CONFIRMATION ....................................................................................................... ii

DEDICATION ............................................................................................................. iii

ABSTRACT ................................................................................................................. iv

ABSTRAK .................................................................................................................... v

CONTENTS ................................................................................................................. vi

LIST OF TABLES ...................................................................................................... ix

LIST OF FIGURES ..................................................................................................... x

LIST OF ABBREVIATIONS .................................................................................... xi

CHAPTER 1 ................................................................................................................. 1

INTRODUCTION ........................................................................................................ 1

1.1 Project Background ......................................................................................... 1

1.2 Problem Statements ......................................................................................... 2

1.3 Objectives ........................................................................................................ 2

1.4 Scopes .............................................................................................................. 3

1.5 Limitation of Work .......................................................................................... 3

1.6 Expected result ................................................................................................ 4

1.7 Summary ......................................................................................................... 5

CHAPTER 2 ................................................................................................................. 6

LITERATURE REVIEW ........................................................................................... 6

Page 10: NURUL ALIA ERYANA BINTI MOHD ZAMRI

vii

2.1 Introduction ..................................................................................................... 6

2.2 Vehicular Ad Hoc Networks (VANETs) ........................................................ 7

2.2.1 Characteristics of VANETs ..................................................................... 8

2.2.2 Communication in VANETs .................................................................... 9

2.3 Data Confidentiality ...................................................................................... 12

2.4 Symmetric Key Encryption ........................................................................... 13

2.4.1 RC5 Encryption Algorithm .................................................................... 14

2.5 Network Simulator 2 (NS2) .......................................................................... 14

2.6 Existing projects and researches ................................................................... 15

2.6.1 An Efficient Data Transmission in VANET Using Clustering Method 16

2.6.2 Design and Simulation of Network Using NS2 ..................................... 16

2.6.3 Performance Analysis of RC5, Blowfish and DES Block Cipher

Algorithms ............................................................................................................ 17

2.7 Literature Review – Comparison of Network Simulators ............................. 18

2.8 Literature Review – Existing Projects and Researches ................................. 19

2.9 Summary ....................................................................................................... 20

CHAPTER 3 ............................................................................................................... 21

METHODOLOGY .................................................................................................... 21

3.1 Introduction ........................................................................................................ 21

3.2 Framework ......................................................................................................... 21

3.3 Algorithm ........................................................................................................... 23

3.4 Flowchart ............................................................................................................ 26

Page 11: NURUL ALIA ERYANA BINTI MOHD ZAMRI

viii

3.5 Proof of Concept ................................................................................................ 28

3.6 Software and hardware requirement .................................................................. 29

3.7 Summary ............................................................................................................ 31

REFERENCES ........................................................................................................... 32

Page 12: NURUL ALIA ERYANA BINTI MOHD ZAMRI

ix

LIST OF TABLES

TABLE TITLE PAGE

1.1 Key size and block size for different algorithms 4

2.1 Communication in VANETs 11

2.2 Comparison of network simulators 18

2.3 Existing research and projects 19

3.1 Encryption and decryption of Rc5 encryption algorithm 25

3.2 List of hardware used 29

3.3 List of software used 30

Page 13: NURUL ALIA ERYANA BINTI MOHD ZAMRI

x

LIST OF FIGURES

FIGURE TITLE PAGE

1.1 Graph of generic scalability of different algorithms 4

2.1 Communication in VANETs 9

2.2 Communication in VANETs 10

2.3 Process of symmetric key encryption 13

2.4 RC5 encryption algorithm 14

2.5 Architecture of NS2 15

3.1 Framework of data confidentiality for car-to-car

communications in VANETs

22

3.2 Flowchart of RC5 encryption algorithm 24

3.3 Flowchart of data confidentiality for car-to-car

communications in NS2

27

3.4 Installation of NS2 28

3.5 Installation of NAM and run it 28

3.6 Input the sample of Tcl script

29

Page 14: NURUL ALIA ERYANA BINTI MOHD ZAMRI

xi

LIST OF ABBREVIATIONS

VANETs Vehicular ad hoc networks

MANETs Mobile ad hoc networks

NS2 Network Simulation Version 2

RC5 Rivest Cipher 5

OBU On board unit

RSU Road side unit

V2V Vehicle-to-vehicle

V2I Vehicle-to-infrastructure

I2I Infrastructure-to-infrastructure

ITS Information transport systems

TA Trusted authority

TCP Transmission Control Protocol

OTcl Object Tool command language

NAM Network Animator

Page 15: NURUL ALIA ERYANA BINTI MOHD ZAMRI

1

CHAPTER 1

INTRODUCTION

1.1 Project Background

From the last decade, mobile telecommunications have gaining a significant

attention from both industry and research communities by providing anytime and

anywhere communication between different devices. They allow communication just

on the go between devices that made people lives easier. Valuable information such as

personal messages can be send swiftly with the help of internet nowadays.

Correspondingly, the concept of collaboration between information technology and

communication has easily supported the idea of communication between mobile

equipment (Tomar, Prateek, & Sastry, 2016). Among these technologies, vehicular ad

hoc networks (VANETs) have become very popular and being an eye-opening towards

many people who seek the safety among vehicles. VANETs were created by applying

the principles of a mobile ad hoc networks (MANETs) thus explained why it was

considered as a subgroup of MANETs. The similarity between these two networks is

that the nodes are self-organized and they can handle the information on their own

without a server.

Page 16: NURUL ALIA ERYANA BINTI MOHD ZAMRI

2

VANETs is an application where it mainly focused on the road and made their

journey safe and comfortable to meet the requirements of the users. It provides

communication between among vehicles to vehicles and vehicles to road side units

within the short range of 100 to 300 meters (Pallavi & Neha, 2016). In VANETs, every

node communicates by sharing data of traffic jam or other information. Data

interchanged over VANETs always be a vital role in traffic safety where important

information should be truthful and accurate. Other than that, drivers’ privacy should be

protected in order for unauthorized person would not interfere for every information

that the driver would be giving or the location of the car itself (Maria de Fuentes,

Gonzalez-Tablas, & Ribagorda, 2010). Security of these messages must be well secured

to avoid any problems in the future.

1.2 Problem Statements

Problem statement of this project are:

a) No authorization towards sensitive data in the car-to-car communication

environment.

b) Since these communications are in an open medium with wireless network, they

normally can be exposed with several attacks such as eavesdropping, traffic

analysis and brute force attacks.

1.3 Objectives

There are three main objectives to develop this project include:

a) To study the NS2 simulator as to create a network model to simulate the vehicles’

mobility

b) To secure car-to-car communications in VANETs by applying RC5 algorithm

encryption in NS2

Page 17: NURUL ALIA ERYANA BINTI MOHD ZAMRI

3

c) To test a secure communication model of vehicles in NS2

1.4 Scopes

This propose study involves two parties which are user and network models.

a) Scope of user

The owner of the driver or passenger of the vehicle

b) Network models

- Processes running on computing platforms capable of wireless communication

- Mounted on vehicles and road-side units

Other than that

a) To configure a NS2 network model to simulate the car mobility model

b) To simulate the car movements so that the cars can communicate in NS2

environment

c) The Rivest Cipher 5 (RC5) algorithm encryption will be used to be suited in the

car-to-car communications and will integrate the RC5 algorithm encryption in

the car mobility model

1.5 Limitation of Work

There are some limitations in this project which are:

a) Connection

This simulation dependent to Internet connection to be monitor in real-time

mode only

b) Security

Unauthorized towards sensitive data that its hard to maintain the security of

message content

Page 18: NURUL ALIA ERYANA BINTI MOHD ZAMRI

4

c) Multi-hop data delivery

Due to frequent disconnection and high mobility in the car-to-car

communications

d) Only limited to text-based data transmission

The transmission message between vehicles would only be in text-based way

1.6 Expected result

Based on (Verma & Singh, 2012) study, they decided that RC5 symmetric algorithm is

faster and simpler than Blowfish and DES block cipher algorithms.

Table 1.1: Key size and block size for different algorithms

Algorithm Key size (bits) Block size (bits)

RC5 0-2040 64

DES 64 64

Blowfish 448 64

Page 19: NURUL ALIA ERYANA BINTI MOHD ZAMRI

5

1.7 Summary

This chapter describes a few topics included in the introduction of the project

such as the background of the project, the problem statement, objective for this project,

scope, and the limitation of work. This it helps to organize better documentation of the

project.

• Smaller the memory usage

greater will be efficiency

• The encryption performance

must be high to be better

Figure 1.1: Graph of generic scalability of different algorithm

0

2

4

6

8

10

RC5 DES Blowfish

Generic Scalability of Different Algorithm

Cipher Encryption Performance

Memory Usage

Page 20: NURUL ALIA ERYANA BINTI MOHD ZAMRI

6

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

To come up with all elements in VANETs, a sufficient amount of research and

reviewing on the published articles was conducted to gather all the information needed.

The gather information was used to get a better understanding of the used and applied

technologies in this project. The literature review survey books, academic papers, and

all other sources related to a specified subject, field or study, or theory. The information

from these previous studies and researches will offers a definition, overview, and

critical assessment of these works and can be used as references and as inspiration in

developing the proposed simulation. At the end of this chapter will have summary and

the main points from each article regarding VANETs, data confidentiality, NS2, and

RC5 encryption algorithm.

Page 21: NURUL ALIA ERYANA BINTI MOHD ZAMRI

7

2.2 Vehicular Ad Hoc Networks (VANETs)

For the past few years, vehicular ad hoc networks (VANETs) have become very

popular and gaining a significant attention from both industry and research

communities. VANETs were created by applying the principles of a mobile ad hoc

networks (MANETs) thus explained why it was considered as a subgroup of MANETs.

According to (Skiles & Mahgoub, 2016), VANET is a wireless ad hoc network

that provides on-board unit (OBU) and roadside-unit (RSU) connectivity between

vehicles. The aims of VANETs are to provide mobile users with ubiquitous connectivity

while on the road, and to provide the Intelligent Transport System (ITS) with efficient

vehicle-to-vehicle (V2V) communications. It was used to design a safe and sound

infrastructure for moving vehicles on the road in order for drivers to feel the

convenience and secure journey. To achieve the road safety, vehicles serve as sensors

and warn each other about abnormal and potentially risky situations such as collisions,

traffic jams and glazes (P, T, & G, 2014). VANETs may varies in size, vehicle speed,

geographical location and intermittent communication with unreliable conditions.

VANETs contain OBU and RSU that are deployed along the highways and

roadsides, which provide communication between vehicle-to-vehicle (V2V)

communication and vehicle-to-infrastructure (V2I) communication. Other than that,

VANETs also consist of trusted authority (TA) that authenticates and manages the keys

for all those users of the VANETS environments. According to (Afzal & Kumar, 2019),

with the help of OBU, vehicles can interact with other moving vehicles by constructing

MANETs that allow wireless interaction in an exclusively distributed way and can

interact with RSU with the help of infrastructures.

Page 22: NURUL ALIA ERYANA BINTI MOHD ZAMRI

8

2.2.1 Characteristics of VANETs

The characteristics of VANETs are basically a mixture of wireless medium

characteristics (Tomar, Prateek, & Sastry, 2016)

a) High mobility – The nodes are usually moving at a very high speed. It will make

it harder to predict a node’s position as well as to make a protection towards the

privacy of the node.

b) Rapid changing network topology – The speed and direction of vehicles have

constantly changing that may result in high dynamic topology

c) Unlimited power and storage – The nodes in VANETs are supposed to be capable

of providing an infinite amount of power as well as storage capacity. Therefore,

without the basis for power consumption or storage waste, the nodes are free to

exchange data.

d) No constraint on battery power and storage – The nodes in VANETs have a better

quality on the battery power and storage compared to sensor networks.

e) Wireless communication – Nodes are connected and exchange their information

through wireless.

f) Frequent exchange of information – The ad hoc nature of VANETs motivate the

nodes to collect data from the other vehicles and side units of the lane. Therefore,

the exchange of information between nodes is frequent.

g) Large scale network – The network in vehicular ad-hoc networks is scalable

where a large number of new nodes can be added.

Page 23: NURUL ALIA ERYANA BINTI MOHD ZAMRI

9

2.2.2 Communication in VANETs

Various type of communication techniques is used in VANETs:

Figure 2.1: Communication in VANETs

Vehicle-to-vehicle (V2V) communication: It refers to a wireless network where

automobiles which are vehicles such as cars or buses send messages to each other with

information about whatever they are doing. Speed, position of the vehicles, direction of

travel, braking and loss of stability will include in the data. It shows a great promise in

help prevent accidents, alleviate traffic congestion and enhance the environment. No

road side unit is required and vehicles can communicate directly with each other.

(Pallavi & Neha, 2016)

Advantages of V2V communication (Tanuja, Sushma, Bharathi, & Arun, 2015):

a) Enables short and medium range communication

b) No roadside infrastructure is needed

c) Lower cost

d) It facilitates the delivery of short message

Communication

in VANETs

V2V

V2I

I2I

Page 24: NURUL ALIA ERYANA BINTI MOHD ZAMRI

10

Disadvantages of V2V communication (Tanuja, Sushma, Bharathi, & Arun, 2015):

a) Frequent partitioning of topologies due to high mobility

b) Long range contact issues

c) Using traditional protocols are difficult

d) Problems in broadcasting messages in heavy traffic

Vehicle-to-Infrastructure (V2I) communication: In V2I, vehicles are able to

communicate with the fixed roadside unit. The RSU is located at the corner of the road

within the specified range and slows higher data rates. RSU is connected to the Internet,

which offer numerous entertainment facilities. (Pallavi & Neha, 2016). They mainly use

for information and data collection. (Cunha, Azzedine, Leandro, Aline, & Antonio,

2014)

A single hop V2V communication can be occurred when one vehicle communicates

with another vehicle directly if there is a direct wireless connection accessible between

them. If there is no direct connection between them, a dedicated routing protocol is used

to forward data from a vehicle to another before it reaches the destination location,

providing a multi hop V2V communication. More information transmitted between the

vehicle and RSU is secure since the RSU gives each and every user connected through

it with a unique key.

V2I system should contain these parts:

a) Vehicle On-Board Unit or Equipment (OBU/OBE)

b) Road Side Unit or Equipment (RSU/RSE)

c) Safe communication channel

Page 25: NURUL ALIA ERYANA BINTI MOHD ZAMRI

11

Infrastructure-to-Infrastructure (I2I) communication: Or also known as Hybrid

communication, it combines V2V and V2I. A vehicle may either communicate with the

roadside infrastructure in a single hop or multi-hop fashion, also depending on the

distance whether it can reach the roadside unit directly or not. It makes long distance

connection to the Internet or to far-away cars.

Table 1.1: Communication in VANETs

Communications in VANETs Descriptions

Vehicle-to-Vehicle (V2V)

Communication

It refers to a wireless network where vehicles

such as cars and buses send messages to each

other with information.

Vehicle-to-Infrastructure

(V2I) Communication

Vehicles are able to communicate with the fixed

roadside unit (RSU). The RSU is connected to the

Internet, which offer numerous entertainment

facilities.

Infrastructure-to-

Infrastructure (I2I)

Communication

A vehicle may either communicate with the RSU

in a single hop or multi-hop fashion, also

depending on the distance whether it can reach

the RSU directly or not.

Figure 2.2: Communication in VANETs

Page 26: NURUL ALIA ERYANA BINTI MOHD ZAMRI

12

2.3 Data Confidentiality

Confidentiality in VANETs is needed in V2V communication. Data

confidentiality ensures that private or confidential information is not made available to

unauthorized people or disclosed to them. Safety in VANETs is of special concern

because human lives may be constantly at stake. They need their personal information

to be more secure and protected against unintentional, unlawful, or unauthorized access,

disclosure, or theft. Based on (Jun & Sheikh, 2019), confidentiality ensures that the

designated user has access to the data while unauthorized person will not be able to get

the data until the confidential data were received by the designated user.

Continuing from (Jun & Sheikh, 2019), confidentiality assurances can be

encrypted by using certificates and by exchanging public keys for all messages and only

designated vehicles will get the access. Confidentiality is guaranteed through the

cryptographic solutions. In this section is the list of common threats on confidentiality:

a) Eavesdropping attack: Eavesdropping is very common in VANETs that the

objective of this attack is to get the confidential data from the protected information.

Therefore, confidential information such as user identification and location of data that

can be used to track vehicles can be revealed to non-registered users.

b) Traffic analysis attack: Traffic analysis attacks are based on what the attacker

hears in the network. The attacker simply listens to the network communication to

perform traffic analysis to determine the location of key nodes the routing structure and

even the application behavior patterns. Then the attacker will analyze all the information

and try to launch attacks.

c) Man-in-the-Middle attack: This attack takes place to closely inspect and modify

the messages in the V2V communications. The intruder may get the whole V2V

Page 27: NURUL ALIA ERYANA BINTI MOHD ZAMRI

13

communication access and power, but the communication entities assume they can

communicate directly with each other in private.

2.4 Symmetric Key Encryption

In symmetric key encryption, which also known as secret key or single key

encryption, is a type of encryption that only one key is used to both encrypt and decrypt

electronic information. The private key should be kept confidential because it is used to

encrypt and decrypt files and only those that have that private key can read the encrypted

document. The data is converted to a form that nobody can understood who does not

hold that secret key to decrypt it. Once the recipient has the key that has the messages,

the algorithm will reverse its action so that the message is return to the original form

and can be understand by the recipient.

Figure 2.3: Process of symmetric key encryption (Nampally, Sharma, & Balaji, Traditional

Data Encryption Methods for VANET, 2017)

Advantages of symmetric key encryption:

a) They have short key size

b) Fast: Symmetric key encryption is much faster than asymmetric key encryption

c) They are simple: Since the symmetric key encryption only have one key that

needed to encrypt and decrypt information.

Page 28: NURUL ALIA ERYANA BINTI MOHD ZAMRI

14

2.4.1 RC5 Encryption Algorithm

Following (Mohammed, 2013) study, Rivest Cipher 5 (RC5) encryption

algorithm is a symmetric key block encryption algorithm designed by Ron Rivest in

1995. It converts plain text data blocks of 16, 32, and 64 bits into cipher text blocks of

the same length. It is notable for being simple and easy to implement, fast which implies

that RC5 is word-oriented and consume less memory so that it may be easily

implemented on smart cards or other devices with restricted memory.

Figure 2.4: RC5 Encryption Algorithm (Mohammed, 2013)

According to (Verma & Singh, 2012), there are three modules in RC5 which are

key-expansion, encryption and decryption units. The algorithm for key expansion is

used to generate the round sub keys that both encryption and decryption algorithms will

be used. RC5 has different encryption and decryption algorithm. It uses integer addition

modulo 2w in encryption but in decryption it uses integer subtraction module 2w.

2.5 Network Simulator 2 (NS2)

Network Simulator 2, also known as NS2, is an open-source event-driven

simulator designed specifically for research in computer communication networks. NS2

provides simulation for routing and multicast protocols for both wired and wireless

networks. It can run on different platforms that are UNIX (or Linux), Windows and

MAC systems. It provides support for simulation of Transmission Control Protocol

Page 29: NURUL ALIA ERYANA BINTI MOHD ZAMRI

15

(TCP) and it is one of the core protocols of the Internet protocol suite. It has many

benefits that make it a valuable tool, such as has advantages of large number of available

models and supports deterministic or probabilistic packet loss in queues attached to

network nodes (Nampally & Sharma, Simulators for VANET, 2017). The most recent

version of NS2 is NS-2.35.

NS2 is implemented using both the Object Tool command language (OTcl) and

C++ languages. C++ is a compiled programming language that is used to implement the

detail protocol while OTcl is used to create and control the simulation environment

itself. By combining both languages, they can exploit TLC/C++ interface, called as

TclCL to allow interaction between them. Tools such as NAM (Network AniMator) and

XGraph are used when corporates with NS2.

Figure 1.5: Architecture of NS2 (Subramaniam, 2009)

2.6 Existing projects and researches

In this part, the previously researches to the proposed project was studies and

will be discussed. For every mentioned paper, some explanations along with its

advantages will be discussed in order to provide some familiarities and understanding

regarding these previous studies.

Page 30: NURUL ALIA ERYANA BINTI MOHD ZAMRI

16

2.6.1 An Efficient Data Transmission in VANET Using Clustering Method

This paper by (Suganthi, 2017) proposed technique utilizes the clustering

method to conquer Sybil attack which prompts to a protected communication network

on detection of Sybil nodes. In VANETs, clustering is used on order to split the network

into groups of mobile vehicles and boost routing, data collection and clustering. Two

different approaches: 1. stating clustering which is based on V2I communications in

which RSU act as static cluster heads. The vehicles are related to RSUs thus in order to

have communication and connectivity with the Internet in real time. Sometimes,

because of the great distance between the RSUs, the RSUs are not always linked to

vehicles with high mobility. 2. Dynamic clustering which is based on V2V

communications. The heads cluster were chosen from cluster members. The idea of

static cluster heads is altered by this method. As the dynamic clusters are in motion on

the road, the vehicles either join or leave the clusters according to their speed to the

identified cluster heads. The proposed technique has improved the network’s overall

performance and the reliability which results in improved throughput and less delay.

The clusters that were created also was stable.

2.6.2 Design and Simulation of Network Using NS2

In this paper, (Mohammed, 2013) presented a study of how to design and

simulate of network using NS2 by using a cryptography algorithm as to security

information. The author also defines the configuration for the simple network and uses

the NS2 simulator to build a corresponding model by using NS2 simulator,

demonstrates the selected characteristics of the specified network configuration using

the simulation model, and displays the data transfer scenario between nodes. NS2 were

used in this research paper by implementing the RC5 encryption algorithm to cipher

Page 31: NURUL ALIA ERYANA BINTI MOHD ZAMRI

17

package data transmission that transfer between 35 nodes with AODV routing protocol.

At the end of this research, the author concluded that NS2.28 were used in the research

as tool to design a network of the simulation. RC5 incorporates rotations that indicates

to strengthen the algorithm and to secure a package transfer of information between

nodes and communications. The author also highlighted for a future work to combine

of two types of cryptographic algorithm to be more secure transmission.

2.6.3 Performance Analysis of RC5, Blowfish and DES Block Cipher Algorithms

In this paper, performance analysis of RC5, Blowfish and DES block cipher

algorithms have been done on the basis of execution time and resource utilization. For

assessing resource usage, both CPU utilization and memory utilization are taken into

account. The parameterized algorithm of these three algorithms encrypts two w-bits at

a time. RC5, Blowfish and DES block cipher algorithms in this research were compared

in C# in Visual Studio 2009. The authors (Verma & Singh, 2012) concluded that RC5

block cipher is faster and simpler than Blowfish and DES block cipher algorithms where

high encryption rates are needed, RC5 was beneficial.

Page 32: NURUL ALIA ERYANA BINTI MOHD ZAMRI

18

2.7 Literature Review – Comparison of Network Simulators

Table 2.2: Comparison of Network Simulators

Simulator License Environment Simulation

Language

Advantages Limitations

NS2 Open

source

- provides substantial

support for simulation of

TCP, routing, and

multicast protocols over

wired and wireless

networks

- C++ used to

implement the

detailed protocol

- OTcl used to

create and control

the simulation

environment itself

- has advantages of large

number of available models

- supports deterministic or

probabilistic packet loss in

queues attached to network

nodes

- can be hard to use

and need advanced

skills needed to

perform the

simulations

Simulation of

Urban

MObility

(SUMO)

Open

source

- microscopic road traffic

simulation package

- can manage large

environments

- TraCI is available

in different

programming

languages: C++,

Java, Python, and

MATLAB

- no limitations in road

network size and vehicle

number

- can combine with

openstreetmap.org, can

simulate traffic in different

locations of the globe

- its generated

traces cannot be

directly used by the

available network

simulators since

SUMO is a pure

traffic generator

Traffic and

Network

Simulation

Environment

(TraNS)

Open

source

- It is an integration of

traffic simulator (SUMO)

with network simulator

(NS2) to generate realistic

simulation of VANETs

- Java

- C++

- TraNS can support

visualization using Google

Earth

Mobility

model

generator for

vehicular

networks

(MOVE)

Open

source

- it is implemented in Java

and runs on the top of

micro traffic simulator

SUMO

- Java - provides a GUI that allows

the user to quickly generate

realistic simulation

scenarios

- didn’t have a

continuous

development in

software

Page 33: NURUL ALIA ERYANA BINTI MOHD ZAMRI

19

2.8 Literature Review – Existing Projects and Researches

Table 2.3: Existing projects and researches

Author/Year Title Descriptions Approach(es) Advantages

(Suganthi, 2017) An Efficient Data

Transmission in

VANET Using

Clustering Method

- the proposed technique

utilizes the clustering

method to conquer Sybil

attack which prompts to a

protected communication

network on detection of

Sybil nodes

- static clustering which

is based on V2I

communication in which

the RSU act as static

cluster heads

- dynamic clustering

which is based on V2V

communication

- overall performance

and efficiency of

network has an

increasing throughput

- less delay

- the clusters are stable

(Mohammed, 2013) Design and

Simulation of

Network Using NS2

- presenting how to use

network simulator NS2

simulation for designing

networks and using

cryptography algorithm as

to security information

- NS2 as simulation tool

that use C++ language

and OTcl as its scripting

language

- Cryptography algorithm

to send data securely

between two nodes

- RC5 incorporates

rotations that indicates

to strengthen the

algorithm

(Verma & Singh, 2012) Performance Analysis

of RC5, Blowfish and

DES Block Cipher

Algorithms

- performance analysis of

RC5, Blowfish and DES

block cipher algorithm

which have been done on

the basis of execution

time and resource

utilization

- symmetric encryption:

RC5, Blowfish and DES

block cipher algorithm

- The authors decided

that RC5 is faster and

simpler than Blowfish

and DES block cipher

algorithm

Page 34: NURUL ALIA ERYANA BINTI MOHD ZAMRI

20

2.9 Summary

This chapter provides an overview anything related to this project; data

confidentiality, car-to-car communications, and NS2. Literature review helps in

determining whether the technology has been studied before or not. It also helps

determining the idea and technology that will be used in this project to develop a better

project compared to the previous one. The algorithm that being used will be a help in

generate a better of project research in the future. A literature review is done to ensure no

identical research is done.

Page 35: NURUL ALIA ERYANA BINTI MOHD ZAMRI

21

CHAPTER 3

METHODOLOGY

3.1 Introduction

This chapter will introduce and discuss the methodology that has been used to

develop this project. Methodology is a systematic way to solve the research problem by

applying technique, algorithm and method. Research on this topic is done to understand in

depth on the technique and algorithm used during implementation. By using the

methodology, it can ensure an exact process and increases the probability of achieving the

desired final objective. This project will be focused more to obtain the objectives of the

project.

3.2 Framework

This part will be discussed and focused more on simulation of the framework.

Simulation is an approximate imitation of a process or device running over time that reflects

its operation. Thus, in this project, the NS2 simulator will be used as to create a network

model to simulate the vehicles’ mobility.

Page 36: NURUL ALIA ERYANA BINTI MOHD ZAMRI

22

Figure 3.1: Framework of data confidentiality for car-to-car communications in NS2

This figure shows the framework of this project. Firstly, the NS2 and NAM were

installed in Ubuntu 16.04 where it was found that Ubuntu 16.04 is the most compatible

version for NS2. Next, create a network model to simulate the vehicle's mobility in the

NS2. The simulation will be tested and evaluate whether user is satisfied enough with the

network model. After that, need to apply the RC5 encryption algorithm in the VANETs

environment and then only we will like need to see how the vehicles move and

communicate between each other. Must also make sure whether the transmission between

vehicles and vehicles are secure and the data confidentiality too. Thus, if everything is

secure and confidentiality is guaranteed enough, a result and discussion can be done. If not,

need to look back at the algorithm to make an improvement in the network model. The

simulation can be done again until the confidentiality data is secure in this VANETs

environment.

Page 37: NURUL ALIA ERYANA BINTI MOHD ZAMRI

23

3.3 Algorithm

This chapter will discuss about the algorithm that will be used to carry out of the

project. It will also explain thoroughly about the algorithm and the reason why it was

chosen. The algorithm that will be apply in the VANETs environment is RC5 encryption

algorithm. It is a symmetric key block encryption algorithm designed by Ron Rivest in

1995. It converts plain text data blocks of 16, 32, and 64 bits into cipher text blocks of the

same length.

Keywords:

w = word size (two word blocks, 16, 32, 64 bits)

r = number of rounds (0-255)

b = number of bytes in secret key (0-255)

K = b-byte secret key: K[0], K[1]

e.g.: RC5 – w/r/b

RC5 – 32/16/10 = 32-bit words, 16 rounds, 10 byte expanded key table of 2(16+1) = 34

Page 38: NURUL ALIA ERYANA BINTI MOHD ZAMRI

24

Figure 3.2: Flowchart of RC5 encryption algorithm

Step 1: XOR C & D of each round to produce E

Step 2: Circular left shift E by D bits

Step 3: E added to next sub key

Step 4: XOR D & F to produce G

Step 5: Circular left shift G by F bits

Step 6: G is added to next sub key

Step 7: increment I by 1

I = i+1

If i<r

Call F as C again

Call H as D again

Go back to step 1

Else

Stop

End if

Page 39: NURUL ALIA ERYANA BINTI MOHD ZAMRI

25

Table 3.1: Encryption and decryption of RC5 encryption algorithm

ENCRYPTION A = A + S[0]

B = B + S[1]

For i=1 to r do

{

A = ((A XOR B) <<< B) + S[2i]

B = ((B XOR A) <<< A) + S[2i+1]

}

next i

Input: Plain text stored in two w-bit

input registers A and B. r denotes the

no of rounds and 2r+2 w-bit round

keys S[0,1, …, 2r+1]

Output: Cipher text will be store in

A and B

DECRYPTION For i=r down to I do

{

A = ((B-S[2i+1) >>>A) XOR A

B = ((A-S[2i) >>>B) XOR B

}

next I

B = B-S[I]

A = A-S[0]

Input: Cipher text stored in two w-

bit input registers A and B. r denotes

the no of rounds and 2r+2 w-bit

round keys S[0, 1, ..., 2r + 1]

Output: Plain text will be store in A

and B

Page 40: NURUL ALIA ERYANA BINTI MOHD ZAMRI

26

3.4 Flowchart

Flowchart is a type of diagram that represents a workflow or process. In this part,

flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-

step approach in data confidentiality for car-to-car communications in NS2.

Figure shows the flowchart for data confidentiality for car to car communications

in NS2. This simulation involved user and the NS2 server itself. In this project, NS2 and

NAM were installed in Ubuntu Linux operating system before the start of simulation. After

the installation was completed, TCl script will be upload to be read and simulate in the

NS2. The TCl script that was uploaded is edited according to the requirement of the

network to be tested. Secondly, apply the RC5 encryption algorithm in the TCl script too

so that it can be tested whether the algorithm is success or not. Next, the TCl script will be

executed and network was scanned in NS2. A trace file will be executed automatically

saved as the output after being simulated in the NS2. The NAM will present a visual

simulation of traffic in the network. After that, the trace file produced was analyse in an

analyser such as Perl. Then, the analysed result was output to be studied and a graph was

plotted from the result that would appear at XGraph if we input the command needed.

Lastly, the evaluation of the result from simulation will be done and the user will decide if

he is satisfied with the current network model. If the user is satisfied, then the whole system

is success. If not, the work will be repeat by input another TCl script with the encryption

algorithm that much secure for the improvement of data confidentiality in the VANETs

until the user is satisfied.

Page 41: NURUL ALIA ERYANA BINTI MOHD ZAMRI

27

Figure 3.3: Flowchart of data confidentiality for car-to-car communications in NS2

Page 42: NURUL ALIA ERYANA BINTI MOHD ZAMRI

28

3.5 Proof of Concept

Figure 3.4: Installation of NS2

Figure 3.5: Installation of NAM and run it

Page 43: NURUL ALIA ERYANA BINTI MOHD ZAMRI

29

Figure 3.6: Input the sample of Tcl script

3.6 Software and hardware requirement

Hardware and software are two important things that we need to have to ensure the

successful of this project. The system cannot be developed if these software and hardware

is not available as they got their own role and function. The details on hardware and

software are a shown in Table 3.2 and Table 3.3.

Table 3.2: List of hardware used

Hardware Description

Laptop Model: HP Laptop 14s-cf0xxx

Processor: Intel Core i5-8250U CPU @ 1.60GHz 1.80

GHz

RAM: 8.00 GB

OS: Windows 10, Kali Linux, Ubuntu in VM VirtualBox

Page 44: NURUL ALIA ERYANA BINTI MOHD ZAMRI

30

Table 3.3: List of software used

Software Description

Ubuntu Mainly used operating system and act as server

Oracle VM VirtualBox A virtualization tool to run Ubuntu

Kali Linux A Debian-based Linux distribution to run Oracle VM

VirtualBox

NS2 Simulation used to simulate network tested that worked

on Ubuntu

NAM An animation tool which is employed to view the

network simulation trace data. It supports topology

layout, level packet animation, and various data

inspection tools.

XGraph Plot graph for better understanding and pattern

observation in performance analysis

Google Chrome Browser to run the system and do research related

studies about project

Microsoft Office 2016

• Microsoft Word 2016

• Microsoft PowerPoint

2016

Tools that are used for documentation of the project,

creating report, presentation slide, and creating

diagrams

Page 45: NURUL ALIA ERYANA BINTI MOHD ZAMRI

31

3.7 Summary

In this chapter, the flow of the project is being shown in the framework and detailed

view of how the whole system works has been displayed. Then, it briefly explained how

the RC5 encryption algorithm works and will be implemented in the VANETs

environments later. The requirements of software and hardware for the development of the

system are generally described.

Page 46: NURUL ALIA ERYANA BINTI MOHD ZAMRI

32

REFERENCES

[1] Afzal, Z., & Kumar, M. (2019). Security of Vehicular Ad-Hoc Networks

(VANET): A survey. Journal of Physics: Conference Series.

[2] Alimohammadi, M., & Pouyan, A. (2014). Performance Analysis of Cryptography

Methods for Secure Message Exchanging in VANET. International Journal of Scientific

& Engineering Research.

[3] Cunha, F., Azzedine, B., Leandro, V., Aline, V., & Antonio, L. (2014). Data

coomunication in VANETS: A Survey, Challenges and Applications. Ad Hoc Networks.

[4] Ebrahim, M., Khan, S., & Khalid, U. (2013). Symmetric Algorithm Survey: A

Comparative Analysis. International Journal of Computer Applications.

[5] Francisco, M., Chai, K., Juan-Carlos, C., Carlos, C., & Pietro, M. (2011). A

survey and comparative study of simulators for vehicular ad hoc networks (VANETs).

Wireless Communications and Mobile Computing.

[6] Jun, L., & Sheikh, M. (2019). A Comprehensive Survey on VANET Security

Services in Traffic Management System. Wireless Communications and Mobile

Computing.

[7] Maria de Fuentes, J., Gonzalez-Tablas, A., & Ribagorda, A. (2010). Overview of

security issues in Vehicular Ad-Hoc Networks. Handbook of Research on Mobility and

Computing.

[8] Mohammed, S. (2013). Design and Simulation of Network Using NS2.

International Journal or Electronics, Communication & Instrumentation Engineering

Research and Development.

Page 47: NURUL ALIA ERYANA BINTI MOHD ZAMRI

33

[9] Nampally, V., & Sharma, R. (2017). Simulators for VANET. International

Journal for Research in Applied Science and Engineering.

[10] Nampally, V., Sharma, R., & Balaji, K. (2017). Traditional Data Encryption

Methods for VANET. International Journal of Advance Scientific Research and

Engineering Trends.

[11] P, N., T, A., & G, S. (2014). Data Confidentiality and Users' Location Privacy in

VANETs. IJEDR.

[12] Pallavi, A., & Neha, B. (2016). A Review on Trust Model in Vehicular Ad Hoc

Network. International Journal of Grid and Distributed Computing.

[13] Skiles, J., & Mahgoub, I. (2016). A geographical hybrid solution for Inter-

Vehicular Communication in VANET.

[14] Suganthi, E. (2017). An Efficient Data Transmission in VANET using Clustering

Method. International Journal of Electronics and Telecommunications.

[15] Tanuja, K., Sushma, T., Bharathi, M., & Arun, K. (2015). A Survey on VANET

Technologies. International Journal of Computer Applications.

[16] Tomar, R., Prateek, M., & Sastry, G. (2016). Vehicular Adhoc Network (VANET)

- An Introduction. International Journal of Control Theory and Applications.

[17] Verma, H., & Singh, R. (2012). Performance Analysis of RC5, Blowfish, and

DES Block Cipher Algorithms. Internation Journal of Computer Applications.