Image and Audio Steanography

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 49

EVEREST ENGINEERING AND MANAGEMENT

COLLEGE
(AFFILIATED TO POKHARA UNIVERSITY)
BUDDHANAGAR, KATHMANDU

A MINOR PROJECT REPORT ON


“DIGITAL STEGANOGRAPHY”

SUBMITTED BY

Kamal Thapa [15070017]


kundan Puri [15070020]
Prashanna Puri [15070032]
Pratik Neupane [15070033]

SUBMITTED TO
DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING
EVEREST ENGINEERING AND MANAGEMENT COLLEGE
BUDDHANAGAR, KATHAMANDU

September, 2017
DIGITAL STEGANOGRAPHY

Submitted by

Kamal Thapa [15070017]


Kundan Puri [15070020]
Prashanna Puri [15070032]
Pratik Neupane [15070033]

A MINOR PROJECT SUBMITTED IN PARTIAL FULFILLMENT OF


THE REQUIREMENT FOR THE DEGREE OF BACHELOR IN
COMPUTER ENGINEERING

Submitted to
Department Of Electronics and Computer Engineering
Everest Engineering and Management College
Buddhanagar, Kathamandu

September,2017
COPYRIGHT

The author has agreed that the library, Everest Engineering and management
Collage, may make this report freely available for inspection. Moreover the author
has agreed that permission for extensive copying of this project report for
scholarly purpose may be granted by the lecturers, who supervised the project
works recorded herein or, in their absence, by the Head of Department wherein
the project report was done. It is understood that the recognition will be given to
the author of the report and to the Department of Computer and Electronics,
EEMC in any use of the material of this project report. Copying or publication or
other use of this report for financial gain without approval of the Department and
author’s written permission is prohibited. Request for permission to copy or to
make any other use of the material in this report in whole or in part should be
addressed to:

Head
Department of Computer and Electronics Engineering
Everest Engineering and Management College
Buddhanagar, Kathmandu
Nepal
CERTIFICATE

The undersigned certify that they have read and recommended to the Department
of Electronics and Computer Engineering for acceptance, a project report entitled
“Digital Steganography”, submitted by Kamal Thapa,Kundan Puri,Prashanna Puri
,Pratik Neupane in partial fulfillment of the requirement for the Bachelor’s degree
in Computer Engineering.

Supervisor:

...................................
Ranjan Adhikari
Lecturer

External Examiner:
...................................

Name of External
examiner
Designation
ACCEPTANCE

The project report entitled “Title of project”, submitted by Name of Student(s) in


partial fulfillment of the requirement for the Bachelor’s degree in Electronics and
Communication Engineering has been accepted as a bonafide record of work
independently carried out by the group in the department.

……………………………..
Yangya Murti Pokhrel
Principal
Everest Engineering and Management
College,
Kathmandu, Nepal.

……………………………..
Nabin Thapa
Head of the Department
Department of Electronics
and Computer Engineering,
Everest Engineering and
Management College,
Kathmandu, Nepal.
ACKNOWLEDGEMENT

We are very thankful to Everest Engineering and Management College for


giving us the opportunity to do the minor project. We also thank all the teachers
and staffs of Department of Computer and Electronics Engineering who helped us
on choosing the project by giving suitable suggestions. We are also thankful to our
friends for their thoughts and criticism. We were able to develop a lot in
accordance to their criticism. We’d also like to thank our friends for providing us
with necessary materials for mending bugs in our project.

We are exceedingly grateful to our teacher Er.Nabin Thapa and of Department


of Computer and Electronics Engineering for giving the remarkable suggestions
and encouragement for selecting the topic matter and reviewing our documents.

We are also obliged to our parents for their continuous support and
encouragement. The credit to our success goes to all those people who have
helped us directly and indirectly.

Project Members:

Kamal Thapa [15070017]


Kundan Puri [15070020]
Prashanna Puri [15070032]
Pratik Neupane [15070033]

i
ABSTRACT

Steganography is the art and science of writing hidden message in such a way
that no one apart from the sender and intended recipent even realizes there is a
hidden message.There are often cases when it is not possible to send messages
openly or in encrypted form. This is where steganography can come into play.
While cryptography provides privacy, steganography is intended to provide
secrecy. 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. For hiding secret information in images, there exists a
large variety of steganographic techniques some are more complex than others
and all of them have respective strong and weak points. Different applications
have different requirements of the steganography technique used. For example,
some applications may require absolute invisibility of the secret information,
while others require a larger secret message to be hidden. This project intends to
give an overview of image steganography, its uses and techniques. It also supports
steganography in Audio files. For a more secure approach, the project encrypts the
message using secret key and then sends it to the receiver. The receiver then
decrypts the message to get the original one

This project deals with hiding of text behind multimedia,i.e digital images,wave
audio,realmedia audio etc. Cryptographic ciper is used before hiding text to make
this procedure more secure.The GUI has been given a funky look.

Key Words:

Steganography, Cryptography, Cover medium, Plain text, Stego key, Stego


Medium

ii
Contents
ACKNOWLEDGEMENT .............................................................................................. i

ABSTRACT ...................................................................................................................ii

LIST OF FIGURES ....................................................................................................... v

LIST OF TABLES ........................................................................................................ vi

LIST OF ABBREVIATION ........................................................................................vii

CHAPTER 1: INTRODUCTION .................................................................................. 1

Background ........................................................................................................ 1

Problem Statement ............................................................................................. 4

Objectives .......................................................................................................... 4

Applications ....................................................................................................... 5

Project Features .................................................................................................. 5

Feasibility Analysis ............................................................................................ 6

System Requirement .......................................................................................... 7

Overview of report ............................................................................................. 8

CHAPTER 2: LITERATURE REVIEW ....................................................................... 9

2.1 Steganography Throughout History ............................................................. 9


LSB Encryption And Decryption..................................................................... 11

2.2.1 Encryption And Decryption Of Message In Image Using LSB


Approach 11
2.2.2 Encryption And Decryption Of Message In Audio Using LSB ............ 13
Case Study ....................................................................................................... 14

CHAPTER 3: METHODOLOGY ............................................................................... 15

Project plans and tools ..................................................................................... 15

Algorithm ......................................................................................................... 21

3.2.1 Algorithm to encode the message in image ........................................... 21


3.2.2 Algorithm to decode the message in image ........................................... 22

iii
3.2.3 Algorithm to encode the message in audio ............................................ 22
3.2.4 Algorithm to decode the message in audio ............................................ 23
MODULE DESCRIPTION ............................................................................. 29

CHAPTER 4: RESULT CONCLUSION AND RECOMENDATION ....................... 30

Result ............................................................................................................... 30

Problems Faced ................................................................................................ 34

Limitations ....................................................................................................... 34

Future Enhancements ....................................................................................... 36

Work Schedule ................................................. Error! Bookmark not defined.

Discussion ........................................................ Error! Bookmark not defined.

Conclusion ....................................................................................................... 35

REFERENCES ............................................................................................................ 36

iv
LIST OF FIGURES

FIGURE PAGE

Figure 1.1 Encrypted message ---------------------------------------------------- 2


Figure 2.1 RGB values of pixels in an image ----------------------------------- 12
Figure 2.2 Structure Of Text File-------------------------------------------------- 12
Figure 2.3 Encoding Message In Sample Audio Stream----------------------- 13
Figure 3.1 Incremental Model ----------------------------------------------------- 16
Figure 3.2.1 Use Case Diagram for user1---------------------------------------- 24
Figure 3.2.1 Use Case Diagram for user2---------------------------------------- 25
Figure 3.3 Class Diagram----------------------------------------------------------- 26
Figure 3.4 Activity Diagram------------------------------------------------------ 27
Figure 3.5 System Architecture--------------------------------------------------- 28
Figure 4.1.1 Image Encrypt------------------------------------------------------- 31
Figure 4.1.2 Image Decrypt------------------------------------------------------- 32
Figure 4.1.1 Audio Encrypt------------------------------------------------------- 32
Figure 4.1.1 Audio Decrypt------------------------------------------------------- 33

v
LIST OF TABLES

TABLE PAGE

Table 2.1 XORING Method-------------------------------------------------------- 12


Table 3.1 Project Tools------------------------------------------------------------- 14

vi
LIST OF ABBREVIATION

LSB: Least Significant Bit

PGP: Pretty Good Privacy

vii
CHAPTER 1: INTRODUCTION

Background

The word steganography is of Greek origin and means “covered, or hidden


writing”. Steganography is the art of science of communicating ini a way which
hides the existence of the communication. By contrast, cryptography obscures the
meaning of a message, but it does not conceal the fact that there is a message. In
comparison to the technique of cryptography where the messaged has not
disguised itself but the content is obscured. With the advent of steganography over
the technique of cartography alone the security of messages has highly increased.
The messages do not attract the attention of other recipients, to themselves and to
the messengers. The art and science of hidden messages are hidden in the
technique of steganography and it is done in such a manner that no one other than
the recipient who is intended to receive the message can discover the secret
message.

Traditional means are used for encryption of stenographic messages and then the
cover text is further changed in some or other manner. The encrypted message
results in stegotext. Letter size, typeface, spacing and other convert text
characteristics can changes are made to execute the hidden message. This means
that only the receiver of the message can recover and decryption it. Stenographic
coding present in a transport layer likeMP3 file and protocol like UDP are then
used in the electronic communication system.
For transmission of data safely and securely the stenographic system is used and it
also enables safe storage of data in the network. There are many files that are
important and include confidential data, they can be stored in encrypted form in
the server. These files can be used only by authorized users.

Transmission of these files can be made possible only in the form of encrypted
data and it does not disclose the message to the intruders. This means that the
hackers and intruders will not able to make out any meaningful information during
the transit. Moreover before trying to use the files the users need to enter the

1
system with the help of valid password and user id that is allotted by the
administrator to him.

1.1.1 Steganography and Cryptography

Cryptography – the science of writing in secret codes – address all of the elements
necessary for secure communicaation over an insecure channel, namely privacy,
confidentiality, key exchange, authentication and non-repudiation. But
cryptography does not always provide safe communication. Consider an
environment where the very use of encrypted messages causes suspicion.
Consider the following text file; what else is it likely to be if not encrypted?

Fig 1.1 : Encrypted Message

The message above is a sentence in english that is encrypted using Pretty Good
Privacy (PGP), probably the most commonly used e-mail encryption software
today.

The advantage of steganography over cryptography alone is that message do not


attract attention to themselves, to messengers, or to recipients.

2
Whereas the goal of cryptography is to make data unreadable by a third party, the
goal of steganography is to hide the data from a third party. Often, steganography
and cryptography are used together to ensure security of the covert message.

1.1.2 SCOPE OF STEGANOGRAPHY

Steganography is a very interesting and advantageous science these days and has
following uses:

Digital Watermaking

To protect a copyright on information.Photo collections, soldon CD, often have


hidden messages in the photos which allow detection of unauthorized use. The
same techniqueapplied to DVDs is even more effective, since the industry builda
DVD recorders to detect and disallow copying of protected DVDs.

A similar trick is to add fiction names to mailing lists as a check against


unauthorized resellers.Steganography doesn’t just apply to written forms of
communication. Radio and TV messages, from World War II to today, can be
used to hide coded or hidden messages. Some governmenr sources suspect that
Osama Bin Laden’s pre-recorded videos that are re-played on TV stations around
the world contain hidden messages.Steganography can also be used to allow
communication within an underground community.Steganography is used by
some modem printers, including HP and Xerox brand color laser printers. Tiny
yellow dots are added to each page. The dots are barely visible and contain
encoded printer serial numbers, as well as date and time stamps.

3
Problem Statement

The problem in the hiding information or Steganography is the size of data that
user want to embed inside the multimedia file, image is one of the multimedia file,
the most commend method for hiding information in the image is LSB, LSB is
efficient instead of that it’s not easy to analysis, however, it is not effective in
term of the data hidden quantity, all researchers agreed the fact that the size of
data hidden is a problem in that particular area, the other problem that faced there,
in fact if we try to increase the quantity of data in the image there will be a suspect
changes which become clear to human eyes, for instance, this research will face a
challenge that high rate data hidden without affecting the images quality.

As a summery, the main problems in the Steganography are as:

 The size of data hidden


 Quality of image
 Level of data protecting
 The level of suspecting

Objectives

 To secure the message that are being sent.


 To protect the quality of envelope medium(audio/image) while encrypting the
message.

4
Applications

As our project is mainly used for hiding and retrieving secret messages. The major
area of application is listed below:

 Digital Watermaking
 Adding fictional names to mailing lists
 Providing message secracy to users
 Hiding the text message in an image file or an audio WAV file.
 Encryption of the same message, so as to support more secure steganography.
 The decoding of the message, decryption and source message retrieval are also
supported

Project Features

We are able to integrate some good features in our application. Some of the plus
points of our program are:

 Friendly user interface


 Efficient and reliable
 Platform independent
 Highly flexible.

5
Feasibility Analysis

The purpose of a feasibility study is to analyze a business proposal to determine


if the project is possible or not. Determining if a business is feasible prior to
establishing, it prevents an investor from wasting money and time on a failed
business venture. There are mainly three types of feasibility study to which
proposed system is concerned too, as described below:
 Economic feasibility
 Technical feasibility
 Operational feasibility

1.6.1 Economic Feasibility


Considering Economic feasibility, this project is very much feasible. In this
project no any external hardware device is required as only PC is sufficient. Also
our project is free of cost so our project is economically feasible.

1.6.2 Technical Feasibility

Our project requires a PC and JAVA. As JAVA has its slogan “Write Once, Run
Anywhere”, our project will be easy to run. So, operating system services of
various operating systems allow for feasible implementation of this system. As
this Service can be implemented as a stand-alone application and it satisfies
technological hardware and software capabilities of presently available personal
computers, the proposed project is technically feasible.

1.6.3 Operational Feasibility

Operational feasibility should be accounted after the software is developed so that


it can cope up with the defined objectives:

 The proposed software will be easy to install and with short installation time.
 The system will have user friendly interface.

6
System Requirement

1.7.1 Software Requirement


 Front End: Java (jdk1.4.1 and above)
 OS : Windows / Linux / Solaris

1.7.2 Hardware Requirement.


 Processor: Pentium IV
 40 GB hard disk space.
 256 MB RAM or more.
 1.44 Floppy Disk Drive.
 104 keys keyboard.
 Display capable of showing 65,000 colors or more.
 CD-ROM Drive for installing the package.
 Mouse with minimum two buttons.

7
Overview of report

The Digital Steganography report contains the introduction about steganography,


where we have included the background,Problem Statement,Objectives of the
project,the fields of application,the features of our project,and the feasibility,the
system requirements.

The chapter 2 contains Literature Review where we have included steganography


throughout History and the process of LSB encryption and Decryption in which
there is a detailed information about encryption and decryption of message in
image using LSB approach as well as encryption and decryption of message in
audio using LSB method and also we have included the case study.

The third chapter of our project includes the Methodology where we have
described about the project plans and tools the algorithm of our project where we
have defined how to encode the message in image as well as how to decode the
message from image .we have also included the algorithm to encode message in
audio and also the algorithm to decode the message from audio. Even the module
description has been included in the topic.

The chapter 4 includes the result conclusions and recommendations where we


have included result analysis the problem we have the limitations that our project
deals with the conclusion of our project and the the requirements needed for
future.

8
CHAPTER 2: LITERATURE REVIEW

Steganography Throughout History

Antiquity Steganography is far from new, and its initial simplicity has grown in
sophistication since its inception. Just as cryptography dates back to antiquity and
specifically Julius Caesar, recorded uses of steganography go back to ancient
Greece. The historian Herodotus reported in about 474 B.C. how Histaeus of
Miletus concealed messages by tattooing them on the shaved scalp of slaves and
waiting until regrown hair hid them [Kahn, 1996]. Less invasive forms of
steganography soon appeared. The Greek soldier Demeratus inscribed a message
that King Xerxes planned to invade Greece on the wood under the wax on a
writing tablet. Mathematicians in China and Italy created similar techniques
independently [Katzenbeisser and Petitcolas, 2000].

Middle Ages to Victorian Age In the Middle Ages, two authors wrote seminal
works on steganography. Johannes Trithemius (1462–1526) wrote the three
volumes of Steganographia (ca. 1499) which superficially describes black magic
but contains treatises on cryptography and steganography hidden by simple
substitution methods. More than a century later, Gaspari Schotti

published Steganographyica [1665] which focuses on techniques with text,


invisible inks, and messages hidden in music. In the nineteenth century, the new
telegraph significantly increased information transmission speeds. Almost
immediately, businesses and individuals tried to conceal some message content
with various steganographic disguises [Standage, 1999]. Late in the same century,
Lord Baden-Powell worked as a scout for the British army and hid drawings of
positions of Boer artillery bases in drawings of butterflies.

Twentieth Century and Beyond As late as World War II, spies and resistance
fighters wrote messages with invisible ink (juices, urine, or milk) and revealed the
message by heating the document. The invention of microfilm allowed hiding
microscopic images under fingernails in the Russian war of 1905 and the use of

9
microdots in World War I [White, 1989]. The advent of computers, and especially
the development of the Internet, has moved steganography into the digital realm.
International workshops on information hiding and steganography have been held
regularly since 1996 [Moulin and O’Sullivan, 2003]. In the first International
Workshop on Information Hiding, participants defined the following terminology
in steganography. The embedded data is the information to be hidden in the cover:
the original, innocent file such as an image, audio, text, or video. The process
itself is labeled embedding, and the cover and embedded data together form the
stego data [Pfitzmann, 1996]. These definitions are still valid, with the caveat that
the variety of carriers has increased. As we will discuss later, entire file systems
can be used as steganographic systems. Since the first workshops on information
hiding in the 1990s, the majority of development and use of computerized
steganography has occurred since 2000 [Cole, 2003]. Steganography can hide in
Internet telephony systems such as Skype [Mazurczyk and Szczypiorski, 2008].
Purdue University research found evidence of criminals using steganography
tools, mainly in child pornography and financial fraud [Higgins, 2007]. In 2010,
Russian spies used steganography software developed by the Russian intelligence
service SVR to communicate with each other and their agencies [Higgins, 2010]

One of the latest techniques that have been used in this area by researchers at the
Mount Sinai School MOUNT SINAI Medical in New York New York in 1999, as
they managed to hide the secret texts in Chromosome Strand human DNA by
using a technique called genetic system coverage (Genomic Steganography[1]),
and by placing signs resolution to be agreed upon in the nuclei chromosomes and
then integrate these with millions sentences and sent to the other end. To extract
the secret message is 4 soaking get special distinction sentences used on the other
and then placed under the microscope to extract the required text.(Clelland, Risca
& Bancroft, 1999). The oldest Authentications on Steganography taken from the
legendary stories Greeks Herodotus and then back to the fifth century BC, these
sources indicate that they felt they fly head of the Messenger and then write the
secret letter in the head (Flores, 2001), leaving hair to grow then be sent to the
required which is a re-extraction letter. (Johnson & Jajodia, 2001; Zaidan., 2008).
Authentications and other writing secret messages on the wood panels and then

10
covered wax and will be hid those writing panels appear free of anything. And
they were killing their animals as rabbit example corner confidential letter inside
it. Other means that the common use since the first century AD, invisible inks
Invisible Inks, which was able to write a confidential letter with any other
nonvalue-confidential and usually write between lines, for example those rabbis
some fruit juices Fruit Juices, milk, urine, vinegar, and all these species become
dark and visible when exposed to heat the written document.

LSB Encryption And Decryption

Least Significant Bit (LSB) is the bit position in a binary integer giving the units
value, that is, determining whether the number is even or odd. The LSB is
sometimes referred to as the right-most bit, due to the convention in positional
notation of writing less significant digits farther to the right.

• LSB (Least Significant Bit) substitution is the process of adjusting the least
significant bit pixels of the carrier image.
• It is a simple approach for embedding message into the image / audio.
• The Least Significant Bit insertion varies according to number of bits in an
image / audio.

2.2.1 Encryption And Decryption Of Message In Image Using LSB


Approach

As image is consist of pixels and each pixel have various color value. But in our
project we use only red, green and blue color binary values from various pixels.

11
By using the LSB approach we can change the least significant bit of those values.

fig 2.1 : RGB values of pixels in an image

The message is stored in text file. Any text file consists of streams of character ,
each character is 1 byte (ASCII code) each byte as all of us of course know
consists of 8 bits.

fig : 2.2 Structure of text file

12
The least significant bit of the image pixels as shown is changed according to the
binary equivalent of the message. And thus obtained new pixels is again generated
as a new image.

Image decryption is performed in reverse to the above mentioned steps.

2.2.2 Encryption And Decryption Of Message In Audio Using LSB

An audio is first sample as 16 bit audio stream. The message is stored in 16 bit
binary value as mentioned above. The rest of the audio will remain same. Thus
stored message is encoded to least significant bit of the audio as shown below:

Fig 2.3 : Encoding message in sample audio stream

The decoding of thus encoded message is done by reversing the description


mentioned above.

The changing of the least significant bit of the audio/image is done using
XORING method. Following table shows the XORING method.

13
Table 2.1 : XORING Method

Case Study

As our project is a research based project. Many research are being held in
different universities about the steganography. Among them a research is still
undergoing on University of Pretoria, Pretoria, South Africa. T. Morkel, J.H.P.
Eloff, M.S. Olivier has been handling this research under Information and
Computer Security Architecture (ICSA) Research Group.With the help of this
research document we are handling our project.

This type of steganography project was done by Jitendra Singh Deshwal in


Central University Of Rajasthan on 2009 A.D. On that project he encrypted the
messages directly on the pixel of image / audio which gives less security to the
message being transferred and there was high chance of changing the color of the
image pixels which may be suspicious to the third person. But in this project we
changed the least significant bit of RGB components[3] of a pixel, which gives us
high security to the message being transferred and as there will be very low
change of color in a pixel , which is not noticeable by human eye. Thus giving
third party the less chance to be suspicious.

14
CHAPTER 3: METHODOLOGY

Project plans and tools

This project has mainly one part that is front end. Front end handles task related
to user interface. This project requires wide knowledge of JAVA .

We intend to develop this project so that it can be platform independent. Hence,


the programming language we chose is Java, originally developed by James
Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation)
and released in 1995 as a core component of Sun Microsystems' Java platform.

The tools that will be used for the project are listed in the table below:

S.N. Tools/Language/Software Purpose

1. Net beans Interface for Programming

2. jdk1.7.0_45 Development kit

3. Microsoft Windows 7/8 OS for Development and Testing

4. MS Word / MS Excel / MS PowerPoint Documentation

Table 3.1:- Project Tools

15
Fig3.1 : Incremental Model

Among various models available, our project is being developed according to


incremental model. The incremental build model is a method of software
development where the product is designed, implemented and tested incrementally
(a little more is added each time) until the product is finished. It involves both
development and maintenance. The product is defined as finished when it satisfies
all of its requirements. This model combines the elements of the waterfall
model with the iterative philosophy of prototyping.

16
SOFTWARE DESCRIPTION

3.2.1 Java Features Of Java

The inventors of Java wanted to design a language which could


offer solutions to some of the problems encountered in modern programming.
They wanted the language to be not only reliable, portable and distributed but also
simple, compact and interactive. Sun Microsystems officially describes java with
the following attributes.

3.2.2 Compiled and Interpreted

Usually a computer language is either compiled or interpreted. Java


combines both these approaches thus making java a two-stage system. First, java
compiler translates source code into what is known as byte code instructions.
Byte codes are not machine instructions and therefore, in the second stage, java
interpreter generates machine code that can be directly executed by the machine
that is running the java program. We can thus say that java is both a compiled and
interpreted languages.

3.2.3 Platform-Independent and Portable

The most significant contribution of java over other languages is its


portability. Java programs can be easily moved from one computer system to
another, anywhere and anytime. Changes and upgrades in operating systems,
processors and system resources will not force any changes in Java programs.
This is the reason why Java has become a popular language for programming on
Internet which interconnects different kinds of systems worldwide. We can
download a Java applet from a remote computer onto out local system via Internet
and execute it locally. This makes the Internet an extension of the user’s basic
system providing practically unlimited number of accessible applets and
applications.

17
Java ensures portability in two ways. First, Java compiler generates byte
code instructions that can be implemented on any machine. Secondly, the sizes of
the primitive’s data types are machine-independent.

3.2.4 Object-Oriented

Java is a true object-oriented language. Almost everything in Java is an


object. All program code and data reside within objects and classes. Java comes
with an extensive set of classes, arranged in packages that we can use in our
programs by inheritance. The object model in Java is simple and easy to extend.

3.2.5 Robust and Secure

Java is a robust language. It provides many safeguards to ensure reliable


code. It has strict compile time and run time checking for data types. It is
designed as a garbage-collected language relieving the programmers virtually all
memory management problems. Java also incorporates the concept of exception
handling which captures series errors and eliminates any risk of crashing the
system.

Security becomes an important issue for a language that is used for programming
on Internet. Threat of viruses and abuse of resources is everywhere. Java systems
not only verify all memory access but also ensure that no viruses are
communicated with an applet. The absence of pointer in Java ensures that
programs cannot gain access to memory locations without proper authorization.

3.2.6 Distributed

Java is designed as a distributed language for creating applications on


networks. It has the ability to share both data and programs. Java applications
can open and access remote objects on Internet as easily as they can do in a local
system. This enables multiple programmers at multiple remote locations to
collaborate and work together on a single project.

18
3.2.7 Simple, Small and Familiar

Java is a small and simple language. Many features of C and C++ that are
either redundant or sources of unreliable code are not part of Java. For example,
java does not use pointers, preprocessor header files, go to statement and many
others. It also eliminates operators overloading and multiple inheritance.
Familiarity is another striking feature of Java. To make the language look
familiar to the existing programmers, it was modeled on C and C++ languages.
Java uses many constructs of C and C++ and therefore, Java code “looks like a
C++” code.

3.2.8 Multithreaded and Interactive

Multithreaded means handling multiple tasks simultaneously. Java


supports multithreaded programs. This means that we need not wait for the
application to finish one task before beginning another. For example, we can
listen to an audio clip while scrolling a page and at the same time download an
applet from a distant computer. This feature greatly improves the interactive
performance of graphical applications.

The Java runtimes comes with tools that support multiprocess


synchronization and construct smoothly running interactive systems.

3.2.9 High Performance

Java performance is impressive for an interpreted language, mainly due to


the use of intermediate byte code. According to Sun, Java speed is comparable to
the native C/C++. Java architecture is also designed to reduce overheads during
runtime. Further, the incorporation of multithreading enhances the overall
execution speed of java programs.

19
3.2.10 Dynamic and Extensible

Java is a dynamic language. Java is capable of dynamically linking in new


class libraries, methods and objects. Java can also determine the type of class
through a query, making it possible to either dynamically link or abort the
program, depending on the response.

Java programs support functions written in other languages such as C and C++.
These functions are known as native methods. This facility enables the
programmers to use the efficient functions available in these languages. Native
methods are linked dynamically at runtime.

20
Algorithm

3.3.1 Algorithm to encode the message in image

 The steganography technique used is LSB coding.


 The offset of the image is retrieved from its header.
 That offset is left as it is to preserve the integrity of the header, and from the
next byte, we start our encoding process.
 For encoding, we first take the input carrier file i.e. an image file and then
direct the user to the selection of the text file.
 User Space is created for preserving the original file, so that all the
modifications are done in the user space.
 In the object of Buffered Image, using ImageIO.read method we take the
original image. O
 Using creates Graphics and drawRenderedImage method of Graphics class, we
create our user space in Buffered Image object.
 The text file is taken as input and separated in stream of bytes. - Now, each bit
of these bytes is encoded in the LSB of each next pixel.
 And, finally we get the final image that contains the encoded message and it is
saved, at the specified path given by user, in PNG format using ImageIO.write
method.
 This completes the encoding process

21
3.3.2 Algorithm to decode the message in image

 The offset of the image is retrieved from its header.


 Create the user space using the same process as in the Encoding.
 Using getRaster() and getDataBuffer() methods of Writable Raster and
DataBufferByte classes. The data of image is taken into byte array.
 Using above byte array, the bit stream of original text file, is retrieved into
the another byte array.
 And above byte array is written into the decoded text file, which leads to the
original message.

3.3.3 Algorithm to encode the message in audio

 The steganography technique used is LSB coding.


 The audio file consists of data in bytes.
 To encode the message, we first find the length of the string.
 The offset in the original file, from which the encoding process must start is
by default set to 500. This is done because, the WAV file has a header in the
initial offsets and if that header is tampered with, the destination file will not
be able to access its header in the appropriate format.
 Encode that length which can be upto 256 characters into the 1st 8 bytes of the
audio file. This will assist us in the decoding process.
 Take each character from the message string, convert it into byte and change
the LSB of the next 8 bytes of the audio file as per each of the bit of the
character type.
 Repeat the same procedure till the message string gets exhausted. - Thus on
writing byte after byte to the new file, we get a new audio file “output.wav”
having message hidden into it which can be sent to the receiver without any
fear of eavesdropper. File.

22
3.3.4 Algorithm to decode the message in audio

 The audio file “output.wav” which has the message hidden into it.
 Select From the offset that was specified at the sending side(i.e. 500) , take the
LSB of the next 8 bytes to get the length of the message (that was encoded in
the first 8 bytes from the given offset) which will help us to get the encoding
message only from the next 8 * length bytes of audio file.
 Create a byte from the LSB of the next consecutive 8 bytes and go on printing
each of the character of the message string in the textbox.
 Continue this process till the length of the string is reached. - Hence finally we
get the hidden message from the received audio file into the provided textbox.
-
 Thus we have achieved the process of decoding a message from the audio file.

23
Use Case diagram for our design is :

Loading Picture

User 1
Entering Secret Information

Creating Stegano Medium

Fig 3.2.1 : Use Case Diagram for user 1

24
Loading Stegano

Medium

Receiver
Getting Secret Information

Fig 3.2.2 : Use Case Diagram for user 2

25
Class diagram for our design is :

fig 3.3 : Class Diagram

26
Activity diagram of our system is:

Start

Start Stegano
Application

Select Operation

Hide Break

Load Image Load Image

Extract Secret
Generate Stegano Information
Medium

End

End

Fig 3.4 activity diagram

27
Architecture of our system is:

Sender (Hiding Receiver (Extracting


Data) Secret Information)

( Secret Information Stegano Medium


+ Multimedia data)

Stegano Medium Secret Information


Stegano Medium

Stegano Medium Fig 3.5 : Architecture of the System

Secret Information

Stegano Medium

Secret Information

28
MODULE DESCRIPTION

In this project there are two modules, namely

1. “Making stegano Medium”


2. “Getting secret information from stegano medium”
Each of the modules is described in detail as follows.
In making stegano Medium side, the secret information is hided with in an image
file. Before hiding, for security, user has to enter a user code and secret
information. A secret code will be generated using user code + secret information
and this secret code will be used by the receiver to extract the secret information.
After generating secret code stegano medium will be generated. This stegano
medium is the final output and expected output from the sender side.
In getting secret information from stegano medium Side, Actually anyone may get
this stegano medium that is picture with secret information, but only the person
who knows secret code can read the message. Inputs for breaking the stegano
medium are stegano medium and secret code.

29
CHAPTER 4: RESULT CONCLUSION AND
RECOMENDATION

Result and Analysis

From the development of our application we have successfully converted the


required text to image and audio files using stegoanalysis and least significant bit
algorithm.

The result of our digital steganography is not still fully favorable in diminished
environment with some slight degradation in audio quality. Our stenographic
output was 90% accurate in low bit text. The changes have been affective more
than before. The conversion from text to image and audio has been very much
effective in processing the image and audio.

The Analysis of this application has given us very much knowledge to process any
text to image and audio files which can be used as a secret medium for
programming purpose. The final results analyzed have given us the probable
accuracy determination for the application to be developed. For further
development of the algorithm for detection of text different image and audio
processing concept can be implied in the future.

The application development environment we used which is the net beans IDE has
helped us very much as it is real time complier of the source code and unlike other
IDE for app development; it contains debugging which is very much helpful for
directly compiling the project to our device at the same time.

30
Output Screenshots

fig 4.1.1 Image Encrypt

31
fig 4.1.2 : Image Decrypt

fig 4.1.3 : Audio Encrypt

32
fig 4.1.4: Audio Decrypt

33
Problems Faced

Following are the problem faced during the making of our project.

1. While encrypting the audio, the audio gets stretched sometimes.


2. Sometimes there white noise enters in the audio.

Limitations

The limitations of our project are as follows:

1. Message in image and audio will remain hidden until and unless same
decoding algorithm is used to decode.
2. Quality of the audio may be degraded.
3. When size of message is more than the size of the image some of the data in
the message may get loss.

34
Conclusion

The project was completed successfully to build a tool called – Hiding in Plain
Sight. This tool can be used for hiding the text message in the image or the audio
files. Also, the message that is sent can be encrypted, so as to support secure
steganography. Regardless, the technology called steganography is easy to use and
difficult to detect. The more that you know about its features and functionality, the
more ahead you will be in the game. The development of the system includes the
user 1 and the user 2. System requirements were properly studied and the
processes were implemented using software engineering approach.

In the course of developing this system, we as a team learnt a lot. First and
foremost we learnt the importance of team work. Respecting each other’s work
and appreciating it encouraged us to move ahead and push our limits. The
platform we had chosen for this project was new to us so, it was a challenge but it
helped broaden our horizon of knowledge.

As per the course syllabus of Computer Engineering, our project “DIGITAL


STEGANOGRAPHY” was successfully completed including its unique features
and functionalities with the joint effort from each individual member of the group.
We learnt and implemented the knowledge of Java for this desktop application.

35
Future Enhancements

The future enhancements of our project are as follows:

1. Log in, sign up feature can be added.


2. Type of encoding and decoding algorithm can be choose by user.
3. Upgrade can be done by making our software which support other file type
like video.
4. This module can be further extended to have support for the Video files.
5. Currently, for encoding, we use this software and for transmission we use
some other medium. So the current software can itself be used to transmit the
files also.
6. Currently, the length of the message file has some limitations for the Audio
Steganography, so for the same, we can have support for a wider size of files.
7. Can be implemented as a plugin to a web browser.

36
REFERENCES

[1] Moerland, T., “Steganography and Steganalysis”, Leiden Institute of


Advanced Computing Science
[online]
http://www.liacs.nl/home/ tmoerl/privtech.pdf

[2] Processing of image to text tess-2 engine


[online]
https://rmtheis.wordpress.com/2011/08/06/using-tesseract-tools-for-
android-to-create-a-basic-ocr-app/ [20th August]
[3] Java class and override method concept of Git Repository:
[online]
https://github.com/aviisekh/RCardScanner [20th July]

37

You might also like