Cryptography with Dynamic DNA Depending on Edge Detection

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.


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].

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.

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.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.

Encryption and Hiding
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) 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.

Experimental results
The quality of the stego image of the proposed algorithm has been tested based on MSE & PSNR [13]: 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).

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.
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] Haitham J. for Pure & Appl.Sci.Vol.31 (2) 2018 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.

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
Ibn Al-Haitham J. for Pure & Appl.Sci.Vol.31(2) 2018 https://doi.org/10.30526/31.2.1947Computer | 191