Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

1

Image Steganography & It's Application


Utathya Chatterjee

Name – Utathya Chatterjee

MSC COMPUTER SCIENCE DEPARTMENT

College
Dinabandhu Andrews Institute of Technology and Management

University
Maulana Abul Kalam Ajad University of Technology

Dated – 28.08.2017
2

Table of Content

Sl No. Topic Name Pg No.

01 Abstract …………… 05

02 Introduction …………… 05

03 Image …………… 05

04 Digital Image Processing …………… 06

05 Steganography …………… 06

06 Steganography Concepts …………… 07

07 Steganalysis …………… 07

08 Image Steganography …………… 08

09 Types of Image Steganography …………… 09

10 Survey of Image Steganography …………… 18

11 Proposed Work …………… 12

12 Algorithm …………… 12

13 Block Diagram …………… 09

14 Coding …………… 12

15 Future scope & Future Analysis of the project …………… 19

16 References …………… 20
3

Abstract

This paper describes the basic knowledges about steganography and specially the field of image
steganography so to clear the concept of this I have attached the definition of image,
steganography and image steganography in different manner because without knowing the
image its quite difficult to make stego image. I have also attached the concepts of
steganography. And the types of basic steganography models with a short intro of the types of
images, their patterns and the methods which can be used for steganography. After that I have
given a short passage about the survey of steganography with its related work. And mostly at
the end I have added some of my proposed work, consisting block diagram, flowchart and
algorithm with a short description with pictorial representation. [21]

Introduction
Steganography is the art of hiding the reality that message 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 steganography 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. This paper
intends to give an overview of image steganography, its uses and techniques.
To go over the main points, we find the following important parameters which should be
considered when scheming a steganography algorithm:
The security,
The capacity,
The success rate,
The embedding complexity.

Data confidentiality issues can happen from a wide range of sources such as healthcare records,
investigations and proceedings, financial institutions and transactions, residence and
geographic records and ethnicity. Data security or data privacy has become increasingly
important as more and more systems are connected to the Internet. There are information
confidentiality laws that cover the security of data or information on private individuals from
intentional or unintentional disclosure or misuse. Therefore, hiding the data in a type of form
such as within an image is very important in order to make sure that security or privacy of the
important data is protected. [21]

Image

To a computer, an image is a collection of numbers that constitute different light intensities in


different areas of the image [5].
This numeric representation forms a grid and the individual points are referred to as pixels.
Most images on the Internet consists of a rectangular map of the image’s pixels (represented
as bits) where each pixel is located and its colour [6].
4

The number of bits in a colour scheme, called the bit depth, refers to the number of bits used
for each pixel [7]. The smallest bit depth in current colour schemes is 8, meaning that there
are 8 bits used to describe the colour of each pixel [7]. Monochrome and greyscale images use
8 bits for each pixel and are able to display 256 different colours or shades of grey. Digital
colour images are typically stored in 24-bit files and use the RGB colour model, also known as
true colour [7]
Digital Image Processing[20]

As a result of solid state multispectral scanners and other raster input devices, we now have
available digital raster images of spectral reflectance data. The chief advantage of having these
data in digital form is that they allow us to apply computer analysis techniques to the image
data—a field of study called Digital Image Processing.

Digital Image Processing is largely concerned with four basic operations: image restoration,
image enhancement, image classification, image transformation. Image restoration is
concerned with the correction and calibration of images in order to achieve as faithful a
representation of the earth surface as possible—a fundamental consideration for all
applications. Image enhancement is predominantly concerned with the modification of images
to optimize their appearance to the visual system.[20]

Steganography

Steganography is an art of secure transmission of messages from a sender to a receiver. It


should ensure that no one can reliably conclude on the secret communication between the
sender and the receiver. To achieve such a secrecy, the message is hidden in some cover media
which may no traise any suspicion on the possibility of carrying the secret message to the third
party. Embedding introduces distortion in the cover medium. The embedding distortion in
visual and statistical properties of the cover medium may lead steganographic detectability.
The objective of any steganographic technique is to preserve these properties while embedding
the message in the cover media. [1]

Steganography is a technique for information hiding. It aims to embed secret data into a digital
cover media, such as digital audio, image, video, etc., without being suspicious. On the other
side, steganalysis aims to expose the presence of hidden secret messages in those stego media.
If there exists a steganalytic algorithm which can guess whether a given media is a cover or not
with a higher probability than random guessing, the steganographic system is considered
broken. [2]

Steganography is the art of secret communication. Its purpose is to hide the very presence of
communication as opposed to cryptography which aims to make communication unintelligible
to those who do not posses the right keys [3]. We can use digital images, videos, sound files,
and other computer files that contain perceptually irrelevant or redundant information as
“covers” or carriers to hide secret messages. After embedding a secret message into the cover-
5

image, we obtain a so-called stego-image. It is important that the stego-image does not contain
any detectable artifacts due to message embedding. A third party could use such artifacts as an
indication that a secret message is present. Once a third party can reliably identify which images
contain secret messages, the steganographic tool becomes useless.[4]

Types of Steganography [21]

Steganography

Text Images Audio/Video Protocol

Steganography

Protection against detection Protection against


(Data hiding) removal(Document
Marking)

Watermarking Fingerprinting

Process of the steganography [21]

Steganography Concepts

Although steganography is an ancient subject, the modern formulation of it is often given in


terms of the prisoner’s problem proposed by Simmons [17], where two inmates wish to
communicate in secret to hatch an escape plan. All of their communication passes through a
warden who will throw them in solitary confinement should she suspect any covert
communication [18].
The warden, who is free to examine all communication exchanged between the inmates, can
either be passive or active. A passive warden simply examines the communication to try and
determine if it potentially contains secret information. If she suspects a communication to
contain hidden information, a passive warden takes note of the detected covert communication,
reports this to some outside party and lets the message through without blocking it. An active
warden, on the other hand, will try to alter the communication with the suspected hidden
information deliberately, in order to remove the information [19].

Steganalysis

Steganography can be applied in numerous field such as authentication, secret communication


in military, banking etc., however it also depends on the person who is using. There are strong
indications that steganography has been used for planning criminal activities [22]. In this way,
6

it is important to detect the existence of hidden messages in digital files. As with cryptography
and cryptanalysis, Steganalysis is defined as the art and science of breaking the security of
steganography systems. The goal of steganography is to conceal the existence of a secret
message. While the goal of Steganalysis is to detect that a certain file contains embedded data.
The stegosystem can be extended to include scenarios for different attacks [23] similar to the
attacks on cryptographic systems. In general, extraction of the secret message could be a harder
problem than mere detection. [24]

The challenges of steganalysis are


listed below
a) To get Stego-Image Database
b) To test the Steganalysis algorithm against different payload Stego-Images to check its
robustness
c) To test the Steganalysis algorithm from various categories of images such as animals, fruits,
natural scene etc.,
d) Identification of embedding algorithm
e) Detection of presence of hidden message in cover signal
f) Estimation of embedded message length
g) Prediction of location of hidden message bits
h) Estimation of secret key used in the embedding algorithm
i) Estimation of parameter of embedding algorithm
j) Extraction of hidden message [24]

Image Steganography

As stated earlier, images are the most popular cover objects used for steganography. In the
domain of digital images many different image file formats exist, most of them for specific
applications. For these different image file formats, different steganographic algorithms
exist.[8]

Although steganography for binary images [9, 10] and 3D images [11] have some progresses,
researches mainly concentrate on hiding data in gray-scale images and color images. Since the
luminance component of a color image is equivalent to a gray-scale image, we focus on the
steganography for gray-scale images. Besides, it is generally considered that gray-scale images
are more suitable than color images for hiding data [12] because the disturbance of correlations
between color components may easily reveal the trace of embedding. If not specified, the
images in this paper are referred to 8-bit gray-scale images. Owing to the fact that bitmap/raw
and JPEG images are of great interests in steganography community, we focus on spatial
steganography and JPEG steganography. Moreover, since the data extraction steps are usually
the inverse operations of the data embedding steps, we mainly describe the data embedding
approaches for each steganographic method in the following sub-sections.[13]

As stated previously, images are considered as the most popular file formats used in
steganography. They are known for constituting a non-causal medium, due to the possibility to
7

access any pixel of the image at random. In addition, the hidden information could remain
invisible to the eye. However, the image steganography techniques will exploit "holes" in the
Human Visual System (HVS). [14]

Hiding information inside images is a popular technique nowadays. An image with a secret
message inside can easily be spread over the World Wide Web or in newsgroups. The use of
steganography in newsgroups has been researched by German steganographic expert Niels
Provos, who created a scanning cluster which detects the presence of hidden messages inside
images that were posted on the net. However, after checking one million images, no hidden
messages were found, so the practical use of steganography still seems to be limited.
To hide a message inside an image without changing its visible properties, the cover source
can be altered in ”noisy” areas with many color variations, so less attention will be drawn to
the modifications. The most common methods to make these alterations involve the usage of
the least-significant bit or LSB, masking, filtering and transformations on the cover image.
These techniques can be used with varying degrees of success on different types of image files.
[15]

Basic Steganography model consists of secret message, cover message, secret key and
embedding algorithm.
1) Secret Message: The secret message is information which needs to be hidden into some
suitable digital media.
2) Cover Message: It is the carrier of message such as image, audio, video or other digital
media.
3) Stego Key: It is used to embed message depending on the hiding algorithm. Embedding
algorithm is the method of embedding the secret message into the cover. The cover-object with
the secretly embedded message is then called the Stego-object. Steganography process
basically consists of encoding at the sender end to obtain the StegoImage and decoding at the
receiver end to provide the secret or private information.
4) Encoding: The secret text message is encrypted using an encryption key.
5) Decoding: The Stego-Image is fed into the decoder which uses a decryption algorithm to
provide the original cover and the secret message as output. [16]

General Image Steganography Technique


8

An Image steganography Technique[27]

General Steganography Approach[26]

Types of Image Steganography

Image steganography techniques can be divided into two groups: those in the Image Domain
and those in the Transform Domain. Image – also known as spatial domain techniques
embed messages in the intensity of the pixels directly, Transform – also known as
frequency domain, images are first transformed and then the message is embedded in the image
. Many carrier messages can be used in the recent technologies, such as Image, text video
and many others. The image file is the most popular used for this purpose because it easy to
send during the communication between the sender and receiver. The images are divided
into three types:
Binary (Black- White),
Gray scale
Red-Green-Blue (RGB) images.
9

The binary image has one bit value per pixel represent by 0 for black and 1 for white pixels.
While the gray scale image has 8 bits value per pixel represent from 00000000 for black and
11111111 for white pixels.
The RGB image has 24 bits values per pixel represent by (00000000, 00000000 and 00000000)
for black and (11111111, 1111111 and 11111111) for white pixels. The RGB image is the most
suitable because it contains a lot of information that help in hiding the secret information
with a bit change in the image resolution which does not affect the image quality and make
the message more secure. In this research paper the RGB images are used as a carrier message
to hide the secret messages. There are various methods of steganography:

Least significant bit (LSB) method


Transform domain techniques
Statistical methods
Distortion techniques
Hash-LSB and RSA algorithm

1) Least significant bit (LSB) method

Red Green Blue


0 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1

Hiding two bits directly ………

Algorithm (1) Least Significant Bit Hiding Algorithm. Inputs: RGB image, secret message
and the password. Output: Stego image.

Begin Scan the image row by row and encode it in binary. Encode the secret message in binary.
check the size of the image and the size of the Secret message.
Start sub-iteration 1: Divide the image into three parts (Red, Green and Blue parts) hide two
by two bits of the secret message in each part of the pixel in the two least Significant
bits. Set the image with the new values.
End sub-iteration 1. Set the image with the new values and save it.
End [16]

2) Hash-LSB and RSA algorithm

B. Hash-LSB (Least Significant Bit) Process


The Hash based Least Significant Bit (H-LSB) technique for steganography in which
position of LSB for hiding the secret data is determined using hash function. Hash function
finds the positions of least significant bit of each RGB pixel’s and then message bits are
embedded into these RGB pixel’s independently. Then hash function returns hash values
10

according to the least significant bits present in RGB pixel values. The cover image will be
broken down or fragmented into RGB format. Then the Hash LSB technique will uses the
values given by hash function to embed or conceal the data. In this technique the secret message
is converted into binary form as binary bits; each 8 bits at a time are embedded in least
significant bits of RGB pixel values of cover image in the order of 3, 3, and 2
respectively. According to this method 3 bits are embedded in red pixel LSB, 3 bits are
embedded in green pixel LSB and 2 bits are embedded in blue pixel LSB as illustrated in
Fig. 2. These 8 bits are inserted in this order because the chromatic influence of blue color
to the human eye is more than red and green colors. Therefore the distribution pattern
chooses the 2 bits to be hidden in blue pixel. Thus the quality of the image will be not sacrificed.
Following formula is used to detect positions to hide data in LSB of each RGB pixels of the
cover image.
k = p % n ………..………….…… (1)
Where, k is the LSB bit position within the pixel; p represents the position of each hidden
image pixel and n is the number of bits of LSB which is 4 for the present case. After embedding
the data in cover image, a stego image will be produced. The recipient of this image has to
use the hash function again to extract the positions where the data has been stored. The
extracted information will be in cipher text. After decryption of it, combining of bits into
information will produce the secret message as required by the receiver. [16]

C. C. RSA Encryption and Hash-LSB Encoding


This approach of image steganography is using RSA encryption technique to encrypt
the secret data. After encryption Hash-LSB method is applied on ciphertext. D. Hash-LSB
Decoding and RSA Decryption
Retrieval Algorithm:
Step 1: Receive a stego image.
Step 2: Find 4 LSB bits of each RGB pixels from stego image.
Step 3: Apply hash function to get the position of LSB’s with hidden data.
Step 4: Retrieve the bits using these positions in order of 3, 3, and 2 respectively.
Step 5: Apply RSA algorithm to decrypt the retrieved data.
Step 6: Finally read the secret message.
The objective of the work have been implemented an image steganography technique using
HashLSB (Least Significant Bit) method with RSA algorithm to improve the security of the
data hiding technique. [16]

3) Blow-fish Encryption-LSB Steganography


Method: It first encrypts data using Blow-fish Encryption algorithm and then applies LSB
steganography method on it.[16]

R G B pixel of Cover Image


RED (3 bits)
11

1 1 1
GREEN (3 bits)
0 1 1
BLUE (2 bits)
1 0

1 1 1 1 0 1 0 1
1 2 3 4 1 2 3 4
byte

Proposed Method: Using random image pixel location in grey scale image through LSB
method implementation. By selecting random location of the hidden letters from getting their
ascii value to binary version. We will able to change the pixel minimum value. Below the given
algorithm properly describes the method in exact manner.
This method is to increase more security. Through LSB method the simple changes of 0-1 or
1-0 will be negligible by our vision power and can’t be observed.

Algorithm of proposed method:


1. Take an image, where you want to hide your text message.
2. Take the text message you want to hide.
3. Find the ascii value of the text and convert them into binary numbers.
4. Now select random location for each letter from your message, through x,y access of your
image by following 3rd step of this algorithm. Ex. Suppose my letter is T(84 – ASCII =>
1010100 – BINARY).
5. Now after getting the binary digits ‘1010100’ will take each digit and give then random pixel
location, to store, in the image. Ex. 1[12.52], 0[78,-85], 1[10,10], 0[45,8], 1[-85,-74], 0[41,-
82], 0[45,2]
6. Now using LSB method we will change the least pixel value from the 8bit, and the change
will only occur in the exact location, which randomly selected coordinates. The maximum
change can vary only from 0-1 and 1-0.

Coding [28]
In this paper we are going to propose the following four parts.
1) Encrypt the text using play fair method.
2) Encode the encrypted text in to the image file using matlab code.
3) Decode the image file and extract the encrypted text message using matlab code.
4) Decrypt the text message using play fair method. [28]

Code for encoding and decoding the text message in matlab is as the following: function
[]=txthide(arg)
% TXTHIDE Hides text message (MSG) within an image, using a key (KEY).
% After typing txthide at the command line, a GUI appears that will guide
12

% the user through the process of encoding the text. The maximum length of
% text that can be encoded is 1000 characters. This could be
% modified, but represents a good comprimise between speed and
% functionality on the author's computer.
% Text can be hidden in a bitmap (*.bmp), a tif (*.tif) or a jpg (*.jpg ).
% However, the encoded image can only be saved as a bitmap or
% tif; the jpg format uses compression and the decoder will not return the
% correct MSG if the user tries to save the encoded image in this
% format.
% Any character from a common keyboard can be encoded, including the
% shifted characters and numbers, such as !@#$%^&*()_+123 etc.
%---------USER NOTES--------%
% 1. User may hit the 'Return' key while typing the MSG, but this is NOT
% recommended, as the formatting will not be preserved on decoding,
% and the string length counter will not display the correct string
% length. Similarly for the 'Tab' key, use spaces instead.
% 2. User should NOT hit the 'Return' key as part of the decoding KEY. if nargin==0

arg = 'initialize';
else
% Retrieve/redefine (See definitions below) Mainly for easy reading.
hands = get(gcf,'userdata');
pos = get(gcbf,'position');
checkd = hands(1); % For user to choose to decode a MSG.
checke = hands(2); % For user to choose to encode a MSG.
edit1 = hands(3); % Space for user to enter MSG.
edit2 = hands(4); % Space for user to enter key.
frame1 = hands(5);
frame2 = hands(6);
push1 = hands(7); % Indicates user is done entering MSG.
push2 = hands(8); % Indicates user is done entering KEY.
static1 = hands(9);
static2 = hands(10);
static3 = hands(11);
static4 = hands(12);
static5 = hands(13);
end
switch arg
case 'initialize' % Creation of GUI and storage of handles.
counter=0; % This is where the length of MSG is stored.
h_fig = figure('name','Text Hider','position',[460 760 300 80],...
'menubar','none','resize','off');
col = get(h_fig,'color');
checkd=uicontrol(h_fig,'style','checkbox','position',[140 20 60 20],...
13

'string','Decode','backgroundcolor',col,'callback',...
'txthide(''decode'')','fontweight','bold');
checke=uicontrol(h_fig,'style','checkbox','position',[140 50 60 20],...
'string','Encode','fontweight','bold',... 'backgroundcolor',col,'callback',... 'txthide(''encode'')');
edit1=uicontrol(h_fig,'style','edit','horizontalalignment','left',...
'max',9,'min',1,'visible','off','KeyPressFcn',...
'txthide(''count'')','userdata',counter);
edit2=uicontrol(h_fig,'style','edit','horizontalalignment','left',...
'max',9,'min',1,'visible','off');
frame1=uicontrol(h_fig,'style','frame','visible','off');
frame2=uicontrol(h_fig,'style','frame','visible','off');
push1=uicontrol(h_fig,'style','pushbutton','string','done',...
'callback','txthide(''done1'')','visible','off');
push2=uicontrol(h_fig,'style','pushbutton',...
'string','done','callback','txthide(''done2'')',... 'visible','off');
static1=uicontrol(h_fig,'style','text','visible','off',...'string','Enter the message you wish to
hide.',...
'fontweight','bold','backgroundcolor',col);
static2=uicontrol(h_fig,'style','text','position',[30 33 75 20],...
'strin','Choose one:','fontweight','bold',... 'backgroundcolor',col);
static3=uicontrol(h_fig,'style','text','visible','off',...
'string','Enter the key for decoding.',...
'fontweight','bold','backgroundcolor',col);
static4=uicontrol(h_fig,'style','text','visible','off',...
'string','Message Length:',... 'fontweight','bold','backgroundcolor',col);
static5=uicontrol(h_fig,'style','text','visible','off',...
'string','0','foregroundcolor','blue',...
'fontweight','bold','backgroundcolor',col);
hands=[checkd checke edit1 edit2 frame1 frame2 push1 push2 static1...
static2 static3 static4 static5];
set(h_fig,'userdata',hands);
% Store handles in figures userdata. case 'encode'
% The user has chosen to encode a MSG.
set(gcbf,'position',[pos(1) pos(2)-300 300 380]);
set(checkd,'enable','off','position',[140 320 60 20]);
set(checke,'position',[140 350 60 20],'enable','off');

set(edit1,'visible','on','position',[30 50 245 200],'fontsize',...


10,'string',[' Maximum Number of Characters ',...
' is 1000. See Counter Below'],'foregroundcolor',...'red');
% Issue a reminder about the max MSG length.
set(frame1,'visible','on','position',[30 295 245 3],...
'backgroundcolor','black');
set(push1,'visible','on','position',[230 10 45 28]);
14

set(static1,'visible','on','position',[30 260 245 20]);


set(static2,'position',[30 333 75 20]);
set(static4,'visible','on','position',[28 4 100 28]);
set(static5,'visible','on','position',[130 4 50 28]);
pause(1.75); % Displays reminder only a short time.
set(edit1,'foregroundcolor','black','string','','fontsize',9) case 'decode'
% The user has decided to decode a MSG.
set(gcbf,'position',[pos(1) pos(2)-110 300 190]);
set(checkd,'enable','off','position',[140 130 60 20]);
set(checke,'enable','off','position',[140 160 60 20]);
set(edit2,'visible','on','position',[30 40 245 30]);
set(frame1,'position',[30 110 245 3],'visible','on',...
'backgroundcolor','black');
set(push2,'visible','on','position',[130 7 45 28]);
set(static2,'position',[30 143 75 20]);
set(static3,'visible','on','position',[30 75 245 20]);
case 'done1' % The user is done entering the MSG to encode.
set(gcbf,'position',[pos(1) pos(2)-140 300 520]);
set(checkd,'position',[140 460 60 20]);
set(checke,'position',[140 490 60 20]);
set(edit1,'position',[30 190 245 200],'enable','off');
set(edit2,'visible','on','position',[30 60 245 30]);
set(frame1,'position',[30 435 245 3]);
set(frame2,'position',[30 133 245 3],'visible','on',...
'backgroundcolor','black');
set(push1,'position',[230 150 45 28],'enable','off');
set(push2,'visible','on','position',[130 20 45 28]);
set(static1,'position',[30 400 245 20]);
set(static2,'position',[30 473 75 20]);
set(static3,'visible','on','position',[30 95 245 20]);
set(static4,'position',[28 144 100 28]);
set(static5,'position',[130 144 50 28]) if isempty(get(edit1,'string'))
% User tried to encode nothing! fprintf('\n\t\t No message entered, try again.\n\n') close(gcbf)
return end case 'done2'
% User has entered the key for use in encoding/decoding. en_or_de = get(checke,'value');
% Is user encoding or decoding? if en_or_de==1
% Encoding. key = get(edit2,'string'); if isempty(key)
% Check if user tried to encode with no KEY. fprintf('\n\t\t No key entered, try again.\n\n');
close(gcbf);
return end msg = get(edit1,'string');
[i j] = size(msg);
% Useful if user hit 'return' in MSG. if i >1 msg = reshape(msg',1,i*j);
% MSG should be 1 by n. end close(gcbf);
wrkd = encode(msg,key);
15

% Pass to encode function. if isempty(wrkd)


% User hit cancel when choosing a file. close(gcbf);
fprintf('\n\t\t Operation aborted.\n\n');
return
end
fprintf('\t\t\n Your message was encoded.\n\n');
else
% Decoding. key = get(edit2,'string');
if isempty(key)
% Check if user tried to dencode with no KEY.
close(gcbf) fprintf('\n\t\t No key entered, try again.\n\n') return
end
msg=decode(key);
% Pass to decode function. if isempty(msg)
% User hit cancel when choosing a file.
close(gcbf) fprintf('\n \t\t Operation aborted.\n\n') return
end
close(gcbf);
% New figure is created next to display MSG.
h_fig = figure('name','The Message','position',... [460 460 300 380],'menubar','none');
col=get(h_fig,'color');
stat = uicontrol(h_fig,'style','edit','position',... [30 40 245 300],'string',msg,'fontsize',9,...
'horizontalalignment','left','max',9,'min',1);%#ok
stat2 = uicontrol(h_fig,'style','text','position',... [30 355 245 20],
'string','Your Message:',... 'fontweight','bold','backgroundcolor',col,...
'horizontalalignment','left','fontsize',12);%#ok
End
case 'count'
% This is where the length of MSG is counted.
ch=get(gcbf,'currentcharacter');
if isempty(ch) || ch==13 return elseif ch==8 counter = get(edit1,'userdata')-1;
else counter = get(edit1,'userdata')+1;
% Retrieve current length. end set(edit1,'userdata',counter);
set(static5,'string',num2str(counter));
if counter > 990
% Issue a warning when getting close to limit.
set(static5,'foregroundcolor','red');
end end
% End switch
%----------New Function Starts Below------------- function success = encode(msg,key)
% ENCODE(msg,key) Encodes a text message using a key.
% This works by using the ascii number representation of the chars in
% KEY (and certain permutations) to create coordinate pairs that represent
% the places in matrix A (which is a submatrix of the pic matrix) where the
16

% unit alterations to the pic matrix will be made. I tried to make the
% code easy to follow, but I will respond to questions about how this
% works. num2add = 1000-length(msg);
% Number of spaces to add to end of MSG. if num2add < 0, error('This message is too long
to encode.'), end newmsg = [msg,repmat(' ',1,num2add)];
% 1000 chars always encoded. msgmat = dec2bin(newmsg)-48;
% Each row is a bin. rep. of an ascii char. [filen pth]=uigetfile({'*.bmp';'*.tif';'*.jpg'},
'Choose Image To Encode.');
if isequal(filen,0) || isequal(pth,0) success = [];
return % User cancelled.
end pic1 = imread([pth filen]);
B = pic1(:,:,1); [piclngth pichght] = size(B);
% Choose the first page.
dim1 = piclngth-2; dim2 = pichght-3;
keyb = key(end:-1:1);
rows = cumsum(double(key));
columns = cumsum(double(keyb));
% Coord pairs for KEY (rows,columns)
A = zeros(dim1,dim2);
% This matrix will house the hiding points.
A = crtmtrx(A,rows,columns,dim1,dim2,key);
idx = find(A==1);
% This same index will be used for pic matrix.
for vv = 1:1000 % This is the encoder.
for uu = 1:7 if msgmat(vv,uu)==1;
if rem(B(idx(uu+7*(vv-1))),2)==0
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))+1;
End
elseif rem(B(idx(uu+7*(vv-1))),2)==1
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))-1;
end end end newpic = pic1;
newpic(:,:,1) = B;
[filen pth] = uiputfile({'*.bmp';'*.tif'},'Save Encoded File As');
if isequal(filen,0) || isequal(pth,0) success = [];
return end
% User cancelled. imwrite(newpic,[pth filen]) success = 1;
%----------New Function Starts Below-------------
function msg = decode(key)
% DECODE(key) Decodes the message hidden by encode in pic, using key.
[filen pth] = uigetfile({'*.bmp';'*.tif'},'Choose Image To Decode.');
if isequal(filen,0) || isequal(pth,0) msg = [];
return end
% User cancelled.
pic2 = imread([pth filen]);
17

B = pic2(:,:,1);
[piclngth pichght] = size(B);
% Choose the top page.
dim1 = piclngth-2;
dim2 = pichght-3;
keyb = key(end:-1:1);
rows = cumsum(double(key));
columns = cumsum(double(keyb));
A = zeros(dim1,dim2);
% This matrix houses the hiding points.
A = crtmtrx(A,rows,columns,dim1,dim2,key);
idx = find(A==1);
msgmat = zeros(1000,7);
for vv = 1:1000
% This is the decoder.
for uu = 1:7 if rem(B(idx(uu+7*(vv-1))),2)==1 msgmat(vv,uu) = 1;
end end end msg = char(bin2dec(num2str(msgmat)))';
%----------New Function Starts Below-------------
function A = crtmtrx(A,rows,columns,dim1,dim2,key)
% Creates the matrix used to find the points to hide the message.
jj = 1;
idx = 1;
while 7000 > length(idx)
% Need 7000 points to hide 1000 characters.
for ii = 1:length(rows)
if rows(ii) < dim1 rows(ii) = rem(dim1,rows(ii))+1;
else
rows(ii) = rem(rows(ii),dim1)+1;
end
if columns(ii) < dim2 columns(ii) = rem(dim2,columns(ii))+1;
else
columns(ii) = rem(columns(ii),dim2)+1;
end
A(rows(ii),columns(ii)) = 1;
end
rows = jj*cumsum(double(columns))+round(dim2/2);
% Each pass is diff.
columns = jj*cumsum(double(rows))+round(dim1/2);
if jj > ceil(7000/length(key))+2
% Estimate how many iters. needed.
idx = find(A==1); end jj = jj+1;
end [28]
18

Image Steganography Survey [21]

Year: 2007
Author: Nameer N. EL-Emam.
Title: Hiding a Large Amount of Data with High Security Using Steganography Algorithm.
Approach: Concept based on both visual and statistical.
Method: This study deals with constructing and implementing new algorithm based on hiding
a large amount of data (image, audio, text) file into color BMP image. Using adaptive image
filtering and adaptive image segmentation with bits replacement on the appropriate pixels.
These pixels are selected randomly rather than sequentially by using new concept defined by
main cases with their sub cases for each byte in one pixel. This concept based on both visual
and statistical. According to the steps of design, concluding 16 main cases with their sub cases
that covers all aspects of the input data into color bitmap image. High security layers have been
proposed through three layers to make it difficult to break through the encryption of the input
data and confuse steganalysis too. Our results against statistical and visual attacks are discussed
and make comparison with the previous Steganography algorithms like S-Tools. We show that
our algorithm can embed efficiently a large amount of data that has been reached to 75% of the
image size with high quality of the output.
Result: Embed efficiently a large amount of data.

Year: 2008
Author: Jae-Gil Yu1.
Title: A New Image Steganography Based on 2k Correction and Edge- Detection.
Approach: Spatial domain technique.
Method: In this paper, proposing a new image steganography scheme which is a kind of spatial
domain technique. In order to hide secret data in cover-image, using the just noticeable
difference (JND) technique and method of contrast sensitivity function (CSF). This is an edge-
detection which uses part information of each pixel-value. In order to have better
imperceptibility, proposing a mathematical method which is the 2k correction. Proposed
scheme can embed more data than previous schemes, and shows better imperceptibility. To
prove this scheme, performing several experiments, and compared the experimental results
with the related previous works.
Result: Shows better interceptability.

Year: 2008
Author: Elshoura, S. M.; Megherbi, D.B.
Title: A New Image Steganography Based on 2k Correction and Edge- Detection.
Approach: Using T chebi chef moments.
Method: The covert image itself is not secret, instead a key is generated and the key is hidden
in the cover image. Using the key the secret image can be extracted. So it is very safe and
robust because no one can recognize the hidden information and it cannot be vanished due to
noise or any signal processing operations.
19

Keywords - Steganography, secret key, image processing, data retrieval.


Result: Provide High security.

Year: 2011
Author: Anupam Mondal, Sudipta Sahana, Sainik Kumar Mahata.
Title: A Pictorial Block Steganography based Secure Algorithm for Data Transfer.
Approach: Secure pictorial block steganography based encryption and decryption algorithm.
Method: A secure pictorial block steganography based encryption and decryption algorithm is
proposed to impose the concept of secrecy over privacy for transferring text messages.
Result: Secrecy over privacy for transferring text messages.

Year: 2012
Author: G. Karthigai Seivi, Leon Mariadhasan, K. L. Shunmuganathan.
Title: Steganography Using Edge Adaptive Image.
Approach: Novel LSB image steganography algorithm.
Method: In the proposed system there are certain areas which are suitable for hiding the
payload are called Edges. Edges are good Regions of Interest or ROIs that are used for
steganography. The proposed system uses edge adaptive image steganography that uses the
combinations of chaotic cat mapping to provide additional security and matrix encoding and
LSBM to embed the data in to image. The proposed mechanism guaranties the high
imperceptibility and Fidelity which are the two important requirements for any Image
steganography.
Result: Effectively resist image steganalysis.

Year: 2012
Author: Neda Raftari and Amir Masoud Eftekhari Moghadam.
Title: Digital Image Steganography Based on Integer Wavelet Transform and Assignment
Algorithm.
Approach: Based on Integer Wavelet Transform (IWT) and Munkres' assignment algorithm.
Method: In this paper a novel image steganography technique that combines the Integer
Wavelet Transform (IWT) and Discrete Cosine Transform (DCT) is proposed. It embeds secret
image in frequency domain of cover image with high matching quality by using Munkres'
assignment algorithm. Also, embedding the secret image in different coefficients of cover
image bands such as horizontal detail, vertical detail and diagonal detail and observe the effect
of embedding on the performance of stego image in terms of Peak Signal to Noise Ratio
(PSNR), Mean Structural Similarity Index Measure (SSIM), Histogram Error (HE).
Experimental results depict that stego image and extracted secret image could have high visual
quality and they are perceptually similar to their original versions. In addition, this method
shows high robustness against six different attacks. Also, our method is examined with wavelet
based steganalysis algorithm. The results prove the effectiveness and benefits of the proposed
method.
Result: Embeds secret image in frequency domain of cover image with high matching quality

Future Scopes
20

To reduce the extra data in the stego-images, We have to compress the size of ”Key matrix” as
far as possible. Some novel coding schemes are available for this kind of problem. As a result,
the file sizes of the original image and that of the corresponding stego-image will not differ too
much. Another issue is to efficiently integrate the proposed scheme in the JPEG2000 flow
which is based on DWT(Discrete wavelet transform) as well. [25]

Steganography will continue to increase in popularity over cryptography. As it gets more and
more advanced as will the steganalysis tools for detecting it. At the time though most of the
tools can detect the files hidden in any image. It is well accepted though, small sentences and
one-word answers example a „yes‟ are virtually impossible to find. This could be an area for
further advances as possible compression sizes decreases further. There also seems very little
in terms of tools for hiding data in videos. There are some for audio, but this is still an area,
which lags behind image steganography. The future may see audio files and video streams that
could possibly be decoded on the fly to form their correct messages. [26]

References

[1] Islam, Saiful, Mangat R. Modi, and Phalguni Gupta. "Edge-based image steganography."
EURASIP Journal on Information Security 2014.1 (2014): 8.

[2] Luo, Weiqi, Fangjun Huang, and Jiwu Huang. "Edge adaptive image steganography based
on LSB matching revisited." IEEE transactions on information forensics and security 5.2
(2010): 201-214.

[3] R.J. Andersen and Petitcolas, F.A.P., "On the limits of steganography," IEEE Journal of
Selected Areas in Communications, Special Issue on Copyright and Privacy Protection 16 No.4
(1998) 474−481.

[4] Fridrich, Jessica, Miroslav Goljan, and Rui Du. "Detecting LSB steganography in color,
and gray-scale images." IEEE multimedia 8.4 (2001): 22-28.

[5] Johnson, N.F. & Jajodia, S., “Exploring Steganography: Seeing the Unseen”, Computer
Journal, February 1998

[6] “Reference guide: Graphics Technical Options and Decisions”,


http://www.devx.com/projectcool/Article/19997

[7] Owens, M., “A discussion of covert channels and steganography”, SANS Institute, 2002

[8] Morkel, Tayana, Jan HP Eloff, and Martin S. Olivier. "An overview of image
steganography." ISSA. 2005.
21

[9] M. Wu, E. Tang, and B. Lin, Data hiding in digital binary image, Proc. of 2000 IEEE
International Conference on Multimedia and Expo, vol. 1, pp. 393-396, 2000.

[10] G. Liang, S. Wang, and X. Zhang, Steganography in binary image by checking data-
carrying eligibility of boundary pixels, Journal of Shanghai University, vol. 11, no. 3, pp. 272-
277, 2007.

[11] F. Cayre and B. Macq, Data hiding on 3-d triangle meshes, IEEE Trans. Signal Processing,
vol. 51, no. 4, pp. 939-949, 2003.

[12] Jessica Fridrich, Miroslav Goljan, and Rui Du, Reliable detection of lsb steganography in
color and grayscale images. Proc. of 2001 ACM workshop on Multimedia and security: new
challenges, pp. 27-30, ACM Press, 2001.

[13] Li, Bin, et al. "A survey on image steganography and steganalysis." Journal of Information
Hiding and Multimedia Signal Processing 2.2 (2011): 142-172.

[14] Hamid, Nagham, et al. "Image Steganography Techniques: An Overview." International


Journal of Computer Science and Security (IJCSS) 6.3 (2012): 168.

[15] Hariri, Mehdi, Ronak Karimi, and Masoud Nosrati. "An introduction to steganography
methods." World Applied Programming 1.3 (2011): 191-195.

[16] Sheth, Ravi K., and Rashmi M. Tank. "Image Steganography Techniques." International
Journal Of Computer Engineering And Sciences 1.2 (2015): 10-15.

[17] Simmons, G., “The prisoners problem and the subliminal channel”, CRYPTO, 1983

[18] Chandramouli, R., Kharrazi, M. & Memon, N., “Image steganography and steganalysis:
Concepts and Practice”, Proceedings of the 2nd International Workshop on Digital
Watermarking, October 2003

[19] Anderson, R.J. & Petitcolas, F.A.P., “On the limits of steganography”, IEEE Journal of
selected Areas in Communications, May 1998

[20] Eastman, J. Ronald. "Guide to GIS and image processing Volume." Clark University,
USA (2001).

[21] Jain, Ruchi. "An Extensive Survey on Image Steganography." International Journal of
Emerging Technology and Advanced Engineering 4.3 (2014): 674-679.

[22] Andreas Westfeld , Andreas Pfitzmann, Attacks on Steganographic Systems, Proceedings


of the Third International Workshop on Information Hiding, p.61-76, September 29-October
01, 1999
22

[23] Johnson, N. and Jajodia, S. Exploring steganography: Seeing the unseen. IEEE
Computer. 31, 2 (Feb. 1998), 26–34.

[24] Thiyagarajan, P., G. Aghila, and V. Prasanna Venkatesan. "Stego-Image Generator (SIG)-
Building Steganography Image Database." Advances in Digital Image Processing and
Information Technology. Springer Berlin Heidelberg, 2011. 257-267.

[25] Chen, Po-Yueh, and Hung-Ju Lin. "A DWT based approach for image
steganography." International Journal of Applied Science and Engineering 4.3 (2006): 275-
290.

[26] Sharma, Vipul, and Sunny Kumar. "A new approach to hide text in images using
steganography." International Journal of Advanced Research in Computer Science and
Software Engineering 3.4 (2013).

[27] Gupta, Shailender, Ankur Goyal, and Bharat Bhushan. "Information hiding using least
significant bit steganography and cryptography." International Journal of Modern Education
and Computer Science 4.6 (2012): 27.

[28] Kumari, Manju, and Monika Kumari. "Steganography: the art of hiding text in image using
matlab." International Journal of Advanced Research in Computer Science 4.8 (2013).

Utathya Chatterjee
MSc, 4th Semester, 16

You might also like