0% found this document useful (0 votes)
7 views80 pages

Report Merged

The document is a mini project report titled 'Secure Data Transfer Over Internet Using Image Steganography Through AES Algorithm' submitted by Sabani S for a Master's degree at Manonmaniam Sundaranar University. It explores the use of image steganography combined with the AES encryption algorithm to securely transfer data over the internet, detailing various techniques, algorithms, and system configurations. The report includes sections on introduction, algorithms, system design, results, and future enhancements.

Uploaded by

Joseph Franklin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views80 pages

Report Merged

The document is a mini project report titled 'Secure Data Transfer Over Internet Using Image Steganography Through AES Algorithm' submitted by Sabani S for a Master's degree at Manonmaniam Sundaranar University. It explores the use of image steganography combined with the AES encryption algorithm to securely transfer data over the internet, detailing various techniques, algorithms, and system configurations. The report includes sections on introduction, algorithms, system design, results, and future enhancements.

Uploaded by

Joseph Franklin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

SECURE DATA TRANSFER OVER INTERNET USING

IMAGE STEGANOGRAPHY THROUGH AES ALGORITHM

Mini Project Report

Submitted to the partial fulfillment of the requirements for the award of degree of Master
of Computer Science of

Manonmaniam Sundaranar University, Tirunelveli

Submitted by

SABANI S

REG.NO- 20203212506214

Under the Guidance of

Dr. M. Milton Joe, MCA., Ph.D.,

(Assistant Professor, Department of Computer Science)

Department of Computer Science

St. Jerome’s College

(Affiliated to Manonmaniam Sundaranar University, Tirunelveli)

Anandhanadarkudy, Nagercoil- 629201

November – 2021
ST. JEROME’S COLLEGE

(Affiliated to Manonmaniam Sundaranar University, Tirunelveli)

Anandhanadarkudy, Nagercoil- 629201

DEPARTMENT OF COMPUTER SCIENCE

BONAFIDE CERTIFICATE

This is to certify that the mini project report entitled “SECURE DATA TRANFER
OVER INTERNET USING IMAGE STEGANOGRAPHY THROUGH AES
ALGORITHM” is the bonafide record of the project work done by SABANI S (Reg
No: 20203212506214) in partial fulfillment of the requirements for the award of the
degree of Master of Science in Computer Science of Manonmaniam Sundaranar
University, Tirunelveli during the academic Year 2021-2022.

Dr. M. Milton Joe, MCA., Ph.D., Mrs. V .Juliet Rani, MCA., M.Phil.,
(Project Guide) (Head of the Department)

Place: Anandhanadarkudy External Examiner(s)


Date :

This mini Project is submitted for the Viva-Voce Examination held at St. Jerome’s
College, Anandhanadarkudy on……………………………
DECLARATION

This is to declare that the mini project report entitled “SECURE DATA TRANSFER
OVER INTERNET USING IMAGE STEGANOGRAPHY THROUGH AES
ALGORITHM “ done at the Department of Computer Science in St. Jerome’s college,
Anandhanadarkudy and submitted to the partial fulfillment of the requirements for the
award of the degree in Master of Computer Science is an original work done during the
academic year 2021-2022 under the guidance of Dr. M. Milton Joe MCA., Ph.D.,
(Assistant Professor, Department of Computer Science) and the work reported herein
does not form part of any other thesis or dissertation.

Place: Anandhanadarkudy Submitted By

Date: SABANI S
ABSTRACT

Steganography is the art of hiding the fact that communication is taking place, by hiding
information in other information. Many different carrier file formats can be used, but
digital images are the most popular because of their frequency on the internet. Image
steganography refers to hiding information text. Different applications may require
absolute invisibility of the secret information, while others require a large secret message
to be hidden. Steganography is the practice of hiding private or sensitive information
within something that appears to be nothing out to the usual. Steganography is often
confused with cryptology because the two are similar in the way that they both are used
to protect important information. The most common form of steganography used today
hides files within image files on a computer. The difference between two is that
steganography involves hiding information so it appears that no information is hidden at
all. If a person or persons views the object that the information is hidden inside of he or
she will have no idea that there is any hidden information, therefore the person will not
attempt to decrypt the information. What steganography essentially does is exploit human
perception, human senses are not trained to look for files that have information inside of
them, although this software is available that can do what is called Steganography. The
most common use of steganography is to hide a file inside another file. Image
steganography is followed by many of algorithms, but this project follows an AES
algorithm. Because Stronger and faster than triple DES. AES is more secure than the
DES cipher and is the de facto world standard. The AES encryption algorithm is also
used to further enhance the security of the scheme. Security is made available by
encrypting the information that is transferred in the image and again encrypting the image
that has the data using the AES algorithm.

iv
ACKNOWLEDGMENT

First I convey my heart full thanks to almighty God for his countless blessings shown on
me for this academic project work.

I wish to convey my heart full thanks to Dear Rev Fr. A. Suvakkin crs, Correspondent
of St. Jerome’s College for his timely help to do my project.

I wish to convey my heart full thanks to eminent principal Dr. A. Amal Raj, M.Sc.,
Ph.D., B.Ed., DCA., Principal of St. Jerome’s College for giving me an opportunity to
do this project work.

I wish to convey my sincere thanks to Mrs. V .Juliet Rani, MCA., M.Phil., Head of
Department of Computer Science for her full support in completing the project.

I wish to convey my deep and grateful thanks to the guide, Dr. M. Milton Joe, MCA.,
Ph.D., Assistant professor in Department of Computer Science for guiding me to
complete the project successfully.

I wish to convey my thanks to all the staff of computer science department, who helped
me in completing the project.

By,

S. Sabani

v
TABLE OF CONTENTS

Title Page No

ABSTRACT IV
LIST OF FIGURES X
LIST OF ABBREVIATION XII

1. INTRODUCTION 1
1.1. What is Steganography 3
1.2. Steganography Data 3
1.3. Why Steganography 4
1.4. Uses of Steganography 5
1.5. Application of Steganography 6
1.6. Types of Steganography 6
1.6.1. Image Steganography 7
1.6.2. Text Steganography 7
1.6.3. Audio Steganography 7
1.6.4. Video Steganography 8
1.6.5. Network Steganography 8
1.7. What is Image Steganography 8
1.8. Advantages of Image Steganography 9
1.9. What is Encryption 10
1.9.1. Uses of Encryption 10
1.10. What is Decryption 11
1.10.1.Uses of Decryption 11
2. STEGANOGRAPHY ALGORITHMS 12
2.1. AES Algorithm 12
2.1.1. AES Encryption and Decryption Process 13
2.2. DES Algorithm 14

vi
2.2.1. Steps for Generating Keys 15
2.2.2. Steps for Encryption 15
2.2.3. Steps for Decryption 16
2.3. RSA Algorithm 17
2.3.1. RSA Encryption and Decryption 18
2.3.2. Generate Private and Public key 19
2.4. LSB Algorithm 20
2.4.1. Data Embedding 21
2.4.2. Advantages of LSB 21
2.5. DWT Method 22
2.5.1. Wavelet Analysis 22
2.6. Steganography Techniques 24
2.6.1. Spatial domain technique 24
2.6.2. Transform domain 24
2.6.3. Masking and Filtering 24
2.7. What is Embedding 25
2.8. What is Extracting 26
3. IMAGE STEGANOGRAPHY THROUGH AES ALGORITHM 27
3.1. How does AES work 27
3.1.1. AES Encryption 29
3.1.1.1. What is Plain Text 30
3.1.1.2. Key Expansion 31
3.1.1.3. Add Round key 32
3.1.1.4. Byte Substitution 33
3.1.1.5. Shift Row 35
3.1.1.6. Mix Column 36
3.1.1.7. Add Round Key(again) 37
3.1.2. AES Decryption 40
3.1.2.1. What is Cipher Text 41

vii
3.1.2.2. Inverse Add Round Key 41
3.1.2.3. Inverse Byte Substitution 41
3.1.2.4. Inverse Mix Column 42
3.1.2.5. Inverse Shift Row 42
3.2. Feature of AES 42
4. SYSTEM CONFIGURATION 43
4.1. Hardware Requirement 43
4.2. Software Requirement 43
5. SYSTEM DESIGN 44
5.1. Data Flow Diagram of Image Steganography Through 44
AES Algorithm
5.2. Data Flow Diagram of Encryption and Decryption Process 45
Through AES Algorithm
6. RESULT AND DISCUSSION 48
6.1. Data Hiding ( Sender Side ) 48
6.1.1. Enter Plain Text 49
6.1.2. Binary Convertor 47
6.1.3. Apply AES Encryption 48
6.1.4. Browse Image for Hide Encrypted Text 49
6.1.5. Plot Histogram of Plain Image 50
6.1.6. Embed Data 51
6.1.7. Plot Histogram of Stego Image 52
6.1.8. Hiding Capacity 53
6.2. Data Extracting ( Receiver Side ) 55
6.2.1. Browse Stego Image 56
6.2.2. Extract Data From Stego Image 56
6.2.3. Decrypt Data 57
6.2.4. Binary to Text Convector 58
6.2.5. Original Message 58

viii
7. SYSTEM TESTING 59
7.1. Introduction 59
7.2. Unit Testing 59
7.3. Integration Testing 59
7.3.1. Top Down Integration 59
7.3.2. Bottom Up Integration 60
7.4. Acceptance Testing 60
7.5. Black Box Testing 60
7.6. White Box Testing 61
7.7. Output Testing 61
7.8. Validation Testing 61
7.8.1. Text Field 61
7.8.2. Numeric Field 61
7.8.3. Preparation of Test Data 62
7.8.4. Using Live Test Data 62
7.8.5. Using Artificial Test Data 62
7.8.6. User Training 63
7.8.7. Maintenance 63
7.8.8. Testing Strategy 63
8. CONCLUSION AND FUTURE ENHANCEMENT 64
8.1. Conclusion 64
8.2. Future Enhancement 64
9. APPENDIX 65
9.1. Sample Source Code 65
10. BIBLIOGRAPHY 68

ix
LIST OF FIGURES

Figure No Title Page No

1 Steganography Data 4

2 Image Steganography Diagram 9

3 AES Structure 12

4 DES Structure 17

5 RSA Encryption and Decryption Diagram 18

6 LSB Block Diagram 20

7 DWT Method 23

8 Steganography System Design 25

9 AES Block Diagram 28

10 AES Encryption Diagram 30

11 Byte Substitution Diagram 34

12 Shift Row Diagram 36

13 Mix Column Diagram 37

14 Add Round Key Diagram 39

15 AES Decryption Diagram 40

16 Data Flow Diagram of Image Steganography Through 48

AES Algorithm

17 Data Flow Diagram of Encryption and Decryption 45

Through AES Algorithm

18 Data Hiding (Sending Side) Screenshot 46

19 Enter Plain Text Screenshot 47

x
20 Binary to Text Converter Screenshot 48

21 Apply AES Encryption Screenshot 48

22 Browse the image Screenshot 49

23 Select an Image Form Folder Screenshot 49

24 Selected Plain Image Screenshot 50

25 Plot Histogram of Plain Image Screenshot 51

26 Embedded Image Screenshot 51

27 Plot Histogram of stego images screenshot 52

28 Hiding Capacity Screenshot 53

29 The Entire Data Hiding Screenshot 54

30 Data Extraction Screenshot 55

31 Browse the stego image Screenshot 55

32 Selected Stego image Screenshot 56

33 Extract Data from Stego Image Screenshot 57

34 Decrypt Data Screenshot 57

35 Binary to Text Convertor Screenshot 58

36 The Entire Data Extraction Result 58

xi
LIST OF ABBREVIATION

AES - Advanced Encryption Standard

DES - Data Encryption Standard

RSA - Rivest–Shamir–Adleman

LSB - Least Significant Bit

DWT - Discrete Wavelet Transform

xii
1. INTRODUCTION

Image processing is a method to perform some operations on an image, in order to get an


enhanced image or to extract some useful information from it. It is a type of signal
processing in which input is an image and output may be image or characteristics/features
associated with that image. Nowadays, image processing is among rapidly growing
technologies. It forms core research area within engineering and computer science
disciplines too.

Image processing basically includes the following three steps:

• Importing the image via image acquisition tools;

• Analyzing and manipulating the image;

• Output in which result can be altered image or report that is based on image
analysis.

There are two types of methods used for image processing namely, analogue and
digital image processing. Analogue image processing can be used for the hard copies like
printout and photographs. Image analysts use various fundamentals of interpretation
while using these visual techniques. Digital image processing techniques help in
manipulation of the digital images by using computers. The three general phases that all
types of data have to undergo while using digital technique are pre-processing,
enhancement, and display, information extraction.

It contains a few fundamental definitions such as image, digital image, and digital
image processing. Different sources of digital images will be discussed and examples for
each source will be provided. The continuum from image processing to computer vision
will be covered in this lecture.

Depending on whether the image resolution is fixed, it may be of vector or raster type. By
itself, the term "digital image" usually refers to raster images or bitmapped images
Digital Image is an image or picture represented digitally i.e., in groups of combinations

1
bits( 0 or 1) or specifically called pixels. A digital image is a numeric representation,
normally binary, of a two-dimensional image. Digital images based on the way that
image data is saved, images can be split into 3 different types:

 Vector or raster
 Raster images or bitmap
 Metafile

Vector graphics are computer graphics images that are defined in terms of 2D points,
which are connected by lines and curves to form polygons and other shapes. Each of
these points has a definite position on the x- and y-axis of the work plane and determines
the direction of the path; further, each path may have various properties including values
for stroke color, shape, curve, thickness, and fill. Vector graphics are commonly found
today in the SVG, EPS, PDF or AI graphic file formats and are intrinsically different
from the more common raster graphics file formats such as JPEG, PNG, APNG, GIF, and
MPEG4. One of the first uses of vector graphic displays was the US SAGE air defense
system. Vector graphics systems were retired from the U.S. en route air traffic control in
1999, and are likely still in use in military and specialized systems. Vector graphics were
also used on the TX-2 at the MIT Lincoln Laboratory by computer graphics pioneer Ivan
Sutherland to run his program Sketchpad in 1963. Bitmap A bitmap is a rectangular grid
of pixels, with each pixel's color being specified by a number of bits. A bitmap might be
created for storage in the display's video memory or as a device independent bitmap file.

A raster is technically characterized by the width and height of the image in pixels and by
the number of bits per pixel. The printing and prepress industries know raster graphics as
condones (from "continuous tones"). The opposite to condone is "line work", usually
implemented as vector graphics in digital systems. Vector images can be rasterized
(converted into pixels), and raster images vectored (raster images converted into vector
graphics), by software. In both cases some information is lost, although vectoring can
also restore some information back to machine readability, as happens in optical

2
character recognition. Metafile Metafile graphics are simply 2D graphics that are made
up of both vector and bitmap. If you draw a shape using vector graphics, and the filled it
with a bitmap pattern, then you would have metafile. The vector object still retains the
property of scalability without any loss of resolution. The circle above was created as a
vector graphic, and then a fill added. It was saved as .gif to include this page, which
unfortunately changes it to a bitmap with a subsequent loss of scalability.

1.1 Steganography

Steganography is the technique of hiding secret data within an ordinary, non-secret, file
or message in order to avoid detection; the secret data is then extracted at its destination.
The use of steganography can be combined with encryption as an extra step for hiding or
protecting data. The word steganography is derived from the Greek
words steganos (meaning hidden or covered) and the Greek root graph (meaning to
write). Steganography can be used to conceal almost any type of digital content,
including text, image, video or audio content; the data to be hidden can be hidden inside
almost any other type of digital content. The content to be concealed through
steganography -- called hidden text -- is often encrypted before being incorporated into
the innocuous-seeming cover text file or data stream. If not encrypted, the hidden text is
commonly processed in some way in order to increase the difficulty of detecting the
secret content.

1.2 Steganography Data

Steganography is the capacity of covering information/data in such way that avoid the
exposure of covered data. By the combination of two Greek words we get the word
steganography, who’s precisely means “enclosed script.” It takes a huge collection of
undisclosed communications procedures that wraps the messages survival. The
procedures are invisible inks, microdots, arrangement of characters and covert channels,
digital signatures, and spread spectrum. Steganography and cryptography are different

3
Ways for hiding. Cryptography changes a message so it cannot be understood easily but
we cannot hide its existence. Steganography covers the message so it cannot be seen
without help of decoders. Information in cipher text may misguide brain of the recipient
for some time, while “undetectable” information produced with stenographic procedures
will not. After embedding the cover information in original image we get the stego image
with the help of steganography. Steganography Data is shown in the figure1,

Figure 1 Steganography Data

1.3 Why Steganography

The main motive of steganography is to encode the data so we can represent the
information in ordered format. We can exchange the bit randomly and information
materializes shows that it is unique and true that cannot be detectable by most of the
persons with naked human eyes. By this sender doesn’t feel that there can be any type
fear from third party can use their secret information. And receiver can get the data
secretly.

4
1.4 Uses of Steganography

Steganography is only used for security purpose of information that we want to send to
another side safely. There are basic elementary classes of steganography

 Subliminal communication

 Integrity and authentication

 Illicit exfiltration

Subliminal communication

This type of communication hides that some information is transferred in a particular file.
For passing the information from sender to receiver secretly hidden in one another type of
information is wrapping as a single unit. The secret canal is a medium of transformation
of information. There are number of ways to conceal information: by adjusting least
significant bit of pixel in cover information.

Integrity and authentication

By using steganography technique we can say that our information is much more secure.
Since nobody can alter any information till they can know the proper method of
extracting the information. Integrity defines that our information is not altered by any
other sources. Once you lock the data by sender key, it only provides the authentication
to valid receiver to open and extract the original information from the file.

Illicit exfiltration

This can supply a large value of bandwidth communiqué channel which requires a
complicated user to put into operation. It is special type of malware in surroundings
where unformatted files are downgraded to lower level class from high level security.

5
The wrappers created are firstly downgraded and then information is carried out when
file is transferred to a low protection area.

1.5 Application of Steganography

Private Communication

Used in defense organizations for information exchange without knowing of third party.

Protection against information alteration

Smart identity cards are used in which details of the persons are embedded inside the
card.

Access Control

Used for voting system to reduce toughness and increase safety.

Media Database Systems

Used in Media Database systems so audio, video can transform.

1.6 Types of Steganography

Depending on the nature of the cover Object (actual object in which secret data is
embedded), steganography can be divided into five types:

 Image Steganography
 Text Steganography
 Audio Steganography
 Video Steganography
 Network Steganography

6
1.6.1 Image Steganography

Hiding the data by taking the cover object as the image is known as image
steganography. In digital steganography, images are widely used cover source because
there are a huge number of bits present in the digital representation of an image. There
are a lot of ways to hide information inside an image. Common approaches include:

 Least Significant Bit Insertion


 Masking and Filtering
 Redundant Pattern Encoding
 Encrypt and Scatter
 Coding and Cosine Transformation

1.6.2 Text Steganography

Text Steganography is hiding information inside the text files. It involves things like
changing the format of existing text, changing words within a text, generating random
character sequences or using context-free grammars to generate readable texts. Various
techniques used to hide the data in the text are:

 Format Based Method


 Random and Statistical Generation
 Linguistic Method

1.6.3 Audio Steganography

In audio steganography, the secret message is embedded into an audio signal which alters
the binary sequence of the corresponding audio file. Hiding secret messages in digital
sound is a much more difficult process when compared to others, such as Image
Steganography. Different methods of audio steganography include:

 Least Significant Bit Encoding

7
 Parity Encoding
 Phase Coding
 Spread Spectrum

This method hides the data in WAV, AU, and even MP3 sound files.

1.6.4 Video Steganography

In Video Steganography you can hide kind of data into digital video format. The
advantage of this type is a large amount of data can be hidden inside and the fact that it is
a moving stream of images and sounds. You can think of this as the combination of
Image Steganography and Audio Steganography. Two main classes of Video
Steganography include:

 Embedding data in uncompressed raw video and compressing it later


 Embedding data directly into the compressed data stream

1.6.5 Network Steganography

It is the technique of embedding information within network control protocols used in


data transmission such TCP, UDP, and ICMP etc. You can use steganography in some
covert channels that you can find in the OSI model. For Example, you can hide
information in the header of a TCP/IP packet in some fields that are either optional.

1.7 Image Steganography


Image Steganography is the process of hiding information which can be text, image or
video inside a cover image. The secret information is hidden in a way that it not visible to
the human eyes. Deep learning technology, which has emerged as a powerful tool in
various applications including image steganography, has received increased attention
recently. The main goal of this paper is to explore and discuss various deep learning
methods available in image steganography field. Steganography is the process of hiding a

8
secret message within a larger one in such a way that someone cannot know the presence
or contents of the hidden message. The purpose of Steganography is to maintain secret
communication between two parties. This paper will show how Steganography is used in
a modern context while providing a practical understanding of what Steganography is and
how to accomplish it Deep learning techniques used for image steganography can be
broadly divided into three categories - traditional methods, Convolutional Neural
Network-based and General Adversarial Network-based methods. Along with the
methodology, an elaborate summary on the datasets used, experimental set-ups
considered and the evaluation metrics commonly used are described in this paper. Tables
summarizing all the details are also provided for easy reference. This paper aims to help
the fellow researchers by compiling the current trends, challenges and some future
direction in this field. The entire process shown in the Figure 2,

Figure 2 Image Steganography Diagram

1.8 Advantages of Image Steganography


 It is used in the way of hiding not the information but the password to reach
that information
 Difficult to detect. Only receiver can detect.

9
 The advantage of steganography, over cryptography alone, is that messages
do not attract attention to themselves.
 Plainly visible encrypted messages—no matter how unbreakable—will
arouse suspicion, and may in themselves be incriminating in countries
where encryption is illegal
 Steganography is a method of hiding secret data, by embedding it into an
audio, video, image, or text file. It is one of the methods employed to
protect secret or sensitive data from malicious attacks.

1.9 What is Encryption

An encryption algorithm is the method used to transform data into cipher text. An
algorithm will use the encryption key in order to alter the data in a predictable way, so
that even though the encrypted data will appear random, it can be turned back into
plaintext by using the decryption key.

1.9.1 Uses of Encryption

Steganography is the technique of hiding secret data within an ordinary,


non-secret, file or message in order to avoid detection; the secret data is then extracted at
its destination. The use of steganography can be combined with encryption as an extra
step for hiding or protecting data.

 Encryption is Cheap to Implement.


 Encryption Can Save You from Regulatory Fines.
 Encryption Can Help to Protect Remote Workers.
 Encryption Increases the Integrity of Our Data.
 Encryption Can Increase Consumer Trust.
Encryption is commonly used to protect data in transit and data at rest. Every time
someone uses an ATM or buys something online with a smartphone, encryption is used
to protect the information being relayed.

10
1.10 What is Decryption

The conversion of encrypted data into its original form called Decryption. It
is generally a reverse process of encryption. It decodes is the encrypted information so
that an authorized user can only decrypt the data because decryption requires a secret key
or password.

1.10.1 Uses of Decryption

This happens because of the encryption and decryption of data before it can
be used. The main advantages are: Making the use of inheritance, redundant code is
eliminated, and the existing class is extended.

11
2. STEGANOGRAPHY ALGORITHMS

2.1 AES Algorithm

The Advanced Encryption Standard algorithm (also known as the Rijndael


algorithm) is a symmetrical block cipher algorithm that takes plain text in blocks of 128
bits and converts them to cipher text using keys of 128, 192, and 256 bits. Since the AES
algorithm is considered secure, it is in the worldwide standard. AES Structure is as shown
as,

Figure 3 AES Structure

12
2.1.1 AES Encryption and Decryption Process

Conversion of original image i.e. plain image into encrypted image i.e.
cipher image is known as image encryption. On 128bits of block size data below
operation are done. The rounds have following stages in AES:

Substitute Bytes

It is a non-linear byte substitution; operation on each of the state bytes independently


takes place [4]. Depending on its value state bytes of matrix is substituted from s-box
lookup table. S-box look up table contains all the 256 combinations of 8-bit. If the state
byte value is 25 then the combination present at 2nd row and 5th column will be replaced
by it.

Shift Row

This operation includes, the rows are shifted to the left in a cyclic manner according to
their row number. Row 0 remain unchanged. 1st row does a shift of one byte to the left;
row 2 does a shift of two bytes to the left and row 3 does a shift of three bytes to the left.

Mix Columns

In this step, the columns of the state are assumed as polynomials and multiplied by a
special mathematical modulo + 1 with a fixed polynomial c(x), where, c(x)={03}x3 +
{01}x2 + {01}x+ {02}. Every column is multiplied to this polynomial to generate new
columns. In the last round of operation, the mix column transformation does not occur.

Add Round Key

In the Add Round Key transformation, the cipher key is added to the resultant states of
the column transformation. The round key is simply EX-ORed with the output of the
column transformation [6]. Added key in each round is different because AES also used
key expansion algorithm. AES generate these entire key from the single 128-bit key using

13
key expansion algorithm. In AES first key is EXORed with plaintext then the round
operations begins.

2.2 DES Algorithm

Data Encryption Standard is a block cipher and encrypts data in blocks of size of 64 bits
each, which means 64 bits of plain text, goes as the input to DES, which produces 64 bits
of cipher text. The same algorithm and key are used for encryption and decryption, with
minor differences. The key length is 56 bits. Data Encryption Standard (DES) is a block
cipher algorithm that takes plain text in blocks of 64 bits and converts them to cipher text
using keys of 48 bits. It is a symmetric key algorithm, which means that the same key is
used for encrypting and decrypting data. Its key of 56-bit is short for high security. These
56 key bits can be easily known by brute force attack and then attacker can break down
the encrypted data easily. Cascading two and three operations of DES with distinct keys
advanced DES like double DES encryption is done. These advanced DES are not worked
very fast, especially in software. DES was designed for efficient hardware
implementation, but it properly not works in software. The principal of the DES is very
simple. Divide plaintext data into a block of size 64 bits each, which is an initial
permutation. After initial permutation on the 64-bit block, the block is divided into two
parts of 32 bit called left plaintext and right plaintext. The left plaintext and right
plaintext goes through 16 rounds of encryption process along with 16 different keys for
each round. 16 rounds of encryption process left plaintext and right plaintext gets
combined and final permutation operation is performed on this combined block. The
inverse of initial permutation is also called final permutation. This produces a 64-bit
encrypted block. In this way, all the plaintext get encrypted by performing broad level
steps on it in order to produce encrypted cipher text. This way block by block of the size
of 64-bit is encrypted. After the encryption is done by the DES algorithm, the encrypted
message is converted to its ASCII code. This ASCII code then converted to their
equivalent binary format. Now, this binary data is inserted in the cover image of which is
to be sent for communication purpose.

14
2.2.1 Steps for Generating Keys

There are 16 rounds of encryption in the algorithm, and a different key is


used for each round. Howkeys are generated is listed below.

1. Compress and transpose the given 64-bit key into a 48-bit key using the following
table:

PC-1 table

2. Divide the result into two equal parts: C and D.

3. C and D are left-shifted circularly. For encryption rounds 1, 2, 9, and 16 they are left
shifted circularly by 1 bit; for all of the other rounds, they are left-circularly shifted by 2.

4. The result is compressed to 48 bits in accordance with the following rule:

PC-2 table

5. The result of step 3 is the input for the next round of key generation.

2.2.2 Steps for Encryption

1. Transpose the bits in the 64-block according to the following:

The initial permutation table

2. Divide the result into equal parts: left plain text (1-32 bits) and right plain text (33-64
bits)

3. The resulting parts undergo 16 rounds of encryption in each round.

The right plain text is expanded using the following expansion table:

The expansion table

15
4. The expanded right plain text now consists of 48 bits and is XORed with the 48-bit
key.

5. The result of the previous step is divided into 8 boxes. Each box contains 6 bits. After
going through the eight substitution boxes, each box is reduced from 6 bits to 4 bits. The
first and last bit of each box provides the row index, and the remaining bits provide the
column index. These indices are used to look-up values in a substitution box. A
substitution box has 4 rows, 16 columns, and contains numbers from 0 to 15.

6. The result is transposed in accordance with the following rule:

The permutation table

7. XOR the left half with the result from the above step. Store this in the right plain text.

8. Store the initial right plain text in the left plain text.

9. These halves are inputs for the next round. Remember that there are different keys for
each round.

Finally, apply the inverse permutation (inverse of the initial permutation), and the
cipher text will be generated.

2.2.3 Steps for decryption

The order of the 16 48-bit keys is reversed such that key 16 becomes key 1, and so on.
Then, the steps for encryption are applied to the cipher text. DES Structure Diagram is as
shown as,

16
Figure 4 DES Structure

2.3 RSA Algorithm

The Rivest–Shamir–Adleman algorithm is an asymmetric cryptography


algorithm; this means that it uses a public key and a private key (i.e. two different,
mathematically linked keys). As their names suggest, a public key is shared publicly,
while a private key is secret and must not be shared with anyone. RSA encryption
algorithm is a type of public-key encryption algorithm. To better understand RSA, let’s
first understand what public-key encryption algorithm is. The entire RSA Algorithm
process shown in the Figure 5.

17
Figure 5 RSA Encryption and Decryption Diagram

2.3.1 RSA Encryption and Decryption

Public Key encryption algorithm is also called the Asymmetric algorithm. Asymmetric
algorithms are those algorithms in which sender and receiver use different keys for
encryption and decryption. Each sender is assigned a pair of keys:

 Public key
 Private Key

The Public key is used for encryption, and the Private Key is used for decryption.
Decryption cannot be done using a public key. The two keys are linked, but the private

18
key cannot be derived from the public key. The public key is well known, but the private
key is secret and it is known only to the user who owns the key. It means that everybody
can send a message to the user using user's public key. But only the user can decrypt the
message using his private key

 The data to be sent is encrypted by sender A using the public key of the intended
receiver
 B decrypts the received cipher text using its private key, which is known only to
B. B replies to A encrypting its message using A's public key.
 A decrypts the received cipher text using its private key, which is known only to
him.

2.3.1 Generate Private and Public key

 Select two large prime numbers, p and q.


 Multiply these numbers to find n = p x q, where n is called the modulus for
encryption and decryption.
 Choose a number e less than n, such that n is relatively prime to (p - 1) x (q -1). It
means that e and (p - 1) x (q - 1) have no common factor except 1. Choose "e"
such that 1<e < φ (n), e is prime to φ (n),
gcd (end(n)) =1
 If n = p x q, then the public key is <e, n>. A plaintext message m is encrypted
using public key <e, n>. To find cipher text from the plain text following formula
is used to get cipher text C.
C = me mod n
Here, m must be less than n. A larger message (>n) is treated as a concatenation of
messages, each of which is encrypted separately.
 To determine the private key, we use the following formula to calculate the d such
that:
De mod {(p - 1) x (q - 1)} = 1
19
Or
De mod φ (n) = 1
 The private key is <d, n>. A cipher text message c is decrypted using private key
<d, n>. To calculate plain text m from the cipher text c following formula is used
to get plain text m.
m = cd mod n

2.4 LSB Algorithm

Least significant bit algorithm least significant bit (LSB) insertion is a


common, simple approach to embedding information in a cover image. The least
significant bit in other words, the 8th bit of some or all of the bytes inside an image is
changed to a bit of the secret message. Images are made up of pixels which usually refer
to the color of that particular pixel. In a greyscale (black and white) image, these pixel
values range from 0-255, 0 being black and 255 being white. The Entire process is
shown in the Figure 6.

Figure 6 LSB Block Diagram

20
2.4.1 Data Embedding

LSB stands for Least Significant Bit. The idea behind LSB embedding is that if we
change the last bit value of a pixel, there won’t be much visible change in the color. For
example, 0 is black. Changing the value to 1 won’t make much of a difference since it
is still black, just a lighter shade.

The encoding is done using the following steps:

1. Convert the image to greyscale


2. Resize the image if needed
3. Convert the message to its binary format
4. Initialize output image same as input image
5. Traverse through each pixel of the image and do the following:
 Convert the pixel value to binary
 Get the next bit of the message to be embedded
 Create a variable temp
 If the message bit and the LSB of the pixel are same, set temp = 0
 If the message bit and the LSB of the pixel are different, set temp = 1
 This setting of temp can be done by taking XOR of message bit and the LSB of
the pixel
 Update the pixel of output image to input image pixel value + temp
6. Keep updating the output image till all the bits in the message are embedded
7. Finally, write the input as well as the output image to local system

2.4.2 Advantages of LSB


 This method is very fast and easy to implement in comparison to other methods of
image Steganography.
 The output image has very slight difference to the input image.
 Instead of embedding the message in only the LSB, we can embed the message in
last two LSBs, thus embedding even large messages.
21
 This method forms the basics of many other complex algorithms
 Instead of embedding the message in only the LSB, we can embed the message in
last two LSBs, thus embedding even large messages.

2.5 DWT Method

The discrete wavelet transform (DWT), as formulated in the late 1980s by Daubechies
(1988), Mallet (1989a, b, c), and others, has inspired extensive research into how to use
this transform to study time series. One focus of this research has been on the wavelet
variance (also called the wavelet spectrum). The wavelet variance decomposes the
variance of a time series and, hence, provides an analysis of variance (ANOVA). The
most widely used ANOVA technique in time series analysis is spectral analysis, which
involves the Fourier-based spectral density function (SDF). The ANOVA that the wavelet
variance provides is in many ways similar to that afforded by the SDF (Li and Oh, 2002);
however, from a practitioner's point of view, there are key differences. The SDF is a
decomposition of variance across a continuum of Fourier frequencies. Each component in
the decomposition reflects the degree to which a time series resembles a sinusoid with a
particular frequency. The wavelet variance differs in that it is decomposition across a
discrete set of scales. Roughly speaking, a scale is an interval (or span) of time over
which a time series is averaged. The strength of each component in the decomposition
measures how much variability there is between adjacently located averages associated
with a particular scale. The concept of scale is distinct from that of period (the inverse of
frequency). Both are measured in the same units, but period does not involve averaging.
Although it is possible to estimate an SDF indirectly via the wavelet variance (Tassioglou
and Walden, 2002), the different interpretations that frequency and scale have make the
ANOVA afforded by the wavelet variance more appealing than the one given by the SDF
for interpreting certain time series.

22
2.5.1 Wavelet Analysis

A discrete wavelet transform (DWT) is a transform that decomposes a given signal into a
number of sets, where each set is a time series of coefficients describing the time
evolution of the signal in the corresponding frequency band.
The first results of using wavelet analysis of EEG signal to derive a univariate descriptor
of the depth of hypnosis have been presented by Bibian et al. (2001). The resulting index,
called wavelet-based anesthetic value for central nervous system (WAV CNS), has been
validated clinically with success later by Bibian et al. (2004a, b), Lundqvist et al. (2004),
and Zukav et al. (2006).The WAV CNS technology has been integrated into the Neuro
SENSE Monitors. Similarly to BIS, the WAV CNS uses the same 0–100 scale to represent
the depth of hypnosis of the patient. Special care was taken in the WAVCNS technology to
avoid nonlinearities and the use of no minimum phase elements. The
WAVCNS technology does not add additional computational delays that make it to be
virtually delay free. The dynamic behavior of the WAVCNS is linear and can be fully
captured by a second-order linear time invariant (LTI) transfer function. However, the
WAVCNS may provide inaccurate data in deeper hypnotic states (Zikov, 2002). The entire
Process shown in the below figure

Figure 7 DWT Method

23
2.6 Steganography Techniques
Techniques are categorized as:

 Spatial domain technique


 Transform domain
 Masking and Filtering

2.6.1 Spatial domain technique

Spatial domain technique inserts message in the pixel’s intensity honestly, simplest
method used in steganography is least significant bit (LSB) which covers the most secret
message in the LSBs without launching the appreciable alteration. This type of technique
works on gray diagram. This type works for less data hiding ability

2.6.2 Transform domain

Transform domain technique insert message in occurrence domain of last changed image.
It is process of inserting data in the field of signal. Transform imaging strategy gather the
information required for image renovation. In this, image information is recovered as
well as image reconstruction for display is basically separated. More benefits of using it
are image processing, cropping. Transform domain technique are categorized as:

1. Discrete Fourier transformation technique (DFT).

2. Discrete cosine transformation technique (DCT).

3. Discrete Wavelet transformation technique (DWT).

2.6.3 Masking and Filtering

Masking and filtering techniques works as paper marking technique. This covers the
information into important area than the noise levels. Watermarking is most used
technique in masking and filtering. This technique is having more robustness than LSB
technique. This can be applied only to Grey Scale images. Steganography is made to

24
obtain improved quality of programmed image and to get better hiding capacity. This job
is a kind of spatial domain technique. Every digital file layouts are used in
steganography, but the designs with high redundancy are extra appropriate. Redundancy
can be defined as object bit’s which gives accuracy far better than required for the use of
object and displays. Redundant object bits are those bits which can be changed with no
modification being noticed simply. Especially Audio and Image records are satisfied with
these conditions, even research also have naked files designs which can be used to keep
data secretly. Steganography system design is as shown in the figure8,

Figure 8 Steganography System Design

2.7 What is Embedding?

Reversible Steganography scheme has the ability to embed the secret data
into a host image and then recover the host image without losing any information when
the secret data is extracted. This should be overcome by using some techniques.
Reversible Steganography is also known as reversible data hiding.

25
2.8 What is Extracting?

First extract the side information, i.e., the block size and the threshold from
the stego image. As we done exactly the same things in data embedding. The stego image
is divided into blocks and the blocks are then rotated by random degrees based on the
secret key. The resulting image is rearranged as a row vector. Finally, we get the
embedding units by dividing into no overlapping blocks with two consecutive pixels.

26
3. IMAGE STEGANOGRAPHY THROUGH AES ALGORITHM

Advances Encryption Standard is Symmetric block cipher which is generated to


substitute the DES which use the 128 bit block and key size is of 128,192,256 which
function with the fixed number of bytes. In AES same steps are repeated multiple times.
AES is a process espoused by the U.S. government National Institute of Standard and
technology. AES is a reversible process which will perform encryption and decryption in
reverse order. This is symmetric key algorithm. The AES algorithm works on bytes with
simpler implementation. This key is stretched into single sub keys, a sub keys for all
function round. This process is called Key Expansion.

3.1 How Does AES Work

The AES algorithm uses a substitution-permutation, or SP network, with


multiple rounds to produce cipher text. The number of rounds depends on the key size
being used. A 128-bit key size dictates ten rounds, a 192-bit key size dictates 12 rounds,
and a 256-bit key size has 14 rounds. Each of these rounds requires a round key, but since
only one key is inputted into the algorithm, this key needs to be expanded to get keys for
each round, including round 0.

It is a Symmetric Key Block Cipher that broadly takes on Symmetric Key


encryption nowadays. It comes for the alternative of Des as the size of Des was too small.
For the Encryption and Decryption Purposes, it is applicable for the Block size of 128
Bits of size. The number of loops decides the Key Size. It uses 10 loops for 128-bit of
keys, 12 loops for 192-bit of keys and 14 loops for 256-bit of keys. In general, 4
functions used to encrypt the data and gives cipher text as output and it includes Sub
Bytes, Shifts rows, Adds keys and Mix Columns. The Components of AES are cost price
of memory is very less, high-speed algorithm procedure. The entire process is shown in
the figure 9.

27
Figure 9 AES Block Diagram

28
3.1.1 AES Encryption

 In this first we will enter the image which will be used as cover image known as
input image. Checks that message to be inserted as secret information is image,
audio or text. Check if first component is Zero then secret information is image.
Now find the RGB values of pixels of secret message .Place vertical fusion in
RGB in cover image.
 Enter the secret key which passes through Proposed AES.
 We will obtain the encrypted stego image.
 Check if first component is one then secret information is audio, convert 8 bits of
pixels into values and place it in RGB channel of carrier image.
 Enter secret key which passes through Proposed AES.
 By this we will get encrypted stego image.
 Check if first component is two then secret information is text; now convert the
text data into ASCII values.
 Place in the RGB channels of the cover image.
 With the help of secret key we will pass it into Proposed AES.
 Stego Image is obtained which will have cover image as well as text data.

The entire AES Encryption process is shown in figure 10.

29
Figure 10 AES Encryption Diagram

3.1.1.1 Plain Text

An Encryption Algorithm takes in a plaintext message, runs the algorithm


on the plaintext, and produces a cipher text. Plaintext can refer to anything which humans
can understand and/or relate to. This may be as simple as English sentences, a script, or
Java code. If you can make sense of what is written, then it is in plaintext.

Ex. This is a Plain text

30
3.1.1.2 Key Expansion

Key expansion involves taking the initial key and using it to come up with a
series of other keys for each round of the encryption process. These new 128-bit round
keys are derived with Rijndael’s key schedule, which is essentially a simple and fast way
to produce new key ciphers. If the initial key was “keys are boring1”:

k i

e a b n

y r o g

s e r 1

Then each of the new keys might look something like this once Rijndael’s key schedule
has been used:

14 29 1h s5

h9 9f St 9f

gt 2h hq 73

31
ks dj df hb

Although they look like random characters (and the above example is just made up) each
of these keys is derived from a structured process when AES encryption is actually
applied. We’ll come back to what these round keys are used for later on.

3.1.1.3 Add Round Key

In this step, because it is the first round, our initial key is added to the block
of our message:

b m O P

u e m O

y E T

S A

k I

32
e A b N

y R o G

s E r 1

This is done with an XOR cipher, which is an additive encryption algorithm. While it
looks like you can’t actually add these things together, be aware that it is actually done in
binary. The characters are just a stand-in to try and make things easier to understand.
Let’s say that this mathematical operation gives us a result of:

h3 Jd zu 7s

s8 7d 26 2n

dj 4b 9d 9c

74 el 2h Hg

3.1.1.4 Byte Substitution

In this step, each byte is substituted according to a predetermined table.


This is kind of like the example from the start of the article, where the sentence was

33
coded by changing each letter to the one that comes after it in the alphabet
(hello becomes ifmmp).

This system is a little bit more complicated and doesn’t necessarily have any logic to it.
Instead, there is an established table that can be looked up by the algorithm, which says,
for example, that h3 becomes jb, s8 becomes 9f, dj becomes 62 and so on. After this step,
let’s say that the predetermined table gives us:

jb n3 kf n2

9f jj 1h js

74 wh 0d 18

hs 17 d6 px

In the first step, the bytes of the block text are substituted based on rules dictated by
predefined S-boxes (short for substitution boxes). The entire byte substitution process is
shown in the figure 11.

34
Figure 11 Byte Substitution Diagram

3.1.1.5 Shift Row

Shift rows are a straightforward name, and this step is essentially what you
would expect. The second row is moved one space to the left, the third row is moved two
spaces to the left, and the fourth row is moved three spaces to the left. This gives us:

jb n3 kf n2

jj 1h js 9f

0d 18 74 Wh

px hs 17 d6

35
Next comes the permutation step. In this step, all rows except the first are shifted by one,
as shown below. Shift row diagram is as shown as,

Figure 12 Shift Row Diagram

3.1.1.6 Mix Column

This step is a little tricky to explain. To cut out most of the math’s and
simplify things, let’s just say that each column has a mathematical equation applied to it
in order to further diffuse it. Let’s say that the operation gives us this result:

Ls j4 2n Ma

83 28 ke 9f

36
9w Xm 3l m4

5b a9 cj Ps

In the third step, the Hill cipher is used to jumble up the message more by mixing the
block’s columns. Mix column diagram is as shown as,

Figure 13 Mix Column Diagram

3.1.1.7 Add Round Key (Again)

Remember those round keys we made at the start, using our initial key and
Rijndael’s key schedule? Well, this is where we start to use them. We take the result of
our mixed columns and add the first round key that we derived:

37
ls j4 2n Ma

83 28 ke 9f

9w xm 3l m4

5b a9 cj Ps

14 29 1h s5

h9 9f st 9f

gt 2h hq 73

ks dj df Hb

38
Let’s say that this operation gives us the following result:

9d 5b 28 Sf

Ls df hf 3b

9t 28 hp 8f

Figure 14 Add Round Key Diagram

39
3.1.2 AES Decryption

If you’ve managed to get your head around the encryption process explained above,
decryption is relatively simple. To go from the cipher text back to the plaintext of the
original message, everything is done in reverse. If we start with our encrypted result
of “ok23b8a0i3j 293uivnfqf98vs87a” and apply the inverse of each encryption step,
it starts with the inverse round key, then the inverse shift rows, and the inverse byte
substitution, before going into the inverse of the 9, 11 or 13 rounds. It looks like this:

“ok23b8a0i3j 293uivnfqf98vs87a”

The order of the 16 48-bit keys is reversed such that key 16 becomes key 1, and so on.
Then, the steps for encryption are applied to the cipher text

The reverse of encryption is called decryption. All the rounds of the encryption will be in
a reverse manner in AES decryption. It will result in a conversion of cipher image into a
plain image. Today AES is used because DES was inherently weak.56- bit key is used in
DES which means there are 256 combinations which are easy to crack in case of Brute
Force attack. The conversion of encrypted data into its original form called Decryption. It
is generally a reverse process of encryption. It decodes is the encrypted information so
that an authorized user can only decrypt the data because decryption requires a secret key
or password. This happens because of the encryption and decryption of data before it can
be used. The main advantages are: Making the use of inheritance, redundant code is
eliminated, and the existing class is extended

The entire process is shown in the figure15.

40
Figure 15 AES Decryption Diagram

3.1.2.1 Cipher Text

Cipher text, or encrypted text, is a series of randomized letters and numbers


which humans cannot make any sense of. The cipher text can be reversed through the
process of decryption, to produce the original plaintext.

3.1.2.2 Inverse Add Round Key

The round keys have to be selected in reverse order.

3.1.2.3 Inverse Byte Substitution

Inverse s-box matrix is used. According to the present value of byte, it is


substituted by inverse s-box bytes.

41
3.1.2.4 Inverse Shift Rows

It is same as Shift Rows, only in the opposite direction.

3.1.2.5 Inverse Mix Column

In the Inverse Mix Columns transformation, the polynomials of degree less


than 4 over GF(28), which coefficients are the elements in the columns of the state, are
multiplied modulo (x4 + 1) by a constant polynomial which is d(x) = {0B}x3 + {0D}x2
+ {09}x + {0E}.

3.2 Feature of AES

 Decrypts using the AES Rijndael Block Cipher Algorithm


 Processes 128-bit data blocks with 32-bit data interface
 Parameterizable key length (can be 128, 192 or 256)
 Includes the key expansion function and s-box memory
 Completely self-contained: does not require external memory
 Internal Buffer to hold encrypted data
 Symmetric key symmetric block cipher

 128-bit data, 128/192/256-bit keys

 Stronger and faster than Triple-DES

 Provide full specification and design details

 Software implementable in C and Java

42
4. SYSTEM CONFIGURATION

4.1 Software Requirements

A software requirement is a field within software engineering that deals with


establishing the needs of stakeholders that are to be solved by software. The IEEE
Standard Glossary of Software Engineering Terminology defines a requirement as:

 A condition or capability needed by a user to solve a problem or achieve an


objective.
 A condition or capability that must be met or possessed by a system or system
component to satisfy a contract, standard, specification, or other formally imposed
document.
 A documented representation of a condition or capability as in 1 or 2. Software
Requirements are,

Operating System - Windows 10 Pro

Front End - MATLAB 2013

4.2 Hardware Requirements

The most common set of requirements defined by any operating system or software
application is the physical computer resources, also known, as hardware. A hardware
requirements list is often accompanied operating system. Hardware requirements are,

CPU - Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 CPUs)

Memory - 32 MB RAM

Hard Drive - 400 GB available ier

Media - CD-ROM, zx or higher

43
5. SYSTEM DESIGN

5.1 Data Flow Diagram of Image Steganography through AES Algorithm

Image Steganography is the process of hiding information which can be text, image or
video inside a cover image. The secret information is hidden in a way that it not visible to
the human eyes. Deep learning technology, which has emerged as a powerful tool in
various applications including image steganography, has received increased attention
recently. The main goal of this paper is to explore and discuss various deep learning
methods available in image steganography field. Steganography is the process of hiding a
secret message within a larger one in such a way that someone cannot know the presence
or contents of the hidden message. The entire process is shown in the Figure 16.

Figure 16 Data Flow Diagram of Image Steganography through AES Algorithm

44
5.2 Data Flow Diagram of Encryption and Decryption Process through AES
Algorithm

An encryption algorithm is the method used to transform data into cipher text. An
algorithm will use the encryption key in order to alter the data in a predictable way, so
that even though the encrypted data will appear random, it can be turned back into
plaintext by using the decryption key. The entire process is shown in the Figure 17.

Figure 17 Data Flow Diagram of Encryption and Decryption Process through AES
Algorithm

45
6. RESULT AND DISCUSSION

6.1 Data Hiding ( Sender Side)

Steganography software is used to perform a variety of functions in order to hide data,


including encoding the data in order to prepare it to be hidden inside another file, keeping
track of which bits of the cover text file contain hidden data, encrypting the data to be
hidden and extracting hidden data by its intended recipient. There are proprietary as well
as open source and other free-to-use programs available for doing steganography.
OpenStego is an open source steganography program; other programs can be
characterized by the types of data that can be hidden as well as what types of files that
data can be hidden inside. Some online steganography software tools include Xiao
Steganography, used to hide secret files in BMP images or WAV files; Image
Steganography, a JavaScript tool that hides images inside other image files; and
Scripture, a command line tool that is used to perform steganography. The entire process
is shown in the figure 18.

Figure 18 Data Hiding (Sending Side) Screenshot

46
6.1.1 Enter Plain Text

In Text Steganography by Hiding Information in Specific Character of Words [15]


approach, specific characters from some particular words are selected to hide the
information. For example, the first character of every alternative word hides the secret
message. Enter Plain text image is shown in the figure 19.

Figure 19 Enter Plain Text Screenshot

6.1.2 Binary to Text Converter

A binary code represents text, computer processor instructions, or any other data using a
two-symbol system. The two-symbol system used is often "0" and "1" from the binary
number system. The binary code assigns a pattern of binary digits, also known as bits, to
each character, instruction. A code converter circuit will convert coded information in
one form to a different coding form. One example of code conversion is to convert BCD
to straight binary. To convert integer to binary, start with the integer in question and
divide it by 2 keeping notice of the quotient and the remainder. Continue dividing the
quotient by 2 until you get a quotient of zero. Then just write out the remainders in the
reverse order. Here is an example of such conversion using the integer 12. The entire
process is shown in the figure 20.

47
Figure 20 Binary to Text Converter Screenshot

6.1.3 Apply AES Encryption

At its simplest, AES is a Steganographic algorithm used to protect electronic data. It's a
symmetric block cipher that can encrypt and decrypt information. Encryption converts
data to an unintelligible form called cipher text. Decryption converts the data back into its
original form called plaintext. The entire process is shown in the figure 21.

Figure 21 Apply AES Encryption Screenshot

48
6.1.4 Browse the Image to Hide Encrypted Text

The steganography is one of the methods which are used to keep the information or the
data in safe against any disclose to the data Called Encryption. The main goal of
cryptography is keeping data secure form unauthorized attackers. The reverse of data
encryption is data Decryption. Browse the image Screenshot is as shown in the figure 22

Figure 22 browse the image Screenshot

Figure 23 Select an Image Form Folder

49
Figure 24 Selected Plain Image Screenshot

6.1.5 Plot Histogram of Plain Image

To create an image histogram, use the mist function. This function creates a histogram
plot by making equally spaced bins, each representing a range of data values. It then
calculates the number of pixels within each range. The following example displays an
image of grains of rice and a histogram based on 64 bins. Histogram is based on the
frequency of luminance in the image. The luminance is computed for each pixel with the
formula 0.2126*R+0.7152*G+0.0722*B (ITU BT. 709). An image histogram is a gray-
scale value distribution showing the frequency of occurrence of each gray-level value.
For an image size of 1024 × 1024 × 8 bits, the abscissa ranges from 0 to 255; the total
number of pixels is equal to 1024 × 1024. The entire process is shown in the Figure 25

50
Figure 25 Plot Histogram of Plain Image Screenshot

6.1.6 Embedded Image

Reversible Steganography scheme has the ability to embed the secret data into a host
image and then recover the host image without losing any information when the secret
data is extracted. This should be overcome by using some techniques. Reversible
Steganography is also known as reversible data hiding. Steganalysis methods cannot
detect it. Embedding capacity is the key measure to compare them. Performance of
different data embedding algorithms. In gen- earl sense, it is the maximum data size that
can be securely. Embedded image is shown in the figure 26.

Figure 26 Embedded Image Screenshot

51
6.1.7 Plot Histogram of Stego Image

Steganalysis is the art of detecting hidden messages embedded inside Stenographic


Images. Steganalysis involves detection of steganography, estimation of message length
and its extraction. Recently Steganalysis receives great deal of attention from the
researchers due to the evolution of new, advanced and much secured stenographic
methods for communicating secret information. This paper presents a universal
steganalysis method for blocking recent stenographic techniques in spatial domain. The
novel method analyses histograms of both the cover and suspicious image and based on
the histogram difference it gives decision on the suspicious image of being stego or
normal image. This method for steganalysis extracts a special pattern from the histogram
difference of the cover and. By finding that specific pattern from the histogram difference
of the suspicious and cover image it detects the presence of hidden message. The
proposed steganalysis method has been experimented on a set of stego images where
different stenographic techniques are used and it successfully detects all those stego
images. The entire process is shown in the figure 27

Figure 27 Plot Histogram of stego images screenshot

52
6.1.8 Hiding Capacity

The amount of data that can be hidden inside an image depends on the image.

From a capacity and mathematical deniability perspective, the following type of image is
optimum:-

In this instance you might get 9-18 Mbits of text$, but you're reduced to sending grainy
images all the time for this message capacity. The sensor noise will mask the whitened
message, especially if you use less than 1 bit per channel per pixel. And they have to be
lossless formats like BMP /JPEG2000 /TIFF or PNG. None of these are particularly
common in the social Facebook world, compromising the plausible deniability argument.
A lossy format will reduce the message size again.

Algebraically, you can form an equation like:-

capacity = (usable %age) X (encoded bits) x (no.pixels)

which represents the difficult relationship of:-

capacity = F(artistic composition, SNR, image size) . The Hiding capacity process is
shown in the Figure 28

Figure 28 Hiding Capacity Screenshot

53
The Entire Data Hiding process is shown in the Figure 29

Figure 29 The Entire Data Hiding Screenshot

54
6.2 Data Extraction (Receiver Side)

To decode a hidden message from an image, just choose an image and hit the Decode
button. Neither the image nor the message that has been hidden will be at any moment
transmitted over the web, all the magic happens within your browser. The Data
Extraction Result is shown in the figure 30.

Figure 30 Data Extraction Screenshot

6.2.1 Browse the Stego Image to Extract the Data

The steganography is one of the methods which are used to keep the information or the
data in safe against any disclose to the data called Encryption. The main goal of
cryptography is keeping data secure form unauthorized attackers. The reverse of data
encryption is data Decryption. Browse the stego image is shown in the figure 31.

Figure 31 browse the stego image Screenshot


55
Selected Stego image is shown in the Figure 32.

Figure 32 Selected Stego image Screenshot

6.2.2 Extract Data from Stego Image

To decode a hidden message from an image, just choose an image and hit the Decode
button. Neither the image nor the message that has been hidden will be at any moment
transmitted over the web, all the magic happens within your browser. The Extract from
stego image is shown in the Figure 33.

56
Figure 33 Extract Data from Stego Image Scrrenshot

6.2.3 Apply AES Decryption

Decryption is the reverse operation of encryption. For secret-key encryption, you must
know both the key and IV that were used to encrypt the data. For public-key encryption,
you must know either the public key (if the data was encrypted using the private key) or
the private key (if the data was encrypted using the public key).the entire process is
shown in the figure 34.

Figure 34 Decrypt Data Screenshot

57
6.2.4 Binary to Text Convertor

 Get binary byte code


 Convert binary byte to decimal
 Get character of decimal ASCII code
 Continue with next binary byte
Binary to Text Convertor is shown in the Figure 35.

Figure 35 Binary to Text Convertor Screenshot

The Entire Data Extraction Process is shown in the Figure 36

Figure 36 The Entire Data Extraction Result

58
7. SYSTEM TESTNG

7.1 Introduction

The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub-assemblies, assemblies and/or a finished product it is
the process of exercising software with the intent of ensuring that the Software system
meets its requirements and user expectations and does not fail in an unacceptable manner.
There are various types of test. Each test type addresses a specific testing requirement.

7.2 Unit Testing

Unit testing focuses verification effort on the smallest unit of Software design that is the
module. Unit testing exercises specific paths in a module’s control structure to ensure
complete coverage and maximum error detection. This test focuses on each module
individually, ensuring that it functions properly as a unit. Hence, the naming is Unit
Testing. During this testing, each module is tested individually and the module interfaces
are verified for the consistency with design specification. All important processing paths
are tested for the expected results. All error handling paths are also tested.

7.3 Integration Testing

Integration testing addresses the issues associated with the dual problems of verification
and program construction. After the software has been integrated a set of high order tests
are conducted. The main objective in this testing process is to take unit tested modules
and builds a program structure that has been dictated by design.

7.3.1 Top down Integration

This method is an incremental approach to the construction of program structure.


Modules are integrated by moving downward through the control hierarchy, beginning
with the main program module. The module subordinates to the main program module

59
are incorporated into the structure in either a depth first or breadth first manner. In this
method, the software is tested from main module and individual stubs are replaced when
the test proceeds downwards.

7.3.2 Bottom up Integration

This method begins the construction and testing with the modules at the lowest level in
the program structure. Since the modules are integrated from the bottom up, processing
required for modules subordinate to a given level is always available and the need for
stubs is eliminated. The bottom up integration strategy may be implemented with the
following steps:

 The low-level modules are combined into clusters into clusters that perform a
specific Software sub-function.
 A driver (i.e.) the control program for testing is written to coordinate test case
input and output.
 The cluster is tested.

7.4 Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional
requirements.

7.5 Black Box Testing

Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of
tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a testing in
which the software under test is treated, as a black box .you cannot “see” into it. The test
provides inputs and responds to outputs without considering how the software works.

60
7.6 White Box Testing

White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is
purpose. It is used to test areas that cannot be reached from a black box level.

7.7 Output Testing

After performing the validation testing, the next step is output testing of the proposed
system, since no system could be useful if it does not produce the required output in the
specified format. Asking the users about the format required by them tests the outputs
generated or displayed by the system under consideration. Hence the output format is
considered in 2 ways – one is on screen and another in printed format.

7.8 Validation Testing

Validation testing is performed on the following fields.

7.8.1 Text Field

The text field can contain only the number of characters lesser than or equal to its size.
The text fields are alphanumeric in some tables and alphabetic in other tables. Incorrect
entry always flashes and error message.

7.8.2 Numeric Field

The numeric field can contain only numbers from 0 to 9. An entry of any character
flashes an error messages. The individual modules are checked for accuracy and what it
has to perform. Each module is subjected to test run along with sample data. The
individually tested modules are integrated into a single system. Testing involves
executing the real data information is used in the program the existence of any program
defect is inferred from the output. The testing should be planned so that all the
requirements are individually tested. A successful test is one that gives out the defects for
the inappropriate data and produces and output revealing the errors in the system.

61
7.8.3 Preparation of Test Data

Taking various kinds of test data does the above testing. Preparation of test data plays a
vital role in the system testing. After preparing the test data the system under study is
tested using that test data. While testing the system by using test data errors are again
uncovered and corrected by using above testing steps and corrections are also noted for
future use.

7.8.4 Using Live Test Data

Live test data are those that are actually extracted from organization files. After a system
is partially constructed, programmers or analysts often ask users to key in a set of data
from their normal activities. Then, the systems person uses this data as a way to partially
test the system. In other instances, programmers or analysts extract a set of live data from
the files and have them entered themselves. It is difficult to obtain live data in sufficient
amounts to conduct extensive testing. And, although it is realistic data that will show how
the system will perform for the typical processing requirement, assuming that the live
data entered are in fact typical, such data generally will not test all combinations or
formats that can enter the system. This bias toward typical values then does not provide a
true systems test and in fact ignores the cases most likely to cause system failure.

7.8.5 Using Artificial Test Data

Artificial test data are created solely for test purposes, since they can be generated to test
all combinations of formats and values. In other words, the artificial data, which can
quickly be prepared by a data generating utility program in the information systems
department, make possible the testing of all login and control paths through the program.
The most effective test programs use artificial test data generated by persons other than
those who wrote the programs. Often, an independent team of testers formulates a testing
plan, using the systems specifications. The package “Virtual Private Network” has

62
satisfied all the requirements specified as per software requirement specification and was
accepted.

7.8.6 User Training

Whenever a new system is developed, user training is required to educate them about the
working of the system so that it can be put to efficient use by those for whom the system
has been primarily designed. For this purpose the normal working of the project was
demonstrated to the prospective users. Its working is easily understandable and since the
expected users are people who have good knowledge of computers, the use of this system
is very easy.

7.8.7 Maintenance

This covers a wide range of activities including correcting code and design errors. To
reduce the need for maintenance in the long run, I have more accurately defined the
user’s requirements during the process of system development. Depending on the
requirements, this system has been developed to satisfy the needs to the largest possible
extent. With development in technology, it may be possible to add many more features
based on the requirements in future. The coding and designing is simple and easy to
understand which will make maintenance easier.

8.8.8 Testing Strategy

A strategy for system testing integrates system test cases and design techniques into a
well plan series of steps that results in the successful construction of software. The testing
strategy must co-operate test planning, test case design, test execution, and the resultant
data collection and evaluation .A strategy for software testing must accommodate low-
level tests that are necessary to verify that a small source code segment has been
correctly implemented as well as high level tests that validate major system
functions against user requirements.

63
8. CONLUSION AND FUTURE ENHANCEMENT

8.1 Conclusion

As the intruder does not know about the Data that is hidden in the image it will increase
the Security of the system. So the intruder can only able to access the data if he or she
will have access permission. But he won’t be able to know the data since there will be no
proof of data that is hidden in the image. Only the certified person will be able to access
both the original data and the image. Thus this system can be used in different domains
where the image and its similar data have to be transmitted in a secure way. For example,
in the field of medical science where the patient report with its outcomes has to be sent to
the doctor securely, this system can be used. We use the Modified AES algorithm which
will be combined with the Modified Key expansion. This method helps us to create the
strong system for the security purpose of the different Medias in single media. By which
we are able to encrypt the digital image to securely transmit over the network.

8.2 Future Enhancement

In future, we will perform embedding in any cover media such as image can be hidden in
any media like audio or text or we can say simple text file may contains any type of
media like text, audio, image can be possible by using the AES encryption which leads to
more encrypted or complex form of information. Implementation of steganography is
simple compared to the method to detect and attack on it because these methods are more
complex than steganography technique itself. It is going to be reliable and secure. LSB
technique is simple, high payload, low complexity and easy to detect. AES and DES are
the complex technique but provide high security. The execution time of LSB is more;
AES and DES take less time. Encryption and Decryption process is takes longer for AES
Algorithm.

64
9. APPENDIX

9.1 Sample Source Code

Embed

function embed(input_image_path, input_text_path, output_image_path)


image = imread(input_image_path);
fid = fopen(input_text_path, 'rt');
text = fread(fid, inf, 'uint8');

bin_text = de2bi(text, 8);


[char_count, ~] = size(bin_text);
image_ycbcr = rgb2ycbcr(image);
cb = image_ycbcr(:, :, 2);
haar_wavelet = liftwave('haar', 'Int2Int');
[LL, HL, LH, HH] = lwt2(double(cb), haar_wavelet);

[~, HH_width] = size(HH);


[~, HL_width] = size(HL);

HH_flat = reshape(HH.', 1, []);


HL_flat = reshape(HL.', 1, []);

size_length = 4;
overwhelmed = (8 * char_count + 8 * size_length) > (length(HH_flat) +
length(HL_flat));
if (overwhelmed)
disp('Text length is too large to be embedded!');
else

65
HH_flat(1:size_length * 8) = de2bi(char_count, size_length * 8);
HH_can_fit = length(HH_flat) / 8;
HH_limit = min(char_count + size_length, HH_can_fit);
for i = size_length + 1:HH_limit
HH_flat((i-1)*8 + 1:(i-1)*8 + 8) = bin_text(i-size_length, :);
End
rest = char_count + size_length - HH_can_fit;
if (rest > 0)
for i = 1:rest
HL_flat((i-1)*8+1:(i-1)*8+8) = bin_text(i-size_length+HH_limit, :);
end
end
end
HH = vec2mat(HH_flat, HH_width);
HL = vec2mat(HL_flat, HL_width);
image_ycbcr(:, :, 2) = ilwt2(LL, HL, LH, HH, haar_wavelet);
out_image = ycbcr2rgb(image_ycbcr);
imwrite(out_image, output_image_path);
%imshow(out_image);
%title('stegano image');
end

66
Extract

function [text] = extract(emb_image)


image = imread(emb_image);
image_ycbcr = rgb2ycbcr(image);
cb = image_ycbcr(:, :, 2);
haar_wavelet = liftwave('haar', 'Int2Int');
[LL, HL, LH, HH] = lwt2(double(cb), haar_wavelet);
H_flat = reshape(HH.', 1, []);
HL_flat = reshape(HL.', 1, []);
size_length = 4;
char_count = bi2de(HH_flat(1:size_length * 8));
bin_text = zeros(char_count, 8);
HH_can_fit = length(HH_flat) / 8;
HH_limit = min(char_count + size_length, HH_can_fit);
for i = size_length + 1:HH_limit
bin_text(i-size_length, :) = abs(HH_flat((i-1)*8+1:(i-1)*8+8));
end
rest = char_count + size_length - HH_can_fit;
if (rest > 0)
for i = 1:rest
bin_text(i-size_length+HH_limit, :) = abs(HL_flat((i-1)*8+1:(i-1)*8+8));
end
end
text = char(bi2de(bin_text(:,:)))';
end

67
10. BIBLIOGRAPHY

[1] https:/www.tutorialspoint.com/cryptography/advanced_encryption_standard

[2] https://www.slideshare.net/atheistprince/aesadvanced-encryption-standard

[3] Anil Kumar , Rohini Sharma,” A Secure Image Steganography Based on RSA

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

in Computer Science and Software Engineering

[4] Jaspal Kaur Saini, Harsh K Verma, “A Hybrid Approach for Image Security by

Combining Encryption and Steganography”, Proceedings of the 2013 IEEE Second

International Conference on Image Information Processing

[5] https://www.ijrar.org/papers/IJRAR1AYP033.pdf

[6] https://www.ijitee.org/wp-content/uploads/papers/v9i8/H6442069820.pdf

[7] https://www.degruyter.com/document/doi/10.1515/nleng-2016-0010/pdf

[8] https://journals.telkomuniversity.ac.id/tektrika/article/download/248/163/

[9] Pradhan A, Sekhar, and Swain G, “Digital Image Steganography Using LSB

Substitution, PVD, and EMD”, Hindawi Mathematical Problems in Engineering

68

You might also like