Steganography ProjectReport
Steganography ProjectReport
STEGANOGRAPHY
(A new technique to hide information within
image file)
STEGANOGRAPHY
(A new technique to hide information within
image file)
A PROJECT REPORT
Submitted by
of
IN
MUMBAI
October - 2010
A PROJECT REPORT
Submitted by
of
OCTOBER 2010
BONAFIDE CERTIFICATE
……………..”
SIGNATURE SIGNATURE
<<Name>> <<Name>>
<<Academic
Designation>>
<<Department>> <<Department>>
<<Full address of the Dept & College >> <<Full address of the
Dept & College >>
Table of Contents
1. Abstract
2. Introduction
3. Synopsis
4. Problem Statement
5. Objectives
6. Overview
7. Steganography Techniques
8. Steganography vs Cryptography
9. Steganography vs Watermarking
12. Summary
ABSTRACT
INTRODUCTION
One of the reasons that intruders can be successful is the most of the
information they acquire from a system is in a form that they can read and
comprehend. Intruders may reveal the information to others, modify it to
misrepresent an individual or organization, or use it to launch an attack. One
solution to this problem is, through the use of steganography.
Steganography is a technique of hiding information in digital media. In
contrast to cryptography, it is not to keep others from knowing the hidden
information but it is to keep others from thinking that the information even
exists.
Fingerprint, the owner of the data set embeds a serial number that
uniquely identifies the user of the data set. This adds to copyright
information to makes it possible to trace any unauthorized used of the data
set back to the user.
Steganography hide the secrete message within the host data set and
presence imperceptible and is to be reliably communicated to a receiver.
The host data set is purposely corrupted, but in a covert way, designed to be
invisible to an information analysis.
SYNOPSIS
Project Members:
1. Atanu Maity
2. Prabha Choudhary
What is Steganography?
History of Steganography:
Project Scope:
This project is developed for hiding information in any image file. The scope
of the project is implementation of steganography tools for hiding
information includes any type of information file and image files and the path
where the user wants to save Image and extruded file.
Methodology:
User needs to run the application. The user has two tab options – encrypt
and decrypt. If user select encrypt, application give the screen to select
image file, information file and option to save the image file. If user select
decrypt, application gives the screen to select only image file and ask path
where user want to save the secrete file.
In encryption the secrete information is hiding in with any type of image file.
Software Requirements:
• .NET Framework 3.5
Hardware Requirements:
Processor: Preferably 1.0 GHz or Greater.
Detecting Steganography:
There are many methods that can be used to detect Steganography such as:
“Viewing the file and comparing it to another copy of the file found on the
Internet (Picture file). There are usually multiple copies of images on the
internet, so you may want to look for several of them and try and compare
the suspect file to them. For example if you download a JPED and your
suspect file is also a JPED and the two files look almost identical apart from
the fact that one is larger than the other, it is most probable you suspect file
has hidden information inside of it.
Future Enhancements:
Problem Statement:
The former consists of linguistic or language forms of hidden writing. The
later, such as invisible ink, try of hide messages physically. One
disadvantage of linguistic steganography is that users must equip
themselves to have a good knowledge of linguistry. In recent years,
everything is trending toward digitization. And with the development of the
internet technology, digital media can be transmitted conveniently over the
network. Therefore, messages can be secretly carried by digital media by
using the steganography techniques, and then be transmitted through the
internet rapidly
Objective
Overview
The word steganography comes from the Greek “Seganos”, which mean
covered or secret and – “graphy” mean writing or drawing. Therefore,
steganography mean, literally, covered writing. It is the art and science of
hiding information such its presence cannot be detected and a
communication is happening. A secrete information is encoding in a manner
such that the very existence of the information is concealed. Paired with
existing communication methods, steganography can be used to carry out
hidden exchanges.
Cover-
object, C
Stego Object,
Message, M
Z
F(X,M,K)
Stego-key,
K
Message is the data that the sender wishes to remain it confidential. It can
be plain text, ciphertext, other image, or anything that can be embedded in
a bit stream such as a copyright mark, a covert communication, or a serial
number. Password is known as stego-key, which ensures that only recipient
who know the corresponding decoding key will be able to extract the
message from a cover-object. The cover-object with the secretly embedded
message is then called the Stego-object.
• Audio that using digital audio formats such as wav, midi, avi,
mpeg, mpi and voc
• File and Disk that can hides and append files by using the slack
space
• Text such as null characters, just alike morse code including html
and java
• Images file such as bmp, gif and jpg, where they can be both
color and gray-scale.
Steganography vs Cryptography:
Steganography vs Watermarking:
Robustness
Security Invisibility
That is the way the algorithm changes the vessel and the severity of such an
operation determines with no doubt the delectability of the message, since
delectability is a function of file characteristics deviation from the norm,
embedding operation attitude and change severity of such change decides
vessel file delectability.
Steganography Techniques:
Over the past few years, numerous steganography techniques that embed
hidden messages in multimedia objects have been proposed. There have
been many techniques for hiding information or messages in images in such
a manner that alteration made to the image is perceptually indiscernible.
Commonly approaches are include LSB, Masking and filtering and Transform
techniques.
deterministic sequence. Modulating the least significant bit does not result in
human perceptible difference because the amplitude of the change is small.
In this technique, the embedding capacity can be increased by using two or
more least significant bits. At the same time, not only the risk of making the
embedded message statistically detectable increase but also the image
fidelity degrades. Hence a variable size LSB embedding schema is
presented, in which the number of LSBs used for message
embedding/extracting depends on the local characteristics of the pixel. The
advantage of LSB-based method is easy to implement and high message
pay-load.
Although LSB hides the message in such way that the humans do not
perceive it, it is still possible for the opponent to retrieve the message due to
the simplicity of the technique. Therefore, malicious people can easily try to
extract the message from the beginning of the image if they are suspicious
that there exists secret information that was embedded in the image.
Masking and filtering techniques, usually restricted to 24 bits and gray scale
image, hide information by marking an image, in a manner similar to paper
watermarks. The technique perform analysis of the image, thus embed the
information in significant areas so that the hidden message is more integral
to cover image than just hiding it in the noise level.
Using bitmap pictures for hiding secret information is one of most popular
choices for Steganography. Many types of software built for this purpose,
some of these software use password protection to encrypting information
on picture. To use these software you must have a ‘BMP’ format of a pictures
to use it, but using other type of pictures like “JPEG”, “GIF” or any other
types is rather or never used, because of algorithm of “BMP” pictures for
Steganography is simple. Also we know that in the web most popular of
image types are “JPEG” and other types not “BPM”, so we should have a
solution for this problem.
This software provide the solution of this problem, it can accept any type of
image to hide information file, but finally it give the only “BMP” image as an
output that has hidden file inside it.
Bitmap Steganography:
Bitmap type is the simplest type of picture because that it doesn’t have any
technology for decreasing file size. Structure of these files is that a bitmap
image created from pixels that any pixel created from three colors ( red,
green and blue said RGB) each color of a pixel is one byte information that
shows the density of that color. Merging these three color makes every color
that we see in these pictures. We know that every byte in computer science
is created from 8 bit that first bit is Most-Significant-Bit (MSB) and last bit
Least-Significant-Bit (LSB), the idea of using Steganography science is in this
place; we use LSB bit for writing our security information inside BMP pictures.
So if we just use last layer (8st layar) of information, we should change the
last bit of pixels, in other hands we have 3 bits in each pixel so we have
3*hight*width bits memory to write our information. But before writing our
data we must write name of data(file), size of name of data & size of data.
We can do this by assigning some first bits of memory (8st layer).
Steganography system requires any type of image file and the information or
message that is to be hidden. It has two modules encrypt and decrypt.
Microsoft .Net framework prepares a huge amount of tool and options for
programmers that they simples programming. One of .Net tools for pictures
and images is auto-converting most types of pictures to BMP format. I used
this tool in this software called “Steganography” that is written in C#.Net
language and you can use this software to hide your information in any type
of pictures without any converting its format to BMP (software converts
inside it).
The algorithm used for Encryption and Decryption in this application provides
using several layers lieu of using only LSB layer of image. Writing data starts
from last layer (8st or LSB layer); because significant of this layer is least and
every upper layer has doubled significant from its down layer. So every step
we go to upper layer image quality decreases and image retouching
transpires.
The encrypt module is used to hide information into the image; no one can
see that information or file. This module requires any type of image and
message and gives the only one image file in destination.
The decrypt module is used to get the hidden information in an image file. It
take the image file as an output, and give two file at destination folder, one
is the same image file and another is the message file that is hidden it that.
Before encrypting file inside image we must save name and size of file in a
definite place of image. We could save file name before file information in
LSB layer and save file size and file name size in most right-down pixels of
image. Writing this information is needed to retrieve file from encrypted
image in decryption state.
Start
Application
Encryption Decryption
Message
Image Image file
file
Encryption Process
BMP FILE
Decryption Process
BMP FILE
Code Analysis
using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
namespace Text2Image
{
public partial class FrmSteganography : Form
{
public FrmSteganography()
{
InitializeComponent();
}
//public values:
string loadedTrueImagePath, loadedFilePath,
saveToImage,DLoadImagePath,DSaveFilePath;
int height, width;
long fileSize, fileNameSize;
Image loadedTrueImage, DecryptedImage ,AfterEncryption;
Bitmap loadedTrueBitmap, DecryptedBitmap;
Rectangle previewImage = new Rectangle(20,160,490,470);
bool canPaint = false, EncriptionDone = false;
byte[] fileContainer;
canPaint = true;
this.Invalidate();
}
if (writeFileName)
{
FNSize = fileNameSize;
string fileName = justFName(loadedFilePath);
//write fileName:
for (i = 0; i < height && i * (height / 3) < fileNameSize; i+
+)
for (j = 0; j < (width / 3) * 3 && i * (height / 3) +
(j / 3) < fileNameSize; j++)
{
}
long tempFS = fileSize, tempFNS = fileNameSize;
r = (byte)(tempFS % 100);
tempFS /= 100;
g = (byte)(tempFS % 100);
tempFS /= 100;
b = (byte)(tempFS % 100);
Color flenColor = Color.FromArgb(r,g,b);
outputBitmap.SetPixel(width - 1, height - 1, flenColor);
r = (byte)(tempFNS % 100);
tempFNS /= 100;
g = (byte)(tempFNS % 100);
tempFNS /= 100;
b = (byte)(tempFNS % 100);
Color fnlenColor = Color.FromArgb(r,g,b);
outputBitmap.SetPixel(width - 2, height - 1, fnlenColor);
return outputBitmap;
}
j = tempj;
tempj = 0;
}
pixel = DecryptedBitmap.GetPixel(j, i);
r = pixel.R;
g = pixel.G;
b = pixel.B;
byte2bool(r, ref rb);
byte2bool(g, ref gb);
byte2bool(b, ref bb);
if (j % 3 == 0)
{
t[0] = rb[7];
t[1] = gb[7];
t[2] = bb[7];
}
else if (j % 3 == 1)
{
t[3] = rb[7];
t[4] = gb[7];
t[5] = bb[7];
}
else
{
t[6] = rb[7];
t[7] = gb[7];
temp = bool2byte(t);
res[i * (height / 3) + j / 3 - fNameSize] = temp;
}
}
}
else if (j % 3 == 1)
{
t[3] = rb[layer];
t[4] = gb[layer];
t[5] = bb[layer];
}
else
{
t[6] = rb[layer];
t[7] = gb[layer];
temp = bool2byte(t);
res[i * (height / 3) + j / 3 + (6 - layer) *
((height * (width / 3) * 3) / 3 - 1) + readedOnL8] = temp;
}
}
return outp;
}
return;
}
if (System.IO.File.Exists(DeLoadImage_tbx.Text) == false)
{
MessageBox.Show("Select image file.", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
DeLoadImage_tbx.Focus();
return;
}
DecryptLayer();
}
canPaint = true;
this.Invalidate();
}
}
{
this.Close();
}
}
}
User Manual
This is the first screen which has two tab options – one is Encrypt
Image for encryption and another is Decrypt image for decryption. In
right – top panel is displays the information about the image such as
size, height and width.
Encryption
2. For load image click on button “Browse” that is next to the Load
Image textbox. The file open dialog box will displays as follows, select
the Image file, which you want to use hide information and click on
Open button.
3. The image file will opened and is displays as follows. Next, click
on “Browse” button that is next to the Load File textbox.
4. Again the file open dialog box will appear, select any type of file
whatever you want to hide with the image and click on ok
button.
Decryption
2. Next click on the “Browse” button, which open the Open file dialog
box, here you have to select the image which is Encrypted and has
hidden information file. Select the image file and click on Open button.
4. Now click on “Browse” button which is next to “Save file to” textbox. It
will open a dialog box that is “Browse for folder”. It ask you to select
the path or folder, where you want to extract the hidden file. Select the
folder and click on Ok button.
5. Now click on Decrypt button, it will decrypt the image, the hidden file
and image file is saved into selected folder. The message for
Summary
Since ancient times, man has found a desire in the ability to communicate
covertly. The recent explosion of research in watermarking to protect
intellectual property is evidence that steganography is not just limited to
military or espionage applications. Steganography, like cryptography, will
play an increasing role in the future of secure communication in the “digital
world”.
Bibliography
Websites
Following websites are referring to create this project reports.
• http://www.google.com
• http://www.microsoft.com
• http://www.programmer2programmer.net
• http://www.codeproject.com
• http://www.asp.net
• http://www.asp123.com
• http://www.wikipedia.org
Books
Following books and ebook are used to complete this project reports.
• Mastering C# (Paperback)
• SQL Server Bible (Paperback)
• .NET Black Book (Paperback)
• Professional C#, 2nd Edition (Paperback)
• Professional ASP.NET (Paperback)
• MCAD/MCSD Self-Paced Training Kit: Developing Web Applications with
Microsoft® Visual Basic® .NET and Microsoft Visual C#® .NET, Second
Edition
• MCAD/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL Server 2000
Database Design and Implementation, Exam 70-229, Second Edition