Binary search tree image encryption with DNA

Binary search tree image encryption with DNA

Journal Pre-proof Binary Search Tree Image encryption with DNA Hossein Nematzadeh, Rasul Enayatifar, Mehdi Yadollahi, Malrey Lee, Gisung Jeong PII: ...

1MB Sizes 1 Downloads 112 Views

Journal Pre-proof Binary Search Tree Image encryption with DNA Hossein Nematzadeh, Rasul Enayatifar, Mehdi Yadollahi, Malrey Lee, Gisung Jeong

PII:

S0030-4026(19)31403-2

DOI:

https://doi.org/10.1016/j.ijleo.2019.163505

Reference:

IJLEO 163505

To appear in:

Optik

Received Date:

20 May 2019

Revised Date:

10 September 2019

Accepted Date:

1 October 2019

Please cite this article as: Nematzadeh H, Enayatifar R, Yadollahi M, Lee M, Jeong G, Binary Search Tree Image encryption with DNA, Optik (2019), doi: https://doi.org/10.1016/j.ijleo.2019.163505

This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of record. This version will undergo additional copyediting, typesetting and review before it is published in its final form, but we are providing this version to give early visibility of the article. Please note that, during the production process, errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. © 2019 Published by Elsevier.

Binary Search Tree Image encryption with DNA Hossein Nematzadeh 1, Rasul Enayatifar2,*, Mehdi Yadollahi 3, Malrey Lee 4,* , Gisung Jeong 5,* 1 Department of Computer Engineering, Sari Branch, Islamic Azad University, Sari, Iran 2 Department of Computer Engineering, Firoozkooh Branch, Islamic Azad University, Firoozkooh, Iran 3 Department of Computer Engineering, Amol Branch, Islamic Azad University, Amol, Iran 4 The Research Center for Advanced Image and Information Technology, School of Electronics and Information Engineering, ChonBuk National University, JeonJu, ChonBuk 561-756, Republic of Korea 5Department of Fire Service Administration, WonKwang University, Republic of Korea

ro

of

Abstract - Symmetric image encryption methods allow users to encrypt the image and hide it from others. Only those that possess the private key can decrypt the data in order to view the content. This paper proposed a new symmetric image encryption method using the concepts of Deoxyribonucleic Acid (DNA) sequence and Binary Search Tree (BST). The method initiates by generating the secret key. Next, the number of nodes in candidate BST is determined deterministically prior to create the candidate BST. Then, the plain image and the relevant candidate BST are converted to the relevant DNA sequences. Afterwards, the proposed method proceeds by superimposing DNA-BST over the DNA image in order to apply XOR function. Finally, the DNA image is converted to the cipher image. The experimental results approve the robustness of the proposed method against well-known attacks. Keywords: Image encryption, binary search tree (BST), Deoxyribonucleic Acid (DNA), logistic map

Introduction

coding rules for DNA. Then, BST of DNA keys is created. Each time the root of the BST is assigned randomly to one of the pixels of the DNA image and the rest of the BST nodes are assigned to the DNA image accordingly with the root. This process continuous until all of the DNA image pixels are at least covered with BST nodes once for encryption process. The DNA image pixels and their related BST nodes form the cipher image. The rest of paper is organized as follows. The chaotic map, DNA sequence, and BST are described in Section 2. Section 3 is dedicated to introduce the proposed method. The experimental results and security analysis are provided in Section 4. The conclusions are discussed in the last section.

Jo

ur na

lP

re

Symmetric and asymmetric image encryption algorithms are two main approaches for image encryption [1, 2]. Symmetrical algorithms use a shared cryptographic key for both encryption and decryption of plain and cipher image respectively [3, 4]. In contrast, asymmetric algorithm uses public and private keys to encrypt and decrypt the image. Based on the literature, the preliminary encryption algorithms such as AES, DES, IDEA, and RSA, fail proper encryption [5]. To strengthen preliminary algorithms, methods have used confusion and diffusion recently [6]. Moreover, chaos based algorithms have also been proposed for high secure image encryption [7-12]. The process of symmetric image encryption involves two major steps, namely permutation and diffusion [13]. In permutation, the pixels of the plain image are reallocated with a chaos algorithm without changing the pixels’ grey level. However, in diffusion step, the grey level of each pixel should change using the sequence of a chaotic map. The most recent approach in image encryption is application of DNA in image encryption [6, 14-18]. Generally, these methods encode the plain image with DNA rules to generate the DNA image [18]. Then, the DNA keys for each pixel should be generated. Finally, the DNA image and the DNA keys form the cipher image. Many of the researches exploit evolutionary algorithms to cipher the plain image [5, 19-21]. GA and ICA have been used to encrypt the plain image. This research tries to propose a novel hybrid method which combines the power of DNA and the randomness of Binary Search Tree (BST) which creates more accurate encryption method. To do so, first the plain image is converted to the DNA image using binary

-p

1.

2.

Preliminaries

The basic fundamentals regarding the proposed method have been provided in the following. 2.1. Chaotic Map One of the most well-known chaotic map functions is logistic map function which has been shown in Eq.1 in which 𝑅 = 3.99. Logistic map function generates a series of numbers in [0,1] according to its initial value [19]. 𝑥𝑛+1 = 𝑅𝑥𝑛 (1 − 𝑥𝑛 )

(1)

2.2. DNA Sequence Deoxyribonucleic acid, DNA, is the source of inheritance in almost any organism. DNA is the aggregation of four

chemical bases namely: adenine (A), guanine (G), cytosine (C), and thymine (T) [19]. In addition, DNA is composed of two chains in which chemical bases pair up with each other so that A pairs with T and C pairs with G based on Watson-Crick base pairing rule. Scientifically speaking, A and T are complementary like C and G. In the binary system 0 and 1 are complementary. Thus, 00 and 11 are complementary accordingly. Likewise, 01 and 10 are complementary. Binary coding rules for DNA sequences is shown in Table 1 [14]. ). Moreover, Table 2 shows how XOR operates in DNA sequences which are exploited in this research.

C

G

A T C G

A T C G

T A G C

C G A T

G C T A

2.3. Binary Search Tree



All the keys in left sub-tree are less than the key in the root. All the keys in right sub-tree are greater than the key in the root. Left and right sub-trees are BSTs.

Jo



ur na

BST is a non-empty tree data structure which incorporates finite number of nodes. Each node inside the tree has a unique key [22]. Unlike ordinary Binary Trees (BTs), BSTs allow fast lookup, addition and deletion of the keys. Generally, any BST has three specifications [23]: 

ro

Step 1) Secret key generation:

re

T

The proposed method consists of the following steps for superimposing the candidate BST on the plain image.

In this research a 128-bit key of random characters is used to ensure the security of proposed method against attacks as in Eq.2:

lP

A

Proposed Method

-p

3.

Table 2. Truth table for XOR operator for DNA sequences XOR

Generally, the proposed method converts the gray level of the plain image to DNA sequences using rules in Table 1 to form a DNA image. Likewise, the keys in BST which have been generated using logistic map function is also converted to the related DNA sequence. Finally, the DNA image and the DNABST construct the cipher image using Table 2. This is done by superimposing DNA-BST on DNA image iteratively until all pixels of DNA image are at least covered with BST nodes once for applying XOR operations.

of

Table 1. Binary coding rules for DNA sequences A T C G Rule 1 00 11 10 01 Rule 2 00 11 01 10 Rule 3 11 00 10 01 Rule 4 11 00 01 10 Rule 5 10 01 00 11 Rule 6 01 10 00 11 Rule 7 10 01 11 00 Rule 8 01 10 11 00

Fig.1. Five BSTs derived from a three node BT

The order of adding keys has direct impact in depth and general view of BSTs. Generally, a BST with three nodes could have five unique views against BT which has only one unique view for any order of addition of keys as shown in Fig.1. This characteristic of BST is exploited in the proposed method so that each node of BST is a key which has been generated using a logistic map function. The BST is repeatedly superimposed over the DNA image pixels until all of the DNA image pixels are at least covered with BST nodes once.

𝐾𝐸𝑌 = [𝐾0 , 𝐾1 , 𝐾2 , … , 𝐾15 ] (2) in which 𝐾𝑖 is an 8-bit character to generate 𝑥0 as in Eq.3: ( 𝐾0 ⨁𝐾1 ⨁ … ⨁𝐾7 ) ∑15 𝑖=8 𝐾𝑖 + ) ⁄2 (3) 8 2 264 Finally, 𝑥0 in Eq. 3 will be used to generate the logistic map series as mentioned in Eq.1. 𝑥0 = (

Step 2) Determining depth of candidate BST The maximum depth of BST is limited to the number of rows in plain image. Moreover, the number of candidate BST nodes (𝑁) is calculated using Eq. 4. Obviously, the depth and view of BST may vary in each run of the proposed method. 𝑁 = 𝑅𝑜𝑢𝑛𝑑 (𝑥0 × 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑙𝑎𝑖𝑛 𝑖𝑚𝑎𝑔𝑒 𝑟𝑜𝑤𝑠)

(4)

Step3) Creating candidate BST Initially, the candidate BST tree with 𝑁 number of nodes should be created. Each node of BST is a value in [0,255] generated using logistic map function starting from 𝑥1 to 𝑥𝑛 as shown in Eq.5 in which 𝑥1 is calculated using 𝑥0 . In

addition, the main procedure of generating candidate BST nodes is shown in Table.3. 𝐵𝑆𝑇𝑛𝑜𝑑𝑒𝑠 = 𝑅𝑜𝑢𝑛𝑑 (𝑥𝑖 × 255),

𝑖 = 1…𝑛

(5)

Step 4) Plain image-BST to DNA conversion

In this step 𝐷𝑁𝐴_𝐵𝑆𝑇 should be superimposed on 𝐷𝑁𝐴_𝐼𝑚𝑔 for applying XOR function using Table 2.

ur na

ro -p re

lP

Table.3 Procedure of generating candidate BST nodes INPUT : N , 𝑥0 OUTPUT : BST 01. BST ← NULL 02. R ← 3.99 03. FOR i ← 1 TO N 04. 𝑥𝑖 ← 𝑅 × 𝑥𝑖−1 × (1 − 𝑥𝑖−1 ) 05. Num ← Round (𝑥𝑖 ×255) 06. IF i = 1 THEN 07. BST.root ← Num 08. ELSE 09. BST ← first node. 10. WHILE BST.root ≠ NULL DO 11. IF Num < BST.root THEN 12. BST← BST.left 13. ELSE 14. BST← BST.right 15. END IF 16. END WHILE 17. BST.root ← Num 18. END IF 19. END FOR 20. Return BST

Step 5) Superimposing procedure

of

In this step, both the plain image and the candidate BST should be converted to the relevant DNAs called 𝐷𝑁𝐴_𝐼𝑚𝑔 and 𝐷𝑁𝐴_𝐵𝑆𝑇 respectively. Regarding 𝐷𝑁𝐴_𝐵𝑆𝑇 , the candidate BST nodes should be converted to the relevant binary format called 𝐵𝐼𝑁_𝐵𝑆𝑇 firstly. Then, 𝐵𝐼𝑁_𝐵𝑆𝑇 should be transformed to the relevant DNA format using binary coding rules for DNA sequences in Table 1 so that the relevant binary coding rule for each node of 𝐵𝐼𝑁_𝐵𝑆𝑇 is selected using Eq.6.

𝑅𝑢𝑙𝑒_𝑁𝑢𝑚𝐵𝑆𝑇 = 𝑅𝑜𝑢𝑛𝑑 (𝑥𝑝 × 7) + 1 (6) 𝑝 = 𝑁 + 1, … ,2𝑁 Likewise, 𝐷𝑁𝐴_𝐼𝑚𝑔 is generated accordingly using the relevant binary coding rule selected from Table 1 using Eq.7 for the plain image size of 𝐴 × 𝐵. The 𝐷𝑁𝐴_𝐼𝑚𝑔 and 𝐷𝑁𝐴_𝐵𝑆𝑇 are then used as inputs for superimposing procedure. 𝑅𝑢𝑙𝑒_𝑁𝑢𝑚𝐼𝑚𝑔 = 𝑅𝑜𝑢𝑛𝑑 (𝑥𝑠 × 7) + 1 (7) 𝑠 = 2𝑁 + 1, … , (2𝑁 + 1) + (𝐴 × 𝐵) The pseudo codes for conversion of BST and plain image to relevant DNA are given in Tables.4 and 5 respectively.

Jo

Table.4 Procedure of converting BST to DNA sequence INPUT : BST, N OUTPUT : BST_DNA 01. i ← N 02. R ← 3.99 03. DNA_DNA ← NULL 04. FUNCTION Traversal ( BST ) 05. IF BST ≠ NULL THEN 06. Traversal (BST.left) 07. BIN_BST ← Convert BST.root to binary 08. 𝑥𝑖 ← 𝑅 × 𝑥𝑖−1 × (1 − 𝑥𝑖−1 ) 09. Rule_Num ← Round (𝑥𝑖 ×7)+1 10. BST.root_DNA ← Transform BIN_BST to DNA sequence using rule number RULE_NUM 11. Traversal (BST.right) 12. END IF 13. END FUNCTION 14. DNA_BST ← BST 15. Return DNA_BST

lP

re

-p

ro

of

Table 5 Procedure of converting image to DNA sequence INPUT : Img OUTPUT : DNA_Img, i 01. i ← 2N+1 02. R ← 3.99 03. [A B] ← size of Img 04. FOR j ← 1 TO A 05. FOR z ← 1 TO B 06. BIN_Img ← Convert Img(j,z) to binary 07. 𝑥𝑖 ← 𝑅 × 𝑥𝑖−1 × (1 − 𝑥𝑖−1 ) 08. Rule_Num ← Round (𝑥𝑖 ×7)+1 09. DNA_Img(j,z) ← Transform BIN_Img to DNA sequence using rule number RULE_NUM 10. END FOR 11. END FOR 12. Return DNA_Img, i Generally, 𝐷𝑁𝐴_𝐵𝑆𝑇 is repeatedly superimposed over procedure of converting 𝐷𝑁𝐴_𝐶𝑖𝑝ℎ𝑒𝑟_𝐼𝑚𝑔 to 𝐶𝑖𝑝ℎ𝑒𝑟_𝐼𝑚𝑔 is shown in Table 7. 𝐷𝑁𝐴_𝐼𝑚𝑔 image pixels until all of the DNA image pixels are at least encrypted with BST nodes once. Basically, when the BST image is superimposed on the plain image the left and right offspring of each node are in the coordinates of (𝑖 + 1, 𝑗 − 1) and (𝑖 + 1, 𝑗 + 1) according to the parent node as shown in Fig.2a. However, those nodes of 𝐷𝑁𝐴_𝐵𝑆𝑇 which locates out of the margins of plain image are ignored as in Fig.2b. The superimposing procedure proceeds by XOR of each node in 𝐷𝑁𝐴_𝐵𝑆𝑇 and the relevant pixel of 𝐷𝑁𝐴_𝐼𝑚𝑔 using Table 2. To do so, two coordinates are selected in [1, 𝐴] and [1, 𝐵] to specify the row and column in which (a) 𝐷𝑁𝐴_𝐵𝑆𝑇root should be located on (𝑅𝑜𝑤, 𝐶𝑜𝑙𝑢𝑚𝑛) . It is noteworthy that the repetitive root locations are ignored. The superimposing procedure is illustrated in Table 6. Step 6) DNA image to Cipher image conversion

ur na

The last step is transforming 𝐷𝑁𝐴_𝐼𝑚𝑔 to the relevant 𝐶𝑖𝑝ℎ𝑒𝑟_𝐼𝑚𝑔 so that the relevant binary coding rule for each pixel of 𝐼𝑚𝑔_𝐷𝑁𝐴 is selected in order to convert 𝐷𝑁𝐴_𝐼𝑚𝑔 to binary format 𝐵𝐼𝑁_𝐼𝑚𝑔 first. Next, 𝐵𝐼𝑁_𝐼𝑚𝑔 is converted to the decimal format to generate the 𝐶𝑖𝑝ℎ𝑒𝑟_𝐼𝑚𝑔. The

(b) Fig.2. superimposing the candidate BST on plain image A) without ignored node B) with ignored node

Jo

Table.6 Procedure of superimposing DNA_BST on DNA_Img INPUT : DNA_BST , DNA_Img, i OUTPUT : DNA_Cipher_Img, i 01. R ← 3.99 02. [A B] ← size of DNA_Img 03. REPEAT 04. 𝑥𝑖 ← 𝑅 × 𝑥𝑖−1 × (1 − 𝑥𝑖−1 ) 05. Row ← Round (𝑥𝑖 × (𝐴 − 1))+1 06. i ← i+1 07. 𝑥𝑖 ← 𝑅 × 𝑥𝑖−1 × (1 − 𝑥𝑖−1 ) 08. Column ← Round (𝑥𝑖 × (𝐵 − 1))+1 09. i ← i+1 10. UNTIL Img_DNA(Row, Column) is not already met 11. DNA_Cipher_Img ← Superimpose DNA_BST.root on DNA_Img(Row, Column) based on Fig. 2 12. Return DNA_Cipher_Img, i

4.2.1.

Simulation and Results

The correlation coefficient of two adjacent pixels in a meaningful plain image is high. However, a good encryption method should decrease this correlation. Considering two adjacent pixels, the correlation coefficient can be calculated as follows [5]: |𝑐𝑜𝑣(𝑥, 𝑦)| 𝑟𝑥𝑦 = (9) √𝐷(𝑥) × √𝐷(𝑦) in which 𝑥 and 𝑦 are the gray levels of two adjacent pixels. In numerical computations, Eqs. 10, 11 and 12 can be used to determine these parameters where 𝐸(𝑥) and 𝐸(𝑦) are the means of 𝑥 and 𝑦 variables and 𝐷(𝑥) and 𝐷(𝑦) are respective variances.

In this section, the experimental results and further discussions on the proposed method are given. For all experiments, eight sample images of sizes 512 × 512, 256 × 256, and 128 × 128 are used. The results have been implemented over MATLAB 2014 on a PC with an Intel Core i7, 2.3 GHz CPU, 8 GB memory and 500 GB hard disk with a Windows 8 professional operating system. In the following sections, the superiority of the proposed method against state of the arts have been discussed. 4.1. Entropy Analysis Entropy is a statistical randomness measure that shows how uniformly gray level pixels are distributed throughout the image. Thus, greater entropy results in more uniform distribution. To calculate entropy, Eq. 8 is used [20] as follows:

of

𝑁

1 𝑐𝑜𝑣(𝑥, 𝑦) = ∑(𝑥𝑖 − 𝐸(𝑥))(𝑦𝑖 − 𝐸(𝑦)) 𝑁 𝑖=1

𝑁

1 𝐸(𝑥) = ∑ 𝑥𝑖 𝑁

2𝑀 −1

1 𝐻(𝑠) = ∑ 𝑃(𝑠𝑖 ) log 2 𝑃(𝑠𝑖 )

Correlation coefficient analysis

𝑖=1 𝑁

(8)

𝑖=0

𝐷(𝑥) =

(10) (11)

1 ∑(𝑥𝑖 − 𝐸(𝑥))2 𝑁

(12)

-p

in which 𝑃(𝑠𝑖 ) is the occurrence probability of variable 𝑠𝑖 . The ideal entropy is 𝑀 = 8, in a 256 gray-scale image. The entropy coefficients regarding eight standard images are shown in Table 8. The results reveal that the entropy of the cipher images are near the ideal value of 8.

ro

4.

𝑖=1

Jo

ur na

lP

re

Vertical, horizontal, and diagonal correlation coefficients are calculated for 4000 pairs of adjacent pixels based on Eq.9 and the results are shown in Table 9. Furthermore, the graphical representation of the vertical, 4.2. Statistical Attacks horizontal, and diagonal correlation coefficient for 4000 pairs of adjacent pixels in Lena’s plain and cipher image of size Correlation coefficient analysis and histogram analysis are 512 × 512 are shown graphically in Fig. 3 respectively. Fig. two main statistical evaluations which have been tested on 3 clearly shows uniform distribution of diagonal correlation the proposed encryption method as follows. coefficient throughout the cipher image using the proposed method. Table 7. Procedure of converting DNA_Cipher_Img to Cipher_Img INPUT : DNA_Cipher_Img, I OUTPUT : Cipher_Img 01. R ← 3.99 02. [A B] ← size of DNA_Cipher_Img 03. FOR j ← 1 TO A 04. FOR z ← 1 TO B 05. 𝑥𝑖 ← 𝑅 × 𝑥𝑖−1 × (1 − 𝑥𝑖−1 ) 06. Rule_Num ← Round (𝑥𝑖 ×7)+1 07. Cipher_Bin ← Transform DNA_Cipher_Img(j, z) to binary using rule number RULE_NUM 08. Cipher_Img(j, z) ← Convert Cipher_Bin to decimal 09. END FOR 10. END FOR 11. Return Cipher_Img Table 8. The entropy of cipher images

128 × 128 256 × 256 512 × 512

Peppers

House

Airplane

Cameraman

Lena

Boat

Painter

Baboon

7.9902 7.9958 7.9983

7.9917 7.9971 7.9991

7.9935 7.9986 7.9990

7.9912 7.9989 7.9991

7.9948 7.9991 7.9992

7.9948 7.9982 7.9991

7.9906 7.9981 7.9986

7.9928 7.9982 7.9990

Table 9. correlation coefficients of cipher images in three dimensions House

Airplane

Cameraman

Lena

Boat

Painter

Baboon

Vertical

128 × 128 256 × 256 512 × 512

0.0114 0.0063 0.0059

0.0094 0.0091 0.0013

0.0204 0.0086 0.0019

0.0086 0.0042 0.0041

0.0087 0.0019 0.0017

0.0153 0.0084 0.0031

0.0134 0.0052 0.0017

0.0098 0.0087 0.0026

Horizontal

128 × 128 256 × 256 512 × 512

0.0091 0.0083 0.0029

0.0126 0.0053 0.0019

0.0119 0.0055 0.0015

0.0142 0.0024 0.0035

0.0052 0.0015 0.0007

0.0093 0.0084 0.0007

0.0193 0.0143 0.0016

0.0072 0.0057 0.0009

Diagonal

128 × 128 256 × 256 512 × 512

0.0128 0.0051 0.0018

0.0079 0.0032 0.0015

0.0158 0.0092 0.0050

0.0136 0.0019 0.0014

0.0047 0.0012 0.0008

0.0062 0.0012 0.0007

0.0066 0.0016 0.0007

0.0091 0.0037 0.0006

ur na

lP

re

-p

ro

of

Peppers

Fig. 3. vertical, horizontal, and diagonal correlation coefficient for Lena’s plain image before (1st row) and after (2nd row) encryption 4.2.2. Histogram analysis

Jo

A good image encryption method has same frequency of gray levels which shows uniform distribution. Fig.5 shows the histograms of the Baboon image of size 512 × 512 prior to and after application of the proposed method. Fig.4 clearly demonstrates that the gray level of the histograms of the cipher images is uniformly distributed and completely different from the initial images. 4.3. Brute-force Attack To avoid brute-force attacks, secret key sensitivity and the size of the secret key space are evaluated. 4.3.1. Key sensitivity analysis

According to key sensitivity analysis a slight alteration in initial value should cause a tremendous impact in the cipher image in a potent image encryption method [24]. To investigate the key sensitivity analysis of the proposed method, the Cameraman image of size 512 × 512 is encrypted in Fig.5 using a 128-bit secret key first. Next, the encryption is repeated again with the same secret key by alteration in one bit randomly so that one bit with 0 value changes to 1. The corresponding cipher images regarding the initial secret key and the altered one are also illustrated in Fig.5b and Fig.5c. The secret key analysis is performed on the 256 × 256 images and the results are presented in Table 10.

3000 2500 2000 1500 1000 500

0

of

0 50

100

150

200

250

200

250

ro

2500

2000

-p

1500

re

1000

lP

500

st

0

0

50

100

150

nd

ur na

Fig.4. From left to right in (1 row) plain image, histogram of plain image, and in (2 row) cipher image, histogram of cipher image Table 10. Differences (%) between two cipher images when a 1-bit change is applied to the secret key

128 × 128 256 × 256 512 × 512

Peppers

House

Airplane

Cameraman

Lena

Boat

Painter

Baboon

99.55 % 99.87 % 99.92 %

99.89 % 99.85 % 99.91 %

99.68 % 99.92 % 99.94 %

99.69 % 99.81 % 99.88 %

99.72 % 99.82 % 99.93 %

99.65 % 99.84 % 99.95 %

99.83 % 99.84 % 99.92 %

99.65 % 99.86 % 99.93 %

Jo

4.3.2. Secret key space analysis

The key space should be large enough to be able to resist brute-force attacks. The secret key space is the number of keys that can be generated. In our proposed method, a 128-bit key is used to create 𝑥0 . Regarding 𝑥0 generation in Eq.3., the secret key space is 264 × 28 ≅ 272 , which seems to be large enough to avoid brute-force attacks. 4.4. Differential Attack In differential attack, it is tried to assess whether a minor alteration in the gray level of the plain image could result in tremendous impact on the gray level of the cipher image. To

do so, number of pixels change rate (NPCR) and unified average changing intensity (UACI) are used as major criteria as follows in Eq. 13 and Eq. 14 [25] : 𝑁𝑃𝐶𝑅 =

𝑈𝐴𝐶𝐼 =

𝑁 ∑𝑀 𝑖=1 ∑𝑗=1 𝐷(𝑖, 𝑗)

𝑀×𝑁

× 100%

𝑁 ∑𝑀 𝑖=1 ∑𝑗=1|𝐶1 (𝑖, 𝑗) − 𝐶2 (𝑖, 𝑗)|

255 × 𝑀 × 𝑁

0 subject to: 𝐷(𝑖, 𝑗) = { 1

(13)

× 100%

𝑖𝑓 𝐶1 (𝑖, 𝑗) = 𝐶2 (𝑖, 𝑗) 𝑖𝑓 𝐶1 (𝑖, 𝑗) ≠ 𝐶2 (𝑖, 𝑗)

(14)

where 𝐶1 and 𝐶2 are two cipher images encrypted from two plain images with one gray level pixel difference using the same initial key. The NPCR and UACI of 𝐶1 and 𝐶2 which have been encrypted using proposed method were calculated on sample images. Table.11 shows the NPCR and UCAI values of 𝐶1 and 𝐶2 . Table 11 confirms that the proposed method has high sensitivity regarding a minor change in the plain image. In the diffusion section of the encryption process each pixel is encrypted through a function of the related BST node, the related plain image pixel, and the latest cipher image pixel. Thus, UACI and NPCR of the proposed method are satisfactorily high as shown in Table 11. 4.5. Comparison

and proposed method on the image of Boat. The results in Table 12 show that the proposed method outperforms chaos based encryption method in almost all factors. Although chaos-DNA based encryption method has competitive results with proposed method in terms of correlation coefficient, the hybrid proposed method is more robust against differential attacks and entropy. Scientifically speaking, exploiting BST increased the accuracy of encryption through multi-encrypting a same pixel of the plain image with variety of chaotic nodes in BST. Obviously, the performance decreased to achieve such an accuracy which seems rational. However, the speed test in Table 12 shows that the difference in execution time of the proposed method against Chaos based and Chaos-DNA based encryptions is not meaningful.

of

The superiority of the proposed method has been approved by implementing and comparing chaos based, chaos-DNA based,

Peppers

House

Airplane

Cameraman

ro

Table 11. NPCR and UCAI of 8 sample images Lena

Boat

Painter

Baboon

128 × 128 256 × 256 512 × 512

0.993193 0.993218 0.996047

0.991946 0.992930 0.995188

0.993117 0.993746 0.994036

0.994281 0.995204 0.995283

0.992491 0.993941 0.996289

0.994401 0.996418 0.996742

0.993385 0.993853 0.996259

0.991632 0.993194 0.993665

UACI

128 × 128 256 × 256 512 × 512

0.326840 0.332069 0.333447

0.329984 0.332862 0.333841

0.330291 0.334952 0.333682

0.332958 0.333384 0.334292

0.332858 0.334065 0.335420

0.329273 0.333275 0.336392

0.330908 0.0033422 0.335779

0.331059 0.333495 0.335084

UACI

Execution time (ms)

0.328476 0.331203 0.331935

97 389 1512

0.327489 0.330281 0.334291

127 498 1961

re

-p

NPCR

128 × 128 256 × 256 512 × 512

7.9926 7.9932 7.9978

0.0094 0.0073 0.0019

0.0165 0.0074 0.0011

0.0053 0.0049 0.0041

128 × 128 256 × 256 512 × 512 Conclusion

7.9948 7.9982 7.9991

0.0153 0.0084 0.0031

0.0093 0.0084 0.0007

0.0062 0.994401 0.329273 197 0.0012 0.996418 0.333275 771 0.0007 0.996742 0.336392 3009 composition with BST created a robust encryption method with high resistance against well-known attacks.

Jo

ChaosDNA

Proposed method 5.

ur na

lP

Table 12. The performance of the proposed scheme and three comparable methods. Entropy Correlation Coefficient NPCR V H D 7.9883 0.0284 0.0238 0.0128 0.990352 128 × 128 Chaos 7.9921 0.0193 0.0117 0.0081 0.991381 256 × 256 7.9948 0.0107 0.0061 0.0058 0.992512 512 × 512

In this paper a new method was proposed for private key image encryption using DNA and BST. The superiority of proposed method lies in unanticipated encryption within superimposing step of proposed method in which each pixel of the image is encrypted at least once. In fact, exploiting BST makes the encryption method lengthier through adding more randomness in encryption process. Application of DNA and its

7.990083 7.992192 7.994820

Acknowledgement This research was supported by Next-Generation Information Computing Development Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science, ICT & Future Planning (NRF2014M3C4A7030503)

Jo

ur na

lP

of

ro

re

[1] P. Rakheja, R. Vig, P. Singh, An asymmetric hybrid cryptosystem using hyperchaotic system and random decomposition in hybrid multi resolution wavelet domain, Multimedia Tools and Applications (2019). [2] H.M. Ghadirli, A. Nodehi, R. Enayatifar, An overview of encryption algorithms in color images, Signal Processing 164 (2019) 163-185. [3] C. Wu, Y. Wang, Y. Chen, J. Wang, Q.-H. Wang, Asymmetric encryption of multiple-image based on compressed sensing and phase-truncation in cylindrical diffraction domain, Optics Communications 431 (2019) 203-209. [4] H. Nematzadeh, R. Enayatifar, H. Motameni, F.G. Guimarães, V.N. Coelho, Medical image encryption using a hybrid model of modified genetic algorithm and coupled map lattices, Optics and Lasers in Engineering 110 (2018) 24-32. [5] R. Enayatifar, A.H. Abdullah, M. Lee, A weighted discrete imperialist competitive algorithm (WDICA) combined with chaotic map for image encryption, Optics and Lasers in Engineering 51(9) (2013) 1066-1077. [6] R. Enayatifar, H.J. Sadaei, A.H. Abdullah, M. Lee, I.F. Isnin, A novel chaotic based image encryption using a hybrid model of deoxyribonucleic acid and cellular automata, Optics and Lasers in Engineering 71 (2015) 33-41. [7] R. Zahmoul, R. Ejbali, M. Zaied, Image encryption based on new Beta chaotic maps, Optics and Lasers in Engineering 96 (2017) 39-49. [8] M. Alawida, A. Samsudin, J.S. Teh, R.S. Alkhawaldeh, A new hybrid digital chaotic system with applications in image encryption, Signal Processing 160 (2019) 45-58. [9] R. Parvaz, M. Zarebnia, A combination chaotic system and application in color image encryption, Optics & Laser Technology 101 (2018) 30-41. [10] R. Lan, J. He, S. Wang, T. Gu, X. Luo, Integrated chaotic systems for image encryption, Signal Processing 147 (2018) 133-145. [11] W. Feng, Y.-G. He, H.-M. Li, C.-L. Li, Cryptanalysis of the Integrated Chaotic Systems based image encryption algorithm, Optik (2018). [12] E. Yavuz, R. Yazıcı, M.C. Kasapbaşı, E. Yamaç, A chaos-based image encryption algorithm with simple logical functions, Computers & Electrical Engineering 54(Supplement C) (2016) 471-483.

[13] L. Li, Y. Xie, B. Liu, Y. Xiao, Y. Ye, T. Song, Y. Zhang, Y. Liu, Optical image encryption and transmission with semiconductor lasers, Optics & Laser Technology 119 (2019) 105616. [14] R. Enayatifar, F.G. Guimarães, P. Siarry, Index-based permutation-diffusion in multiple-image encryption using DNA sequence, Optics and Lasers in Engineering 115 (2019) 131-140. [15] O.D. King, P. Gaborit, Binary templates for comma-free DNA codes, Discrete Applied Mathematics 155(6) (2007) 831-839. [16] X. Wu, K. Wang, X. Wang, H. Kan, J. Kurths, Color image DNA encryption using NCA map-based CML and one-time keys, Signal Processing 148 (2018) 272-287. [17] J. Kalpana, P. Murali, An improved color image encryption based on multiple DNA sequence operations with DNA synthetic image and chaos, Optik 126(24) (2015) 5703-5709. [18] D. Huo, D.-f. Zhou, S. Yuan, S. Yi, L. Zhang, X. Zhou, Image encryption using exclusive-OR with DNA complementary rules and double random phase encoding, Physics Letters A 383(9) (2019) 915-922. [19] R. Enayatifar, A.H. Abdullah, I.F. Isnin, Chaos-based image encryption using a hybrid genetic algorithm and a DNA sequence, Optics and Lasers in Engineering 56 (2014) 83-93. [20] A.H. Abdullah, R. Enayatifar, M. Lee, A hybrid genetic algorithm and chaotic function model for image encryption, AEU - International Journal of Electronics and Communications 66(10) (2012) 806-816. [21] K. Mirzaei Talarposhti, M. Khaki Jamei, A secure image encryption method based on dynamic harmony search (DHS) combined with chaotic map, Optics and Lasers in Engineering 81(Supplement C) (2016) 21-34. [22] M. Komorowski, T. Trzciński, Random Binary Search Trees for approximate nearest neighbour search in binary spaces, Applied Soft Computing 79 (2019) 87-93. [23] N. Goyal, M. Gupta, Better analysis of Image 1 binary search tree on decomposable sequences, Theoretical Computer Science (2019). [24] T. Sivakumar, P. Li, A secure image encryption method using scan pattern and random key stream derived from laser chaos, Optics & Laser Technology 111 (2019) 196204. [25] R. Enayatifar, A.H. Abdullah, I.F. Isnin, A. Altameem, M. Lee, Image encryption using a synchronous permutation-diffusion technique, Optics and Lasers in Engineering 90 (2017) 146-154.

-p

References