FYP final report
FYP final report
ALGORITHMS
2022
DECLARATION
Except for citations and quotations that have been properly acknowledged, we
declare that this project report is based on our original work. We further declare that
it has not been submitted for any other degree or award at Bahria University or other
institutions earlier or concurrently.
Signature : _________________________
Signature : _________________________
Signature : _________________________
Date : _________________________
APPROVAL FOR SUBMISSION
Approved by,
Signature : _________________________
Date : _________________________
According to Bahria University's Intellectual Property Policy BUORIC-P15, which
was revised in April 2019, the copyright to this report belongs to Bahria University.
The usage of any material contained in or derived from this paper must always be
acknowledged.
We would want to express our gratitude to everyone who helped us complete this
project successfully. We would like to thank Mr. Jawad Bhutta, our research
supervisor, for his important advice, direction, and immense patience throughout the
project's growth.
We'd also like to show our thanks to our supportive parents and friends for their
support and encouragement.
SMARTPHONE TEXT ENCRYPTION USING MULTIPLE ALGORITHMS
ABSTRACT
The introduction of Short Messaging Services (SMS) has fundamentally altered the
way people communicate and share information. Every day, billions of text messages
are transferred around the world in plain text format, putting users' privacy and
security at risk. SMS continues to be vulnerable to security vulnerabilities and
loopholes, thanks to a growing lot of software crackers out there on the internet. For
a long time, information security was assumed to be limited to personal computers
and networks. Malicious attackers are now targeting mobile devices and their users
as the technical trend shifts away from desktops and toward mobile devices. This
project's goal is to create a safe messaging system that enables smartphones to reduce
these vulnerabilities and loopholes while sending and receiving messages. Our goal
is to build an app for end-to-end message encryption that can hide messages while
being transmitted from source device to destination using the Hybrid Cipher
Algorithm. This application is designed for both Android and IOS based devices.
The hybrid technique incorporates a combination of various cryptographic
algorithms that works together to provide secure message communication. Our
program is a peer-to-peer security mechanism that ensures secrecy, security services
for verification, integrity, and non-repudiation.
TABLE OF CONTENTS
DECLARATION ii
APPROVAL FOR SUBMISSION iii
ACKNOWLEDGEMENTS v
ABSTRACT vi
TABLE OF CONTENTS vii
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF SYMBOLS / ABBREVIATIONS xi
LIST OF APPENDICES xii
CHAPTER
1 INTRODUCTION 1
1.1 Background 1
1.2 Problem Statements 1
1.3 Aims and Objectives 2
1.4 Scope of Project 2
2 LITERATURE REVIEW 4
2.1 Cryptographic Algorithm Performance with Symmetric
Keys 4
2.2 Security Analysis of Cryptographic Algorithms 5
2.3 Security Services for Mobile Instant Messaging 6
2.3.1 Confidentiality 6
2.3.2 Integrity 6
2.3.3 Non Repudiation 6
2.3.4 Authentication 6
2.4 Mobile Chat Applications and Cryptography 7
4 IMPLMENTATION 11
4.1 Encryption Process 11
4.2 Decryption Process 13
4.3 Hashing Process 15
REFERENCES 26
APPENDICES 28
LIST OF TABLES
XOR Operator
* Multiplication Operator
+ Append Operator
A Graphs
CHAPTER 1
INTRODUCTION
1.1 Background
Messages, thoughts, and information are now transferred using various message
sending programs, technology advancements and the digitization era. In a wireless
cellular communication system, data security is critical. Data is sent between a
sender and a receiver in this communication, and both end users are worried about
the security of their shared data. In the world of wireless communications based on
SMS or information transferred between two users, security is a key issue. Many
hackers may be available at such moment to hack crucial SMS data and secret
information. Unauthorized individuals (attackers) illegally breach the network and
get access to data. As a result, this is a major issue that necessitates network security
[1].
2.3.1 Confidentiality
The term confidentiality refers to the need that messages delivered across a
communication link between two parties to be viewed only by the intended
recipients. Encryption is the mechanism that ensures confidentiality between two
parties to achieve this purpose. A cryptographic approach encrypts a communication,
which can only be decrypted by the intended recipient. Confidentiality is a security
feature that ensures that the user can verify the signature using the public key they
acquired during the key exchange process. Users are allowed to verify the sender's
identity within their mobile phones, eliminating the need to consult third-party
servers to verify the sender's validity.
2.3.2 Integrity
Integrity is a security service that ensures data isn't tampered with during
transmission from source to destination. Typically, message integrity is ensured by
hashing the ciphertext, encrypt the message hashing and delivering it to the
destination with the message. After receiving the message, the recipient will decrypt
the ciphertext hashing and compare it to his own hashing. If the message hashing of
the receiver matches the sender's message hashing, the integrity is achieved else, the
message has been modified.
2.3.4 Authentication
One of the most important parts of security is authentication, which demands an
entity's identification or during contact. This prevents any malicious attack, when a
malicious user manipulates a user's identity and presents himself to the server as the
authorized user, this is known as impersonation. The two types of authentication
techniques are weak authentication and strong authentication.
Yes
WhatsApp Yes Yes No Public key exchange
(manual) through server
Facebook No No No No No
messenger
Yes
Viber Yes Yes No Public key exchange
(manual) through server
Yes
Signal Yes Yes No Public key exchange
(manual) through server
Google
No No No No No
Hangouts
Skype No No No No No
vi) Combine Permutation 1 with the key matrix using an XOR operation.
vii) Perform a mix column operation, i.e., XOR the result of step 6 with the result
of step 6.
[ ]
2 3 1 1
1 2 3 1
viii) Constant Matrix =
1 1 2 3
3 1 1 2
ix) Reverse the entire matrix block.
x) Convert the block value into corresponding hexadecimal value.
xi) Using substitution box (s-box).
xii) Convert the matrix values to encoding characters by arranging them as plain
text.
Permutation 1
XOR
Mix Column
S-Boxes
Arrange in Plaintext
Encrypted Text
[ ]
2 3 1 1
1 2 3 1
viii) Constant Matrix =
1 1 2 3
3 1 1 2
ix) Perform a mix column operation, i.e., XOR the result of step 7 with a
constant matrix.
x) Compute the Key using the steps below:
a. Create a 4 * 4 block matrix from the key text, with each block having a
set length of 16 bytes (or 128 bits).
b. In ASCII, convert the key to the relevant characters.
xi) Execute XOR operation on the result of step 10 and key matrix then perform
permutation 2 using following steps:
a. Interchange C1 XOR C2 = M and C3 XOR C4 = N.
b. Replace C1 by M and C4 by N.
c. Replace R2 with R3 and R3 with R2.
d. Replace column C2 with column C3 and C3 with column C2.
xii) Convert the message into ASCII equivalent then finally arrange the ASCII
equivalent into plaintext.
Cipher Text
Decoded Character
Mix Column
XOR Operation
Permutation 2
ASCII
Plain Text
CHAPTER 6
TESTING AND EVALUATION
OS Android 10 IOS 13
RAM 6 GB 3 GB
61.2.2
D
Following below is the decryption testing result of our application on both devices:
95
95
95
95
90
90
85
80
80
An d r o i d R esu l t s I OS R esu l t s Em u l at o r R esu l t s
The above shown results concluded that our application provide satisfactory
performance on every tested platform. The designed app focuses on providing highly
secure message transmission as well as efficient execution on every usable platform.
This application successfully provide the following security services:
i) Confidentiality
ii) Integrity
iii) Authentication
iv) Non - Repudiation
The above analysis clearly shows that data breach is one of the most important area
when it comes to IT security. Keeping that in mind, we’ve created a secure message
transmission application using hybrid cryptographic technique to minimize this threat
and provide highly secure sending and receiving of messages from one device to
another. Although still there can be many more features added to this such as key
distribution [2]. The distribution of keys is one of the most critical factors that must
be addressed. The key can be distributed using one of the methods listed below:
i) The key can be delivered to the sender and receiver by an authorized third
party.
ii) Using encryption techniques, the sender and receiver's old key can be turned
to a new key.
iii) Using KDC, a key can be distributed to both users.
iv) For safe key exchange, the Diffie-Hellman method can be utilized.
Other than key distribution mechanism, there can be some other important features as
well, such as:
i) Achieving audio, video, image, and file encryption using the same technique.
ii) Improving the security of the exchange of key and hash codes.
iii) Can work on multithreading as if each block can process at a time.
7.2 Conclusion
Secure message transmission is required to protect our messages from many types of
attacks. It is vital to prevent having our message interrupted by anyone other than the
sender and receiver. So, using hybrid cryptographic algorithm In our mobile security
system, we offer a messaging security solution. It provides secrecy, authentication,
integrity, and nonrepudiation security services. Our chat app is compatible for both
IOS and Android devices. High-level organizations and military personnel can use
our project to share classified information. We will provide users with a reliable
communication service. Users can quickly and simply will be using this application
for high-security communication.
REFERENCES
[1] F. N. Zainab Khyioon, " SMS Encryption for Android Mobile Using the
Encryption Algorithm (Review)," 2019.
[9] P. a. A. S. "A study of encryption algorithms AES, DES, and RSA for security,"
Global Journal of Computer Science and Technology, 2013. Mahajan, "A study
of encryption algorithms AES, DES, and RSA for security," Global Journal of
Computer Science and Technology, 2013.
[10] U. K. T. A. a. H. C. K. Rathi, " "6th International Symposium on Digital
Forensic and Security: Forensic Analysis of Encrypted Instant Messaging
Applications on Android" (ISDFS), 2018.
[12] N. R. Potlapally, " IEEE Transactions on Mobile Computing 5.2, "A study of
the energy consumption characteristics of cryptographic algorithms and security
protocols", 2006.
[13] K. V. Bhat S., " Advances in Intelligent Systems and Computing, "Secure and
Efficient Data Privacy, Authentication, and Integrity Schemes Using Hybrid
Cryptography", 2019.
[15] M. Hossain, " Journal of Information Security, vol. 10, no. 1,Design and
Development of a Novel Symmetric Algorithm for Enhancing Data Security in
Cloud Computing." 2019.
APPENDICES
APPENDIX A: Graphs
Since we know that there are various cryptographic algorithms and techniques and
has each of them their own weakness points and strength points. The results of the
several cryptographic algorithms are collected to judge their performance in terms of
various security and compatibility factors. Also, we will analysis the comparisons
between the other cryptographic techniques in terms of performances, weaknesses
and strengths. The analysis is based on graphical representations, which will show
the encryption and decryption performance of cryptographic algorithms.