A Hybrid Steganography System b ased on LSB Matching and Replacement

This paper proposes a hybrid steganographic approach using the least significant bit (LSB) technique for grayscale images. The proposed approach uses both LSB matching (LSB-M) and LSB replacement to hide the secret data in images. Using hybrid LSB techniques increase the level of security. Thus, attackers cannot easily, if not impossible, extract the secret data. The proposed approach stores two bits in a pixel. The embedding rate can reach up to 1.6 bit per pixel. The proposed approach is evaluated and subjected to various kinds of image processing attacks. The performance of the proposed algorithm is compared with two other relevant techniques; pixelvalue differencing (PVD) and Complexity Based LSB-M (CBL). Experimental results indicate that the proposed algorithm outperforms PVD in terms of imperceptibility. Also, it significantly outperforms CBL in two main features; higher embedding rate (ER), and more robust to most common image processing attacks such as median filtering, histogram equalization, and rotation. Keywords—Steganography; LSB matching; LSB replacement; Embedding capacity; Imperceptibility


I. INTRODUCTION
These days data transmission on the digital communications via the internet confronts a wide range of security issues [1], [2], [3].Consequently, powerful digital techniques are needed to protect data during its transmission on the internet.One of the great interest solutions used to protect data is steganography [4], [5], [6].Steganography is the art of invisible communication by hiding a secret message in a digital cover media such as images [7], [8], text [9], audio [10], video [11] and network traffic [12], without being dubious [13], [14].Because digital images have a great deal of redundant data, there has been an increased interest in utilizing them as cover media for steganographic purposes [15], [16].
Image steganographic algorithms can be classified in terms of the embedding domain into two main classes: spatial domain and frequency domain-based algorithms [17], [18].Spatial domain-based algorithms conceal secret message straightforwardly in the intensity of pixels of an image, while in frequency domain-based algorithms, the image is firstly transformed into its frequency domain and secret message is then concealed in the transform coefficients [19], [20].
LSB replacement is one of the most well-known methods in the spatial domain [21].In this method, a secret data is embedded into a cover image by replacing the LSBs of the cover image pixels with secret data bits to get the stego image [22], [23].For a cover image, LSB replacement increases the even pixels by one or abandons them unaltered, while it decreases the odd pixels by one or leaves them unchanged [24].Due to the feeble sensibility of the human visual system (HVS), the presence of the embedded secret data cannot be perceptible.The quality of the stego image presented by LSB replacement may not be tolerable if a large amount of LSB is to be used in the embedding process.As a case, a stego image can accomplish as low as 31.78dB of the PSNR by utilizing LSB-4 replacement [25].Numerous credible steganographic methods have been devised for LSB replacement method [26].
LSB matching (LSB-M) method was proposed in [27], which is also called ±1 embedding [28].In this scheme, the pixel value of the cover image is increased or decreased randomly by one when the secret bit is not equal to the LSB of the cover image pixel [5].The LSB-M changes both the histogram of an image and the correlation between adjacent pixels and this helps steganalysis methods to attack this method [29].
In [18], the authors proposed a method called Complexity Based LSB-M (CBL).The method employs the strategy of adaptivity and the use of LSB-M in order to increase the security against attacks.CBL uses a local neighborhood analysis for determination of secure locations of an image and then it uses LSB-M for the embedding purpose.
In this paper, a hybrid approach using both LSB-M and LSB replacement methods is proposed.The approach is an improvement over the CBL method in order to increase both the embedding capacity and the robustness.The proposed approach stores two bits of the secret bits in a pixel.One bit is stored in the seventh bit using LSB-M technique; the other bit is stored in the eighth bit using LSB replacement technique.Thus, the maximum embedding capacity is increased to double (1.6) bits per pixel (bpp) compared to CBL maximum embedding capacity (0.8).This approach does not produce any distortions to be suspected by unauthorized observers and yields lower computational costs in its embedding and extraction processes.Moreover, it provides more robustness against most image processing attacks.
The remainder of this paper is organized as follows: In Section II a number of LSB-M based algorithms are represented.In Section III the embedding and extracting procedures for the proposed algorithm are presented.Experimental results and comparisons between the algorithm and other related algorithms are presented in Section IV.Finally, conclusions and future directions are given in Section V. www.ijacsa.thesai.org

II. RELATED WORKS
The literature is worth of the contributions in the field of LSB steganography.The work in [30] proposed pixel-value differencing (PVD) method.The main idea behind PVD is to use the difference of two consecutive pixels of a grayscale image to hide data.In their method, a pixel-value differencing is used to distinguish between edge areas and smooth areas.Consequently, the capacity of embedded data in edge areas is higher than that of smooth areas.Recently, to enlarge the embedding efficiency on PVD method, a lot of methods were proposed by combining PVD and LSB replacement methods, such as [31], [32], [33].With a slight alteration to the original PVD technique, the side match technique which is based on the correlation of a pixel with its neighboring pixels has additionally been evolved.In [34], the authors presented 2, 3 and 4-sided side match methods by using the correlation of a target pixel with its 2, 3, and 4 neighboring pixels.
Dissimilar to LSB replacement and LSB-M, LSB matching revisited (LSB-MR) uses a pair of pixels as hidden unit instead of one pixel [21].This method uses grayscale cover images.The embedding process is performed on a cover pixel pair (g i , g i+1 ) at a time to embed a secret bit pair (b i , b i+1 ).The corresponding stego pixel pair (g i , g i+1 ) can be obtained by keeping g i and g i+1 unaltered, or by increasing or decreasing them by one.The method used the function y = f (g i , g i+1 ) = LSB( g i /2 + g i+1 ) to evaluate whether or not the pixel values g i and g i+1 need alteration.However, on average, the embedding rate (bpp) for both LSB-M and LSB-MR is about 1 bpp, which is poor.A generalized LSB-M scheme (G-LSB-M) was proposed in [35] to generalize the method in [21].To enhance the level of security of both LSB-M and G-LSB-M, a content adaptive method was proposed in [36].In this method, if the secret bit does not match the LSB of corresponding cover image pixel, the decision of alteration direction is not arbitrary and is attempted to have the best correlation with the neighboring pixels.In [37], an approach called (ALSBMR) used LSB-MR with adaptive embedding.
In [18], the authors proposed LSB-M adaptive steganography algorithm called Complexity Based LSB-M (CBL).They used an 8-neighborhood of a pixel to determine the complexity region for embedding data in that region.They used LSB-M to embed data.The drawback of CBL algorithm is the low embedding capacity where it can not embed more than one bit in a pixel.This drawback is overcome in the proposed work by using LSB-M and LSB replacement techniques to increase the embedding capacity.
In [38], the authors proposed a data hiding algorithm based on interpolation, LSB substitution, and histogram shifting.In this work interpolation is used to adjust embedding capacity with low image distortion, the embedding process is then applied using LSB substitution and histogram shifting methods.In [39], the LSB substitution is improved by using a bit inversion technique.In this work secret data is hidden after compressing smooth areas of the image losslessly, resulting in fewer number of modified cover image pixels.A bit inversion technique is then applied where certain LSBs of pixels are modified if they occur in a particular pattern.In [40], a semireversible data hiding method which employs interpolation and LSB substitution is proposed.Interpolation is first used to scale up and down the cover image before hiding secret data to achieve high embedding capacity with low image distortion.Then, embedding is done using the LSB substitution method.

III. PROPOSED ALGORITHM
Embedding capacity, visual quality of stego image (imperceptibility), efficiency regarding execution time and the security level (robustness) are four primary criteria that are utilized to evaluate the performance of the steganographic scheme.The proposed algorithm uses both LSB-M and LSB replacement to address these criteria.An adaptive algorithm that is a modification to CBL approach [18] is proposed.Details of embedding and extraction phases are presented in the next lines.

A. Embedding phase
In the embedding phase, the algorithm embeds two bits in the pixels that have complexity value equal or more than a threshold value.One bit is embedded using LSB-M in the seventh bit from the left; another bit is embedded using LSB replacement in the least significant bit.The embedding phase is illustrated in the diagram shown in Fig. 1.The proposed embedding algorithm is based on CBL algorithm [18].Step 2 and step 5 in CBL algorithm were modified to achieve more capacity.In step 2, the least significant bit is removed and only the first seven bits are used to create the secondary image.In step 5, both LSB-M and LSB replacement are used to embed two bits of the secret data in the selected pixels.The proposed embedding algorithm is described in the following steps.www.ijacsa.thesai.org Step 1. Initialization: In this step, number of variables are initialized as follows: ← dimensions of cover image where P RN G is a pseudo random number generator, P RN G is initialized by a seed, which is a number that have to be selected and shared between the sender and the receiver.
Step 2. Secondary image formation: In this step, the least significant bit of each pixel in CI is removed and only the first seven bits are used to create the secondary image.This image will be used to compute the complexity values of pixels in the next step.Using the secondary image helps the receiver to get the same complexity value [18].The following routine creates this image.where bitshif t function will shift the pixel bits to the right, so it will remove the least significant bit.For example, if the pixel value is (215) 10 = (11010111) 2 , then the pixel value after the shifting process will be (1101011) 2 = (107) 10 .
Step 3. Pixel complexity computation: The complexity of each pixel is computed by adding absolute values of differences of the pixel with its neighbors as follows [18] Complexity(x, y) = Figure 2 shows the neighborhood of pixel CI(x, y).The complexity value is an indication of the type of region that the pixel belongs to; edge or smooth region.Where more data can be embedded in edge regions without creating any suspicion.A high complexity value indicates the pixel is located in an edge region, while a low value indicates the pixel is located in a smooth region.Examples of cover images and their complexity values are illustrated in Fig. 3. Step 4. Threshold computation: Complexity values of pixels are compared with a threshold; values greater than or equal to threshold indicate an edge region, and smooth region otherwise.To calculate threshold value, the number of pixels to be embedded (N P ) must be computed using N P = SB/2, where SB refers to the total number of embedded secret bits.The threshold value T is chosen to make sure that at least N P of the pixels are complex.The following routine shows how T is computed.
where t • is a temporary value of threshold, which starts with the maximum value of the seven-bit pixel.
Step 5. Embedding: In this step, the secret data are embedded using LSB-M and LSB replacement techniques.Two bits are embedded in each selected pixel; the first one is embedded using LSB-M as in CBL but in the seventh bit, the second bit www.ijacsa.thesai.org is embedded in the least significant bit using LSB replacement.
The following pseudocode presents the embedding procedure, where s is the string of message bits and SI is the stego image.
The last four lines of the algorithm present the proposed modification on this step.The selected pixel value of the secondary image is converted to seven bits binary by using dec2bin function and stored in conca.One of the secret bits is concatenated to the seven bits in conca by using strcat function and stored in emb.Finally, the eight bits in emb are converted to decimal value by using bin2dec function and the resulting value is stored in SI.

B. Extraction phase
The extraction phase is the same as embedding in the first four steps, except that the stego image SI is used instead of the cover image to create the secondary image and compute the complexity, and a copy of stego image CSI is created to be used in the extraction step.Figure 4 shows the flow diagram of the extracting phase.
After the first four steps are done, the extraction step works by extracting the two least significant bits of each pixel that is labeled as complex.The following pseudocode presents the extraction routine, where mod 4 is used to extract the two least significant bits as a decimal number, the dec2bin function is used to convert the decimal number back to two binary bits, which are stored in s.Generally, the steganographic algorithms can be evaluated by two benchmarks; the embedding rate and the imperceptibility (or the quality of the stego image).The embedding rate (ER) is defined as the number of secret data bits that can be embedded per pixel, it can be calculated as [43], [44] where SB refers to the total number of embedded secret bits, M and N are the width and height of the cover image, respectively.To gauge the imperceptibility or the quality of the stego image, the peak signal-to-noise ratio (PSNR) is used.A high PSNR value indicates a high similarity between the stego and cover images, while a low value demonstrates the opposite.PSNR can be computed as [30], [45] where M AX is the maximum value of the pixel intensity, e.g., M AX = 255 for 8-bit grayscale images.MSE is the mean square error, defined as Figure 6 shows stego images for five cover images using the proposed algorithm.The PSNR values range between 47.77dB and 48.13dB when the embedding rate is 0.8 bpp, and between However, in all cases, there is no distortion to be aware of by the human eye.
To evaluate the proposed approach, a comparison was conducted with other approaches: PVD [30] and CBL [18].Table I presents this comparison, where four embedding rates (0.3, 0.5, 0.8 and 1.6 bpp) were used for each method, and the PSNR average is calculated for the 10 test images.Since CBL cannot embed 1.6 bpp, the corresponding PSNR value is left as (-).It is noticeable that the proposed algorithm in all test images and embedding rates provides better imperceptibility values than PVD.Moreover, compared to CBL, the approach provides double embedding rate.However, average PSNR values are less; this is because CBL only embeds one bit per pixel, while the approach embeds two bits.
To further evaluate the proposed approach, the stego images were subjected to different kinds of image processing attacks, namely JPEG 2000 lossy, sharpening, Gaussian noise, median filter, contrast enhancement, Gaussian filter, histogram equalization, and rotation.Table II shows the average bit correct rate (BCR) [46] of the watermarks after applying these attacks at embedding rate 0.8 bpp.It is worth mentioning that the BCR can be computed using where OB is the original bit and EB is the extracted bit of the watermark.L is the length of the watermark.
The obtained results show that the proposed algorithm is more robust than CBL against median filtering, histogram equalization and rotation attacks.BCR values after applying JPEG 2000 lossy, sharpening, Gaussian noise and contrast enhancement were similar.All BCR values are low (between 0.48 and 0.63) because the attacks change the secondary image of stego image.In this paper, by considering the significance of the embedding efficiency of steganographic algorithms, a hybrid approach is proposed for data hiding with high capacity and robustness.The proposed approach is a modification to CBL to achieve more embedding capacity.The proposed approach uses both LSB-M and LSB replacement techniques to conceal secret data in the least significant two bits of the pixel values.Thus, the proposed approach can achieve more embedding capacity than CBL, which only embeds secret data in the least significant bit of pixel values.
The maximum embedding rate achieved by the proposed approach is 1.6 bpp, which is double of the capacity achieved

Fig. 5 .
Fig. 5. Sample test images used in the experiments

TABLE II .
[18]AGE BCR COMPARISON AFTER IMAGE ATTACKS BETWEEN THE PROPOSED APPROACH AND CBL[18]