Hybrid image steganography method using LZW and genetic algorithm for hiding confidential data

Digital images are commonly used in steganography due to the popularity of digital image transfer and exchange through the Internet. However, the tradeoff between managing high capacity of secret data and ensuring high security and quality of stego image is a major challenge. In this paper, a hybrid steganography method based on Haar Discrete Wavelet Transform (HDWT), Lempel Ziv Welch (LZW) algorithm, Genetic Algorithm (GA), and the Optimal Pixel Adjustment Process (OPAP) is proposed. The cover image is divided into non-overlapping blocks of n x n pixels. Then, the HDWT is used to increase the robustness of the stego image against attacks. In order to increase the capacity for, and security of, the hidden image, the LZW algorithm is applied on the secret message. After that, the GA is employed to give the encoded and compressed secret message cover image coefficients. The GA is used to find the optimal mapping function for each block in the image. Lastly, the OPAP is applied to reduce the error, i.e., the difference between the cover image blocks and the stego image blocks. This step is a further improvement to the stego image quality. The proposed method was evaluated using four standard images as covers and three types of secret messages. The results demonstrate higher visual quality of the stego image with a large size of embedded secret data than what is generated by already-known techniques. The experimental results show that the information-hiding capacity of the proposed method reached to 50% with high PSNR (52.83 dB). Thus, the herein proposed hybrid image steganography method improves the quality of the stego image over those of the state-of-the-art methods. all that, the is to reduce the size of the secret data. This improves the hiding capacity of the proposed algorithm. Then, the encoded secret data are embedded in each cover image block according to a mapping function that is obtained for each block by using the GA, which enhances the quality of the stego image and improves its security. The OPAP algorithm is applied to each block to reduce the error, that is, the difference between the stego image blocks and the cover image blocks. This enhances the quality of the stego image. The proposed hybrid image steganography algorithm was implemented and evaluated on four standard images, as cover images, and three types of secret messages. The evaluation results suggest that this algorithm improves the hiding of secret data and the visual quality and security of the stego image. and


Introduction
Digital communication is usually vulnerable to eavesdropping and malicious interference. In this context, susceptibility to security and privacy threats in digital communication is commonly treated with either cryptography or steganography. After application of cryptography to digital communication, the messages look like meaningless jumble of characters, which may raise some suspicion. In this case, these messages can be observed by an eavesdropper but can not be understood. On the other hand, after application of steganography to the digital messages, they will remain as normal messages that are secured while still intact. This makes it difficult for the observers to discover them [1].
Various techniques are used to perform steganography. They can be broadly classified into spatialdomain techniques and transform-domain techniques. The spatial-domain techniques have low robustness against attacks and are not very secure. Hence, any attacks to the stego image may destroy the secret data. Besides, the secret data can be detected and extracted easily from the stego image [2][3][4]. The transform-domain techniques, however, are more secure and robust against the different attacks than the spatial-domain techniques. However, the size of secret data that can be hidden in a cover image is less than what the spatial-domain techniques allow for [5,6]. In addition, in both domain categories, the larger the size of the secret data, the lower the quality of the stego image. Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT), and Discrete Wavelet Transform (DWT) are the transforms most commonly used to convert the image into the frequency domain [6][7][8].
(SVD) and DWT was poposed. Scene change analysis was employed to embed the watermark repeatedly in the singular values of high-order tensors computed form the DWT coefficients of selected frames from each scene. However, the scheme employs similar embedding strategies to the SVD-based scheme. Consequently, it is prone to the risk of high false positive. In this research, a method is proposed to embed a large volume of secret data at higher quality and level of security than the state-of-the-art methods by employing two-dimensional (2-D) Haar Discrete Wavelet Transform (HDWT), the Lempel Ziv Welch (LZW) algorithm as a compression algorithm, and Genetic Algorithm (GA) as an optimization algorithm.

The Proposed Method
In this work, the researchers propose a hybrid steganography method that applies a similar technique to that reported in [16], with the slight modification of incorporating the GA to achieve optimal mapping for each block size of interest, ultimately to improve the quality of the stego image.
The proposed method consists of two algorithms; an embedding algorithm and an extraction algorithm.
In the embedding algorithm, the cover image is divided into non-overlapping blocks of nxn pixels. Then, each block is decomposed into four sub-bands by using 2-D HDWT. The secret message is then encoded and compressed using the LZW algorithm. After that, the GA is employed to embed k-length of encoded secret message bits in the block coefficients of each cover image. This is purposely done to identify the optimal mapping function. The OPAP is then applied to each block to reduce the error, that is, the difference between the cover image blocks and the stego image blocks. Thereafter, the inverse HDWT is applied to each block to obtain the overall stego image. In the extraction algorithm, the stego image is divided into non-overlapping blocks of nxn pixels. Then, each block is decomposed by using the 2-D HDWT. After that, the encoded secret message is extracted from the block coefficients according to the mapping function. Lastly, the LZW decompression algorithm is applied to obtain (i.e., decode) the secret message. This section describes the proposed method in detail.

Discrete Wavelet Transform (DWT)
The 2-D DWT can be implemented using two digital channel filters and a group of down samplers as shown in Fig. 1. The digital filters used are a Low-Pass Filter (LPF) and a High-Pass Filter (HPF). Four different sub-images are obtained by applying first-level (1-L), 2-D DWT on the image. The most commonly used filter is the Haar filter [21]. To apply the HDWT, the cover image of size MxN pixels should be divided into non-overlapping blocks of nxn pixel size. Experiments in the present study revealed that using blocks of the 8x8 size gives the best results. Thereupon, the researchers used the 8×8 pixel size in the present study as shown in Fig. 2.

Fig. 2 Cover image blocks of 8×8 pixel size
Each block is decomposed by using 1-L 2-D HDWT into four sub-bands. The LL1 is the first sub-band that contains approximation coefficients. The LH1 is the second sub-band that contains horizontal detail coefficients. Meantime, the HL1 is the third sub-band that contains vertical detail coefficients. Lastly, the HH1 sub-band contains diagonal detail coefficients. Each sub-band has the 4×4 pixel size as illustrated in Fig. 3.

The Lempel Ziv Welch (LZW) Algorithm
There are several techniques for data compression such as the Huffman, LZW, and JPEG techniques.
The LZW method was used in this work because it is a general compression algorithm that works on almost any type of data. It effectively reduces the size of the secret message. It is a simple and lossless compression algorithm. In addition, it does not need a dictionary table during the decompression process, where the table can be reconstructed [12,22]. In the current study, the secret message is encoded and compressed using the LZW algorithm. This process increases the information-hiding capacity.

The Genetic Algorithm (GA)
The encoded and compressed secret message should be embedded in the cover image coefficients with the lowest possible distortion. To do so, a number of k-length bits of the encoded and compressed secret message are embedded in each nxn block coefficients. The Genetic Algorithm (GA) is then employed to effectivlly enhance the quality of the stego image by determining the optimal mapping as illustrated in the following sub-sections.

Chromosome Design
The first step to take when applying the GA is designing its chromosome. Here, each nxn block is encoded into chromosome, which is a vector of 64 parameters (genes) that contains permutations from 1 to 64 as can be seen in Fig. 4.

Fitness Evaluation
Choosing the fitness function is one of the most important steps in the GA [23]. This algorithm aims at finding the optimal mapping for each nxn block that improves the stego image quality.
Within this context, the Peak Signal to Noise Ratio (PSNR) is used as a fitness function owing to that it is a good measure of the stego image quality [24]. The evaluation begins with the initial population and is repeated with each new generation. The PSNR is defined by Eq. 1 [25]: 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 stego image.

Parent Selection
After evaluating the initial solutions in view of the fitness function, some of the solutions are selected based on the fitness values and designated as parents. The most fitting solutions are usually selected to produce offspring for the new population. Even the weakest solutions have a chance to be selected in the effort to avoid local minima [17]. In this approach, the roulette wheel method is used for the selection. This method gives equal chance to all of the individuals in the population to be selected. Therefore, diversity in the population is preserved.

Crossover
The crossover operators are the backbone of the GA that determine its performance. After selecting the two parents, each gene of the parent sequence between the crossover points is swapped to generate offspring. This method is not useful for the proposed GA approach because each gene in the chromosome can be used only once. To solve this problem, the permutation crossover method is employed, where two crossover points are randomly selected from the parent, then the genes existing between the points of crossover are inverted to get offspring.

Mutation
In the mutation process, genes are chosen randomly from the current population and modified. In the proposed GA approach, the gene can not be changed according to the usual traditional mutation.
Instead, mutation permutation, which swaps two genes in each chromosome, is used. After the selection, crossover, and mutation, new solutions are generated. These steps are then repeated until the pre-specified stopping criteria are met.

The Optimal Pixel Adjustment Process (OPAP)
The main objective of the OPAP is to minimize the embedding error between the cover image and the stego image. This leads to improvement of the quality the of stego image [26].
Let Pi be the pixel value of the i th pixel in the cover image. The Ṕi is the pixel value of the i th pixel in the stego image that is obtained from direct replacement of the k-LSB of Pi with k-length of secret message bits. The P''i is the pixel value of i th pixel in the refined stego image that is obtained after implementation of the OPAP. And δi, which is equal to Ṕi -Pi, is the embedding error between Pi and Ṕi according to the simple Least-Significant Bit (LSB) embedding. Therefore, the embedding error has the bounds of -2 k and 2 k : The OPAP algorithm can be described as follows [26]:

Embedding Algorithm
In the proposed method, the embedding process can be described as follows:

The Extraction Algorithm
The following steps describe the extraction process.

Output: Cover image, Secret message
Steps: 1. Read the stego image.
2. Divide the stego image into non-overlapping blocks of nxn pixels. 5. Apply LZW decompression to obtain the secret message. Fig. 6 represents the flowchart of the extraction algorithm.

Experimental Results and Discussion
The proposed algorithm has been tested by using four standard gray-scale images as cover images.
These images are 'Lena', 'Jet', "Baboon', and 'Boat', all having the size of 512×512 pixels as illustrated in Fig. 7. In this study, three types of secret messages were used (Fig. 8) to highlight the novelty of the proposed method with the three different data types. The first type is a standard gray-scale image with a resolution of 512×256 pixels while the second type is a text message and the third type is a random message with a similar size to that of the gray-scale image. The sizes of the cover image and the secret message were 2,097,152 and 1,048,576 bits, respectively. Therefore, the hiding capacity was set at 50% in order to hide the maximum size of the secret data so as spotlight the novelty of the proposed method while maintaining a high PSNR value. The parameters used to assess the performance of the stego images were the following.

A. PSNR
The PSNR measures the average cumulative squared errors, i.e., differences between the stego image and the cover image as defined in Eq. 1.

B. Hidden Capacity (HC)
The Hidden Capacity (HC) measures the maximum size of data that is embedded in a cover image [27].
It is defined as follows (Eq.
where Sb is the number of secret message bits that are hidden and Cb is the number of cover image bits.

C. Histogram analysis
Histogram analysis aims at determining the change in the stego image relative to the cover image. For finding the optimal mapping between the blocks of 4×4 and 8×8 pixel sizes, several experiments were conducted. The experimentation results are summarized by Table 1. The results disclose that in all experiments the block size of 8×8 pixels has higher enhancement effect according to PSNR and histogram analysis than the block size of 4×4 pixels. The reason behind this improvement is the size of the chromosome of the GA, which plays vital role in identifying the optimal solution and saving time during the process. Moreover, the results of using the GA with LZW lead to the conclusion that combining these two techniques together has positive effects on the values of the PSNR and HC, as well as on outcomes of the histogram analysis. Performance of the proposed algorithm was compared with levels of performance of existing algorithms as shown in Table 2. The Lena and Baboon cover images were used for comparison of performance among eight existing algorithms while the Jet and Boat cover images were used for comparison of performance among four related methods based on the results reported in [4,8,9,11,15,16,18,28,29] and each of the PSNR and HC as the performance evaluation criteria (Table 2). The comparison (Table 2) uncovers that the proposed algorithm has an comparable performance with the algorithms presented in [4,8,9,16,18,[28][29][30][31] in terms of the PSNR and HC. The algorithms introduced in [11,15] have high PSNR values but their HC values are lower than the HC values produced by the proposed hybrid image steganography algorithm. Therefore, the increase in the PSNR value is expected. However, the best model is the one that simultaneously has the highest PSNR and HC values.
The proposed algorithm has similar HC value to that reported in [11]. Meanwhile, the PSNR values obtained in the current study with the 'Lena' and 'Boat' cover images were 52.59 and 51, respectively.
Similarly, the proposed algorithm was tested with the same HC of [15]. The PSNR value obtained with the 'Lena' cover image was 53.42. Accordingly, results of the experiments support that using the LZW and GA leads to tangible improvements in the PSNR and HC values.
Histogram analysis was used to show imperceptibility of the stego image. Figures 9-12 compare between the histograms of the cover images and the stego images. Outcomes of this analysis point out small differences between the histograms of both images. This means higher imperceptibility of the stego images than the cover images.
In conclusion, the results of this study support that integration of GA with LZW has high positive effects on the PSNR and HC values, as well as on outcomes of histogram analysis. In addition, security of the stego image is enhanced as the results presented in Table 2

Conclusions
In this paper, a hybrid image steganography algorithm has been proposed to improve the quality of the stego image and raise the capacity for secret data. The method is based on integration of HDWT, LZW, GA, and OPAP. The HDWT increases the security of the stego image because the secret data are distributed among all pixels. After that, the LZW compression is employed to reduce the size of the secret data. This improves the hiding capacity of the proposed algorithm. Then, the encoded secret data are embedded in each cover image block according to a mapping function that is obtained for each block by using the GA, which enhances the quality of the stego image and improves its security. The OPAP algorithm is applied to each block to reduce the error, that is, the difference between the stego image blocks and the cover image blocks. This enhances the quality of the stego image. The proposed hybrid image steganography algorithm was implemented and evaluated on four standard images, as cover images, and three types of secret messages. The evaluation results suggest that this algorithm improves the hiding of secret data and the visual quality and security of the stego image.