A Generic LSB-based Embedding Algorithm

Survey on Image steganographic techniques
Priya Metri 1, Sharmistha Desai2
1,2
Department of Computer engineering
MIT-COE
Pune
Abstract - Steganography is the art of hiding the fact that
communication is taking place, by hiding information in other
information. Many different carrier file formats can be used, but
digital images are the most popular because of their frequency
on the internet. For hiding secret information in images, there
exists a large variety of steganography techniques some are more
complex than others and all of them have respective strong and
weak points. Different applications may require absolute
invisibility of the secret information, while others require a large
secret message to be hidden. In this paper the comparative study
of different steganographic techniques is done for hiding an
image into cover image and a proposed scheme using Shamir’s
secret sharing algorithm.
Keywords- Steganography, Secret Sharing, (K, N) Threshold,
Least substitution Method, Pixel Value Differencing, DWT.
I. INTRODUCTION
Steganography is the art of covered or hidden
writing.
The
purpose
of steganography is
covert
communication to hide a message from a third party. This
differs from cryptography, the art of secret writing, which is
intended to make a message unreadable by a third party but
does not hide the existence of the secret communication.
The steganography process generally involves placing a
hidden message in some transport medium, called the carrier.
The secret message is embedded in the carrier to form
the steganography medium. The use of a steganography key
may be employed for encryption of the hidden message
and/or for randomization in the steganography scheme. In
current techniques steganography can be categorized by the
cover medium.
2.
Image steganography in frequency domain.
Steganography is broadly classified in to spatial and
frequency domain technique. Least Significant Bit (LSB)
replacement, LSB matching, Matrix embedding and Pixel
value differencing are some of the spatial domain techniques.
Spatial domain steganographic techniques employ a
simple technique in creating a covert channel in parts of the
cover image which its method is to hide information in the
least significant bit (LSB) of image data. Nevertheless, if
lossy compression is used, the hidden information might be
loss.
Another technique is the transform domain technique
which it embeds information in the frequency domain of a
signal and is much more robust than embedding principles
that operate in the time domain. The advantage of this
technique is it hides the information of image and less
exposure to compression, cropping and image processing.
Spread spectrum technique is deal with the cover
image as noise or try to add pseudo noise to the cover image.
The cover image (noise) can add a single value to that cover
image . As a result, the hidden data is spread through the
cover image and unreadable to the third party.
1.
Text Steganography
2.
Image Steganography
3.
Audio Steganography
Least-Significant-Bits Substitution :
4.
Video Steganography
The most well-known steganographic technique in
the data hiding field is least-significant-bits (LSBs)
substitution proposed in [1]. The least significant bit i.e. the
eighth bit inside an image is changed to a bit of the secret
message. When using a 24-bit image, one can store 3 bits in
each pixel by changing a bit of each of the red, green and blue
color components, since they are each represented by a byte.
The embedding process consists of choosing a subset {j1,…,
jL(m)} of cover elements and performing the substitution
operation LSB
This paper’s focus is on the review of steganography in
digital images and a proposed scheme using Shamir’s secret
sharing algorithm.
II. LITERATURE SURVEY
I.
To hide information, straight message insertion may
encode every bit of information in the image or selectively
embed the message in “noisy” areas that draw less attention—
those areas where there is a great deal of natural color
variation. The message may also be scattered randomly
throughout the image. A number of ways exist to hide
information in digital media. Image steganography techniques
are divided into two categories
1. Image steganography in spatial domain
Image Steganography
II. Image Steganography Methods:
(cji) = mi (mi can be either 1 or 0).
In the extraction process, the LSB of the selected
cover-elements are extracted and used to reconstruct the
secret message.
A Generic LSB-based Embedding Algorithm
Input :Cover C
obviously, the hidden data in p- and p+ are identical to
pi because the last k bits of them are the same. The best
approximation to the original pixel value, p i, (i.e., the optimal
candidate) is found by the following formula:
For i=1to Length(m) do
Compute index ji where to store ith message bit of m
Sji  LSB(Cji )=mi
End for
Output:stego-object S
Advantages of LSB.
1. 100 % chances of insertion.
2. Easy to implement.
Disadvantages of LSB.
1. One of the major disadvantage associated with LSB
method is that intruder can change the least significant bit of
all the image pixels. In this way hidden message will be
destroyed by changing the image quality, a little bit, i.e. in
the range of +1 or -1 at each pixel position.
Finally, all the optimal candidates for
replace the
original pixel values pi and the embedding algorithm come to
its end.
The inputs of the algorithm are secret image S and
cover image C and the output is stego-image C`. M and N are
the height and the width and i and j are the coordinate of the
cover image C.
Inputs: Transformed Secret ImageS`, Cover Image C Output:
Stego-image C`
2. Not immune to noise and compression technique
Optimum Pixel Adjustment Procedure :
The simple LSB method can be modified to improve
the quality of stego-image. The algorithms of such improved
schemes are still based on simple LSB method. In this section
one of the improved methods, called Optimal LSB which
applies Optimal Pixel Adjustment Process (OPA) to improve
the stego-image quality is presented referenced by[2]. Three
candidates are picked out for the pixels value and compared
to see which one has the closest value to the original pixel
value with the secret data embedded in. The best candidate is
then called the optimal pixel and used to conceal the secret
data .The embedding process is described as follows:



Let pi be the original pixel value and k bit (s) be secret
data to be embedded
Embed k bit (s) of secret data into p i by using the LSBs
method. The stego-image pi can then be obtained
Generate another two pixel values by adjusting the (k +
1)th bit of pi. Therefore, p- and p+ can be calculated as
follows:
The secret image S is rearranged to become S’by
the same size as the cover image C but with the smaller bit
plane than the k bit plane of cover image (k is embedded bit
plane).
Pixel-value differencing (PVD) :
Pixel-value differencing (PVD) based steganography
is one of popular approaches for secret data hiding in the
spatial domain. In the original PVD scheme proposed by Wu
and Tsai [3]. In PVD-based schemes, the number of
embedded bits is determined by the difference between the
pixel and its neighbor. The larger the difference amount is,
the more secret bits can be embedded. the procedure of data
embedding is shown as follows.
 Step 1 : A cover image is first rearranged as a row vector
by running thought all rows in a raster scanning manner. The
vector is then divided into non overlapping
1-by-2
embedding units. For each unit, say [gi, gi+1], a differenced is
calculated by d = gi+1 − gi, where gi, gi+1 ∈ [0, . . . , 255].
 Step 2 : And then the absolute difference |d|, where |d| ∈
[0, . . . , 255], is classified into a number of contiguous ranges
denoted as Ri, where i = 1, 2, . . . n. The lower bound, upper
bounds and the width of region Ri are denoted as li, ui and wi,
respectively. A typical setting of the regions is that [0 7], [8
15], [16 31], [32 63], [64 127] and [128 255]. Assuming |d|
belongs to region Rk, here k ∈ [1, 2 . . . 6].
 Step 3 : Determine the number of embedded bits by
n = _log2(wk)
then select the next sub-stream with n bits from the secret
message, and transfer them into a decimal value b.
The frequency domain transform we applied is HaarDWT, the simplest DWT [4].A steganography technique
which embeds the secret messages in frequency domain.
According to different users’ demands on the embedding
capacity and image quality, the proposed algorithm is divided
into two modes and 5 cases. Unlike the space domain
approaches, secret messages are embedded in the high
frequency coefficients resulted from Discrete Wavelet
Transform. Coefficients in the low frequency sub-band are
preserved unaltered to improve the image quality.
Haar-DWT are described as follows:
Step 1:
At first, scan the pixels from left to right in
horizontal direction. Then, perform the addition and
subtraction operations on neighboring pixels. Store the sum
on the left and the difference on the right as illustrated in
Figure 1 . Repeat this operation until all the rows are
processed. The pixel sums represent the low frequency part
(denoted as symbol L) while the pixel differences represent
the high frequency part of the original image (denoted as
symbol H).
 Step 4 : Calculate the new difference d’ by
Then the new gray values (g’i, g’i+1) are computed
by
Figure 1: Horizontal Projection in step1
Step 2:
If g’i or g’i+1 is out of the range [0,255], then the
candidate embedding unit is marked as abandoned one. Note
that such unused units are few in most natural images and are
very easy to detect.
Secondly, scan the pixels from top to bottom in
vertical direction. Perform the addition and subtraction
operations on neighboring pixels and then store the sum on
the top and the difference on the bottom as illustrated in
Figure 2. Repeat this operation until all the columns are
processed. Finally we will obtain 4 sub-bands denoted as LL,
HL, LH, and HH respectively. The LL sub-band is the low
frequency portion and hence looks very similar to the original
image.
It can be proven that the new absolute difference |d’|
= |g’i+1− g’i| in the stego’image will fall into the same region
Rk as the difference |d| = |gi+1 − gi| in the cover image. So in
data extraction, if |d_| ∈ Rk, the embedded value can be
extracted
correctly by b = |d’| − lk.
A DWT Based Approach for Image Steganography
Figure 2 :Vertical Projection in step2
The whole procedure described above is called the first-order
2-D Haar-DWT.
Generate the Stegno image and display the resulting image.
III. PROPOSED WORK
In this paper we have proposed a technique using
Shamir’s (K,N) threshold scheme for image steganography.
Shamir's Secret Sharing is an algorithm in cryptography is a
form of secret sharing, where a secret is divided into parts,
giving each participant its own unique part, where some of the
parts or all of them are needed in order to reconstruct the
secret. Counting on all participants to combine together the
secret might be impractical, and therefore we sometimes use
the threshold scheme where any k of the parts are sufficient to
reconstruct the original secret.
Here we use n=3 images to hide a secret image in them
and k=2 images which is a minimum number of shares we
need to reconstruct the original secret image.
Algorithm for the construction of stegno image is as
follows :
Input :
1.
2.
Secret image which we have to hide in Camouflage
image.
Camouflage image to hide the secret image
Process for secret image recovery with stego-image
authentication.
Input :
a set of at least k stego-images
Output : a report of failure of secret recovery, or the original
secret image S if all the stego-images are authenticated to be
genuine.
Steps:
Step 1. Divide each stego-image into block each of the size
of 2 X 2 .
Step 2. For each stego-image perform the following steps to
recover the secret image pixel Si.
Step 3: For each image block take the value xji of the topleftmost pixel Xji of the 2 X 2 stego-image block B0 ji as a
value of xj appearing in Eq in algorithm 1 extract the data bits
of F(x) from those of the three pixels Wji, Uji, and Vji of B0
Algorithm:
Step 1 :Accept both images.
Step 2:Generate integer array of pixel values for both images.
Step 3: Truncate (replace) pixel values in Camouflage image
whose range is 251 to 255 with value 250.
Step 4: For each pixel in secret image and for each 2 X 2
block from camouflage image in sequential manner do
Step 4: Compute, by the use of equation given below the
corresponding value of y as the value si for the secret image
pixel Si in terms of the values of all xj and F (x).
Compute the reconstruction coefficients F(x) according to
equation
F(x)=
∏
i=1
j=1
(x - xj )
(xi − xj)
Step 5: Generate 2X2 image blocks of Camouflage image
Compute f(0) =
Step 6: Take the value xi of the top-leftmost pixel Xi of each
camouflage image block Bi as the value x.
F(0)= ∏
j=1
i=j
Step 7: Take the value s of the secret image pixel S as the
value y.
Step 8: Choose arbitrarily a set of k -1 integer values for use
as the mi . Here we take k=2.
Step 9: For each xi, compute the corresponding value of F(Xi)
using equation
(-xi)
(xi − xj )
Step 5 : Compose all the secret image pixels to form the
desired m X m secret image S as output and stop the
algorithm.
Execution time for different type of images using the
embedding algorithm of proposed scheme to hide the secret
image into a cover image is given below
F(x)=[ y+m1 * x + m2 *x 2 ……..mk-1*x k-1]
Here value of q is 251. As k=2 our equation will of a form
and we have to take two values of m ie m1,m2.
2
F(x)=[ y+m1 * x + m2 *x ] mod q
Step 10 : Convert value of F(x) to 8 bit .Hide the eight data
bits of F(x) in the data bits of the three pixels Wi , Ui, and Vi
of the corresponding camouflage image block Bi
Type of
image
Secret
Size
Execution time in
Millisec
Colour Image JPG
Format
25 X25
376 appox.
Colour
Image
PNG Format
25 X25
353appox.
Colour Image GIF
Format
25 X25
371appox.
Gary Scale image
100X100
3773 appox
Table 1 execution time of embedding algorithm using
different input images.
IV. CONCLUSION
In this paper we had a review over different methods
of steganography. As it is shown, each method has a
procedure of embedding for itself, and each one have some
advantages, and also disadvantages in comparison with other
methods of steganography. So it is not possible to say that a
specified method is the best method and best off all. Either,
it’s impossible to determine the worst one. We can just
compare them from different aspects, which results in
determining a suitable method for a specific usage. We have
also explained the way each algorithm works. It can help the
reader proportionally to understand why an algorithm is better
than another in a specific situation.
V. REFERENCES
[1] Chi-Kwong Chan, L.M. Cheng ‘ “Hiding data in images by
simple LSB substitution”, Department of Computer Engineering
and Information Technology, City University of Hong Kong,
Hong Kong Received 17 May 2002; received in revised form 11
July 2003; accepted 11 August 2003.
[2] Chi-Kwong Chan, L.M. Cheng, Improved hiding data in images
by optimal moderately significant-bit replacement, IEE Electron.
Lett. 37 (16) (2001) 1017–1018.
[3] Wu DC, Tsai WH (2003) A steganographic method for images
by pixel-value differencing.Pattern Recogn Lett 24:1613–162
[4] Chen, T. S., Chang, C. C., and Hwang, K. F., 2002. Digital
Image Processing, Taipei: Flag.
[5] R.Amirtharajan,
R.
Akila,
P.Deepikachowdavarapu
,“Comparative Analysis of Image Steganography” International
Journal of Computer Applications (0975 – 8887) Volume 2 –
No.3, May 2010
[6] Po-Yueh Chen and Hung-Ju Lin,” A DWT Based Approach for
Image Steganography” International Journal of Applied Science
and Engineering 2006. 4, 3: 275-290
[7] Chang-Chou Lin, Wen-Hsiang Tsai “Secret image sharing with
steganography and authentication” The Journal of Systems and
Software 73 (2004) 405–414