Top Banner
HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING SUBSTITUTION AND ADVANCED ENCRYPTION STANDARD ALGORITHM SHEIKH HIBBATUL ARIF BIN SHAIKH AHMAD BACHELOR OF COMPUTER SCIENCE (COMPUTER NETWORK SECURITY) UNIVERSITI SULTAN ZAINAL ABIDIN 2018
64

HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

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: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

HIDING DIGITAL DATA IN IMAGE

STEGANOGRAPHY USING SUBSTITUTION AND

ADVANCED ENCRYPTION STANDARD ALGORITHM

SHEIKH HIBBATUL ARIF BIN SHAIKH AHMAD

BACHELOR OF COMPUTER SCIENCE

(COMPUTER NETWORK SECURITY)

UNIVERSITI SULTAN ZAINAL ABIDIN

2018

Page 2: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING

SUBSTITUTION AND ADVANCED ENCRYPTION STANDARD

ALGORITHM

SHEIKH HIBBATUL ARIF BIN SHAIKH AHMAD

Bachelor of Computer Science (Computer Network Security)

Faculty of Informatics and Computing

Universiti Sultan Zainal Abidin, Terengganu, Malaysia

2018

Page 3: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

i

DECLARATION

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

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

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

Abidin or other institutions.

________________________________

Sheikh Hibbatul Arif Bin Shaikh Ahmad

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

Page 4: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

ii

CONFIRMATION

This is to confirm that:

The research conducted and the writing of this report was under my supervisor.

________________________________

Name : ..................................................

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

Page 5: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

iii

DEDICATION

Firstly and foremost, praised to Allah, the Most Gracious and the Most

Merciful for blessing me and giving me the opportunity to undergo and complete this

final year project.

I would like to take this opportunity to express my heartiest gratitude to my

supervisor, Puan Nor Aida Binti Mahiddin, for her teachings, kindness, patience, and

ideas towards this project.

Finally, I would like to thanks to Faculty of Informatics and Computing for the chance

to expose and explore students with this project. I would like to thank all the lectures

in Faculty of Informatics and Computing especially for giving me a great support to

complete the final year project.

Page 6: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

iv

ABSTRACT

Steganography is the art or science in hiding. It is origin from the Greek work where

stegano (hiding) + graphy (writing). It is hiding a message rather than encoding it.

Steganography is used for hiding information in different cover media to provide

secure communication between two entities. However, due to cases reported that

some privacy and confidential data had been stolen from unauthorized parties.

Steganography is one of the most powerful techniques to conceal the existence of

hidden secret data inside a cover object. Images are the most popular cover object for

steganography. Therefore, this thesis proposed a method using substitution and

Advanced Encryption Standard (AES) algorithm to design image steganography. Each

image sample is converted into bits and then the text data is embedded. AES is a

symmetric-key algorithm used to replace DES for more secure. Symmetric (also

known as secret-key) ciphers use the same key for encrypting and decrypting, so the

sender and the receiver must both know and use the same secret key. This thesis

produce a stego and encrypted image that can hide message that could be very secure.

Keywords: Steganography, Image Steganography, AES

Page 7: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

v

ABSTRAK

Steganografi adalah seni atau sains dalam bersembunyi. Ia berasal dari perkataan

Yunani di mana stegano (bersembunyi) + graphy (menulis). Ia menyembunyikan

mesej dan bukannya mengodkannya. Steganography digunakan untuk

menyembunyikan maklumat dalam bentuk media yang berbeza untuk menyediakan

komunikasi yang selamat antara dua entiti. Walau bagaimanapun, disebabkan kes-kes

yang telah dilaporkan bahawa terdapat beberapa data privasi dan data sulit telah dicuri

daripada pihak yang tidak dibenarkan. Steganography adalah salah satu teknik yang

terbaik untuk menyembunyikan kewujudan data rahsia tersembunyi di dalam objek

penutup. Imej adalah objek penutup yang paling popular untuk steganografi. Oleh itu,

tesis ini mencadangkan kaedah menggunakan algoritma penggantian dan Advanced

Encryption Standard (AES) untuk merekabentuk steganografi imej. Setiap sampel

imej ditukar menjadi bit dan kemudian data teks dibenamkan. AES adalah algoritma

kunci simetrik yang digunakan untuk menggantikan DES untuk lebih selamat.

Symmetric (juga dikenali sebagai kunci rahsia) ciphers menggunakan kunci yang

sama untuk menyulitkan dan menyahsulit, jadi penghantar dan penerima mesti

mengetahui dan menggunakan kunci rahsia yang sama. Tesis ini menghasilkan imej

stego dan disulitkan yang boleh menyembunyikan mesej yang mungkin menjadi

sangat selamat.

Kata kunci: Steganografi, Steganografi Imej, AES

Page 8: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

vi

CONTENTS

PAGE

DECLARATION i

CONFIRMATION ii

DEDICATION iii

ABSTRACT iv

ABSTRAK v

CONTENTS vi

LIST OF TABLES viii

LIST OF FIGURES ix

CHAPTER I INTRODUCTION

1.1 Background 1

1.2 Problem statement 2

1.3 Objectives 2

1.4

1.5

Scopes

Limitation Of Work

3-4

5

1.6 Summary 5

CHAPTER II LITERATURE REVIEW

2.1 Introduction 6

2.2

2.3

Comparison Between Algorithms

Summary

6-10

12

Page 9: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

vii

CHAPTER III METHODOLOGY

3.1 Introduction 13

3.2

3.3

3.4

CHAPTER IV

4.1

4.2

4.3

Methodology Used

3.2.1 Analysis Phase

3.2.2 Planning Phase

3.2.3 Design Phase

3.2.4 Build and Testing Phase

3.2.5 Development Phase

System Requirement

Summary

IMPLEMENTATION AND RESULT

Introduction

Implementation of system

4.2.1 Interface Design

4.2.2 Embed Message

4.2.3 Encrypt the Stego Image

4.2.4 Decrypt the Stego Image

4.2.5 Decode Stego Image

Test Case

1. Select Image

2. Write Message

3. Encode Message

4. Save Stego Image

5. Encrypt Stego Image

14

14

15

15-18

19

19

20

21

22

23

23

24-27

28-29

30-31

32-33

34

34

34

35

35

36

Page 10: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

viii

CHAPTER V

5.1

5.2

5.3

5.4

5.5

6. Decrypt Encrypted Stego Image

7. Decode Stego Image

CONCLUSION

Introduction

Contribution

Weakness and Limitation

Recommendation

Conclusion

37

38

39

40

41

42

43

REFERENCES 50-51

Page 11: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

ix

LIST OF TABLES

TABLE TITLE PAGE

2.1 Table of Comparison 5-9

3.3.1 Software Requirement 19

3.3.2

4.1

4.2

4.3

4.4

4.5

4.6

4.7

Hardware Requirement

Select Image Test Cage

Write Message Test Case

Encoded Message Test Case

Save Stegi Image Test Case

Encoded Stego Test Case

Decrypt Encrypted Stego Image Test Cage

Decode Message Test Case

19

33

33

34

34

35

36

37

Page 12: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

x

LIST OF FIGURES

FIGURE TITLE PAGE

3.1 Agile eXtreme Programming 12

3.2 Block diagram of image steganography 14

3.3 Embedding/Encryption 15

3.4

4.1

4.2

4.3

4.4

4.5

4.6

4.7

4.8

4.9

4.10

4.11

4.12

4.13

4.14

Decoding/Decryption

Interface of the system

Select the image to hide the message

Details of the image and write message

Entering the key

Stego Image Produced

Encryption and decryption interface

Encryption process

Encrypted stego image

Decryption process

Decrypted image

Interface for decode process

Select the image to be decode

Enter the key for decoding process

Show hidden message

16

22

23

24

25

26

27

28

28

29

30

31

31

32

32

Page 13: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

xi

APPENDIX

APPENDIX TITLE PAGE

A Appendix 1 44-49

Page 14: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

1

CHAPTER I

INTRODUCTION

1.1 BACKGROUND

Information is the communication of knowledge intelligence. It appears that

information explains and describing that thing. Information security is one of the most

challenging problems in today's technological world. In the transmission of secret data

over the public network (Internet), a few cases reported that some privacy and

confidential data had been stolen from unauthorized or unintended parties. Thus,

steganography is chosen to secure the information. Steganography is the art of the

most powerful technique in hiding the data. The use of Steganography also has an

important role in strengthening national security. Steganography is defined as secret

hiding. It can also be regarded as secret sharing since messages can be shared secretly

and it hard to be hacked. For this thesis, it will purpose to implement an image

steganography in order to prevent extracting the data which is hidden in the cover

image. The images and hide secret information using substitution technique and

Advanced Encryption Standard (AES) algorithm was chosen to provide an extra layer

of security. AES is a symmetric-key algorithm which means that same key is used for

both decryption and encryption of data.

Page 15: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

2

1.2 PROBLEM STATEMENT

Information security is one of the most challenging problems in today's

technological world. In the transmission of secret data over the public network

(Internet), a few cases reported that some privacy and confidential data had been

stolen from unauthorized or unintended parties.

1.3 OBJECTIVES

In this thesis primarily concentrated on the data security issues when sending

the data over the network using image steganography. The main objectives of this

project are:

1. To develop image steganography using substitution and AES algorithm

2. To produce stego and encrypted image to store the secret message in

selected image.

3. To prevent data or information being viewed by the third party using

encryption

Page 16: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

3

1.4 SCOPES

• Focuses on hiding the data by using substitution technique

• Using AES algorithm combined with substitution technique

1.4.1 User scope

The scope includes two main users.

i. User as the Sender

ii. User as the Receiver

Sender: (embedding process)

i. Choose an image to cover the secret message

ii. Write the message

iii. Select encode process

iv. Enter password

Sender: (encryption process)

i. Choose stego image

ii. Select encryption process and send to receiver

Page 17: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

4

Receiver: (decryption process)

i. Choose encrypted image

ii. Select decryption process and get stego image

Receiver: (extraction process)

i. Choose stego image

ii. Enter password and get real message

Page 18: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

5

1.5 LIMITATION OF WORK

• The format of hidden message must be in text only

1.6 SUMMARY

In this chapter, focuses on the project background, problem statements,

objectives, and scopes of the project. The purpose of this thesis was identified to

overcome the problem that occurs in the environment. Besides, the function of the

project and the limit of the project also were identified.

Page 19: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

6

CHAPTER II

LITERATURE REVIEW

2.1 INTRODUCTION

The main objective of this project is to hide message in Image Steganography using

substitution technique combine with Advanced Encryption Standard (AES) algorithm.

This chapter it will discuss the comparison between algorithms. It can be a guideline

to develop a new system which new system can provide a better functionality

compared to the old system.

TABLE OF COMPARISON

Algorithm Description Environment

Advanced Encryption

Standard (AES)

Algorithm

Enhanced Security of

Data using Image

Steganography and

AES Encryption

Technique

(Sandeep Panghal)

Basically, generates random pixel

position. Here, information become more

secure because the algorithm selects the

position randomly using AES. AES is a

symmetric-key algorithm that replaces

DES for more secure. It uses the same

key for both decryption and encryption

of data.

It is used in

defence

organizations so

that data can be

safely circulated,

it is used in

smart identity

cards.

Page 20: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

7

Algorithm Description Environment

Genetic Algorithm

Optimizing Image

Steganography using

Genetic Algorithm

(Gangeshawar)

Genetic Algorithm is the technique of AI

providing nearly optimal solutions. It is a

technique for optimization and search,

which is based on the Darwinian

principles of survival and reproduction

(Goldberg 1989). The GA processes

populations of chromosomes

(individuals), which replace one

population with another successively

Genetic

operators are

used for

individuals in the

population to

generate a next

generation of

individuals.

Discrete Wavelet

Transform (DWT)

Algorithm

Image Steganography

using DWT and

Blowfish Algorithms

(Mrs.Archana)

The DWT represents an image as a sum

of wavelet functions, known as wavelets,

with different location and scale. It

represents the data into a set of high pass

(detail) and low pass (approximate)

coefficients. The input data is passed

through a set of low pass and high pass

filters.

This work dealt

with the

techniques for

steganography in

dwt domain as

related to image

science.

Page 21: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

8

Algorithm Description Environment

Blowfish Algorithm

Image Steganography

Using Dynamic LSB

with Blowfish

Algorithm

(Aishwary

Kulshreshta)

Blowfish is a symmetric encryption

algorithm, meaning that it uses the same

secret key to both encrypt and decrypt

messages. Blowfish is also a block

cipher, meaning that it divides a message

up into fixed length blocks during

encryption and decryption.

Blowfish is

public domain,

and was

designed by

Bruce Schneier

expressly for use

in performance-

constrained

environments

such as

embedded

systems.

Data Encryption

Standard (DES)

Algorithm

Security Improvisation

in Image

Stegenography using

DES

(Miss Laxmi Randa)

The Data Encryption Standard (DES) is

an outdated symmetric-key method of

data encryption. Once the go-to,

symmetric-key algorithm for the

encryption of electronic data, DES has

been superseded by the more secure

Advanced Encryption Standard (AES)

algorithm.

DES can be used

by any

organization, but

this algorithm is

outdated. It is

easy for third

parties to break

through this

algorithm

Page 22: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

9

Algorithm Description Enviroment

Rivest-Shamir-

Adleman (RSA)

Algorithm

A Secure Image

Steganography

Based on RSA

Algorithm

(Rituparna Halder)

RSA algorithm is a message

encryption cryptosystem in

which two prime numbers are

taken initially and then the

product of these values is used to

create a public and a private key,

which is further used in

encryption and decryption.

Once your browser

validates the certificate

chain (using RSA

signature functionality),

it will probably use RSA

to perform a secure key

exchange

Chaos Based Least

Significant Bit

Steganography (C-

Lsb) Algorithm

Steganography and

Its Various

Techniques ( Sarita)

In the proposed method the

logistic chaotic map is used to

encrypt the secret message and

then embedded into the cover

image using the base embedding

technique. The logistic map is

used to encrypt the secret data

bits before embedding to enhance

the security of the image

steganography as the secret data

bits are not embedded directly

into the cover image. Consider a

secret image of resolution H×W

where H is the height and W is

the width of the image.

This algorithm use for

encryption and decryption

process

Page 23: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

10

Algorithm Description Environment

Contourlet Wavelet

Transform

Information Hiding

Scheme on Image

Using Contourlet

Wavelet Transform

(A. Saravanan1, A.

Sivabalan2 &

Ramkumar

Prabhu3)

Contourlets form a

multiresolution directional tight

frame designed to efficiently

approximate image made of

smooth regions separated by

smooth boundaries. The

Contourlet transform has a fast

implementation based on a

Laplacian Pyramid

decomposition followed by

directional filterbanks applied on

each bandpass subband.

Contourlet transform is a

double filter bank

structure. It is implemented

by the pyramidal

directional filter bank

(PDFB) which decomposes

images into directional

subbands at multiple scales

Bit Plane

Complexity

Segmentation

(BPCS)

Steganography – Bit

Plane Complexity

Segmentation

(BPCS) Technique

(Shrikant S. Khaire)

BPCS steganography was

introduced by Eiji Kawaguchi

and Richard O. Eason, to

overcome the short comings of

traditional steganographic

techniques such as Least

Significant Bit (LSB) technique,

Transform embedding technique,

Perceptual masking technique.

BPCS steganography makes use

of important characteristic that of

human vision.

This algorithm is suitable

for users who want to use

images in gray scale

Page 24: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

11

2.3 PROPOSED WORK

Based on the research, the proposed a new model for a double layer secure mechanism

that uses cryptography and steganography to secure and hide the secret message, prior

to sending it via insecure communication channel.

An image steganography model has four main processes; encryption,

embedding, decryption and extracting. In this proposed new hybrid algorithm, for the

encryption process, AES algorithm has been used to encrypt and decrypt the message.

Page 25: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

12

2.4 SUMMARY

In this chapter, the algorithm had been explained like Advanced Encryption

Standard (AES), Genetic Algorithm, Discrete Wavelet Transform (DWT) Algorithm,

Blowfish Algorithm, Data Encryption Standard (DES) Algorithm, Rivest-Shamir-

Adleman (RSA) Algorithm, Chaos Based Least Significant Bit Steganography (C-

Lsb) Algorithm, Contourlet Wavelet Transform, and Bit Plane Complexity

Segmentation (BPCS). Also I make a comparison with 9 of the algorithm to know

which better to apply in my project.

Page 26: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

13

CHAPTER III

METHODOLOGY

3.1 INTRODUCTION

This chapter will be discussed about the project methodology that being used.

The project methodology should be systematic and able to solve all the problems

arising in the system analysis to ensure all the processes, techniques, methods,

approaches and technologies of the project are well defined. There are many types of

methodology that can be applied and used in the development of the system. The

approach must be chosen correctly so that it is suitable to the development of the

project. It is an important step of development since it will guide researchers through

the project development. By using the methodology, it can ensure an exact process

and increases the probability of achieving the desired final objective.

Page 27: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

14

3.2 METHODOLOGY USED

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

Figure 3.1 Agile eXtreme Programming (XP)

This methodology is a radical agile methodology that focuses more on the

project’s process and addressing the analysis, development and test phases. The

advantages 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

Analysis phase is a first phase in this method that needs to know the knowledge

related to the field of science computer. For this project more knowledge about image

steganography are gained and gathered. The ways of gathering the information are by

reading the research paper, journal or search on the website about image

ANALYSI

S

PLANING

TESTING BUILD &

TEST

DESIGN

DEVELO

P

Page 28: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

15

steganography. In this analysis, phase follows the concept of finding the problem.

After determine the problem statement of this project, at this phase will discover the

solution to overcome those problems. Then, the title of the project has been discussed

with the supervisor.

3.2.2 Planning Phase

Literature review is done study on other’s work which relates to image

steganography. By comparing the advantages and disadvantages of the other work

stated in literature review will help in produce the product in overcoming the problems

regarding to the image steganography. 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. To meet requirement in producing this project, the scope

(sender and receiver) had been analysed and observe.

3.2.3 Design Phase

In the design phase starts with the project’s overall flow before going to a

specific algorithm. The algorithm writes based on the chosen technique which is

substitution and Advanced Encryption Standard (AES).

Page 29: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

16

System Design

General Framework Design

Figure 3.2 shows that the block diagram of steganography and the general concept of

the overall project.

Figure 3.2 Block diagram of image steganography

The secret message to be transmitted is embedded inside a cover image. Then,

the stego key is also used to provide security. Using the substitution technique, the

secret message is embedded into the cover image. The resultant file is called stego

image and this stego image will be encrypt using AES algorithm. Then, the encrypted

image will transmit to the receiver. At the receiver, encrypted stego image will be

decrypt by using AES algorithm and stego image will be decrypted. Then, stego image

is decoded using the stego key to extract the secret message.

Page 30: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

17

Advanced Encryption Standard (AES) Algorithm

AES is a symmetric-key algorithm that replaces DES to secure the

communication. Symmetric (also known as secret-key) ciphers use the same key for

encrypting and decrypting, thus the sender and the receiver must both know and use

the same secret key.

Embedding/Encryption Process

Steganography layer

Cover image

Secret Message

Figure 3:3 Embedding / Encryption Process

In this process two inputs are provided to substitution technique. First Input is

the cover image in which secret message is embedded and second is secret message

itself. The output of this process is Stego Image ( image with a secret message) .

SUBSTITUTION TECHNIQUE

STEGO IMAGE WITH

SECRET MESSAGE

AES ENCRYPTION

ALGORITHM

128–bits encryption key Encryption stego image

Page 31: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

18

Decoding/Decryption Layer

Encryption/Decryption Layer

128- bits Encryption Key

Encryption Stego Image

Figure 3.4 : Decoding / Decryption

In this layer the stego image is encrypted using AES algorithm. At the receiver end

reverse process is applied by decrypting the stego image. Figure 3.3 show how

message extraction and decryption is done.

AES ENCRYPTION

ALGORITHM

DECRYTED STEGO

IMAGE

SUBSTITUTION TECHNIQUE Secret

Message

Page 32: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

19

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 IDE 8.2 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, NetBeans IDE 8.2 will also be used to complete this project.

NetBeans IDE 8.2 was chosen because it has several advantages on languages.

Page 33: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

20

3.3 System Requirement

This section will show the list of all software and hardware that involve in the

development process.

3.3.1 Software Requirement

Software requirement of this project are:

SOFTWARE DESCRIPTION

MatLab • To process all the code

Microsoft Office 2010 • To prepared the report

Table 3.1 Software Requirement

3.3.2 Hardware Requirement

Hardware requirement of this project are:

HARDWARE DESCRIPTION

Laptop Intel corei7

RAM:8GB

OS:WINDOWS 10

• Use to develop the application

Hard disk • To back up the data project

Table 3.2 Hardware Requirement

Page 34: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

21

3.4 SUMMARY

This chapter discuss of the methodology selected to implement image

steganography. Methodology is very important in system and application

development. There are lots of different software development methodology that

available and can be used to develop any kind of application. All of the activities in

each phase in methodology are explained so that it can be understood easily. 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 35: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

22

CHAPTER IV

IMPLEMENTATION AND RESULT

4.1 INTRODUCTION

This chapter discusses the implementation of steganography tools using java

programming. This project contains six main functions, which a function to choose the

image, write the message that will be sent to the receiver, encoded process, encrypt

process, decrypt process, decode process. In this chapter also described the project

implementation in details. Each interface design is labelled and described.

Page 36: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

23

4.2 IMPLEMENTATION OF SYSTEM

4.2.1 Interface Design

Figure 4.1 Interface of the system

Figure 4.1 shows this is the interface of the image steganography. It functions to

embed secret message in image and extract the stego image to get the message back.

There are several buttons which is File, Edit, Tools, Encode and Decode.

Page 37: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

24

4.2.2 Embed Message

Figure 4.2 Select the image to hide the message

It can be seen in Figure 4.2 user need to click on File button, then choose cover image.

Then, the sample images will appear. User can choose any image that they want to use

to hide message.

Page 38: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

25

Figure 4.3 Details of the image and write down the message

In Figure 4.3 the image that had been choose by the user will appear. The user also

sees the details of the image by clicking at Tools button, and choose properties. It will

show the details about the image such as image name, type, width, height and

directory. Next, the user can write down the message that will be hidden into the

image.

Page 39: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

26

Figure 4.4 Entering the key

After the message was inserted at the text field as shown in Figure 4.4, user can

produce the stego image by click at Tools button, and choose ‘make stego image’.

Then, the pop up window to enter the password will appear. The minimum length of

the password is 8 characters which user can use letter and number.

Page 40: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

27

Figure 4.5 Stego image created

Next, referring to Figure 4.5 after the password was set by the user, stego image was

produced. On the left side is the image before embed with the message. The right side

was the stego image that contains message that user wants to hide. User can save the

stego image at any directory.The first layer of security was done in this step.

Page 41: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

28

4.2.3 Encrypt the Stego Image

4.2.3.1 Interface Design for encryption and decryption

Figure 4.6 Encryption and decryption interface

Figure 4.6 shows an interface for encrypting and decrypting image. It just contains

threes buttons: 1) Choose, 2) Encrypt 3) Decrypt. User needs to choose the image to

encrypt. In this phase, user will choose the stego image that had been done in the

previous step. This, method uses AES algorithm which user must use the same key for

encrypting and decrypting the message.

Page 42: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

29

Figure 4.7 Encryption process

After a user chooses the stego image, the user will click on the ‘Encrypt’ button to

encrypt the image. The pop-up message will appear to tell the user that the file was

successfully encrypted. The encrypted image will be saved in the specified directory.

At this phase, the second layer of security was done.

Figure 4.8 Encrypted stego image

The encrypted stego image was produced. Now, the sender can send the encrypted

stego image to the receiver. At the receiver side, the image also cannot be open until it

was decrypt using decryption process.

Page 43: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

30

4.2.4 Decrypt stego image

Figure 4.9 Decryption process

To retrive back the real message, user chooses the encrypted image, the user will click

on the ‘Decrypt’ button to decrypt the image. The pop-up message will appear to tell

the user that the file was successfully decrypted. The decrypted image will be saved in

the specified directory. The user will use encryption process. At this step, user will

choose the encrypted stego image.

Page 44: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

31

Figure 4.10 Decrypted image

Figure 4.10 shows, after a user chooses the image that want to decrypt, user will click

on the ‘Decrypt’ button. Then pop-pop message will appear to tell the user that the

image was successfully decrypted. The decrypted image also will save in same

directory as at encryption process.

Page 45: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

32

4.2.5 Decode stego image

Figure 4.11 Interface for decode process

After decryption process, user will open the steganography interface. At this phase,

user will click at ‘Decode’ button to start the decode process.

Figure 4.12 Select the image to be decode

Firstly, user will click the ‘File’ button at top left and choose select cover image.

Then, user will choose the decrypted image that had been done in encryption process.

Page 46: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

33

Figure 4.13 Enter the same key for decoding process

After the image was inserted, user will click at ‘Tools’ button, and choose ‘read stego

image’. After that, the pop up will appear and user must enter the password. The

password must be same as it was set at the Encode process.

Figure 4.14 Button Decoding trigger the hidden message

After user enter the password correctly, the message will be show at the text field.

Now, the receiver already decrypt and decode the image and user will get the real

message that encode and encrypted by sender.

Page 47: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

34

4.3 TEST CASE

1. Select Image Table

Number Procedure Expected

Outcome

Result

1. At encode button,

User can open file

to choose image

The cover image

can be open

Success

Table 4.1: Select Image Test Case

2. Write Message Table

Number Procedure Expected

Outcome

Result

1. User can write

down the message

in the text area

The message can

be written

Success

2. Mark message

that user want to

clear or edit

The message that

had been written

can be clear or

edit

Success

Table 4.2: Write Message Test Case

Page 48: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

35

3. Encoded Message Table

Number Procedure Expected

Outcome

Result

1. User click on

“tools” button and

choose “make

stego image”

Pop up message

will appear that

will ask user to

enter password

Success

2. Enter the

password

The message

successfully

encode

Success

Table 4.3: Encode Message Test Case

4. Save Stego Image Table

Number Procedure Expected

Outcome

Result

1. Save the stego

image in any

directory

The stego image

successfully save

Success

Table 4.4: Save Stego Image Test Case

Page 49: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

36

5. Encrypt Stego Image Table

Number Procedure Expected

Outcome

Result

1. User can open the

file to choose

stego image

Stego image can

be choose

Success

2. User click on

“Encrypt” button

to encrypt stego

image

The stego image

successfully

encrypt

Success

Table 4.5: Encode Stego ImageTest Case

Page 50: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

37

6. Decrypt Encrypted Stego Image Table

Number Procedure Expected

Outcome

Result

1. User can open the

file to choose

encrypted stego

image

Encrypted Stego

image can be

choose

Success

2. User click on

“Decrypt” button

to decrypt stego

image

The stego image

successfully

decrypt

Success

Table 4.6: Decrypt Encrypted Stego Image Test Case

Page 51: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

38

7. Decode Stego Image Table

Number Procedure Expected

Outcome

Result

1. User click on

“tools” button and

choose “read

stego image”

Message will

appear that will

ask user to enter

password

Success

2. Enter the

password

The message

successfully

decode

Success

Table 4.7: Decode Message Test Case

Page 52: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

39

CHAPTER V

CONCLUSION

5.1 INTRODUCTION

This chapter concludes the documentation of this project in aspect of

contribution which is what this system can provide to the user for better used,

weakness and limitations of the project were also explaining in this chapter and also

some recommendations for future work that can make this system better in the future.

Page 53: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

40

5.2 CONTRIBUTION

In image steganography using substitution and Advanced Encryption Standard

(AES) algorithm, there are several contributions for user and receiver which is most

important is a security. Today, security of data is of foremost importance in today’s

world. Security has become one of the most important factors in communication and

information technology. Nowadays, a few problems arise especially in securing data

and information when the information had been lost or stolen from an unauthorized

user. The problem is giving information manually will have a high tendency to be

stolen. In the traditional way, information is passing manually using papers and the

possibility of being stolen by unauthorized user is high. So, the attractive solution to

this problem is Image Steganography. The steganography technique will be used to

hide the secret message in Image to produce steo image. Then, to make it more secure,

AES encryption is being used to encrypt stego image.

Page 54: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

41

5.3 WEAKNESS AND LIMITATION

The weakness and limitation of image steganography are:

i. File size

There is difference on size between image before and after embedding with

message. Third parties will be suspicious when looking at a fairly large picture

size.

File Size

Size image before encode Size image after encode

ii. Separate interface

In this project, user need to use two interfaces to make it done at sender side

and receiver side. It is a bit complicated for the user because user must encode

and encrypt or decode and decrypt in two different interfaces.

iii. Hiding data format

For this project, the format of hidden message must be in text only. User

cannot use other format like image, audio or document to embed with the

image.

Page 55: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

42

5.4 RECOMENDATION

Future Scope of this paper is the possibilities of improvements in image

steganography system with respect to a different technique of data hiding in

the image. This paper using different interfaces to complete the project. Thus,

in future, this project can build using only one interface. The next future scope

for the proposed method might be the development of an enhanced

steganography that can have the authentication module along with encryption

and decryption. Meanwhile the work can be enhanced for other data files like

video and audio. In future different keys can be used for encryption and

decryption of data which will provide greater security.

Page 56: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

43

5.5 CONCLUSION

The steganography is one of the safest forms of data transmissions in

this digital world. In the proposed method, an image steganography using

substitution and Advanced Encryption Standard (AES) algorithm is proposed

and tested. It will produce a steganography image that will be able to hide data

or information efficiently from unauthorized user also to ensure the safety of

the information in an authorized hand. By using substitution combination with

AES will provide a good security model for hiding data. AES is preferred over

DES due to its simplicity and its speed. In conclusion, by using this method the

text can be embedded into the cover file and it is accepted in the receiving end

without any change. Thus, it is concluded that the integrity and quality of the

message are well maintained.

Page 57: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

44

APPENDIX

Page 58: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

45

APPENDIX 1

1. Code for encrypt and decrypt in Java Language

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

try {FileInputStream file = new FileInputStream(file_path.getText());

FileOutputStream outStream = new FileOutputStream(new

File("C:/Users/W10/Documents/EncryptionImage/EncryptedStego.jpg"));

byte k[]="StGa3241ARep1029".getBytes();

SecretKeySpec key = new SecretKeySpec(k, "AES");

enc.init(Cipher.ENCRYPT_MODE, key);

CipherOutputStream cos = new CipherOutputStream(outStream, enc);

byte[] buf = new byte [1028];

int read;

while((read=file.read(buf))!=-1){

cos.write(buf,0,read);

file.close();

outStream.flush();

cos.close();

Page 59: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

46

JOptionPane.showMessageDialog(null, "The file encrypted Successfully");

}catch(Exception e){

JOptionPane.showMessageDialog(null, e);

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

try {

FileInputStream file = new FileInputStream(file_path.getText());

FileOutputStream outStream = new FileOutputStream(new

File("C:/Users/W10/Documents/EncryptionImage/DecryptedStego.jpg"));

byte k[]="StGa3241ARep1029".getBytes();

SecretKeySpec key = new SecretKeySpec(k, "AES");

enc.init(Cipher.DECRYPT_MODE, key);

CipherOutputStream cos = new CipherOutputStream(outStream, enc);

byte[] buf = new byte [1028];

int read;

while((read=file.read(buf))!=-1){

cos.write(buf,0,read);

}

File("C:/Users/W10/Documents/EncryptionImage/DecryptedStego.jpg"));

Page 60: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

47

byte k[]="StGa3241ARep1029".getBytes();

SecretKeySpec key = new SecretKeySpec(k, "AES");

enc.init(Cipher.DECRYPT_MODE, key);

CipherOutputStream cos = new CipherOutputStream(outStream, enc);

byte[] buf = new byte [1028];

int read;

while((read=file.read(buf))!=-1){

cos.write(buf,0,read);

}

file.close();

outStream.flush();

cos.close();

JOptionPane.showMessageDialog(null, "The image was decrypted");

}catch(Exception e){

JOptionPane.showMessageDialog(null, e);

}

Page 61: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

48

public class PasswordDialog extends JDialog implements ActionListener

{

Label l,l1;

TextField tf;

Button bt[];

String p;

Panel p1,p2,p3;

public PasswordDialog(JFrame f)

{

super(f,true);

setSize(250,100);

setLocation(250,250);

p1 = new Panel(new GridLayout(1,3));

getContentPane().add(p1,"North");

l = new Label(" Enter Password");

p1.add(l);

l1 = new Label(" Min Length Of Password 8 Characters");

getContentPane().add(l1,"Center");

tf = new TextField(8);

tf.addActionListener(this);

p1.add(tf);

tf.setEchoChar('*');

p2 = new Panel(new GridLayout(1,2));

getContentPane().add(p2,"South");

bt = new Button[2];

Page 62: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

49

String s[] = {"Accept","Cancel"};

for(int i=0;i<=1;i++)

{

bt[i] = new Button(s[i]);

bt[i].addActionListener(this);

p2.add(bt[i]);

}

}

Page 63: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

50

REFERENCES

1. International Journal of Enhanced Research in Science Technology &

Engineering, ISSN: 2319-7463 Vol. 3 Issue 6, June-2014, pp: (241-245),

Impact Factor: 1.252, Available online at: www.erpublications.com

2. IOSR Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-

0661,p-ISSN: 2278-8727, Volume 18, Issue 1, Ver. IV (Jan – Feb. 2016),

PP 39-43 www.iosrjournals.org

3. Annual Int'l Conference on Intelligent Computing, Computer Science &

Information Systems (ICCSIS-16) April 28-29, 2016 Pattaya (Thailand)

4. International Journal of Computer & Organization Trends –Volume 3 Issue

7 – August 2013

5. International Journal of Computer Science and Communication

Engineering IJCSCE Special issue on “Recent Advances in Engineering &

Technology” NCRAET-2013

6. Indian Journal of Science and Technology, Vol 9(39), DOI:

10.17485/ijst/2016/v9i39/86878, October 2016

7. International Journal of Computer Applications (0975 – 8887) Recent

Trends in Future Prospective in Engineering & Management Technology

2016

8. I.J. Image, Graphics and Signal Processing, 2014, 8, 19-24 Published

Online July 2014 in MECS (http://www.mecs-press.org/) DOI:

10.5815/ijigsp.2014.08.03

Page 64: HIDING DIGITAL DATA IN IMAGE STEGANOGRAPHY USING ...

51

9. Satwinder Singh and Varinder Kaur Attri .Dual Layer Security of data

using LSB Image Steganography Method and AES Encryption , ISSN:

2231-2307, Volume-2, Issue-3, July 2015.

10. “Efficient Implementation of AES”, Ritu Pahal, Vikas Kumar, Volume 3,

Issue 7, July 2014 ISSN: 2277 128X IJARCSSE

11. Fridrich, J., Feature-based steganalysis for jpeg images and its implications

for future design of steganographic schemes. In Proceedings of the 6th

Information Hiding Workshop, volume 3200 of LNCS, 2015

12. Bhavana. S and K. L. Sudha, (2013) “Text Steganography using LSB

insertion Method Along With Chaos Theory”, in Proc. of International

Journal of Computer Science, Engineering and Applications (IJCSEA),

Vol. 2

13. Z. Liu and L. Xi, (2011) “Image information hiding encryption using

chaotic sequence,” in Proc. of the 11th International Conference on

Knowledge-Based Intelligent Information and Engineering Systems

14. C. Liu and S. Liao, “High-performance JPEG steg- anography using

complementary embedding strategy,” Pattern Recognition, Vol. 41,2012

15. Eiji Kawaguchi, Richard O. Eason: (2014) Principle and applications of

BPCS – Steganography

16. A.Habes, (Feb 2006): Information Hiding in BMP image Implementation,

Analysis and Evaluation, Information Transmission in Computer Networks