Anda di halaman 1dari 39

Chapter 1

Introduction

1.1

Steganography

Steganography [34] is the art of hiding information within innocuous cover carriers in ways such
that the hidden message is undetectable. In Greek, stego means covered or secret and
graphy means to write and therefore, steganography becomes covered or secret writing.
The information to be hidden is embedded into the cover object which can be a text matter, some
image, or some audio /video file in such a way that the very existence of the message is
undetected by maintaining the appearance of the resulted object exactly same as the original. The
main goal of steganography is to hide the fact that the message is present in the transmission
medium.

1.2

Steganography vs. Cryptography:

Cryptography [35] is the science of encrypting data in such a way that one cannot understand the
encrypted message, whereas in steganography the mere existence of data is concealed, such that
even its presence cannot be noticed. Using cryptography might raise some suspicion whereas in
steganography the existence of secret message is invisible and thus not known. We can think of
steganography as an extension of cryptography, and it is commonly used under the
circumstances where encryption is not allowed.

1.3 Types of steganography


On the basis of cover object steganography may be of many types like Audio Steganography,
Video Steganography, image Steganography etc. Image Steganography is very popular because
of popularity of digital image transmission over the internet. Image Steganography use
redundancy of digital image [2, 11] to hide the secret data. It may be divided into two categories.
They are spatial-domain methods and frequency-domain ones. In the spatial domain, the secret
messages are embedded in the image pixels directly. In the frequency-domain, however, the
1

secret image is first transformed to frequency-domain, and then the messages are embedded in
the transformed.

1.3.1 Spatial domain Techniques:


Least Significant Bit (LSB) substitution- LSB substitution [3, 4] method, which uses
fixed k LSBs in each pixel to embed secret message, is the easiest method to hide
message in an image. However, it is easy to reveal a stego-image produced by the LSB
insertion method.
Distortion technique- In distortion technique some pixel property of cover image is
changed according to secret message and then deflection of distorted from original image
contains secret information.

1.3.2 Transform domain techniques:


If we embed information in spatial domain, it may be subjected to the losses if the image
undergoes any image processing technique like compression, cropping etc. To overcome
this problem we embed the information in frequency domain such that the secret
information is embedded on the significant frequency values while higher frequency part
is omitted. We first apply transformations to the image then data is to be hidden by
changing the values of the transformation coefficients accordingly.
There are mainly three transformation techniques:
Fast Fourier Transform (FFT) Steganography- In this technique two dimensional FFT
is used to convert the cover image into transform domain first and then secret bits are
embedded on the significant coefficients. FFT includes complex term also, hence it
computes more mathematical computations and time complexity is higher than DCT
steganography.
Discrete Cosine Transform (DCT) Steganography- In this technique two dimensional
DCT is used for transformation of cover image [5, 6]. DCT is derived from the FFT,
however it requires fewer multiplications than the FFT since it works only with real
2

numbers. Also, the DCT produces fewer significant coefficients in its result, which leads
to greater compression. Hence DCT is the popular technique in the field of steganography
[17].
If after DCT transformation, quantization step is also taken as in Joint Photographic
Experts Group (JPEG) compression [1] then it becomes robust to JPEG compression and
this technique is called as JPEG steganography [26].
Discrete Wavelet Transform (DWT) Steganography- In this technique DWT [9-12] is
used to separate high frequency components from low frequency components and then
replacing the high frequency part by secret data. The embedding capacity of this
technique is far greater than DCT steganography [23].

1.4

Challenges in Steganography

The major challenges of effective steganography are:Security of Hidden Communication: In order to avoid raising the suspicions of
eavesdroppers, while evading the meticulous screening of algorithmic detection, the
hidden contents must be invisible both perceptually and statistically. Steganography
techniques should produce high imperceptible Stego-image.
Size of Payload: Unlike watermarking, which needs to embed only a small amount of
copyright information, steganography aims at hidden communication and therefore
usually requires sufficient embedding capacity. Requirements for higher payload and
secure communication are often contradictory. Depending on the specific application
scenarios, a tradeoff has to be sought.
Robustness: Stego-image should provide robustness to image processing techniques like
compression, cropping, resizing etc. i.e. when any of these techniques are performed on
stego-image, secret information should not be destroyed completely.
There is no technique of steganography which provide all the three properties at high level.
There is a trade-off between the capacity of the embedded data and the robustness to certain
attacks, while keeping the perceptual quality of the stego-medium at an acceptable level. It is not
3

possible to attain high robustness to signal modifications and high insertion capacity at the same
time [30].

1.5

Objective of the project

In this project my task is to implement 2 techniques of spatial domain steganography(LSB


substitution) and 2 techniques of

JPEG steganography (Jsteg and Steghide) taking secret

information as a data file and as an image and to do comparisons between them in terms of
embedding capacity and quality of produced stego-image and robustness to attacks.

1.6

Tool Used:

MATLAB is used as simulator to implement the techniques of steganography. MATLAB


provides highly computing environment and advanced in-built function for image processing.

1.7

Performance evaluation matrices

The parameters under which the performance of the Steganography Techniques is obtained are
as follows:1. Embedding Capacity:
It is the maximum size of the secret data that can be embed in cover image
without deteriorating the integrity of the cover image. It can be represented in
bytes or Bit Per Pixel(bpp).
2. Mean Square Error (MSE):
It is defined as the square of error between cover image and stego-image [33].
The distortion in the image can be measured using MSE and is calculated using
Equation 1.

Where:
The intensity value of the pixel in the cover image.
4

(1)

: The intensity value of the pixel in the stego image.


M*N: Size of an Image.
3. Peak Signal Noise Ratio (PSNR):
It is defined as the ratio of peak square value of pixels by MSE. It is expressed in
decibel. it measures the statistical difference between the cover and stego-image,
is calculated using Equation 2.
.(2)
4. Histograms:
Histogram is a measure of the number of occurrence of pixels with respect to
particular pixel value [29]. During embedding pixel value changes hence number
of pixel having a particular pixel value changes. These changes can be used to
detect steganography. Hence lesser the difference of histograms of cover and
stego-image indicates more resistivity to detect.

1.8

Achievements

The aim of this project work was to implement various spatial and transform domain
steganographic techniques. The following achievements or we can say objectives were achieved
as follows:

Spatial domain techniques are easy ways to embed information, but they are highly
vulnerable to even small cover modifications.

The embedding capacity of Jpeg steganography is very less than spatial domain
techniques.

The spatial domain techniques provide high PSNR, high perceptual quality and high
embedding capacity but these not provide robustness.

Transform domain provide robustness while providing very less embedding capacity, low
PSNR and low perceptual quality.

1.9

Organization of Report

The remaining part of the project is organized into four chapters.


Chapter 2: The Spatial Domain techniques of steganography are explained. The two
techniques, LSB substitution and distortion, are explained with algorithm.
Chapter 3: first of all the JPEG compression which is the necessary step of JPEG
steganography, is explained. Then various techniques of JPEG steganography are
described. Two techniques which are implemented in project (Jsteg and Steg-Hide) are
explained with algorithms.
Chapter 4: simulation parameters and results of these four techniques are analyzed
Chapter 5: include the concluding remarks of various results and the future scope of the
project. In the end references of research papers and books are included.

Chapter 2
Spatial Domain Steganography Techniques

2.1

LSB Substitution:

This is the most common method used. In this type, the data to be hidden is inserted into the least
significant bits of the pixel information. Increase or decrease of value by changing the least
significant bit doesnt change the appearance of the image, such that the resulted stego-image
looks exactly same as the cover image.
A more sophisticated approach is the use of a pseudorandom number generator [13-14] to
spread the secret message over the cover in a rather random manner; a popular approach is the
random interval method. If both communication partners share a stego-key k usable as a seed for
a random number generator, they can create a random sequence k1,.., kl(m) and use the
elements with indices
J1 = k1
Ji = ji-1 + ki,

i 2

for information transfer. Thus, the distance between two embedded bits is determined pseudo
randomly. Since the receiver has access to the seed k and knowledge of the pseudorandom
number generator, he can reconstruct ki and therefore the entire sequence of element indices ji.
If the message size increases, collisions must be taken into account. To overcome the
problem of collisions, we keep track of all cover bits which have already been used for
communication in a set B. If during the embedding process one specific cover-element has not
been used prior, we add its index to B and continue to embedding. If, however, the index of the
cover-element is already contained in B, we discard the element and choose another coverelement pseudo randomly. At the receiver side, similar technique is to be followed.
These classic LSB steganography have a common weak point. The sample value changes
dissymmetrically. When the LSB of cover medium sample value is equal to the message bit, no
change should be made. Otherwise, change the value 2n to 2n+1 or 2n+1 to 2n. But the changes
7

from 2n to 2n-1 or from 2n+1 to 2n+2 will never emerge. This dissymmetry is utilized by
steganalysis such as Chi-square analysis [16] and RS pair analysis [19-20].
In this project LSB with pseudo random generator is implemented.

Matlab inbuilt

pseudo-random number generator is used for this purpose and seed to this is taken as key of
steganography. First of all an array of random numbers, with the length equal to secret bitstream, is generated using key. Then with the help of this array, different pixel positions are
calculated. Now secret bits are embedded to LSB of these pixels. The algorithm for embedding
process is as below:

Embedding Algorithm:

Input: cover image, key, secret message


Procedure:
Step1: Convert the secret message into bit stream (Length L)
Step2: Generate L number of pseudo random number using seed key
Step3: Calculate the non-collide L pixel positions in the cover image
Step4: while complete bit stream not embedded
{

Replace LSB of pixel denoted by ith pixel position, with secret bit
Insert pixel into cover image

}
End
Output: Stego-image

On the receiver side, first of all the pixel positions are calculated in the same way with the use of
the same key. Then secret bit-stream is formed by the LSBs of these pixels. The Extraction
algorithm is as below:

Extraction Algorithm:

Input: stego-image, key


Procedure:
Step1: Convert the secret message into bit stream (Length L)
Step2: Generate L number of pseudo random number using seed key
Step3: Calculate the non-collide L pixel positions in the cover image
Step4: for i=1 to L
{

Get lsb of pixel denoted by ith pixel position


Append this lsb into secret bit stream

}
Step5: Convert secret bit stream into secret message
End
Output: secret message

Advantages:

There is less chance for degradation of the original image.

More information can be stored in an image i.e. hiding capacity is more.

Simple and less complex.

Disadvantages:

Less robust, the hidden data can be lost with image manipulation.

Hidden data can be easily detected by simple attacks.

Requirement of high transmission rate due to large size of stego image.

2.2

Distortion:

Distortion techniques [10] require the knowledge of the original cover in the decoding process.
We apply a sequence of modifications to a cover in order to get a stego-image in such a way that
it corresponds to a specific secret message for embedding. Receiver measures the differences to
the original cover in order to reconstruct the sequence of modifications applied by sender, which
corresponds to the secret message.
Using a similar approach as in LSB, the sender first chooses l(m) different cover-pixels
he wants to use for information transfer. Such a selection can again be done using pseudorandom
number generators or pseudorandom permutations. To encode a 0 in one pixel, the sender leaves
the pixel unchanged; to encode a 1, he adds a random value x to the pixel's color. Although this
approach is similar to a substitution system, there is one significant difference: the LSB of the
selected color values do not necessarily equal secret message bits. In particular, no cover
modifications are needed when coding a 0. Furthermore, x can be chosen in a way that better
preserves the cover's statistical properties.
The receiver compares all l(m) selected pixels of the stego-object with the corresponding
pixels of the original cover. If the ith pixel differs, the ith message bit is a 1, otherwise a 0.
In this project the value of x is taken as 1 so that minimum deflection from cover image
will produced. We defined a middle level of pixel value, such that if the pixel value is greater
than this value than x is added to pixel value otherwise x is subtracted from the pixel value. In
this way the high PSNR will produce and no problem of overflow will occur.
The embedding algorithm for this technique is as below:

Embedding Algorithm:

Input: cover image, key, secret message


Procedure:
Step1: Convert the secret message into bit stream (Length L)
Step2: Generate L number of pseudo random number using seed key
Step3: Calculate the non-collide L pixel positions in the cover image
10

Step4: while complete bit stream not embedded


{

If secret bit=1
{

If pixel value < 128


{

increase pixel value by x

Decrease pixel value by x

Else
}

}
}
End
Output: Stego-image

On the receiver side, first of all the difference between the pixel values of cover image and stegoimage is calculated. Then pixel positions are calculated in the same way with the use of the key
and pseudo random number generator. If the difference at a location is 0 then secret bit is taken
as 0 otherwise it is taken as 1. The algorithm for extraction process is as below:

Extraction Algorithm:

Input: cover image, key, stego-image


Procedure:
Step1: Convert the secret message into bit stream (Length L)
Step2: Generate L number of pseudo random number using seed key
Step3: Calculate the non-collide L pixel positions in the cover image
Step4: Calculate the difference between Cover image and Stego-image
Step5: for i=1 to L
{

If value of pixel difference=0


{

Secret bit =0

Else
Secret bit=1

}
11

Step 6: convert the bit stream into secret message


End
Output: secret message

Advantage:

Less degradation of cover image than LSB i.e. less MSE will produce.

Embedding capacity is highest.

Simple and less complex.

Disadvantage:

In many applications, this technique is not useful, since the receiver must have access to
the original covers.

If someone also has access to original cover, he can easily detect the cover modifications
and has evidence for a secret communication.

Requirement of high transmission rate due to large size of stego-image.

12

Chapter 3
Transform Domain Steganography Techniques

In the project JPEG steganography is implemented which use Discrete Cosine Transform to
convert image into frequency domain. Before discussing these techniques in detail we first
discuss the JPEG compression because JPEG steganography is just the modified version of JPEG
compression.

3.1

JPEG Compression

The Joint Photographic Experts Group developed the JPEG [1] algorithm in the late 1980s and
early 1990s. to address the problems of that era, specifically the fact that consumer-level
computers had enough processing power to manipulate and display full color photographs.
However, full color photographs required a tremendous amount of bandwidth when transferred
over a network connection, and required just as much space to store a local copy of the image.
Other compression techniques had major tradeoffs. They had either very low amounts of
compression, or major data loss in the image.

Thus, the JPEG algorithm was created to

compress photographs with minimal data loss and high compression ratios.
JPEG compression and decompression consist of 4 distinct and independent phases.
First, the image is divided into 8 x 8 pixel blocks. Next, a discrete cosine transform is applied to
each block to convert the information from the spatial domain to the frequency domain. After
that, the frequency information is quantized to remove unnecessary information. Finally,
standard compression techniques compress the final bit stream. The basic flow of JPEG is as
below:

13

JPEG compression interface


DCT

Quantizer

Huffmancoder

Compressed
Image

Source image
8 x 8 blocks

Quantization
table

Table

Figure 3.1: Basic block diagram of JPEG Compression

Phase One: Divide the Image


Attempting to compress an entire image would not yield optimal results. Therefore,
JPEG divides the image into matrices of 8 x 8 pixel blocks. If the image dimensions are
not multiples of 8, extra pixels are added to the bottom and right part of the image to pad
it to the next multiple of 8 so that we create only full blocks. The dummy values are
easily removed during decompression. From this point on, each block of 64 pixels is
processed separately from the others, except during a small part of the final compression
step.
It may optionally include a change in colorspace. Normally, JPEG will convert
RGB colorspace to YCbCr colorspace. In YCbCr, Y is the luminance, which represents
the intensity of the color. Cb and Cr are chrominance values, and they actually describe
the color itself. YCbCr tends to compress more tightly than RGB.

Phase Two: Conversion to the Frequency Domain


In JPEG all 8 x 8 blocks are converted to frequency domain using DCT. The Discrete
Cosine Transform (DCT) is derived from the FFT, however it requires fewer
multiplications than the FFT since it works only with real numbers. Also, the DCT

14

produces fewer significant coefficients in its result, which leads to greater compression.
That is why DCT is used for transformation purpose.
The 2D discrete cosine transform equation is given below:

F u, v

7 7
2 x 1 u cos 2 y 1 v
1
C u C v f x, y cos

4
16
16
x0 y0

where f (x, y) is the 8-bit image value at coordinates (x, y) and F (u, v) is the new entry in
the frequency matrix. Also, C(x) = 1/ if x is 0, and C(x) = 1 for all other cases.
The frequency domain matrix contains values from -10241023. The upper-left entry,
also known as the DC value, is the average of the entire block, and is the lowest
frequency cosine coefficient. As we move right the coefficients represent cosine
functions in the vertical direction that increase in frequency. Likewise, as we move
down, the coefficients belong to increasing frequency cosine functions in the horizontal
direction. The highest frequency values occur at the lower-right part of the matrix. The
higher frequency values also have a natural tendency to be significantly smaller than the
low frequency coefficients since they contribute much less to the image. Typically the
entire lower-right half of the matrix is factored out after quantization. This essentially
removes half of the data per block, which is one reason why JPEG is so efficient at
compression. Computing the DCT is the most time-consuming part of JPEG
compression. Thus, it determines the worst-case running time of the algorithm.

Phase Three: Quantization


Having the data in the frequency domain allows the algorithm to discard the least
significant parts of the image. The JPEG algorithm does this by dividing each cosine
coefficient in the data matrix by some predetermined constant, and then rounding up or
down to the closest integer value. These predefined constants are then entered into
another 8 x 8 matrix, called the quantization matrix. Each entry in the quantization
matrix corresponds to exactly one entry in the frequency matrix. A typical quantization
matrix will be symmetrical about the diagonal, and will have lower values in the upper
left and higher values in the lower right. Since any arbitrary values could be used during
15

quantization, the entire quantization matrix is stored in the final JPEG file so that the
decompression routine will know the values that were used to divide each coefficient.
The constant values that are used in the division may be arbitrary, although research has
determined some very good typical values. The standard quantization matrix used in
JPEG is as below:
16

11

10

16

24

40

51

61

12

12

14

19

26

58

60

55

14

13

16

24

40

57

69

56

14

17

22

29

51

87

80

62

18 22

37

56

68 109 103 77

24

35

55

64

81 104 113 92

49

64

78

87 103 121 120 101

72

92

95

98 112 100 103 99

Standard quantization matrix

Dividing by a high constant value can introduce more error in the rounding process, but
high constant values have another effect. As the constant gets larger the result of the
division approaches zero. This is especially true for the high frequency coefficients,
since they tend to be the smallest values in the matrix. Thus, many of the frequency
values become zero. Phase four takes advantage of this fact to further compress the data.
The algorithm used to calculate the quantized frequency matrix is fairly simple. It
takes a value from the frequency matrix (F) and divides it by its corresponding value in
the quantization matrix (Q). This gives the final value for the location in the quantized
frequency matrix (Fquantize). The quantization equation that is used for each block in the
image is below:

F u, v
0.5
FQuantizeu, v
Qu, v
By adding 0.5 to each value, we essentially round it off automatically when we truncate
it, without performing any comparisons.

16

Phase Four: Entropy Coding:


After quantization, the algorithm is left with blocks of 64 values, many of which are zero.
Of course, the best way to compress this type of data would be to collect all the zero
values together, which is exactly what JPEG does. The algorithm uses a zigzag ordered
encoding, which collects the high frequency quantized values into long strings of zeros.
To perform a zigzag encoding on a block, the algorithm starts at the DC value and begins
winding its way down the matrix, as shown in figure. This converts an 8 x 8 table into a
1 x 64 vector.

Figure 3.2: Zigzag ordered encoding

All of the values in each block are encoded in this zigzag order except for the DC value.
For all of the other values, there are two tokens that are used to represent the values in the
final file. The first token is a combination of {size, skip} values. The size value is the
number of bits needed to represent the second token, while the skip value is the number
of zeros that precede this token. The second token is simply the quantized frequency
value, with no special encoding. At the end of each block, the algorithm places an endof-block sentinel so that the decoder can tell where one block ends and the next begins.
The first token, with {size, skip} information, is encoded using Huffman coding.
Huffman coding scans the data being written and assigns fewer bits to frequently
occurring data, and more bits to infrequently occurring data. Thus, if a certain values of
17

size and skip happen often, they may be represented with only a couple of bits each.
There will then be a lookup table that converts the two bits to their entire value. JPEG
allows the algorithm to use a standard Huffman table, and also allows for custom tables
by providing a field in the file that will hold the Huffman table. DC values use delta
encoding, which means that each DC value is compared to the previous value, in zigzag
order. This is the only instance where blocks are not treated independently from each
other. The difference between the current DC value and the previous value is all that is
included in the file.

3.2

JPEG Steganography

JPEG steganography is more important and popular because stago-image produce by these
techniques are robust to jpeg compression. In this technique secret data is embed after
quantization phase of JPEG compression. Only significant quantized DCT coefficients are
modified according to secret bits. Remaining steps are similar to JPEG compression. In this way
stego-image is produced in .jpg format directly. The basic flow diagram of embedding and
extraction process is as below:
Secret message
into bit stream
conversion

Secret
Message

Cover
image

8x8
blocks
DCT

Embedding

Quantizer

Entropy
coding

Quantization
table
Figure 3.3: Block diagram of Embedding process of JPEG Steganography

18

Stego
image

Secret
message in
bit stream

Secret
Message

Distorted
Cover
image

8x8
blocks
DCT

Embedding

Quantizer

Entropy
coding

Stego
image

Quantization
table

Figure 3.4: Block diagram of Extraction process of JPEG Steganography

Following are some JPEG steganography techniques :

Jsteg [7]

Steghide

Outguess [18]

F3,F4,F5 [15],[21],[25]

J3 [31]

In the project only 2 techniques Jsteg and Steghide is implemented and these are explained
below with algorithms.

3.2.1

Jpeg-Jsteg:

In JpegJsteg, the secret messages are embedded in LSB of quantized DCT coefficients whose
values are not (0, 1, or 1). Its execution steps are described briefly as follows. First, JPEG
partitions a cover-image into non-overlapping blocks of 8*8 pixels, and then it uses DCT to
transform each block into DCT coefficients. The results of the DCT coefficients are scaled
according to a quantization table.
The standard quantization table is listed in Fig. , which is a matrix that contains 64
coefficients. Next, JpegJsteg uses an encryption algorithm to protect the message. A message
19

after encrypting is called secret message S={ s1, s2, s3, s4, . . .,sn }, where si is a secret bit. After
the above steps, JpegJsteg embeds si into LSB of quantize DCT coefficients whose values are
not 0, 1, or 1. The bit-flip diagram of J-steg is as below:

JPEG Coefficients
in cover image

-4
0

-3

-2

0 1

-1
1

0 1

2
0

3
1 0 1

4
0

5
1 0

JPEG coefficients in
Stego-image
Figure 3.5: Bit-flip in JPEG-JSTEG

The embedding sequence employed in JpegJsteg is in the zigzag scan order, which is
listed in fig. After embedding the secret message in each block, JpegJsteg uses Huffman
coding, Run-Length coding, and DPCM of JPEG entropy coding to compress each block.
Finally, JpegJsteg obtains a JPEG stego-image.
The message capacity of JpegJsteg is limited. If there are many quantifized coefficients
equal to 0, 1, or 1, then the message capacity of JpegJsteg will be decreased. Besides, in DCT
transformation, most important coefficients are located around the low-frequency part. Jpeg
Jsteg modifies the quantized DCT coefficients right in the low-frequency part. Therefore, the
image quality of JpegJsteg is degraded, especially when the cover-image undergoes a high
compression ratio.

Embedding Algorithm:

Input: secret message, cover image


Procedure:
Step1. Convert the secret message into bit stream
Step2. Divide the cover image into 8x8blocks
20

Step3. Calculate DCT coefficients for each block


Step4. Quantize the coefficients
Step5. while complete message not embedded do
{

get next DCT coefficient


if DCT 0 , DCT 1 and DCT -1 then
{

get next bit from message


replace DCT LSB with message bit

}
Step6. De-quantize and take inverse DCT to obtain stego-image
End.
Output: Stego- image

Extracting Algorithm:

Input: Stego image


Procedure:
Step1. Divide the stego image into 8x8 blocks
Step2. Calculate DCT coefficients for each block
Step3. Quantize the coefficients
Step4. While secret message not completed do
{

Get next DCT coefficient


If DCT 0 , DCT 1and DCT -1 then
{

Concatenate DCT LSB to secret message bit steam

}
Step5. Convert secret message bit stream into the message.
End.
Output: Secret message

21

Advantage:

Robust to JPEG compression.

Less bandwidth requirement for stego image transmission because its size can be
reduced.

Disadvantage:

Only few secret messages can be embedded in cover image.

High detectability due to the fact that it introduces characteristic artifacts into the first
order statistics (histogram) of DCT coefficients.

3.2.2

Steg-Hide:

Steghide uses a graph-theoretic approach to steganography. Steghide embeds by swapping DCT


coefficients and thus avoids changing the histogram. The fact that the embedding is done by
exchanging pixel values implies that the first-order statistics (i.e. the number of times a color
occurs in the picture) is not changed. During the encoding process, the sender splits the coverimage in 8 x 8 pixel blocks; each block encodes exactly one secret message bit. The embedding
process starts with selecting a pseudorandom block bi which will be used to code the ith message
bit.
Before the communication starts, both sender and receiver have to agree on the location
of two DCT coefficients, which will be used in the embedding process; let us denote these two
indices by (u1,v1) and (u2, v2). The two coefficients should correspond to cosine functions with
middle frequencies; this ensures that the information is stored in significant parts of the signal
(hence the embedded information will not be completely damaged by JPEG compression).

Embedding Algorithm:

Input: secret message, cover image


Procedure:
Step1. Convert the secret message into bit stream
Step2. Divide the cover image into 8x8blocks
22

Step3. Calculate DCT coefficients for each block


Step4. Quantize the coefficients
Step5. While complete message not embedded do
{

Get next block


If block(u1,v1) block(u2,v2) then
{

get next bit from message stream


if bit =1 and block(u1,v1)< block(u2,v2)
{

swap(block(u1,v1),block(u2,v2)

If bit =0 and block(u1,v1)> block(u2,v2)


{

swap(block(u1,v1),block(u2,v2)

}
}
Step6. De-quantize and take inverse DCT to obtain stego-image
End.
Output: Stego- image

Extracting Algorithm:

Input: Stego image


Procedure:
Step1. Divide the stego image into 8x8 blocks
Step2. Calculate DCT coefficients for each block
Step3. Quantize the coefficients
Step4. While secret message not completed do
{

Get next block


If block(u1,v1) block(u2,v2)then
{

If block(u1,v1)< block(u2,v2)
{

concatenate 0 to bit stream

Else
Concatenate 0 to bit stream
23

}
}
Step5. Convert secret message bit stream into the message.
end.
Output: Secret message

Advantage:

It cannot be detected by steganalysis which uses first order characteristics, because


histogram is preserved [27]

It provide Robustness to JPEG compression.

Disadvantage

Its embedding capacity is less than Jsteg too.

Cover size in which message embedded is always multiple of 8 which can be used to
detect the presence of secret message.

24

Chapter 4
Simulation and results
4.1

Simulation Setup:

The MATLAB Version 7.13.0.564 (R2011b) is used to implement and simulate 4 steganography
techniques: LSB & Distortion of spatial domain steganography and Jsteg & Steg-hide of
transform domain steganography. MATLAB is used because of large number of advanced
inbuilt functions and image processing toolbox. We take results for various color cover image for
different secret files.
The various simulation parameters are as given below:
Cover image pixel size (N x N x3)

N=250, 500, 1024, 2048

Secret text file size (kb)

1,5

Image type

Tiff, jpg

Simulation Tool

MATLAB 7.13.0.564

Pseudo Random Number Generator

MATLAB rng with key 2

Secret data for JPEG Steganography

Ajay Nain
Minor Project YMCA

Table 4.1: Simulation parameter setup

The following results are taken for evaluation of these techniques:

4.2

Perceptual Quality:

We saw that visual quality of spatial domain steganography is better than transform domain
techniques. The stego-image produced by all the 4 techniques on baby cover image with size of
500 x 500 x 3 are given below:

25

Figure 4.1: original cover image (500 x 500) color

(a) Stego-image with LSB technique

(b) Stego-image with distortion technique

Figure 4.2: Stego- image produced by Spatial domain techniques with secret file of 5 kb .

We see that there is no so much change in perceptual quality of image to detect visual changes
i.e. quality of embedded image is not degraded by these techniques.

26

(a) Stego-image with Jsteg

(b) Stego-image with Steg-hide

Figure 4.3: Stego- image produced by transfer domain techniques

Result shows that visual quality of stego-image produced by spatial domain techniques is less
than that of produced by transform domain techniques. In spatial domain techniques as the size
of secret file changes the more degradation is produced but in case of the degradation of image is
not depend upon size of secret file so much.

4.3

Embedding Capacity

It is the size of the secret data that can be embed in cover image without deteriorating the
integrity of the cover image. It can be represented in bytes or bit per pixel (bpp). It depends upon
the characteristics of cover image and the embedding algorithm used for steganography.
The table shows the embedding capacity of the 4 techniques for different cover image:

27

Image size(N x LSB

Distortion

Jsteg

Steg-hide

N x 3) N=

Steganography

Steganography

Steganography

Substitution
Steganography

250

23437

23437

61

500

93750

93750

136

30

1024

393216

393216

5798

797

2048

1572864

1572864

7843

829

Table 4.2: Embedding Capacity

Embedding Capacity
1800000
1600000

Embedding Capacity

1400000
1200000
1000000

LSB Substitution
Distortion

800000

Jsteg

600000

Steghide
400000
200000
0
N=250

N=500 N=1024 N=2048


Image Size

Figure 4.4: Comparison of embedding capacity

Result shows that embedding capacity of spatial domain capacity is fix large quantity for a cover
image size but capacity of transform domain techniques is very less and it is not fixed for a given
size of cover image, it depends upon characteristics of cover image.
28

4.4

Mean Square Error (MSE):

The results of the all techniques for the given setup parameters are in the following table:
Image size(N x N x LSB

Distortion

3) N=

Steganography Steganography Steganography

Substitution

Jsteg

Steg-hide

Steganography
250

5.84E-07

1.11E-07

8.81E-05

8.87E-05

500

3.63E-08

6.94E-09

1.39E-05

1.45E-05

1024

3.95E-10

3.41E-10

2.20E-05

2.69E-05

2048

2.63E-11

2.13E-11

1.11E-06

1.23E-06

Table 4.3: MSE

Mean Square Error


1.00E-04
9.00E-05
8.00E-05
7.00E-05

MSE

6.00E-05
LSB Substitution

5.00E-05

Distortion

4.00E-05

Jsteg

3.00E-05

Steghide

2.00E-05
1.00E-05
0.00E+00
N=250 N=500 N=1024 N=2048
Image Size

Figure 4.5: Comparison of Mean Square Error

29

We can analyze from the results that MSE for spatial domain techniques is very less than that of
for transform domain technique. In case of transform domain techniques the lossy compression
step of jpeg compression i.e. quantization is performed in the embedding process and hence very
large MSE is produced and quality of cover image degraded more.

4.5

Peak Signal to Noise Ratio (PSNR):

It is the measure of quality of the image by comparing the cover image with the stego-image.
High PSNR indicates good perceptual quality of stego-image. The results of PSNR for all the
techniques are in following table:
Image Size(N x

Substitution

Distortion

Jsteg

Steg-hide

N x 3)

Steganography

Steganography

Steganography

Steganography

N=
250

110.4659

117.6791

88.6813

88.6532

500

122.5315

129.7203

96.6949

96.5209

1024

142.169

142.7986

94.7016

93.8368

2048

153.9334

154.8398

107.6790

107.2257

Table 4.4: PSNR in db

PSNR
180
160

PSNR in db

140
120
LSB Substitution

100
80

Distortion

60

Jsteg

40

Steghide

20
0
N=250

N=500

N=1024

N=2048

Image Size
Figure 4.6: Comparison of PSNR for 4 techniques

30

4.6

Histograms:

Histogram is a measure of the number of occurrence of pixels with respect to particular pixel
value. During embedding pixel value changes hence number of pixel having a particular pixel
value changes. These changes can be used to detect steganography. We take histograms for baby
color image with size of (500 x 500) for all the four the techniques separately.
4.6.1

Histograms of spatial domain techniques:

For spatial domain techniques, we have to take 3 histograms each for red, green and blue color
plane. Hence 3 histograms of cover image, 3 histograms for stego-image and 3 differences are to
be taken for analysis one technique. For better technique difference histogram or difference of
occurrence is less. Below are the results for both the spatial domain techniques:

Figure 4.7: Cover image histograms for red, green and blue color plane respectively

Figure 4.8: Stego-image histograms for red, green and blue color plane respectively

31

Figure 4.9: Difference between histograms of Cover image and Stego-image for red, green and blue color plane
with secret file of 5 kb & (500 x 500 x 3) cover image

We see that histogram of cover image and stego-image seems to be similar but by plotting
difference between the two we can analyze the change in statistical properties of cover image. As
the size of secret file increases the difference is increases.

Figure 4.10: stego-image histograms for red, green and blue color plane respectively

32

Figure 4.11: Difference between histograms of Cover image and Stego-image for 3 color plane with (500
x500) cover image and secret file of 5 kb

We see that difference between histograms by distortion technique is lesser than LSB
substitution technique with same cover image and secret data file.

4.6.2

Histograms of Transform domain techniques:

For transform domain techniques quantized coefficients are used for calculation of histogram
instead of pixel value. The histogram results of jsteg and Steg-hide are below:

Figure 4.12: Histogram of Cover Image

33

Figure 4.13: Histogram of stego-image produced by Jsteg

(i)

(ii)

Figure 4.14: Difference between original and Stego-image histogram(i) with JPEG compression (ii) without
JPEG compression; stego-image is save in tif format

34

Figure 4.15: Histograms of stego-image produced by Steg-hide

(ii)

(i)

Figure 4.16: Difference between original and Steg-hide produced stego-image histogram (i) with JPEG compression
(ii) without JPEG compression; stego-image is save in tif format

As we see if no compression is performed after embedding process the difference between the
histogram is zero, hence this technique cannot be detect by steganalysis which use first order
statics of stego-image

35

Chapter 5
Conclusion and Future Scope

5.1 Conclusion
Spatial domain techniques are easy ways to embed information, but they are highly vulnerable to
even small cover modifications. Hence the size of stago-image cannot be reduced. An attacker
can simply apply signal processing techniques in order to destroy the secret information entirely.
In many cases even the small changes resulting out of lossy compression systems yield to total
information loss. Transform domain methods hide messages in significant areas of the cover
image which makes them more robust to attacks, such as compression, cropping, and some
image processing. Hence lossy compression i.e. Jpeg compression can be performed and size of
stago-image can be reduced. But the disadvantage of Jpeg-Steganography is that only few
messages can be embedded in the cover-image. The embedding capacity of Jpeg steganography
is very less than spatial domain techniques. The spatial domain techniques provide high PSNR,
high perceptual quality and high embedding capacity but these not provide robustness. On the
other hand transform domain provide robustness while providing very less embedding capacity,
low PSNR and low perceptual quality.

5.2

Future Scope

We see there is a tradeoff between the three properties, perceptuality, embedding capacity and
robustness. The new techniques should be develop to maintain the three properties at high level.
The few areas which are still open in steganography are as below:

Wavelet transform can be used to increase the embedding capacity while maintaining the
robustness of Stego-image.

Hamming coding or Matrix coding can be used to reduce the impact of steganography i.e.
to increase the PSNR.

Cryptography techniques like RSA, AES and hash functions can also be used with
steganography to provide more security.
36

References:
[1]. Wallace, G. K., The JPEG Still Picture Compression Standard, Communications of the
ACM, vol. 34, no. 4, 1991, pp. 30-44.
[2]. Kurak, C., and J. McHughes, "ACautionary Note On Image Downgrading," in
IEEEComputer Security Applications Conference 1992, Proceedings, IEEE Press, 1992,
pp.153-159.
[3]. Bender, W., D. Gruhl, and N. Morimoto, Techniques for data hiding, IBM Systems
Journal, vol. 35, no. 34, 1996, pp. 131-336.
[4]. Moller, S., A. Pitzmann, and I. Stirand, Computer Based Steganography How It Works
and Why Therefore Any Restrictions on Cryptography Are Nonsense, At Best, in
Information Hiding First International Workshop, Proceedings, vol. 1174 of Lecture
Notes in Computer Science, Springer, 1996, pp. 7-21.
[5]. Cox, I., et al., "A Secure, Robust Watermark for Multimedia," in Information Hiding:
First International Workshop, Proceedings, vol. 1174 of Lecture Notes in Computer
Science, Springer, 1996, pp. 185-206.
[6]. O. Runaidh, J. J. K., F. M. Boland, and O. Sinnen, "Watermarking Digital Images
forCopyright Protection," in Electronic Imaging and the Visual Arts, Proceedings,
Feb.1996.
[7]. Derek Upham: Jsteg, 1997, e. g. http://www.tiac.net/users/korejwa/jsteg.htm
[8]. Swanson, M. D., B. Zhu, and A. H. Tewfik, "Transparent Robust Image Watermarking,"
in Proceedings of the IEEE International Conference on Image Processing, vol. 3, 1996,
pp. 211-214.
[9]. Xia, X., C. G. Boncelet, and G. R. Arce, "A Multiresolution Watermark for Digital
Images," in Proceedings of the IEEE International Conference on Image Processing
(ICIP'97), 1997.
[10]. Sandford, M. T., J. N. Bradley, and T. G. Handel, "Data Embedding Method," in
Proceedings of the SPIE 2615, Integration Issues in Large Commercial Media
DeliverySystems, 1996, pp. 226-259
[11]. Johnson, N. F., and S. Jajodia, Exploring Steganography Seeing the Unseen, IEEE
Computer , vol. 31, no. 2, 1998, pp. 26-34.

37

[12]. J.J. Chae & B. S. Manjunath, A Robust Embedded Data from Wavelet Coefficients,
SPIE: Storage and Retrieval for Image and Video Databases VI, 3312, San Jose, CA, Jan.
1998, 308-317.
[13]. Luby, M., and C. Racko, How to Construct Pseudorandom Permutations from
Pseudorandom Functions, SIAM Journal on Computation, vol. 17, no. 2, 1988, pp. 373386.
[14]. Naor, M., and O. Reingold, On the Construction of Pseudorandom Permutations LubyRacko Revisited, Journal of Cryptology, vol. 12, no. 1, 1999, pp. 29-66
[15]. Andreas Westfeld: The Steganographic Algorithm F5, 1999. http://wwwrn.inf.tudresden.de/westfeld/f5.html
[16]. AndreasWestfeld, Andreas Pfitzmann: Attacks on Steganographic Systems, in Andreas
Pfitzmann (Ed.): Information Hiding. Third International Workshop, LNCS1768,
Springer-Verlag Berlin Heidelberg 2000. pp. 6176.
[17]. J.R. Hernandez, M. Amado, & F. PerezGonzalez, DCTDomain Watermarking
Techniques for Still Images: Detector Performance Analysis and a New Structure, IEEE
Trans. Image Processing, 9, Jan. 2000, 55-68.
[18]. Provos, N. Defending Against Statistical Steganalysis. Proc. 10th USENIX Security
Symposium. Washington, DC, 2001
[19]. J. Fridrich, M. Goljan, and R. Du, Detecting LSB Steganography in Color and GrayScale Images, Magazine of IEEE Multimedia Special Issue on Security, pp. 22-28,
October-November 2001
[20]. J. Fridrich, M. Goljan, and R. Du, Reliable detection of LSB steganography in color and
grayscale images,Proc. ACM Workshop on Multimedia and Security, pp. 2730, 2001.
[21]. A. Westfeld, F5 - A steganographic algorithm: high capacity despite better
steganalysis, Lecture Notes in Computer Science, vol.2137, pp.289-302, 2001
[22]. B. Chen and G.W.Wornell, Quantization index modulation: A class of provably good
methods for digital watermarking and information embedding, IEEE Trans. on
Information Theory, vol.47, no.4, pp.1423-1443, 2001.
[23]. P. Meerwald & A. Uhl, A Survey of Wavelet-Domain Watermarking Algorithms, SPIE
Symposium, Electronic Imaging, San Jose, CA, USA, 2001.

38

[24]. J. Fridrich,M. Goljan, Practical Steganalysis of Digital Images State of the Art, Proc.
SPIE, Photonics West, Vol. 4675, Electronic Imaging 2002, Security and Watermarking
of Multimedia Contents, San Jose, California, pp. 1-13, January, 2002.
[25]. Fridrich, J., Goljan, M., and D. Hogea. Steganalysis of JPEG Images: Breaking the F5
Algorithm. 5th Information Hiding Workshop, Noordwijkerhout, Netherlands, Oct. 2002
[26]. J.J. Eggers, R. Bauml and B. Girod, A communications approach to image
steganography, Proceedings of SPIE, vol.4675, pp.26-37, 2002.
[27]. J. Fridrich, M. Goljan and D. Hogea, New methodology for breaking steganographic
techniques for JPEGs, Proceedings of SPIE, vol.5020, pp.143-155, 2003.
[28]. J. Fridrich, M. Goljan, and T. Holotyak, New Blind Steganalysis and its Implications,
in Proc. SPIE Security, Steganography, and Watermarking of Multimedia Contents VIII,
vol. 6072, pp. 607201, Jan. 2006
[29]. K. Solanki, K. Sullivan, U. Madhow, B. S. Manjunath, and S. Chandrasekaran,"Provably
Seccure Steganography : Achieving Zero K-L Divergence using Statistical Restoration"
in proc. ICIP, 2006 pp. 125-128
[30]. Hong-Juan Zhang, Hong-Jun Tang,"A Novel Image Steganography Algorithm Against
Statistical Analysis",Proceedings of the Sixth International Conference on Machine
Learning and Cybernetics, Hong Kong, 19-22 August 2007
[31]. Mahendra Kumar and Richard Newman,"J3: High Payload Histogram Neutral JPEG
Steganography", Eighth Annual International Conference on Privacy, Security and Trust,
2010
[32]. Shailender Gupta, Ankur Goyal, Bharat Bhushan,Information Hiding Using Least
Significant Bit Steganography and Cryptography,I.J.Modern Education and Computer
Science, 2012, 6, 27-34
[33]. Hossein Sheisi, Jafar Mesgarian, and Mostafa Rahmani, Steganography: Dct Coefficient
Replacement Method andCompare With Jsteg Algorithm International Journal of
Computer and Electrical Engineering, Vol. 4, No. 4, August 2012
[34]. "Steganography in Digital Media: Principles, Algorithms and Applications", Jessica
Fridrich.
[35]. Cryptography and Network Security principles and practices, William Stallings,
pearsons education, first Indian reprint 2003
39

Anda mungkin juga menyukai