You are on page 1of 4

2014 Fourth International Conference on Communication Systems and Network Technologies

An Improved Module Based Substitution Steganography Method

Nadeem Akhtar, Ambreen Bano, Faraz Islam


Department of Computer Engineering, Zakir Husain College of Engineering and Technology
Aligarh Muslim University
Aligarh, India
{nadeemalakhtar,ambreenbano.amu,fislam2010}@gmail.com

Abstract The rapid growth of the Internet and digitized


content made text/image distribution simpler. The ability to
protect and secure information is vital to the growth of
electronic commerce and to the growth of the Internet itself.
Most data embedding techniques used so far lead to distortions
in the original image. These distortions create problems in
some areas where protection of data is immensely required.
Lossless data hiding is an exact restoration approach for
recovering original data. In this paper, a scheme for data
hiding is presented which is based on a module-based
substitution method with lossless secret data compression with
some improvements to reduce the difference between cover
and stego image pixel values. This scheme is loss less scheme.
In our scheme user can hide either text, image or wav file as
secret data in cover image file. (Abstract)
Keywords compression;
steganography (key words)

lossless;

modulo;

LSB (Least-Significant Bit) substitution approach is a


lossless approach. The simplest one is simple LSB
substitution method which directly replaces the leastsignificant bit planes of the cover image with secret data.
Our scheme is based on LSB substitution method is stated in
the next section [13, 14].
In this paper, an improved scheme for secret data hiding
based on the work done by S K Chen [1] is proposed, in
which we use LSB substitution method and shifting of the
numbers in the range of 7 to +7. We hide a message image
into a cover image which is double the size of message
image. The maximum difference which we get between
cover image and stego image pixel values is 4 instead of 8 as
in the Chens method. Proposed scheme for hiding secret
data gives good PSNR value.
Rest of the paper is organized as follows: the proposed
method is discussed in Section II in which we discussed each
step of the scheme. The PSNR value compression results and
graphical presentation to show that scheme is good are
provided in Section III, while the conclusions are drawn in
Section IV.

shifting;

I. INTRODUCTION
In the world of modern telecommunication technologies
or with the rapid growth of science and technology, People
exchange data to each other using wired or Wireless
networks. We need to provide protection to the users data
from unauthorized access when data transferred over the
insecure communication channel. To meet this challenge, a
variety of algorithms have been proposed [2-12].
Steganography is widely used technique that hides
important data into the cover images by using some logic or
calculation on pixels of the cover image to protect the data
from illegal access. In steganography, a stego-image is
generated by hiding the secret data into a cover image then
secret data are transmitted to the destination using stegoimage. Data hiding schemes are of two types lossy and
lossless. In the first type, the data extracted from the
generated stego-image are allowed with some distortions. In
the second type, the extracted data cannot be allowed with
any distortion [13-20].
In the recovered data were distorted, but these two
methods have very high hiding capacity, for they could
conceal data of very large size. For example, Chung et al.
[13] hide the secret image in a cover image of the same size.
Wang and Tsai [14] even hide a larger secret image in a
smaller cover image. In both methods, quality of the
recovered image is acceptable, but they are not lossless. The
978-1-4799-3070-8/14 $31.00 2014 IEEE
DOI 10.1109/CSNT.2014.146

II. PROPOSED METHOD


This section explains proposed method, in which we use
Modulus and shifting operations with compression logic for
hiding secret data.
When user select cover image and secret data for hiding
then first we process this secret data then hide in the cover
image. Secret data may be text, image or audio file. Data
values lies in the range of 0 to 255 then we convert these
decimal values into 8-bit binary numbers then we divide
these 8-bits into 4-bits to convert it into nibbles. These
nibbles values are our new value which lies in the range of 0
to 15 as shown in Table I.
TABLE I.

CONVERTING 0 TO 255 VALUES IN THE RANGE OF 0 TO 15

S.NO.

1
100

Data

695

65

127

Nibble

0110

0100

0100

0001

0111

1111

New
Values

15

Suppose r contiguous secret data is s(i), s(i+1),


s(i+r1) , cover image pixel values are p(i), p(i+1),
p(i+r1) and stego image pixel values represent by t(i),
t(i+1), t(i+r1). Maximum value of the secret data is 15.
Now as explained in [1], we calculate value of m equal to
maximum secret data value plus 1, m=max(s)+1. We use this
value of m for hiding secret data.
At this stage, we also consider if there is some repetition
of data. If the number of times a value appears is less than 4,
that value is hidden as t(i)=p(i)[p(i) mod(m+1)]+s(i). If
some value repeats for more than 3 times (heavy repetition),
we hide only three values [m,z,r4] in next 3 pixel values of
cover image for achieving compression. Value m denotes the
heavy repetition (Note all secret data value are in the range 1
to m-1). z is data value which is getting repeated. r is the
number of times value is getting repeated. We store r-4
because compression will be used when r is greater than 3. In
this way, only three pixels would get modified in case of
heavy repetition and remaining r-3 corresponding stegoimage pixels will remain unchanged after data hiding.
Consider following example
Secret Data: 2,2,2,2,2,2,2,2,6,5,7 (max value 15)
Cover pixels: 65,67,63,64,68,70,68,69,72,67,69
m=max(s) + 1= 15+1=16
z=2
r=8
In this example, first value 2 is repeated 8 times. These 8
values will be stored in compressed form in first three pixels
of cover image and remaining five corresponding pixels will
remain unchanged. Next three values will be stored
according to normal process.
After hiding these 3 values in cover image as
t (i) = p(i)[p(i) mod (m+1)]+m
t(i+1) = p(i+1)[p(i+1) mod (m+1)]+Z
t(i+2) = p(i+2)[p(i+2) mod (m+1)]+(r4), we get
Stego pixels: 67,53,55,64,68,70,68,69,74,56,75
After this the difference between any cover image and
stego image pixels is 16. Now we use following five cases
for reducing difference between cover image and stego
image pixel values [1]. These 5 cases are shown below.
Case 1: ( (m+1)/2 < t(i)p(i)m and t(i)m+1).
t(i)t(i)m1
Case 2: (mt(i)p(i)<(m+1)/2 and t(i)254m).
t(i)t(i) + m + 1
Case 3: ((m+1)/2t(i)p(i)(m+1)/2).
t(i)t(i)
Case 4: ((m+1)/2<t(i)p(i)m and t(i)m).
t(i)t(i)
Case 5: (mt(i)p(i)<(m+1)/2 and t(i)255m).
t(i)t(i)
After this step, pixel values of stego image become closer
to cover image pixel values. The maximum difference
between cover image and stego image pixel values become 8
(-m/2 to +m/2).
For improvement we use shifting technique. Using above
method, we get secret data values which lies in the range of 0

to 15. Now we use shifting for reducing range of the secret


data values from 7 to 7. As shown in Fig.1 we consider
scale of 7 to 7 then we convert secret data in the range of 0
to 7 values.
First 0 to 7 values represent by -7 to 0 then 8 to 15 values
represent by 0 to 7 then for differentiating between ve and
+ve values we use flag (0/1). If our value is in the range of
ve values then we store its +ve value and store flag value
that is 0 to indicate that it is lies in ve values range and in
case of +ve value we store this value and flag value that is 1
to indicate that it is lies in +ve values range.
1

....

....

12 13 14 15

-7

-6

-5

-4

....

....

Figure 1. Shifting for converting 0 to 15 range in 7 to +7 range

Extra bits of flag which we use for differentiating


between +ve and ve values are combined into 3-bits. These
values also lie in the range of 0 to 7. Now, every value which
is to be hidden is in the range 1 to 7. So the value of m is
chosen as 8. After applying the first step [1], the difference
between cover image and stego image pixel values will be 8
(-m to +m).
After applying second step (using above 5 cases) our
pixel values of stego image become close to cover image
pixel values.the maximum difference between cover image
and stego image pixel values become m/2 to +m/2 that is
from 4 to +4.
III. RESULT AND DISCUSSION
In this section, we discuss the different analysis of the
proposed novel scheme for secret data hiding.
A. PSNR Analysis
In this section, first Shang-Kuan Chens method [1] is
implemented to provide a comparison with proposed
method. The maximum difference between cover and stego
image lies in the range of 8 to +8 but after some
modifications this difference becomes 4 to +4 in our
proposed method.
The PSNR values are used for measuring the quality of
stego images. PSNR=10log (2552 /MSE) dB when two gray
images are compared. Assuming that H is the cover image
and STG is the stego-image, and both are with size wh.
Then the MSE is defined as-

696

Where, Hi and STGi denote the ith pixel values of H and


STG, respectively and i value goes from 1 to WuH.
The PSNR of the stego-images is listed in Table II for
comparison. The results of the proposed method are better
than those, we get in Shang-Kuan Chens method [1]. The
results of the PSNR comparisons for different images are
shown in Table II.
TABLE II.

COMPARISON BETWEEN SHANG-KUAN CHENS METHOD


[1] AND PROPOSED METHOD

Peppers

Einstein

Stego Image

Figure 2. Cover, Secret and Stego Image

Secret Image
Cover
Image

Monalisa

Einstein

PSNR

Lena

PSNR

PSNR

Proposed

Chen

Proposed

Chen

Proposed

Chen

Baboon

41.74

37.39

41.73

37.38

41.78

37.36

Houses

41.76

37.33

41.76

37.32

41.79

37.36

Baboon

Monalisa

Stego Image

Figure 3. Cover, Secret and Stego Images


Peppers

41.73

37.36

41.72

37.35

41.77

37.40

Lena

41.76

37.39

41.72

37.39

41.77

37.39

Man

41.47

36.89

41.49

36.62

41.56

36.71

Same algorithm can be use for hiding text data in the


cover images. The comparisons between Shang-Kuan
Chens method [1] and proposed method using plain text
document (.TXT) as secret messages. (The host image of
size 256 X 256 and secret message is of 21 K bytes.)
The results of the PSNR comparisons for text files are
shown in Table III.
TABLE III.

Houses

Secret Data( .TXT)


PSNR
Proposed

Chens

Lena

40.70

36.25

Einstein

40.66

36.22

Monalisa

40.70

36.27

Stego Image

C. Histogram of Cover and Stego image


The histograms of the cover image and stego image are
shown in Fig.5. A histogram shows the distribution of data
values. The histogram values of the cover image (shown
with blue colour) is close to the histogram of stego image
(shown with red colour) indicating when we hide secret
image in cover image then it has no effect on distribution of
data values of cover image as only some values will change
and most of the part of the histogram of cover image overlap
with the histogram of stego image.

COMPARISON BETWEEN SHANG-KUAN CHENS METHOD


[1] AND PROPOSED METHOD USING TEXT FILE

Cover Image

Lina

Figure 4. Cover, Secret and stego Image

B. Cover and Stego image Comparison


The cover image, secret image and the corresponding
Stego image results are shown in Fig.2, Fig.3 and Fig.4.
Standard .pgm peppers, baboon and home images of size
512512 is use as cover image in which we hide Standard
.pgm Monalisa, Einstein and lena images of size 256256
as secret data. The Stego image appears exactly same as the
cover image indicating secret image has no significant effect
on our cover/original image.

Figure 5. Histogram of Cover and stego Image

697

maximum value 1.0 for cross correlation which proof that


stego image has high similarity with the cover image, which
is an essential requirement of steganography.

D. Correlation of Cover and Stego image


The autocorrelation of the cover and stego image are
shown in Fig.6 and Fig.7, respectively. The autocorrelation
of the cover image is almost same as the autocorrelation of
stego image. For the cover and stego image, its
autocorrelation has large values, shows high correlation
between values.

REFERENCES
[1]

[2]

[3]

[4]

[5]

Figure 6. Autocorrelation of Cover Image

[6]

[7]

[8]
Figure 7. Autocorrelation of Stego Image
[9]

The cross-correlation between the cover and the stego


image is shown in Fig.8.As the largest value in the crosscorrelation is 1 (close to 100%), the stego image has high
similarity with the cover image, which is an essential
requirement of any stegonography scheme.

[10]
[11]

[12]
[13]

[14]

[15]

[16]
Figure 8. Cross Correlation of Cover and Stego Image

IV. CONCLUSIONS
In this paper, a simple and strong steganography method
has been proposed for data security. Based on the results we
conclude that the performance of the proposed method is
good and suitable to use for data hiding in a wide range of
application. Most important features of this scheme is the
maximum difference between pixel values of cover and
stego image is 4 (m/2, m=8) . Our scheme recovers original
data successfully without any loss. Our stego image has

[17]

[18]

[19]

[20]

698

Shang-Kuan Chen, A module-based LSB substitution method with


lossless secret data compression, Computer Standards & Interfaces,
Vol. 33, pp.367--371, 2011.
E. Cruselles, M. Soriano, and J. L. Melus, Uncorrelated PN
sequences generator for spreading codes in CDMA systems, Sixth
IEEE International Symposium on Personal, Indoor and Mobile
Radio Communications, vol. 3, pp. 1335--1340, 1995.
V. R. Gonzalez-Diaz, E. Bonizzoni, and F. Maloberti,
Pseudorandom sequence generation for mismatch analog
compensation of ADCs, 17th IEEE International Conference on
Electronics, Circuits, and Systems, pp. 118--121, 2010.
S. Y. Hwang, G. Y. Park, D. H. Kim and K. S. Jhang, Efficient
Implementation of a Pseudorandom Sequence Generator for HighSpeed Data Communications, ETRI Journal, vol. 32, no. 2, pp. 222-229, 2010.
H. Zhou, H. C. Card and G. E. Bridges, Parallel Pseudorandom
Number Generation in GaAs Cellular Automata for High Speed
Circuit Testing, Journal of Electronic Testing, vol. 6, no. 3, pp.
325-330, 1995.
Nadeem Akhtar, Pragati Johri, Shahbaaz Khan, "Enhancing the
Security and Quality of LSB based Image Steganography", IEEE
International Conference on Computational Intelligence and
Computer Networks (CICN), 27-29 September, 2013, Mathura,
India
R. Latif and M. Hussain, Hardware-Based Random Number
generation in Wireless Sensor Networks, Advances in Information
Security and Assurance, LNCS, vol. 5576, pp. 732--740, 2009.
Musheer Ahmad and Omar Farooq, Chaos Based PN Sequence
Generator for Cryptographic Applications, International
Conference on Multimedia, Signal Processing and Communication
Technologies,IEEE, pp. 83--86, 2011
S.S. Maniccam, N.G. Bourbakis, Pattern Recognition, Vol. 37, pp.
725, 2004.
C.-C. Chang, M.-S. Hwang, T.-S. Chen, J. Syst. Software Vol.58,
pp. 83, 2001.
Nadeem Akhtar, Shahbaaz Ahmad, Pragati Johri "An Improved
Inverted LSB Image Steganography", IEEE International
Conference on Issues and Challenges in Intelligent Computing
Techniques (ICICT), 7-8 February 2014, India (Accepted)
H. Cheng, X.B. Li, IEEE Trans. Signal Process 48 (8) (2000)2439.
K.L. Chung, C.H. Shen, L.C. Chang, A novel SVD- and VQ-based
image hiding scheme, Pattern Recognition Letters 22 (2001) 1051
1058.
R.Z. Wang, Y.D. Tsai, An image-hiding method with high hiding
capacity based on best-block matching and k-means clustering,
Pattern Recognition vol. 40, pp.398409, 2007.
R.Z. Wang, C.F. Lin, J.C. Lin, Image hiding by optimal LSB
substitution and genetic algorithm, Pattern Recognition vol. 34, pp.
671683, 2001.
C.C. Chang, J.Y. Hsiao, C.S. Chen, Finding optimal LeastSignificant-Bit substitution in image hiding by dynamic
programming strategy, Pattern Recognition vol. 36, pp.15831595,
2003.
C.C. Thien, J.C. Lin, A simple and high-hiding capacity method for
hiding digit-by digit data in images based on modulus function,
Pattern Recognition vol. 36, pp.28752881, 2003.
C. Lin, Y.B. Lin, C.M. Wang, Hiding data in spatial domain images
with distortion tolerance, Computer Standards & Interfaces vol.31
(2) ,pp. 458464, 2009.
C.H. Yang, Inverted pattern approach to improve image quality of
information hiding by LSB substitution, Pattern Recognition vol.
41 (8), pp. 26742683, 2008.
C.K. Chan, L.M. Cheng, Hiding data in images by simple LSB
substitution, Pattern Recognition vol. 37 (3), pp. 469474, 2004.

You might also like