Sunteți pe pagina 1din 50

ANDROID BASED ENCRYPTED SMS SYSTEM

A MINOR PROJECT REPORT

Submitted by

ANAND KUMAR JHA (16UECN0082 )


PRASHANT RAJ (16UECS0366)
POONEET CHOPRA (16UECN0044)

In partial fulfilment for the award of the degree

of

BACHELOR OF TECHNOLOGY

Department of Computer Science and Engineering

Vel Tech Rangarajan Dr. Sagunthala R & D Institute of Science and


Technology

CHENNAI-600062
MAY, 2019
1
BONAFIDE CERTIFICATE

This is to certify that the minor project entitled “ANDROID BASED ENCRYPTED SMS
SYSTEM ” submitted by Anand Kumar Jha (16UECD0003), Prashant Raj (16UECS0366) and
Pooneet Chopra (16UECN0044) in partial fulfilment for the requirements for the award of the degree
of Bachelor of Technology in Computer Science and Engineering is an authentic work carried out by
them under my supervision and guidance.
To the best of my knowledge, the matter embodied in the project report has not been submitted
to any other University/Institute for the award of any Degree or Diploma.

Signature of Supervisor Signature of Head of the Department

Mrs. B. Umamaheswari M.E., Dr. V.Srinivasa Rao M.Tech,Ph.D.,


Asst. Professor, Professor,
Department of CSE, Department of CSE,
Vel Tech Rangarajan Dr. Sagunthala Vel Tech Rangarajan Dr.Sagunthala
R & D Institute of Science and Technology, R&D Institute of Science and Technology,
Avadi, Chennai-600062 Avadi, Chennai-600062.

Submitted for the partial fulfilment for the award of the degree of Bachelor of Technology in
Computer Science and Engineering from Vel Tech Rangarajan Dr. Sagunthala R & D Institute of
Science and Technology (Deemed to be University, u/s 3 of UGC Act,1956).

CERTIFICATE OF EVALUATION

2
COLLEGE NAME : Vel Tech Rangarajan Dr. Sagunthala R & D Institute of
Science and Technology

BRANCH : Computer Science and Engineering

SEMESTER : VI
ACADEMIC YEAR : 2018 - 2019

S. NAME OF THE TITLE OF THE NAME OF THE PROJECT


No. STUDENT PROJECT SUPERVISOR

ANAND JHA
ANDROID BASED
1. PRASHANT RAJ Mrs.B.UMAMAHESWARI
ENCRYPTED SMS SYTEM
POONEET CHOPRA

The report of the Project submitted by the above students in partial fulfilment for the award of
Bachelor of Technology in COMPUTER SCIENCE AND ENGINEERING of Vel Tech
Rangarajan Dr. Sagunthala R & D Institute of Science and Technology for the viva-voice
examination held at Vel Tech Rangarajan Dr. Sagunthala R & D Institute of Science and
Technology on ______________, has been evaluated and confirmed to be the report of the work
done by the above student(s).

INTERNAL EXAMINER EXTERNAL EXAMINER

ACKNOWLEDGEMENT

Prof.
Trustee
Dr We
Dr.
Foundress
and
We
. V.S.S express
R.Vice
are
KUMAR, our deepest
RANGARAJAN
President
forDr.
President.
very much R. gratitude
B.E.
SAGUNTHALA
grateful
providing toan
usto(EEE),
our
with our respected
B.E. ViceFounder
(MECH),
RANGARAJAN
beloved
environment Chancellor
M.S M.B.B.S.,
(AUTO).
Chancellor
to complete and
DSc., President
Chancellor
Chairperson
our project Col.
and
Managing
Prof.
successfully.
3
We obligated to our beloved Registrar Dr.E.KANNAN M.E., Ph.D., tofor
support
for
for in
providing
Ph.D., We
for
A
their all our
thankful
immense
special
valuable endeavours.
to
a wonderful
record our
care
thanks
guidance esteemed
environment
indebtedness
and
to our to ourDirector
to
Head
encouragement
andProject
support Academics
complete
of
towards
Coordinator
throughout our
theus
Mrs. Dr.
project
theaDepartment ANNE
throughout
K.valuable
course RAJATHI
of KOTESWARA
successfully.
Dr.V.SRINIVASA
the course providing
ofOur
&friends
thegratitude
project. RAO,
this
Mr.V.PRABHU, RAO, immense
project. Ph.D.,
M.Tech.,
M.E.,
Mrs.
helped
guidanceWe in
to also
B.UMAMAHESWARI
us take
completing
thank our
complete this opportunity
this
this M.E.,
project
department
project. to
for
through
faculty, express
her cordial
various
supportingdeep sense
support,
stages.
staffs, of
parents, information
and Internal
and
for their Guide
guidance,
help she
and

1. Anand Kumar(VTU 8262)

2. Prashant Raj(VTU 8151)


3. Pooneet Chopra(VTU 6940)

ABSTRACT

When we live in a global village, then maintaining privacy and confidentiality becomes

reasonably challenging. Short Message Service (SMS) is the oldest application for exchanging

messages between communicating parties in cellular network used by mobile phones. These

messages are encrypted over-the-air with A5/1 algorithm and stored as clear text at network

operator.

Recent developments have shown that this algorithm is not secure any more. Compromising

an access to network operator registers gains access to SMS also. Current scenarios of hacks and

exploitation demands confidentiality, and encryption is one of the techniques, which is used, in this

subsequent project of designing a secure SMS android application. Cryptographic manipulation of

the data is performed using AES 128 -bit algorithm to secure the data, which is essential to us and

the safe transmission of confidential data over the GSM network. AES (Advanced Encryption

Standards) algorithm is the considered impregnable even to super computers brute force attacks.

The AES algorithm technique uses very befuddled and sporadic encryption making data impregnable

to attackers or hackers.

This android app will allow the user to encrypt and decrypt the SMS (Short Message Service)

efficiently and just at one click. Subsequent explanation is given afterwards.

4
TABLE OF CONTENTS

CHAPTER TITLE PAGE NO

ABSTRACT 6

LIST OF FIGURES 8

LIST OF ABBREVIATIONS 9

1 INTRODUCTION 10

1.1 Aim of the project 10

1.2 Project Domain 11

1.3 Problem Statement 12

2 LITERATURE REVIEW 13

3 PROJECT DESCRIPTION 16

3.1 Existing System 16

3.2 Proposed System 18

3.3 Feasibility Study 19

3.4 System Specification 20

3.4.1 Hardware Specification 20

3.4.2 Software Specification 20

5
4 MODULE DESCRIPTION 21

4.1 General Architecture 21

4.2 Design Phase 23

4.2.1 Data flow diagram 23

4.2.2 UML Diagrams 24

4.3 Module Description 29

5 IMPLEMENTATION & TESTING 31

5.1 Input & Output 31

5.2 Limitations 37

5.3 Testing 39

6 RESULTS AND DISCUSSIONS 45

6.1 Efficiency of the proposed System 45

6.2 Comparison of Existing and 45

proposed System

6.3 Advantages of the proposed system 47

7 CONCLUSION AND FUTURE ENHANCEMENTS 48

7.1 Conclusion 48

7.2 Future Enhancements 49

REFERENCES 50

6
LIST OF FIGURES

S. NO FIG. NO TITLES PAGE. NO

1 2.1 AES

1 4.1 General Architecture 10

2 4.2.1 Data Flow Diagram 11

3 4.2.2 Use case Diagram 12

4 4.2.2 Class Diagram 13

7
5 4.2.2.3 Sequence Diagram 27

6 4.2.2.4 Activity Diagram 28

7 4.3.1 SMS 29

8 5.1.2 AES architecture 31

9 5.1.3 Sender view 35

10 5.1.4 Receiver view 36

11 5.1.4 End to end encryption 37

12 5.3.1 Unit Testing 39

13 5.3.2 Acceptance Testing 40

14 5.3.3 Blackbox Testing 41

15 5.3.4 Whitebox Testing 42

16 5.3.5 Integration Testing 43

8
LIST OF ABBREVIATIONS

ABBREVIATIONS EXPLANATIONS

AES Advance Encryption Standard

DFD Data Flow Diagram

UML Unified Modelling Language

SMS Short Message Service

BTS Base Transceiver Station

DES Data Encryption Standard

9
1. INTRODUCTION

Communication has always been a crucial factor in development of humans everyday life.

Since prehistoric times human society developed different forms of communication which made

possible exchanging meaningful information between individuals via various symbols. Later on

Telephone is considered to be one of the most important invention that revolutionized communication.

First telephone was introduced with the landline version where all telephone were connected by wires

but, later it evolved to the wireless version.

1.1 Aim of project

SMS is a text messaging service component of phone, web, or mobile communication systems,

using standardized communications protocols that allow the exchange of short text messages between

fixed line or mobile phone devices.

Now a days many people wants to connected with each other, for this purpose they are using many

applications like messaging. But we can see that SMS transmission is not that much secure in the

environment. To avoiding this kind of problems we are going to developing an Android Application,

that will secure the SMS transmission.

In sms transmission service sends the text between cell phones. It contain sender and receiver.

The SMS is work on the other computing devices such as laptops, tablet PC’s as long as they can

accept SIM card. It is needed because SMS service needs sms center client which is built on the SIM
10
card. The BTS(Base Transceiver Station) used for communication between user and network.

MSC(Mobile Switching center) is used for routing the calls. SMSC (SMS Center)is act as temporary

storage for SMS.

1.2 Project Domain

SMS is now a very common communication tool. The security protection of SMS messages is not yet

that sophisticated and difficult to implement in practice. The confidentiality and integrity mechanisms

are only specified as optional security measures that can be made available, but they are not mandatory

requirements for SMS system implementation .The application developed for end to end secure

transmission of the SMS. The algorithm used is Advanced Encryption Standards algorithm. This

application is developed on Android platform and is one of a kind. The later part of the paper explains

the working of SMS, the AES algorithm and the working of our developed application. Maintaining

privacy in our personal communication is something everyone desires.

Encryption is a means to achieve that privacy. It was invented for the very same purpose. [5] As short

message service (SMS) is now widely used as a business tool; its security has become a major concern

for business organization and customers. There is a need for an end to end SMS encryption in order to

provide a secure medium for communication.

This is an advanced Encryption and decryption System targeting the SMS for Android Users

both go and fro. The User can send an Encrypted message while he can decrypt an encrypted message.

The System makes use of the SMS that you see in the inbox, but this system filters out the one which

are encrypted and shows it in their Personal Inbox in the Application. The Shared private Key is

already defined in the application and one has not to insert anything but the user id which is by default

encrypted in the message. So whenever the user is sending a message he should know the receiver’s

id as the id is also appended to the message so that while the receiver logins to the system the message

is already decrypted if he is the desired recipient. The Id is Auto generated and cannot be changed but

11
for the users ease the system allows the user to save the recipient’s id in a separate column as Favorites

saving the his Id, Name and Mobile No. The Login is necessary here as a single user can have multiple

accounts with different ids so that he can maintain each account for different purposes and not clubbing

them. This System makes use of AES Encryption Algorithm to encrypt and decrypt the messages. This

App uses Android Studio as its front end and SQLite as back end.

1.3 Problem Statement

Nowadays, SMS is more and more common among mobile phone users. SMS is a text

messaging service component of mobile phone, web, or mobile communication systems, using

standardized communications protocols that allow the exchange of short text messages between fixed

line or mobile phone devices. Users can used SMS to send or receive from a single person, or several

persons, personal messages, email notifications, information services, school activity alerts,

notification from teacher, job dispatches, and also stock alerts. However, the security issue of SMS’s

is still an open challenging task. SMS is now a very common communication tool. The security

protection of SMS messages is not yet that sophisticated and difficult to implement in practice. The

confidentiality and integrity mechanisms are only specified as optional security measures that can be

made available, but they are not mandatory requirements for SMS system implementation. In this

paper, we have implemented three of block cipher symmetric cryptography algorithms (i.e. AES

algorithm, DES, and 3-DES) and compared between three of them in terms of encryption and

decryption delay time. This provides a guideline for the choice of the most suitable cryptography

algorithm for mobile communication on Android message application.

12
2. LITERATURE REVIEW

Smartphones market is growing exponentially as well as the operating systems like android and iOS,

which run them. Regular updates are delivered to the users that provide services and security and keep

them up to date in case of any new threat or breakthrough. Now communication is a big area itself and

is of extreme importance

considering military, governmental and political communication and also the daily personal

information one don’t want to share with others; there comes the secure methods of transferring

information like encryption so that no unwanted listener hear or read what you have to say or write.

There are multiple encryption schemes

and algorithms available all around like blowfish, RC4, but being considered the most secure and

efficient is AES (Advanced Encryption Standard) and is widely used for military grade encryption and

other secure communication purposes. There are three variants available of the AES i.e. AES-128,

AES-192, AES-256. The number represent the bits and the higher the bits more befuddling and

mingling of data happens. For the

lightweight apps like SMS encryption AES 128 is quite sufficient to handle and it do provide the fool

proof security.

The SMS industry being on such a great rise is vulnerable to attacks. Therefore it has now become

more imperative to encrypt SMS before sending. Various algorithms for encryption and decryption

are in place.

Out of the entire group of algorithm AES is the most preferred one. AES require very low RAM space

and it is very fast. On Pentium Pro processors AES encryption requires only 18 clock cycles/byte

equivalent to throughput of about 11Mib/s for 200MHz processor. This was the main reason why we

decided to use AES

algorithm for encryption and decryption.

13
The field of cryptography can be divided into several techniques of study. There are two types of

techniques in cryptography which are asymmetric key algorithm and symmetric key algorithm.

Asymmetric key algorithm or sometimes called public key algorithm is usually based on complex

mathematical problems. Symmetric key algorithm can be broadly grouped into block ciphers and

stream ciphers.

We have programmed our application meticulously considering various factors which might benefit

the user. With only less than 200Kb size it is feather weight which effectively makes it faster. It

provides functionality like conversation view, Inbox, Draft, Backup and restore; all the functionality

which a standard SMS application should provide. The main advantage is that it is very simple app,

easy to understand and very easy to operate. User interface is so simple and light weight that main

functionality of encryption and decryption of SMS is carried out very efficiently.

Fig 2.1

The symmetric key block cipher technique operates on the same block or fixed-length groups of bits.

The algorithm is illustrated in above figure. The encryption function in (1), denoted as E, is a process

of enciphering information called Plain text, denoted as P, using some secret codes called secret Key,

denoted as K, into an unreadable form called Cipher text, denoted as C. The P, as it goes through each

round of the cipher, is referred to as the cipher-state, denoted as F.Encryption has long been used by

militaries and governments to facilitate secret communication. Encryption is now commonly used in
14
protecting information within many kinds of civilian systems. For example, the Computer Security

Institute reported that in 2007, 71% of companies surveyed utilized encryption for some of their data

in transit, and 53% utilized encryption for some of their data in storage

Encryption can be used to protect data "at rest", such as files on computers and storage devices

(e.g. USB flash drives). In recent years there have been numerous reports of confidential data such as

customers' personal records being exposed through loss or theft of laptops or backup drives.

Encrypting such files at rest helps protect them should physical security measures fail. [ Digital rights

management systems which prevent unauthorized use or reproduction of copyrighted material and

protect software against reverse engineering (see also copy protection) are another somewhat different

example of using encryption on data at rest. In 2010, 6.1 trillion SMS text messages were sent. This

translates into 192,192 SMS per second. SMS has become a massive commercial industry, worth over

$81 billion globally as of 2006. phone networks. The global average price for an SMS message is

$0.11, while mobile networks charge each other interconnect fees of at least $0.04 when connecting

between different The SMS industry being on such a great rise is vulnerable to attacks. Therefore it

has now become more imperative to encrypt SMS before sending.

3. PROJECT DESCRIPTION

3.1 Existing System

DES algorithm and six ways to break DES


DES (Data Encryption Standard) is a symmetric cryptographic algorithm which was adopted in
January 1977 as a standard for protecting non classified information in the united states by the formal
National Bureau of standards. It is widely used protecting
Sensitive information and for the authentication of banking transactions, for example .
We propose here to present six different ways to break DES.
3.1.1 Exhaustive Key Search

15
Exhaustive key search, or brute-force search, is the basic technique of trying every possible
key in turn until the correct key is identified. To identify the correct key it may be necessary to possess
a plaintext and its corresponding cipher text, or if the plaintext has some recognizable characteristic,
cipher text alone might suffice.A common scenario is the following: we have an encrypted block at
disposal, we have some information about the plaintext (we know that it is an ASCII text, or a JPEG
image, for example) and we would like to recover the secret key.
3.1.2 A Dedicated Machine
An exhaustive search is quite time consuming for a single PC, but it is possible to do better. In
1998, the EFF (Electronic Frontier Foundation has built a dedicated machine in order to show to the
world that DES is not (or no more) a secure algorithm. Deep Crack, that's the name of the machine,
costs $200'000 and is built with 1536 dedicated chips.. Deep Crack is able to recover a key with the
help of an exhaustive search in 4 days in average, checking 92 billion of keys each second.Knowing
the budget of electronic intelligence agencies (for example, the National Security Agency in the USA),
it is easy to be pessimistic on the security of DES against such organizations!
3.1.3 A Huge Cluster Of Machines
An organization specialized in collecting and managing computer's idle time, broke a DES key
in 23 hours! More than 100'000 computers (from the slowest PC to the most powerful multiprocessors
machines) have received and done a little part of the work; this allowed a rate of 250'000'000'000 keys
being checked every second.

3.1.4 Time Memory Tradeoff


An exhaustive search needs a lot of time, but negligible memory at all. It is now possible to
imagine a scenario: we have a lot of available memory, and we are ready to precompute for all the
possible keys k the encrypted block y corresponding to a given block x of data and storing the pairs
(y, k) .This method becomes to be interesting in the case where we have more than one key to find
and we have enough memory at disposal.
3.1.5 Differential cryptanalysis
Differential cryptanalysis is a general form of cryptanalysis applicable primarily to block
ciphers, but also to stream ciphers and cryptographic hash functions. In the broadest sense, it is the
study of how differences in information input can affect the resultant difference at the output.Imagine
that we have a device which encrypts data with a hard-wired secret key, and imagine furthermore that
we don't have the tools needed to "read" the key in the chip. What we can do is to choose some blocks

16
of data and to encrypt them with the device. The data analysis phase computes the key by analyzing
47
about 2 chosen plain texts. A big advantage of this attack is that its probability of success increases
linearly with the number of available chosen plain texts and can thus be conducted even with fewer
chosen plain texts.
3.1.6 Linear Cryptanalysis
Linear cryptanalysis is a known plaintext attack in which the attacker studies probabilistic
linear relations (called linear approximations) between parity bits of the plaintext, the cipher text, and
the secret key.A current research project at the LASEC is the cost analysis of this attack. We have first
implemented a very fast DES encryption routine using advanced techniques on a common Intel
Pentium III architecture; this routine is able to encrypt at a rate of 192 Mbps on a PIII 666MHz
processor. We have then implemented the attack; it is currently running on 18 CPU's, breaking a DES
key in 4 days.

3.2 Proposed System

The SMS Encryption application works only with SMS, which is encrypted in the first step

and digitally signed in the second step and sent in the last step.This is an advanced Encryption and

decryption System targeting the SMS for Android Users both go and fro. The User can send an

Encrypted message while he can decrypt an encrypted message. The System makes use of the SMS

that you see in the inbox, but this system filters out the one which are encrypted and shows it in their

Personal Inbox in the Application. The Shared private Key is already defined in the application and

one has not to insert anything but the user id which is by default encrypted in the message. So whenever

the user is sending a message he should know the receiver’s id as the id is also appended to the message

so that while the receiver logins to the system the message is already decrypted if he is the desired
17
recipient. The Id is Auto generated and cannot be changed but for the users ease the system allows the

user to save the recipient’s id in a separate column as Favourites saving the his Id, Name and Mobile

No. The Login is necessary here as a single user can have multiple accounts with different ids so that

he can maintain each account for different purposes and not clubbing them. This System makes use of

AES Encryption Algorithm to encrypt and decrypt the messages.

3.3 Feasibility Study

Feasibility Study is conducted to see if the proposed system is a feasible one with all respects.
Feasibility Study is lot of the system proposal according to its workability impact of the organization,
ability to meet uses need and effective use of resources. There are three main aspects in the feasibility
study. The feasibility of a project can be ascertained in terms of technical factors, economic factors,
or both. A feasibility study is documented with a report showing all the ramifications of the project. In
project finance, the pre-financing work is to make sure there is no "dry rot" in the project and to
identify project risks ensuring they can be mitigated and managed in addition to ascertaining "debt
service" capability.

Economic Feasibility:

In economic feasibility cost/benefit analysis is done. Here we determine the benefits


and time savings that are expected from the system and compare them with cost. There is no need
spend any monthly thereafter. Since benefits outweigh the cost. It is economically feasible. We
developed java package having classes and methods for MATRIX encryption and decryption so it will
very easy and less costly to implement in another application. Since the cost of the system is only the

18
implementation cost of the system. There is no need spend any monthly thereafter. Since benefits
outweigh the cost. It is economically feasible.

Operational Feasibility:

An operationally feasible system is one that will be used effectively after it has been
developed. If users have difficulty with a new system, it will not produce the expected benefits. The
proposed system is found to be operationally feasible because of the following reasons. It is very
simple in use. The proposed system is found to be operationally feasible because of the following
reasons. It is very simple in use. There is no difficulty in using the front end which has been developed.
Even the users who don’t have any knowledge in android mobile the user friendliness and help section
provides them convenience and case. The system is designed, in such a way that not only the person
currently handling this work can operate the system but a person who is new to the system with case.
Hence this system is found to be operationally feasible.

Technical Feasibility:

Technical feasibility centers on the existing system and to the extent it can support the
proposed system.This encryption package and application is built in java language so they are platform
independent. This encryption can done on computer also using this package. Hence this system is
found to be technical feasible.

Market Feasibility:

This is a generalized project so that it can be used in any application and service like
SMS, Emails, GTalk, Facebook, Twitter etc. The existing traditional system is not optimized for
android devices. Proposed system use less computing resources efficiently and do not compromise
with security. The existing traditional system is not optimized for android devices. Proposed system
use less computing resources efficiently and do not compromise with security. So new system is not
costly and provides better security.

3.4 System Specification

3.4.1 Hardware Specification: A system comprised of minimum 8 Gb of ram.The system


operates at a clock frequency of 400 MHz, where it has a throughput exceeding 20 Gbits/s.64-bit
distribution capable of running 32-bit applications. It requires minimum storage of 20Gb of rom.

19
3.4.2 Software Specification:

• Android Studio

• Android Sdk

• SQL Lite RDBMS

3.4.2.1 Requirements to Run Android Application on Mobile

600 Mhz processor

128 Mb Ram
Android 3.0 and above

4. MODULE DESCRIPTION

20
4.1 General Architecture

There are two modules in this architecture one is sender part another one is receiver part. First the
sender and receiver both have to install this application in their android mobile. To send the encrypted
sms with this application sender has to right some text message to recipient than he have to provide
16 bit numeric secret key to encrypt the message with the help of AES (Advance Encrypted System).
After encrypting the sms the encrypted message sends to receiver then the receiver will get encrypted
sms and secret key with the help of Diffie Hellman Key exchange Algorithm, after receiving the secret
key receiver can easily decrypt the sms. The Advanced Encryption Standard comprises three block
ciphers, AES-128, AES-192 and AES-256. AES has a fixed block size of 128 bits and a key size of
128, 192, or 256 bits. The block-size has a maximum of 256 bits, but the key-size has no theoretical
maximum.
The cipher uses number of encryption rounds which converts plain text to cipher text. The
output of each round is the input to the next round. The output of the final round is the encrypted plain
text known as cipher text. The input given by the user is entered in a matrix known as State Matrix. If
21
sensitive information like atomic bomb is hacked by terrorists then they can use that info to create
atomic bomb against us. Android is powerful but less secure cause of Open Source. So we need to
provide security to your data in android device like SMS, files, Emails. Emails, Facebook
communication, Gtalk messages and for all text messaging services this encryption technique can
provide private protection to your messages. We can increase security by arranging blocks of message
in different ways. Word document, PDF files encryption support can provide in future. The Security
of conversion on social website and data sending becomes major issue especially in case of Google.
This paper present to protect conversion on social website and data sending to provide security to
generate key for this purpose. This technique is based on dynamic values for a character so it becomes
very difficult to identify actual message. Proposed system use less computing resources efficiently
and do not compromise with security. So new system is not costly and provides better security.

4.2 Design Phase:

Level 0

Send encrypted Message

Android
based SMS
Sender Encrypted Receiver
along Secret system key
22
Level 1

Sender Secret key + Cipher text


Message
=
Cipher text

Plain text Secret key + Receiver


Cipher text
= Message

4.2.1 DFD(Data Flow Diagram)

4.2.2 UML Diagrams

A UML diagram is a diagram based on the UML (Unified Modelling Language) with the purpose of
visually representing a system along with its main actors, roles, actions, artifacts or classes, in order
to better understand, alter, maintain, or document information about the system.It is based
on diagrammatic representations of software components. As the old proverb says: “a picture is worth
a thousand words”. By using visual representations, we are able to better understand possible flaws or
errors in software or business processes.
23
Mainly, UML has been used as a general-purpose modeling language in the field of software
engineering. However, it has now found its way into the documentation of several business
processes or workflows. For example, activity diagrams, a type of UML diagram, can be used as a
replacement for flowcharts. They provide both a more standardized way of modeling workflows as
well as a wider range of features to improve readability and efficacy.UML is not a stand-alone
programming language like Java, C++ or Python, however, with the right tools, it can turn into a
pseudo programming language. In order to achieve this, the whole system needs to be documented in
different UML diagrams and, by using the right software, the diagrams can be directly translated into
code. This method can only be beneficial if the time it takes to draw the diagrams would take less time
than writing the actual code.
Despite UML having been created for modeling software systems, it has found several
adoptions in business fields or non-software systems.UML diagrams, in this case, are used to
communicate different aspects and characteristics of a system. However, this is only a top-level view
of the system and will most probably not include all the necessary details to execute the project until
the very end.
4.2.2.1Forward Design – The design of the sketch is done before coding the application. This is done
to get a better view of the system or workflow that you are trying to create. Many design issues or
flaws can be revealed, thus improving the overall project health and well-being.

4.2.2.2Backward Design – After writing the code, the UML diagrams are drawn as a form of
documentation for the different activities, roles, actors, and workflows.

24
Fig. 4.2.2.1 Class Diagram

25
Fig 4.2.2.2 Use case Diagram

26
Fig. 4.2.2.3 Sequence Diagram

27
Fig 4.2.2.4 Activity Diagram

28
4.3 Module Description

SMS (Short Message Service) :

The overview of the SMS transmission (SMS user equipment) is shown below

Fig. 4.3.1

Base Transceiver Station (BTS)


A base transceiver station (BTS) is a piece of network equipment that facilitates wireless
communication between a device and network. BTS consists of antennas that relay radio messages,
transceivers, duplexers, amplifiers and some of equipment which is used for encryption and decryption
the text messages .As part of a cellular network, a BTS has equipment for the encryption and
decryption of communications, spectrum filtering equipment, antennas and transceivers (TRX) to
name a few. A BTS typically has multiple transceivers that allow it to serve many of the cell's different
frequencies and sectors.The function of the BTS remains the same - no matter what type of wireless
technology is used.

29
Base Station Controller (BSC)
A base station controller (BSC) is a critical mobile network component that controls one or Baser
Transceiver Stations (BTS), the main function of the BSC is radio network management. To make it
clear, A BSC works with a mobile switching center (MSC) to provide full mobile telephony and fulfil
the requirements capacity .A BSC works with a mobile switching center (MSC) component that is
external to the BTS, enabling it to provide full mobile telephony and fulfill capacity requirements.
Base stations must communicate with the MSC and data must be managed as information overflow,
impacting MSC efficiency. A BSC eliminates MSC base station activity management requirements,
allowing the MSC to handle critical tasks, such as traffic balancing and database management.

Mobile Switching Center (MSC)


A mobile switching center (MSC) is mostly associated with communications switching functions, such
as call set-up, release, and routing. However, it also performs a host of other duties (i.e. routing SMS
messages, conference calls, fax, and service billing), as well as interfacing with other networks.The
MSC sets up and releases the end-to-end connection, handles mobility and hand-over requirements
during the call and takes care of charging and real time pre-paid account monitoring.

SMS Service Center (SMSC)


A Short Message Service Centre (SMSC) usually owned and run by a telecommunication operator
which is responsible for the routing and delivery of SMS. When a SMS message is delivered to the
SMSC, a store-and-forward message mechanism is implemented, whereby the message is temporarily
stored for routing checking path, then forwarded to the recipient’s phone when the recipient device is
available (i.e. same as E-mail messages processes) . The sub-functions of SMSC notify the sender
whether the SMS delivering is success or not to the destination (Receiver Mobile phone).SMSC is
SMS service center which is installed on mobile carrier core networks. Beside as SMS forwarding,
SMSC also acts as temporary storage for SMS messages. So, if the destination cell phone is not active,
SMS will store the message and then deliver it after the destination cell phone is active. As additional,
SMSC also notify the sender whether the SMS delivering is success or not. However SMSC cannot
store the SMS message forever since the storage capacity is

5. IMPLEMENTATION

30
5.1 Input

Fig. 5.1.2 AES Diagram

AES Diagram
31
SubBytes Step

In the S-Box Substitution step, each byte in the matrix is reorganized using an 8-bit substitution
box. This substitution box is called the Rijndael S-box. This operation provides the non-linearity in
the cipher. The S-box used is derived from the multiplicative inverse over GF (28), known to have
good non- linearity properties. To avoid attacks based on simple algebraic properties, the S-box is
constructed by combining the inverse function with an invertible affine transformation. The S-box is
also chosen to avoid any fixed points (and so is a derangement), and also any opposite fixed points.
The output of this round is given to the next round.

public byte[ ][ ] subBytes(byte[][] state) {

for (int i=0;i<4;i++) {

for (int j=0;j<4;j++) {

int row = getFirstFourBits(state[i][j]);

int column = getSecondFourBit(state[i][j]);

state[i][j] = sBoxSubstitution(row, column);

}}

return state;

ShiftRows Step

32
The ShiftRows step is performed on the rows of the state matrix. It cyclically shifts the bytes
in each row by a certain offset. The first row remains unchanged. Each byte of the second row is
shifted one position to the left. Similarly, the third and fourth rows are shifted by two positions and
three positions respectively.

ShiftRows(byte state[][]) {
for(int i=0;i<4;i++)
{

//cyclic left shifts „i‟th row, „i‟times cyclicLeftShift(i);


}
}

MixColumns Step

In the MixColumns step, the four bytes of each column of the state matrix are combined using
an invertible linear transformation. A randomly generated polynomial is arranged in a 4*4 matrix. The
same polynomial is used during decryption. Each column of the state matrix is XOR-ed with the
corresponding column of the polynomial matrix. The result is updated in the same column. The output
matrix is the input to AddRoundKey.

public byte[ ][ ] mixColumns(byte[ ][ ] state) {

for (int c=0;c<4;c++) {

state [c]=matrixMultiplication(state[c], polynomial);

return state;

AddRoundKey Step

33
A round key is generated by performing various operations on the cipher key.This round key
is XOR-ed with each byte of the state matrix. For every round a new round key is generated using
Rijndael‟s key scheduling algorithm.

public byte[ ][ ] addRoundKey(byte[ ][ ] state, byte[ ][ ] round key)


{

for (int i=0;i<4;i++) {

for (int j=0;j<4;j++) {

state [i][j]=doExclusiveOR(state[i][j], round key[i][j]);

}}

return state;

Send Message

In Android, There is a class SmsManager. We create instance of this class and there is a

sendTextMessage() method in SmsManager class.

void sendSMS(String text,String number)


{
SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(number, null, text, null, null);

// last two parameters in sendTextMessage method are PendingIntent


// sentIntent & deliveryIntent.
}

34
Fig. 5.1.2 Sender view

Output

The encryption algorithm is referred to as the cipher and the decryption algorithm as the inverse
cipher. In addition, the cipher and the inverse cipher operations must be executed in such a way that
they cancel each other. The rounds keys must also be used in reverse order. The Cipher Text which is
formed of 256-bit 4*8 Matrix is the input for the decryption process.

Receive Message

For receiving any messages we create one Broadcast Receiver. And we override on Receive
method of it which is basically called by system when any messages are received. But to do so we first
have to register our receiver.

public void onRecive(Context c, Intent i) {


Bundle b=i.getExtras();
if(b!=null)

35
{
// Retrieve received message byte[] pdus=bundle.get(“pdus”);

// converting bytes into Message


SmsMessages[] msgs=new SmsMessages[pdus.length];

for(int j=0;j<msg; length; j++)


{
msgs[j]=SmsMessage.createFromPdu(pdus[j]);
// Here we can display the Sms by getDisplayMessageBody() method of SmsMessage class

}}}

Fig. 5.1.3 Receiver view

36
Fig. 5.1.4 End to end Encryption

5.2 Limitations

Now a days many people wants to connected with each other, for this purpose they are using
many applications like messaging. But we can see that SMS transmission is not that much secure in
the environment. To avoiding this kind of problems we are going to developing an Android
Application, that will secure the SMS transmission. In sms transmission service sends the text between
cell phones. It contain sender and receiver. The SMS is work on the other computing devices such as
laptops, tablet PC’s as long as they can accept SIM card. It is needed because SMS service needs sms
center client which is built on the SIM card. The BTS(Base Transceiver Station) is used for
communication between user and network. MSC(Mobile Switching center) is used for routing the
calls.SMSC (SMS Center)is act as temporary storage for SMS.The Shared private Key is now
characterized in the application and one has not to embed anything besides rather the client id which
is as a matter of course scrambled in the message. So at whatever point the client is communicating
something specific he should know the collector’s id as the id is additionally affixed to the message
so that while the beneficiary logins to the framework the message is as of now unscrambled on the off
chance that he is the coveted beneficiary.The Id is Auto produced and can’t be changed yet for the
clients facilitate the framework enables the client to spare the beneficiary’s id in a different section as
37
Favorites sparing the his Id, Name and Mobile No. The Login is important here as a solitary client can
have various records with various ids so he can keep up each record for various purposes and not
clubbing them. This System makes utilization of AES Encryption Algorithm to encode and decode
the messages. This App utilizes Android Studio as its front end and SQLite as back end.Android 5.0
and above supports full-disk encryption. Full-disk encryption uses a single key—protected with the
user’s device password—to protect the whole of a device’s userdata partition. Upon boot, the user
must provide their credentials before any part of the disk is accessible.

While this is great for security, it means that most of the core functionality of the phone in not
immediately available when users reboot their device. Because access to their data is protected behind
their single user credential, features like alarms could not operate, accessibility services were
unavailable, and phones could not receive calls.

Encryption is the process of encoding all user data on an Android device using symmetric
encryption keys. Once a device is encrypted, all user-created data is automatically encrypted before
committing it to disk and all reads automatically decrypt data before returning it to the calling process.
Encryption ensures that even if an unauthorized party tries to access the data, they won’t be able to
read it.

5.3 Testing
Different types of testing

5.3.1 Unit Testing


38
Testing of an individual software component or module is termed as Unit Testing. It is typically
done by the programmer and not by testers, as it requires a detailed knowledge of the internal program
design and code. It may also require developing test driver modules or test harnesses.A unit can be
almost anything you want it to be -- a line of code, a method, or a class. Generally though, smaller is
better. Smaller tests give you a much more granular view of how your code is performing. There is
also the practical aspect that when you test very small units, your tests can be run fast; like a thousand
tests in a second fast.

Fig. 5.3.1 Unit Testing

5.3.2 Acceptance Testing


An acceptance test is performed by the client and verifies whether the end to end the flow of
the system is as per the business requirements or not and if it is as per the needs of the end user. Client
accepts the software only when all the features and functionalities work as expected.The acceptance

39
test cases are executed against the test data or using an acceptance test script and then the results are
compared with the expected ones.

Fig. 5.3.2 Acceptance Testing

5.3.3 Black Box Testing


Internal system design is not considered in this type of testing. Tests are based on the
requirements and functionality. Detailed information about the advantages, disadvantages, and types
of Black box testing can be seen here.This method of test can be applied to each and every level of
software testing such as unit, integration, system and acceptance testing.
40
Fig. 5.3.3 Black box Testing

5.3.4 White Box Testing


White Box Test (also known as Clear Box Testing, Open Box Testing, Glass Box Testing,
Transparent Box Testing, Code-Based Testing or Structural Testing) is a software testing method in
which the internal structure/design/implementation of the item being tested is known to the tester.The
other names of glass box testing are clear box testing, open box testing, logic driven testing or path
driven testing or structural testing.

41
Fig. 5.3.4 White Box Testing

5.3.5 Integration Testing


Testing of all integrated modules to verify the combined functionality after integration
is termed as Integration Testing. Modules are typically code modules, individual applications, client
and server applications on a network, etc. This type of testing is especially relevant to client/server
and distributed systems.Integration testing is conducted to evaluate the compliance of a system or
component with specified functional requirements. It occurs after unit testing and before validation
testing.

42
Fig. 5.3.5 Integration Testing

5.3.6 System Testing

Under System Testing technique, the entire system is tested as per the requirements. It is a
Black-box type testing that is based on overall requirement specifications and covers all the combined
parts of a system.System testing takes, as its input, all of the integrated components that have passed
integration testing.

43
Fig. 5.3.6 Sytem Testing

6. RESULTS AND DISCUSSION

6.1 Efficiency of the proposed System


This algorithm uses only 8-10 % cpu for encryption and only 5% for decryption. These are
very less numbers than other algorithm. Also it is very secure as third person doesn’t know size of

44
MATRIX then it became very difficult to crack message and total no of possibilities to generate
MATRIX values are 3.2e+660. The value is very big to crack message and it is useless if you don’t
know MATRIX size so this encryption algorithm is very hard to crack. This application was tested on
Android operating system, v4.1.2 (Jelly Bean), Cortex-A5 processor mobile phone running at 1 GHz
speed, with 4 GB internal Memory and 786 MB RAM. The performance data were collected by
applying 100 sequences of random SMS message or plaintext for each sizes on the phone to get the
encryption and decryption time for both algorithms. The AES block cipher has a fixed block length of
128 bits and a key length of 128, 192, or 256 bits. It can be specified with block and key sizes in any
multiple 35 of 32 bits with a minimum of 128 bits. The AES block cipher has 10 rounds for 128-bit
keys, 12 rounds for 192-bit keys, and 14 rounds for 256-bit keys. The experiment only taking into
consideration on 128-bit-keys only as well as 3D-AES blocks cipher. Decryption time is the time taken
to transform the SMS cipher text into plaintext. For each key size of same algorithm, random SMS
message of different bit sizes was decrypted.

6.2 Comparison of Existing and Proposed System


DES (Data Encryption Standard) is a symmetric cryptographic algorithm which was adopted
in January 1977 as a standard for protecting non classified information in the united states by the
formal National Bureau of standards. It is widely used protecting sensitive information and for the
authentication of banking transactions.
The SMS Encryption application works only with SMS, which is encrypted in the first step
and digitally signed in the second step and sent in the last step.This is an advanced Encryption and
decryption System targeting the SMS for Android Users both go and fro. The User can send an
Encrypted message while he can decrypt an encrypted message. The System makes use of the SMS
that you see in the inbox, but this system filters out the one which are encrypted and shows it in their
Personal Inbox in the Application. The Shared private Key is already defined in the application and
one has not to insert anything but the user id which is by default encrypted in the message. So whenever
the user is sending a message he should know the receiver’s id as the id is also appended to the message
so that while the receiver logins to the system the message is already decrypted if he is the desired
recipient. The Id is Auto generated and cannot be changed but for the users ease the system allows the
user to save the recipient’s id in a separate column as Favourites saving the his Id, Name and Mobile
No. The Login is necessary here as a single user can have multiple accounts with different ids so that
he can maintain each account for different purposes and not clubbing them. This System makes use of
AES Encryption Algorithm to encrypt and decrypt the messages.Encryption time is the time taken to

45
transform the SMS plaintext into cipher text. For each key size of same algorithm, random SMS
message of different bit sizes was encrypted. The average of the encryption time is calculated using
the formula in (1) and the results are tabulated where n is total number of encrypted message
sequences, ei is the consecutive encryption time and Et is the average encryption time. Tab. 3 indicates
that decryption time and the cipher text size are related. The rise in plaintext size of the AES block
cipher increases the decryption time. Even though the 3D-AES block cipher has a high decryption
time when the cipher text size between 32 bit to 128 bits compared to the AES block cipher, the 3D-
AES has low decryption time when plaintext size more then 256 bits. It can be indicate that SMS
decryption using the AES block cipher will be proposed till 128 bits. Since the 3D-AES and AES have
use a same key size to achieve high security, it can be concluded that the AES block cipher is the most
cost effective algorithm for SMS encryption as compared with the 3D-AES block cipher.

6.3 Advantages of the proposed system


1. All messages in thread are displayed in encrypted format to both sender and receiver.

2. The messages are simple SMS’s but this app filters out all others and just keeps the encrypted
ones.

3. Fast and easy to use.

4. No need of internet.

5. Since only encrypted messages are shown old messages are also loaded quickly saving a lot of
time which would go to search messages.

6. The message is already decrypted for you.

7. The proposed system is using Diffie Hellman exchange algorithm to exchange secret key
between sender and receiver.
46
8. User can either type new message or reply to an existing message.

9. If the user selects to reply to an existing message, he first decrypts the message by long
pressing the message and then types in the reply. The user is asked to enter cipher key
before the message is sent.

7. CONCLUSION AND FUTURE ENHANCEMENTS

7.1 Conclusion

The application of SMS Encryption of AES block cipher on android application has been
designed and implemented. The application is running in the mobile phone and does not require any
additional encryption devices. The result showed that suitable and easy to implement in mobile devices
for proposed scheme. With the increasing use of SMS for communication and information exchange,
care should be taken when sensitive information is transmitted using SMS. Users should be aware that
SMS messages might be subject to interception. Solutions such as encrypted SMS should be
considered if there is a need to send sensitive information via SMS. The user experiences no delays
while using the program, which is a clear indication that the speed requirement is met. We made sure
47
that the user interface simple and straight forward to use. In applications, where access control is vital,
our application can be used to authenticate the sender of a message. As a conclusion the requirements
for speed and compactness were met. The program size is 50 kB and it can be installed into a mobile
phone working on Android platform. The user experiences no delays while using the program, which
is a clear indication that the speed requirement is met. We made sure that the user interface simple and
straight forward to use. In applications, where access control is vital, our application can be used to
authenticate the sender of a message.
Also it is possible to detect, if the message has been corrupted or tampered with during transmission.
Most importantly, the messages containing delicate information are stored securely and remain
undisclosed even when the device is accessed by an adversary. The most unique and vital point to be
considered is the security of the encrypted data against various attacks such as Brute Force attack,
pattern attack etc. This application guarantees secure end to end transfer of data without any corrupt
data segments.

7.2 Future Enhancements


The application of SMS Encryption of AES block cipher on android application has been

designed and implemented. The application is running in the mobile phone and does not require any

additional encryption devices. The result showed that suitable and easy to implement in mobile device

for the proposed scheme. With the increasing use of SMS for communication and information

exchange, care should be taken when sensitive information is transmitted using SMS. Users should be

aware that SMS messages might be subject to interception. Solutions such as encrypted SMS should

be considered if there is a need to send sensitive information via SMS. The proposed method evaluated

using 225 data. Based on the evaluation result, the time of encryption and decryption is influenced by

the characters, number of the SMS message and the key as well as the smartphone specification.

Meanwhile, the correlation value is only affected by the characters number of the SMS message and

the key. The correlation value of the proposed method shows an improvement compared to the method

48
of Vigenere and Playfair. For future works, other cryptographic methods are still possible to be

developed to reduce correlation values

References

[1] Priyanka Pimpale, Rohan Rayarikar and Sanket Upadhyay, “Modifications to AES Algorithm for
Complex Encryption”, IJCSNS International Journal of Computer Science and Network Security,
VOL.11 No.10, October 2011.
[2] Hassinen M.: SafeSMS 1.0 user manual. October 2004,Department of Computer Science,
University of Kuopio.
[3] http://www.cs.uku.fi/∼mhassine/SafeSMS/Manual en.pdf
[4]G. Racherla, D. Saha, “Security and Privacy Issues in Wireless and Mobile Computing”,
Proceedings of 2000 IEEE International Conference on Personal Wireless Communications, Dec 17-
20, 2000, pp.509-513.
[5] H. Marko, H. Konstantin, “Strong Mobile Authentication”,Proceedings of 2nd International
Symposium on WirelessCommunication Systems, Sept 5-7 2005, pp.96-100.
[6] Xinmiao Zhang and Keshab K. Parhi, “Implementation Approaches for the Advanced Encryption
Standard Algorithm”, 1531-636X/12, IEEE 2002.

49
[7] Chun Yan, Yanxia Guo, “A Research and Improvement Based on Rijndael Algorithm”, 2009 First
International Conference on Information Science and Engineering,Nanjing, Jiangsu China, December
26- December 28, ISBN:978-0-7695-3887-7
[8] Advanced Encryption Standard, http://en.wikipedia.org/wiki/Advanced_Encryption_Stan dard

50