A Novel Technique for Data Steganography

In this paper, a novel stego-method will be introduced, which can be used to hide any secret message in any holding color image. The proposed method will be implemented and tested and the calculated parameters will be compared with the LSB method parameters. It will be shown that the proposed method provides a high-security level by using two keys to extract the secret message from the holding image, making it very difficult to hack. Keywords-steganography; hiding time; extracting time; MSE; PSNR

INTRODUCTION Steganography is a process of hiding data in covering data, such as a hidden text message in a color image [1,2]. Steganography is an important process and many applications utilize it. Hiding a text message in color image can be performed as shown in Figure 1 by selecting a stego-system encoder to hide the message and a stego-system decoder to extract the message from the holding color image [3]. One of the most popular methods of secret message hiding is the least significant bit (LSB), and many methods are based on it [4][5][6]. LSB reserves 8 bytes from the covering image to hide a character from the secret message, the first bit of the binary version of the character is stored in the least significant bit of the first selected byte of the image, the second bit in the least significant bit of the second byte of the image and so on [4]. Table I shows how to hide the letter "A" (ASCII A is equal to 65 in decimal and 01000001 in binary) in a sequence of 8 bytes in a color image. LSB is easy to implement, the changes to the image are not essential and cannot be observed with the naked eye, and it is easy to discover the text message and therefore it is not considered safe. So, in order to take the advantages and to discard the disadvantages of LSB data hiding method we modified it to improve the security level of data hiding [7]. LSB method provides a small mean square error (MSE), and a high peak signal to noise ratio (PSNR) between the original and the holding images, these parameters are very important for analysis purposes [4] and they are calculated by: where f represents the matrix data of the original image, g represents the matrix data of the holding image in question, m represents the number of pixel rows of the images and i represents the index of the current row, n represents the number of pixel columns of the image, j represents the index of the current column, and ‫ܺܣܯ‬ is the maximum signal value that exists in our original "known to be good" image.
II. RELATED WORK LSB steganography is widely used to hide secret messages into color images due to its simplicity [15]. In [4], a method based on LSB was proposed, which creates a key of random positions to hide the message. This method is very secure but the MSE increases when the message length increases. In [10], a technique was introduced on hiding a secret image into a cover image, where both images should have the same size. The technique first compresses the secret message using the Set Partitioning in Hierarchical Trees (SPIHT) algorithm, then the output of this compression was hided into the covering image  [11], the authors hided a secret message file into a covering image, the image should be colored and transformed into 3 matrices (R, G, and B). The message converts to binary, depending on the secret message bit using OR operation or AND operation, sequentially (RGB, BGR, RGB, BGR...). The results showed better performance in terms of quality of the obtained stego-image. Authors in [9] used LSB and DCT to perform steganography. The comparison gave a good result according to the PSNR values when compared with previous works and the security was increased by using DCT. In [8], the message was embedded by hiding each byte of the message in three pixels based on randomization in the cover image using Pseudo Random Number Generator (PRNG) of each pixel's value. This method achieved a very high maximum hiding capacity and higher visual quality as indicated by PSNR. In [16], the authors tried to overcome the disadvantage of the LSB method by appending the encrypted data in an image in place of plain textual data. To encrypt the data RSA and Diffie Hellman algorithms were used. To check the efficacy of their proposed method, they calculated the number of instructions executed at sender and receiver site since the number of instructions executed is a measure of the time complexity of the process. The result showed that the use of encryption in stego-analysis does not affect the time complexity if Diffie Hellman algorithm is used instead of the RSA algorithm. In [15], a method that hided a secret text message was proposed based on searching for identical bits between the secret message and image pixels values. The proposed method was compared with the LSB benchmarking method for hiding a secret message which hides the secret message directly in the least two significant bits of the image pixels. The proposed method was more efficient, simple, appropriate and accurate than the LSB method, the change in the image resolution was quite low and it made the secret message more secure. In [17], the authors used the Pixel-Value Differencing (PVD) method as an image steganography mechanism. They eliminated the overflow problem of pixel values in the stego image exceeding the range 0 ... 255. Moreover, for providing more security, they used different number of bits in different pixel components. It was very difficult to trace how many bits are embedded in a pixel of the stego image. The obtained results provided better visual quality of the stego-image compared to the PVD method.
III. THE PROPOSED METHOD The proposed method for data hiding can be implemented by applying the following steps: • Select the original color image, and find the image size (n1:number of rows, n2: number of columns, and n3: number of colors).
• Select the message to be hidden in the image and find the message length (n4).
• Define an 8 digit number to be used as private key (key1).
• Divide key1 into 2 equal parts (part1 and part2, each of them is a 4 digit number.
• Reshape the original image from 2D matrix to 2D matrix with size n1*n3, n2.
• Calculate the row and column indexes (where to start the hiding message) using a defined hash function, in our case we used the following functions: Row index = floor (rand (1)*(n1*n3-n4)); Column index = floor (rand (1)*(n2-n4)); • Apply LSB method to hide a message using the indexes.
• Reshape the holding image back to a 3D matrix.
• Generate the second key (key2) by using another hash function. We used the XOR function with the indexes and the two parts.
• Save n4, key1 and key2 to be used to extract the message from the image.
To extract the data, the proposed method requires the following steps to be implemented: • Select the holding image.
• Reshape the image matrix from 3D to 2D matrix.
• XOR the first part of key1 with the first part of key2 to get the row index.
• XOR the second part of key1 with the second part of key2 to get the column index.
• Use the indexes to retrieve n4 characters from the image. Figure 2 shows the block diagram of the proposed stegosystem, while Figure 3 shows a simple example of how to perform some calculations using the proposed method. Using this method will increase security level, because we have to know key1 and key2 and the way of their calculations. This method also decrease MSE, which will be very small whatever the message length was. Figures 4 and 5 show the original image and the holding image after hiding 100 characters, and here we can notice that there are no visible differences between the two images.

A. Experiment 1: Hiding a Fixed Length Message
The following message with length of 100 characters was hidden in different types and size images. Steganography is the process of hiding of a secret message within an ordinary message and extracting at its destination [20]. From the results shown in Table II we can conclude the following which can be considered as the advantages of the proposed stego-method: • Hiding and extracting times are significantly small.
• Hiding time slowly increases due to the increase in image size. In the experiment it fell in the range 0.093000-2.506000.
• Extracting time slowly increases due to the increase in image size and in the experiment it fell in the range 0.442000-0.469000.
• The proposed method provides a significantly small MSE.
• The proposed method provides a significantly high PSNR.

B. Experiment 2: Hiding Various Messages in a Colored Image
A tiff color image with size 516×600×3 was taken, and several messages with different lengths were hidden in the image and extracted from the holding image using the proposed method. The results of this experiment are shown in Table III.