You are on page 1of 24

PROJECT REPORT

ON
SECURE DATA TRANSMISSION TOOL
Submitted in partial fulfillment of the requirements
for summer training project.
Submitted by:
PARVEEN KRISHNANTREY
Roll No. 06913102712,
AMIT KHANDOOJA
Roll No. 07713102712
SAJAL SAXENA
Roll No. 05913102712

Submitted to:
Mr. Ravi Arora
Assistant Professor, CSE Department
H. M. R. I. T. M., Delhi

H. M. R. Institute of Technology and Management


AFFILIATED TO
GURU GOBIND SINGH INDRAPRASTHA
UNIVERSITY
Sector - 16C Dwarka, Delhi - 110075, India

ACKNOWLEDGEMENT
With due respect, We express our deep sense of gratitude to our
respected and learned guide and mentor Mr. Dayanand for
their co-operation and guidance. We acknowledge their
invaluable help and suggestions in implementing the project. We
are thankful to them for sparing their valuable time and
encouraging us at every stage.
We are also grateful to faculty of the Computer Science
Department, HMRITM for their ready support.

DECLARATION
We hereby declare that the work, which is being presented in the
project report entitled, SECURE DATA TRANSMISSION
TOOL submitted for partial fulfillment of the requirements for
the award of the degree of Bachelor of Technology (Computer
Science) is an authentic record of my own work carried out
under the guidance of Mr. Dayanand and the matter embodied
in the report has not been submitted for the award of any other
degree or diploma.

(PARVEEN KRISHNANTREY) (AMIT KHANDOOJA) (SAJAL SAXENA)

CERTIFICATE
This is to certify that this minor project entitled as SECURE
DATA TRANSMISSION TOOL has been completed by
PARVEEN

KRISHNANTREY

KHANDOOJA

(07713102712)

(06913102712),
and

SAJAL

AMIT
SAXENA

(05913102712), during seventh semester of Bachelor of


Technology in Computer Science from H. M. R. I. T. M., Delhi.
The matter embodied in this project has not been submitted
earlier for the award of any degree or diploma to the best of my
knowledge and belief.

Mr. RAVI ARORA

ABSTRACT
Secured Data Transmission through Network handles hiding a secret message
with in an image in such a way that others cannot discern the presence or contents
of the hidden message. A message might be hidden with in an image by changing
Least Significant Bit to be the message bits. Then the image can be transmitted
through Network. LSB based Stenography is perhaps the most simple and straight
forward approach. In this project we embed the message in to the least significant
bit planes of the image. Since this will only affect each pixel by +/- 1, if at all, it is
generally assumed with good reason that degradation caused by this embedding
process would perceptually transparent.

TABLE OF CONTENTS
Title
Acknowledgement .
Declaration ....
Certificate...
Abstract ..
1. Introduction................................................................................
1.1. Objective
1.2. Details
2. Prerequisites..
2.1. Hardware and Software Requirements
2.2. Technologies to be used
3. Techniques used..
4. Modules
5. System Design.......................................................................
DATA FLOW DIAGRAM
6. Source Code................................................................................
7. Snapshots
8. Conclusion..
9. Bibliography......

1. INTRODUCTION
1.1 OBJECTIVE
The project has the following objectives:
1. To create a tool that can be used to hide data inside a 24 bit color image.
2. The tool should be easy to use, and should use a graphical user interface.
3. The tool should work cross-platform.
4. The tool should effectively hide a message using an image degradation
approach, and should be able to retrieve this message afterwards.
5. The tool should take into account the original content, to theoretically more
effectively hide the message.
6. The tool should be able to provide some information as to the effectiveness of
the hiding i.e. it should be able to evaluate the degradation of an image. The
analysis used will consist of existing watermarking measures, re- implemented
for this tool.
7. The tool should be able to encrypt the message before embedding it.

1.2 DETAILS
Steganography is the art and science of writing hidden messages in such a way that
no one apart from the intended recipient knows of the existence of the message; this is
in contrast to cryptography, where the existence of the message itself is not disguised,
but the content is obscured. The advantage of steganography over cryptography alone
is that messages do not attract attention to themselves, to messengers, or to recipients.
Steganographic messages are often first encrypted by some traditional means,
and then a covertext is modified in some way to contain the encrypted message,
resulting in stegotext. For example, the letter size, spacing, typeface, or other
characteristics of a covertext can be manipulated to carry the hidden message; only
the recipient (who must know the technique used) can recover the message and then

decrypt it. Steganography uses in electronic communication include steganographic


coding inside of a transport layer, such as an MP3 file, or a protocol, such as UDP.
The project Steganography provides means for secure data transmission and
secure data storage network. Hereby, important files carrying confidential information
can be stored in the server in an encrypted form. Access to these files is limited to
certain authorized people only. Transmission also takes place in an encrypted form so
that no intruder can get any useful information from the original file during transit.
Further, before trying to access important files, the user has to login to the system
using a valid username and password, which is allotted to him by the system
administrator.
Encryption is the process of encoding a message in such a way as to hide its
contents. Modern Cryptography includes several secure algorithms for encrypting and
decrypting messages. They are all based on the use of secrets called keys. A
cryptographic key is a parameter used in an encryption algorithm in such a way that
the encryption cannot be reversed without the knowledge of the key.
The larger the cover message is (in data content terms number of bits)
relative to the hidden message, the easier it is to hide the latter. For this reason, digital
pictures (which contain large amounts of data) are used to hide messages on the
Internet and on other communication media. It is not clear how commonly this is
actually done. For example: a 24-bit bitmap will have 8 bits representing each of the
three color values (red, green, and blue) at each pixel. If we consider just the blue
there will be 28 different values of blue. The difference between say 11111111 and
11111110 in the value for blue intensity is likely to be undetectable by the human eye.
Therefore, the least significant bit can be used (more or less undetectably) for
something else other than color information. If we do it with the green and the red as
well we can get one letter of ASCII text for every three pixels.
Stated somewhat more formally, the objective for making steganographic
encoding difficult to detect is to ensure that the changes to the carrier (the original
signal) due to the inject the payload (the signal to covertly embed) are visually (and
ideally, statistically) negligible; that is to say, the changes are indistinguishable from
the noise floor of the carrier.

STEGANOGRAPHY TERMS
Carrier File

- A file which has hidden information inside of it. Steganalysis

- The process of detecting hidden information inside of a file. Stego-Medium


The medium in which the information is hidden.
Redundant Bits Pieces of information inside a file which can be overwritten
or altered
with
Payload

out

damaging

the

file.

- The information which is the be

concealed.
PROCESS DESCRIPTION
The following formula provides a very generic description of the pieces of
the steganographic process:
covermedium + hiddendata + stegokey = stegomedium
In this context, the covermedium is the file in which we will hide the
hiddendata, which may also be encrypted using the stegokey. The resultant file is the
stegomedium (which will, of course. Be the same type of file as the covermedium).
The covermedium (and, thus, the stegomedium) are typically image or audio files.
STEGANOGRAPHY
MERITS
SUCCESS SO FAR
Up until now, this has proven to be a successful steganographic technique for
use in distributing spam and getting around my spam filtering software. At this point
in time, spam filtering software is incapable of detecting the hidden content and
categorizing the message as spam on the basis of that content. This success will
probably be short lived, however
STEGANOGRAPHY VERSUS CRYPTOGRAPHY

As mentioned above, cryptography is often used in situations where the


existence of the message is clear, but the meaning of the message is obscured. In
particular, the sender transforms the message into a form that (hopefully) only the
intended recipient of the message can decrypt and read.Steganography is often used in
situations where the actual existence of the message needs to be obscured.
STEGANOGRAPHY AND CRYPTOGRAPHY CAN BE COMBINED
The message can also be encrypted before it is hidden inside a cover message.
This provides a double layer of protection. To begin with, encryption may make the
existence of the message even more difficult to detect, due to the fact that some
encryption techniques cause the patterns of the characters in the encrypted version to
be more random than in the original version. In addition, even if the existence of the
encrypted message is detected, it is unlikely that an eavesdropper will be able to read
the message.
HIDING THE MESSAGE
1. This program hides the message in the image by doing the following:
2. Reducing the message to the 64-character set beginning with the space
character in the ASCII table. Each character can then be represented by six
bits.
3. Decomposing each six-bit character into three groups of two bits each.
4.

Replacing the two least-significant bits (LSB) in the red, green, and

blue values for a given pixel by the three groups of two bits. Thus, each pixel
can carry one six-bit character

2. PREREQUISITES
2.1 Hardware and software Requirements
Hardware Requirements

Processor

Pentium4

Ram

512 MB

Hard disk drive

Cache memory

256 KB

Monitor

VGA with 1024x768

Keyboard

104 keys

Mouse

40 GB

Scroll mouse

Software Requirements

Operating system

Front-end

: Windows
: JDK ( VS2012 )

Tools

Software platform

Programming

language

Eclipse

Microsoft
:

J2SE

Windows

2.2 Technologies to be used


Brief Introduction about Java:

Java is a programming language and a platform.


Java is a high level, robust, secured and object-oriented programming language.
According to Sun, 3 billion devices run java. There are many devices where java is
currently used. Some of them are as follows:
1.
2.
3.
4.
5.
6.
7.
8.

Desktop Applications such as acrobat reader, media player, antivirus etc.


Web Applications such as irctc.co.in, javatpoint.com etc.
Enterprise Applications such as banking applications.
Mobile
Embedded System
Smart Card
Robotics
Games etc.

There are mainly 4 type of applications that can be created using java programming:
1) Standalone Application
It is also known as desktop application or window-based application. An application
that we need to install on every machine such as media player, antivirus etc. AWT and
Swing are used in java for creating standalone applications.
2) Web Application
An application that runs on the server side and creates dynamic page, is called web
application. Currently, servlet, jsp, struts, jsf etc. technologies are used for creating
web applications in java.

3) Enterprise Application
An application that is distributed in nature, such as banking applications etc. It has the
advantage of high level security, load balancing and clustering. In java, EJB is used
for creating enterprise applications.
4) Mobile Application
An application that is created for mobile devices. Currently Android and Java ME are
used for creating mobile applications.
History
Java history is interesting to know. The history of java starts from Green Team. Java
team members (also known as Green Team), initiated a revolutionary task to develop
a language for digital devices such as set-top boxes, televisions etc.
For the green team members, it was an advance concept at that time. But, it was suited
for internet programming. Later, Java technology as incorporated by Netscape.
Currently, Java is used in internet programming, mobile devices, games, e-business
solutions etc. There are given the major points that describes the history of java.
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language
project in June 1991. The small team of sun engineers called Green Team. Originally
designed for small, embedded systems in electronic appliances like set-top boxes.
Firstly, it was called Greentalk by James Gosling and file extension was .gt. After
that, it was called Oak and was developed as a part of the Green project.
Notice that Java is just a name not an acronym. Originally developed by James
Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and
released in 1995. In 1995, Time magazine called Java one of the Ten Best Products
of 1995. JDK 1.0 released in(January 23, 1996).
Key features
There is given many features of java. They are also known as java buzzwords. The
Java Features given below are simple and easy to understand.
Simple
According to Sun, Java language is simple because:
syntax is based on C++ (so easier for programmers to learn it after C++).

Removed many confusing and/or rarely-used features e.g., explicit pointers, operator
overloading etc.
No need to remove unreferenced objects because there is Automatic Garbage
Collection in java.
Object-oriented
Object-oriented means we organize our software as a combination of different types
of objects that incorporates both data and behaviour.
Object-oriented programming(OOPs) is a methodology that simplify software
development and maintenance by providing some rules.
Basic concepts of OOPs are:
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
Platform Independent
A platform is the hardware or software environment in which a program runs. There
are two types of platforms software-based and hardware-based. Java provides
software-based platform. The Java platform differs from most other platforms in the
sense that its a software-based platform that runs on top of other hardware-based
platforms.It has two components:
1. Runtime Environment
2. API(Application Programming Interface)
Java code can be run on multiple platforms e.g.Windows,Linux,Sun Solaris,Mac/OS
etc. Java code is compiled by the compiler and converted into bytecode.This bytecode
is a platform independent code because it can be run on multiple platforms i.e. Write
Once and Run Anywhere(WORA).
Secured
Java is secured because:
No explicit pointer
Programs run inside virtual machine sandbox.
Classloader- adds security by separating the package for the classes of the
local file system from those that are imported from network sources.
Bytecode Verifier- checks the code fragments for illegal code that can violate
access right to objects.
Security Manager- determines what resources a class can access such as
reading and writing to the local disk.

These security are provided by java language. Some security can also be provided
by application developer through SSL,JAAS,cryptography etc.
Robust
Robust simply means strong. Java uses strong memory management. There is lack of
pointers that avoids security problem. There is automatic garbage collection in java.
There is exception handling and type checking mechanism in java. All these points
make java robust.
Architecture-neutral
There is no implementation dependent features e.g. size of primitive types is set.
Portable
We may carry the java bytecode to any platform.
High-performance
Java is faster than traditional interpretation since byte code is close to native code
still somewhat slower than a compiled language (e.g., C++)
Distributed
We can create distributed applications in java. RMI and EJB are used for creating
distributed applications. We may access files by calling the methods from any
machine on the internet.
Multi-threaded
A thread is like a separate program, executing concurrently. We can write Java
programs that deal with many tasks at once by defining multiple threads. The main
advantage of multi-threading is that it shares the same memory. Threads are important
for multi-media, Web applications etc.

3. TECHNIQUES USED
TECHNIQUE USED
Steganographic Techniques used is oncealing data within encrypted data. The
data to be concealed is first encrypted before being used to overwrite part of a much
larger block of encrypted data. This technique works most effectively where the
decrypted version of data being overwritten has no special meaning or use. Each pixel
typically has three numbers associated with it, one each for red, green, and blue
intensities, and these values often range from 0-255. Each number is stored as eight
bits (zeros and ones), with a one worth 128 in the most significant bit (on the left),
then 64, 32, 16, 8, 4, 2, and a one in the least significant bit (on the right) worth just 1.
HOW STEGANOGRAPHY WORKS
Steganography strips less important information from digital content and
injects hidden data in its place. This is done over the spectrum of the entire image.
Here's one way it could be implemented:
The following sequence of 24 bits represents a single pixel in an image. Its 3
bytes of color information provide a total of 256 different values for each color (red,
green and blue) and thus can represent a total of 16.7 million colors. This particular
value displays as a dark green:

Byte 1 - Red
00000000

Bytc2-Green
01100100

Byte 3 - Blue
00000000

Now, let's take 11 of these pixels that represent, say, part of a solid-color
background. In the following sequence, the least significant (rightmost) bit of each 8-

bit byte has been co-opted to hide a text messagethe four characters Aha!in
ASCII binary:

Table 5.2 Bitwise representation of text message

The hidden message occupies 32 of those 264 bits (about 12%) and contains four
8-bit bytes. In the diagram, each maroon or gold box represents a bit that had to be
changed to include the hidden message. Notice that only 15 of 264 bits (less than 6%)

Here are the bits behind those 11 pixels:

Table 5.3 Message hidden in pixel


positions

Fig 5.1
insertion

LSB

had to be changed and only eight of the 11 pixels were altered.


The two figures below represent the 11 colored pixels we've been manipulating.
The figure on the left is the original, unaltered version. The one on the right has been
modified.
ALGORITHM USED
The DES (Data Encryption Standard) algorithm is the most widely used encryption
algorithm in the world. For many years, and among many people, "secret code making"
and DES have been synonymous. DES works on bits, or binary numbers--the 0s and 1s
common to digital computers. Each group of four bits makes up a hexadecimal, or base
16, number. DES works by encrypting groups of 64 message bits, which is the same as
16 hexadecimal numbers. To do the encryption, DES uses "keys" where are also
apparently 16 hexadecimal numbers long, or apparently 64 bits long. However, every 8th
key bit is ignored in the DES algorithm, so that the effective key size is 56 bits. But, in
any case, 64 bits (16 hexadecimal digits) is the round number upon which DES is
organized.

4. MODULES
The project consists of mainly four modules encryption, hide message, retrieve message
and decryption. Encryption and hide message form the modules at the sender side.
retrieve message and decryption form the modules at the receiver side
SENDER SIDE
Encryption
Encryption includes a message or a file encrypting. Encryption involves
converting the message to be hidden into a cipher text. Encryption can be done by
passing a secret key.Secret key can be used for encryption of the message to be hidden.It
provides security by converting it into a cipher text,which will be difficult for hackers to
decrypt. Moreover if the message is password protected,then while retrieving
message,the retriever has to enter the correct password for viewing the message.
Hide Message
Hiding message is the most important module of steganography.It involves
embedding the message into the cover text. Each pixel typically has three numbers
associated with it, one each for red, green, and blue intensities, and these values often
range from 0-255.In order to hide the message,data is first converted into byte format and
stored in a byte array.The message is then encrypted and then embed each bits into the
LSB position of each pixel position. The least significant (rightmost) bit of each 8-bit
byte has been co-opted to hide a text message.
RECEIVER
Retrieve Message

SIDE

It involves retrieving the embed message from the file independent of the file
format. Once the message has been retrieved it has to be converted into original message or file.

This can be done by reading the embedded data from the master file. The read data will be in the
bytes format. This message has to be converted into the suitable output file format.
Decryption
Decryption includes a message or a file decrypting. Decryption involves converting the cipher text
into decrypted format. Decryption can be done by passing a secret key. Secret key can be used for
decryption of the message that is hidden. It provides security by converting the cipher text, into the
original data message or file. Moreover if the message is password protected, then while retrieving
message, the retriever has to enter the correct password for viewing the message.

5. SYSTEM DESIGN
DATA FLOW DIAGRAM

Sender side

----------------------1

Secured data
Receiver side

Sending

Receiving

Fig 5.1 Level 0: DFD

Fig 5.2 Level 1:Embedding information in a file

Fig 5.3 Level 2 : Retrival

You might also like