A New Steganography Method for Hiding Text into RGB Image

—Now-a-days, the network has significant roles in transferring data and knowledge quickly and accurately from sender to receiver. However, the data is still not secure enough to transfer quite confidentially. Data protection is considered as one of the principal challenges in information sharing over communication. So, steganography techniques were proposed which are the art of hiding information that prevents secret text message detection from intruders. Nevertheless, most steganography methods use low bits number of secret messages. Moreover, these methods applied a single logic gate for encrypting the secret message. Therefore, this paper proposes a new method for the encryption of secret messages based on the Huffman technique to reduce the secret message dimensions. In addition, the proposed method uses two different logic gates namely XOR and XNOR for increasing the message security. The RGB Lena image is used as the cover image of the secret message. There are six different experiments conducted with respect to various lengths of the secret messages in bits. The experimental results show that when using the highest number of bits (i.e., 66288), the proposed method achieved 0.0233 MSE, 64.4589 PSNR, 0.9999998 SSIM, and 8.2383 encryption time. The proposed method has the ability to encrypt the secret message with a high number of bits.


INTRODUCTION
Nowadays, communication is quite necessary for transmitting information quickly and accurately from the sender to the receiver [1].Meanwhile, the internet in this modern era provides high convenience in transferring big amounts of data in several parts of the world.Everyone needs safety and secrecy in communicating data [2].In our daily life, there are many secure pathways that we use such as internet or telephone for sharing and transmitting the information.But unfortunately, these pathways still not safe at a particular level [3].Consequently, there are two common techniques which are widely used in hiding information and then sharing it safety.These techniques are cryptography and steganography [4,5].
In the cryptography technique, the message or the text is adjusted in an encrypted form and the encryption key is known only to both sender and receiver.However, the transmission of an encrypted message in such a type of technique may lead to easily excite the attacker's suspicion, and hence this encrypted message will be intercepted, attacked and then decrypted [6].Therefore, steganography techniques have been proposed and developed in order to overcome the insufficiencies of the cryptographic technique [7].
Steganography is the science of communicating in such a method that it covers and hides the presence of the communication [8].Thus, there is no one that can detect the existence of a message because the steganography technique hides its presence.On other words, the steganography technique is hiding the message inside multimedia content such as video, audio and image files, where the message will be embedded with one of these multimedia contents [9].Steganography technique is consisting of two main terms which are the data or the message and cover image [10].The message is the secret information that needs to be hidden.While the cover image is referred to the carrier that hides or covers the message.Fig. 1 shows the steganography diagram.Steganography's word has been taken from Greek words, where "stegos" indicates to "cover" and "grafia" indicates to "writing" and these two words are defining together as "covered writing" [11].There are many different techniques of steganography such as spatial domain methods, spread spectrum technique, statistical technique, transform domain technique, and distortion technique [12].Also, there are different measurements which determine the performance efficiency of steganography techniques such as Peak Signal to Noise Ratio (PSNR), Mean Square Error (MSE), Structural Similarity Index Measure (SSIM) and Signal to Noise Ratio (SNR) [13,14].Steganography technique is quite valuable and it can be applied in many domains such as communication and secret data storing, e-commerce, database systems, data alteration protection, and media [15].As we mentioned previously that the steganography technique has different www.ijacsa.thesai.orgcategories for hiding information which are embedding the information in text, images, audios, videos, or protocol.The images are considered the most common cover objects which have used for steganography technique [16].Due to the digital images are broadly proliferated on the Internet and also due to provide a large number of excessive bits in the digital image.The picture steganography is considered as a method for secret and ambiguity correspondence that intends to transfer many of mystery information.Generally, to the cover picture extent among conveying parties.Besides, it aims to avoid the suspicion for non-conveying gatherings in such type of correspondence [17].The image in the computer is a set of numbers that form various light intensities in different image areas.This numeric representation is constituted individual points and a grid which are referred to as pixels [18].On the Internet, most images are consisting of a rectangular map for the image's pixels which are represented as bits.These pixels are presented horizontally and displayed row by row.The bits number in a color image named the bit depth that belongs to the bits number utilized for every pixel.In present color images, the smallest bit depth is 8 (i.e., there are 8 bits used for representing each pixel color) [19].Grayscale and monochrome images use 8 bits for every pixel and these pixels are able to present 256 various colors or grey shades.
The digital color images are usually stored in files of 24-bit and use the pattern of RGB color that is known as true color as well.All colors for pixels with 24-bit picture are derived from three essential colors which are Red, Green and Blue (RGB).Each color is produced with 8 bits.Hence, in every pixel, there are 256 different amount of RGB colors as well as to more than 16-million combinations that lead to producing more than 16million colors in the image [20].With regards to images, hiding the message in the image is performed by taking the cover object as an image that is indicated as image steganography.The pixel intensities in image steganography are used in order to hide the message [21].In steganographic images, the Least Significant Bit (LSB) is considered a widely known technique due to its high advantages in encrypting texts in images [22][23][24].However, the conventional LSB technique still needs more enhancements in the steganographic technology [25,26].
Moreover, recent steganography techniques used in the image are yet suffering from the small amount of data that required to be hidden in the cover image.Also, these techniques are showing some negative effects and wasting some of the hidden data.Moreover, there is an urgent need to find a method that is able to hide data without distinguishing between the hidden data and the original covering data.Therefore, the aims of this paper are as follow:  In this work, we propose the Huffman technique in order to reduce the dimensionality of the secret message.
 Propose two different logic gates called XOR and XNOR for increasing the encryption security of the secret message.
 The proposed method is performed based on six different experiments with respect to various lengths of the secret messages in bits.
 The performance of the proposed method is evaluated in terms of MSE, PSNR, and execution time.
The remainder of this paper is organized as follows: Sections II shows the related works in the steganography technique for hiding information in images.Section III presents the proposed method in terms of the Huffman technique and two logic gates.Section IV discusses the experimental results.Finally, Section V presents the conclusion of this paper.

II. RELATED WORK
Recently, the steganography techniques for hiding text in images have beheld a huge significance by researchers and developers due to the importance such these techniques in terms of hiding data.Furthermore, recent steganography methods of hiding data such as XOR and XNOR logic gates worked on providing a high level of security, where the intended user can only access to the secret data.In other words, the unauthorized user has no ability to detect hidden data, where this is an extremely critical issue in order to protect the sensitivity and confidentiality of information and messages being sent.Here, we will review the up-to-date techniques used in the steganography field.Besides, Table I summarizes the related works used for the encryption of secret messages in images.A steganography technique is proposed in [27] to protect information transported from attackers.This method is worked on the encryption of secret information by using the XNOR gate and the encryption key.The information that required to be encrypted is hidden in a color image by applying Least Significant Bit (LSB) algorithm.Furthermore, this method relies on chromatic channels extraction of 3 RGB channels for every pixel and 2 bits of LSB bits and then determining the channel that will hide the encryption message bit.The second LSB bit is used as an indicator that determines the channel.Meantime, the first LSB bit is replaced with the encrypted message bit, where all the encrypted message bits will be hidden in the cover image.Four different types of images have used as a carrier file which are Airplane, Peppers, Lena, and Baboon.The dimension of all these images is 512x512.Also, different amounts of information were used as secret messages to analyze and evaluate the method, where the smallest amount was 4700 bits and the largest amount was 24250 bits.The performance of this method is evaluated in terms of two measurements which are namely Peak Signal to Noise Ratio (PSNR) and Mean Square Error (MSE).According to the best-achieved results of the largest amount of secret information are shown that the highest PSNR and lowest MSE are 53.65 and 0.0339 respectively which have obtained from Lina image.However, the amount of hidden information is still not encouraging and a bit small.www.ijacsa.thesai.org The authors in [28] have presented a method to hide text in a color images in order for keeping the information from intruders.This method has two main stages.In the first stage, the steganography technique is used to hide the information in the transmission, where it has used the XOR operation gate for hiding the text bit in the image bit and specifies the position of the image bits according to a random key (the random key has the same length of the secret text).While in the second stage, it has used Triple data encryption standard (3DES) algorithm.This algorithm is used to encrypt the resulting image and the key.Subsequently, the key and image are sent to the receiver.In this method, two types of images have used which are Lena image (256x256 pixels) and Tree image (250x360 pixels).The results of this method have shown that Lena image has 52.0235PSNR and 0.10024 MSE, while tree image has better performance with 55.0016 PSNR and 0.03602 MSE.However, this method has ignored the length of the confidential text in bit, where it has not taken into account.Furthermore, the steganography technique is applied in [29] to hide the text messages in 24-bit color images.In this method, two schemes have proposed which are embedding data scheme and extraction scheme.In embedding data, the text messages will be hidden in the cover image by using the LSB algorithm.In the extraction scheme, it has used XOR operation to Most Significant Bits (MSB) to recover the secret text from a stegoimage.The MSB bits identify the object shape in the image.These two schemes are requiring a key that is created randomly.The experiments have carried out on six different types of images which are Toy (3264 x 2448), Mosque (767x619), Cat (645x533), Flower (551x451), View (32644x2448), and Sunset (1632x1224).The statistical analysis of this method is show that the highest value of PSNR is 63.738 that has obtained by View image, and its MSE value was 0.0026.In this regard, the LSB algorithm is used also in [30] for hiding and protecting secret text message in Image.In this work, the LSB algorithm is combined with XOR encryption techniques in order to increase the security of the text message.Four images have used to embed text messages, these images are Barbara, F16, Lena, and Soccer.All these images have a size of 256x256 pixels and it has used three different sizes (i.e., 1 KB, 2 KB, and 4 KB) of the text messages which are needed to be hidden.The experimental results have shown that the highest achieved PSNR for 1 KB, 2 KB, and 4 KB is 63.5195 (Lena image), 60.3883 (Soccer image), and 57.3182 (Soccer image), respectively.Besides, the lowest MSE for 1 KB, 2 KB, and 4 KB is 0.0289 (Lena image), 0.0595 (Soccer image), and 0.1206 (Soccer image), respectively.Also, the extracted text messages have tested by Character Error Rate (CER) and the value was 0, which proves that text messages have extracted totally.However, the embedded text messages in the cover image are small and limited.A secure model that has embedded text messages for reliable communication was proposed in [31].Furthermore, this model has used the LSB algorithm for embedding text message bits.In this model, the LSB is based on the secret key and logistic map, this is a spatial domain technique to embed more information in color image without deteriorating the quality of the image.The logistic map method is used for embedding the message bits randomly in the image.The image type used in this work is the Lena image.According to the results, the maximum capacity text messages stored in the cover image is 29127 bytes (233016 bits) and PSNR has been achieved 55.91.A secure method for embedding secret text messages in color images is proposed in [32].This method is used Integer Wavelet Transform (IWT) technique that is based on the LSB algorithm.The secret text messages are hidden in the LSB algorithm, and the inverse IWT is used to form the stego-image.The secret information is hidden in the approximation coefficient in the components of blue and green colors.While the actual length of the secret data and the sender signature are embedded in the LSB algorithm in the component of the red color of the cover image.In this method, six different types of images have used which are Lena, Baboon, Pepper, Airplane, House, and Tiffany.The size of each image of all these color images is 512×512 pixels.The experimental results are shown that the hybrid IWT-LSB can be embedded secret data with a size of 24 576 bits, where the highest PSNR was 55.5622 that achieved by Baboon image, and the MSE was 0.1807.However, from the studies mentioned above, we can observe some limitations that can be summarized as follow:  Most models and methods which are used steganography techniques for embedding text messages are yet suffering from a low amount of embedding text messages.
 Majority of these methods are worked on one logic gate in the encryption of secret messages in which results in a low-security level.
 Finally, the execution time of experiments is mostly ignored.

A. Encryption Algorithm
In the proposed method, there are three main phases.Fig. 2 shows the steps of these three phases.The first phase includes four steps which are read the secret message, convert the secret message from text to decimal, implement the Huffman to compress the data (reduce the dimensionality), and convert the data from decimal to binary.While in the second phase, the secret message will be encrypted by using the following steps:  Enter the encryption key value in binary with 8 bits.
 Implement the XNOR logic gate on every other 4 bits (i.e., first 4, third 4, fifth 4 and so on) of the secret message with the first 4 bits of the encryption key.
 Implement the XOR logic gate on every other 4 bits (i.e., second 4, fourth 4, sixth 4 and so on) of the secret message with the second 4 bits of the encryption key.
Fig. 2. The three phases of the proposed method.www.ijacsa.thesai.orgFurthermore, the third phase includes the following steps: 1. Read the cover image.
2. Selection of one of three RGB channels based on second bit of LSB bits of three channels in decimal and return in B s .
a.If (B s mod 3) = 0 Then Red channel is selected.
b.If (Bs mod 3) = 1 Then Green channel is selected.
c.If (Bs mod 3) = 2 Then Blue channel is selected.
3. Apply the LSB algorithm to the selected channel and coding by storing the encrypted bit instead of the first bit of LSB bits.
An example is provided below to encrypt the word "help" as a secret message into the cover image.The steps of this example as follow: 1. Secret message = help.

B. Decryption Algorithm
This section will present the processes for extracting the secret message from stego image.These processes are summarized below.In addition, Table III shows the determination of RGB channel based on second bit of LSB.
1. Get stego image.2. Selection of one of three RGB channels based on second bit of LSB bits of three channels in decimal and return in Bs. a.If (B s mod 3) = 0 Then Red channel is selected.b.If (Bs mod 3) = 1 Then Green channel is selected.c.If (Bs mod 3) = 2 Then Blue channel is selected.

IV. EXPERIMENTAL RESULTS AND DISCUSSION
In this study, the Lena color image (RGB) with (512 × 512 × 3) dimensionality was used in order to conduct six different experiments.The six different experiments were implemented based on various lengths of the secret message in bits (i.e., 3640, 6872, 26224, 33128, 40032, and 66288 bits).In this proposed method, we have used Huffman method in order to reduce the dimensionality of the data (i.e., secret message).Furthermore, there are two logic gates which are XNOR and XOR have been used for the purpose of encrypting the Huffman of the secret message with the encryption key.It is worth mention that all experiments have been implemented in MATLAB R2019a programming language over a PC Core i7 of 3.20 GHz with 16 GB RAM and SSD 1 TB (Windows 10).
The proposed method has been evaluated in terms of the most common performance measurements used in the steganography techniques which are Mean Square Error (MSE), Structural Similarity Index Measure (SSIM), and Peak Signal-to-Noise Ratio (PSNR).Besides, the proposed method has been evaluated in terms of the execution time.The MSE, PSNR and the execution time can be calculated as the following equations: where, refers to the pixel value of the cover image, refers to the pixel value of the stego image, and and refer to the height and width of the images, respectively.In the six different experiments, the minimum and maximum numbers of the secret message bits are 3640 and 66288, respectively.Based on the experiments results, when the minimum number of the secret message bits is used, the proposed method is achieved 0.0013 MSE, 77.1531 PSNR, and it has taken 0.9543 sec for the execution time.Meanwhile, the proposed method has been obtained 0.0140 MSE, 64.4589 PSNR, and 8.2383 sec by using the maximum number of the secret message bits.Furthermore, Table IV illustrates the full results of the six different experiments in terms of MSE, PSNR, SSIM, and encryption time in seconds.Fig. 3 shows the histograms of the three colors (red, green, and blue) separately for the original image (cover image) and the stgo images with different lengths of secret messages in bits.Moreover, Fig. 4 demonstrates all the color histograms (red, green, and blue) for the original image (cover image) and the stgo images with different lengths of secret messages in bits.Based on Fig. 3 and Fig. 4, the proposed method has not been influenced the three channels of the original image colors (red, green, and blue).In other words, the proposed method has the ability to encrypt high numbers of secret message bits without affecting the quality of the image.
Moreover, the proposed method has been compared with other methods using Lena image [30,[33][34][35][36][37] as shown in V.The experimental results showed that the proposed method has been outperformed the other methods in terms of number of bits, MSE, SSIM and PSNR.Although the proposed method has been shown the high ability to encrypt a high number of bits in RGB image, there are some limitations in the proposed method which can be summarized as follow:  All experiments of the proposed method have been conducted using one image only.In other words, the proposed method is evaluated using the Lena image only.
 The proposed method has been evaluated based on the standard image size (512 × 512 × 3).Whilst other evaluations based on varying the image sizes may lead to obtaining different results.

V. CONCLUSION
In this paper, we have presented a new method in the encryption of secret messages in the RGB image.The proposed method is used the Huffman technique in order to reduce the secret message dimensionality.In addition, there are two logic gates (i.e., XNOR and XOR) have been used in order to encrypt the Huffman of the secret message with the encryption key.The proposed method has been implemented based on six different experiments with respect to various lengths of the secret messages in bits (i.e., 3640, 6872, 26224, 33128, 40032, and 66288 bits).All experiments have been performed using the RGB Lena image with the size of (512 × 512 × 3).The experimental results are showed that the proposed method has been achieved 0.0013 MSE, 0.9999998 SSIM, 77.1531 PSNR, and it has taken 0.9543 sec when the number of the secret message was 3640 bits.Meanwhile, the proposed method achieved 0.0233 MSE, 0.9999934 SSIM, 64.4589 PSNR, and 8.2383 sec when the number of the secret message was 66288 bits.Based on the results, the proposed method is able to encrypt the secret message with a high number of bits efficiently.Future work can include using different RGB images such as Airplane, Peppers, and Baboon with varying sizes and other measurements such as Bits Per Pixel (BPP).

Fig. 3 .Fig. 4 .
Fig. 3.The separated histograms of three colors for the original image and stego images with different lengths of secret messages bits.

TABLE II .
THE SELECTION AND ENCRYPTION PROCESSES OF FOUR PIXELS IN THE STEGO IMAGE 6. Convert each 8 bits of the Huffman's secret message to decimal = 135 0. 7. Apply the Huffman to normal which decodes the Huffman's secret message in decimal to get the normal secret message in decimal = 104 101 108 112.8. Convert the secret message from decimal to character to get the secret message = help.

TABLE III .
THE DETERMINATION OF RGB CHANNEL BASED ON SECOND BIT OF LSB

TABLE IV .
THE RESULTS OF THE SIX DIFFERENT EXPERIMENTS

TABLE V .
COMPARISON RESULTS BETWEEN METHODS USING LENA IMAGE