You are on page 1of 5

|LLL LLLLLZ14 1CoZCCC

Image Steganography Using Single Digit Sum with


Varying Base
Cherukuri Balakrishna
University of Hyderabad
Hyderabad, India
Email: 321baki @gmail. com
Valluru NaveenChandra
Institute for Development and
Research in Banking Technology (IDRBT)
Hyderabad, India
Raj arshi Pal
Institute for Development and
Research in Banking Technology (IDRBT)
Hyderabad, India
Email: vnc526@gmail. com Email: iamraj arshi @yahoo. co. in
Abstract-Hiding an important message within an image is
known as image steganography. Imperceptibility of the message
is a major concern of an image steganography scheme. A novel
single digit sum (SOS) based image steganography scheme has
been proposed in this paper. At frst, the computation of SOS
has been generalized to support a number system with any given
base. Then, an image steganography scheme has been developed,
where the base for computing SOS is varied from one pixel to
another. Therefore, the number of embedding bits in a pixel is
varied across pixels. The purpose of this technique is to control
the amount of change in a pixel. A lossy compressed version of
the cover image is used to determine the upper limit of change
in each pixel value. The base for computing SOS is determined
by using this upper limit for a pixel. Thus, it is ensured that
the stego image does not degrade beyond the degradation in the
lossily compressed image.
I. INTRODUCTION
The technique of imperceptibly hiding an important mes
sage within a cover image is called image steganography.
Only the intended recipients can extract the message from the
received image. Others remain unaware of the very presence
of this covert cIunication. Over the years, researchers
have come up with novel steganography techniques ensuring
imperceptibility and undetectability of the message.
A good survey of image steganography techniques can be
found in [ 1 ] , [2] . Least Signifcant Bit (LSB) replacement
scheme is the simplest of the data hiding schemes. According
to this scheme, few LSBs fom the cover image pixels are
replaced by bits fom the binary message string. If the number
of replacing bits is high, then the quality of the stego image
degrades. Researchers have come up with some variations
of LSB replacement scheme ( [ 3] , [4] , [ 5] ) to overcome this
problem. The method in [ 3] describes an optimal pixel adjust
ment process (OPAP) to improve the performance over LSB
replacement. According to OPAP, the pixel values obtained
by LSB-replacement are further modifed to fetch them closer
to the cover image pixel values. Hence, the distortion due
to LSB replacement is reduced by OPAP to produce a stego
image with better quality. In [4] , a genetic algorithm based
optimum LSB substitution method has been applied to reduce
the diference between the cover image and the stego image.
Instead of deriving an optimal substitution matrix for the entire
image [4] , optimal substitution matrices are derived for each
1
block in the image to further reduce the embedding noise [5] .
The works in [6] , [7] , [ 8] describe how LSB replacement
scheme can be extended for color images .
Apart fom these variations of LSB replacement schemes,
several other approaches can be found in literature to control
the distortion induced by embedding the message. An adaptive
optimal embedding method is proposed in [9] that searches for
a match between message bits and the pixel bits in the cover
image. Once the match is found, there is no need to replace
the pixel bits by message bits. Only the starting and ending
positions of matching bits are communicated to the receiver.
The method in [ 1 0] suggests to vary the number of bits that
can be hidden within a pixel. Pixel-wise diference between the
cover image and a lossy compressed version of it determines
the number of bits that can be hidden in a pixel . The proposed
method guarantees that the embedding noise at any pixel is less
than the noise in the pixel due to applying lossy compression.
A modul0-4 embedding based image steganography method is
proposed in [ 1 1 ] . According to this method, a group of 2 x 2
blocks of non-overlapping spatially adj acent pixels is selected
as valid blocks for hiding messages. The modul0-4 arithmetic
is applied to all such valid blocks to embed a pair of binary
bits in each of them. Therefore, the maximum size of payload
that can be hidden in an image is quite small for this method.
Theories fom visual attention has also played a crucial role
in the approach in [ 1 2] , where the message is hidden in less
salient locations in an image.
Single digit sum (SDS) based method in [ 1 3] is another
notable effort in this direction. The single digit sum is obtained
by adding the digits of a given number. If the result of this
addition does not produce a single digit number, the digits of
the newly generated result are added up. This concept of SDS
is used in image steganography by [ 1 3] to reduce embedding
noise. A 3-bit message string is embedded in a pixel such
that the single digit sum of the changed pixel value in the
stego image equals the decimal equivalent of the 3-bit message
string. At the receiver end, the message is extracted from the
stego image by computing the SDS of the pixel and converting
it into binary string. It is theoretically established in [ 1 3] that
the SDS based steganography scheme introduces less noise in
the image as compared to 3LSB scheme.
So far, single digit sum has been defned using decimal
number system. Therefore, only 3 bits of message can be
incorporated in a pixel . Main contribution of this paper is
twofold. Firstly, the concept of computing single digit sum
has been generalized to support a number system with any
given base. Then, this has been used to propose an image
steganography scheme where the base for computing SDS
varies across pixels depending on an upper limit of tolerable
change of each pixel. This upper limit of tolerable change in
each pixel is determined with the help of a lossy compressed
version of the cover image. As a result, embedded noise due to
the proposed steganography scheme remains less than or equal
to the noise due to the lossy compression. On the contrary to
the work in [ 1 3] , number of inserted bits in a pixel using the
proposed Steganography using Single Digit Sum with Varying
Base (SSVB) scheme varies fom one pixel to another.
The rest of this paper is organized as follows: At frst, the
concept of Single Digit Sum (SDS) is discussed in section II.
Then, this concept has been extended towards a generalized
SDS to deal with a number of any given base. In section III,
the proposed steganography scheme is described in details.
Experimental results are shown in section IV. Finally, section
V draws concluding remarks about this method.
II. SINGLE DIGIT SUM ( SDS)
Single Digit Sum (SDS) based image steganography [ 1 3]
is the basis for the work presented in this paper. Therefore,
this concept is explained here. Traditionally, computation of
SDS is carried out in decimal number system. This section
also shows how this concept of SDS can be generalized to
incorporate a number system with any given base.
A. Single Digit Sum (SDS): Defnition
Single Digit Sum (SDS) is defned in [ 1 3] by the following
recurrence relation:
{ if n < lO
SDS(n) =
n,
k 1
.
SDS( L
i

O
(mod( ( njlO' ) , 10) ) , if n ? 1 0
( 1 )
where n i s any k digit positive integer i n decimal number
system.
As guided by the above equation, SDS of a given number
is obtained by adding the digits in the number. For example,
SDS of decimal number 23 is 5 (=2+3) and SDS of decimal
number 3 is 3 (as the number consists of a single digit) . If the
sUation of digits does not result in a single digit, then this
result cannot be called the SDS of the number. To illustrate
this concern, let the decimal number be 49. As the summation
of its digits results in 1 3 (=4+9), 1 3 is not the SDS of 49. In
such a case, the recursive nature of the expression is utilized.
The SDS of the just obtained result is recursively computed
until a result of single digit is achieved. Therefore, computing
the SDS of decimal number 49 requires computing the SDS
of 1 3. The SDS of l3 is 4 (=1 +3), which is a single digit.
Then, SDS of decimal 49 equals to SDS of decimal l 3. The
computed SDS value is 4 in decimal.
2
B. Image Steganography Using SDS
The basic principle of SDS based image steganography [ 1 3]
is mentioned here:
1 ) The binary message bit string is divided into chunks of
3 bits.
2) A pixel value P in cover image is modifed to
p
i
in
stego image as follows:
p
i
=f
rgmin
I
P
- i l (2)
where argmin returns the argument i which gives min
imum value for the expression and

denotes the
absolute value. Here, i is a decimal number in the range
1 : i : 255 such that the SDS of i is equal to the
decimal equivalent of the 3-bit message. Therefore, the
SDS of
p
i
equals to the decimal equivalent of the 3-bit
message string. As SDS is a many-to-one function, there
are many values in the range [ 1 , 255] having the same
SDS value. Eq. (2) selects a stego pixel value which
causes minimum distortion.
3) SDS of the stego image pixel value
p
i
is computed to
extract the message. The 3-bit binary representation of
the SDS value is the binary message.
C Generalized Base Single Digit Sum
The computed SDS value (according to decimal number
system) of any positive integer lies in the range 1 to 9.
Therefore, more than 3 bits cannot be hidden within a pixel
using this concept. This upper limit on the payload is a short
coming for existing SDS based image steganography [ l 3] .
This problem can be overcome by generalizing the base
for computing SDS. Computation of SDS (as defned by
Eq. ( 1 )) uses decimal arithmetic on a decimal number. This
concept has been generalized, in this section, to compute SDS
using a base-B arithmetic on a base-B number (written as
SDSB in subsequent references). Therefore, the mathematical
expression for SDSB can be rewritten as:
SDSB (n) =
{ n,
k 1
.
if n < B
SDSB( L
i

O
(mod( (njB
t
) , B) ) , if n ? B
(3)
where n is a k digit base-B number.
For example, let us consider a value 75
16
in hexadecimal
number system. Here, a sufx indicates the base for the
number. According to hexadecimal arithmetic, the SDS
16
(using hexadecimal arithmetic) of this number is C
1 6
(as,
7
16
+ 5
16
= C
16
)

Using a number system of a higher base, more number of
bits can be inserted in a pixel. The relation between number of
bits b to be hidden in a pixel and base-B arithmetic to compute
SDSB is guided by the following expression:
B = 2
b
+ 1 (4)
According to the steganographic scheme using generalized
base single digit sum, a pixel value in the cover image is
changed to a new value in the stego image such that SDSB
of the base-B equivalent of the new pixel value is equal to the
base-B number equivalent of the b bit binary message. If the b
bit binary message is a string of only O' s, then its equivalence
in the base-B number is O. But there is no positive number
whose single digit sum is equal to O. Therefore, whenever
a string of b zeros is encountered, those are encoded as a
number equivalent to 2
b
. Therefore, the base for computation
B is taken as 2
b
+ 1 (Eq. (4)), instead of simply taking it as
2
b
. For example, if ' 4, then the messages from 0001 to
1 1 1 1 are represented by 1 1 7 to F1 7 in base 17 (24 + 1) number
system. For the message 0000, the considered number is G1 7
in base- 1 7. This justifes the use of base- 1 7 number system,
instead of hexadecimal number system, in this case. Because
hexadecimal number system supports digits fom 016
to F16
.
III. STEGANOGRAPHY USING SDS WITH VARYING BASE
( SSVB)
Previous section gave a glimpse of how more number of
bits can be embedded in a pixel by increasing the base
for computing SDSB. This section proposes a method of
SDSB based image steganography scheme where the base
of computing SDSB varies fom pixel to pixel. As a result,
the number of embedding bits also varies fom one pixel
to another. Main idea behind this variation is to control the
embedding noise of each individual pixel. This work draws
inspiration fom the multiple base number conversion based
image steganography [ l O] . Similar to the work in [ l O] , a
lossily compressed version of the cover image is used to
control the number of inserted bits in a pixel. The bits are
inserted in a pixel using generalized base single digit sum as
mentioned in previous section.
A. Basic Philosophy
Inserting message bits in a cover image induces changes in
the image. The underlying concept of this work is to keep the
changes in each pixel within a limit. This limit is determined
by a lossy compression (JPEG) of certain quality. The cover
image is compressed with a certain quality parameter. Lossy
compression also induces certain changes in the pixel values.
The change i n each pixel due to the proposed steganography
scheme is kept lesser than or equal to the change in the
pixel due to the applied lossy compression. Therefore, similar
to [ l O] , the diference between the pixel values in the cover
image and its compressed version provides the tolerable error
range (TER) for the pixel. The base B of computing the SDSB
of each pixel is calculated using this TER of the pixel. Then,
the message bits are hidden within the pixel using the SDSB
based steganography with the computed base B.
B. Methodology
The steganography using SDSB, where the base B varies
from pixel to pixel, helps in hiding binary message bits in
each pixel without degradation of the quality of the stego
image beyond a fxed limit. The insertion and the extraction
algorithms are presented in this section.
1) Insertion Algorithm: The insertion algorithm for
steganography using SDSB with varying base (SSVB) is
given in Algorithm 1 .
3
input : Cover image (C), Hidden binary message string
(M) , quality parameter for JPEG compression, a
pseudo-random sequence for selecting pixels
output: Stego image (S)
Step 1 : The cover image C is compressed using JPEG
compression with the fxed quality parameter to produce
the compressed image C' .
Step 2: For each pixel selected using the pseudo-random
sequence, the following steps are performed iteratively:
Step 2a: The tolerable error range TER for the pixel is
computed by taking the absolute diference between the
value of the pixel in the cover image C and the
compressed image C' .
Step 2b: The number of bits b that can be inserted in the
pixel is computed as :
(5)
where J indicates the largest integer not exceeding x.
Step 2c: The base B for computing SDSB is determined
using Eq. (4) .
Step 2d: The frst b bits fom the remaining portion (not
inserted so far) of the binary message string M is taken
as the message to be hidden (m) in this pixel.
Step 2e: The b bit binary message m is converted into a
base B number N B.
Step 2f: The cover image pixel value P
l
O (in decimal) is
represented in base-B number system as PB.
Step 2g: The value PB is converted to its nearest value in
base-B number system P; such that SDSB( P;) NB.
Step 2h: The new pixel value in base-B number system
P; is converted back into decimal value P{o (the new
pixel value in decimal). The existing pixel value P
l
O in
the cover image is replaced by P{o to construct the stego
image (S) .
Algorithm 1 : Insertion algorithm
2) Extrction Algorithm: The message is extracted fom
the stego image using Algorithm 2.
C Discussion
Here, the algorithms are explained using one example. Let
the binary message string be l Ol OOl l O01 . Let a pixel value
in the cover image be 1 40 in decimal. For the sake of this
discussion, let the corresponding pixel value in the compressed
image be 165. Therefore, the TER for this pixel is computed
to be 25 (= 1 65 - 1 40). As 24 : 25 < 2
5
, 4 bits from the
message lO l O are hidden in this pixel. Moreover, the base for
computing SDS is computed to be 1 7 using Eq. (4). The 4-bit
binary message string lO lO is then converted into a base- 1 7
number A1 7 . Now, the selected pixel value i n decimal 1 40 i s
converted t o 841 7 . Then 841 7 is converted t o 821 7, because
SDSB of 821 7 is A1 7 . Then, 821 7 is converted into decimal
l 38 and it becomes the new pixel value in the stego image.
Next, let us assume the TER for the next pixel in the sequence
is decimal 34. As 2
5
: 34 < 2
6
, 5 bits from the message are
input : Stego image(S) , Cover image ( C), quality
parameter for JPEG compression (as same as
that used in insertion algorithm), a
pseudo-random sequence for selecting pixels (as
same as that used in insertion algorithm)
output: Hidden message (M)
Step 1 : The cover image C is compressed using JPEG
compression with the fxed quality parameter to produce
the compressed image Cf
Step 2: For each pixel selected using the pseudo-random
sequence, the steps fom 2a to 2/ are performed
iteratively:
Step 2a: The tolerable error range TER for the pixel is
computed by taking the absolute diference between the
value of the pixel in the cover image C and the
compressed image Cf
Step 2b: The number of bits b that has been inserted in
the pixel is computed using Eq. (5).
Step 2c: The base B for computing SDSB is determined
using Eq. (4) .
Step 2d: The stego image pixel value in decimal P{o is
converted into P (in base-B number system) .
Step 2e: SDSB (using base-B arithmetic) of P is
computed to generate the part of the message N B
(represented in base-B number system) .
Step 2f: N B is converted into b-bit binary message m.
Step 3: All extracted b bit binary messages (m) are
concatenated to get back the hidden binary message (M) .
Algorithm 2: Insertion algorithm
hidden in the pixel . Therefore, next 5 binary bits 01 1 00 are
inserted in this pixel.
Now, it is explained how the binary message can be
extracted fom the stego image. As stated in section IIIB,
the extraction algorithm requires the cover image and the
compressed image to calculate the tolerable error range TER
for each pixel. Therefore, the TER for the frst pixel in the
sequence is calculated to be 25 (= 1 65 - 1 40) (the values of the
pixel in the cover image and the compressed image is 1 40 and
1 65, respectively) . As 24 : 25 < 25 , 4 bits fom the message
are hidden in this pixel. Moreover, the base for computing
SDS is computed to be 17 using Eq. (4) . The value of this
pixel in the stego image is 1 38 in decimal. This decimal value
is converted into a base- 1 7 number, i . e. , 82
1
7 . The SDS
1
7
(according to base- 1 7 arithmetic) of 82
1
7 is computed to be
A
1
7 . This computed SDSB value A
1
7 is converted into 4-bit
binary string 1 01 0. It can be observed that the message hidden
in this pixel is retrieved. This process is repeated for all the
pixels in the sequence. Thus, the entire hidden message string
is recovered from the stego image.
IV. EXPERIMENTAL RESULTS
For testing the performance of the SSVB algorithm, exper
iments are conducted on a data set of 50 images [ 1 4] with
4 diferent sizes of payload. Cover images are TIF images
4
A
'
_:
A
'


Fig. 1 . Steganography using proposed SSYB scheme with payload size
SZ/2, where SZ is the number of pixels in the image. Left column: cover
images. Right column: corresponding stego images.
of sizes either 256 x 51 2 or 51 2 x 256. Lossy compression
technique (JPEG) is used for compression with the quality
parameter 95. The proposed SSVB algorithm does not cause
any perceivable distortion due to embedding the message. Few
of these results have been shown in Figure 1 .
For the purpose of performance comparison, peak- signal-to
noise-ratio (PSNR) between the cover image and the generated
stego image is measured. The performance of the SSVB algo
rithm is compared with some of the standard data hiding tech
niques like OPAP [ 3] , multiple base number conversion [ 1 0] ,
and hiding digit by digit data i n images [ 1 5] . Figure 2 presents
the performance of the compared methods. In this plot, SZ
is the number of pixels in an image. The payload is varied
which is refected in the X-axis of the plots. If payload
size is increased gradually, the PSNR decreases. It can be
observed that SSVB produces good quality stego images as
compared with some of the standard data hiding techniques
like OPAP [ 3] , multiple base number conversion [ 1 0] , and
hiding digit by digit data in images [ 1 5] .
V. CONCLUSION
In this paper, an image steganography technique has been
proposed which utilizes the concept of single digit sum (SDS) .
At frst, the concept of single digit sum has been generalized
z
5
4

Z
44
4z
4
l

5U 5U4 lSU
|
"
5U2
sv
O-A
Vu't| ' e0ase
DgteyDgr
Fig. 2. Average (over ffty images) PSNR measure between the cover
image and the stego image for proposed SSYB, OPAP [3] , multiple base
number [ 1 0] , and digit-by-digit [ 1 5]
to support a number system with any given base. Through this
generalization, it has become possible to hide even more than
three bits in a pixel. Then, an image steganography scheme
has been proposed which uses the concept of generalized base
SDS, but the base for computing SDS is varied fom pixel to
pixel. Therefore, it enables the number of embedding bits to
vary fom pixel to pixel. Thus it keeps the amount of distortion
in a pixel within a limit, and hence, controls the degradation of
the stego image. Experimental results establish the superiority
of the performance of the proposed scheme.
REFERENCES
[ 1 ] A. Cheddad, J. Condell, K. Curran, and P. McKevitt, Digital image
steganogrphy: surve and analysis of current methods, Signal
Processing, vol. 90, issue 3, pages 727-752, March 201 0.
[2] B. Li, 1. He, J. Huang, and Y Q. Shi, A survey on image steganogrphy
and steganalysis, Journal of Information Hiding and Multimedia Signal
Processing, vol. 2, issue 2, April 20 I I .
[3] K. Chan, and L. M. Cheng, Hiding data in images by simple LSB
substitution, Pattern Recognition, vol. 37, issue 3, pages 469-474,
March 2004.
[4] R. Z. Wang, C. F. Lin, and J. C. Lin, Image hiding by optimal LSB
substitution and genetic algorithm, Pattern Recognition, vol. 34, issue
3, pages 671 -683, March 200 1 .
[5] M. -N. Wu, M. -H. Lin, and c. -c. Chang, A LSB substitution oriented
image hiding strtegy using genetic algorithms, Proc. of Advanced
Workshop on Content Computing, pages 21 9-229, 2004.
[6] K. Bailey, and K. Curran, An evaluation of image based steganogrphy
methods, Multimedia Tools and Applications, vol. 30, issue 1 , pages
55-88, 2006.
[7] A. A. Gutub, Pixel indicator technique for RGB image steganogrphy,
Journal of Emerging in Web Intelligence, vol. 2, issue I , pages 56-64,
201 0.
[ 8] S. M. M. Karim, M. S. Rahman, M. I. Hossain, A new apprach for LSB
based image steganogrphy using secret key, Proc. of 1 4th International
Conference on Computer and Information Technology, pages 286-291 ,
December 20 I I .
[9] o. Zanganeh and S. Ibrahim, Image steganogrphy using adaptive optimal
embedding Proc. of 5th International Conference on Computer Science
and Convergence Information Technology, pages 600-605, November
December 201 0.
[ 1 0] D. C. Wu, and W H. Tsai, Data hiding i n images via multiple based
number conversion and lossy compression, IEEE Transactions on
Consumer Electronics, vol. 44, issue 4, pages 1 406- 1 41 2, November
1998.
[ 1 1 ] K. Pramitha, L. P. Suresh, and K. L. Shunmuganathan, Image steganog
rphy using MOD-4 embedding algorithm based on image contrst,
Proc. of the International Conference on Signal Processing, Communi
cation, Computing and Networking Technologies, pages 364-369, July
201 1 .
5
[ 1 2] A. Sur, S. S. Sagar, R. Pal, P Mitra, and J. Mukhopadhyay, A new
image watermarking scheme using saliency based visual attention model,
Proc. of IEEE Indicon, pages 1 -4, December 2009.
[ 1 3] A. Sur, P Goel, and J. Mukhopadhyay, A SDS based image stegano
grphic scheme for reducing embedding noise, Proc. of the 1 5th
International Conference on Advanced Computing and Communications,
pages 77 1 -775, December 2007.
[ 1 4] 1. Z. Wang, 1. Li, and G. Wiederhold, SIMPLcity: semantics-sensitive
integrted matching for picture librries, IEEE Transactions on Pattern
Analysis and Machine Intelligence, vol. 23, issue 9, pages 947-963, 200 1 .
[ 1 5] c. C. Thien, and J . C. Lin, A simple and high-handing capacity method
for hiding digit-by-digit data in images based on modulus function,
Pattern Recognition, vol. 36, pages 2875-2881 , June 2003.

You might also like