You are on page 1of 5

2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP)

Image Steganography: 2-Bit XOR Algorithm Used


In YCbCr Color Model With Crypto-algorithm
2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP) | 978-1-7281-6509-7/20/$31.00 ©2020 IEEE | DOI: 10.1109/ICCCSP49186.2020.9315245

Madhu D, Research Scholar S Vasuhi, Associate Professor


Department of Electronics Engineering, Department of Electronics Engineering,
Madras Institute of Technology, Madras Institute of Technology,
Anna University, Chennai, India Anna University, Chennai, India
dmadhuknr@gmail.com vasuhi_s@annauniv.edu

Abstract— Steganography is a study of invisible


communication that typically addresses how the message is
concealed. Protection is required when we want to send data
across any medium, this is why steganography has been built to
safely send data in an image where the human eyes cannot
identify it. This paper integrates cryptography and
steganography through an image processing technique. YCbCr
color model based on the 2-bit XOR LSB image steganography
is proposed here in. The proposed scheme is a very safe
technique for data concealed in the spatial field for image
steganography, which converts an image from the color of
RGB to the YCbCr space, and then secret data is concealed
inside in the Cr color space component using 2-bit XOR.
Before concealed the data in an image, our work introduces a Fig.1. Block diagram of Steganography
simple crypto algorithm to a text file for getting unreadable
format. For the crypto algorithm, we are using Rail Fence The Rail Fence Cipher is a transposing cipher which
Cipher with key 2 for the encryption and decryption of text jumbles the order of letters of a message. The rail clamp
files. A detailed study has been carried out in the proposed 2- works by writing the message across the page on alternative
bit XOR substitution algorithm for YCbCr image. Finally, the lines and read every line in turn. The plain text is written on
Mean Square Errors (MSE) and Peak Signal to Noise Ratio successive rails of an imaginary fence downwards and
(PSNR) were contrasted with various encryption techniques.
diagonally. When we get to the bottom rail, we go upward
The proposed method is high secure, high PSNR with low MSE
diagonally, and the path is shifted again we get to the top rail.
values, which indicates that this technique is very effective to
conceal data in an image. Thus the alphabets of the document are written in zigzag
manner.
Keywords— Image steganography; Rail Fence Cipher; This paper is organized as follows. Section II describes
YCbCr model; 2-bit XOR; Mean square error; Peak signal to the literature review on image steganography. Proposed
noise ratio. technique is explained in section III. Details of the simulation
results and conclusion are presented in section IV & V
I. INTRODUCTION
respectively.
Cryptography and steganography are commonly used
techniques in images. Steganography is a technique for II. LITERATURE REVIEW
hiding confidential information in text, pictures, audio, and We present a summary of previous research in the image
video format. Information is concealed in the media to steganography field in this section. Hiding information is the
confuse others who do not know the nature of the way to inject information into computerized content without
information. Cryptography [1] is the most common solution creating a perceptive degradation. Three famous data hiding
for a safe and reliable data transmission method over recent techniques are cryptography, stenography, and
decades. The focus of cryptography is to change the original watermarking.
data to an unreadable format, so it's read-only by the
recipient. There are two main aspects of steganography, Spatial domain method includes a several data hiding
namely imperceptibility and capacity. Imperceptibility refers techniques in an image. LSB substitution is the simplest and
to the quality of generated steganographic output, where the most commonly used method when compared to the other
quality of output has to be the same as cover media before methods. In this method cover image is less blurred because
embedding the document. While the message capacity refers the only change made at the LSB location is ' 1’. LSB
to the message size with a large number, the output is not technique [2] provides better PSNR value and low MSE
much distorted. A proposed steganography is a combination value. We found several techniques for hiding data with
of cryptography and steganography as shown in figure 1.The color images.
process of hiding text in an image using crypto algorithm is M.H. Abood [3] offers an effective image encryption
more secure than normal steganography. algorithm that uses the HLSB method for the RC4 stream
cipher and the RGB pixel are encrypted and decrypted with

978-1-7281-6509-7/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: ANNA UNIVERSITY. Downloaded on March 10,2021 at 04:48:43 UTC from IEEE Xplore. Restrictions apply.
2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP)

the steganography using a hash function. His LSB insertion The following steps are the process of incorporating
process has a 63 dB PSNR and a 0.03 MSE. secret text in the cover image-
J. Baek et al [4] introduced a secret sharing method of Step 1: Read RGB cover image.
information using gray-scale image steganography. XOR was Step 2: Read the text file and apply the crypto algorithm to
used to perform a bit display on a specific pixel bit. secret text using rail fence encryption technique to get cipher
text and convert in to a 1-Dimensional array of bits.
Mandal, J.K., Sengupta M, [5] Proposed minimum Step 3: Convert RGB to YCbCr color space model using
variance of the data integration technique based on fidelity. equations 1, 2&3 respectively
In this case, random replacement positions are chosen to Step 4: Separate Cr component from YCbCr color image.
modify two bits by the byte between LSB and until the fourth Step 5: Convert Cr component pixels in to 8 bit binary
bit towards MSB.
values.
Deepak kumar [6] implemented a hiding text in color Step 6: For every pixel
image using YCbCr color model with better PSNR and low a. Find the first and second bit of secret message.
MSE values for different images. Renuka, Hemalatha S, U b. Execute XOR with the first bit of secret message, 8th
Dinesh Acharya, A [7] Proposed a pixel value difference in
LSB on image steganography with One Time Pad bit of pixel and XOR with the second bit of secret
Encryption technique. message, 7th bit of pixel.
c. Place the resultant bit in the current pixel at 2nd and
III. PROPOSED WORK
1st LSB
The proposed method is combination of 2-bit XOR d. Repeat step (b) until the message is completed for ea
[8] LSB replacement in Cr, crypto-algorithm and YCbCr ch pixel.
Color Model.
Step 7: Recombine Cr component with YCb color space into
A. Crypto algorithm : Rail fence cipher a single image YCbCr.
The Rail Fence Cipher is a very simple, easy to crack Step 8: Convert YCbCr to RGB stego-Image.
cipher. It is a transposition cipher which follows a simple
rule to mix the characters into the plaintext to form the text of D. Extraction Algorithm:
the cipher. The method of extracting hidden text from stego-images is as
For example, let’s consider follows:
the plaintext “MADHUISINMIT” with key: 2. Arrange the Step 1: Read RGB stego-Image.
plaintext into rail fence cipher model as shown in figure 2. Step 2: Convert RGB image to YCbCr image and Separate
Cr component.
Step 3: Convert Cr component pixels in to 8 bit binary
values.
Fig.2. Rail fence cipher Step 4: For every pixel
Using a rail-fence cipher algorithm with key 2 the cipher a. Find a first and second bit of secret message and
text becomes:" MDUSNIAHIIMT”. The plain-text is written 8th, 7th bit of pixel.
downwards and diagonally on rails of an imaginary fence. b. Execute XOR with the second bit of secret message,
Once we arrive at the bottom rail, the direction is changed 8th bit of pixel and XOR with the first bit of secret
again after reaching the top rail. So, the message is message, 7th bit of pixel.
pronounced in a zig-zag way. Step 5: The XOR resultant bits are cipher text bits and these
B. YCbCr Model bits converted to characters.
The color images are displayed in different color spaces Step 6: Convert Cipher text to recovered plaintext using a
like RGB (Red Green Blue), HSV (Hue, Saturation, and rail fence decryption algorithm.
Value), YUV, YIQ, YCbCr (Luminance, Chromancy), etc.
YCbCr Model is defined in the ITU-R BT.709-5 and ITU-R E. Example:
BT.601-5 standards of ITU.
'Y ' is a luma component that provides the information on Consider a simple 2 * 2 image consists of 4-pixels as
brightness and 'Cb' and 'Cr' are the color information shown in figure 3,
components for the blue and red difference. The human eye
is highly sensitive to luminance changes but not
chrominance. Thus small chrominance changes can not affect
the overall quality of the image. YCbCr [9], [10] is A(98,109,131) B(88,120,144)
sometimes abbreviated to YCC. Y′CbCr is often
called YPbPr . C(84,129,131) D(72,136,128)
C. Embedding Algorithm:
Input:–RGB Image and Secret Data and Secret Key Fig.3. Example Image to cover the data
Output: Stego -Image.

978-1-7281-6509-7/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: ANNA UNIVERSITY. Downloaded on March 10,2021 at 04:48:43 UTC from IEEE Xplore. Restrictions apply.
2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP)

Convert RGB coordinates to YCbCr model using 110 = 01101110


conversion formula and separate Cr component, we get: Pick 8th, 7th, 2nd, 1st bit
Acr = 121 = (0 1111001)2 8th bit =0 2nd bit=1
Bcr = 110 = (01101110)2 7th bit=1 1st bit=0
Ccr = 105 = (01101001)2 Execute XOR (0, 1) = 1 XOR (1, 0) = 1
Dcr = 97 = (01100001)2 Extract bits= ‘11’
Let’s us take secret content into account “01101101”, so 104 = 01101000
121 = 01111001 M=01101101 Pick 8th, 7th, 2nd, 1st bit
Let us take 8th, 7th bit from pixel data and take 1st, 2nd bit 8th bit =0 2nd bit=0
from text data 7th bit=1 1st bit=0
8th bit=0 1st bit of message=1 Execute XOR (0, 0) = 0 XOR (1, 0) = 1
7th bit=1 2nd bit of message=0 Extract bits= ‘01’
XOR (8th, 1st bit) =1 XOR (7th, 2nd bit) =1 99 = 01100011
Insert the calculated value at position 2 and 1 of LSB in pixel Pick 8th, 7th, 2nd, 1st bit
value. 8th bit =0 2nd bit=1
After message insertion the pixel value becomes 7th bit=1 1st bit=1
01111011 = 123. Execute XOR (0, 1) = 1 XOR (1, 0) = 0
Take second pixel: Extract bits= ‘10’
110 = 01101110 M=01101101 Arrange the extracted bits from LSB side to MSB side in to 8
Let us take 8th, 7th bit from above pixel value and take 3rd, bit and convert in to character value.
4th bit from text data So, the Extracted bits are’ 01101101’= M.
8th bit=0 3rd bit of message=1
7th bit=1 4th bit of message=1 Now calculating MSE and PSNR for this example by using
XOR (8th, 3rd bit) =1 XOR (7th, 4th bit) =0 formula 1 and 2 respectively,
Insert the calculated value at position 2 and 1 of LSB in pixel 2
1 m-1 n-1
value. MSE =   I ( i, j) - K ( i, j)
After message insertion the pixel value becomes mn i=0 j=0 (1)
01101110 = 110.
Take third pixel:
105 = 01101001 M=01101101  M AX I 
P S N R = 20 * log 10  M SE 
Let us take 8th, 7th bit from above pixel value and take 5th,
6th bit from text data
  (2).
8th bit=0 5th bit of message=0
7th bit=1 6th bit of message=1 IV. RESULTS AND DISCUSSION
XOR (8th, 5th bit) =0 XOR (7th, 6th bit) =0 In this paper, the proposed algorithm is validated for
Insert the calculated value at position 2 and 1 of LSB in pixel different RGB images like Peppers, Baboon, and Lena. The
value output images from YCbCr conversion to Stego-image with
After message insertion the pixel value becomes two sample color images like Baboon and Peppers as shown
01101000 = 104.
in figure 4.Histogram analysis of Chromancy (Cr) with data
Take fourth pixel:
97 = 01100001 M=01101101 and without data as shown in figure 5. This proposed
Let us take 8th, 7th bit from above pixel value and take 7th, technique is based on the observation of the human vision
8th bit from text data, system tolerates noise in an image's chromes. Thus, the
8th bit=0 7th bit of message=1 proposed scheme, extracts the cover image chrominance
7th bit=1 8th bit of message=0 channels, by using the color space transformation YCbCr,
XOR (8th, 7th bit) =1 XOR (7th, 8th bit) =1 and the text was hidden in only one color channel (Cr).
Insert the calculated value at position 2 and 1 of LSB in pixel
value Experimental testing and the results are compared with
After message insertion the pixel value becomes existing methods as shown in figure 6 and using crypto
01100011 = 99 algorithm in steganography which provides a safe and easy
After message insertion the overall pixel values become processing of text message. This proposed algorithm is also
Acr = 123, Bcr = 110, Ccr= 104, Dcr= 99. used on different images in different dimensions and PSNR
Extraction takes place in the same manner: is compared as shown in figure 7.
Pick first pixel from above figure 5
123= 01111011
Pick 8th, 7th, 2nd, 1st bit
8th bit =0 2nd bit=1
7th bit=1 1st bit=1
Execute XOR (0, 1) = 1 XOR (1, 1) = 0
Extract bits= ‘10’

978-1-7281-6509-7/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: ANNA UNIVERSITY. Downloaded on March 10,2021 at 04:48:43 UTC from IEEE Xplore. Restrictions apply.
2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP)

(a)

(b)
Fig.5. Histogram analysis of Cr component

(c)

(d)

(e)
Fig.4. Output Images of Baboon and Peppers:(a)YCbCr Image,(b)Cr
component,(c)Cr component with Data,(d)YCbCr image,(e)Stego-Image.

A histogram represents the number of pixels in an


image.
The distribution of color composition in the image is a
color histogram of an image. The relation between a color
histogram and a luminance histogram can be expressed as
“Three Luminance Histograms”, each of which shows the
Fig.6. PSNR comparision analysis on different images
brightness distribution of each individual color channel. The
histogram graph represents a relation between the original Cr For the proposed algorithm, MSE is: 0.52, PSNR is:
component and data replaced in Cr component pixels. Red 55.35 dB, Less MSE value improve the stego-image
color graph represents original Cr and blue color graph quality. Higher PSNR value improves the quality of an
represents Cr with data. image. The proposed method was simulated using the
MATLAB 2018a.

978-1-7281-6509-7/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: ANNA UNIVERSITY. Downloaded on March 10,2021 at 04:48:43 UTC from IEEE Xplore. Restrictions apply.
2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP)

Steganography,” in Proceedings of the Fourth International


Conference on Communication and Electronics Systems (ICCES
2019).
[2] Touhid Bhuiyan, Afjal H. Sarower, Md. Rashed Karim, Md. Maruf
Hassan,” An Image Steganography Algorithm using LSB
Replacement through XOR Substitution,” in International Conference
on Information and Communications Technology (ICOIACT),2019.
[3] J M. H. Abood, “An efficient image cryptography using hash-LSB
steganography with RC4 and pixel shuffling encryption algorithms,”
in 2017 Annual Conference on New Trends in Information and
Communications Technology Applications, NTICT 2017. IEEE, mar
2017, pp. 86–90.
[4] J. Baek, C. Kim, P. S. Fisher, and H. Chao, “(N, 1) secret sharing
approach based on steganography with gray digital images,” in
Proceedings - 2010 IEEE International Conference on Wireless
Communications,Networking and Information Security, WCNIS
2010. IEEE, Jun 2010,pp. 325–329
[5] Mandal, J.K., Sengupta, M., (2011), “Steganographic Technique
Based on Minimum Deviation of Fidelity (STMDF).”, Proceedings
of Second International Conference on Emerging Applications of
Information Technology, IEEE Conference Publications, pp 298 –
301.
[6] Deepak kumar,” Hiding Text In Color Image Using YCbCr Color
Model: An Image Steganography approach,” in 2nd International
Conference on Issues and Challenges in Intelligent Computing
Techniques (ICICT), 2019.
[7] Touhid Bhuiyan, Afjal H. Sarower, Md. Rashed Karim, Md. Maruf
Fig .7. PSNR comparision with different dimensions. Hassan,” An Image Steganography Algorithm using LSB
Replacement through XOR Substitution,” in International Conference
V. CONCLUSION on Information and Communications Technology (ICOIACT),2019.
Combination of YCbCr color model and 2-bit XOR [8] Kamaldeep Joshi, Rajkumar Yadav, Gaurav Chawla,” An Enhanced
algorithm provides a large amount of data can be concealed Method for Data Hiding using 2-Bit XOR in Image Steganography,”
in International Journal of Engineering and Technology (IJET), Vol 8
in Cr component, because one pixel can conceal 2-bit of No 6 Dec 2016-Jan 2017.
data .Along with this, we use a simple crypto-algorithm for [9] Hemalatha S, U Dinesh Acharya, Renuka A,” comparison of secure
securing of data. Comparison of stego-image quality with and high capacity color image steganography techniques in RGB and
different existing methods, our proposed method is best and YCbCr domains,” in International Journal of Advanced Information
the value of PSNR reaches above 40 dB then the stego-image Technology (IJAIT) Vol. 3, No. 3, June 2013.
has best quality. [10] Eugenijus Margalikas, Simona Ramanauskaitė,” Image steganography
based on color palette transformation in color space,” in EURASIP
REFERENCES Journal on Image and Video Processing,2019
[1] Dr Manjula Shenoy K, Seema Gulam Shaikh,” An Approach to
Secure Data Transmission Through the Use of Cryptography and

978-1-7281-6509-7/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: ANNA UNIVERSITY. Downloaded on March 10,2021 at 04:48:43 UTC from IEEE Xplore. Restrictions apply.

You might also like