High-Security Image Steganography Technique using XNOR Operation and Fibonacci Algorithm

Since the number of internet users is increasing and sensitive information is exchanging continuously, data security has become a problem. Image steganography is one of the ways to exchange secret data securely using images. However, several issues need to be mitigated, especially in the imperceptibility (security) aspect, which is the process of embedding secret data in the images that can be vulnerable to attacks. This paper focuses on developing a secure method for hiding secret messages in an image, based on the standard Least Significant Bit (LSB). Before proceeding with the embedding stage, the secret message's size is reduced by compression using the Huffman algorithm, followed by two operations, which are the Boolean operation Exclusive-NOR (XNOR) operation and the Fibonacci algorithm when selecting pixels to embed the secret message. As a result of these processes, a stego-image is created with two secret keys. We obtained promising results against standard images with higher Peak Signal-to-Noise Ratio (PSNR) values of 66.6170, 65.8928, and 65.9386 dB for Lena.bmp, Baboon.bmp, and Pepper.bmp, respectively, as compared to other state-of-the-art schemes. The evaluation stage proves the increasing level of security as well as imperceptibility. Keywords—Image steganography; Huffman algorithm; XNOR operation; Fibonacci algorithm; LSB; PSNR


I. INTRODUCTION
Steganography is the technique used to hide secret data in a cover-media. It consists of two parts, "stego" which means "cover" in Greek and "grafia" which means "writing" and both can be defined as "covered writing" [1]. Various types of multimedia files can be used to conceal secret data such as text [2], image [3], video [4]- [5], audio [6] [39] protocols, and Deoxyribonucleic acid (DNA), with the most commonly used, are images as a cover-media [7]- [9] The cover-media can also be referred to as stego-media. There are two types of embedding methods in a steganography system, which are spatial domain and frequency domain. In the spatial domain, pixels intensity is used to insert or embed the secret message directly into the Least Significant Bit (LSB) of a pixel. The LSB substitution is the most common technique of embedding in the spatial domain, whereas, in the frequency domain, the image is converted into various frequency classes, and the embedding process has been performed by using the coefficient factors [10]- [12].
Several issues and challenges are associated with steganography, which includes (1) lack of security of the secret message hidden in the image, (2) lack of payload capacity, which reflects the amount of data that can be embedded into the image, and (3) maintain high imperceptibility or quality of the stego-image as similar as the cover image (original image), which is the desired property that supports security [13]- [15]. Several literature attempts to find a balance between the quantity of data embedded and the protection of the secret message while maintaining the quality of the image [16], [17]. Some algorithms have succeeded in increasing the data hiding while keeping the image's quality, but the majority have not [18], [19]. These existing methods have made more efforts in hiding information to get high security so that the concealing method makes the hidden secret message not to be seen by a hacker (or not seen by human eyes). However, more research in steganography techniques need to do to achieve high security and high capacity [20]. This paper proposes a new technique for enhancing the security and capacity of the standard LSB method. A balance between high security and high capacity is important to maintain the cover-image quality similar to stego-image after embedding stage. We exploit the Most Significant Bit (MSB) and LSB in the cover-images to add a security level of the standard LSB steganography methods. Also, capacity can be increased by applying compression to the secret message.
The rest of the paper is organized as follows: Section II defined related works on secret data hiding techniques. Then, Section III illustrates the proposed method in details, followed by Section IV, which presents the experimental results. Section V states the conclusion of the work, and lastly, Section VI shows recommendations for future research work.

II. RELATED WORK
This section discusses the existing solutions to counter the issues in image steganography. Various versions of bit inversion techniques are proposed to enhance the LSB embedding process. In [3], the authors proposed an improved LSB technique where the LSB's of some pixels of the coverimage is inverted when inputs of specific bit patterns are found. Their result shows that a high quality of invisibility and imperceptibility in the stego-image. Another bit inversion technique is suggested in [21], which uses a bit inversion based on specific patterns to improve the quality of the stego-image. The idea is to conceal the secret message after a lossless compression of smoother areas of the image, resulting in fewer pixels being modified in the stego-image. modulation, which diminishes the changes that occur in the stego-image generated from the cover-image. In this method, the LSB of the image's intensity values is modified according to the secret data. The secret data is converted into a binary string based on each character's ASCII value that is represented in the 8-bit notation. Then, all bits are embedded in a matrix containing the adjacent pixel values. Their result shows a lower average embedding capacity, but the PSNR values of the stegoimages produced are high. In order to improve the security of the hidden secret message, the XOR transposition encryption based on the LSB approach is proposed in [23]. The embedded secret message is encrypted by transposing the message based on the order of the key. The result of this process is converted into binary and embedded into the cover-image using the XOR operation.
An LSB method is developed by [24] for embedded secret message into a 24-bit colour image, where the last two bit of LSB of each channel (red, green and blue) of the cover-image, are substituted by two bits of the secret message. This means that the last two bits of LSB of the red channel are substituted by the first two bits of the secret message; the last two bits of LSB of the green channel are substituted by the second two bits of the secret message, and the last two bits of LSB of the blue channel are substituted by the third two bits of the secret message. Therefore, a total of six bits of the secret image can be concealed in a 24-bit colour image. Another approach in [25] proposed a new technique intending to keep secure communication intact. The proposed method merged the advantage of the two bits of LSB and the XOR operation. the 8th bit of the cover-image is XORed with the 1st bit of the secret data, and the 7 th bit is XORed with the 2nd bit of the secret data. The bits from the final result are inserted into the last two LSBs of the image pixel. The results proved that this approach achieved high capacity and high security. An efficient LSB steganography method is proposed in [26] for transferring secret data in the digital format using the number theory. This research focuses on the spatial domain using the Fibonacci sequence and Zeckendorf theorem, which increase the embedding rate from 8-bit to 12-bit, on a grayscale image. This method achieves a high embedding capacity.
An adaptive LSB replacement was suggested by [27] for several colour images. In this method, the RGB colour channels are converted into the YCbCr form [28], where the Cr channel is selected and divided into an 8*8 size block. Each block is then transformed into discrete cosine, and a coefficient is selected where the bit sequence of the secret message is embedded to this coefficient. The image quality is preserved and robust against stego-attacks. An image steganography method was developed by [29], which is based on the use of two secret keys to randomize the embedding process of secret messages. Randomization increases the security of the secret message. The proposed method used some colour such as Red, Green, and Blue to enhance the pixel's values and calculate the location of the pixels' random position to embed the secret message. This approach provides high data hiding capacity and a high-security level compared with the standard LSB substitution technique.
A method of using a modified LSB algorithm is proposed in [30], based on the three RGB channels to increase the security level of the hidden message. This method relied on encryption of secret text message using the encryption key and the XNOR operation before embedding it in a colour image using LSB. The idea of concealing the message depends on the extraction of chromatic channels of the three RGB channels for each pixel and specifying the channel in which the bit of the encryption message is hidden.
A highly secure chaos-based image steganography method is proposed in [31]. Encryption to the secret message is performed using Caesar cipher and Chaos theory. The ciphertext obtained after the encryption process is embedded in a cover image using a 3, 3, 2 LSB replacement algorithm, which gave better security and performance than the traditional LSB technique. Another approach that combines the cryptography and steganography methods was presented in [32]. The Vigenere Cipher and Huffman Coding techniques are used to encrypt and compress the secret message. This method improved the security level and ensured the message content could not be recovered without knowledge of the decrypting key and the Huffman Dictionary table.
An approach for data hiding in RGB images based on the grey level modification (GLM) and multi-level encryption (MLE) is proposed in [33]. The secret key and secret messages are encrypted using the MLE algorithm before mapping it to the grayscale cover-image. A transposition function is applied to the cover-image before data embedding. The use of a secret key, MLE, and GLM adds various security levels to the algorithm, making it very complicated for a malicious user to recover the original secret data.
Based on the literature, many solutions have been proposed to solve standard LSB's main problems, which are related to security, capacity, and imperceptibility. Security focuses on the embedding methods, which is considered secure if an attacker finds it challenging to extract secret data from the cover medium. On the other hand, high capacity means that there are larger spaces to store secret messages in the cover-image. Lastly, imperceptibility is related to the high quality of the stego-image generated by the algorithm that is close to the original cover-image. In this study, the focus is on increasing the security level of a stego-image (maintaining imperceptibility) while improving the embedding capacity by utilizing the standard LSB image technique.

III. PROPOSED METHODOLOGY
The proposed methodology is explained in Fig. 1  A. First Stage: Data Preparation 1) Huffman coding: Before proceeding with the embedding stage, the Huffman algorithm is applied to the secret message to compress the message and then transform it into streams of bits. Later, each stream is converted into a secret code using the Huffman table. The result after the compression process is the vector of secret codes. The advantages of Huffman encoding are 1) lossless compression that improves the embedding capacity and 2) security because the encoded bitstream does not really disclose any information and only can be decoded using the Huffman table [34]. However, if the Huffman coded bitstream changes with just one bit, the Huffman table could not decode it. Huffman coding also satisfies the desired condition of high embedding capacity [21]. Next, a numerical example is provided to explain how Huffman will work within the proposed system. This example used five different symbols as B, E, A, D, and C with their frequencies of 14, 8, 56, 10, 12, respectively, as shown in Table I As illustrated in the Huffman tree ( Fig. 2), the two-parent nodes have the frequencies of 18 and 26, from accumulating the frequency of their children (8,10) and (12,14), respectively. The high-frequency letter 'A' will be created at a high level to construct the final tree will connect both children in one parent with a frequency of 100.
For the output code in Step 7, each leaf has a path to reach the main node (100), so the paths' numbers and direction refer to these values. For example, the code for 'C' is 010, from following the path from 'C' to 100. For 'A', the code is 1, as it has only one path to the main node. After completing the Huffman tree to the text, we obtain (188 bits) while the text in ASCII code is represented by 800 bits (100 characters × 8 bits), as shown in Table II. Huffman: 56*1+14*3+12*3+10*3+8*3=188 bits ASCII: (56+14+12+10+8)*8=800 bits  Therefore, 76.5% of space can be saved using Huffman coding.
2) Image preparation: The cover-image is the original image that is selected to host the secret messages before embedding. RGB colour images or grayscale images are used as a cover-medium in this research. The images can be downloaded from http://sipi.usc.edu/database/database.php? volume=misc (USC-SIPI) [32] with different sizes as a data set. The size of the cover-images is 512*512 pixels to hide the secret messages. Lena.bmp, Baboon.bmp, Pepper.bmp, Airplane.bmp, Camera.bmp, Barbara.bmp, Tiffany.bmp, and Tree.bmp are used to cover-images.

B. Second Stage: Proposed Embedding Process
1) Pixel selections: The embedding method deals with the process of selecting and preparing pixels for embedding. Fig.  3 shows an example of pixel selections. The text message represents the secret message, and it will be encoded with the Huffman algorithm. The encoded message will be embedded into a cover-image. In this example, Lena.bmp is chosen as a cover-image. The embedding process starts at the top left of the row and column (the x and y) position of Lena.bmp. The pixel position of x and y is compared to determine whether to embed using the XNOR operation or using the Fibonacci sequence. If the x value is higher than the y value, the Fibonacci sequence is used to embed it; otherwise, the XNOR operation is applied. Whereas, in the case where the value of x is equal to y, the embedding is skipped. Therefore, half of the pixels use the XNOR operation while the other half use the Fibonacci algorithm. After all secret messages are embedded, the output will be a stego-image.
2) XNOR operation: In embedding with XNOR, the idea is to use the last bit of MSB of the red channel as a secret key, which is agreed by the sender and recipient. The red channel will specify which channel (either green or blue) that the bit of the secret text message will be hidden inside it. The red channel is chosen as the secret key, while the embedding process happens in either green and blue. The reason is that human eyes are most sensitive to red, followed by green and blue [40][41], and therefore we avoid embedding secret data in the red channel. The algorithm for pixel selections is shown in Fig. 4. There are two processes inside the embedding stage, which are channel selections and data insertion. Firstly, in the channel selections for embedding, the last bit of the red channel's LSB is specified, either '0' (to select BLUE channel) or '1' (to select GREEN channel). Secondly, in the data insertion, it performs the XNOR operation of the last MSB red channel with one bit of the secret text. Finally, the result (0 or 1) will be carried to the selected channel and replace it with LSB's first bit in the cover-image (as shown in Table III). Fig. 5 and Fig. 6 provides an example of embedding using the XNOR operation.    Fig. 5 explains an example of embedding one bit of secret data using the XNOR operation inside the Green channel. The text message in Fig. 5 represents the secret message, which is encoded with the Huffman algorithm. Consider an image pixel with Red, Green, and Blue colour channels, which has decimal values of 155, 70, and 120, respectively. These decimal values are converted to binary values. Consider also that the encoded message starts with 1001 and so on.
The MSB of the red channel, which is '1', will be XNORed with the secret message bit '1', and the results, in this case, is also '1'. Therefore, this result will be embedded in the green channel, according to Table III. As a result, the final decimal values has been changed to 155, 71, and 120, respectively.
On the other hand, Fig. 6 has '0' for the MSB red channel, XNORed with '0' of the secret bit, and the result is '1'. Therefore, it will be embedded in the blue channel. The decimal values have changed to 27, 70, and 121, respectively.
The embedding process using the XNOR operation is summarized in Fig. 7.  3) Fibonacci decomposition: Fibonacci numbers are a sequence of numbers that begin with zero or one, and then the next value is the summation of the two previous numbers [35]. In this research, we convert pixel values from binary into Fibonacci representation for the image. Binary consists of 8bit planes, and the pixel values will occupy these bit. However, the bit planes with Fibonacci decomposition consists of 12-bit planes, therefore manipulating the LSB of Fibonacci is more flexible and efficient [26], as shown in Fig. 8. In the 13 th century, Leonardo of Pisa introduced the classical Fibonacci number [36]. The general definition of the Fibonacci sequence can be explained by using equation (1). (1) Where F 0 = 0, F 1 = 1, and F 2 = 1, N Fibonacci number. The sequence of Fibonacci is as follows: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,… and so on; such that any numeric value can be represented as binary representation [35]- [37]. Table IV distinguishes  It is important to note that the binary representation does not introduce redundancy. On the other hand, the Fibonacci representation is redundant, which means that different sequences may represent a single number. For instance, using the Fibonacci representation, a number 70 can have different representations such as the following: Thus, it could be represented as follows (shown in Table V): In order to obtain the unique representation of the given number, the Zeckendorf theorem can be applied, which states that "each positive integer m can be represented as the sum of distinct numbers in the sequence of Fibonacci numbers, using no two consecutive Fibonacci numbers" [38]. Consequently, any positive number can be represented using equation ( 2) [25].

∑
(2) As can be seen in Table V, there are four representations for number 70. However, only one representation should be selected. Thus, to choose only one of them, the one with the lexicographically lowest value of 1 will always be selected. In the case of number 70, the one which has a minimum number of '1' will be selected as the Fibonacci representation, which is the first rows of Table V (which has three '1'). Thus, a sequence produced using Fibonacci numbers would be valid if there are no two repeating '1' in a sequence. Therefore, the probabilities for the first two bits LSBs of a cover-image pixel in Fibonacci representation are '00', '01', or '10' with no repeating of '1'. For embedding purposes, one bit from the secret message (either 0 or 1) can be hidden in the first bit of Fibonacci LSB in the cover-image. Depending on these probabilities, our mapping is proposed, as illustrated in Table VI. In the proposed method, the idea of embedding using Fibonacci is by using the green channel of each pixel for the cover-image as a secret key. The secret bit will be inserted to the first bit of the LSB of the green channel, according to Table VI. For example, if the first two bits from the coverimage is '00', and the secret bit is '0', then the stego-image bit is not changed, which is '00'. Otherwise, the stego-image is changed to '01'. Only the green channel is selected to make it harder for the attacker to guess the embedding channel.
Another example is shown in Fig. 9, with the cover-image in the Fibonacci code is represented as 000100100010 in the Green channel. The secret bit can be either '0' or '1'. According to the mapping in Table VI, if the secret bit is '1', and the first two bits is '10', the result after embedding will become '01', which means that the Fibonacci code now becomes 000100100011.
However, this Fibonacci code is not valid according to the Zeckendorf theorem because it has two consecutive '1'. Therefore, a condition is given where the second bit is changed to 0, to avoid the consecutive ones. The final result will be 000100100001. Meanwhile, if the secret bit is '0', and the first two bits is '10', the green bits on the cover-image is not changed. If there is no change to the cover-image, it means less distortion on the stego-image after the embedding process, which results in a high level of security for the hidden message.    Similar to the previous example, we  choose 155, 70, and 120 as the values for Red, Green, and Blue channels. The Fibonacci value for 70 is given as a sequence, as well as its binary representation, which is 000100100010. The first two bits of the Fibonacci representation is '10' (Bold and underlined), and the secret message is '1'. Therefore, the embedding results, according to Table VI, is 000100100011, but this representation is not valid according to the Zekendorf theorem. So, we change the second bit to '0': 000100100001, which is also representing 69 in decimal value.
The algorithm for the embedding process is summarized in Fig. 11. Fig. 11. Embedding Process using Fibonacci.

C. Third Stage: Performance Evaluation
Any steganography system aims to build a secure communication system that cannot be detected by a third party. The attacker can use statistical methods to identify the stegoimage such as histogram analysis and chi-square attack, even if the cover-image is unknown [26], [32]. As mentioned before,
Apply Huffman encoding on the message H(Mx) 2.
Get the Binary values of each Green pixel P gi = {b 1 , b 2 , …, b 8 }
Get the first two bits LSB of green pixel Fibonacci (b f1, b f2 ) 7.
Get the first bit of the encoded message (b m1 ) Get the decimal value of the new green pixel Fibonacci array Fib(P gi ) = {NEWb f1 , NEWb f2 ,…, b f11 , b f12 }  D 9.
Initiate the stego-image with the new values of RGB pixels www.ijacsa.thesai.org after the embedding stage, the image produced is called stegoimage. The PSNR values are used to evaluate the quality of this stego-image, and the desired value for PSNR is as similar as possible with the cover-image. When the value of PSNR is high, that indicates the proposed method does not damage or distort the cover-image. The PSNR value is calculated like the following equation (3).
Equation (4) is used to calculate the mean squared error. MSE is calculated by obtaining the average square error. Then its result will be used to calculate PSNR to evaluate the resolution and quality of the stego-image.
Here, m and n are the images sizes while x and y are the cover and stego-images, respectively.

D. Fourth Stage: Extracting Stage
The information hiding process always follows specific procedures, which are an embedding method, and the main steps in this method with information of the embedding process should also be known to the receiver. The receiver uses the secret keys, which contain the embedding information. In order to extract from the secret message embedded in a stego-image, the same procedure for embedding is used but in a reverse manner. The pixel selection process summarized in Fig. 12.

Selected Points for extracting
Steps: 1 Image size = 512*512 2 For x,y in a range of (image_size) 3 Select the points of x as a key 4 If (x > y) then Apply Fibonacci Extracting 5 If (x < y) then Apply XNOR Extracting www.ijacsa.thesai.org

A. Dataset
A dataset is defined as a group of images that is used to benchmark the observation of this research with the existing literature. The study follows the same strategy to evaluate and benchmark the experimental results obtained using the proposed method. RGB colour images with size 512*512 have been used as benchmarks in the evaluation stage. The following images are selected as cover-images, as shown in Fig. 15.

B. PSNR Comparison and Analysis
The PSNR is an expression for the ratio between the maximum possible value of a signal and the distorting noise that affects its representation quality. If the PSNR values are greater than 50 dB when tested on several images, the images are high in quality [37]. This type of evaluation is used to measure the quality of the image after embedding. PSNR is most commonly used to measure the quality of reconstruction of lossy presentation codecs (e.g., for image hiding). In this case, the signal is the original data, and the noise is the error introduced by the embedding process. When comparing image representation codecs, PSNR approximates the human perception of reconstruction quality. Although a higher PSNR generally indicates that the reconstruction is of higher quality, in some cases, it may not [38]. PSNR is most easily defined via the mean squared error (MSE), as mentioned before, which is based on the dimensions of the image.
The MSE is calculated by obtaining the average square error. Then its result will be used to calculate PSNR to evaluate the resolution and quality of the stego-image, as shown in Table VII. Table VIII shows the comparison stages of the results with four other methods in [30], [32], [26], and [33], with 8Kb, 10Kb, 13Kb, and 16Kb of secret messages, and 512*512 size of cover images. We note that the bigger the secret messages' size, the lower the PSNR value as more significant data will cause more distortion to the stego-image. From the results, high values of PSNR are obtained compared with previous findings. This indicates that the proposed method is very efficient in hiding data, which means that this technique can keep changes to the stego-image to a minimum. Therefore, we can conclude that this technique has a good quality of imperceptibility.

C. Histogram Analysis
One way to discover a good steganography method is to analyze the histogram of all stego-images and then compare them with the original. It represents the number of pixels that have colours in the image's colour space. The histogram for the original cover-image and stego-image for Lena and baboon, with 16KB size of secret messages embedded, are shown in Fig 16 to Fig. 19    From the figures of Lena's and Baboon's stego-images, the histogram of the stego-images was similar to that of the cover images, resulting from alternately choosing either green or blue channels to embed the secret data, which does not give any significant difference between the two images. This means that the proposed technique can embed secret messages with minimum changes in the stego-image.

D. Embedding Capacity
The embedding capacity or ratio capacity depends on how much secret data bits can be hidden in the cover-image. It is calculated using equation (5).

V. CONCLUSION
The standard LSB method is the most popular steganography technique, as it is more efficient to use. However, this method's main weakness is that it is easy to recover the secret text message from the image, which is always hidden in the LSB of each pixel in an image. The developed XNOR operation with the Fibonacci sequence presents several characteristics that have enhanced the LSB standard technique's limitation. In terms of security level, there are three criteria integrated for higher security. Firstly, the Fibonacci algorithm uses only the green channel for embedding instead of the three channels red, green, and blue. The advantage of this is that the red and blue channels will act as noise data, which makes the extraction process harder for any intruder. Secondly, similar to the Fibonacci embedding operation, the XNOR operation also uses only one channel (the green or blue channels), while the other two channels act as noise data. Lastly, this method exploits the pixel selection to conceal the secret message, either use the Fibonacci algorithm or XNOR operation, to make the extraction process more secure. In this paper, we exploited the characteristics of both the XNOR operation and the Fibonacci algorithm to obtain high security and capacity to embed the secret message. Another important thing is that using the green or blue channel for each pixel on the cover-image gives an advantage as almost all of the pixels will be exploited to conceal secret data, and thus, capacity will be increased.

VI. FUTURE WORK
For future work, the three channels of RGB can be exploited to use as an indicator for embedding with the XNOR operation. The proposed method used the red channel as the key or supplier for embedding to green or blue channels (that means the red channel that will select which channel for embedding) as well as exploit one channel of RGB with the Fibonacci algorithm. In the proposed method, the green channel is used only for embedding, and that will let the proposed method be applied on three-channel RGB for embedding instead of using only the green channel. Another recommendation is to apply the proposed method with other cover-media types, such as text or audio.