Hiding data in images using steganography techniques with compression algorithms

,


Introduction
The development of computer and the fast growth of internet usage over high bandwidth and low cost computer hardware to control the quickly growth of the steganography.In the recent years, hidden and secure communication is the primary requirement of people.Therefore, steganography is achieving attraction by people caused by the security issues over the internet.Steganography has retreated a digital strategy of hiding a file in some form of multimedia, such as an image, an audio/video files [1,2].The aim of steganography is hiding the embedded information in the cover image.Cryptography convert secretes data into an unreadable form.Normally only one security approach is used at a time by the users either cryptography or steganography.the combination of steganography and cryptography techniques are the most useful and powerful security techniques, also they can play a very important role in this field.
Basic Model: the basic steganography proposed model as shown in Figure 1 contains two files: First one is a cover image and Second is the secret file which will be hidden by a private key to encrypt the secret file.As shown in Figure 1 there are two steps, the first one hide data (embedding technique) and the other to compress it to reduce the spaces and the size of data.The end result of the system is the stego-image which is the digital image that has the secret message hidden interior.Stego-image is sent to the receiver via the public communication channel (internet) where the receiver will get the secret data out from the stego-image by applying an extracting set of rules with the secret password.
LSB Substitution: the LSB is one of the first useful coding techniques in steganography applications [3,4].This method utilizes spatial embedding techniques and embeds the secret data into the cover image in which the pixels are subject to slight changes.Consequently, it's almost impossible for the Human Vision System (HVS) to notice by these slight changes so the ISSN: 1693-6930  Hiding data in images using steganography techniques with... (Osama F. AbdelWahab) 1169 possible adversary attacks will be decreased.Although this coding method integrates a simple tool in many packages, it cover ages some signs of weakness.Noise, filtering, clipping, color spatial transformations, and re-sampling are the weakest states of the LSB approach.Further, this approach can be affected by lossy compression algorithms in order that the extraction of the secret data cannot be assured in applications where compressed video streams are used.

Figure 1. Basic model
The mathematical functions DCT is applied to transfer the digital image data from the spatial domain to the frequency domain.In DCT, after transforming the image within the frequency domain, the data is embedded inside the LSB of the medium frequency components and is detailed for lossy compression.DCT Technique coefficients are used for JPEG compression [5].It divides the image into parts of differing importance.It transforms the image or a signal from the spatial domain to the frequency domain.It could discrete the image into high, middle and low frequency components, in low frequency sub-band, a lot of the signal energy lies at low frequency which contains most important visual parts of the image while in high frequency sub-band, high frequency components of the image are usually eliminated via compression and noise attacks.So the secret message is embedded by adjusting the coefficients of the middle frequency sub-band so that the visibility of the image will not be affected.The common equation for a 1D (N data items) DCT is defined by the following (1): [6,7].
where u= 0, 1, 2… N-1. and The common equation for a 2D (NxM image) DCT is defined by the following (2): where u, v = 0, 1, 2….N-1.Here, the input image is of dimension N X M. c (i, j) is the depth of the pixel in row i and column j; C (u,v) is the DCT coefficient in row u and column v of the DCT matrix.DCT is used in steganography as 4-Image is broken into 8×8 blocks of pixels.Operating from left to right, top to bottom, DCT is applied to each block.Each block is compressed via quantization table to scale the DCT factors and message is embedded in DCT factors.For data reduction during the quantization phase, DCT factors are quantized by using the regular quantization table.The HVS is a great deal extra touchy to the values in low-frequency components than those in the higher frequencies.for this reason, distortion in high-frequency components is visually acceptable and perceptible [8][9][10][11][12][13][14].Cryptography: cryptography is the art of complete the security by encoding the messages to mark them as non-readable.Cryptography is an act of transmitting the data safely  ISSN: 1693-6930 TELKOMNIKA Vol.17, No. 3, June 2019: 1168-1175 1170 via the network and Internet by applying some cryptographic algorithms so that it will be hard for intruders to attack the confidential or private information.Two basic procedures used in cryptography are encryption and decryption; encryption procedure is the process of converting plain text into cipher text and decryption procedure is the reverse process of encryption.Plain text is the text which has the original message or data which is not encrypted and the ciphertext is the text which is ready to be used after the encryption of the message.A key is required for both the encryption and decryption of the data or message [15][16][17][18][19][20].

Related work
In this section, we briefly review the DCT transform and then introduce three selected DCT-based data hiding schemes: Iwata et al.'s data hiding scheme [5], Chang et al.'s [6] and Lin and Shiu's [7] reversible data hiding schemes.Discrete Cosine Transform (DCT) and Quantization.DCT is an extensively used mechanism for image transformation adopted to compress JPEG images [8].within the JPEG compression procedure, which includes five phases: transforming an RGB image to a YCbCr image, composition of smallest coding units, two dimensional DCT, quantization of DCT coefficients, run length coding and Huffman coding.In the two dimensional DCT phase, each 8×8 non-overlapping block converted into Watermark inserted into DCT domain by using the two dimensional DCT Secret message from the public and private key.The sender generates the stego-image consistent with Embed algorithm DCT [9].
V.Santh et al.In that first odd price is chosen for watermark embedding in all special band after first stage decomposition [10].A hybrid approach based on DCT and SVD is usually recommended.More transparency is obtained using only Odd values of a recognized pattern and LPSNR is adopted to obtain high robustness [11,17].The author recommended a watermarking scheme based on DCT-DWT-SVD.They apply second level decomposition of the cover image.DCT is applied to second level HL factor and divides it into four quadrants using zigzag series.SVD is applied to each quadrant and adjusted with SVD of the watermark.The algorithm gives appropriate PSNR and also robust to various attacks.Quadrant B1 gives properly consequences as compared to other three [12,18].The author proposed a watermarking scheme based totally on DWT and SVD using all four frequency bands.Singular values of Watermark are inserted into all four frequency bands singular values after first stage DWT.Experimental results show that LL gives the best magnitude of wavelet coefficient as well as of singular values [4,19].
In [12] offered steganography technique that is based on block matching in DWT domain.By using naïve BM technique which develop the quality of the replicated secret image.In [7] offered steganography technique by implement a random key producer as a method.Stream cipher (LFSR) is the basic idea behind random key producer.Another thing which is use known beta that will importance on the choice of the cover image.In [13] offered steganography technique which is the combination of image steganography and cryptography.For Encrypt secrete data they used content based encryption technique and raster scan technique along with LSB is used for image steganography.
In [14], a method of hiding of data in Black and White images was suggested that used blocks to hide data rather than changing one or a pair of bits of pixels.A block of proper size 2*2, 3*3 is selected and maximum 2-pixels are changed in 3*3 block and only 1-pixel in 2*2 block to keep up visual quality of the image.An odd-even feature of blocks was used.Bit 1 is place in odd numbered blocks and bit 0 is place in even numbered blocks.Central pixel is used to checked whether bit is existing in that block or not.
A new steganographic algorithm for RGB images was offered in [15], where 2-different techniques namely, Matrix Pattern (MP) and LSB were combined.Spatial domain of images is used by these 2-techniques.In MP technique, covered image is divided into B×B blocks that are non-overlapping.Message is transformed into t1×t2 matrix patterns.Then, hidden data is inside 4 th through 7bits of blue channel in that covered image.In the offered algorithm, the message is hidden inside first 3-bit layers and 4 th to 7 th bit layer of RGB cover image combining LSB and MP methods.The results presented that this new policy has better capability than LSB and MP methods used separately.The stego-image has also a good PSNR value.
Most of the watermarking schemes noted above the gray scale image is used as a cover image and binary or grayscale watermark.In suggested scheme color image is used as a cover image and a watermark image.Consequently, capacity is extended.To achieve robustness in opposition to specific attacks watermark is embedded inside the lower band and to get suitable transparency amendment is carried out in odd values.DCT gives the great result of compression therefore to overcome problems of compression attacks in existing techniques in second technique we practice DCT to both cover image as well as the watermark [16].The results showed that the presented technique has better PSNR and payload capacity as well.This paper is ordered as follows, Section II, we argued the relevant research work of the data hiding based totally on compression strategies.Section III describes our counseled technique.Section IV shows the experimental results, and conclusions are given in Section V.

Proposed Algorithms
In the proposed technique, we applied multiple methods to hiding image by applying DCT algorithm to embed the image and encrypt the data via cryptography algorithms, applying DCT compression [21][22][23][24][25], then stego-image will transfer via the internet after that on the other side the reverse method will be performed on stego-image by decrypting it using the private key to extract the data.In the proposed algorithm, it is assumed that the sender as well as the receiver holds the same system of private keys.Indeed, the receiver sends the public key to the sender by an insecure communication channel.Then, the sender generates the stego-image with both keys and sends them through another insecure channel to the receiver, who can extract the secret file, which inserted into the cover image by the embedding procedure.

Embedding Algorithm
The embedding algorithm flowchart is shown in Figure 2, the steps of the algorithm are as the follows: Input: (Cover image, Secret file, key) The secret file is place in the cover image by the embedding procedure. Read cover image. Read secret Key. Read the secret file and convert it to binary. The cover image is dived into 8×8 block of pixels. DCT is applied to each block. Each block is compressed over and done with quantization table. Determine LSB of each DCT coefficient and replace with LSB of secret file. Write stego-image. Calculate the Mean Square Error (MSE) and Peak signal to noise ratio (PSNR) of the stego image.

Extracting Algorithm
The extracting algorithm flowchart is shown in Figure 3

Experimental Results
The experiment of using steganography in cover image is to hide as much data as possible with the lowest noticeable difference in the stego-image.As enactment measurement for image distortion, a practical objective measure for this property are the Mean Squared Error (MSE) and the Peak Signal to Noise Ratio (PSNR) between the cover image and the stego-image.Mean Square Error (MSE): It is the degree used to quantify the alteration between the preliminary and the distorted or noisy image.Mean Square Error is calculated using the following formula: MSE = where in 256 is the wide variety of bits that constitute a pixel within the image.as an example, The PSNR parameter is computed at the depth portion of the images.The number of faded bits

Conclusion
The performance of a comparison between two different techniques is given.The first technique used LSB with no encryption and no compression.In the second technique, the secret message is encrypted first then LSB technique is applied.Moreover, DCT is used to transform the image into the frequency domain.According to results obtained in this paper, it is clear that we can hide the intended data in messages while minimizing its size, enabling us to transfer the data more securely with less overall burden in capacity in comparison to other algorithms.The performance of these two techniques is evaluated on the basis of the parameters MSE and PSNR.Using LSB and DCT effectively reduce the overall number of bits/bytes in a file so it can be transmitted faster over slower Internet connections, or take up less space on a disk.so our technique shows to be effective with keeps the criteria of perceptibility, capacity, and robustness of a standard steganographic algorithm.

Figure 2 .Figure 3 .
Figure 2. Flowchart of embedding Algorithm S'' and ''O'' are the stego-image and original image respectively to be compared and their image sizes are (m x n).where m and n are number of rows and columns.we can find Peak Signal to Noise Ratio (PSNR) which measures the quality of the image by comparing the original image with the stego-image.PSNR is used to calculate the quality of the stego-image after embedding the secret message in the cover image.

Figure 4 .
Figure 4. Output of image embedding process: (a) cover image (b) secret image (c) stego-image

Table 2 .
Parameters Analysis of LSB and DCT Methods