Study of Image steganography using LSB, DFT and DWT

In this paper we have studied and implement the color image steganography using LSB, DFT and DWT. First we have studied the various literatures of LSB, DFT and DWT and then implemented one system in which we can do steganography using these techniques, after implementation we have evaluated the results using these techniques applying various image formats against different message size. For each of the cases we have calculated the MSE and PSNR and presented here in a tabulated form. Our main intention is to show how MSE and PSNR changes with respect to different image formats and different message sizes using these techniques. Besides the analysis of MSE and PSNR we have also analyzed the message insertion and message extraction time for all the cases.


INTRODUCTION
Steganography is a very old technique of information hiding. Steganography refers to the science of invisible communication. Unlike cryptography, where the goal is to secure communications from an eavesdropper, steganographic techniques strive to hide the very presence of the message itself from an observer [2]. The term Steganography is forked from the Greek words -steganos‖ meaning -cover‖ and -graphia‖ meaning -writing‖ defining it as -covered writing‖ [1]. Before performing steganography we need three primary accessories which are Secret message, Cover medium and one or more embedding algorithm(s) besides these we can also use secret key for better security purpose.
A special case of information hiding is digital watermarking [2]. In digital watermarking the informations which are embedded into digital multimedia content (the watermark) can later be extracted or detected for a variety of purposes including copy prevention and control. Steganography and watermarking differ in a number of ways, including purpose, specifications, and detection/extraction methods [3]. The most fundamental difference is that the object of communication in watermarking is the host signal, with the embedded data providing copyright protection. In steganography the object to be transmitted is the embedded message, and the cover signal serves as an innocuous disguise chosen fairly arbitrarily by the user based on its technical suitability. In addition, the existence of a watermark is often declared openly, and any attempt to remove or invalidate the embedded content renders the host useless.

Fig. 1. Relationship of steganography to related fields [2].
In the process of steganography the cover medium can be a text file, an image, an audio file or it can be a video file but among these most popular is the image steganography, so here are the some advantages of using images as cover medium in performing steganography.


It is the most widely used medium being used today  Takes advantage of our limited visual perception of colors  This field is expected to continually grow as computer graphics power also grows

CLASSIFICATION OF STEGANOGRAPHY
Primarily steganography can be classified into two categories

Spatial domain steganography:
In spatial domain steganography we directly deal with the pixel value of the image which means that we directly embed our secret information into some specific value of the pixel. One of the most common and popular spatial domain steganography is the LSB (least significant bit) modification method, it is the most common and also it is a high capacity steganographic method but it is not so much robust against certain attacks like low pass filtering and image compression.
QIM: In terms of insertion schemes, several methods (such as substitution, addition, and adjustment) can be used. One adjustment approach is Quantization Index Modulation (QIM), which uses different quantizers to carry different bits of the secret data.
Masking approaches. These techniques are similar to visible watermarking in which pixel values in masked areas are increased or decreased by some percentage. Reducing the increment to a certain degree makes the mark invisible. In the Patchwork methods, pairs of patches are selected pseudo-randomly; pixel values in each pair are raised by a small constant value in one patch and lowered by the same amount in the other.

Frequency domain steganography:
It is also known as transform domain steganography because before doing steganography we have to convert the original image from its spatial domain to frequency domain using certain methods like Discrete cosine transformation (DCT), Discrete fourier transformation (DFT), Discrete wavelet transformation (DFT) etc. After that we embed our secret information into the coefficients of its transform domain. In this case detection of steganography is very difficult because we embed our secret information into the frequency domain not in the visual domain.
Steganography in compressed domain-In this type of techniques steganographic scheme is combined with an imagecompression algorithm (such as JPEG). For example, the steganographic tool Jpeg-Jsteg takes a lossless cover-image and the message to be hidden to generate a JPEG stego-image. In the coding process, DCT coefficients are rounded up or down according to individual bits to be embedded. Such techniques are attractive because JPEG images are popular on the Internet. Other transforms (such as DFT and wavelet transform) can also be used. O c t 2 5 , 2 0 1 3 Spread-spectrum technique-The hidden data is spread throughout the cover-image based on spreadspectrum techniques (such as frequency hopping). A stego-key is used for encryption to randomly select the frequency channels [3].

RECENT TECHNIQUES OF STEGANOGRAPHY
In the digital era of communication there are various steganographic techniques have been proposed. In this section we have discussed some of the steganographic techniques which were implemented in last couple of years. Gutum at el. [4] proposed an image steganography based on pixel indicator of the cover image. The technique uses least two significant bits of one of the channels Red, Green or Blue as an indicator of data existence in the other two channels. The indicator bits are set randomly (based on the image nature) in the channel. To improve security, the indicator channel is not fixed. The indicators are chosen based on a sequence. In the first pixel Red is the indicator, while Green is Channel 1 and Blue is the channel 2. In the second pixel, Green is the indicator, while Red is channel 1 and Blue is channel 2. In third pixel Blue is the indicator, while Red is channel 1 and Green is channel 2.
The following table describes the meaning of indicator. The primary drawback of this method is the robustness as the robustness of this algorithm is not investigated thoroughly.
Ataby, and Fawzi [5] uses DWT to transform cover image from spatial domain to frequency domain. In this technique before applying DWT image statistics-aware test have employed. If the cover image contains unrecognizable patterns and passes the histogram test then the cover image is accepted For each pixel in the cover image apply level Correction, contrast correction and balance correction. After applying DWT to the cover image threshold calculation was done that will be used to define what is the size (the space) of the redundancy in the cover image that can be used to imbed the message. The drawback of the proposed method is the computational overhead. The method requires resources from the computer hardware (mainly processor speed and memory (RAM)).
Brisbane et al. [6] proposed a method which improves both the imperceptibility and capacity of SMK algorithm. Seppanen, Makela and Keskinarkaus (SMK) have proposed a high-capacity steganographic technique to conceal information within a color image. The technique is significant because of the high volume of data that is embedded into pixels but it results in a high level of noise and so the quality of the resulting image is not acceptable. A new type of coding structure is proposed, which maintains a high capacity but lowers the level of noise. Secondly, an adaptive algorithm is used to identify pixel values that have a high capacity to distortion ratio. Also the maximum size of the coding structures is limited to improve the capacity/distortion tradeoff.
Lin and Shiu [7] proposed a steganographic scheme based on DCT to overcome the limitations of hiding capacity of DCTbased images, they explore the upper bound of hiding capacity of DCT-based images when reversibility is not concerned.
To explore the upper bound of hiding capacity of a DCT based image, first divide the coefficients in the middle frequency of a DCT-based image into the six sub-areas. Next, design a hiding strategy based on a notational transformation concept. The most significant difference between the proposed data hiding scheme and existing DCT-based data hiding schemes is the data hiding strategy. Although the cover images used in this scheme are only achieved by quantization, they remain the same as those generated by JPEG compression because quantization is the only lossy process in JPEG compression. Moreover, the image quality of stego-images with this scheme remains above 30 dB for most test images when the hiding capacity is above 90000 bits, which is better than the best image quality offered by existing DCT-based loss or lossless data hiding schemes.
Emam and Nameer [8] implemented a new algorithm based on hiding a large amount of data (image, audio, text) file into color BMP image. They used adaptive image filtering and adaptive image segmentation with bits replacement on the appropriate pixels. These pixels are selected randomly rather than sequentially by using new concept defined by main cases with their sub cases for each byte in one pixel. High security layers have been proposed through three layers to make it difficult to break through the encryption of the input data and confuse steganalysis too. The algorithm can embed efficiently a large amount of data that has been reached to 75% of the image size with high quality of the output.
Chu Wu et al. [9] introduced a novel steganographic method based on least-significant-bit (LSB) replacement and pixelvalue differencing (PVD) method. First, obtain a different value from two consecutive pixels by utilizing the PVD method. A small difference value can be located on a smooth area and the large one is located on an edged area. In the smooth areas, hide the secret data into the cover image by LSB method while using the PVD method in the edged areas. Because O c t 2 5 , 2 0 1 3 the range width is variable, and the area in which the secret data is concealed by LSB or PVD method are hard to guess, the security level is the same as that of a single using the PVD method of the proposed method.
In this paper we have studied, implemented and analyzed results of steganography in three different techniques one is the LSB method which is a spatial domain steganography and others two techniques are based on frequency domain steganography that is we have used two techniques for converting the cover image from spatial domain to its frequency domain one is the DFT and another is the DWT.

LEAST SIGNIFICANT BIT (LSB) REPLACEMENT METHOD
It is the most simple and common Steganographic process [10,11,12] in which least significant bit of all the bytes or some of the bytes of the value of the pixels are replaced by the bits of the secret message. A sample raster data for 3 pixels (9 bytes) may be represented as We have implemented one color image steganographic system using this technique in MATLAB in which first we have calculated the length of the message and save it into some specific value of the pixels after converting into binary and this value of the length of the secret message is required during the extraction of the message. After that embed bits of the secret information into all the color components of the cover image starting from the red component and then green and blue. After finishing the insertion processes again we convert these binary values of the pixel into integer for getting the stego-image. For extraction of the secret message at the receiver end we apply the reverse process. We evaluate the result and analyzed these results which will discuss into the later section.

STEGANOGRAPHY USING DISCRETE FOURIER TRANSFORMATION (DFT)
We know that an image (f(x,y) of size M x N) can be represented in the frequency domain (F(u,v)) using the equation for the two-dimensional discrete Fourier transform (DFT) [13,14] which is given by the following equation F(u,v)= …. (1) Original Image DFT representation Coefficients of DFT The concept behind the Fourier transform is that any waveform can be constructed using a sum of sine and cosine waves of different frequencies. The exponential in the above formula can be expanded into sines and cosines with the variables u and v determining these frequencies. The inverse of the above discrete Fourier transform is given by the following equation: f(x,y)= ………….. (2) Thus from the above inverse relationship we can say that if we have F(u,v), we can obtain the corresponding image (f(x,y)) using the inverse discrete Fourier transform. The values of the Fourier transform are complex, meaning they have real and imaginary parts. The imaginary parts are represented by i, which is defined solely by the property that its square is −1, ie: i 2 = -1.
MATLAB has three functions to compute the DFT: 1. fft -for one dimension (useful for audio) 2. fft2 -for two dimensions (useful for images)

fftn -for n dimensions
In this paper we have developed a color image steganographic system using discrete fourier transformation. In our system first we calculate the length of the secret message and then convert the message into ASCII format, after that we transform the cover image from its spatial domain into its frequency domain using DFT by applying the equation (1). Since we know that Fourier transform are complex and they have real and imaginary parts, so we embed our secret information into only the real parts of the furrier transform. After finishing insertion of secret information we take Inverse DFT by applying equation (2) so that we can get the stego-image.
Again in the process of secret message extraction inverse DFT is applied to the stego-image and find the length of the message and then extract the real coefficients from the DFT representation up to the length of the message.

STEGANOGRAPHY USING DISCRETE WAVELET TRANSFORMATION (DWT)
A wavelet is a wave like oscillation which starts with zero, increases and again decreases and at a certain period of time it backs to zero [15]. If we tell about furrier analysis we say that furrier analysis can able to construct only the frequency representation of a signal where as wavelet analysis can able to represent time-frequency representation of a signal simultaneously. The most basic wavelet transform is the Haar transform described by Alfred Haar in 1910 [16]. It serves as the prototypical wavelet transform. In this paper we have also applied Haar wavelet transformation in the cover image before steganography. In Haar wavelet transformation at each level, the Haar transform decomposes a discrete signal into two components with half of its length: an approximation and a detail component [17]. We know that image is a two dimensional representation of the pixel values, so when we apply Haar wavelet transformation to an image it is called 2-D Haar wavelet transformation. In the present system first we apply 2-D Haar wavelet transformation to the cover image where we get the four sub-bands which separate the high and low frequency information. Then we calculate the length of the secret message and save it to the low high frequency sub-band of the wavelet transform. After that convert the secret information into ASCII format which means converting from character to integer format and normalized these integer dividing by length of the message and insert these normalized message into O c t 2 5 , 2 0 1 3 the high frequency sub-bands. At the last step apply Inverse Discrete Wavelet Transformation so that we can get the stego-image. For extracting the secret message we can apply the reverse procedure.
Original Image DWT representation

EXPERIMENTAL ANALYSIS
For analysis our results obtained by steganography using LSB, DFT and DWT primarily we used two parameters one is the Mean Squared Error (MSE) and another is the Peak Signal to Noise ratio (PSNR). The MSE is the cumulative squared error between the cover image and the stego-image, whereas PSNR is a measure of the peak error [18,19]. The mathematical formulae for the two are ………………… (5) …………......... (6) Where f and g are the cover image and stego-image respectively and M and N are the dimensions of the images. A lower value for MSE means lesser error, and as seen from the inverse relation between the MSE and PSNR, this translates to a high value of PSNR. Logically, a higher value of PSNR is good because it means that the ratio of Signal to Noise is higher. Here, the 'signal' is the original image, and the 'noise' is the error in reconstruction. For this experiment we have taken four image formats: PNG, BMP, JPEG and TIFF and for each image format we insert ten secret messages of sizes starting from 5KB to 50 KB and evaluate their corresponding MSR and PSNR. The following table describes the MSE and PSNR for different image formats and for different message size. O c t 2 5 , 2 0 1 3  Besides the analysis of MSE and PSNR we have also analyze the message insertion and message extraction time for each of the cases.

CONCLUSION
In this paper an attempt has been made to study and implement the color image steganography using LSB, DFT and DWT. For analysis the results we have used mainly two parameters MSE and PSNR and calculate these values for four image formats and for each image formats we insert ten secret messages of sizes starting from 5 KB to 50 KB. In all the image formats and for all the message sizes LSB gives high MSE and low PSNR as compared to DFT and DWT. When we compare MSE and PSNR for DFT and DWT we found that for lower values of message size that is up to 15 KB, DFT shows better results than that of DWT which means DFT gives lower MSE and Higher PSNR but for large message size DWT shows better results than that of DFT. But in case of JPEG image format for all the message size DWT gives better results than DFT, this is because we know that JPEG is one type of compressed image and also DWT is a technique of image compression, in JPEG200 DWT is use for compressing the image. So we can say that for large payloads DWT is better option for steganography. Besides the analysis of MSE and PSNR we have also analyze the message insertion and message extraction time. In case of time analysis for all the image formats and message size DFT gives better results than that of other two.