CHAPTER 1 INTRODUCTION 1.1 Cryptography: The earliest forms of information hiding can actually be considered to be highly crude forms of private-key cryptography; the “key” in this case being the knowledge of the method being employed (security through obscurity). Steganography books are filled with examples of such methods used throughout history. Greek messengers had messages tattooed into their shave head, concealing the message when their hair finally grew back. Wax tables were scraped down to bare wood were a message was scratched. Once the tablets were re-waxed, the hidden message was secure. Over time these primitive cryptographic techniques improved, increasing speed, capacity and security of the transmitted message. Today, crypto-graphical techniques have reached a level of sophistication such that properly encrypted communications can be assumed secure well beyond the useful life of the information transmitted. In fact, it’s projected that the most powerful algorithms using multi kilobit key lengths could not be comprised through brute force, even if all the computing power worldwide for the next 20 years was focused on the attack. Of course the possibility exists that 1
113
Embed
Secret Communication Using Digital Image Steganography
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CHAPTER 1
INTRODUCTION
1.1 Cryptography:
The earliest forms of information hiding can actually be considered to be highly
crude forms of private-key cryptography; the “key” in this case being the knowledge of
the method being employed (security through obscurity). Steganography books are filled
with examples of such methods used throughout history. Greek messengers had messages
tattooed into their shave head, concealing the message when their hair finally grew back.
Wax tables were scraped down to bare wood were a message was scratched. Once the
tablets were re-waxed, the hidden message was secure. Over time these primitive
cryptographic techniques improved, increasing speed, capacity and security of the
transmitted message.
Today, crypto-graphical techniques have reached a level of sophistication such
that properly encrypted communications can be assumed secure well beyond the useful
life of the information transmitted. In fact, it’s projected that the most powerful
algorithms using multi kilobit key lengths could not be comprised through brute force,
even if all the computing power worldwide for the next 20 years was focused on the
attack. Of course the possibility exists that vulnerabilities could be found, or computing
power breakthroughs could occur, but for most users in most applications, current
cryptographic techniques are generally sufficient.
Why then pursue the field of information hiding? Several good reasons exist, the
first being that “security through obscurity” isn’t necessarily a bad thing, provided that it
isn’t the only security mechanism employed. Steganography for instance allows us to
hide encrypted messages in mediums less likely to attract attention. A garble of random
characters being transmitted between two users may tip off a watchful 3 rd party that
sensitive information is being transmitted; whereas baby pictures with some additional
noise present may not. The underlying information in the pictures is still encrypted, but
attracts far less attention being distributed in the picture then it would otherwise.
1
This becomes particularly important as the technological disparity between
individuals and organizations grows. Governments and businesses typically have access
to more powerful systems and better encryption algorithms then individuals. Hence, the
chance of individual’s messages being broken increases which each passing year.
Reducing the number of messages intercepted by the organizations as suspect will
certainly help to improve privacy.
Another advantage hinted at is that information hiding can fundamentally change
the way that we think about information security. Cryptographic techniques generally
rely on the metaphor of a piece of information being placed in a secure “box” and locked
with a “key”. The information itself is not disturbed and anyone with the proper key can
gain access. Once the box is open, all of the information security is lost. Compare this to
information hiding techniques where the key is embedded into he information itself.
Cryptography is the science of using mathematics to encrypt and decrypt data.
Cryptography enables you to store sensitive information or transmit it across insecure
networks (like the Internet) so that it cannot be read by anyone except the intended
recipient. While cryptography is the science of securing data, cryptanalysis is the science
of analyzing and breaking secure communication. Classical cryptanalysis involves an
interesting combination of analytical reasoning, application of mathematical tools, pattern
finding, patience, determination, and luck. Cryptanalysts are also called attackers.
Cryptology embraces both cryptography and cryptanalysis.
First we start with a few definitions. Cryptography can be defined as the
processing of information into an unintelligible (encrypted) form for the purposes of
secure transmission. Through the use of a “key” the receiver can decode the encrypted
message (decrypting) to retrieve the original message.
Stenography improves on this by hiding the fact that a communication even
occurred. The message m is imbedded into a harmless message c which is defined as the
cover-object. The message m is then embedded into c, generally with use of a key k that
is defined as the stego-key. The resulting message is then embedded into the cover-object
c, which results in stego-object s.
2
1.2 Steganography:
Steganography means to hide secret information into innocent data. Digital
images are ideal for hiding secret information. An image containing a secret message is
called a cover image. First, the difference of the cover image and the stego image should
be visually unnoticeable. The embedding itself should draw no extra attention to the stego
image so that no hackers would try to extract the hidden message illegally. Second, the
message hiding method should be reliable. It is impossible for someone to extract the
hidden message if she/he does not have a special extracting method and a proper secret
key. Third, the maximum length of the secret message that can be hidden should be as
long as possible.
“Steganography is the art of hiding information in ways that prevent the detection of
hidden messages,”
1.2.1 Steganography in History:
Steganography comes from Greek and means “covered writing”. The ancient
Greeks wrote text on wax-covered tablets. To pass a hidden message, a person would
scrape off the wax and write the message on the underlying wood. He/she would then
once again cover the wood with wax so it appeared unused. Many developments in
steganography occurred during World War II. This included the development of
invisible inks, microdots, and encoded messages.
1.2.2 Steganography in the Digital Age:
Steganography is the art of secret communication. Its purpose is to hide the very
presence of communication as opposed to cryptography whose goal is to make
communication unintelligible to those who do not possess the right keys. Digital images,
videos, sound files, and other computer files that contain perceptually irrelevant or
redundant information can be used as “covers” or carriers to hide secret messages. After
embedding a secret message into the cover-image, a so-called stego-image is obtained. It
is important that the stego-image does not contain any easily detectable artifacts due to
message embedding. A third party could use such artifacts as an indication that a secret
3
message is present. Once this message detection can be reliably achieved, the
steganographic tool becomes useless.
Obviously, the less information is embedded into the cover-image, the smaller the
probability of introducing detectable artifacts by the embedding process. Another
important factor is the choice of the cover-image. The selection is at the discretion of the
person who sends the message. The sender should avoid using cover-images that would
be easy to analyze for presence of secret messages. For example, one should not use
computer art, charts, images with large areas of uniform color, images with only a few
colors, and images with a unique semantic content, such as fonts. Although computer-
generated fractal images may seem as good covers6 because of their complexity and
irregularity, they are generated by strict deterministic rules that may be easily violated by
message embedding.
1.3 Cryptography VS Steganography:
Cryptography is the science of encrypting data in such a way that nobody can
understand the encrypted message, whereas in steganography the existence of data is
conceived means its presence cannot be noticed. The information to be hidden is
embedded into the cover object which can be text, image, audio or video so that the
appearance of cover object doesn’t vary even after the information is hidden.
Information to be hidden + cover object = stego object.
To add more security the data to be hidden is encrypted with a key before
embedding. To extract the hidden information one should have the key. A stego object is
one, which looks exactly same as cover object with hidden information.
1.4 Steganography VS Watermarking:
Watermarking is another branch of steganography it is mainly used to restrict the
piracy in digital media. In steganography the data to be hidden is not at all related to the
cover object, here our main intention is secret communication. In watermarking the data
4
to be hidden is related to the cover object it is extended data or attribute of the cover
object, here our main intention is to stop piracy of digital data. Steganography is a very
powerful tool because, as the stated above, it can be very difficult to detect.
1.5 Stegosystem:
The stegosystem is conceptually similar to the cryptosystem.
Figure 1.1 Basic block diagram of Stegosystem
Emb: The message to be embedded. It is anything that can be represented as a bit stream
(an image or text).
Cover: Data/Medium in which emb will be embedded.
Stego: Modified version of the cover that contains the embedded message,
Emb.key: Additional data that is needed for embedding & extracting.
fE: Steganographic function that has cover, emb & key as parameters.
5
Figure 1.2 Graphical version of the Stegosystem
Steganography refers to the science of “invisible” communication. Unlike
cryptography, where the goal is to secure communications from an eavesdropper,
steganographic techniques strive to hide the very presence of the message itself from an
observer. Although steganography is an ancient subject, the modern formulation of it is
often given in terms of the prisoner’s problem where Alice and Bob are two inmates who
wish to communicate in order to hatch an escape plan. However, all communication
between them is examined by the warden, Wendy, who will put them in solitary
confinement at the slightest suspicion of covert communication. Specifically, in the
general model for steganography, we have Alice wishing to send a secret message to
Bob. In order to do so, she” embeds” into a cover-object, to obtain the stego-object.
The stego-object is then sent through the public channel. The warden, Wendy,
who is free to examine all messages exchanged between Alice and Bob, can be passive or
active. A passive warden simply examines the message and tries to determine if it
potentially contains a hidden message. If it appears that it does, she then takes appropriate
action else she lets the message through without any action. An active warden, on the
other hand, can alter messages deliberately, even though she may not see any trace of a
hidden message, in order to foil any secret communication that can nevertheless be
occurring between Alice and Bob. The amount of change the warden is allowed to make
6
depends on the model being used and the cover objects being employed. For example,
with images, it would make sense that the warden is allowed to make changes as long as
she does not alter significantly the subjective visual quality of a suspected stego-image.
It should be noted that the main goal of steganography is to communicate securely
in a completely undetectable manner. That is, Wendy should not be able to distinguish in
any sense between cover-objects (objects not containing any secret message) and stego-
objects (objects containing a secret message). In this context, “steganalysis” refers to the
body of techniques that are designed to distinguish between cover-objects and stego-
objects. It should be noted that nothing might be gleaned about the contents of the secret
message. When the existence of hidden message is known, revealing its content is not
always necessary. Just disabling and rendering it useless will defeat the very purpose of
steganography. In this paper, we present a steganalysis technique for detecting stego-
images, i.e., still images containing hidden messages, using image quality metrics.
Although we focus on images, the general techniques we discuss would also be
applicable to audio and video media. Given the proliferation of digital images, and given
the high degree of redundancy present in a digital representation of an image (despite
compression), there has been an increased interest in using digital images as cover-
objects for the purpose of steganography. The simplest of such techniques essentially
embeds the message in a subset of the LSB (least significant bit) plane of the image,
possibly after encryption. It is well known that an image is generally not visually affected
when its least significant bit plane is changed. Popular steganographic tools based on
LSB like embedding vary in their approach for hiding information. For example Steganos
and Stools use LSB embedding in the spatial domain, while Jsteg embeds in the
frequency domain. Other more sophisticated techniques include the use of quantization
and dithering for a good survey of steganography techniques. What is common to these
techniques is that they assume a passive warden framework. That is they assume the
warden Wendy will not alter the image. We collectively refer to these techniques as
passive warden steganography techniques.
Conventional passive warden steganography techniques like LSB embedding are
not useful in the presence of an active warden as the warden can simply randomize the
7
LSB plane to thwart communication. In order to deal with an active warden Alice must
embed her message in a robust manner. That is, Bob should be able to accurately recover
the secret message despite operations like LSB randomizing, compression, filtering, and
rotation by small degrees, etc. performed by the active warden Wendy. Indeed, the
problem of embedding messages in a robust manner has been the subject of intense
research in the image processing community, albeit for applications other than
steganography, under the name of robust digital watermarking A robust digital watermark
is an imperceptible signal added to digital content that can be later detected or extracted n
order to make some assertion about the content. For example, the presence of her
watermark can be used by Alice to assert ownership of the content. Recent years have
seen an increasing interest in digital watermarking with many different applications,
ranging from copyright protection and digital rights management, to secret
communication.
Essentially robust digital watermarks provide a means of image-based
steganography in the presence of an active warden since modifications made by the
warden will not affect the embedded watermark as long as the visual appearance of the
image is not significantly degraded. However, despite this obvious and commonly
observed connection to steganography, there has been very little effort aimed at analyzing
or evaluating the effectiveness of common robust watermarking techniques for
steganographic applications. Instead, most work has focused on analyzing or evaluating
the watermarking algorithms for their robustness against various kinds of attacks that try
to remove or destroy them. However, if robust digital watermarks are to be used in active
warden steganography applications, detection of their presence by an unauthorized agent
defeats their very purpose. Even in applications that do not require hidden
communication, but only robustness, we note that it would be desirable to first detect the
possible presence of a watermark before trying to remove or manipulate it. This means
that a given signal would have to be first analyzed for the presence of a watermark. In
this project, we develop steganalysis techniques both for conventional LSB-like
embedding used in the context of a passive warden model and for watermarking which
can be used to embed secret messages in the context of an active warden. In order to
distinguish between these two models, we will be using the terms watermark and
8
message when the embedded signal is in the context of an active warden and a passive
warden, respectively.
Furthermore, we simply use the terms marking or embedding when the context of
discussion is general to include both active and passive warden steganography. The
techniques we present are novel and to the best of our knowledge, the first attempt at
designing general purpose tools for steganalysis. General detection techniques as applied
to steganography have not been devised and methods beyond visual inspection and
specific statistical tests for individual techniques like LSB embedding are not present in
the literature. Since too many images have to be inspected visually to sense hidden
messages, the development of a technique to automate the detection process will be very
valuable to the steganalyst. Our approach is based on the fact that hiding information in
digital media requires alterations of the signal properties that introduce some form of
degradation, no matter how small. These degradations can act as signatures that could be
used to reveal the existence of a hidden message. For example, in the context of digital
watermarking, the general underlying idea is to create a watermarked signal that is
perceptually identical but statistically different from the host signal. A decoder uses this
statistical difference in order to detect the watermark. However, the very same statistical
difference that is created could potentially be exploited to determine if a given image is
watermarked or not.
1.6 Statement of Problem:
The goals for this Project have been the following.
One goal has been to compile an introduction to the subject of steganography and
steganalysis. There exist a number of studies on various algorithms, but complete
treatments on a technical level are not as common. Material from papers, journals, and
conference proceedings are used that best describe the various parts.
Another goal has been to search for algorithms that can be used to implement for
the detection of steganographic techniques.
9
A third goal is to evaluate their performance of with different image quality
metrics. These properties were chosen because they have the greatest impact on the
detection of steganography algorithms
A final goal has been to design and implement the steganalysis detector in
MATLAB.
10
CHAPTER 2
WAVELET TRANSFORM
2.1 Overview:
Wavelets are mathematical functions defined over a finite interval and having an
average value of zero that transform data into different frequency components,
representing each component with a resolution matched to its scale.
The basic idea of the wavelet transform is to represent any arbitrary function as a
superposition of a set of such wavelets or basis functions. These basis functions or baby
wavelets are obtained from a single prototype wavelet called the mother wavelet, by
dilations or contractions (scaling) and translations (shifts). They have advantages over
traditional Fourier methods in analyzing physical situations where the signal contains
discontinuities and sharp spikes. Many new wavelet applications such as image
compression, turbulence, human vision, radar, and earthquake prediction are developed in
recent years. In wavelet transform the basis functions are wavelets. Wavelets tend to be
irregular and symmetric. All wavelet functions, w(2kt - m), are derived from a single
mother wavelet, w(t). This wavelet is a small wave or pulse like the one shown in Figure
2.1.
Normally it starts at time t = 0 and ends at t = T. The shifted wavelet w(t - m)
starts at t = m and ends at t = m + T. The scaled wavelets w(2kt) start at t = 0 and end at t
= T/2k. Their graphs are w(t) compressed by the factor of 2k as shown in Figure 2.2. For
example, when k = 1, the wavelet is shown in Figure 2.2(a). If k = 2 and 4, they are
shown in (b) and (c), respectively.
11
Figure 2.1 Mother wavelet w(t)
(a)w(2t) (b)w(4t) (c)w(8t)
Figure 2.2 Scaled wavelets
12
The wavelets are called orthogonal when their inner products are zero. The
smaller the scaling factor is, the wider the wavelet is. Wide wavelets are comparable to
low-frequency sinusoids and narrow wavelets are comparable to high-frequency
sinusoids.
2.2 Scaling:
Wavelet analysis produces a time-scale view of a signal. Scaling a wavelet simply
means stretching (or compressing) it. The scale factor is used to express the compression
of wavelets and often denoted by the letter a. The smaller the scale factor, the more
“compressed” the wavelet. The scale is inversely related to the frequency of the signal in
wavelet analysis.
2.3 Shifting:
Shifting a wavelet simply means delaying (or) hastening its onset.
Mathematically, delaying a function f(t) by k is represented by: f(t-k) and the schematic
is shown in Figure 2.3.
(a) Wavelet function (t) (b) Shifted wavelet function (t-k)
Figure 2.3 Shifting of Wavelets
2.4 Scale and Frequency:
13
The higher scales correspond to the most “stretched” wavelets. The more
stretched the wavelet, the longer the portion of the signal with which it is being
compared, and thus the coarser the signal features being measured by the wavelet
coefficients. The relation between the scale and the frequency is shown in Figure 2.4.
Low scale High scale
Figure 2.4 Scale and frequency of Wavelets
2.5 Discrete Wave Transform:
Calculating wavelet coefficients at every possible scale is a fair amount of work,
and it generates an awful lot of data. If the scales and positions are chosen based on
powers of two, the so-called dyadic scales and positions, then calculating wavelet
coefficients are efficient and just as accurate. This is obtained from discrete wavelet
transform (DWT).
14
2.5.1 One-Stage Filtering:
For many signals, the low-frequency content is the most important part. It is the
identity of the signal. The high-frequency content, on the other hand, imparts details to
the signal. In wavelet analysis, the approximations and details are obtained after filtering.
The approximations are the high-scale, low frequency components of the signal. The
details are the low-scale, high frequency components. The filtering process is
schematically represented as in Figure2.5.
Figure 2.5 Single stage filtering
The original signal, S, passes through two complementary filters and emerges as
two signals. Unfortunately, it may result in doubling of samples and hence to avoid this,
downsampling is introduced. The process on the right, which includes downsampling,
produces DWT coefficients. The schematic diagram with real signals inserted is as shown
in Figure 2.6.
15
Figure 2.6 Decomposition and decimation
2.5.2 Multiple-Level Decomposition:
The decomposition process can be iterated, with successive approximations being
decomposed in turn, so that one signal is broken down into many lower resolution
components. This is called the wavelet decomposition tree and is depicted as in Figure
2.7.
Figure 2.7 Multilevel decomposition
2.5.3 Wavelet Reconstruction:
The reconstruction of the image is achieved by the inverse discrete wavelet
transform (IDWT). The values are first upsampled and then passed to the filters. This is
represented as shown in Figure 2.8.
16
Figure 2.8 Wavelet Reconstruction
The wavelet analysis involves filtering and downsampling, whereas the wavelet
reconstruction process consists of upsampling and filtering. Upsampling is the process of
lengthening a signal component by inserting zeros between samples as shown in Figure
2.9.
Figure 2.9 Reconstruction using up sampling
17
2.5.4 Reconstructing Approximations and Details:
It is possible to reconstruct the original signal from the coefficients of the
approximations and details. The process yields a reconstructed approximation which has
the same length as the original signal and which is a real approximation of it.
The reconstructed details and approximations are true constituents of the original
signal. Since details and approximations are produced by downsampling and are only half
the length of the original signal they cannot be directly combined to reproduce the signal.
It is necessary to reconstruct the approximations and details before combining them. The
reconstructed signal is schematically represented as in Figure 2.10.
Figure 2.10 Reconstructed signal components
2.6 1-D Wavelet Transform:
The generic form for a one-dimensional (1-D) wavelet transform is shown in
Figure 2.11. Here a signal is passed through a low pass and high pass filter, h and g,
respectively, then down sampled by a factor of two, constituting one level of transform.
Figure 2.11 1-D Wavelet Decomposition
18
Repeating the filtering and decimation process on the lowpass branch outputs
make multiple levels or “scales” of the wavelet transform only. The process is typically
carried out for a finite number of levels K, and the resulting coefficients are called
wavelet coefficients.
The one-dimensional forward wavelet transform is defined by a pair of filters s
and t that are convolved with the data at either the even or odd locations. The filters s and
t used for the forward transform are called analysis filters.
nL nH
li = ∑ sjx2i+j and hi = ∑ tjx2i+1+j
j=-nl j=-nH
Although l and h are two separate output streams, together they have the same
total number of coefficients as the original data. The output stream l, which is commonly
referred to as the low-pass data may then have the identical process applied again
repeatedly. The other output stream, h (or high-pass data), generally remains untouched.
The inverse process expands the two separate low- and high-pass data streams by
inserting zeros between every other sample, convolves the resulting data streams with
two new synthesis filters s’ and t’, and adds them together to regenerate the original
double size data stream.
nH nl
yi = t’jl’
i+j + s’j h’
i+j where l’2i = li, l’ 2i+1 = 0
j= -nH j= -nH h’2i+1 = hi, h’2i = 0
To meet the definition of a wavelet transform, the analysis and synthesis filters s,
t, s’ and t’ must be chosen so that the inverse transform perfectly reconstructs the original
19
data. Since the wavelet transform maintains the same number of coefficients as the
original data, the transform itself does not provide any compression. However, the
structure provided by the transform and the expected values of the coefficients give a
form that is much more amenable to compression than the original data. Since the filters
s, t, s’ and t’ are chosen to be perfectly invertible, the wavelet transform itself is lossless.
Later application of the quantization step will cause some data loss and can be used to
control the degree of compression. The forward wavelet-based transform uses a 1-D sub-
band decomposition process; here a 1-D set of samples is converted into the low-pass
sub-band (Li) and high-pass sub-band (Hi). The low-pass sub-band represents a down
sampled low-resolution version of the original image. The high-pass sub-band represents
residual information of the original image, needed for the perfect reconstruction of the
original image from the low-pass sub-band
2.7 2-D Transform Hierarchy:
The 1-D wavelet transform can be extended to a two-dimensional (2-D) wavelet
transform using separable wavelet filters. With separable filters the 2-D transform can be
computed by applying a 1-D transform to all the rows of the input, and then repeating on all of
the columns.
LL1 HL1
LH1 HH1
Figure 2.12 Sub-band Labeling Scheme for a one level, 2-D Wavelet Transform
20
The original image of a one-level (K=1), 2-D wavelet transform, with
corresponding notation is shown in Figure 2.12. The example is repeated for a three-level
(K =3) wavelet expansion in Figure 2.13. In all of the discussion K represents the highest
level of the decomposition of the wavelet transform.
LL1 HL1
HL2
HL3
LH1 HH1
LH2 HH2
LH3 HH3
Figure 2.13 Sub-band labeling Scheme for a Three Level, 2-D Wavelet Transform
The 2-D sub-band decomposition is just an extension of 1-D sub-band
decomposition. The entire process is carried out by executing 1-D sub-band
decomposition twice, first in one direction (horizontal), then in the orthogonal (vertical)
direction. For example, the low-pass sub-bands (Li) resulting from the horizontal
direction is further decomposed in the vertical direction, leading to LLi and LHi sub-
bands.
Similarly, the high pass sub-band (Hi) is further decomposed into HLi and HHi.
After one level of transform, the image can be further decomposed by applying the 2-D
sub-band decomposition to the existing LLi sub-band. This iterative process results in
multiple “transform levels”. In Figure 2.13 the first level of transform results in LH 1,
HL1, and HH1, in addition to LL1, which is further decomposed into LH2, HL2, HH2, LL2
21
at the second level, and the information of LL2 is used for the third level transform. The
sub-band LLi is a low-resolution sub-band and high-pass sub-bands LHi, HLi, HHi are
horizontal, vertical, and diagonal sub-band respectively since they represent the
horizontal, vertical, and diagonal residual information of the original image. An example
of three-level decomposition into sub-bands of the image CASTLE is illustrated in Figure
2.14.
Figure 2.14 The process of 2-D wavelet transform applied through three transform levels
To obtain a two-dimensional wavelet transform, the one-dimensional transform is
applied first along the rows and then along the columns to produce four sub-bands: low-
resolution, horizontal, vertical, and diagonal. (The vertical sub-band is created by
applying a horizontal high-pass, which yields vertical edges.) At each level, the wavelet
22
transform can be reapplied to the low-resolution sub-band to further decorrelate the
image. Figure 2.14 illustrates the image decomposition, defining level and sub-band
conventions used in the AWIC algorithm. The final configuration contains a small low-
resolution sub-band. In addition to the various transform levels, the phrase level 0 is used
to refer to the original image data.
2.8 Wavelet Computation:
In order to obtain an efficient wavelet computation, it is important to eliminate as
many unnecessary computations as possible. A careful examination of the forward and
reverse transforms shows that about half the operations either lead to data which are
destroyed or are null operations (as in multiplication by 0).
The one-dimensional wavelet transform is computed by separately applying two
analysis filters at alternating even and odd locations. The inverse process first doubles the
length of each signal by inserting zeros in every other position, then applies the
appropriate synthesis filter to each signal and adds the filtered signals to get the final
reverse transform.
2.9 Algorithms and Transformations:
Another steganography method is to hide data in mathematical functions that are
in compression algorithms. Two functions are Discrete Cosine Transformation (DCT)
and Wavelet Transformation. The DCT and wavelet functions transform data from one
domain into another. The DCT function transforms that data from a spatial domain to a
frequency domain.
Figure 2.15 Discrete Cosine Transformation (DCT)
23
The DCT function:
. The idea behind it in regard to steganography is to hide the data bits in the least
significant coefficients.
2.10 To Encode the Hidden Data:
Figure 2.16 Graphical representation to encode the hidden data
Take the DCT or wavelet transform of the cover image
Find the coefficients below a certain threshold
Replace these bits with bits to be hidden (can use LSB insertion)
24
Take the inverse transform
Store as regular image
2.11 To Decode the Hidden Data:
Figure 2.17 Graphical representation to encode the hidden data
Take the transform of the modified image
Find the coefficients below a certain threshold
Extract bits of data from these coefficients
Combine the bits into an actual message
25
CHAPTER 3
METHODS OF STEGANOGRAPHY
3.1 Adaptive Steganography Using Filtering:
Adaptive Steganography reduces modifications to the image, and adapts the
message embedding technique to the actual content and features of the image. In general,
to keep a good degree of stealth-ness, Adaptive methods embed message bits into certain
random clusters of pixels (avoiding areas of uniform color) selecting pixels with large
local standard deviation or image blocks containing a number of different colors. The
main advantage of adaptive steganography is that the changes made to the cover image
take into account the sensitivity of the human visual system and also various statistical
parameters generally being used by steg-analysis algorithms. The main challenge posed
to existing adaptive steganography techniques is that the methods so far developed
doesn't seem to have a way to control the amount of information that is to be hidden, for a
given cover image. This problem is overcome in the method presented in this paper.
The proposed approach utilizes the sensitivity of the human visual system to
adaptively modify the intensities of some pixels in a high frequency components spatial
image (HFSI) of the cover image. The modification of pixel intensities depends on the
magnitude of the pixels in HFSI and also on the local features of the cover image. If the
contrast of the image is large (e.g., an edge), the intensities can be changed greatly
without introducing any distortion to human eyes. On the other hand, if the contrast is
small (e.g. a smooth), the intensities can only be tuned slightly. In this method, first the
cover image is passed through a filter to separate the high and low frequency components
of the image. The inverse transform of both the images is computed. Now the pixels
values of HFSI are modified depending on the magnitude of the pixel i.e. more the
magnitude more the Least Significant Bits (LSB's) of that pixel are changed and also the
local features of cover image are considered. Now both the LFSI (Low Frequency
components spatial image of cover image) and HFSI are added to form the stego - image.
At the receiver the reverse process is to be done to recover the message.
26
There are four different methods of Steganography:
Least Significant Bit Insertion in Transformation Domain
Least Significant Bit Insertion in Spatial Domain
Reversible Data Embedding using Difference Expansion
Reversible Data Hiding
3.2 Introduction to LSB:
Maintaining the secrecy of digital information when being communicated over the
Internet is presently a challenge. Given the amount of cheap computation power available
and certain known limitations of the encryption methods it is not too difficult to launch
attacks on cipher-text. An ideal steganographic technique embeds message information
into a carrier image with virtually imperceptible modification of the image. Adaptive
steganography comes closer to this ideal since it exploits the natural variations in the
pixel intensities of a cover image to hide the secret message. The objective of
steganography is a method of embedding additional information into the digital contents
that is undetectable to listeners. We are investigating its embedding, detecting, and
coding techniques.
The idea behind the LSB algorithm is to insert the bits of the hidden message into
the least significant bits of the pixels. As the application domain of embedding data in
digital multimedia sources becomes broaden, several terms are used by various groups of
researchers, including steganography, digital watermarking, and data hiding. This paper
introduces a new, principled approach to detecting least significant bit (LSB)
steganography in digital signals such as images and audio. It is shown that the length of
hidden messages embedded in the least significant bits of signal samples can be estimated
with relatively high precision. The new steganalytic approach is based on some statistical
measures of sample pairs that are highly sensitive to LSB embedding operations. The
resulting detection algorithm is simple and fast. To evaluate the robustness of the
proposed steganalytic approach, bounds on estimation errors are developed. Furthermore,
the vulnerability of the new approach to possible attacks is also assessed, and counter
27
measures are suggested A detailed algorithm is presented along with results of its
application on some sample images.
3.3 Advantages of LSB Insertion:
A major advantage of the LSB algorithm is it is quick and easy. There has also
been steganography software developed which work around LSB color alterations via
palette manipulation. LSB insertion also works well with gray-scale images.
3.4 LSB Insertion in Transformation Domain:
The idea behind the LSB algorithm is to insert the bits of the hidden message into
the least significant bits of the pixels.
Simplified Example with a 24 bit pixel:
1 pixel:
(00100111 11101001 11001000)
Insert 101:
(00100111 11101000 11001001)
Red green blue
Simplified Example with an 8 bit pixel:
1 pixel:
(00 01 10 11)
White red green blue
Insert 0011:
(00 00 11 11)
white white blue blue
28
3.5 LSB Insertion in Spatial Domain:
Usually 24-bit or 8-bit files are used to store digital images. The former one
provides more space for information hiding however, it can be quite large. The colored
representations of the pixels are derived from three primary colors: red, green and blue.
24-bit images use 3 bytes for each pixel, where each primary color is represented by 1
byte. Using 24-bit images each pixel can represent 16,777,216 color values. We can use
the lower two bits of these color channels to hide data, then the maximum color change in
a pixel could be of 64-color values, but this causes so little change that is undetectable for
the human vision system. This simple method is known as Least Significant Bit insertion
Using this method it is possible to embed a significant amount of information with no
visible degradation of the cover image. Figure 3.11 shows the process.
Several versions of LSB insertion exist. It is possible to use a random number
generator initialized with a stego-key and its output is combined with the input data, and
this is embedded to a cover image. For example in the presence of an active warden it is
not enough to embed a message in a known place (or in a known sequence of bits)
because the warden is able to modify these bits, even if he can’t decide whether there is a
secret message or not, o r he can’t read it because it is encrypted. The usage of a stego-
key is important, because the security of a protection system should not be based on the
secrecy of the algorithm itself, instead of the choice of a secret key. Figure 3.2 shows this
process. The LSB inserting usually operates on bitmap images. ‘Steganos for Windows’
and ‘Wbstego’ are LSB inserting software products which are able to embed data (in
clear or encrypted format) in a bitmap image. The embedded data cannot be considered
as a watermark, because even if a small change occurs in a picture (cropping, lossy
compression, color degradation) the embedded information will be lost – although the
change which is occurred during the embedding process is invisible.
29
Figure 3.1 Graphical representation of LSB insertion
Figure 3.2 Stego Image formation through LSB insertion
30
3.5.1 Algorithm:
Step 1: Let the cover image is represented by c(x,y). It is then passed through a filter
with transfer function h(x,y) to separate high and low frequency components.
F[c(x, y)] = C(X, Y)
Where C(X, Y) represents Fourier Transform of the cover image. In this paper capital
letters representation for pixel is used for frequency domain and small letters for spatial
Representation.
C(X, Y)H(X, Y) = LO(X, Y) + HI(X, Y)
Where LO(X, Y), HI(X, Y) represent low frequency and high frequency components of
cover image respectively, obtained after passing through the filter with cut off as stated
above.
Step 2: Inverse transform of both the frequency components is found out, known as HFSI
(High Frequency components Spatial Image) and LFSI (Low Frequency components