Professional Documents
Culture Documents
DNA Cryptography: July 2015
DNA Cryptography: July 2015
DNA Cryptography: July 2015
net/publication/279978777
DNA Cryptography
CITATIONS READS
0 6,837
1 author:
Ahsan Omer
Hitec University
3 PUBLICATIONS 6 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Ahsan Omer on 11 July 2015.
Submitted By:
Ahsan Omer 14-MS-EE-015
Muhammad Imran Farooq 14-MS-EE-113
2/7/2015
Dedication
This project report is dedicated
to our Mentors and Teachers
who played very important role
in our well being
1|Page
Table of Contents
Chapters Pages
1. Introduction 3
1.1 DNA-The Lifeline 3
1.2 Steganography and Cryptography 3
1.3 DNA Cryptography 5
1.4 Why DNA Cryptography 5
2. Literature Review 6
2.1 Ancient Techniques 6
2.2 Modern Techniques 6
3. Problem Statement 10
4. Implementation 11
5. Results 14
References 17
List of Figures
Figures Pages
1.1 DNA Structure 3
1.2 Private Key Cryptography 4
1.3 Public Key Cryptography 4
2.1 Triple Helical Tile 7
2.2 DNA Layer Model 7
2.3 Encryption using Lookup Table 9
2.4 AES Encryption using DNA key 9
4.1 Encryption of Plaintext 12
4.2 Decryption of Enciphered Text 13
5.1 Matlab GUI 14
5.2 GUI Showing Input and OTP 15
5.3 Encryption of Special Characters 16
List of Tables
Table page
2.1 DNA Lookup Table 8
2|Page
Abstract: This report presents the use of DNA computing in cryptography for secure communications.
There are now several algorithms for DNA cryptography. The discussed algorithm uses One Time Pad
encryption scheme. One time pad key is obtained using DNA bases. DNA lookup table has also been
used for increasing the security of cipher text. The implementation is done on matlab and is working as
expected.
1. Introduction
1.1 DNA –The Lifeline
DNA stands for deoxyribonucleic acid. DNA shapes living organisms. It stores all the information about
the body features of any organism. It is unique for each individual. DNA is the polymer made of
monomers called deoxyribo-nucleotides. Each nucleotide is made of deoxyribose sugar, phosphate
group and nitrogenous base. Nitrogenous bases are of two types purines (adenine and guanine) and
pyrimidines (cytosine and thymine). These bases are represented as A (adenine), G (guanine), C
(cytosine) and T (thymine). A bonds with T and G bonds with C. These bases and bonding play an
important role in DNA processes like DNA computing and DNA cryptography. Bioinformatics play very
important role in DNA computing and DNA cryptography. The definition of Bioinformatics is: “The
mathematical, statistical and computing methods that aim to solve biological problems using DNA and
amino acid sequences and related information [1]”.
3|Page
secure two techniques are commonly used namely steganography and cryptography. Steganography
involves hiding the data like slicing the least significant bits of bytes of an image to store the secret data
without any noticeable change in the image. While in cryptography, various techniques have been used
to make the data unintelligible to adversaries. In cryptography a key is used for enciphering and
deciphering of data. Cryptography is further divided into two categories. Symmetric cryptography (or
private key cryptography), in which the same key is used for encryption and decryption. The other is
asymmetric cryptography (or public key cryptography), in which there are two keys. Public key is used
for encryption while private key is used for decryption. The key used for encryption is made public
because it cannot be abused easily like trapdoor function.
4|Page
1.3 DNA and Cryptography
DNA cryptography involves enciphering the plaintext using DNA computational techniques. Most of the
cryptographic algorithms involve a large memory and computations like, One Time Pad in which there
are non-repeating very large text pads, this technique will be very useful. A gram of DNA contains 10 21
DNA bases and can store 108 terabytes of memory [2]. One trillion bits of binary data can be stored in
one cubic decimeter of DNA solution [3].Moreover DNA based computations take very less time
compared to other algorithms. The task of any cryptography algorithm is to secure the data for very
large duration of time. In this technique, bases of DNA are arranged in random order and plaintext bits
can be stored successfully using these bases. As this technique employs one time pad which is perfectly
random cryptographic technique, the data can be secured for very long periods of time. In addition to
memory, DNA molecules show parallel computation, which means DNA based processes are capable of
intense processing. DNA chains have large scale of parallelism and its computing speed could reach up
to 1 billion times per second computations [3]. DNA based computers also have very less power
consumption, which is equal to one – billionth of a traditional computer [3].
5|Page
2. Literature Review
2.1 Ancient Techniques
The science of securing important messages and information from outsiders is very old. The two
methods used for data security are steganography and cryptography. Steganography was used by
Histiaeus in 5th century BC. He sent his messages by tattooing shaved head of a slave and sending him as
a carrier when the hair grew back [6]. As for the cryptographic methods of data security many ciphers
had developed like Ceaser Cipher, One Time Pad Cipher, Transposition Cipher and many more.
Ashish Gehani et al used DNA cryptography technique using one time pad. They implemented DNA
cryptography using two techniques; DNA cryptosystem using substitution and DNA cryptosystem using
XOR OTP. The latter technique has been discussed here. For XORing the message bits with OTP random
bits, the Vernam Cipher [9] has been used. Now suppose S is the sequence of R uniformly distributed
bits known as a one-time pad. Sender and the receiver have the copy of sequence S. L is the number of
bits of S that have not been used for encrypting a message. Two binary inputs give 0 if they are same,
when they are XORed and give 1 if they are different. When a plain text binary message has to be sent,
each bit has to b XORed with the bits of sequence S. If M is the message and C is the ciphered message
then Ci = Mi XOR Si where i = 1,2,…..n. After encryption the cipher text is sent. At the receiver’s end, the
same sequence S will be used to decrypt the cipher text to obtain the plain text. Cipher text C is XORed
with bit sequence of S to obtain the plain text i. e. Mi = Ci XOR Si. To implement Vernam Cipher using
DNA molecules, the following steps are required.
These operations are realized using DNA tiling implementation. In this tiling long chains of inputs and
outputs are created. DNA tiles are multi-strand complexes which have two or more double helical
domains in a way that individual oligonucleotide chains might base pair in one helix then cross over and
base pair in another helix. Complexes involving cross overs create tiles which are thermally stable.
6|Page
Figure 2.1 Triple Helical Tiles
The tiles are designed in a way that they make binary strings by assembling linearly. Two binary input
strings can be assembled linearly using special connector tiles. These tiles are assembled in a way that
output string tile can also be fit with them. These processes are carried out in the presence of special
enzymes. After this process, there exists a strand which runs through the entire assembly. This strand
contains two input strings and an output string.
Now assume that a1, a2….an and a1’, a2’…… an’ are input bits for XOR operation. The bits a1, a2…an are the
bits of plaintext whereas a1’, a2’….an’ are the bits of one time pad. The same sequence of one time pad
bits is stored at both sender and the receiver’s place. After various sequences, the input portion of the
structure came into existence. This structure has been shown in the figure below. The pair of tiles of
input assembly arranges itself in a way that a slot for single output tile is formed. When the output slot
is formed, the bits of output tile bind themselves to the appropriate sticky ends.
7|Page
The addition of ligase enzyme produces a reporter strand shown as a dotted line in the above diagram.
This reporter strand runs through the entire assembly. In this case bi = ai XOR ai’ where i =1,2….n and the
strand is R = a1a2….an.a1’a2’….an’.b1b2….bn. This strand can be extracted by first melting down the
hydrogen bonds between the tiles and then purifying by polyacrylamide gel. Now this strand contains
the plaintext, encryption key of OTP and the enciphered text. The cipher text can be extracted by using
the restriction enzyme endonuclease if the cleavage site is encoded between a0 and b1 tiles. The cipher
text may then be gel purified and stored in a compact form and sent to destination. As XOR is its own
inverse, the decryption of cipher text can be done using the bit sequence of one time pad. The only
precautionary measure in the whole procedure is that we have to check the loss of synchronization
between the message and the key which may happen by spuriously introducing or deleting a bit from
either sequence.
Naveen Jarold K. et.al [10] has implemented DNA cryptography using two approaches. In one Approach
they directly use DNA bases for encryption purposes. For this purpose they used the following lookup
table:
And hence the encryption and decryption can be done using the above table. Both sender and the
receiver should have this lookup table for encryption and decryption. The simplified diagram of their
implementation of this scheme is as follows:
8|Page
Figure 2.3 Encryption using Lookup Table
The DNA encryption starts with the message that may contain alphabets, numerals and some special
characters. These characters are changed to DNA base triplets and this encrypted message or the cipher
text is send to the receiver over a public channel. This cipher text will be the input to the decryption
process which is simply the reverse of encryption.
In the second approach, they generate DNA coded sequence from the message and use that sequence
as key to the encryption processes. The encryption process in their case is AES. The simplified diagram
for encryption and decryption of this approach is as follows:
9|Page
3. Problem Statement
There are various modern techniques of cryptography which ensures the four security attributes
namely:
i. Availability
ii. Confidentiality
iii. Integrity
iv. Authenticity
But there are memory and computational issues with these techniques. To overcome these issues, DNA
computing techniques has been developed. These techniques are very efficient as they provide huge
memory and parallel computing of DNA. Keeping in mind these facts, the project has been carried out
using DNA bases to make a cryptographic system on matlab. In this system one time pad key is extracted
from DNA bases. After XORing this key with input, a text is obtained. This text is further represented in
DNA bases format using lookup table. These “bases” representation will become the cipher text. To
break this cipher text, the eavesdropper must have access to lookup table and one time pad key which is
stored in DNA bases, which is more or less impossible. The cipher text is now secured and can securely
transmit over any channel. At the receiver side, one time pad key can be extracted using a known
sequence of DNA bases. This key along with the lookup table is used to decrypt the cipher text.
10 | P a g e
4. Implementation
Implementation of DNA cryptography using One Time Pad scheme is done on matlab. One Time Pad
cryptography has been used as it is perfectly random scheme. According to Otto Kugler, the CEO of MILS
electronics, “One Time Pad encryption is the only proven unbreakable encryption method”. The input
has been taken in the forms of alphabets, numeric or any other special character. The OTP key is also
can be any of these forms. Encryption steps are as follows:
The encrypted text consist data in the form of DNA bases and hence it makes impossible for
eavesdropping. This cipher text can be decrypted in steps (like encryption):
i. If else statements
ii. Character arrays
iii. Strings
iv. Character array indexing
v. Initialization
vi. Bit wise logical AND operator
vii. Bit wise logical OR operator
viii. Built in XOR function
ix. Vector to matrix conversions
x. Decimal to binary conversions
xi. Functions of Graphical User Interface
Using the above concepts, DNA cryptography has been successfully implemented on matlab. Figures 4.1
and 4.2 show the flow charts of various procedures, applied through coding, of encryption and
decryption respectively.
11 | P a g e
The Implemented code has the following flow chart for encryption process:
12 | P a g e
The flow chart for decryption is different from that of encryption and is represented in the following
figure:
13 | P a g e
5. Results
The implementation results are obtained both on matlab Command Window and matlab GUI. The
screenshot of Graphical User Interface of the implemented algorithm in matlab is as follows:
14 | P a g e
The screenshot which shows GUI containing input, OTP and DNA enciphered output is shown below:
15 | P a g e
The image below shows the use of special characters and their results. As it can be seen that special
characters are also encrypted and decrypted successfully.
16 | P a g e
References:
[1] Javier Resano, “A Hardware Implementation of the Smith-Waterman Algorithm for DNA
Comparison”, IEEE 2012.
[2] Radu Terec et al, “DNA Security using Symmetric and Asymmetric Cryptography”, IJNCAA (ISSN 2220-
9085), 2011
[3] Yunpeng Zhang and Liu He Bochen Fu. “Research on DNA Cryptography, Applied Cryptography and
Network Security”, Dr. Jaydip Sen (Ed.), ISBN: 978-953-51-0218-2, InTech, 2012.
[4] Zhihua Chen et el. “Efficient DNA Sticker Algorithms for DES”, IEEE 3rd international conference on
Bio-inspired computing, 2012
[6] M. Reza Najaf Torkaman et al, “Innovative Approach to Improve Hybrid Cryptography by using DNA
Steganography”, IJNCAA 2012
[8] Ashish Gehani et al, “DNA Based Cryptography”, DIMACS Series in Discrete Mathematics and
Theoretical Computer Science Volume 54, 2000
[10] Naveen Jarold K. et al, “Hardware Implementation of DNA Based Cryptography”, IEEE (Conference
of ICT), 2013
17 | P a g e
Appendix
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
18 | P a g e
% --- Outputs from this function are returned to the command line.
function varargout = SECURE_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
19 | P a g e
key = double(get(handles.edit2,'String'))
bkey=de2bi(key,8,'left-msb')
%output=bitxor(input,key)
output=xor(binput,bkey)
boutput=double(output)
%boutput=dec2bin(output,8)
%getbitoutput = bitget(output, 8:-1:1)
%input=[1 0 1 0 1 0 1 0];
%key=[0 0 0 0 1 1 1 1];
num = double(numel(boutput))
set(handles.text5,'String',boutput)
boutput=boutput'
%outputdnabases=char();
%ia=INPUT('Enter bits',alpha)
%A=00,T=01,C=10,G-11
boutput
for n=1:2:num-1
if(boutput(n)==0&&boutput(n+1)==0)
outputdnabases((n+1)/2)='A';
else if(boutput(n)==0&&boutput(n+1)==1)
outputdnabases((n+1)/2)='T';
else if(boutput(n)==1&&boutput(n+1)==0)
outputdnabases((n+1)/2)='C';
else
outputdnabases((n+1)/2)='G';
end;
end;
end;
%set(handles.text6,'String',outputdnabases)
end;
outputdnabases
%outputdnabases1=double(outputdnabases)
set(handles.text6,'String',outputdnabases)
bkey=de2bi(key,8,'left-msb')
bxor
bxor1 = vec2mat(bxor,8)
dxor=bi2de(bxor1,8)
bmsg=xor(bxor1,bkey)
20 | P a g e
%ma = vec2mat(m,8)
dmsg = bi2de(bmsg,'left-msb')
msg=char(dmsg)
set(handles.text10,'String',msg')
clear all;
21 | P a g e