12
Australian Journal of Basic and Applied Sciences, 6(3): 381-392, 2012 ISSN 1991-8178 Corresponding Author: Morteza SaberiKamarposhti, Faculty of Computer Science and Information Systems, Univeristi Technologi Malaysia, Skudai, Malaysia E-mail: [email protected] 381 A new Algorithm for Image Encryption using DNA Sequence and Cycling Chaos 1 Morteza SaberiKamarposhti, 2 Ibrahim AlBedawi, 3 Dzulkifli Mohamad 1 Faculty of Computer Science and Information Systems, Univeristi Technologi Malaysia, Skudai, Malaysia 2,3 Faculty of Computing and Information Technology, King AbdulAziz University, Saudi Arabia Abstract: With the rapid growth of network technologies, the secured transmission of multimedia content such as images, video and so on over all kinds of wired/wireless networks has become more imminent. One of the most popular method to protect images is by using image encryption. Recent researches of image encryption algorithms have been increasingly based on chaotic systems, but the drawback of weak security is obvious In this paper, a new method is proposed for image encryption using Cycling chaos and DNA sequences. Experimental results show the efficiency of the proposed method. These results show that the proposed method is resistant against several known attacks. Key words: Image encryption, Cycling chaos, Cryptography, DNA sequences. INTRODUCTION In recent years, with the fast growth of computers as well as the changing network technologies paradigm, people’s communication methods have been extremely changed. Broadcast for digital multimedia content over all kinds of wired/wireless networks has become more frequently. However, secured transmission of multimedia information has a serious risk in the process of broadcasting due to the accessibility and sharing of networks. Therefore, people have to take additionally attention on security matter and confidentiality of multimedia information. An obvious way to protect the information from the unauthorized use is to utilize an encryption algorithm to cover the information. Encryption is an important method to secure data before it can be transmitted over any networks. Encryption is described as a changing information into a special cipher, especially in order to prevent the unauthorized users to have access to information. Decryption, on the other hand, is opposite meaning of encryption (Maniccam, S.S., N.G. Bourbakis, 2004). Many encryption techniques such as DES, AES, IDEA, RSA and so on (Chang, C.C., 2001; Bourbakis, Y.N., C. Alexopoulos, 1992; Cheng, H., X.B. Li, 2000) have been proposed. However, these traditional algorithms do not seem to be suitable for the images that have some natural properties such as bulk data capacity, high redundancy, strong correlation among adjacent pixels, special storage format of an image, etc (Fridrich, J., 1998; Yen, J.C., J.I. Guo, 2000; Li, S., X. Zheng, 2002; Beldhouche, F., U. Qidwai, 2003; Mao, Y., G. Chen, 2003; Chen, G.R., Y.B. Mao, et al., 2004). Because of this issue, many researches have been dedicated to come up with a better solution for image and video encryptions. Now, many new methods are proposed for image encryption, which aims to reduce image content’s redundancy by special operations, e.g., the chaos-based ciphers and DNA based encryption operations. In all of these methods, security level is not very high. In order to overcome these shortcomings of image encryption methods based on chaotic map or DNA sequence, the combination of chaotic map and DNA sequence is used to construct a secure image encryption scheme. In this paper, Cycling chaos and DNA sequences are used to encrypt an image that it mentioned below. Cycling Chaos System: In this section, Palacios and Juarez (2002) method for using cycling chaos in cryptography is explained. Suppose a system with N cells, where every cell's input is dynamically defined by equation in K-D as: i i i n n X f X , 1 (1) This system k ik i i R x x x ) .... ( determines a state variable of i-th cell and ) ... ( p i i i is a parameters’ vector. A network with N cells is modeled by a system as minus equations as: i j jn in ij i i i X X h X f X n n , , 1 (2

A new Algorithm for Image Encryption using DNA …ajbasweb.com/old/ajbas/2012/March/381-392.pdfresearches of image encryption algorithms have been increasingly based on chaotic systems,

Embed Size (px)

Citation preview

Australian Journal of Basic and Applied Sciences, 6(3): 381-392, 2012 ISSN 1991-8178

Corresponding Author: Morteza SaberiKamarposhti, Faculty of Computer Science and Information Systems, Univeristi Technologi Malaysia, Skudai, Malaysia

E-mail: [email protected] 381

A new Algorithm for Image Encryption using DNA Sequence and Cycling Chaos

1Morteza SaberiKamarposhti, 2Ibrahim AlBedawi, 3Dzulkifli Mohamad

1Faculty of Computer Science and Information Systems, Univeristi Technologi Malaysia, Skudai, Malaysia

2,3Faculty of Computing and Information Technology, King AbdulAziz University, Saudi Arabia

Abstract: With the rapid growth of network technologies, the secured transmission of multimedia content such as images, video and so on over all kinds of wired/wireless networks has become more imminent. One of the most popular method to protect images is by using image encryption. Recent researches of image encryption algorithms have been increasingly based on chaotic systems, but the drawback of weak security is obvious In this paper, a new method is proposed for image encryption using Cycling chaos and DNA sequences. Experimental results show the efficiency of the proposed method. These results show that the proposed method is resistant against several known attacks. Key words: Image encryption, Cycling chaos, Cryptography, DNA sequences.

INTRODUCTION

In recent years, with the fast growth of computers as well as the changing network technologies paradigm, people’s communication methods have been extremely changed. Broadcast for digital multimedia content over all kinds of wired/wireless networks has become more frequently. However, secured transmission of multimedia information has a serious risk in the process of broadcasting due to the accessibility and sharing of networks. Therefore, people have to take additionally attention on security matter and confidentiality of multimedia information. An obvious way to protect the information from the unauthorized use is to utilize an encryption algorithm to cover the information. Encryption is an important method to secure data before it can be transmitted over any networks. Encryption is described as a changing information into a special cipher, especially in order to prevent the unauthorized users to have access to information. Decryption, on the other hand, is opposite meaning of encryption (Maniccam, S.S., N.G. Bourbakis, 2004). Many encryption techniques such as DES, AES, IDEA, RSA and so on (Chang, C.C., 2001; Bourbakis, Y.N., C. Alexopoulos, 1992; Cheng, H., X.B. Li, 2000) have been proposed. However, these traditional algorithms do not seem to be suitable for the images that have some natural properties such as bulk data capacity, high redundancy, strong correlation among adjacent pixels, special storage format of an image, etc (Fridrich, J., 1998; Yen, J.C., J.I. Guo, 2000; Li, S., X. Zheng, 2002; Beldhouche, F., U. Qidwai, 2003; Mao, Y., G. Chen, 2003; Chen, G.R., Y.B. Mao, et al., 2004). Because of this issue, many researches have been dedicated to come up with a better solution for image and video encryptions. Now, many new methods are proposed for image encryption, which aims to reduce image content’s redundancy by special operations, e.g., the chaos-based ciphers and DNA based encryption operations. In all of these methods, security level is not very high. In order to overcome these shortcomings of image encryption methods based on chaotic map or DNA sequence, the combination of chaotic map and DNA sequence is used to construct a secure image encryption scheme. In this paper, Cycling chaos and DNA sequences are used to encrypt an image that it mentioned below. Cycling Chaos System: In this section, Palacios and Juarez (2002) method for using cycling chaos in cryptography is explained. Suppose a system with N cells, where every cell's input is dynamically defined by equation in K-D as:

iii nnXfX ,

1

(1)

This system kikii Rxxx )....( determines a state variable of i-th cell and )...( piii is a

parameters’ vector. A network with N cells is modeled by a system as minus equations as:

ijjninijiii XXhXfX

nn,,

1

(2

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

382

where h is a coupling j cells which are coupled with i cells( Ni 1 ) and ij is a determiner coupling

durability. Consider that f is independent from i because of assuming cells are similar. Same as above, h is independent form i, j by coupling. Moreover, if we imagine ),...( 1 Nxxx as Network state variable, we can

write equation (2) in a more simpler form of:

,1 nn XFX (3) Attention to Dellnitz et al (1995) we have distinguished between local symmetric and general symmetric. (

kL ) is a group of local or domestic symmetric, if for all Ll we have:

ii XlflXf (4)

When f generates local symmetric, a general symmetric would be stimulated by a coupling pattern. In fact

N is a group of general symmetric in network if for all S we have:

XFXF (5)

Considering coupling h, this possibility is for all local l symmetric to be symmetric based on network

equation (2). Specifically when we have Ll , activity of l in each cell is a symmetric for a coupling, then we will have: jiji XXhlXXh ,,

(6) jiji XXlhXlXh ,,

Then we will call this coupling as “wreath product coupling”. For composing a continuous Network base on equation (2), we assume a wreath product coupling as follows:

i

m

jji xxxxh , (7)

We have 0 <m < 1, yaij that y > 0, we assume a network equation of three cells defined as follows:

n

m

nnnn xyxxx 31

n

m

nnnn yzyyy 32 (8)

n

m

nnnn zxzzz 33

In this system, there are three cells as shown below in which for each moment there is one cell in chaotic

behavior and two cells in steady state. The changes between cells is shows in figure 1.

Fig. 1: Turning of chaotic state between 3 cells.

X

Y Z

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

383

Durability of coupling and m parameter are very important to initiate the cycling behavior. By referring

to figure 2 we can find out that the increasing of m parameter would increase the cycling, velocity in alternative chaotic. On the other word, we are decreasing time for every cell in chaotic state.

Fig. 2: Cycling chaotic in a Network with three discontinuous cells close to each other and with different values

of m. m = 0.3 (a) m = 0.25 (b) m = 0.2(c). As you can see in figure 2, changes in every cell happens in [-2, 2] that generally we can say it as

],[ maxmin ii xx . In this system iS determines number of characters can exist in cryptography. Usually iS is 256

which is number of ASCII characters. In this system, related range to each cell will be divided to iS areas, that

is the size of every portion conforming with a character derived from the following formula: iiii SXX /minmax (9)

So related range to i-th character is shown as:

iiii iXiX minmin ,1 (10)

(a)

(b)

(c)

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

384

Now )...( xi PPP should be assumed as plaintext. For this function first character 1p is achieved by

initial conditions ),,( 0000 zyxX and ),,( 321 . Then using equation (5) we get next reputations for 3

cells. This will continues till one of the cells in chaotic state falls in the range of character 1p . If 1n is the

number of iterations to reach to this event then 1n will be the code for this character. To get the code for second

character 2p we repeat the same process immediately starting with the resetting of counter and using the initial

value of ),,( 0000 zyxX and ),,( 321 . At the end, encrypted message will be a series with a format

of },...,{ 1 Mnn . For instance if a text "hello San Diego" is assumed, then we have:

(204,69,41,160,126,404,215,34,117,531,57,186,95,45,154) The benefit of this method of having its high dependency to a cycling chaos map and primary value as

cryptography's key is mentioned.

The Proposed Method: The proposed method uses a key of 72 bit to improve the security, and defined as

lHexaDecimaKKKK 1710 ,......,, (11)

where iK can be one of alphanumeric characters (0-9 and A-F) or can be defined using ASCII codes as

AsciiKKKK 810 ,......,, (12)

In this key iK defines 8 bit block of the key. To use in cycling chaos, an initial value 0X , 0Y , 0Z

should be defined. To do this, firstly the key is converted to a binary form

8786858483828180

0706050403020100

,,,,,,,

,,,,,,,

KKKKKKKK

KKKKKKKK

K (13)

That ijK is the bit j of the part i of the key. The 0X , 0Y , 0Z value are calculated as

24

222

222

222

086

183

280

2116

2213

2310

2406

2503

2600

0

KKK

KKK

KKK

X

24

222

222

222

087

184

281

2117

2214

2311

2407

2504

2601

0

KKK

KKK

KKK

Y

(14)

24

22

22

22

085

182

1415

1512

1605

1702

0

KK

KK

KK

Z

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

385

Convert the image with M ×M pixels to P blocks with N × N size. P is calculated as 2/ NMP (15)

As it can be seen in Figure 1, the map (8) is defined in the interval of [-2, 2]. This interval can be divided to P sections which its size is

P/4 (16)

the interval i is

ii ,12 (17)

Then 1X , 1Y , 1Z will be calculated using (8). After defining the number of this interval as the first order,

provided that the orbit does not lie at this interval, it will be repeated again until the orbit lies at all P intervals. Only orbit that is in chaotic behavior will be used for this. At last, an order will be like

ritititIteration ,......,, 21 (18)

While Pr . This order defines the location of the image pixels. In this way the interval of the block i will be

NPitRoundx istart )/)1(( NPity istart )mod)1( (19)

Nyy

Nxx

startend

startend

The gray values of the image at a one dimensional matrix is set so that the values of rows are; MMvvvV ,,........., 21 (20) Then the number of block that the pixel i should be replaced into, is given by,

1mod1_ Pinoblock (21) )_( noblockiterationiter

Initial point of this block is obtained from NPiterRoundxstart )/)1(( NPiterystart )mod)1(

(22) And the variations in the block is given by;

divPidif 1 11 divNdifx

idif (23) 1mod1 Ndify

idif So the position of pixel i will be

difstartpos

difstartpos

yyy

xxx

(24)

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

386

Changing Gray level using DNA Sequence:

A DNA sequence contains four nucleic acid bases A(adenine), C(cytosine), G(guanine), T(thymine), where A and T are complementary, G and C are complementary. Because 00 and 11 are complementary and 01 and 10 are also complementary, Four bases A, C, G and T can be encoded with these binary codes. There are only 8 kinds of coding schemes satisfy the Watson-Crick complement rule (Kuldeep Singh, Komalpreet Kaur, 2011), which are shown in the following table:

Table 1: 8 kinds of coding schemes satisfy the Watson-Crick complement rule.

1 2 3 4 5 6 7 8 A 00 00 01 01 10 10 11 11 T 11 11 10 10 01 01 00 00 G 01 10 00 11 00 11 01 10 C 10 01 11 00 11 00 10 01

As we all know, each pixel of image is between 0 and 255 gray-level. It has 8 bit in binary form that can be

encoded by these four acids. For example 141 is 10001101 in binary and can be encoded by these acids as “CATG”(Consider A,T,G and C are 00,11,01 and 10 respectively). There are two algebraic operations on DNA sequences (Kuldeep Singh, Komalpreet Kaur, 2011):

1. Addition 2. Subtraction These operations can be seen in Table 2 and 3. It is worth to mention that the base in every row or column

is unique. It means that the results of these operations are unique

Table 2: Addition + A T G C A A T G C T T C A G G G A C T C C G T A

Table 3: Subtraction.

- A T G C A A G T C T T A C G G G C A T C C T G A

After replacing all pixels, Use these steps to change the gray values of the pixels: Step1: Convert the scrambled image M ×M matrix into binary matrix M ×M*8. Then use DNA encoded

rule to obtain a matrix K of size M ×M*4. Step 2: Generate two chaotic sequences X= {x0, x1, ….., xM}. Y={y0, y1,…….,yM}, using chaotic behavior of

x and y and initial values x0,y0 and normalize it between 0 and 1. Step 3: Generate two chaotic sequences X= {x0, x1, ….., xM}. Z={z0, z1,…….,zM}, using chaotic behavior of

x and z and initial values x0,z0 and normalize it between 0 and 1. Step 4: Generate two chaotic sequences Z= {z0, z1, ….., zM}. Y={y0, y1,…….,yM}, using chaotic behavior of

z and y and initial values z0,y0 and normalize it between 0 and 1. Step 5: Reconstruct X and Y to column matrix and row matrix respectively. Then calculate X×Y and

convert it to binary matrix. Using DNA encoded matrix rule, K′ is obtained. Step 6: Reconstruct X and Z to column matrix and row matrix respectively. Then calculate X×Z and

convert it to binary matrix. Using DNA encoded matrix rule, K′′ is obtained. Step 7: Reconstruct Z and Y to column matrix and row matrix respectively. Then calculate Z×Y and

convert it to binary matrix. Using DNA encoded matrix rule, K′′′ is obtained. Step 8: NewImage K K′ K′′ K′′′) Step 9: The encrypted image can be obtained by replacing A,T,G and C in NewImage with 00,11,01 and

10 respectively and changing from binary to decimal.

Experimental Results: A good encryption method must be stable via all attack methods like cryptanalytic, brute-force and

statistical attacks. In this section, the proposed method is examined through statistical analysis, sensitivity to key changes and key space analysis.

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

387

Statistical Analysis: To examine the stability via statistical attacks, the histogram and correlation between adjacent pixels is

calculated for some common images.

Histogram Analysis: Histogram shows the number of pixels for any gray value in the image. Figures 3(a) and 3(e) shows the

plain image and encrypted image. Their histograms of three channels for two images are shown in Figures 3(b), (c), (d), (f), (g) and (h).

These figures show that the encrypted image with the key "ABCDEF0123456789ABCD" has a uniform histogram. Therefore this method is resistive to statistical attacks.

Correlation coefficient Analysis:

In this section the horizontal, vertical and diagonal correlation coefficient of the pixels is studied. To do this, 2048 pairs of horizontal, vertical and diagonal adjacent pixels is selected randomly. Figure 4 shows the distribution of two horizontally, vertically and diagonally adjacent pixels in plain image and encrypted image.

(a) (b)

(c) (d)

(e) (f)

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

388

(g) (h) Fig. 3: Histogram of main and encrypted images.

Fig. 4: Correlation coefficient.

The correlation coefficient of two adjacent pixels is calculated as

N

iix

NxE

1

1

2

1

1

N

iii xEx

NxD

ii

N

iii yEyxEx

Nyx

1

1,cov

(25)

yDxD

yxrxy

,cov

In Figure 5,6 and 7, the correlation coefficient for the plain and encrypted images shown in figure 2(a)

and 2(b) is shown. It is clear from these figures that there is negligible correlation between the two adjacent pixels in the encrypted image. However, the two adjacent pixels in the plain image are highly correlated.

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

389

Fig. 5: Horizontal Correlation Coefficient.

Fig. 6: Vertical Correlation Coefficient.

Fig. 7: Diagonal Correlation Coefficient.

In Table 4, the correlation coefficient for the plain and encrypted images shown in figure 2(a) and 2(b) is

shown. It is clear from the Table 4 that there is negligible correlation between the two adjacent pixels in the encrypted image. However, the two adjacent pixels in the plain image are highly correlated.

Table 4: Correlation Coefficient Results.

Plain Image Encrypted Image Horizontal 0.9755 0.2291

Vertical 0.9742 0.1778 Diagonal 0.9780 0.1136

Key Sensitivity Analysis:

A good encryption algorithm must be sensitive to the small variations of the key. Changing a bit must give a different result from the plain image. Figure 8(a) and 8(b) show the plain image and encrypted images with the key ’ABCDEF0123456789ABCD’ and Figure 8(c) and 8(d) show the encrypted images with keys ’BBCDEF0123456789ABCD’ and ’ABCDEF0123456789ABCE’. To compare the results, the correlation

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

390

coefficient between selected points for any pairs of encrypted image is calculated. Table 5 shows the results. The results show that the method is sensitive to small variations of the key.

(a) (b)

(c) (d) Fig. 8: Sensitivity to the small variations of the key. Table 5: Sensitivity Results.

Image 1 Image 2 Correlation Coefficient Figure 5(b) Figure 5(c) - 0.0115 Figure 5(c) Figure 5(d) 0.0008 Figure 5(b) Figure 5(d) - 0.0087

NPCR and UACI are two criteria that examine the effect of changing just one pixel in the plain image on

the encrypted image (Gao, T., Z. Chen, 2007). NPCR is the pixel change rate at the encrypted image for changing a pixel at the plain image and UACI is the mean of these changes. NPCR and UACI are given by

%100

,,

HW

jiD

NPCR ji

(26)

%100

255

,,1

,

21

ji

jiCjiC

HWUACI

Where H and W are the height and width of the image, while C1 and C2 are two encrypted images obtained from two plain images with just one different pixel and D is:

if jiCjiC ,, 21

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

391

0

1

, jiD

Other wise (27) The results of a 256 × 256 image are NPCR=0.429 %, and UACI=0.331 %; thus it shows that the method is

resistive to differential attacks.

Key Space Analysis: The key space must be sufficiently large for the method to be resistive via brute-force attacks. The keys of

the proposed method must be chosen from 2172 107223.42 keys, that show the method is resistive via

brute-force attacks.

Information Entropy: Information entropy is a common criterion that shows the randomness of the data. The mathematical theory

of information entropy introduced by Claude E. Shanon (1949). One of the most famous formulas of the information entropy is

12

0

1log

N

i ii sP

sPSH (28)

where N is the number of gray level in the image (256 for 8 bit images) and isP shows the probability

gray level number i. For an ideal random image, the value of information entropy is 8. The predictability of the method decreases when the information entropy tends to 8. For the proposed method we obtain the value of 7.9955 for the information entropy, that is very close to the ideal value.

Conclusions:

In this research, a new method is proposed for image encryption based on cycling chaos and DNA Sequences. Replacing the image pixels and changing the gray level values is applied simultaneously. The experimental results show that the proposed method based on chaotic shuffling and changing the gray value is resistive via different attacks like cryptanalytic, brute-force and statistical attacks.

REFERENCES

Beldhouche, F., U. Qidwai, 2003. Binary Image Encoding Using 1D Chaotic Maps. in: IEEE Annual Technical Conference, 39-43.

Bourbakis, Y.N., C. Alexopoulos, 1992. Picture data encryption using scan patterns, Pattern Recognition, 25(6): 567-581.

Chang, C.C., M.S. Hwang, T.S. Chen, 2001. A new encryption algorithm for image cryptosystems. Journal of Systems and Software, 58(2): 83-91.

Chen, G.R., Y.B. Mao, et al., 2004. A symmetric image encryption scheme based on 3D chaotic cat maps. Chaos, Solitons & Fractals, 21: 749-761.

Cheng, H., X.B. Li, 2000. Partial encryption of compressed image and videos, IEEE Transaction of Signal Processing, 48(8): 2439-2451.

Dellnitz, M., M. Field, M. Golubitsky, J. Ma, A. Hohmann, 1995. Int.J. Bifurc. Chaos, 5(4): 12-43. Fridrich, J., 1998. Symmetric ciphers based on two dimensional chaotic maps. International Journal of

Bifurcation and Chaos., 8(6): 1259-1284. Gao, H., Y. Zhang, S. Liang, D. Li, 2006. A new chaotic algorithm for image encryption. Chaos, Solitons

& Fractals, 29: 393-399. Gao, T., Z. Chen, 2007. Image encryption based on a new total shuffling algorithm . Chaos, Solitons &

Fractals;doi:10.1016/j.chaos.2006.11.009. Kuldeep Singh, Komalpreet Kaur, 2011. Image Encryption using Chaotic Maps and DNA Addition

Operation and Noise Effects on it, International Journal of Computer Applications (0975-8887), 23(6). Kwok, H.S., K.S. Wallace Tang, 2007. A fast image encryption system based on chaotic maps with finite

precision representation. Chaos, Solitons & Fractals, 32: 1518-1529. Li, S., X. Zheng, 2002. Cryptanalysis of a Chaotic Image Encryption Method, Scottsdale, AZ, USA, 2002,

in: Proceedings IEEE International Symposium on Circuits and Systems, 2: 708-711.

Aust. J. Basic & Appl. Sci., 6(3): 381-392, 2012

392

Maniccam, S.S., N.G. Bourbakis, 2004. Image and video encryption using SCAN patterns. Pattern Recognition, 37: 725-737.

Mao, Y., G. Chen, 2003. Chaos-Based Image Encryption, Handbook of Computational Geometry for Pattern Recognition. Computer Vision, Neurocomputing and Robotics, Springer-Verlag, Berlin.

Palacios, A., H. Juarez, 2002. Cryptography with cycling chaos, Physics Letters A, 303: 345-351. Pareek, N.K., Vinod Patidar, K.K. Sud, 2006. Image encryption using chaotic logistic map, image and

vision computing, 24: 926-934. Shannon, C.E., 1949. Communication theory of security systems. The Bell Syst Tech J., 28: 656-715. Yen, J.C., J.I. Guo, 2000. A New Chaotic Key-Based Design for Image Encryption and Decryption. in:

Proceedings IEEE International Conference on Circuits and Systems, 4: 49-52.