Download Full report for the above Electronics Seminar Topics ...

wanderooswarrenAI and Robotics

Nov 21, 2013 (3 years and 6 months ago)

75 views

Paper on

A PIXEL REPLACEMENT TECHNIQUE

USING

STEGANOGRAPHY

-
A HIGH LEVEL SECURITY THROUGH OBSCURITY
-


CONTENTS:

1. ABSTRACT

2. STEGANOGRAPHY DEFINITION

3. HISTORY OF STEGANOGRAPHY

4. STEGANOGRAPHY TYPES


4.1 Physical Steganography


4.2 Digital Steganography


4.3 Blog Steganography


4.4 Printed Steganography

5. STEGANOGRAPHY TECHNIQUES


5.1 EMBEDDING A FILE


5.2 STGANALYSIS

6. DRAWBACKS OF CURRENT TECHNIQUE

7. PIXEL REPLACE
MENT TECHNIQUE


7.1 THE ALGORITHM

8. IMPLEMENTATION

9. ADVANTAGES

10. FUTURE STEGANOGRAPHY

11. CONCLUSION














































1. ABSTRACT:


As we know, the field of cryptography has got more
attention nowadays. More and more complex techniques
for encrypting the information are proposed every now
and then. But, as usual, when a small step is made to
improve the security, more work is done in
the opposite
direction by the hackers to break it. Thus they are able to
attack most of these algorithms and that too, successfully.

So, to deceive the hackers, people have started to follow a
technique called ‘Steganography’. It is not an entirely
new tec
hnique and has been in the practice from ancient
times. In this method, the data is hidden behind
unsuspecting objects like images, audio, video etc. so that
people cannot even recognize that there is a second
message behind the object. Images are commonly

used in
this technique.

In this paper, we have proposed a technique for hiding
data secretly behind images. The existing techniques for
image Steganography have some serious drawbacks and
we have tried to overcome those with ours. Here, the
pixels in the
images are replaced with the new ones,
which are almost identical to the old ones, in a manner
that can be used to retrieve back the hidden data.

2. STEGANOGRAPHY:

Steganography is a term used to describe files that have
other types of files secretly
embedded inside. Usually,
when we talk about Steganography, we mean the
embedding of a text file, or a secret message, inside an
image. Not only is the message itself hidden, but the fact
that a message exists is hidden. It is in this way that
steganograph
y is a method of concealing the fact that
communication is taking place in addition to actually
concealing a file.

“The goal of Steganography is to hide messages inside
other harmless messages in a way that does not allow any
enemy even to detect that ther
e is a second secret message
present.”

The advantage of steganography over
cryptography

is
that messages do not attract attention to themselves.
Plainly visible encrypted messages
. No matter how
unbreakable and will arouse suspicion, and may in
themselves be incriminating in countries where
encryption

is illegal. Therefore, whereas cryptography
protects the con
tents of a message, steganography can be
said to protect both messages and communicating parties.

3. HISTORY:

The first recorded uses of steganography can be traced
back to 440 BC when
H
erodotus

mentions two examples
of steganography in
The Histories of Herodotus
.
Dem
aratus

sent a warning about a forthcoming attack to
Greece by writing it directly on the wooden backing of a
wax tablet before applying its beeswax surface.
Wax
tablets

were in common
use then as reusable writing
surfaces, sometimes used for
shorthand
. Another ancient
example is that of
Histiaeu
s
, who shaved the head of his
most trusted slave and tattooed a message on it. After his
hair had grown the message was hidden. The purpose was
to instigate a revolt against the Persian.


But now in digital era the term steganography is
used in

computer communications. And provides high
vulnerablity to attacks.

4. STEGANOGRAPHIC TY
PES:


4.1 PHYSICAL STEGANO
GRAPHY:

Hidden messages on paper written in
secret inks
, under
other messages or on the blank parts of other messages.

Messages written in morse code on knitting
yarn

and then
knitted into a piece of clothing worn by a courier.

Messages written on t
he back of
postage stamps
.



4.2 DIGITAL STEGANOG
RAPHY:

Modern steganography entered the world in 1985 with the
advent of the personal computer applied to classical
steganograph
y problems. Development following that was
slow, but has since taken off, going by the number of
'stego' programs available: Over 725 digital
steganography applications have been identified by the
Steganography Analysis and Research Center.

Content
-
Aware
Steganography hides information in the
semantics a human user assigns to a datagram. These
systems offer security against a non
-
human
adversary/warden.

4.3
BLOG
-
STEGANOGRAPHY:


Messages are fract
ionalized and the (encrypted) pieces
are added as comments of orphaned web
-
logs (or pin
boards on social network platforms). In this case the
selection of blogs is the symmetric key that sender and
recipient are using; the carrier of the hidden message is
the whole
blogosphere
.

4.4 PRINTED STEGANOG
RAPHY:

Digital steganography output may be in the form of
printed documents. A message, the
plaintext
, may be first
encrypted by traditional means, producing a
ciphertext
.
Then, an innocuous covertext is modified in some way to
as to contain the
ciphertext, resulting in the stegotext. For
example, the letter size, spacing,
typeface
, or other
characteristics of a covertext can be manipulated to carry
the hidden message. Only a reci
pient who knows the
technique used can recover the message and then decrypt
it.
Francis Bacon

developed
Bacon's cipher

as such a
technique.


5. STEGANOGRAPHIC TE
CHNIQUES IN
COMPUTERS:


How Steganography is done in terms of computers? There
are several ways, some of which become very
complicated to understand.

The steganographic techniques in computer
s involve



Embedding a file



Steganalysis


5.1 EMBEDDING A FILE
:


LEAST SIGNIFICANT BI
T
STEGANOGRAPHY:


One simple method is LSB, or Least
Significant Bit Steganography. An image is nothing more
than strings and strings of bytes, each byte representing a
different color. The last few bits in a color byte, however,
do not hold as much signif
icance as the first few. This is
to say that two bytes that only differ in the last few bits
can represent two colors that are virtually
indistinguishable to the human eye. For example,
00100110 and 00100111 can be two different shades of
red, but since it

is only the last bit that differs between the
two, it is impossible to see the color difference. LSB
Steganography, then, alters these last bits by hiding a
message within them.















REAL PIXEL

EMBEDDED
PIXEL


COLOR COLOR





LSB



REPLACED PIXELS (NOT VISIBLE
COMMONLY)


DISCRETE COSINE TRAN
SFORM
STEGANOGRAPHY:


Another method of steganography involves
using the DCT (Discrete Cosine Transform) coefficients
in JPEG files. DCT coefficients are more frequently
thought of as being used for JPEG compression, but they
come into play in steganograph
y as well. In a JPEG file,
the image is made up of these coefficients, and when a
file is steganographically embedded into a JPEG image,
the relation of these coefficients is altered. Instead of
actual bits being changed like in LSB steganography, it is
th
e relation of the coefficients to one another that is
altered, holding a secret message.


5.2 STEGANALYSIS:





Stegananalysis means the way a
stegonagraphic

image is detected. Remember, it is not just
the message within the image that is being searched; it is
the fact that a hidden file

exists within the image that is most important to find.
Stegananalysis can sometimes (but, very rarely) be done
using visual

detection. Visual detection simply means
using ones eye to literally look at the image to see if any
visible changes have occurred. Since the original image is
almost never known, however, it proves difficult to
compare an image with an embedded file with

what it
looked like beforehand. This task of simple visual
detection is easier, however, if there is not a gradual
change of color in the image.


Statistical analysis is what is frequently used in
steganography detection. This is done using advanced
sta
tistics techniques. Basically what is done is the color
pairs in an image are measured, meaning it is observed
how close each color in the image to its adjacent color.
These two colors, which do not differ greatly, are known
as a close color pair. In a ste
ganographic image, the
occurrence of each individual color approaches the
occurrence of its color pair. This is to say that the
individual colors become less different when a file is
embedded into the image. The occurrences of these colors
are measured usi
ng statistics.


RQP (RAW QUICK PAIRS
) METHOD:


One specific technique is the RQP (Raw
Quick Pairs) Method. In this method, the ratios between
the close color pairs and all color pairs are measured in an
image. Then, a message is deliberat
ely embedded in the
image and the same measurements are taken again. If
there is a large difference between the two measurements,
then it is unlikely a message has been embedded in the
original.


Observe the following two images [FIGURE 2]. The one
on the
left is the original image, and the one on the right is
the same image with a text file embedded in it. The
change is easy to detect visually, since the color changes
in the original image are not gradual. When there is a
noticeable contrast between the co
lors, it becomes easier
to detect an embedded file.





A.ORGINAL IMAGE



B.EMBEDDED IMAGE

FIGURE
-
2

6. DRAWBACKS IN THE CURRENT
TECHNIQUES:



Extremely liable to attacks like Image
Manipulation techniques where the pixels wil
l be
scanned for a possible relation which will be
used to trace out the actual characters.



Only 24 bit messages are suitable and 8 bit
images are to be used at great risk.



Extreme Care needs to be taken in the selection
of the cover image, so that changes

to the data
will not be visible in the stego
-
image.



Commonly known images, such as famous
paintings must be avoided.


7. THE PIXEL REPLACEMENT TECHNIQUE:

Because of the drawbacks in the currently followed
techniques, we propose a new technique for hiding
data in
images. Here, we replace the existing pixels in the image
with the new ones in such a way that no difference is
visible between the steganographed and the original
image.

7.1 THE ALGORITHM:

Encoding:


The Algorithm used for encoding in this
technique can be described with the

following steps.

1. Get the Image, Message to be hidden and the Password.

2. Encrypt the message and the password.

3. Move some rows below the first row in the
image and
fix a reference position near the left edge for odd
characters and near the right for even characters.



4. For each character in the original data do find a
position corresponding to that character search the
surrounding pixels and find a pixel value closer to all of
them replace the current pixel and the reference p
ixel with
this value move to the next row.


5. Set a pixel value as a threshold.

6. Repeat steps 4 and 5 for the Password from t
he bottom
of the image.




Decoding:


The Algorithm for retrieving the original
message from the steganographed image follows this
sequence.


1. Get the Image and the Password.

2. Move to the bottom row in the image where password
hi
ding starts.

3. Find the value of the reference pixel.

4. Search the entire row for the same pixel value.

5. Find the position of that pixel and decode the character.

6. Repeat steps 3 thro 5 till the threshold is reached.

7. Concatenate all the characters

found so far (Actual
Password).

8. If the found password does not match the given
password return as error.

9. Move to the top row in which the first character of
original data was stored.

10. Repeat the sequence followed in steps 3 to 7 to get the
origin
al message.

11. Display the result.





8. IMPLEMENTATION:



With the algorithm described in brief, let
us describe the pixel replacement


technique in detail. First, we shall see how the original
message and the password are hidden into the image and
then we’ll discuss how to retrieve message for the
authorized
person who knows the correct password.

STEP 1: Encrypting the Message & Password:


First, the original message and the password
are got from the user. Then, they are encrypted using any
of the encryption algorithms like RSA, DES etc. Thi
s
encryption step is an additional safety feature added to the
technique to ensure maximum safety. Then, this
encrypted message is fed as the input to the next step.

Original message: “GOD IS GREAT”

Encryption type : RSA or DES

After encryption : “TAERG
SI DOG”

Image:




STEP 2: Choosing a position to hide the character:


The actual process of Steganography starts
here. The Image is scanned from the top row


wise. First
few rows are omitted and a suitable row is reached. The
message is

split into individual characters. The following
process is repeated for all the characters in the message. A
position for hiding the character is chosen according to
some relation with that character. The relation can be
something like the ASCII value of t
he character, the order
of occurrence of that character in the Alphabetical or
Reverse order if it is an alphabet etc.


For example, the position of the character ‘G’
can be chosen as:


ASCII Value of ‘G’ =

71,

So, position = 71


50 = 19.

(Only e.g. any value instead of 50 can be used)


[Image splited into pixels]




Pixels where data is stored


STEP 3: Finding a Suitable Color:


Once a position is chosen, the values o
f all the
pixels surrounding the pixel in that position are found.
Since this position is usually not near the edge of the
image, there will be 8 pixels surrounding it. A pixel value,
i.e., a color, is chosen so that it does not differ much from
those of t
he 8 pixels. This is the most difficult step in the
whole process. The value will differ only by a small
value. Such a small change in the color will be
indiscernible to the users.


STEP 4: Replacing the pixels:


Now, with the color to be r
eplaced being found,
it’s time to replace the pixels with the new color. A
position near to the left side of the row is fixed as the
reference position for the odd numbered character i.e., the
1st, 3rd, 5th character and so on. Similarly, for the even
numb
ered characters, a position close to the right side of
the row is selected as the reference position. These
reference positions are the same for all the characters.
When the reference position is chosen, the pixel in that
position is replaced with the new
color. Then, the pixel in
the already found position for the character (in our e.g.,
this is 19) is also replaced with the new color.



STEP 5: Setting a Threshold:


The final step in hiding the message is to set a
threshold pixel in a fixed position to indicate the end of
the encrypted message. This is essential for decoding the
message from the image. Otherwise, we cannot find the
end of the message.


STEP 6: Hiding the Password:


The same steps of choosing the color, replacing
the pixels and setting a threshold are repeated for hiding
the password but the only difference is that the image is
scanned row


wise from the last row inste
ad of from the
first row.


STEP 7: Retrieving the Message:


The process of retrieving the original message
from the steganographed image is similar to that of the
hiding process except in the reverse order. First, the
password is got from
the user. The image is scanned from
the last row and the row in which the password hiding
started is reached. The reference pixel value is found and
the position of that color in that row is noted. Then, again
the relation used previously for finding the p
osition is
used to get the original character. This can be explained
as:

If the position is 19, then

19 + 50 = 71,

The character of ASCII value 70 is ‘G’.

Similarly, the other characters are found till the threshold
is reached and all of them are concatena
ted to get the
original password. Now, the given password and the
original are checked and if they match, then further
processes are done, otherwise, an error message is
displayed.

If the password matches, then the image is scanned from
the top and the sta
rting row from where the data hiding
started is reached. The same steps of finding the reference
pixel and the position of the other pixel are repeated again
till the threshold. Then, all the characters are joined and
the original message is displayed.

9.
ADVANTAGES OF PIXEL REPLACEMENT
TECHNIQUE:



Cost of cracking the hidden message is
extremely high.



The data cannot be easily decoded without the
key using Image Manipulation techniques.



Any type of image, 8 or 24 bits can be used.



There is no increase in th
e size of the image due
to data in it.



There are no constraints on the choice of the
image.

10. FUTURE OF STEGAN
OGRAPHY:




Steganography is still a fairly new idea.
There are constant advancements in the computer field,
su
ggesting advancements in the field of steganography as
well. It is likely that there will soon be more efficient and
more advanced techniques for steganalysis. A hopeful
advancement is the improved sensitivity to small
messages. Knowing how difficult it is

to detect the
presence of a fairly large text file within an image,
imagine how difficult it is to detect even one or two
sentences embedded in an image! It is like finding a
microscopic needle in the ultimate haystack. What is
scary is that such a small
file of only one or two sentences
may be all that is needed to commence a terrorist attack.
In the future, it is hoped that the technique of steganalysis
will advance such that it will become much easier to
detect even small messages within an image.

11. C
ONCLUSION:

To overcome the drawbacks in the existing cryptography
and Steganography

Techniques, we have proposed a new technique for hiding
data in images. This technique is less prone to attacks and
since the data is strongly encrypted and the cost of
retrieving it by unauthorized persons is extremely high.
Since the pixels are replaced with almost identical pixels,
it is difficult even to identify that there is a second
message hidden. So, we hope that this technique will be
used widely in the future.

REFERENCES

[1]. “Steganography” by Markus Kahn, Steganography
Mailing List.

[2]. “Network and Internetwork
Security” by William
Stallings,Addison
-
Wesley.

[3]. “Steganography” by Dorian A. Flowers Xavier,
University of Louisiana

[4]. http://www.thur.de/ulf/
stegano

[5]. http://www.cs.uct.ac.za

[6]. http://www.jjtc.com/stegdoc

[7]. “Privacy on the net
-

steganography”, Michael
Berkowitz.