International Journal of Electrical and Computer Engineering (IJECE) Vol. No. April 2013, pp. ISSN: 2088-8708 A Method of Steganography Ae P Message with Q Coefficient (SPMQC) Zeinab Famili*. Karim Faez**. Abbas Fadavi* * Department of Electrical. Computer and IT Eng. Azad University. Qazvin. Iran ** Department of Electrical Eng. Amirkabir University of Tech. Tehran. Iran * Department of Mechatronics. Science and Research Branch. Islamic Azad Univercity. Semnan. Iran Article Info ABSTRACT Article history: In this paper, we are going to propose a method for Steganography- which is based on deceiving N2 algorithm. Since the cover image coefficients and stego image coefficients histograms have significant differences for purposes of statistical properties, statistical analysis of N2-test reveals the existence of hidden messages inside stego image. We are introducing an idea for hiding messages in the cover image. It causes that DCT (Discrete Cosine Transform. coefficient histogram not to have remarkable modification before and after embedding message. As a result, identifying the hidden message inside an image is impossible for an eavesdropper through N2 -test. In this paper, we are proposing a better method with developing this In fact, the capacity and the security of embedding messages increase extremely. Received Dec 21, 2012 Revised Feb 21, 2013 Accepted Mar 9, 2013 Keyword: Steganography Stego image N2 -test Copyright A 2013 Institute of Advanced Engineering and Science. All rights reserved. Corresponding Author: Zeinab Famili. Department of Electrical. Computer and IT Eng. Islamic Azad University. Qazvin. Iran Email: zeinab. famili@gmail. INTRODUCTION Steganography is a hiding communicationAos knowledge . , . There are two main branches of steganography and digital watermarking in embedding information of image . Each Steganographic communication system consists of an embedding algorithm and an extraction algorithm. To accommodate a secret message, the original image, also called the cover-image, is slightly modified by the embedding As a result, the stego-image is obtained. Steganography goal is to hide message inside a cover image, so that the message is undetectable . The hiding information process in a Steganographic system begins by identifying a cover mediumAos redundant bits, which can be modified without destroying that mediumAos integrity . , . , and then these redundant bits are replaced withthe data through the hidden messages. A simple method in the hiding system is replacing the bit message with the least significant bit of DCT coefficient. The classification of steganographic algorithms is into three categories: spatial domain, frequency domain and adaptive methods. Adaptive methods can either be applied in the spatial or frequency domains. A spatial domain technique generally uses the leastdirect significant bit (LSB) replacement technique . The frequency domains based on methods such as discrete cosine transform (DCT). Fourier transforms (FT) and discrete wavelet transforms (DWT). Perceptual masking (PM) or adaptive steganography (AS) is the recent contribution in the domain . , . In this paper, we apply this method. Modifying the cover medium changes its statistical properties, so eavesdroppers can detect the distortions in the resulting stego mediumAos statistical properties. The system issecure if the stego images do not contain any detectable artifacts due to message embedding. means that the stego images should have the same statistical properties as the cover images . There are Journal homepage: http://iaesjournal. com/online/index. php/IJECE IJECE ISSN: 2088-8708 different Steganographic algorithms which hide information in JPEG images . , such as: Jsteg . JStegShell . JPHide . Outguess . F5 algorithm . , . The plan of this paper is given by a brief review of JPEG image format in Section 2. In Section 3, we review statistical analysis. After presentingSteganographic 1 message with 2 coefficients in Section 4. Steganographic 2 message with 3 coefficients in Section 5 are discussed. We present out anew proposed method (Steganographic p message with q coefficient. in Section 6. In Section 7 we summarize theresults. JPEG IMAGE FORMAT JPEG is a popular and widely-used image file format and it has a de facto standard for network image transmission . , . If we apply JPEG (Joint Photographic Experts Grou. images for data hiding. the stego-image will draw less attention of suspect rather than the most other formats. The JPEG image format uses a discrete cosine transform (DCT) to transform successive 8y8 pixel blocks of the image into each 64 DCT coefficients . The DCT coefficients F . , . of an 8y8 block of image pixels f. , . are given by Equation . F( u, v ) A A( u )A( v ) C Eu ( 2x A . uA E E( 2 y A . vA E Eu f ( x, y ) cosEE E 16 EE EE 16 EE x A0y A0 u , v A 0, 1, 2A N Ae 1 A( u ) A u A0 u A 1, 2A N Ae 1 Afterwards, the Equation . quantizes the coefficients: F . , v ) A round E F . , v ) E E Q . , v ) E The coefficients matrix is divided cell to cell into quantization matrix and their rounds are obtained by Equation . Q . , . , is a 64-element quantization table. (This table is given in reference . The leastsignificant bits of the quantized DCT coefficients are as redundant bits. If FQ . , . O 0, 1, then hidden message will embed in these bits. For more information about JPEG, refer to . STATISTICAL ANALYSIS At first, we arrange DCT coefficients to . i, 2i . groups in terms of I . ee table . In study of each group, we will realize that with LSB modification, the members of a group may change their orders and no member of one group conveys to other group. Table1. Grouping the of two adjacent DCT coefficients according to i . Group1 Group2 Group3 Group4 A. For example, 8 and 9 are at the same group in table . With embedding 0 and 1 in the least significant bit, these numbers are converting to each other or itself. As we are observing in Figure 1, the number eight doesnAot change with embedding 0 in itAos LSB. But the number nine converts to eight with embedding 0 in itAos LSB. Given uniformly distributed message bits, the probability of zeroand one are equivalent in messageAos bits. So, the numbers of 8 and 9 coefficients are almost equal after embedding with attention to Figure 1. Given uniformly distributed message bits, the probability of zeroand one are equivalent in messageAos bits. So, the numbers of 8 and 9 coefficients are almost equal after embedding with attention to A Method of Steganography Ae P Message with Q Coefficient (SPMQC) (Zeinab Famil. A ISSN:2088-8708 Figure 1. Then, after embedding the number of coefficient which change from 2i to 2i 1 value is more than 2i 1 to 2i value. Figure 1. Changeable number of 8 and 9 with embedding 0, 1 in the their LSB Figure 2 displays the histogram before and after a hidden message that it has been embedded in a JPEG Westfield and Pfitzmann observe that the embedding of encrypted data decrease the difference between coefficients histogram in each group inside given image . , . Figure 2. Frequency histograms. Sequential changes to the . original and . modified imageAos leastsequential bit of discrete cosine transform coefficients tend to equalize the frequency of adjacent DCT coefficients in the histograms. We consider that niand ni*are the value of the histogram DCT coefficient in i before and after the embedding, respectively. As a result, n2iand n2i*are the number of the histogram DCT coefficient in 2i before and after the message embedding, respectively. So n2i 1 is the number of n2i adjacent coefficient and n2i 1* is the number of n2i* adjacent coefficient. Given uniformly distribution of zero and one in message,The following relation is confirmed . n2i A n2i A1 C n 2*i A n2*i A1 A N2- test used to determine whether the observed frequency distribution yi in the image matches a distribution which shows distortion from embedding hidden data . , . Although we do not know the cover image, we know that the sum of adjacent DCT coefficients remain invariant, which lets us compute the expected distribution yi* from the stego image. Then we take the arithmetic concept, yi* A n2i A n2i A1 To determine the expected distribution by equal . and compare with the observed distribution . IJECE Vol. No. April 2013: 230Ae237 IJECE ISSN: 2088-8708 y i A n 2i . The N value for the difference between the distributions is given as: A2 A Eu ( yi A yi* ) 2 Figure 3 displays the N2value during the hidden message in the LSBAos coefficients of the image. the N value is decreasing with hidden message in LSBAos coefficients, and then with study of N2value, we realize that the message was hidden in the image. Figure 3. The grin line is N2 value for cove image and red line is N2 value during the hidden message. STEGANOGRAPHY 1 MESSAGE WITH 2 COEFFICIENTS (S1M2C) We proposed a new method in . In this approach two sequential DCT coefficients only hide one message bit. First of all, we choose two sequential DCT coefficients that they are in the same group in Table Indeed, after applying the Steganography inside an image. N2 algorithm is operated on the basis of sensible modification which will increase the difference between in, and in*. In the next step, we calculate the following relation according to last description: AE n A n 2 i A n 2 i A1 AE n * A n 2* i A n 2* i A1 d A AEn A AEn* . The goal of this approach is to minimize the d value by replacing two new DCT coefficients, according to the value of the sequential coefficients, and the hidden message and d value. For this approach we use of Table 2. Table 2. This table indicate the new coefficient replacement according to the message bit to be 0 or 1. Message bit New Coefficient . i,2. i 1,2. i,2i . i 1,2i . For example, we assume i is equal to 4 . = . , and two sequential coefficients equal to . , . For the purpose of a hiding message bit with zero value, we can replace . , . , . according to Table 2. There are three cases in choosing . , . , . in the example. A Method of Steganography Ae P Message with Q Coefficient (SPMQC) (Zeinab Famil. A ISSN:2088-8708 1- If d > 0, it means that the number of eights is less than its number in the cover image. So that, it should be converted one 9 to one 8. Therefore, we use . , . As a result, one occurrence of the nines is decreased and it is increased to 8. So, d is decreased. 2 - If d = 0, it means that we donAot need to change the number of eights and nines, then new coefficients are same . , . 3 - If d < 0, it means that the number of eights is more than its frequency in the cover image. Thus, it should convert one 8 to one 9, because in transmitting this message, there isnAotany . , . then we use . , . until d doesn't become worst. General convert method . is in . The Steganography 1 message with 2 coefficients approach had been explained that N2 value of stego image is nearly equal to N2 value of cover image, but the capacity of embedding message decreases to 50%. PROPOSEDMETHODFORSTEGAANOGRAPHY 2 MESSAGE WITH 3 COEFFICIENTS (S2M3C) As we considered the consequences last section, we can hide one message with two coefficients. avoid of decreasing capacity in hidden information, we propose another method. In this approach two message are hidden with three coefficients. First of all, we choose three sequential DCT coefficients that they can convert to each other after the embedding message bit. According to the value of three coefficients and the hiding message bits, dthree coefficients are replaced by three new coefficients. With due attention to two message bits to be 0, or 1, we create the Table 3 for new coefficients. These three coefficients are chosen optional for hiding messages. Table 3. This table indicate the new coefficient replacement according to two message bits to be 0 or 1. Message Message New Coefficients . i,2i,2. i,2i,2i . i,2i 1,2. i,2i 1,2i . i 1,2i,2. i 1,2i,2i . i 1,2i 1,2. i 1,2i 1,2i . We show general convert method of steganography 2 message with 3 coefficients in Table 4. For example, in second row of Table 4. three old sequential coefficients are . i, 2i, 2. respectively, and two message bits that we want to embed are . , . and d value is equal to 0. It means that in hasn't changed after the embedding. So, the number of 2i and 2i 1coefficients are fit and they don't need to change. Thus, the new coefficients will be . i, 2i, 2. according to Table 4. Another example, in third row of Table 4: three old sequential coefficients are . i, 2i, 2. consecutively, and the message bits that we want to embed are . , . and d value is less than zero . means that the in has been increased after the embedding. There for, we should decrease difference between in, and in*. With attention to Table 3, we are replacing . i, 2i, 2i . of new coefficients that it increase the number of 2i 1 coefficients. In another example, we consider fourth row in Table 4: three old sequential coefficients are . i, 2i, 2. consecutively, and the message bits that we want to embed are . , . and d value is more than zero . It means that the in has been decreased after the embedding. Therefore, we should increase difference between in, and in*. Because in transmitting this messages, there isn't any choice for increasing the number of 2i coefficients. Thus, we are replacing . i, 2i, 2. As we considered in three previous example, in some rows d value is inclined to zero . he difference between in, and in* are decreasin. But in some rows, d value couldn't incline to zero. In addition, some rows have special situation, like 91 row of Table 4, to decrease d value we should increase 2i value in this We put . i 1, 2i, 2i . coefficients in table . but if the d value is more than one . , we canAot follow the Table 4 and with attention to Table 3 we replace . i 1, 2i, 2. coefficients, until the d value incline to zero with double speed. IJECE Vol. No. April 2013: 230Ae237 IJECE ISSN: 2088-8708 PROPOSEDMETHODFORSTEGAANOGRAPHY P MESSAGE WITH Q COEFFICIENTS (SpMqC) We have hidden 1 message with 2 coefficients and 2 messages with 3 coefficients at two previous In this section, our goal is to generalize this approach with p messages and q coefficients. Therefore, we choose q coefficients and with due attention to p messages and d value, q new coefficients are replacing. For example: S3M4C. Steganography 3 Message with 4 Coefficients S2M4CASteganography 2 Message with 4 Coefficients. The table of transferring S2M4C has shown in the following. With due attention to Table 5 and d value, we can create a table for embedding 2 messages with 4 coefficients as previous section. Table 4. Some part of 96 states in new general convert method old coefficients . i, 2i, 2. i, 2i, 2. i, 2i, 2. i, 2i, 2. i, 2i, 2. i, 2i, 2. i 1, 2i, 2. i 1, 2i, 2. i 1, 2i, 2. i 1, 2i, 2. i 1, 2i, 2. i 1, 2i, 2. i 1, 2i 1, 2i . i 1, 2i 1, 2i . i 1, 2i 1, 2i . i 1, 2i 1, 2i . i 1, 2i 1, 2i . i 1, 2i 1, 2i . Message . , . , . , . , . , . , . , . , . , . , . , . , . , . , . , . , . , . , . new coefficient . i, 2i, 2. i, 2i, 2. i, 2i, 2i . i, 2i 1, 2. i, 2i 1, 2. i, 2i 1, 2i . i, 2i, 2. i, 2i, 2i . i, 2i, 2i . i, 2i 1, 2. i, 2i 1, 2. i, 2i 1, 2i . i 1, 2i, 2i . i 1, 2i, 2i . i 1, 2i, 2i . i 1, 2i 1, 2. i 1, 2i 1, 2i . i 1, 2i 1, 2i . As we perceived in last paper . , the most important weakness was low capacity of embedding. But we can apply this approach for T9M10C and steganography 9 messages with 10 coefficients. As a result, the capacity of embedding increases to 90%. Transferring table has been enlarged with increasing of p and q and the steganographer should consider to more messages and coefficients. Then the time of calculations increases. Indeed, with attention to eavesdroppers how are encountering with many images in internet, on the contrary of steganographers how are always embedding one image, the calculation costs isn't important in case of increasing security. Table 5. This table indicate the 4 new coefficients replacement according to two message bits to be 0 or 1. Message Bit1 Message Bit1 New Coefficients . i,2i,2i,2. i,2i,2i,2i . i,2i,2i 1,2. i,2i,2i 1,2i . i,2i 1,2i,2. i,2i 1,2i,2i . i,2i 1,2i 1,2. i,2i 1,2i 1,2i . i 1,2i,2i,2. i 1,2i,2i,2i . i 1,2i,2i 1,2. i 1,2i,2i 1,2i . i 1,2i 1,2i,2. i 1,2i 1,2i,2i . i 1,2i 1,2i 1,2. i 1,2i 1,2i 1,2i . A Method of Steganography Ae P Message with Q Coefficient (SPMQC) (Zeinab Famil. A ISSN:2088-8708 RESULTS AND ANALYSIS Our proposed algorithm is applied on 20 different images. The set of USC_SIPI images have been used in the performance of algorithm. We introduce their result in Table 6. According to relation . , the d value is accounted for 20 images and their average round is in Table 6. For example, in Table 6, d . , . =7. It means that the average value of d is equal to 7 for steganography 4 messages with 5 coefficients. The cells that we don't discuss about them have specified with the sign of multiplication. The average of d value for these 20 images is equal to 56 with using of Jsteg steganography method. As a result this method is recognized withN2Aetest. Looking at the Table 6, we realize that the N2-test doesn't effect on the proposed methods perfectly. In addition, the capacity of embedding in proposed methods increased rather than previous method . For instance, the capacity of embedding got 66% for S2M3C method . n row 2 and column . and the capacity of embedding got 77% for S7M9C method . n row 7 and column . Table 6. This table indicates applied result of proposed algorithm on 20 images. Each cell show value d for Steganography p Message with q Coefficients. The number of cells increases with adding messages and coefficients and it is default for us to find the best converted table. We use the casual tables in this research and reach a good result that shows deceit of N2 algorithm with these methods. To find out the method which specifies the best table for more messages and coefficients will be considered in future. REFERENCES