IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 Proposed Steganography Method Based on DCT Coefficients A.A.Al-Saffar Department of Computer Science, College of Education- Ibn Al- Haitham,University of Baghdad Received in : 26, April , 2011 Accepted in : 20, September, 2011 Abstract In this paper an algorithm for Steganography using DCT for cover image and DWT for hidden image with an embedding order key is proposed. For more security and complexity the cover image convert from RGB to YIQ, Y plane is used and divided into four equally parts and then converted to DCT domain. The four coefficient of the DWT of the hidden image are embedded into each part of cover DCT, the embedding order based on the order key of which is stored with cover in a database table in both the sender and receiver sender. Experimental results show that the proposed algorithm gets successful hiding information into the cover image. We use Microsoft Office Access 2003 database as DBM S, the hiding, extracting algorithms were implemented using MALAB R2009a. Keywords:Steganography, DCT,DWT,RGB,YIQ,Database Introduction Since the rise of the Internet is one of the most important factors of information technology and communication has been the security of information unfortunately it is sometimes not enough to keep the contents of a message secret, it may also be necessary to keep the existence of the message secret. The technique used to implement this, is called Steganography.[1] Steganography is the art of hiding data within data [2], aims at sending a message through a cover-medium, in an undetectable way. Undetectable means that nobody, except the intended receiver of the message, should be able to tell if the medium is carrying a message or not [3]. Its techniques allow the communication between two persons to be hidden not only the contents but also the existence of the communication in the eyes of any observer. These techniques use a second perceptible message, with meaning disjoined by the secret message. This second message works as a “Trojan horse” and is a container of the first one. [4] The goal of Steganography is to avoid drawing suspicion to the transmission of a hidden message. If suspicion is raised, then this goal is defeated. [5] Most Steganography jobs have been carried out on different storage cover media like text, image, audio or video. [2] Hiding the subjects with Steganographic techniques involves the spatial and frequency domains of these cover images. In the spatial domain approach, the secret message is embedded directly into the pixels of the cover images. Least significant bit (LSB)-based hiding strategies are the most commonly used in this approach [5,6]. In addition to LSB-based hiding Strategies, several schemes that use different strategies to hide secret messages in the spatial domain of cover images have been proposed in the past decade. Transform Domain methods hides messages in significant areas of cover image which makes them robust against various image processing operations like compression, enhancement etc. Many transform domain methods exist. The widely used transformation functions include Discrete Cosine Transformation (DCT), Fast Fourier Transform (FFT), and Wavelet Transformation. The basic approach to hiding information with DCT, FFT or Wavelet is to transform the cover IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 image, tweak the coefficients, and then invert the transformation. If the choice of coefficients is good and the size of the changes manageable, then the result is pretty close to the original [7,8]. The proposed method work in frequency domain using DCT at cover message and 2D- DWT at the hidden message to generate a stego-image with a Key embedded order. Note that the secret messages are embedded in the cover with different ordered Keys for in each cover- hidden image to achieve more secure so the cover image with the key order must be known in both sender and receiver side we consider a Database with many cover images and keys. YIQ Color Model We use the color model to represent the color information of digital images. Since we need three parameters to represent a color, those color models must be with a three dimensional format. The models use some mathematical functions to represent a point position (in the three dimensional space) that is assigned to a color. The YIQ color model is designed to refer to the characteristics of the human's visual system. In the human's visual system, people are more sensitive to the lightness component than the hue component. So, the YIQ color model is set to separate colors into luminance (Y) and hue (I and Q). The relationship between YIQ and RGB is expressed as: [9] ------------ (1)                                 B G R Q I Y 311.0523.0212.0 321.0275.0596.0 114.0587.0299.0 The inverse transformation matrix that converts YIQ to RGB is: [10]                                 Q I Y B G R 7064.11070.11 6474.02721.01 6210.09563.01 ------------- (2) Discrete Cosine Transformation (DCT) Image transforms are very important in digital processing they allow to accomplish less with more. For example the Fourier Transform may be used to effectively compute convolutions of images or the Discrete Cosine Transform may be used to significantly decrease space occupied by images without noticeable quality loss [11]. The DCT transforms a signal or image from the spatial domain to the frequency domain. It separates the image into parts (or spectral sub-bands) of differing importance (with respect to the image visual quality ). It can separate the Image into High, Middle and Low Frequency components [5]. The Two-Dimensional (2D-DCT) The 2-D DCT is a direct extension of the 1-D case, and is given by the equation (3) ------ (3) for u,v = 0,1,2,…,N −1 and α(u) and α(v) are defined as equation (4) ----------- (4) The inverse transform is defined as equation (5)                  N vy N ux yxfvauavuc N x N y 2 )12( cos 2 )12( cos),()()(),( 1 0 1 0            0 2 0 1 )( ufor N ufor N ua IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011                N vy N ux vucvauayxf N ou N v 2 )12( cos 2 )12( cos),()()(),( 1 1 0  --------- (5) for x,y = 0,1,2,…,N −1. The 2-D basis functions can be generated by multiplying the horizontally oriented 1-D basis functions with vertically oriented set of the same functions [12]. Discrete Wavelet Transformation (DWT) Wavelet domain techniques are becoming very popular because of the developments in the wavelet stream in the recent years. Two-dimensional signals, such as images, are transformed using the two-dimensional DWT. The two-dimensional DWT operates in a similar manner, with only slight variations from the one-dimensional transform. Given a two- dimensional array of samples, the rows of the array are processed first with only one level of decomposition. This essentially divides the array into two vertical halves, with the first half storing the average coefficients, while the second vertical half stores the detail coefficients. This process is repeated again with the columns, resulting in four sub bands within the array defined by filter output. These steps result in four classes of coefficients: the (HH) coefficients represent diagonal features of the image, whereas (HL and LH) reflect vertical and horizontal information. At the coarsest level, we also keep low pass coefficients (LL). Since the discrete wavelet transform allows independent processing of the resulting components without significant perceptible interaction between them, hence it is expected to make the process of imperceptible embedding more effective [3,13]. This research applies wavelet transform by using Haar wavelet. The Haar wavelet is the simplest wavelet, the Haar wavelet mother wavelet function ψ(t) can be described as [11]         otherwise t t t 0 11 01 )( 2 1 2 1  ------------- (6) Its scaling function φ(t) can be described as      otherwise t t 0 101 )( ------------- (7) Proposed Algorithm In this section we propose an Algorithm for information hiding using DCT for covering image and DWT for hidden image. Both the sender and the receiver have Database which contained different cover images and there random embedded keys. Algorithms for hiding Procedure - For more security and complexity we start by converting the cover image from RGB to YIQ - For the Propose algorithm use the Y plan only, divided it into four equal (N×N) parts - Compute the DCT for each part of Y plan - Because we use only Y plan only we covert the hiding image to gray level - Perform DWT on the hiding image. - Extract approximation coefficients matrix HH, HL, LL, LH of the hiding image, embed each part of the coefficient into DCT cover image parts. - Embedding order process on each part depending on the generated key that been extract from the Database IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 - Apply the inverse DCT - Finish by returning to the original cover image color model; convert YIQ to RGB to form the stego image. Algorithms for Extraction Procedure - Start by Converting from RGB to YIQ - Divide the Y plan into four equal N×N parts - Compute the DCT coefficient for each part - Reorder the coefficient by using the key embedded order - Compute inverse DWT to each extraction part - Combine the four parts to have the hidden image Experimental Results We applied the proposed algorithm to many cover images with different sizes, all the cover images and there order keys are derived from database. The cover image, as shown in Fig(1-a), is converted from RGB to YIQ, the Y plan divided into four equal (N×N) parts, then computing the DCT for each part. The hidden images Fig(1- b) transform using haar discrete wavelet the four coefficients (HH, HL, LL, LH) as in Fig(1-c) are embedded into DCT coefficient of the cover by the order key (we use 32 key order numbers), convert back to RGB to derive the stego image as show in Fig(1-d). Fig(2-a,2-b,2- c,2-d) and Fig(3-a,3-b,3-c,3-d) show other cover, hidden, DWT for hidden and stego-images. The PSNR measures the quality of the image by comparing the original image or cover image with the stego-image, i.e. it measures the percentage of the stego data to the image percentage. The PSNR is used to evaluate the quality of the stego-image after embedding the secret message in the cover. The PSNR is computed using the following formulae: MSE PSNR 2 10 255 log10 dB (Decibel) ----------- (8) Where squared error (MSE) of the stego image as follows:         N j N i ijSijC NN MSE 1 2 12 )()( 1 ----------- (9) Where C(i,j) is the cover image that contains N by N p ixels and S(i,j) is the stego image. [8] The quality of stego-image should be acceptable by human eyes. The larger PSNR indicates the higher image quality i.e. there is only little difference between the cover-image and the stego-image. On the other hand, a smaller PSNR means there is huge distortion between the cover-image and the stego-image from table (1); it is observed that for all images, PSNR is greater than 50. Conclusion DCT is a widely used mechanism for frequency transformation. In this paper, we proposed an algorithm Using DCT on the cover image and DWT on hidden message. Using only Y plan the algorithm hide gray message but we can increase the amount of the hidden payload to hide color message by applying the same algorithm and using Y, I, Q p lans. This algorithm gives more security to the sent data by using an embedding key order because if Statistical tests can reveal that an image has been modified by steganography and knowing the algorithm for embedding the message they also need to know the order of IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 embedding to extract the message, we use a Database table to hold the cover and its corresponding order key so the Database will have two fields and it will be in both sides the sender and receiver, applying the algorithm to another big system if there is a server to send for more than one receiver then we need to know which cover to use for each receiver another field (the receiver id) will be added to the Database. Reference 1.Morkel,T. ; Eloff ,J.H.P.and Olivier , M.S. (2005). Annual Information Security South Africa Conference, An Overview of Image Steganography . Fifth conference, Published electronically 2. Cole, E. (2003). Hiding in plain sight Steganopraphy and the Art of Covert Communication. Wiley Publishing, Indianapolis. fax (317) 572- 4447, E-mail:permcoordinator@wiley.com 3. Fontaine, C. and Galand, F. (2009), EURASIP Journal on Information security. How Reed-Solomon Codes Can Improve Steganographic Schemes. 2009.8-17 4. Mohamed,I. ; Mohamed,I. M. ; Salah D. and Fatma,H. (2007),Ubicc Journal- special conference. Wavelet Data Hiding using Achterbahn 128 on FPGA Technology. IKE'07 5. Rafferty,C. (2005), Msc Comms Sys Theory. Steganography & Steganalysis of Images 6. Raja, K. B. ; Chowdary,C. R. ; Venugopal,K. R. and Patnaik.L. M. (2005), Intelligent Sensing and Information Processing . A Secure Steganography using LSB, DCT and Compression Techniqueson Raw Images. Third International Conference (ICISIP), 171-176 7. Chia-Chen, L.and Pei-Feng. S. (2010), Journal of Software. DCT-based Reversible Data Hiding Scheme. 5, 2 8. Bhattacharyya, S. and Sanyal,G.( 2010), Inter. J. of Electrical & Computer Data Hiding in Images in Discrete Wavelet Domain Using PM M.5, 6 9. Wen, C. and hun-Ming, C. (2004), Forensic Science Journal. Color Image Models and its Applications to Document Examination. 3:23-32 10. Buchsbaum,H. (1975), Color TV Servicing, Third edition, Prentice-Hall,Englewood Cliffs. 11. Sumbera Dr. Taylor,J. (2001), MSOE Final Project ,Wavelet Transform using Haar Wavelets. 12.Ali Khayam ,S. (2003), Michigan State University ,The Discrete Cosine Transform(DCT):Theory and Application. Seminar 13. Jonathan,B. (2001), MS. Electrical Engineering-Virginia Polytechnic Institute and State University . An FPGA-based Run-time Reconfigurable 2-D Discrete Wavelet Transform Core Table (1): The PSNR & MSE MSE PSNR Size Image 0.1557 56.207 1024 512 Landscape/Cover Kittens/Hidden 0.1659 55.932 700 300 Vegetables/ Cover Cat/ Hidden 0.2542 54.079 512 128 Skater on ice/ Cover Appetizer/ Hidden IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 Fig(1-b): Hidden image Fig(1-a) cover image Fig (1-c) DWT for Hidden image Fig (1-d) Stego- image Hidden fig IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 Fig. (2-b): Hidden image Fig. (2-a): Cover image Fig. (2-c) :DWT for the hidden images Fig. (2-d): Stego-images IBN AL- HAITHAM J. FOR PURE & APPL. SCI. VOL.24 (3) 2011 Fig. (3-b): Hidden image Fig. (3-a): Cover images Fig. (3-c): WDT for the hidden image Fig. (3-d): stego-imag 2011) 3( 24مجلة ابن الھیثم للعلوم الصرفة والتطبیقیة المجلد الىطریقة مقترحة لالخفاء استنادا تحویل الجیب تمام معامالت آمنة عبد الرزاق الصفار جامعة بغداد ،كلیة التربیة ابن الهیثم ،قسم علوم الحاسبات 2011نیسان ، ، 26: استلم البحث في یلول ، 20: في قبل البحث 2011،ا الخالصة اء باسـتخدام محــول جیـب التمـام للصــورة الغطـاء تفـي هـذه البحــث والتحویــل ) (DCTوجـد خوارزمیـة مقترحــة لالخفـ ولمزید من التعقید واالمنیة صورة الغطـاء تحـول مـن . للصورة المخفیة مع مفتاح من أجل ترتیب التضمین )(DWTالمویجي ( قسـم إلـى أربـع اجـزاء متسـاویة أسـتخدم و Y الجـزء) . YIQ(نمـوذج اللـوني إلـى اال) ازرق، اخضـر، احمـر(للـوني نمـوذج ااال NxN ( ة مـن محـول التحویـل المـویجي علـى صـورة االخفـاء . محول الجیب التمام على كل جزء طبق االجـزاء االربعـة الناتجـ علـى مفتــاح "نـاءعملیـة التضـمین تـتم ب، مـام لصـورة الغطـاءتـم تضـمینها فـي كـل جـزء مـن االجـزاء االربعـة لمحـول جیــب الت ه مـع صــورة الغطـاء فــي جــدول لقاعـدة البیانــات فـي كــال الجـانبین للمرســل والمتلقـي اظهــرت النتــائج . تسلسـلي الــذي یـتم خزنــ ـاء المعلومـات فـي صــورة الغطـاء Microsoftقاعــدة البیانـات عملتاسـت .النهائیـة ان الخوارزمیـة المقترحــة نجحـت فـي إخفـ Access 2003 عمالنامج االخفاء واالسترجاع باستبر نّفدالدارة قواعد البیانات و "امدیر MALAB 2009a. قواعد البیاناتYIQ,RGB, ،التحویل المویجي، محول الجیب تمام، اخفاء المعلومات: الكلمات المفتاحیة      N vy 2 )12(