You are on page 1of 6

International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: 10 No: 06

30

Improving Embedding Capacity with Minimum


Degradation of Stego-image
Mahwish Bano, Tasneem M. Shah, and Shaheryar Malik

AbstractEmbedding maximum information in a stego-image


with minimum change in its appearance has been a major concern
in image-based steganography techniques. In this paper, we present
a strategy of attaining maximum embedding capacity in an image in
a way that maximum possible neighboring pixels are analyzed for
their frequencies, to determine the amount of information to be
added in each pixel. The technique provides a seamless insertion of
data into the carrier image and reduces the error assessment and
artifacts insertion required to a minimal. We
justify our
approach with the help of an experimental evaluation on a
prototypic implementation of the proposed model.

KeywordsSteganography, Least Significant Bit Insertion,


Security and Cryptography
I. INTRODUCTION
TEGANOGRAPHY is an art of transferring message in a
way that the existence of message is concealed.
Steganography can utilize various medium as carriers of
the message. These mediums may include the classical
methods of steganography using text, like character marking,
invisible ink, using pin pictures, type-writer correction),
images, and audio, video signals. Most of the steganography
techniques use images a stego-medium. Information can be
hidden in images through many different ways. The most
common approaches to information hiding in images are:
Least significant bit (LSB) insertion [5], Masking and filtering
techniques [3], Algorithms and transformations [3].
Masking and filtering techniques hide information by
marking an image in a manner similar to paper watermarks
[2]. Because watermarking techniques are more integrated
into the image, they may be applied without fear of image
destruction from lossy compression.
The least significant bit insertion (LSB) is the most widely
used image steganography technique [2]. It embeds message
in the least-significant bits of each pixel. In order to increase
the embedding capacity, two or more bits in each pixel can be

.
T.M. Shah,Professor/Chair Department of Mathematics, Air
University,Islamabad,Pakistan(email:dr.tasneem@mail.au.edu.pk )
Mahwish Bano, Assistant professor, Air University, Islamabad,
Pakistan (email: mahwish@mail.au.edu.pk)
S. Malik, Assistant professor,Air University,Islamabad,
Pakistan(email:malikshary@yahoo.com)

used to embed message, which has high risk of delectability


and image degradation [8]. The LSB techniques might use a
fixed least significant bit insertion scheme, in which the bits of
data added in each pixel remains constant, or a variable least
significant bit insertion, in which the number of bits added in
each pixel vary on the surrounding pixels, to avoid degrading
the image fidelity
In this paper we discuss the embedding of text into image
through variable size least significant bit insertion. The
process of insertion of text in our proposed approach is not
sequential, rather it follows a random order, based on a
random algorithm. The technique proposed aims at providing
not only maximum insertion capacity, but also performs a
maximum analysis of surrounding pixels to determine the
embedding capacity of each pixel. The process results in a
stego-image which is very much similar in appearance to the
original image.
The rest of the paper is organized as follows: Section II
discusses the proposed steganography model and its different
stages, Section III presents an experimental evaluation of the
proposed steganography model, and Section IV discusses the
conclusion and future work.
II. PROPOSED STEGANOGRAPHY MODEL
In this section, we propose a steganography model that
ensures maximum embedding of information in both gray
scalale and colored images, and also ensures that maximum
pixels are analyzed to determine the embedding capacity. This
would lead to a reduction of the overall error induction in the
image. The stego-image obtained after application of this
analysis would not only have maximum amount of
information, but would also have the minimum difference in
appearance with the original image.
Fig 1 shows a block diagram of the proposed steganography
model. The approach used in the model requires a
random/pseudo-random number generation algorithm, and a
transposition algorithm. For simplicity, we use one of the
simplest algorithms for random number generation to explain
our model. In practice the model can utilize any of the other
well-accepted random generation algorithms [4][10],
depending on the nature of the message and security
requirements.
Discussion of different steps involved in model is:

100306-7474 IJBAS-IJENS December 2010 IJENS

IJENS

International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: 10 No: 06

31

Fig. 1 Proposed Steganography Model

According to the proposed model, following procedure


shall be followed at the senders end:
A. Encryption of the plain text
The plain text obtained can be optionally encrypted to
provide additional amount of security in the process. The
model does not propose any restriction on the type of
encryption technique utilized. Any of the symmetric or
asymmetric key ciphers can be applied. For public key based
ciphers we can utilize the ECC or RSA, while the block
ciphers that can be applied may include the DES cipher or the
RC-5. The decision of the type of cipher to be used is purely
the user-based decision, and he/she may or may not even
apply any encryption procedure.
B. Binary Conversion
In this step, the alphabetic plain text is converted into its
corresponding binary string. The conversion depends on the
standard being followed at the user end.
C. Transposition
In this step, the binary text obtained from the previous step

is transposed based on a suitable key. The transposition is on


the binary key, so that the transformation would remove the
occurrence of text characters in a sequence. Any of the
standard transposition techniques can be applied to transpose
the data. [6], [7], [9].
D. Random Location Marking
This step requires the carrier image, the transposed binary

text, and the initial seed, which would determine the


permutation combinations, as input. Based on the carrier
image the seed is calculated, so as to produce random distinct
combinations of locations in the image. Every pixel
corresponding to the random location is marked. The
algorithm for generation is shown in Fig. 2. The function
RANDOM generates a pseudo-random value based on a seed.
The algorithm takes care that for each pixel location (x, y), not
more than four neighboring pixels are marked. If the
RANDOM function generates such a number, then the
number would be discarded and next random would be
generated. Any standard pseudo-random number generation
function can be used in place of the RANDOM function. One
of the functions to generate the random numbers is shown
below:

100306-7474 IJBAS-IJENS December 2010 IJENS

IJENS

International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: 10 No: 06

32

RANDOM Xn+1= (Seed * Xn + C^2 ) mod m, where m is the total


length of image.
Capacity of the image.
Description: image_startX and image_startY are the starting location of the carrier image, image_endX and image_endY are the
ending locations of the carrier image, randomFunctionSeed is the seed given as input to the RANDOM function, binaryText is the
text that has to be inserted in the image; binary.getLength():integer returns the length binary string, initializeRANDOM function
initializes the RANDOM function with a seed, the maximum length and the maximum number that can be generated by the
algorithm, nextRANDOM():integer returns the next random number generated by RANDOM, MOD(a,b) returns the modulus of a
and b, DIV(a,b) returns the divisor of a and b, Locations.add(integer, integer) adds the coordinates passed into the Locations,
Locations is the class storing the random marked locations (x, y coordinates of the image)

MarkRandom (integer image_startX, integer image_startY, integer image_endX, integer imageEndY, integer randomFunctionSeed,
binary binaryText): Locations
1. {
2. Locations randomMarkedLocations
3. binTextLength = binaryText. getLength()
4. initializeRANDOM(randomFunctionSeed, binaryTextLength, image_endX image_startX * image_endY image_startY, )
5. integer ranNum = nextRANDOM()
6. image_startX + newX = MOD(ranNum, image_endX image_startX)
7. image_startY + newY = DIV(ranNum, image_endX image_startX)
8 randomMarkedLocations.add(newX, newY)
9. return randomMarkedLocations
10. }
Fig. 2 Algorithm for Random Location Marking

E. Error Assessment and Embedding


Error assessment in the proposed model would vary and
would be dependent on the number of neighboring pixels that
are being analyzed for each marked pixel. Greater the number
neighboring pixels being analyzed smaller would be the
amount of error induction.
The embedding process determines the embedding capacity
of each pixel from the neighboring pixels and inserts the
transposed binary in to the image. The text is inserted in the
image in each marked pixel in a sequential order. We could
have opted for a random insertion, but the sequential insertion
allows us to have a run-time analysis of variable embedding
capacity of each marked pixel and would also remove the
check of having at least four unmarked bits in neighbors of
each marked pixel, thus increasing the overall insertion

Algorithm for the sequential insertion process is shown in


Fig. 3. According to sequential insertion algorithm, the first
pixel marked is picked. All unmarked neighboring pixels are
analyzed, which would also include the four preceding pixels
that have already been analyzed. The four preceding pixels are
highlighted in Fig. 4. The analysis process used is similar to
the process followed in [1], but the variation is that the authors
of one restricted their frequency analysis to only the four
preceding pixels, but our model allows a possibility of
analysis of all unmarked neighboring pixels.
For Gray Scale 8-bit images following process is followed.
Compute the intensity f(x,y) at pixel position x,y to
calculate the embedding capacity E(x,y). Then compute the
maximum [Max(x,y)] and minimum [Min{x,y)] from the
upper and left neighboring pixels of x,y location pixel, and all

Embed(binary dataToInstrument, image carrierImage): image


{
1.
2.
integer cur_x = carrierImage.getStartX()
3.
integer cur_y = carrierImage.getStartY()
4. Do
(isMarked(pixel(cur_x, cur_y))
5. if
6.
pixels[] neighboringPixels = getUnmarkedNeighboringPixels(pixel(cur_x,cur_y))
7.
capacity = analyzeFrequency(neighboringPixels)
8.
insertData(data, capacity, carrierImage)
9.
data=data-capacity
10. else
if(cur_y < carrierImage.getEndY())
11.
12.
increment cur_y
13.
else
14.
increment cur_x
15.
While (cur_x <= carrierImage.getEndX() and cur_y < carrierImage.getEndY()
16.
return carrierImage
Fig. 3 Algorithm for Sequential Embedding of Data

100306-7474 IJBAS-IJENS December 2010 IJENS

IJENS

International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: 10 No: 06


available unmarked neighboring pixels . Max(x,y) = Max {
f(x-1,y-1), f(x-1,y), f(x-1,y+1) ,f(x,y-1), f(x, y+1), f(x+1, y-1),
f(x+1, y), f(x+1, y+1)} and Min(x,y) = Min { f(x-1,y-1), f(x1,y), f(x-1,y+1), f(x,y-1),
f(x,y+1), f(x+1,y-1), f(x+1,y),
f(x+1,y+1)}. Now compute the difference [Diff(x,y)] between
maximum [Max(x,y)] and minimum [Min(x,y)].

(x-1,y-1)

(x-1,y)

(x-1,y+1)

(x,y-1)

(x,y)

(x,y+1)

(x+1,y-1)

(x+1,y)

(x+1,y+1)

Fig. 4 Eight Neighboring pixels (with 4 preceding pixels


highlighted)

Now estimate the embedding capacity sing the procedure


shown in [1]. Due to the inclusion of pixels, other than the
four preceding pixel in the capacity assessment allows us to
have more precise judgment of embedding capacity and
minimizes the error assessment required in the proposed
methodology.
After the embedding process is complete, the stego-image is
transferred to the receiver, who then obtains the plain text
using the procedure shown in Fig. 1.
Following we will explain the procedure followed at the
receiver end.
A. Random Location Marking
In this step the random location in the stego-image are
marked using the same algorithm and the same seed used at
the senders end. This step would result in the marking of
locations that actually include the binary text.
B. Extraction
In the extraction step, same procedure is followed as in the
embedding step. The embedding capacity of each marked
pixel is obtained using the same algorithm as at the senders
side (Fig. 3). After the embedding capacity of each marked
pixel is obtained, sequential retrieval of data from pixels is
performed. The binary text obtained is transposed originally,
so the process of inverse transposition should be performed on
it before the actual retrieval of alphabetic text.
C. Inverse Transposition
In this step the binary text is passed through an inverse
transposition sequence, using the same permutation and key as
done at the senders end.
D. Alphabetic Conversion
In this step, the binary string obtained is converted to the
conversion to binary and vice versa. We have applied a

33

corresponding string of alphabets, based on the standard


mutually agreed between the sender and the receiver.
E. Decryption
This step is optional and is performed only if an encryption
process was conducted at the senders end. The decryption
process is the inverse of the encryption process performed and
reveals the original plain text message.
III. EXPERIMENTAL EVALUATION USING PROTOTYPE
For the proof of concept of our proposed approach we have
developed a prototype tool. The tool developed takes a key
and plain text as input. Based on the key it is determined
whether the plain text is to be encrypted or not. The key also
determines the type of encryption that is to be performed.
Currently the tool supports the DES and RSA as encryption
techniques. We have used the ASCII standard for alphabet
classical transposition technique for transposition process. The
binary text provided as input is converted into blocks of size
equivalent to the key. The blocks are placed in rows, and the
column positions are transposed based on the key. We have
used this simplistic approach due to ease of development and
ease of understanding. Any complex transposition technique is
compatible with our model and can be developed for the tool.
The random allocation marking and embedding procedure is
an implementation of the algorithms discussed above.
Following we present an experiment conducted with the
developed prototype tool. The developed tool was developed
in JAVA using the Java Advance Imaging API. The tool is
independent of the platform because of the language used to
develop it. Fig. 5 shows four different experiments conducted
on same image. Fig. 5a shows the original image on which the
experiment was conducted. Fig 5b is a stego image obtained
by 4-LSB insertions . Fig 5c shows the image obtained after
performing the steganography proposed by Lee method [2].
Fig 5d is obtained from the experiment conducted in [1]. Fig.
5e shows the image obtained by applying steganography using
the proposed methodology. Image obtained by the proposed
model is very much similar to the original and is closer to the
original than the one obtained from method in [1]. The
difference between our proposed model and the one proposed
in [1] is the number of pixels that are used in analysis of the
embedding capacity. The error rate is negligibly minimized as
the number of surrounding pixels analyzed increases. In the
method proposed in [1], only four preceding pixels were
analyzed, but our proposed model provides a provision of
analysis of maximum possible surrounding pixels, thus
reducing the amount of error possible. Further our proposed
methodology uses transposition on binary string which would
remove any chances of obtaining the original text from the
image even if the technique is known and no encryption is
performed.
The proposed approach results in an image having no
artifacts and false counter. The stego-image generated by our

100306-7474 IJBAS-IJENS December 2010 IJENS

IJENS

International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: 10 No: 06


approach has an embedding capacity greater than the 4 LSB
method and almost equivalent to the Lee method [2].
Although embedding capacity is less than Lee [2] and 4-LSB,
but it is robust and no one can judge the difference between
original image and the stego image. Table-1 shows a

34

comparison of our proposed methodology with the 4 LSB


method, Lee method, and the method proposed in [1]. The
table clearly shows the increase in data capacity of the image
to a 51% embedding capacity of the image.

Fig. 5a Original cover Image

Fig. 5b Stego image using 4 LSB Method

Fig. 5c Stego Image using Lee Method

Fig. 5d Stego Image using Method Proposed in [1]

Fig. 5e Stego Image using Proposed Method


Fig. 5 Comparison of stego-image produced by different methods

TABLE 1
RESULTS OF EMBEDDING USING DIFFERENT METHODS
Method

Image Size

Message Size

Capacity (bits

False

Artifacts

RMS

PSNR

4 LSB Method
Lees Method [2]
Maliks Method [1]
Proposed Method

(bytes)
9480x3
9480x3
9480x3
9480x3

(bytes)
14220
14298
10604
14270

per pixel)
50%
51%
41%
51%

Contour
Yes
No
No
No

Yes
Yes
No
No

3.52
3.15
2.18
2.50

40.63
41.88
43.10
42.30

RMS: Root Mean Square, PSNR: Peak Signal to Noise Ratio

100306-7474 IJBAS-IJENS December 2010 IJENS

IJENS

International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: 10 No: 06

35

IV. CONCLUSION AND FUTURE WORK


We have presented a steganography model that attains the
maximum LSB capacity and utilizes the maximum number of
surrounding pixels to attain an optimal embedding capacity
that ensures the seamless inclusion of data into the image. We
have transposed the binary equivalent of data and have
selected the pixels for the insertion of data in random order to
remove the tracking of sequential data in the image. We have
justified our approach with the help of a prototype and have
provided a comparison of effectiveness of our approach with
other well-established and related works. Our future work
aims at enhancing our current approach to increase the data
capacity in the stego-image.
REFERENCES
[1]

S. Malik, T.M. Shah, A Framework to Attain Optimal Embedding


Capacity in Image Steganography using Dynamic LSB Technique,
submitted at the
IEEE International Conference on Emerging
Technologies (ICET), June 2005
[2] Y. K. Lee & L. H. Chen, High Capacity Image Steganography,
Department of Computer Science & Information Science, National
Chiao Tung University, Taiwan, R.O.C.
[3] W. Bender, D. Gruhl, N. Morimoto, and A. Lu. Techniques for data
hiding, In IBM Systems Journal, Vol. 35, Nos. 3-4, pages 313-336,
February 1996.
[4] U. V. Vazirani, V. V. Vaziarani, Efficient and Secure Pseudo-Random
Number Generation, In Proceedings of IEEE Symposium on
Foundations of Computer Science, 1984, 458 463
[5] E.T. Lin, E.J.DELP, A review of data hiding in digital images, in
Conference on Image Processing, Image Quality, Image Capture
Systems, PICS, April 1999, 274-278
[6] N.J.A. Sloane, Encrypting by Random Rotations," Lecture Notes in
Computer Science 149, 71-128, Springer-Verlag, 1983
[7] W. Stallings, Cryptography and Network Security: Principles and
rd
Practice 3 ed. Prentice Hall, August 2002
[8] N.F. Johnson and S. Jajodia. Exploring steganography: Seeing the
unseen, Computer, 31, no 2:26-34, February 1998.
[9] B. Schneier, Applied cryptography , Wiley, NewYork, 1996, 2nd
edition
[10] M. Naor, O. Reingold, A. Rosen , Pseudo-Random Functions and
Factoring, in SIAM Journal of Computing, 2002

100306-7474 IJBAS-IJENS December 2010 IJENS

IJENS