An Enhanced Method for Data Hiding using 2-Bit XOR in Image Steganography

— As we all know security is needed when we want to send data over any medium so this requires a secure medium to send data. That’s why steganography comes in mind whose aim is to send data securely without knowing of any hacker. In this paper, a new technique is projected whose aim is to keep secrete communication intact. The proposed method blends the advantage of 2 bit LSB and XOR operation. In this, first we are XORing the 8th, 1st bit of data and 7th, 2nd bit of data after this two bit are obtained. These obtained bits are replaced at the LSB position. However, with some way, any person get know about hidden message and it takes the LSB position bit then there are no chances of getting message as it is not the actual message. An experiment was performed with different dataset of images. Furthermore, it was observed that the proposed method promises good result as the PSNR and MSE are good. When the method was compared with other existing methods, it shows enhancement in the imperceptibility and message capacity.


II. LITERATURE REVIEW
We are using spatial domain methods which include various techniques for hiding data in an image. LSB technique replaces the last significant bit of the pixel value of original image (cover object) with the secret message. This method provides better PSNR value. The image is also less distorted because it hides at LSB position only change done is of value '1'. So, this change can't be detected by human eyes. As the original message is on the LSB, it can be directly accessed by the intruder. Also in 1 bit LSB method only one bit is hidden on a pixel. Khan et al. [15] introducing the concept of HSI image in which the RGB image is first converted into the HSI (hue saturation intensity) color model. The obtained image is divided into three planes: H plane, S plane, I plane. They use I-plane which is divided into 4 parts and then these sub blocks are rotated with different angle value and them also doing encryption on the secret data. On secret data, they are using the MLEA encryption technique and then the cipher text is stored as LSB in the sub block of image and data is stored using the M-LSB substitution (magic LSB) and these sub blocks are combined to make the I-plane and after this the all the three plane (H-plane, S-plane, I-plane) are combined and stego image is formed. This method has low message carrying capacity as only one bit is hidden on a single pixel. Jung and Yoo [16] proposed a new method using the combination of interpolation and LSB technique is used for data hiding. They used the semi reversible technique in which the receiver can obtained without distortion of secret message and also the original image. They first use the concept of interpolation in which they are scaling up the matrix or down the matrix, scaling up result in increase the size of matrix and scaling down result in decreasing the matrix size. After this, secret data is arranged in bit and then 3 bit are stored at 3 LSB position. This method increases the quality and prone to the attack as secret data is hidden after doing interpolation technique. At the receiver end, receiver receives the stego image and data is extracted from the 3 LSB position. The data hidden by this method is also less as the data is hidden on the interpolated values not in the complete image. Abduallah et al. [17] introduces a reversible data hiding scheme based on 3LSB position and mix column transformation is applied. In this, they are dividing the cover image into either 3*3, 5*5, 7*7 blocks. One block is chosen from the cover image matrix and known as block matrix and another matrix known as transformation matrix is chosen randomly which must have an inverse. After this, block matrix element are converted into equivalent binary form and last 3 bit of this matrix element are used and a new matrix is formed. After formation of this matrix, it is multiplied to the transformation matrix and then result is used to make a new matrix which is used for data hiding. Abdul and Gutub [18] proposed a new improved technique that uses the RGB image which is of the 24 bits. They divide these bits in three bytes. To take out the key management system, the method used one channel for indicator. They are using the size of the secret data as selection of criteria for first indicator channel to insert security. This method also does not utilize all the channel of the of the cover image as one channel is used for the indicator channel and only two other channels are used to hide the data.

III. PROPOSED TECHNIQUE
In the proposed technique data is inserted at LSB position based on computation. Suppose I C is the cover image and its pixel are generated and after this the pixel are converted into its 8bit binary number. This 8 bit binary number is used for computation. Using the 8th bit of present pixel and the 1st bit of secret message, XOR operation is performed and in the same way the 7th bit and next bit of secret message are also XORed. The two bits obtained after XORing the bits. These two computed bits are inserted at the last two LSBs of the present pixel. This cycle repeats until the value of the message becomes zero i.e. message consumed. As this method provide, security against attacks because we are inserting data after performing XOR operation. XOR operation is interesting if we XOR (a, b) = c then XOR (b, c) = a. It means that when XOR two numbers then result obtained is XOR with any operand then result shows another operand.

A. (Algorithm 1) Embedding Algorithm
Input -Cover Image (I C ), Secret Message and Secret Key (K Key ) Output-Stego Image (I s ) 1.
Initialize I C ←Cover Image, D ←Secret Message, K Key ←Secret Key 2.
While Counter <= size of the message block do 3.
For each pixel a. Pick a pixel I (x, y) from the image and convert it into 8 bit binary number. b. Find the 8th bit and 7th bit of the pixel value. c. Find secret message first and second bit d. Perform XOR on 8th bit of pixel with first bit of secret message and also perform XOR on 7th bit of pixel with second bit of secret message. e. Store the obtained bit at 2nd and 1st LSB position of the present pixel. 4.
Repeat step 3 for each pixel until the message is terminated. We used different images for obtaining the result and did analysis with to the proposed method. We use different Dimension of images like 128×128,256×256, 512×512. Images used are like baboon, Lena, Girl, River, Pepper of 512×512 and 256*256 , 128×128 images like Tree, House, Girl, Couple etc.

D. Quantitative Evaluation
We used different cases. According to case 1, secret message of 8 KB is embedded in different grayscale images having size 256×256. The second case is to embed message of distinct sizes in the same images having dimension (256×256 in pixels). In third case multiple images with different resolution (128×128, 256×256, and 512×512) were used. The size of data is same as case1. We are using different existing scheme for comparison. They are Classical LSB, SCC [19], PIT [9], FMM [20], and CST [21].
We used different parameters on which quality of the proposed method was analysed. They are PSNR (Peak Signal to Noise Ratio), MSE (Mean Squared Error), STD (Standard Deviation), MEAN (Mean of the original image) etc.   In this case we are using different images of same resolution for embedding the secret message. Embedding text is 8 Kb in size. We have use the image like house, tree, girl, candy and couple for evaluation and analysis is done on this behalf. The analysis requires the use of various factors for affecting a steganography method. The method performance is calculated on the basis of these factors. How these factor work a method is applied on it. Fig. 4 Original images, its stego image, difference image and their histograms Figure 4 shows the original image, stego image, difference between these image, and their respective histograms. Original image is image which we used for embedding secret message, stego image contains the original image with message is embedded. Histograms of both the image are also shown in this figure. Table 3 contains the original and stego image's PSNR, MSE, MAXERR, L2RAT, Mean and standard deviation of both images [22].

Couple Candy
Girl2 Tree Girl House In this case same image is used for embedding variable size of data. Image used is Tree. Image having the 256*256 resolution. In this image, different data size like 2 KB, 4 KB, 6KB, 8KB etc. are embedded. Figure 6 shows different images when variable size data is embedded. The below diagram shows original image and its histogram, stego image and its histogram and difference between two images and histogram of this difference. The difference image of original and stego image represent the portion of the stego image where the data is hidden. In this case we have embedded different size data in the same image. Figure 6 shows different data size inserted in same image with their histograms. The original image, the stego image and difference is shown and also their histograms are shown. We use some of the images with different resolution. In this case we embed equal amount of data in three different image of different resolution. Embedding data size is of 8 KB and image resolutions are different. Figure 8 also shows original and stego image and their respective histograms.   COMPARISON We are using different method for comparison to be done with the proposed method. There we are using PIT method, SCC method, FMM method, CST method and classic LSB method. Around 50 images for comparison were taken. This comparison shows that the proposed method is better from other method except the classic LSB method. VI. CONCLUSION In this paper, we proposed a novel image steganography technique which increases security. Here we are using the image (gray scale image) which is 2 dimensional, which reduces the processing time and enhance the security of hidden data. In this proposed method, large amount of data can be hidden because we are hiding 2 bit of data in one pixel. The stored data at this position is not the actual data but it is obtained by performing the XOR operation. We are performing the XOR operation using 8th bit, first bit of data and 7th bit, 2nd bit of data. The result produces two bits which are not the actual data and we are storing this obtained bit at the LSB position. If an attacker able to detect the LSB bit then we have no need of getting worried because this is not the actual data at this position. The proposed method is feasible in the sense that this method is easy to implement, easy to understand and also provide security against attack. This proposed method also makes the stego image of better quality. After seeing the stego image, no one could imagine the presence of message is in the image. After implementation and analysis we get the good imperceptibility and capacity.