You are on page 1of 4

A DNA-based chaos algorithm for an efficient

image encryption application


Augustin Ousmanou Ahgue Jean De Dieu Nkapkop Joseph Yves Effa
Department of Physics Department of Physics Department of Physics
University of Ngaoundéré University of Ngaoundéré University of Ngaoundéré
Ngaoundéré, Cameroon Ngaoundere, Cameroon Ngaoundere, Cameroon
ahgueaugustin@gmail.com jdd.nkapkop@gmail.com yveseffa@gmail.com
Samuel Franz Pierre Adelis Monica Borda
Department of Electronics Department of Electronics Department of Communications
ENSEIRB MATMECA of Bordeaux ENSEIRB MATMECA of Bordeaux Technical University of Cluj-Napoca
Bordeaux, France Bordeaux, France Cluj-Napoca, Romania
sfranz@enseirb-matmeca.fr apierre004@enseirb-matmeca.fr Monica.Borda@com.utcluj.ro

Abstract—Nowadays, one of the important interests in the properties of chaotic sequences with the high storage power
design of algorithms is their use in applications requiring real of DNA sequences, to encrypt images [6].
time processing. In that regard, this paper aims to present the
design of an image cryptosystem based on the combination of This paper takes part in this context of research to
chaotic and DNA sequences, and demonstrates its capacities propose a new symmetrical image encryption algorithm
and implementation through the development of a Graphical based on the combination of DNA and chaotic sequences.
User Interface (GUI) realized under the Qt environment. To Furthermore, a demonstration software is presented to
fulfill the image security and real-time requirements of today’s display its implementation in C++ language under the Qt
world, the proposed cryptosystem is symmetrical and relies on environment. The Peace Wise Linear Chaotic Map
a secret key resulting from the combination of the remarkable (PWLCM) is the chaotic system chosen to generate chaotic
properties of the chaos generators, with the merits of the sequences. An S-box strategy is used to generate indexes
storage space of the DNA sequences, to encrypt an image. The from integers, chosen randomly for each pixel of the image
developed software is a didactic tool that allows the user to that is to be encrypted, to constitute the encrypted image. The
configure the parameters that determine the generation of the rest of the paper contains in Section II an overview of the
secret key, and also to encrypt and decrypt a chosen image and DNA-based chaos image encryption algorithm. In Section
observe the associated statistical data. The experimental results III, the presentation of the developed Qt application and its
obtained through the developed software testify first, of the
results in term of performance are successively given.
simplicity of implementation of the proposed DNA-based chaos
Finally, conclusion is made in the last Section.
encryption scheme in real applications. It also enables the user
to appreciate the performances of the algorithm in comparison
to other existing algorithms in the dedicated literature, through II. DEVELOPED DNA-BASED CHAOS IMAGE CRYPTOSYTEM
clear and simple statistical illustrations that display a real In this section are described the basic concepts that our
prospect for a real-time secured image transfer over the
encryption method is based on. More precisely, DNA
Internet.
sequences, the PWLCM system, and the global structure of
Keywords—DNA sequences, chaotic maps, image encryption, the algorithm will be explained.
encryption application, secure encryption.
A. DNA sequences
I. INTRODUCTION DNA is long polymer of deoxyribonucleotides carrying
the genetic instructions of a living entity. A DNA sequence is
Nowadays, securing image data has become a major issue composed of four different nucleic acid bases, i.e. A
in a high-speed internet world where numeric data trades are (adenine), T (thymine), C (cytosine) and G (guanine), where
everywhere. It has become mandatory to cipher messages A and T are complementary, as well as G and C. In image
before sending them over the air to ensure confidentiality. In cryptography, this complementarity can be translated into
that matter, many software and encryption algorithms have binary complementarity satisfying the Watson-Crick rule
been studied in recent decades, based on both symmetrical [10], to create DNA sequences from digital sequences
and asymmetrical methods. Symmetrical encryption being according to the eight choice rules presented in Table 1.
1000 times faster, it is the method of choice to meet real-time
application requirements. In the proposed encryption strategy, the choice of a DNA
encoding rule among the eight available combinations
Among symmetrical encryption methods, those based on represents a part of the secret key of the cryptosystem.
chaos are preferred because they offer a good compromise
between high-speed and high security through wide specter
of pseudo-random numerical sequences, usually aperiodic TABLE I. EIGHT ENCODING RULES FOR DNA SEQUENCES.
and highly sensitive to initial parameters. As a result, several Rules
DNA
chaos-based image cryptosystems have already been Sequences 1 2 3 4 5 6 7 8
proposed in the literature [1-8]. However, with the ever-
A 00 00 01 01 10 10 11 11
increasing power of computers, some of these solutions were T 11 11 10 10 01 01 00 00
proven unsatisfactory [9]. In order to tackle this issue and to C 01 10 00 11 00 11 01 10
propose systems that stay robust over the years, several G 10 01 11 00 11 00 10 01
researchers have suggested to combine the remarkable

978-1-5386-5925-0/18/$31.00 ©2018 IEEE


B. The PWLCM System 2) Step 2: Mask the entire pixel values of P using a
To generate an unbreakable encryption key, our bitwise exclusive-OR diffusion scheme (D) given in (2).
algorithm uses a chaotic system that is very sensitive to the
initial parameters, the PWLCM system, defined by (1): ­ d1 p1 † pn
D : ® , t  ^1, 2,3,..., n  1` (2)
¯d t 1 pt † d t
­ 1
° x(n  1) u O , if 0 d x(n  1) O 3) Step 3: Generate a random floating numbers sequence
° (1)
° 1
x ( n) F > x(n  1) @ ®> x (n  1)  O @ u , if O d x(n  1) 0.5 by iterating N times in the PWLCM (1), and choosing the
0.5  O
° initial parameters x0 and λ so that the system is chaotic.
° F >1  x(n  1) @ , if 0.5 d x(n  1) 1
°
¯
4) Step 4: Convert the random floating number sequence
into integers falling into the interval [0;255] to avoid the
The PWLCM system provides strong sensitivity, cyclic digitization of chaotic numbers in the generation of
ergodicity and randomness when its control parameter λ is the substitution key and then achieve high speed and
chosen within the interval ]0;0.5[ and its initial condition x0 security performances. The resulting sequence is of size N
is chosen within ]0;1[ [1]. Thus, it suits well the role of and is noted y.
generator of random sequences of floating numbers, which 5) Step 5: Convert each integer value contained in y into
once transformed into integers, can be used to create a
an 8-bit binary sequence.
robust DNA-based secret key.
6) Step 6: Use one of the encoding rules shown in Table
C. OTP Key 1 to convert each 8-bit binary values generated at step 5,
into a 4-letter DNA sequence.
The encryption scheme proposed in this paper relies on a
7) Step 7: Generate the OTP key by concatenating all
secret key generated from a random sequence of number as
described above, following the One-Time Pad (OTP) the 4-letter DNA sequences generated at step 6, into one
method. OTP in cryptography is an encryption technique that vector of length 4N.
must meet three conditions in order to be unbreakable [11]. It 8) Step 8: Convert into 8-bit binary sequences each
requires the use of a pre-shared key that must be at least as integer value between [0;255] and use the method in step 6
long as the message to be ciphered (here the message is the to generate the corresponding 4-letter DNA sequences, and
random integer sequence), this key must be used only once to thus translating all the possible pixel values into DNA
encrypt a message (therefore the initial parameters of the sequences.
random number sequence must constantly change), and 9) Step 9: Associate to each previously generated DNA
finally, it must feature random sequences. sequence, a vector of indexes corresponding to their
occurrence in the OTP key. Concatenate all these vectors
D. The Proposed Encryption Scheme into one vector (see index box in Fig. 2) while saving their
The encryption algorithm consists of two stages: position in the final vector into a matrix (see lower bound
diffusion of the pixels of the entire image, and their and upper bound in index coordinates box in Fig. 2).
substitution as shown in Fig. 1 bellow. 10) Step 10: For each masked pixel in the diffused
Diffusion Substitution image D, randomly choose an index in the interval of the
index box that corresponds to its value (see index coordinate
2-D Plain Image (I) PWLCM DNA encoding rules
box in Fig. 2). Doing so, each pixel of the masked image is
associated to a pseudo-random index of apparition in the
OTP DNA keys
1-D Plain Image (P) OTP key, and consequently the image is encrypted in the
form of an index vector/matrix (see C in Fig. 2). As a result,
DNA keys S-Box
Diffusion scheme (D)

Substitution: C = f(D, S-Box)

1-D Encrypted Image (C)

2-D Encrypted Image (E)

Fig. 1. Synoptic of the proposed scheme for encryption process.

The proposed algorithm provides three security levels


i.e., arithmetic operation (XOR operation), biological process
(DNA complementary rule), and OTP (randomly generated
secret key). Below are listed the steps to follow in order to
encrypt an image in the proposed scheme:
1) Step 1: Assume that an 8-bit grayscale image I is of
size H×W, and each pixel value of I(i,j) falls into the integer
interval [0;255], i =1, 2, ..., H, j =1, 2,..., W. Reshape I into
a vector named P, of size n =H×W, P={p1, p2,…, pn}. Fig. 2. Flowchart of encryption process.
the longer the key is, the more indexes are available to pick into integers; A = 0 and C = 1 as encoding rules for the DNA
randomly, making the decryption nearly impossible. sequences (Then T = 3 and G = 2 due to the complementarity
Regarding the decryption process, it is a simple reverse rule). Note that the encoding rules are displayed as decimals
process of the proposed DNA-based chaos encryption but interpreted as binaries. The encryption key will be
algorithm, no more details here. displayed the same way in the GUI as will be described
further in the paper.
The proposed diffusion-permutation architecture allows
to first uniformize the histogram of the original image
through the diffusion so that the S-BOX can be exploited to B. GUI design Based on the Proposed Cryptosystem
its maximum capacity in the permutation process. Fig. 3 shows software after installation. As shown in this
figure, the user has access to all the different steps of the
III. RESULTS AND DISCUSSIONS encryption, to perform them one by one. The parameters are
fully configurable by clicking on the dedicated push-button.
A. Software and Hardware Specifications During the configuration, the user is guided by informative
pop-up windows displaying default variables and boundaries
The developed algorithm presented in the above section to stay within chaotic state when generating the key. The
was first implemented on MATLAB, but under this software also automatically guarantees the complementarity
environment, speed performance is unrealistic for real-time rule of the DNA nucleotides. There are also dedicated scroll
applications. Thus, the algorithm had to be re-implemented areas to display the OTP key and the S-BOX if the user
in C++ to gain speed. The problem in C++ is that default wants to. In fact, the user might want to compute them with
libraries do not provide good tools to handle image or without displaying them because the computation is
processing. In that matter, the whole code has been realized instantaneous but displaying long strings might take a long
under Qt, which is a complete IDE (Integrated Development time if the encryption key is long. Usually, a key generated
Environment) that provide full image processing libraries from 1000 chaotic iterations is enough to encrypt any
and an integrated custom GUI (Graphical User Interface) grayscale image. In case the user wants to display these data,
maker. The goal was to make a user-friendly application that there is also the possibility to open a larger view for a more
guide the user through the configuration of all the different comfortable reading and better understanding.
encryption parameters with the help of visual dialog prompts
and graphical views. This didactic tool was made to help the When all the steps are performed, the window looks like
user understand the steps of the encryption scheme, and the one in Fig. 4. Here, the user can understand the
appreciate its performances through statistical data provided processing through visual representations of the image at the
graphically in the application in the form of histograms and different steps of the encryption, as well as the execution
correlation coefficients. The reader and user should also keep times for each step and statistical data such as correlation
in mind that this is demonstration software that is at its first coefficients and histograms that can be displayed or hidden
stage of development, for now it is limited to the processing at will. From the analysis of this figure, it appears first of all
of grayscale images and its performances could be improved that the proposed algorithm is reversible because the
in the future. designed application allows the user to encrypt and decrypt
an image. Moreover, the strong correlation between adjacent
All the tests in the following sections were realized on the pixels in the original image is greatly reduced in the
well-known image of Lena in resolution 512×512 on a encrypted image produced by the proposed DNA-based
windows 10 machine running an i5 processor on 8 Go of chaos encryption scheme. Results are much better than those
RAM. However, all types of images of any size can also be obtained by other researchers [2-8] as shown in the
used. Encryption and decryption were performed using the comparison table in Table 2. Finally, it is clear from Fig. 4
following default secret key parameters: N=1000, the number that the histogram of the encrypted image is uniform and
of iterations of the PWLCM system; p=0.4, its control significantly different from the one of the original image and
parameter; x1=0.1, its initial value; q=1, the offset parameter hence does not provide any clue to employ statistical attack.
which determines how the floating numbers are converted

Fig.3. The software welcome interface.


Fig.4. DNA-based chaos image algorithm application results.

chaotic iterations. Nevertheless, iterating more than 1000


C. Performances times allows better decorrelation of the pixels, but to the
The proposed image encryption scheme display good detriment of decryption speed. However, this could be useful
performances in term of execution time and statistical data as in domains like the military where the robustness of top-
shown in Table 2. Therefore, it is ready for real-time image secret data is privileged at their encryption speed.
transfer if the chosen key is generated with 1000

TABLE II. EFFICIENCY ANALYSIS AND COMPARISON OF THE CORRELATION COEFFICIENTS

IV. CONCLUSION REFERENCES


This paper presents a new symmetrical encryption [1] M. Seyedzadeh, and S. Mirzakuchaki, “A fast color image encryption
algorithm based on coupled two-dimensional piecewise chaotic map,”
method that is very versatile in term of functionality. Indeed, Signal processing, vol. 99, pp. 1202–1215, 2012.
it features a highly sensitive OTP generated encryption key [2] X. Chai, Y. Chen, and L. Broyde, “A novel chaos-based image
based on PWLCM chaotic equations and DNA encoding encryption algorithm using DNA sequence operations,” Optics and
rules to ensure strong security and guarantee a large key Lasers in Engineering, vol. 88, pp. 197–213, 2017.
spectrum to avoid redundancy in ciphering. This key is then [3] X.-Y. Wang, Y.-Q. Zhang and X.-M. Baom, “A novel chaotic image
used to generate the global encryption/decryption key that is encryption scheme using DNA sequence operations,” Optics and
Lasers in Engineering, vol. 73, pp. 53–61, 2015.
the S-BOX, which transforms grayscales of the image into
[4] C. Song, and Y. Qiao, “A novel image encryption algorithm based on
occurrence indexes in a pseudo-random way amongst the DNA encoding and spatiotemporal chaos,” Entropy, vol. 17, pp.
available indexes present inside the S-BOX. For real-time 6954–6968, 2015.
image transfers, a 4000 DNA-character long (generated [5] P. Zhen, G. Zhao, L. Min, and X. Jin, “Chaos-based image encryption
from 1000 PWLCM iterations) is more than sufficient and scheme combining DNA coding and entropy,” Multimed Tools Appl,
vol. 75, pp. 6303–6319, 2016.
already very robust, thanks to the different layers of security
introduced by initial PWLCM parameters, DNA-encoding, [6] H. Liu, X. Wang, and A. Kadir, “Image encryption using DNA
complementary rule and chaotic maps,” Applied Soft Computing, vol.
and diffusion. Moreover, even though the performances 12, pp. 1457–1466, 2012.
shown in the implemented software are very promising, this [7] A. Rehman, X. Liao, M. Hahsmi, and R. Haider, “An efficient mixed
implementation is merely a first stage to a future eventual inter-intra pixels substitution at 2bits-level for image encryption
multi-threaded code structure that could perform even faster. technique using DNA and Chaos,” Optik, vol. 153, pp. 117-134, 2018.
Furthermore, this user-friendly software is mostly [8] T. Hu, Y. Liu, L.-H. Gong, and C.-J. Ouyang, “An image encryption
scheme combining chaos with cycle operation for DNA sequences,”
educational for now, but by implementing a DNA-based Nonlinear Dynamic, vol. 87, pp. 51–66, 2017.
diffusion method that the team is actually developing, and [9] P. Jagadeesh, P. Nagabhushan, and R. Kumar, “A new image
enabling encryption/decryption of RGB images in future scrambling scheme through chaotic permutation and geometric grid
versions, this algorithm might prove itself very useful in the based noise induction,” International Journal of Computer
domain of image cryptography. Application, vol. 78, pp. 38–45, 2013.
[10] J. D. Watson, and F. Crick, “A structure for deoxyribose nucleic
acid,” Nature, vol. 171, pp. 737–738, 1953.
[11] C. Shannon, “Communication theory of secrecy systems,” Bell
System Technical Journal, vol. 28, pp. 656–715, 1949.

You might also like