Content uploaded by Gandharba Swain
Author content
All content in this area was uploaded by Gandharba Swain on Jan 12, 2017
Content may be subject to copyright.
Content uploaded by Gandharba Swain
Author content
All content in this area was uploaded by Gandharba Swain on Jan 12, 2017
Content may be subject to copyright.
Content uploaded by Gandharba Swain
Author content
All content in this area was uploaded by Gandharba Swain on Jan 12, 2017
Content may be subject to copyright.
Content uploaded by Gandharba Swain
Author content
All content in this area was uploaded by Gandharba Swain on Dec 26, 2016
Content may be subject to copyright.
P.V. Krishna, M.R. Babu, and E. Ariwa (Eds.): ObCom 2011, Part II, CCIS 270, pp. 470–478, 2012.
© Springer-Verlag Berlin Heidelberg 2012
A Better RGB Channel Based Image Steganography
Technique
Gandharba Swain1 and Saroj Kumar Lenka2
1 Research Scholar-CSE, Siksha ‘O’ Anusandhan University,
Bhubaneswar-751030, Odisha, India
gswain1234@gmail.com
2 Professor, Department of CSE, MITS University,
Lakshmangarh-332311, Rajasthan, India
lenka.sarojkumar@gmail.com
Abstract. In this paper a new RGB channel based steganographic technique is
proposed. The RSA algorithm is used for encryption and decryption. In a RGB
image each pixel (24 bits) is having R-channel 8 bits, G-channel 8 bits and B-
channel 8 bits. R, G and B stands for red, green and blue respectively. Out of
these three channels, the one which is having the maximum value summed over
for all the pixels will be decided as the indicator channel. Out of the remaining
two channels (say channel1 and channel2) in each pixel, one channel is used for
embedding four bits of the cipher text, depending on its value satisfying one of
the four defined conditions. At the receiver side the reverse operation will be
performed to retrieve the message. The experimental results show that the
performance of this technique is satisfactory.
Keywords: Steganography, cryptography, encryption, decryption, RGB,
channel based, RSA.
1 Introduction
Steganography is a technique for secret communication between two parties. In
steganography the secret information is hidden inside a carrier file such that the
change in appearance of the carrier file should not be apparent to normal human eye.
If we use cryptography with in steganography the security becomes two fold.
The word steganography is originally derived from Greek words Steganos which
means “covered” and Graptos which mean “writing”. It has been used in various
forms for thousands of years. In Ancient Greece they used to select messengers and
shave their head, they would then write a message on their head. Once the message
had been written the hair was allowed to grow back. After the hair grew back the
messenger was sent to deliver the message, the recipient would shave off the
messengers hair to see the secret message. During world war-2 also this concept was
used. With the boost in computer power, the internet and with the development of
digital signal processing (DSP), information theory and coding theory, steganography
A Better RGB Channel Based Image Steganography Technique 471
has gone digital. In the realm of this digital world steganography has created an
atmosphere of corporate vigilance that has spawned various interesting applications,
thus it is continuously evolving.
Steganography can be categorized into four categories [1]. Those are:
Steganography in image, steganography in audio, steganography in video and
steganography in text. The image steganography algorithms can be categorized into
two categories, namely, spatial domain and frequency domain. In each of these
categories we can have adaptive and dynamic methods. Adaptive methods are image
statistics based, where as dynamic methods are message bit dependent.
When hiding information inside images usually Least Significant Bit (LSB)
method is used. In the LSB method the 8th bit of every byte of the carrier file is
substituted by one bit of the secret information. This method works fine in the image
carriers because if the least significant bit is changed from 0 to 1 or vice versa, there
is hardly any change in the appearance of the color of that pixel. The LSB method
usually does not increase the file size, but depending on the size of the information
that is to be hidden inside the file, the file can become noticeably distorted. Instead of
hiding a fixed number of bits in the LSBs of each pixel, one can also embed different
number of bits in LSBs of different pixels based on pixel value range calculation [2].
In [3] a two way block matching procedure and the hop embedding scheme is
proposed to embed a secret image inside a cover image. Kumar and Roopa proposed
the same block matching procedure and the hop embedding scheme with improved
tamper proofing, so that it is not possible for any intruder to modify the content of the
embedded data in the cover image [4].
In general if the pixels are located in edge areas they can tolerate larger changes
than those in smooth areas. The range of changeable pixel value in smooth areas is
small, where as in edge areas it is large, so that the stego image maintains a good
perceptual quality. Wu and Tsai [5] proposed a pixel value differencing method,
where a cover image is partitioned into non overlapping blocks of two consecutive
pixels. A difference value is calculated from the value of the two pixels in each block.
Secret data is embedded into a cover image by replacing the difference values of the
two pixel blocks of the cover image with similar ones, in which bits of embedded data
are included. Zhang and Wang [6] found that pixel value differencing steganography
is vulnerable to histogram based attacks and proposed a modification for enhanced
security. Chang and Tseng [7] employed two sided, three sided and four sided side
match schemes. The two sided side match method uses the information of the upper
and left neighboring pixels in order to make estimates. The three sided side match
method utilizes upper and left neighboring pixels; and one of the other neighboring
pixels. The four sided match method uses the upper, left, right and below neighbors.
In RGB images each pixel is represented by 3 bytes to represent the intensities of
red, green and blue channels in that pixel. Parvez and Gutub [8] presented a technique
based on RGB intensity values of the pixel. They took one of the channels as
indicator channel and used one or both of the remaining two channels to conceal data
bits. The last two bits of the indicator channel tells whether the data bits are hidden in
the other two channels or not. In [9] Tiwari and Shandilya proposed two techniques
based on RGB concept. In the first technique they modified the technique of Pervez
472 G. Swain and S. Kumar Lenka
and Gutub, by changing the indicator for every subsequent pixels. The second
technique is a random number generation based, in which a random number generated
determines the number of least significant bits that is used to hide the secret data. In
[10] Kaur et al. proposed a RGB based technique in which embedding was done upto
4 bits in the channels other than the indicator channel based upon the last four bits of
the indicator channel.
In [8] an RGB based algorithm is proposed where the indicator channel is
randomly chosen, and 2 bits are embedded in a channel other than the indicator. In
this proposed algorithm the indicator channel is chosen based on the sum of color
values and embedding is done, as 4 bits in each selected channel satisfying some
conditions. In section-2 the proposed algorithm is discussed. In section-3 the
experimental results are narrated and in section-4 the paper is concluded.
2 RGB Channel Based Steganography
2.1 Algorithm at Sender
Step-1: Receive the secret message. Apply RSA Algorithm and convert it to cipher
text. Now get it in binary.
Step-2: Receive the RGB Image. Convert to binary. Calculate the sum of R channels
of all the pixels, sum of G channels of all the pixels and sum of B channels of
all the pixels. The channel having maximum sum is the indicator channel. Four
bit data is to be hidden in one of the channels other than the indicator, in the
following manner.
Step-3: Suppose, the two channels other than the indicator channel are channel1 and
channel2.
If R is the Indicator channel, then G is channel1 and B is channel2.
If G is the Indicator channel, then R is channel1 and B is channel2.
If B is the Indicator channel, then R is channel1 and G is channel2.
Step-4: Divide the cipher text into groups of four bits each.
Step-5: Take the next pixel, take the next four bits of cipher text. Do any of the
following 4 sub steps.
(a). If (channel1 value ≤ 63 and channel2 value > 63) Embed the 4 bits of
cipher in channel1 and set 8th bit of indicator channel to 0.
(b). If (channel1 value > 63 and channel2 value ≤ 63) Embed the 4 bits of
cipher in channel2 and set 8th bit of indicator channel to 1.
(c). If (Channel1 value ≤ 63 and channel2 value ≤ 63)
Then, If Channel1 value ≤ Channel2 value, Embed in channel1 and set 8th bit
of indicator channel to 0. Otherwise Embed in channel2 and set 8th bit of
indicator channel to 1.
(d). If Channel1 value > 63 and channel2 value > 63) do not embed in this
pixel.
Step-6: If embedding of cipher text is not yet over go to step-5.
Step-7: Stop
A Better RGB Channel Based Image Steganography Technique 473
Table 1. Example of embedding
As an example suppose we have the three pixels as in table1 and the Green channel
is the indicator channel. Suppose the cipher text stream is: 0010 1010 1111 0000. In
pixel1 channel1 is 10010110 = 150 which is greater than 63 and channel2 is
00011110 = 30 which is less than 63. Thus the four bits of cipher 0010 is embedded at
4 LSBs of channnel2 and the 8th bit of indicator is set to 1, it becomes 10001111. In
pixel2 channel1 is less than 63 and channel2 is greater than 63, the next 4 cipher bits
i.e, 1010 are embedded in channel1 and 8th bit of indicator is set to 0, it becomes
01010100. In pixel3 both the channel1 and channel2 are greater than 63, so no
embedding is done. After embedding the pixels are also shown in table1.
Now you may question that if we are changing the last 4 bits of a channel, its value
will change a lot, how does it work? Look at table2. The channel having decimal
value in range 0 to 15, if we change the last 4 bits its value will also fall in range 0 to
15. Similarly the channel having decimal value in range 16 to 31, if we change the
last 4 bits its value will also fall in range 16 to 31. The channel having decimal value
in range 32 to 47, if we change the last 4 bits its value will also fall in range 32 to 47
and the channel having decimal value in range 48 to 63, if we change the last 4 bits its
value will also fall in range 48 to 63. Thus a channel value will suffer a maximum
displacement of 16, which will not make much change in the total pixel value which
is 24 bits.
2.2 Algorithm at Receiver
Step-1: Receive the Stego Image. Transform to binary. Detect the indicator channel;
this information is hidden in some reserved location of stego image. Detect the
starting pixel and ending pixel locations with in which the cipher is embedded,
these information is also hidden in the reserved location of the image.
Step-2: Suppose, the two channels other than the indicator channel are channel1 and
channel2.
If R is the Indicator channel, then G is channel1 and B is channel2.
If G is the Indicator channel, then R is channel1 and B is channel2.
If B is the Indicator channel, then R is channel1 and G is channel2.
Step-3: Begin with start pixel (from where embedding continues)
Before Embedding After Embedding
Red
(Channel1)
Green
(Indicator
Channel)
Blue
(Channel2)
Red
(Channel1)
Green
(Indicator
Channel)
Blue
(Channel2)
Pixel1 10010110 10001110 00011110 10010110 10001111 00010010
Pixel2 00001111 01010101 11001100 00001010 01010100 11001100
Pixel3 10111101 11110000 11001100 10111101 11110000 11001100
474 G. Swain and S. Kumar Lenka
Step-4: If both channel1 value and channel2 value are > 63 skip this pixel and go to
step-5, otherwise do sub step 4(a) and go to step-5.
(a). If 8th bit of indicator channel is 0, take last four bits of channel1, otherwise
take the last four bits of channel2. Concatenate these 4 bits to a variable named
as CIPHER. Initially the variable CIPHER is blank.
Step-5: Take the next pixel. If it is the pixel following the end marker (it is the last
pixel up to which embedding is done), go to step-6, otherwise go to step-4.
Step-6: Now apply RSA algorithm to decrypt the cipher text stored in the variable
CIPHER.
Step-7: Stop
Table 2. Change in value of a channel after changing it’s last 4 bits
Channel value Channel value after changing its 4 LSBs
00000000
00000001or 00000010 or 00000011 or 00000100 or 00000101 or
00000110 or 00000111 or 00001000 or 00001001 or 00001010 or
00001011 or 00001100 or 00001101 or 00001110 or 00001111
0 Channel value 0 changes to 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10
or 11 or 12 or 13 or 14 or 15
00000001
00000000 or 00000010 or 00000011 or 00000100 or 00000101 or
00000110 or 00000111 or 00001000 or 00001001 or 00001010 or
00001011 or 00001100 or 00001101 or 00001110 or 00001111
1 Channel value 1 changes to 0 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10
or 11 or 12 or 13 or 14 or 15
00000010
00000000 or 00000001 or 00000011 or 00000100 or 00000101 or
00000110 or 00000111 or 00001000 or 00001001 or 00001010 or
00001011 or 00001100 or 00001101 or 00001110 or 00001111
2 Channel value 2 changes to 0 or 1 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10
or 11 or 12 or 13 or 14 or 15
… …
00001111
00000000 or 00000001or 00000010 or 00000011 or 00000100 or
00000101 or 00000110 or 00000111 or 00001000 or 00001001 or
00001010 or 00001011 or 00001100 or 00001101 or 00001110
15 Channel value 15 changes to 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9
or 10 or 11 or 12 or 13 or 14
3 Results and Discussion
The technique is experimented and results are observed for more than 50 images.
Some sample observations are shown. In fig.1, (a) is the original Statue image and (b)
is it’s stego image with 20027 bytes of cipher data embedded in it, (c) is the original
Player image and (d) is it’s stego image with 30116 bytes of cipher data embedded
into it. Similarly, (e) is the original Leena image and (f) is it’s stego image with 30079
bytes of cipher data embedded into it. If you see the stego images, you can not
observe any change in quality.
A Better RGB Channel Based Image Steganography Technique 475
(a). Original Statue image (b). Stego Statue image
(c ). Original Player image (d). Stego Player image
(e). Original Leena Image (f). Stego Leena image
Fig. 1. Original images and their stego images
Moreover, there are some basic notes that should be observed by a steganographer
[1]. Those are: (i) In order to eliminate the attack of comparing the original image
with the stego image, we can freshly create an image and destroy it after generating
476 G. Swain and S. Kumar Lenka
the stego image. The images available in World Wide Web should not be used. (ii) In
order to avoid any human visual perceptual attack, the generated stego image must
not have visual artifacts. (iii) Smooth homogeneous areas must be avoided, e.g.,
cloudless blue sky over a blanket of snow, and however chaotic areas with naturally
noisy back grounds and salient rigid edges can be targeted. (iv) The secret data must
be a composite of balanced bit values, since in general; the expected probabilities of
bit 0 and 1 for a typical cover image are the same. In such cases encryption provides
such a balance.
The performance of various steganographic methods can be rated by the three
parameters: security, capacity, and imperceptibility [11]. Security: Steganography
may suffer from many active or passive attacks, thus a secured steganographic
algorithm should survive from passive or active attacks. Capacity: Capacity means the
amount of information that can be hidden. To be useful in conveying secret message,
the hiding capacity provided by steganography should be as high as possible, which
may be given in measurements such as the size of secret message, or bits per pixel
etc. Imperceptibility: Stego images should not have severe visual artifacts. It means
the resultant image should look innocuous enough.
This proposed algorithm is also a secured one. Table 3 represents the peak signal to
noise ratio (PSNR) with different message length for different images. PSNR is
measured in decibels (dB). PSNR values falling below 30 dB indicate a fairly low
quality, i.e., distortion caused by embedding can be obvious; however, a high quality
stego-image should strive for atleast 40 dB [1]. The PSNR is as defined below.
PSNR= 10 log 10
2
max
C
MSE
,
Where Cmax = the maximum pixel value which is 255 for 8-bit images. MSE called the
mean square error is as defined below.
MSE = 1
MN
()
MN
xy xy
x1y1
S C
==
−
,
Where x and y are the image coordinates, M and N are the dimensions of the image,
Cxy is the cover image and Sxy is the generated stego image.
Table 3. Observed PSNR for various images with different Payload
Image Image size
KBs
Maximum
embedding capacity
(bits)
Amount of
cipher
embedded
(bytes)
PSNR
(dBs)
Statue 1433 1626288
(198.52 KB)
20027 47.84
Leena 768 1003028
(122.44 KB)
30079 42.75
Player 3290 3720284
(454.14 KB)
30116 49.61
A Better RGB Channel Based Image Steganography Technique 477
The capacity is very high, in Statue image it is 198.52 kilo bytes which is 14% of
the image size. In Leena image it is 122.44 kilo bytes which is 16% of the image size.
In Player image it is 454.14 kilo bytes which is 14% of the image size.
If you can observe the stego images in fig.1, you can not find any visual artifacts,
showing the presence of steganography.
The table 4 shows the comparison of our proposed scheme with the different
algorithms proposed by other researchers. Compared to other algorithms suggested by
different experts in this field; this is also a stronger one.
Table 4. Comparision with other schemes
Scheme
Mimimum
Observed
PSNR
Capacity Imperceptibility
Wang and Chen. [3] 44.20 high good
Kumar and Roopa [4] 44.15 medium good
Wu and Tsai [5] 37.90 medium good
Zhang and Wang [6] 36.00 medium good
Chang and Tseng [7] 33.53 medium good
Proposed Scheme 42.75 high good
4 Conclusion
In this paper a new RGB based steganography is proposed. It provides two levels of
security, one at cryptography level and the other at steganography level. The
embedding capacity is very high. The channels where data is embedded is different
for different pixels, it will make the intrusion difficult. The proposed scheme is a
novel approach. This technique is one of the efficient approaches. Capacity and PSNR
is better as compared to some of the existing algorithms. No visual artifacts can be
observed from the corresponding stego images.
Acknowledgments. Gandharba Swain is working as an Associate Professor in GMR
Institute of Technology. He would like to thank the management of GMR Institute of
Technology for providing the necessary computing facilities.
References
1. Cheddad, A., Condell, J., Curran, K., Kevitt, P.M.: Digital Image Steganography: Survey
and Analysis of Current Methods. Signal Processing 90, 727–752 (2010)
2. Jain, Y.K., Ahirwal, R.R.: A Novel Image Steganography Method with Adaptive Number
of Least Significant Bits Modification Based on Private Stego Keys. International Journal
of Computer Science and Security 4(1), 40–49 (2010)
478 G. Swain and S. Kumar Lenka
3. Wang, R., Chen, Y.: High Payload Image Steganography Using Two-Way Block
Matching. IEEE Signal Processing Letters 13(3), 161–164 (2006)
4. Kumar, P.M., Roopa, D.: An Image Steganography Framework with Improved Tamper
Proofing. Asian Journal of Information Technology 6(10), 1023–1029 (2007)
5. Wu, D.C., Tsai, W.H.: A Steganograhic Method for Images by Pixel Value Differencing.
Pattern Recognition Letters 24(9-10), 1613–1626 (2003)
6. Zhang, X., Wang, S.: Vulnerability of Pixel-Value Differencing Steganography to
Histogram Analysis and Modification for Enhanced Security. Pattern Recognition
Letters 25, 331–339 (2004)
7. Chang, C.C., Tseng, H.W.: A Steganographic Method for Digital Images Using Side
Match. Pattern Recognition Letters 25(12), 1431–1437 (2004)
8. Parvez, M.T., Gutub, A.A.: RGB Based Variable-Bits Image Steganography. In:
Proceedings of IEEE Asia Pacific Services Computing Conference, pp. 1322–1327 (2008)
9. Tiwari, N., Shandilya, M.: Secure RGB Image Steganography from Pixel Indicator to
Triple Algorithm- An Incremental Growth. International Journal of Security and Its
Applications 4(4), 53–62 (2010)
10. Kaur, M., Gupta, S., Sandhu, P.S., Kaur, J.: A Dynamic RGB Intensity Based
Steganography Scheme. World Academy of Science, Engineering and Technology 67,
833–838 (2010)
11. Li, B., He, J., Huang, J., She, Y.Q.: A Survey on Image Steganography and Steganalysis.
Journal of Information hiding and Multimedia Signal Processing 2(2), 142–172 (2011)