Conseguences of soil crude oil pollution on some wood properties of olive trees https://doi.org/10.30526/31.2.1947 Computer | 186 2018( عام 2)العدد ( 31)المجلد مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 Cryptography with Dynamic DNA Depending on Edge Detection Amna al-Saffar Dept. of Computer Science/ College of Education For Pure Science/ Ibn-Al- Haitham/University of Baghdad. amnaalsafar1@yahoo.com Received in :2/January/2018, Accepted in:18/January/2018 Abstract Making the data secure is more and more concerned in the communication era. This research is an attempt to make a more secured information message by using both encryption and steganography. The encryption phase is done with dynamic DNA complementary rules while DNA addition rules are done with secret key where both are based on the canny edge detection point of the cover image. The hiding phase is done after dividing the cover image into 8 blocks, the blocks that are used for hiding selected in reverse order exception the edge points. The experiments result shows that the method is reliable with high value in PSNR. Keywords: DNA encryption, steganography, edge detection https://doi.org/10.30526/31.2.1947 mailto:amnaalsafar1@yahoo.com https://doi.org/10.30526/31.2.1947 Computer | 187 2018( عام 2)العدد ( 31)لمجلد ا مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 Introduction Cryptography is all about protecting the content of the data so they can be secured from any outside attack while Steganography which mainly means ‘cover writing’ that is hidden data like (image, text…etc.) in a cover media in a way that others will be unable to detect it, while both the Cryptography and the Steganography have the exact goal but in different means. Cryptography encodes data so that no unauthorized person can specify it's meaning, Steganography is attempting to hide the suspicion of having data there [1, 2, 3, 4]. Encryption techniques can be classified into symmetric and asymmetric key encryption. In the symmetric the key is common and it can be used for both sides transmitter and receiver. In asymmetric the key is public for the transmitter side and a private key for receiver side [2, 5]. Steganography can be classified into three techniques pure, secret key and public key. There is no key used in the pure steganography. The key is exchanged in secret stego prior to communication. Both public and private keys are used in public stego technique to secure the communication [1]. Using both the Steganography and DNA cryptography is known as DNA based steganography combining the advantage of both and making the message more random and not easy to extract [6]. DNA, the genetic material (Deoxyribose Nucleic Acid) which is inside each of the living creatures and its responsible for carrying genetic traits features from the parents to their offspring, DNA contains the nucleotides (A) for Adenine, (C) for Cytosine, (G) for Guanine and last (T) for Thymine. Cryptography with DNA focuses on utilization the DNA sequences for binary data encoding. The advantage with using DNA computing, it’s much quicker comparing, less storage requirement and it doesn’t need outside power source [7, 8]. This paper presents a text information hiding algorithm using dynamic DNA rule combing with canny edge detection of the cover image for encrypting the message. The rest of this of this paper is organized as following DNA coding method is introduced in section 2, canny edge detection is introduced in section 3, the proposed algorithm and experimental result are in section 4 and 5 respectively, finally the conclusion is in section 5. DNA Coding Method and Complementary Rule Nucleotides which the DNA polymer monomers are made up, each of the nucleotide contains three more units which are phosphate group, Deoxyribose sugar, and the nitrogenous (Adenine, Cytosine, Guanine and Thymine). The inherent complementarily of the complementary DNA structure which was proposed by Watson-Crick is used in the DNA computing. With many attributes such as store large amounts of data, huge parallelism and the inherent complementarily making it convent choice for security [7, 9]. Using the four digit pairs as shown in table (1), DNA nucleotides (A, C, G, and T) can be encoded. As shown in tables (2) and (3) the addition and subtraction can be also performed by same binary rules also [8]. Table (1): 8 DNA mapping rules 1 2 3 4 5 6 7 8 A 00 00 00 01 10 10 11 11 T 11 11 11 10 01 01 00 00 G 01 10 10 11 00 11 01 10 C 10 01 01 00 11 00 10 01 Table (2): addition operation rule 5 + A G C T A C T A G G T A G C C A G C T T G C T A https://doi.org/10.30526/31.2.1947 https://doi.org/10.30526/31.2.1947 Computer | 188 2018( عام 2)العدد ( 31)لمجلد ا مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 Table (3): subtraction operation rule 3 Canny Edge Detection The edge detection goal generally is reducing the amount of data of the image. Edge is the basic feature of an image. While maintaining the structural properties to be used for more image processing. Edge detection is an essential tool for the image segmentation, benefiting from the change of grey tone to generate the edge image [10, 11]. The canny edge is developed in 1986 by John F. Canny and until now it’s used and Known as one of the standard algorithms in edge detection with good SNR and edge localizations performance and it is still used in many researches [11, 12]. Canny steps shown in figure (1) can be summarized: [11, 12] 1. Smooth the image to remove the noise. 2. Find gradients, compute gradient magnitude by mark where the gradients of the image have large magnitudes 3. Non-max. suppression should be applied to thin edges. 4. Based on the histogram of the gradient magnitude low and high thresholds compute. 5. Perform hysteresis threshold. Figure (1): Canny algorithm Proposed Algorithm In this proposed algorithm first encrypt the message using (DNA sequences rules and the key for adding process) are both generated dynamically depending on the edge detection points that are produced from Canny algorithm, hide the encrypted text in one after another of the eight of the cover image blocks in reverse order except the edge points. The proposed work is shown in algorithm 4.1 and 4.2 and figures (2 and 3) for encryption-hiding and extracting respectively. Encryption and Hiding Input: cover image, plain message Output: cover image with the cipher message Step 1: Apply canny algorithm Step 2: X= the edge pints of the cover image using canny algorithm Step 3: Generate the key of selected rule (k1) K1(i)= Xi mode 9 where i=[1.. length of the plain text*4] - A G C T A C B A G G T C G A C A G C T T G C T A https://doi.org/10.30526/31.2.1947 https://doi.org/10.30526/31.2.1947 Computer | 189 2018( عام 2)العدد ( 31)لمجلد ا مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 Each two bits in plain text are encrypted in different rule Step 4: Encrypte the plain text by using DNA table (1) with selecting rule depending on k1 Step 5: Generate the key for DNA adding process (k2) where K2(i)= MSBi where i=[1..16] of the first pints in X matrix. Step 6: Adding the result of step 3 with the key k2 depending on k1. Step 7: Divide the cover image into 8 blocks, the sequence of selecting the block will be in reverse order. Step 8: Embedding each bit of the encrypted message in one of the block of the cover image. Extracting and Decryption Input: stego image Output: cover image, plain message Step 1:Apply canny algorithm Step 2: Y= edge points of the stego image. Step 3: Generate the key of selected rule (k1) K1(i)= Xi mode 9 where i=[1.. length of the plain text]. Step 4: Generate the key for DNA subtraction process (k2) where K2(i)= MSBi where i=[1..16] of the first 16 pints in Y matrix. Step 5: Divided the cover image into 8 blocks. Step 6: PM= extract bits of the encrypted message from blocks of the stego image. Step 7: Apply DNA subtract process to the PM with k2 depending on k1. Step 8: Convert the result DNA rules depending on k1. Step 9: Convert the result to binary then ASCII form to obtain the letters of the hide plain text. Figure (2): Embedding algorithm Input cover image Apply canny algorithm Generate: K1 for selection DNA K2 for adding DNA Dividing the cover image into 8 blocks for embedding in reverse order Stego image Input Secret message Encrypted depending dynamic DNA by using K1 & K2 Embedding the encrypted text in cover block https://doi.org/10.30526/31.2.1947 https://doi.org/10.30526/31.2.1947 Computer | 190 2018( عام 2)العدد ( 31)لمجلد ا مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 Figure (3): Extract algorithm Experimental results The quality of the stego image of the proposed algorithm has been tested based on MSE & PSNR [13]: 𝑀𝑆𝐸 = 1 𝑁 ∑(𝐼𝑊 − 𝐼) 2 𝑁 𝑗−0 − − − − − − − (1) 𝑃𝑆𝑁𝑅(𝑑𝐵) = 10 log10 (255)2 𝑀𝑆𝐸 − − − − − −(2 ) The message that is used is 256 characters long and was embedded in several cover images chosen from a database for researches images, (http://www.imageprocessingplace.com/root_files_V3/image_databases.htm), the MSE and the PSNR for each are shown in table (4). Table (4): MSE and PSNR Values Image MSE PSNR House 0.0014 76.6420 Lenna 76.5490 00.0014 Peppers 77.1048 0.0013 Plain text Stego image Canny edge algorithm Divide the covert to 8 blocks Extract bits of the encrypted text from the blocks Decrypted the extract bits with k1 & k2 Generate k1 & k2 for selecting rule and subtraction process respectively Convert binary to Ascii https://doi.org/10.30526/31.2.1947 http://www.imageprocessingplace.com/root_files_V3/image_databases.htm https://doi.org/10.30526/31.2.1947 Computer | 191 2018( عام 2)العدد ( 31)لمجلد ا مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 a b Figure (4): a- COL1. Cover image and b- COL2.Coverimage after applying Canny alyor Conclusion In this paper, a dynamic DNA substitute based on canny edge detection of the cover image is used. It includes DNA adding process with generated key based on the edge points to increase the efficiency of encryption and the difficulty of decoding, then hiding the encrypted in the eight blocks of the cover image. The selection of block will be in reverse order and the edge points are avoided. The stego image has high PSNR and low MSE and extracted secret message is perceptually similar to the original one. References 1. Sumathi, C.P; Santanam,T. and Umamaheswari ,G. (2013) “A Study of Various Steganographic Techniques Used for Information Hiding”, International Journal of Computer Science and Engineering Survey (IJCSES) 4,6, December. 2. Hariram,S and Dhamodharan, R. (2015) “ A Survey on DNA Based Cryptography using Differential Encryption and Decryption Algorithm”, IOSR Journal of https://doi.org/10.30526/31.2.1947 https://doi.org/10.30526/31.2.1947 Computer | 192 2018( عام 2)العدد ( 31)لمجلد ا مجلة إبن الهيثم للعلوم الصرفة و التطبيقية Ibn Al-Haitham J. for Pure & Appl. Sci. Vol.31 (2) 2018 Electronics and Communication Engineering (IOSR-JECE) e-ISSN: 2278-2834,p- ISSN: 2278-8735. 10, 5, II,. 14-18 Sep. - Oct .. 3 .Manoj Kumar Sharma; Amit Upadhyaya and Shalini Agarwal,(2013)" AdaptiveSteganographic Algorithm using Cryptographic Encryption RSA Algorithms ", Journal of Engineering, Computers and Applied Sciences , . 4. Ban AhmedMitras and Adeeba Kh.Aboo," (2012) Proposed Steganography Approach Using Dna Properties", (2013) 14, 1. ©. JITBM and Arf. 5.Shivangi Goyal, “ A Survey on the Applications of Cryptography”, International Journal of Science and Technology 1, 3, IJST, March,( 2012). 6. Mumthas, S. and Lijiya, A. (2015) “A Review on Dna based Encryption and Steganography”, International Journal of Science and Research (IJSR) ISSN (Online): 2319-7064 Index Copernicus (2015): 78.96 | Impact Factor 6.391. 7. Anchal Jain, Pooja Agarwal, Rashi Jain and Vyomesh Singh, (2014) “ Chaotic Image Encryption Technique using S-box based on Dna Approach”, International Journal of Computer Applications (0975 – 8887) 92 –13, April . 8. Shikha Jaryal, “ Comparative Analysis of Various İmage Encryption Techniques”, International Journal of Computational Intelligence Research ISSN 0973-1873, 13, 2, 273-284,2017. 9. Mazhar Karimi and Waleej Haider,( 2017)”Cryptography using DNA Nucleotides”, International Journal of Computer Applications (0975 – 8887) 168 ,7, June. 10. Bin, Li and Mehdi Samiei yeganeh,( 2012) “Comparison for Image Edge Detection Algorithms”, IOSR Journal of Computer Engineering (IOSRJCE) ISSN: 2278-0661 , 2, 6,. 01-04, July-Aug.. 11. Muthukrishnan R. and Radha,M. ,”( 2011). Edge Detection Techniques For Image Segmentation”, International Journal of Computer Science & Information Technology (IJCSIT) , 6, Dec 12.“Canny Edge Detection”, 09gr820, March ,2009. 13 Poobathy.D. and Chezian, R. (2014) “Edge Detection Operators: Peak Signal to Noise Ratio Based Comparison, I.J. Image, Graph. Signal …, no. September, 55–61, https://doi.org/10.30526/31.2.1947