Top Banner
IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM TUAN ISMAAMIRAH BINTI TUAN ISMAIL BACHELOR OF COMPUTER SCIENCE (NETWORK SECURITY) UNIVERSITI SULTAN ZAINAL ABIDIN 2017
37

IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

Oct 22, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

IMAGE STEGANOGRAPHY BASED ON

RSA ALGORITHM

TUAN ISMAAMIRAH BINTI TUAN ISMAIL

BACHELOR OF COMPUTER SCIENCE

(NETWORK SECURITY)

UNIVERSITI SULTAN ZAINAL ABIDIN

2017

Page 2: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

TUAN ISMAAMIRAH BINTI TUAN ISMAIL

Bachelor of Computer Science (Network Security)

Faculty of Informatics and Computing

Universiti Sultan Zainal Abidin, Terengganu, Malaysia

MAY 2017

Page 3: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

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 University Sultan Zainal

Abidin or other institutions.

________________________________

Name : Tuan Ismaamirah binti Tuan Ismail

Date :

Page 4: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

ii

CONFIRMATION

This project report titled Image Steganography based on RSA Algorithm was prepared

and submitted by Tuan Ismaamirah binti Tuan Ismail (BTBL14037431) and has been

found satisfactory in terms of scope, quality, and presentation as partial fulfilment of

the requirement for the Bachelor of Computer Science (Computer Network Security)

with Honor in University Sultan Zainal Abidin.

________________________________

Supervisor: Puan Roslinda binti Muda

Date:

Page 5: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

iii

DEDICATION

Praised to Allah, the Most Gracious and the Most Merciful Alhamdulillah, for

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

project titled Image Steganography based on RSA Algorithm.

Here, my greatest appreciation goes to my beloved family that give me support

as well as encouragement throughout this project.

Then, I would like to take this opportunity to express my heartiest appreciation

and gratitude to my supervisor, Puan Roslinda binti Muda for encouragement,

guidance, critics, advices, motivation, and supported. Without continued support, this

project would not have been the same as presented here. Thank you.

Besides, I would like to thank to all my friends as throughout this project, they

too also give me help, guidance, advices as well as suggestion to make my project a

better one.

Last but not least, I would like to thank to Faculty of Informatics and

Computing for the chance to expose and explore as a degree student with this project.

I would like to thank to all my lecturers in this faculty that give me a great support to

complete this project. Thank you a lot.

Page 6: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

iv

ABSTRACT

Steganography is a method to hide the messages in such way that only sender and

receiver know the existence of hidden message beside the sent image. However,

the use of only pure steganography to protect message during transmission expose

that data to the attacker by using various steganalysis tools have been made for

detecting the hidden message in steganography image make it no longer secured.

Therefore, steganography needs cryptography to provide confidentiality and

integrity in hiding the information. The main objective of this project is using a

cryptography technique cooperate with the steganography to promise more

security and invisibility in hiding a secret message inside an image. Hence, the

RSA algorithm will be used as a technique to encrypt the hidden message with a

method of Least Significant Bit (LSB) algorithm to hide the encrypted message

bits in random pixels but based on the chosen range values. Thus, a proposed

application will be implemented steganography for images, with an advanced in

the security of hidden message. The expected results of this project are to provide

security and invisibility for data hiding in the image.

Page 7: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

v

ABSTRAK

Steganografi adalah satu kaedah untuk menyembunyikan mesej dengan cara yang

hanya penghantar dan penerima tahu kewujudan mesej tersembunyi di sebalik

imej yang dihantar. Walau bagaimanapun, penggunaan steganografi tulen sahaja

untuk melindungi mesej semasa penghantaran mendedahkan data tersebut kepada

penyerang dengan menggunakan pelbagai alat steganalisis telah dibuat untuk

mengesan mesej yang tersembunyi di dalam imej steganografi yang tidak lagi

terjamin. Oleh itu, steganografi memerlukan kriptografi untuk menyediakan

kerahsiaan dan integriti dalam menyembunyikan maklumat. Objektif utama projek

ini adalah menggunakan teknik kriptografi bekerjasama dengan steganografi

untuk menjanjikan lebih keselamatan dan halimunan bersembunyi mesej rahsia

dalam imej. Oleh itu, algoritma RSA akan digunakan sebagai teknik untuk

menyulitkan mesej yang tersembunyi dengan satu kaedah yang paling kurang

menerima algoritma Bit penting (LSB) untuk menyembunyikan bit mesej disulitkan

dalam piksel rawak tetapi berdasarkan nilai-nilai pelbagai pilihan. Oleh itu,

permohonan yang dicadangkan akan dilaksanakan steganografi untuk imej,

dengan maju dalam keselamatan mesej tersembunyi. Keputusan yang dijangkakan

projek ini adalah untuk menyediakan keselamatan dan halimunan untuk data

bersembunyi dalam imej.

Page 8: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

vi

CONTENTS

PAGE

DECLARATION i

CONFIRMATION ii

DEDICATION iii

ABSTRACT iv

ABSTRAK v

CONTENTS vi

LIST OF TABLES viii

LIST OF FIGURES ix

LIST OF ABBREVIATIONS x

LIST OF APPENDICES xi

CHAPTER I INTRODUCTION

1.1 Introduction 1

1.2 Problem statement 4

1.3 Objectives 5

1.4 Scopes and Limitation of Work 5

1.5 Summary 6

CHAPTER II LITERATURE REVIEW

2.1 Introduction 7

2.2 Overview Steganography 7

2.3 Elements of Steganography 8

2.4 RSA Cryptography 8

2.5 Least Significant Bit (LSB) 9

2.6 Analysis of Existing Research Paper

2.6.1 A Proposed Method of Information Hiding

Based on Hybrid Cryptography and

Steganography

10

2.6.2 A Secure Image Steganography Based on

RSA Algorithm and Hash-LSB Technique

11

2.6.3 Hiding Image in Image Using LSB Insertion

Method with Improved Security and Quality

12

Page 9: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

vii

2.6.4 Data Hiding using Advanced LSB with RSA

Algorithm

13

2.6.5 Secure Image Steganography Using

Encryption Algorithm

14

2.7 Summary 14

CHAPTER III

METHODOLOGY

3.1 Introduction 15

3.2 Methodology Used 15

3.2.1 Analysis Phase 16

3.2.2 Planning Phase 16

3.2.3 Design Phase 17

3.2.4 Build and Testing Phase 17

3.2.5 Development Phase 17

3.3 Gantt Chart 18

3.5 Requirement Analysis

3.5.1 Software Requirement 18

3.5.2 Hardware Requirement 18

3.6 System Design

3.6.1 General Framework Design 19

3.6.2 Process Model 20

3.6.3 Data Model 20

3.6.4 Algorithms

3.6.4.1 RSA Algorithm 21

3.6.4.2 LSB Algorithm 23

3.7 Summary 23

REFERENCES 24

Page 10: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

viii

LIST OF TABLES

TABLE TITLE PAGE

Page 11: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

ix

LIST OF FIGURES

FIGURE TITLE PAGE

1.1 The basic of steganography process using image format 3

2.1 LSB insertion 10

3.1 Overall the phases of Agile XP model 15

3.2 The framework of overall project 19

3.3 The process model by using Use Case Diagram 20

3.4 Sequence Diagram for sender and receiver 21

Page 12: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

x

LIST OF ABBREVIATIONS / TERMS / SYMBOLS

LSB Least Significant Bits

RSA Rivest, Shamir, Adleman

PKE Public Key Encryption

RGB Red Green Blue

IDE integrated development environment

GUI Graphical User Interface

MIT Massachusetts Institute of Technology

PSNR Peak Signal-to-Noise Ratio

Page 13: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

xi

LIST OF APPENDICES

APPENDIX TITLE PAGE

Page 14: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

1

CHAPTER I

INTRODUCTION

1.1 Project Background

Nowadays, almost everyone is using at least one from the variety of

applications to secure their secret message and communications. One of example that

nearly with us is the application of Whatsapp which is upgraded in securing message

with end-to-end encryption. There are many choices of security techniques nowadays

that can help to secure the communication between sender and receiver. This paper

discusses a hiding of message application using steganography technique and secures

that hidden message using a cryptography technique. Both steganography and

cryptography are the techniques for securing the message but in the different concept.

According to Markus Kahn’s definitions, steganography is the ability and

knowledge of communicating in a way which hides the existence of the secret

message. There are three different aspects in hiding the information techniques

challenge with each other; capacity, security, and robustness [1]. The steganography

strives more for high security and capacity. The aim for high security means that focus

to secure the hidden message in a cover medium meanwhile capacity refers to the size

of a message that can be hidden in the cover medium. There are four categories of

cover medium digital files that can be used in steganography techniques which are

text, image, audio/video, and protocol. However, the more appropriate formats to use

Page 15: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

2

are image and audio files formats because of their high degree of redundancy [2]. The

basic model of the steganographic process using image format is illustrated in Figure

1.1 [3].

Then, cryptography is an effective way to secure sensitive message and makes

it immune to attack. It is a technique for storing and transmitting data in a form that

only those it allows for reading and process. Cryptography defined as involving three

distinct mechanisms; symmetric-key encipherment, asymmetric-key encipherment,

and hashing. In this project more prefer to use asymmetric-key to secure the hidden

message. In an asymmetric cryptosystem or also called as a public key cryptosystem,

there are two different keys used to encrypt and decrypt the data. Public-key is used

for message encryption, and then the private key is used for message decryption. The

keys are generated in such a way that it is unfeasible to get the private key from the

public key. Both (sender and receiver) have two keys in an asymmetric system.

However, the private key is kept private and not sent over with the message to the

receiver, but the public key will be published by the receiver. Those want to send the

message must to use a public key pair.

The combination of steganography and cryptography is not a new method to

increase the security of the secret message. The weaknesses in steganography

technique will be covered by the advantages in cryptography technique. By the way,

the approach in choosing one or more appropriate techniques is more important.

Indeed, most of the techniques that combine steganography and cryptography consist

in encrypting the secret message before hiding its reality in its cover medium.

Page 16: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

3

In conclusion, if a message is encrypted and hidden with a steganography

method, the secrecy of that message will be provided with an additional layer of

protection and reduce the chance of the hidden message being detected.

Figure 1.1: The basic of steganography process using image format

Page 17: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

4

1.2 Problem Statement

Nowadays, the increasing demands from user to secure their hidden

information from a variety technology used by hackers or threat become a hot issue.

Although we use the security technique to secure the secret message, the threat and

hacking activities still can happen because there are pro and contrast when we use

them. In this project, the main technique of security used is steganography. Even

though steganography technique can protect data during transmission, but various

steganalysis tools have been made for detecting the hidden message in steganography

image make it no longer secured. There are the varieties of methods can be applied to

make steganalysis more secure. By the way, there are some of the method used to

embed and extract encrypted message in steganography image currently are not

considered the best which the attacker easy to detect a hidden message in

steganography image. Then, the hidden message is not secured enough when just use

pure steganography technique to secure the hidden information. Besides, the

application or system security today just focus on security but not aware to the time

taken for user wait for the process of encryption, decryption the message and the

process of image steganography because they are used more than one cryptography

algorithm applied in their application make user wait for a long time for the process of

steganalysis done. So, the best and efficient techniques of steganography and

cryptography will be applied in this project.

Page 18: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

5

1.3 Objectives

There are three objectives that will be achieved on this project to solve the problem

above:

1) To design a steganography tool to hide secret message invisibly in an image.

2) To implement RSA algorithm for message encryption and enhanced LSB

technique in hiding the secret message into the cover object.

3) To test the tool functionality in hiding and securing secret message.

1.4 Scope and limitations of work

1. Project Scope

This project is emphasized and focuses more on achieving the high level of security

by using RSA algorithm combined with image steganography. Two algorithms will be

used which are an encrypted algorithm and embedded algorithm. The simple concept

is used; a message (hidden information) will be encrypted before embedding it into an

image by using LSB technique.

Page 19: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

6

2. User Scope

User scope is divided into two sides which are sender and receiver side.

The general role of user access in the application:

a) Login the public key pair

b) Write the message that will be sent to receiver

c) Choose an image

d) Select encode process

e) Send to the receiver

f) Select decode process

g) Enter private key pair

3. Limitations of Work

• The format of hidden message must be in text.

• Image’s format suitable for data embedding limited to format image.jpg,

image.png, and image.gif only.

• The stego-image will be saved in format image.png only.

1.5 Summary

This thesis consists of five chapters. The first chapter focuses on the project

background, problem statements, objectives, and scopes of the project. Chapter two is

a review of all the related study regarding this project. In chapter three, the

methodology will be discussed including the methods and techniques used. In this

chapter also will discuss the expected results through the framework and design. In

chapter four will be explained about the implementation and testing process that have

been run in the project. The last chapter is conclusion and results are presented.

Page 20: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

7

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

The main objective of this project is to improve the security of hidden message in

image steganography by using RSA algorithm technique and LSB algorithm. Chapter

two will discuss the concept of steganography and the cryptography technique that

applied in this project. Then, the method to embed the encrypted message to the image

will be discussed in this chapter too. Besides, some of the analysis of the related

works will be also discussed as well.

2.2 Overview Steganography

Steganography is the ability and knowledge of communicating in a way which hides

the existence of the secret message. The main goal of steganography is same to

cryptography but in a different way, which is focused on securing the hidden

information. The specific goal of steganography is hiding data in a digital object so

that cannot be detected the existence of secret message through observation (or even

complex analysis).

Page 21: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

8

2.3 Elements of steganography

There are two important elements in steganography; cover and data. The cover is a

medium to carry hidden message during transmission without show the existence of

hidden message. Because of that, the appropriate cover must be chosen, as it is a large

part of what determines the efficiency of the steganographic technique. Appropriate

cover means that there is no suspicious look at that cover. Once the attacker suspects

something to that cover, it may be the hidden message will be attacked. A Brazilian

drug trafficker had messages hidden with steganographic algorithms hidden on his

computer inside images of a cartoon character [4]. Then, the data is the hidden

message that will be hiding in the cover. The data must be serializable, so that it may

be embedded bit by bit into the cover.

2.4 RSA Cryptography

RSA algorithm was proposed by three MIT’s Ron River, Adi Shamir & Leonard

Adelman which is powerful and secure the data compared the others asymmetric-key

cryptosystem. RSA is named for the last initials of the researcher’s name. RSA is

based on multiplying and factoring large integers and significantly faster than another

Public Key Cryptosystem. This algorithm can be categorized as Public Key

Encryption system (PKEs) which is generally fast enough to encrypt the reasonably

small message. The encrypted with RSA algorithm has to be created a public key and

private key generated by the random number and taken through the process of RSA

Public key. The public key of RSA will be announced to the public for use in coding

section meanwhile private key is a key that only the owner knows for use in

decrypting. In this scheme, two pairs of integers {e, n} and {d, n} are used. First of

Page 22: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

9

them is a public key and the other one is a secret key. The sender uses the public key

and encrypts the message say M into ciphertext as C = M^e mod n.Where C is the

ciphertext and M is the message or the plane text

Then, at the receiving end, the receiver accept the ciphertext C and decrypt the C into

M using secret key {d, n}- M = C^d mod n.

2.5 Least Significant Bits (LSB)

Least Significant Bit is an example of main techniques in spatial domain image

steganography. It manipulates the cover digital image pixel bit value to embed the

encrypted secret message. The encrypted message bit will be embedded in the least

significant of the bit of the image pixel. Steganography avoids introducing as much

variation as possible, to minimize the likelihood of detection.

There are many types of LSB. The Least Significant Bit used in this project

choose random pixel which is the pixel that has the total below than 169. Since the

variation of an image is decreased when applying Steganography, the more good of

the technique.

The selected pixel is below than 169 pixels. This range of colour selected

because the value of 169 is dark grey until number of 0 (black). The chosen darkness

colour is suitable to hide the secret message and will produce a less variation of stego-

image. Figure 2.1 below show how to insert message in selected pixels.

Page 23: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

10

Example: To hide letter C (1000011) in a greyscale file:

Original: 01001101| 01001110 | 01001110 | 01001111 | 01010000 | 01010000 | 11001111 | 01001111

(bit of pixels)

1 0 0 0 0 1 - 1

Encoded: 01001101 | 01001110 | 01001110 | 01001110 | 01010000 | 01010001 | 11001111 | 01001111

Figure 2.1: LSB insertion

2.6 Analysis of Existing Research Paper

2.6.1 A Proposed Method of Information Hiding Based on Hybrid Cryptography

and Steganography [8]

The outcome of this project is to create cross-platform tools that can effectively hide a

message inside an image file with author’s own aims of security and robustness of the

secret message. The author of this project used two levels of security which is hybrid

RSA and Knapsack algorithm to meet his aims. The advantages of the hybrid

combination of two public-key cryptosystem RSA and Knapsack are they offer

extremely good security with less complexity and less time required to encrypt and

decrypt the secret message. There are two stages of encryptions for this project. At the

first stage is a knapsack cryptosystem and followed by RSA cryptosystem for the next

stage. The enciphered text at the output of the first stage is used as an input message

for the second stage. However, there are a few drawbacks when using hybrid

cryptosystems. Hybrid cryptosystem causes the encryption becomes two times.

Moreover, another disadvantage in this project is there are seven modules or steps in

hiding information. It will make this system is not a user-friendly because make the

user waits for a long time in embedding and extracting the information.

Page 24: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

11

2.6.2 A Secure Image Steganography Based on RSA Algorithm and Hash-LSB

Technique [7]

In this paper, Hash-LSB and RSA algorithm used to provide a high level of data

security as well as data hiding method. The hash function was used for generating a

pattern in hiding data bits into LSB of RGB pixels values of the cover image. Hash

function by using MD5 hashing will make sure that the message has been encrypted

first before embedding process. The researchers apply hash to get the position then

embed cipher text in the image. Meanwhile, RSA algorithm used to encrypt and

decrypt message before embedding it into a cover image. So, both techniques provide

more security to data as well as the data hiding method. However, there are a few

disadvantages when using both techniques to provide security. There are two keys that

the user will log in. Well said, when the both sender and receiver forget the password;

it is not possible to recover a password but can only reset the password. It makes the

application complicated and not a user-friendly.

Page 25: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

12

2.6.3 Hiding Image in Image Using LSB Insertion Method with Improved

Security and Quality [6]

In this project, the researcher has used LSB encoding as a way to embed the secret

image into the cover image. The bits of the secret image is embedded in random pixels

that generated by the RC4 algorithm. The system enhances the security of the LSB

technique by randomly break the bits of the secret image in the cover image which

makes it harder for unauthorized people to extract the original image. This paper

proposes the steganographic technique of 3-bit information hiding, based on LSB

steganography. In 3-bit data embedding of the secret image bits are taken 3 at a time.

Each of 3 bits of the secret image is embedded into last 3 LSB bits of cover image

pixels. These last 3 bits cover image pixels are replaced with secret image bits. The

advantages of 3-bit data hiding technique are can avoid the sequence mapping

problem and integrates the LSB method by incorporating randomization with LSB

insertion. Besides, by this technique, the secret image bits will be randomly isolated in

the cover image pixels and then make it harder for illegal people to extract the hidden

image. The RC4 algorithm is used to implement this randomization. It will generate

the pixels of the cover image in a random order, and the secret image is embedded

into these pixels in respective order. By the way, this project not secures enough

because of using the weak key of the RC4 algorithm. RC4 just offers simple key

scheduling and output generations’ process. Although this project use 3 LSB bits in

hiding technique, but once the unauthorized can trace that there is a hiding image in an

image, the secret image will extract easily.

Page 26: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

13

2.6.4 Data Hiding using Advanced LSB with RSA Algorithm [5]

In this work, a new way of hiding information in an image with less variation in image

bits have developed which promise high-level security and more efficient than pure

LSB. As another project, RSA algorithm was used to encrypt and decrypt the secret

message. Then, an Advanced LSB technique was used to hide that encrypted message.

The XOR operation was applied in Advanced LSB technique. First, the secret

message is encrypted by using RSA algorithm. Then, the encrypted message is being

divided into two part which is first part is XORed with odd position and another part

with the even position of LSB+1. After that, the XORed encrypted message is being

hidden on LSB position. By the way, there are a few disadvantages in this paper. One

of the examples is the complicated process of embedding and extracting the encrypted

message.

Page 27: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

14

2.6.5 Secure Image Steganography Using Encryption Algorithm [4]

In this paper, the researchers use two layer security to provide confidentiality and

security of image steganography. First, they use RSA Algorithm for the process of

encrypting and decrypting of the message. Then, Diffie-Helman Algorithm used to

determine the pixel on an image that will be used to store the message. The

combination of cryptography and image steganography in this project proved when

that model produced a good quality image after inserting the high capacity of the

secret message with the PSNR value of 71.9 dB. However, when the embedding

capacity of the secret message increases, it will result in a slight decline of PSNR

value. Besides, in this method, the plain file is embedded in an image file. Since each

bit of the plain file is populated in the pixels of the image file. Therefore the size of

image must be larger than that of a plain file. As a result, we cannot encrypt a large

file (if there is no image file larger than that).

2.7 Summary

In this topic, the related existing system is reviewed, and the tool that will be

developed is written generally. There are pros and cons of the existing system.

Moreover, the developing tool will be enhanced by the existing system. However,

there is also the limitation of this project.

Page 28: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

15

CHAPTER 3

METHODOLOGY

3.1 Introduction

In this chapter, the suitable methodology is chosen and will be followed until the end

of the project. Suitable project methodology plays the main role to make sure the

project can be done well. Research on this topic is made 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.

3.2 Methodology Used

Agile eXtreme Programming (XP) methodology is used in this project. Figure 3.1

below shows how this methodology works.

Figure 2: Agile eXtreme Programming flow

Figure 3.1: Overall the phases of Agile XP model

Plan Design

Test Build &

Test

Analyse Develop

Page 29: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

16

This methodology is a radical agile methodology that focuses more on the project’s

process and addressing the analysis, development and test phases with novel

approaches that make a significant difference to the quality of the end product. The

advantages of using this methodology focus on short feedback loops and the practices

can be combined with other approaches to supplement them. It means that if the user

gives negative feedback when using it, the project will loop back to initial or any

phases until it fulfils the project requirement.

3.2.1 Analysis Phase

In this phase, the knowledge and information related to the field of science computer

either in networking or information/computer security are gained and gathered. The

ways of gathering the information are by brainstorming and reading the research

paper, journal or search on the website and then do an own research about the problem

in this field. In this analysis, phase follows the concept of finding the problem and

then finds the new approach how to solve it.

3.2.2 Planning Phase

One interest field is chosen. Then, the suitable project title has been suggested and

discussed with the supervisor. The project title must be included by the relevant

technique(s) to solve the problem. This phase is much related to the previous phase

when the problem statement has been listed out for the previous systems and become

important to brainstorm a new idea to solve the previous system’s problem. The

solutions to improve that previous system’s advantage is briefly write and discuss it

with the supervisor.

Page 30: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

17

3.2.3 Design Phase

After the project title approval and has been confirmed by supervisor and panels

which is I chose to develop the image steganography tool based on RSA algorithm,

the design of the project was started. In the design phase starts with the project’s

overall flow (algorithm) before going to a specific algorithm. The algorithm writes

based on the chosen technique which is LSB and RSA Algorithm. Then, the interface

has been created and designs using Java GUI.

3.2.4 Build and Testing Phase

This phase is fully focused on the coding. Start to write coding based on the written

algorithm. In this project, Netbeans Java programming is fully used to process all the

code. After coding writing, the code will be tested simultaneously according to

expected result. If the tool does not function as expected, the project will loop back to

previous phases until it performs the project requirement. In this phase is also

including the implementation of the chosen technique.

3.2.5 Development Phase

After there is no error in the code, the combination of the interface design will be

acquired. Then, the tool will be analyzed using MATLAB to find the Peak Signal to

Noise Ratio (PSNR), and Adobe Photoshop is used to find the histogram of the stego-

image and will be differentiated to the original image.

Page 31: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

18

3.3 Gantt chart

Gantt chart is used to show the activities against its times. Each activity is represented

by a bar, and then each bar shows the specific duration of start and finishes dates of

different required elements of a project.

3.4 Requirement Analysis

3.4.1 Software Requirement

Software requirement of this project are:

i. Windows 8.1

ii. Microsoft Office 2007

iii. Microsoft PowerPoint 2007

iv. Dropbox

v. NetBeans IDE 8.0

vi. Adobe Photoshop CS6

vii. Matlab

3.4.2 Hardware Requirement

Hardware requirement of this project are:

i. Acer Aspire E1-572G

ii. Wireless Mouse and keyboard

iii. Printer

iv. External Hardisk

Page 32: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

19

3.5 System Design

3.5.1 General Framework Design

Figure 3.2 shows that the layered structure is underlying a steganography tool and the

general concept of the overall project.

Figure 3.2: The framework of overall project

3.5.2 Process Model

Use Case diagram is used in this project to show the flow of a related process of

function. It can identify the different types of users of a system and the different use

cases and will often be accompanied by other types of diagrams as well. Figure 3.3

shows the Use Case of this project.

Page 33: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

20

Figure 3.3: The process model by using Use Case Diagram

3.5.3 Data Model

Sequence Diagram is used to show the sequence overall of the project. The process

starts from the receiver enter the value of p, q and public key, e. Thus, from that

values, the public key pair (e,n) and private key pair (d,n) will be generated. From the

public key pair, the sender can send the stego-image to the receiver. The private key

pair will be used by receiver to encode the plaintext from stego image sent by sender.

Figure 3.4 show the sequence flow overall of the project.

Page 34: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

21

Figure 3.4: Sequence Diagram for sender and receiver

3.5.4 Algorithm

3.5.4.1 RSA Algorithm

RSA Algorithm is used for encrypting and decrypting the secret message. There are

three steps of RSA algorithm.

Page 35: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

22

1) Key Generation Group

Step to create public and a private key:

i. Choose two large prime numbers of p and q

ii. Calculate n = p * q

iii. Compute totient of n:

Let ϕ (n) = m

m= (p – 1) x (q – 1)

iv. Choose a number of public key e

v. Calculate RSA secret key d using Extended Euclidean Algorithm:

e . d = 1 mod ϕ (n) e .d = (k * m) + 1

d = ( (k * m) + 1 ) / e

2) Encryption

C = Me

mod n The sender uses M (plaintext) with public key e to create

the ciphertext, C (Ciphertext)

3) Decryption

M = Cd mod n The receiver uses C (ciphertext) with secret key d to get

back M (plaintext)

Page 36: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

23

3.5.4.2 LSB Algorithm

1. Select the cover image.

2. Make sure that the encrypted message is less than cover image.

3. The cover image is changed to a grayscale image.

4. The encrypted message is embedded into selected pixel which is the value of

the pixel is less than 150.

5. Use a pixel selection filter to make sure the best areas to hide encrypted text in

the cover image.

6. The message is hidden using Bit Replacement Method.

3.6 Summary

In this chapter, the methodology with tools requirement fully described its

specification used. Every phase of the tool development is based on the project

methodology described before. Moreover, the details of software and hardware

specification also listed in this chapter.

Page 37: IMAGE STEGANOGRAPHY BASED ON RSA ALGORITHM

24

REFERENCES

[1] B. Chen and G.W. Wornell. Quantization Index Modulation: A class of

Provably Good Methods for Digital Watermarking and Information Embedding.

In IEEE Trans. Information Theory, volume 47, no. 4, pages 1423-1445, 2001.

[2] T Mrkel, JHP Eloff, and MS Olivier. “An overview of image steganography,”

in proceeding of the fifth annual Information Security South Africa Conference,

2005.

[3] J. Zöllner, H. Federrath, H. Klimant, A. Pfitzmann, R. Piotraschke, A.

Westfeld, A. Westfeld, G. Wicke, G. Wolf (1998). “Modeling the Security of

Steganographic Systems” Buku: Information Hiding, 1998.

[4] S. D. M. Satar, N. A. Hamid, F. Ghazali, R. Muda, M. Mamat, and P. K. An,

“Secure Image Steganography Using Encryption Algorithm”, Annual Int'l

Conference on Intelligent Computing, Computer Science & Information

Systems (ICCSIS-16) April 28- 29, 2016.

[5] R.S. Chhillar, “Data Hiding using Advanced LSB with RSA Algorithm”,

International Journal of Computer Applications, 122(4), 2015.

[6] M. Jose, “Hiding Image in Image Using LSB Insertion Method with Improved

Security and Quality”, International Journal of Science and Research (IJSR),

Volume 3 Issue 9, 2014.

[7] A. Kumar and R. Sharma, “A Secure Image Steganography Based on RSA

Algorithm and Hash-LSB Technique”, International Journal of Advanced

Research in Computer Science and Software Engineering, 3(7), 2013.

[8] F.S. Abed, “A Proposed Method of Information Hiding Based on Hybrid

Cryptography and Steganography”, International Journal of Application or Innovation

in Engineering & Management, 2(4), 2013.