You are on page 1of 5

266

A Triple-Key Chaotic Image Encryption Method


Srividya.G, Nandakumar.P

Department of Electronics and Communication, N.S.S College of Engineering, Palakkad 678008, Kerala, India srividyag l@gmail.com

Abstract-Many methods have been put forth to perform image encryption using Chaotic Neural Networks. In this paper, another method of chaotic image encryption called the "Triple Key" method is introduced. In this method, it is required to enter an 80-bit session key in addition to the initial parameter key and the control parameter key. Each of the keys forms just one part of the lock that needs to be opened to obtain the original image. The position of bits in the 80-bit key determines the scrambling of individual pixels in the encrypted image. Results reveal a very low Correlation image, coefficient which between adjacent pixels and in the encrypted implies higher security lower

intermediate key is combined with the initial parameter key and the control parameter key which are then used to generate a chaotic sequence. The chaotic sequence is generated using the one-dimensional chaotic logistic map. The method is called "Triple-key" because it provides a three-fold protection to the original image and three keys have to be entered in the correct order for decrypting the image. The software offers additional protection by limiting the number of times a person can enter the wrong code. The features that make chaotic logistic maps desirable for image encryption have been described in the following section. Then, the algorithm of the "Triple key method" is elaborated. The observations and results of this image encryption method are provided next. Some recommendations are given at the conclusion of the paper. II.
FEATURES OF CHAOTIC LOGISTIC MAPS

probability of security breach through brute force attacks or statistical analysis. The software was realized using MATLAB.

Keywords-image encryption; chaotic neural network; chaotic logistic map

I.

INTRODUCTION

The security of multimedia data such as digital speech, images, and videos has become increasingly important nowadays due to the frequent use of such signals for communication over open networks. Storage and transmission of multimedia is needed in many real applications, such as medical imaging systems, military and radar image transmission, confidential video conferences and other covert operations. In some cases, security breach due to unauthorized access may be highly detrimental. Hence, it becomes imperative to encrypt all data that need to be protected. Ordinary data like text files can be protected using a number of encryption schemes like Data Encryption Standard (DES), Triple DES (TDES), and International Data Encryption Algorithm (IDEA) which provide a high level of data security. The text files can be stored, processed or sent via a network by encrypting it. But difficulty arises when a real time application like audio or video has to be encrypted. Large data size, computational complexity and real time constraints make encryption of multimedia data difficult [1]. This makes chaotic scrambling of an image more desirable when compared to Conventional encryption algorithms. A number of chaos based image encryption schemes have been developed in recent years since 1992 which are briefly dealt with in [2]. In this paper, a "triple-key" method of image encryption is explained. In this image encryption technique, an 80-bit session key is entered in the form of 20 hexadecimal characters. Portions of this session key are extracted and some manipUlations are done on it to form an intermediate key. This

Chaos theory is a scientific discipline that focuses on the study of nonlinear systems that are highly sensitive to initial conditions that is similar to random behavior, and continuous system. The properties of chaotic systems are [3]: (i) Deterministic, this means that they have some determining mathematical equations ruling their behavior. (ii) Unpredictable and non-linear, this means they are sensitive to initial conditions. Even a very slight change in the starting point can lead to significant different outcomes. (iii) Appear to be random and disorderly but in actual fact they are not. Beneath the random behavior there is a sense of order and pattern. The highly unpredictable and random-look nature of chaotic output is the most attractive feature of deterministic chaotic system that may lead to various novel applications [4]. A simple 1D map [5] that exhibits complicated behavior is the logistic map [0,1]
maps

[0,1], parameterized by fl: (1)

In the logistic map, as Il is varied from to 4, a period doubling bifurcation occurs. In the region Il E [0, 3], the map possesses one stable fixed point. As Il is increased past 3, the stable fixed point becomes unstable and two new stable periodic points of period 2 are created. As Il is further increased, these stable periodic points in tum become unstable and each spawns two new stable periodic points of period 4.

978-1-4244-9799-7/111$26.00 2011 IEEE.

267

0.9 0.8 0.7 0.6 x" 0.5 0.4 0. 3 0.2 I I

If the binary representation of the pixel Pi is did2d3 the result of step 3 would be an array of size N x k.

dN,

(2)

I I I I r ------------ T ----I I ____________ L ____________ L ________ 0.1 I I I I o ---------- ----------, -------- 2. 5 3 3.5 4
------------

------------r------------+--

B. Computing the Initial Parameter

X(i)

4. The session key K consisting of 20 hexadecimal characters viz. 0 to 9 and A to F is entered. (3) 5. Each hexadecimal character in the session key is converted into its binary equivalent of four bits so that the session key consists of 80 bits. Let ki kllk12k13k14 ' k2 k2ik22k23k24' ... , k20 k20ik202k203k204= = =

Figure I.

Bifurcation diagram of a one-dimensional logistic map

Thus the period of the stable periodic points is doubled at each bifurcation point. Moreover, at a finite 11, the period doubling episode converges to an infinite number of period doublings at which point chaos is observed [6]. This is depicted in the bifurcation diagram in Fig. 1. The extreme amount of confusion can be seen to pervade at the end of the spectrum. III.
WORKING OF THE TRIPLE-KEY IMAGE ENCRYPTION

6. A block k of 24 bits k7kSk9 klOkllk12 is extracted from the session key (3). 7.
=

XOi and X02 are computed as in (4) and (5):


+ ... +

The basic design ideas of the existing data encryption techniques can be classified into three major types: a) Position permutation, b) value transformation, and c) combination form. The position permutation algorithms scramble the original data according to some predefined schemes. It is simple but usually has low data security. The value transformation algorithms transform the data value of the original signal with some kinds of transformation. It has the potential of low computational complexity and low hardware cost. Finally, the combination form performs both position permutation and value transformation. It has the potential of high data security [6]. The Triple Key method is a form of Combination encryption. An image encryption technique using an 80-bit key is used in [2]. The encryption involving XOR of the original image and a noise image is outlined in [7]. The method used here combines these two techniques for image encryption. The algorithm is explained in the next section. IV.
TRIPLE-KEY CHAOTIC IMAGE ENCRYPTION ALGORITHM

3 XOi ( k71 X 20 + ... + k74 X 2 + k i X 24 7 20 2 24 2 + ... + k12i X 2 + ... + k124 X 2 )/2

kS4 X (4)
(5)

8. The initial parameter X(i) is computed when the user enters key X03 as in (6).

X(i)

(XOi

X02

X03) mod 1.

(6)

x (1) is a value between 0 and 1 and acts as the initial value for the one-dimensional chaotic logistic map.
C. Generating a Chaotic Sequence

9. The Chaotic sequence XiX2X3 ",XN where N is the number of pixels in the image is generated as in (1), which is reproduced here.

A. Forming the Binary Image Matrix

All values in the chaotic sequence are between 0 and 1. 10. The values in the chaotic sequence Xi are normalized to the image scale, i.e. values ranging from 0 to 255. (7)

1. An image of size Ni x N2 is entered. The pixel values of the image range from 0 to 255. Say, Ni x N2 N the total number of pixels in the image.
=

2. The two-dimensional image vector is converted to a one-dimensional vector of size 1 x N. The one-dimensional vector is of the form PiP2P3 ... PN where Pi denote pixels. 3. Each pixel value is converted to its corresponding binary value. k bits are extracted from the binary value of each pixel. The number of bits extracted varies depending upon the chaotic requirements.

Xi is an array of size 1

N.

11. All the values in Xi are converted to their equivalent binary representations. Each pixel value is encoded to a k -bit binary number so that an N x k array B is obtained. B is used to compute the weights and biases of the Chaotic neural Network.

268

(8)

15. Steps 12 through 14 are repeated for all rows of B to obtain the matrix dj of size N x k containing the binary representations of the pixel values of the encrypted image.

D. Construction ofthe Chaotic neural network

12. Each row is mapped onto a weight matrix size k x k. The elements in are decided using (9). 0, Wij = 1 -2bn , j where
i

of

... dk d2k dk

(16)

i -=1=

i = i,

(9)

and i vary from 1 to k and n varies from 1 to N.


i =

16. Each row of dj is converted to its corresponding decimal value. Now, djcontains values ranging from to 255. 17. The one-dimensional array is converted to a two dimensional array of size N1 x N2 = N which belongs to the encrypted image.

Therefore, when

i,
i = i

1, wij = -1,

i and bnj = = i and bnj = 1.

(10)

F. Decryption Process

From (9) and (10), it can be inferred that W is a diagonal matrix whose diagonal contains only values 1. The diagonal element is I if the corresponding bit in chaotic sequence is zero and -I if the corresponding bit is one. 13. Each row of B is mapped onto a bias matrix f) of size 1 x k. There exists an element in f) corresponding to each element in a row of B. Also, corresponding to each W, there is a f). The elements of f) are decided using (II).
f). = !

18. Decryption procedure is same as the encryption procedure, but takes place only when the session key, initial parameter X(l) and control parameter 11 are correctly entered.
V. OBSERVATIONS AND RESULTS

Simulation was done using MATLAB to explore the efficiency of this image encryption method. The results presented here contain both simulation diagrams and mathematical results. Simulation diagrams provide a physical feel of the encryption method, while the mathematical results provide statistical data. Simulation diagrams include a) Encrypted Image Analysis b) Histogram Analysis c) Correlation Analysis and d) Sensitivity Analysis. Mathematical results are depicted using two new parameters: Correlation Index and Quality of Encryption.
A. Simulation Diagrams

1/2, bnj = -1/2, bnj = 1

(11)

The only elements in f) are 1/2.


E. Encryption process

14. The cipher bit dj is computed corresponding to each bit dnj in the input one-dimensional vector as

Here sign(x) is defined as

sign() = x
.

{ l,x
0, x

<

0.

(13)

Simulation diagrams present a visual method to analyze the effects of the encryption technique using data like encrypted images, histogram and correlation plots. The simulations for different .bmp images encrypted using the same set of keys are done in this sub-section. Session key = 'A6C3lJ7F6lJ21E96B85B3A', %1=0.9 and 11=3.9999 are used. Other key combinations may or may not yield better results depending on the rate of chaos.
1) Encrypted Image Analysis

The above encryption looks complicated but actually, it can be simplified into a much more precise form.

, dn]. =

{a,

dnj = and 1,dnj = 1 and 1,dnj = and O,dnj = 1 and

bnj = bnj = bnj = 1 bnj = 1 (14)

The encrypted and decrypted images obtained for two different images for the same combination of keys are shown in Fig. 2. From the figure, it is inferred that the triple key method of encryption imparts sufficient amount of confusion and diffusion. The encrypted images can never be mapped to their original images by mere inspection because all encrypted images seem similar. At the same time, each encrypted image is unique as would be revealed by the correlation analysis.

which implies that dj = dnj EB bnj. (15)

2)

Histogram Analysis

The relative frequency of occurrence of different pixel values in an image is revealed by histogram analysis. Hence a histogram is an integral feature in cryptanalysis of an image. If a histogram has enough pixel frequency information left in it,

269

Original Image

Encrypted Image

Decrypted Image

(0)

(0)

(e)

Figure 2.

Encrypted image analysis of two images cat.bmp and chip.bmp

the image decryption becomes easier. When we use the Triple-key method of image encryption, the histogram reveals a uniform distribution of pixels through out the encrypted image as in Fig. 3.
3) Correlation Analysis

Figure 4. Correlation analysis of the image cat.bmp (a) correlation plot of vertical pixels in the original image (b) correlation plot of horizontal pixels in the original image (c) correlation plot of vertical pixels in the encrypted image (d) correltaion plot of horizontal pixels in the encrypted image

As a figure of merit for measuring the efficiency of encryption, two new terms Correlation Index (CI) and Quality of Encryption (QoE) are introduced.

Correlation is a measure of the similarity that exists between two adjacent pixels in an image. Here correlation is plotted for vertically adjacent and horizontally adjacent pixels in an image. The vertical and horizontal correlation plots for original and encrypted images for an image are shown in Fig. 4. The correlation is indicated by the correlation coefficient in both horizontal and vertical directions. The formula for correlation coefficient is given by
(17)

CI =

IChl+ICvl
2

(18)

Here, CI refers to the correlation index, Ch the correlation between horizontally adjacent pixels and Cv the correlation between vertically adjacent pixels. CI is the average correlation existing between the adjacent pixels. It can take values in the range [-1,1] . The nearer the CI is to zero, the lower the correlation, the higher the confusion and diffusion properties of the encrypted image, the higher the encryption efficiency and hence, the lower the ease of decryption without knowledge of the keys. So the aim is that a lower CI has to be attained.

B. Mathematical Results: Sensitivity Analysis

The efficiency of an encryption system can also be determined by the sensitivity analysis, i.e. sensitivity of the encryption process to the change in key. Here sensitivity analysis is done and the mathematical results thus obtained are tabulated in tables 1 and 2. Table 1 shows the sensitivity analysis for four different images using the same combination of keys. Table 2 shows the sensitivity analysis for the same image using different keys. The significance of this data is revealed by the definition of two new parameters as explained below.

QoE = 1 - ICII)

100)%

(19)

Higher the value of QoE, better the encryption process. It is seen in table 2 that triple key method provides a QoE of more than 99% in every case.

TABLEr.

SENSITIVITY TO INPUT IMAGE CI Input 0.9245 Output 0.0042 99.58%

Image V H V H V H V H

Correlation Input Output V H V H V H V H -0.0022 -0.0062 -0.0008 -0.0097 -0.0133 -0.0052 -0.0007 -0.0092 0.9067 0.9514 0.8172

QoE

Cat.bmp

0.9300 0.9190 0.8493 0.7851 0.9558 0.9469 0.9213 0.8920

,.)

Chip.bmp

0.0053

99.47%

Rose.bmp

0.0093

99.07%

Taj.bmp
Ib)

0.0049

99.51%

Figure 3. Histogram analysis of the image cat.bmp (a) histogram of the original image (b) histogram of the encrypted image.

270

TABLE II. No.

SENSITIVITY TO KEYS Encrypted Image

Keys Session Key FSDIBOCB3E6F5C79143B X(l) = O.S and 11= 3.9999 Session Key = FSDIBOCB9E6F5C79143B X(l) = O.S and 11= 3.9999 Session Key = FSDIBOCB9E6F5C79143B X(I) = 0.7 and 11= 3.9999

CI 0.0030

QoE 99.70

0.0086

99.14

0.0071

99.29

VI.

CONCLUSION AND RECOMMENDATIONS

In this paper, a new method called Triple-Key method for image encryption using chaotic neural networks was introduced. The algorithm of the encryption technique was explained in detail. The relative merits of this algorithm were demonstrated using the simulation diagrams and mathematical tabulated results. This algorithm draws its origin from a number of image encryption algorithms previously known to man. This algorithm could be extended to color images of varying sizes with some minor changes in the array manipulation. The bits in the session key could be circulated as in Bit Recirculation Image Encryption (BRIE) algorithm to provide greater chaos and the encryption process could be iterated till zero-correlation is obtained.
REFERENCES [I] Shiguo Lian, jinsheng Sun, Zhiquan Wang; "A novel image encryption scheme based on JPEG encoding" Information Visualisation, 2004. IV 2004. Proceedings. Eighth international Conference on, 14-16 July 2004, Pages: 217-220. N. K. Pareek, Vinod Patidar, K. K. Sud; "Image encryption using chaotic logistic map", Image and Vision Computing 24 (2006) 926-934. Salleh. M., S. Ibrahim and I. F. Isnin. 2002. "Ciphering Key Of Chaos Image Encryption". Proceeding of International Conference on AI and Engineering Technology. UNIMAS, Sabah, Malaysia. Jakimoski, G. and L. Kocarev. 2001. "Chaos and Cryptography: Block Encryption Ciphers Based on Chaotic Maps". IEEE Transactions On Circuits And Systems-I: Fundamental Theory And Applications. 4S(2): 163-169. C. W. Wu and N. F. Rulkov, "Studying chaos via 1-0 maps-a tutorial," IEEE Trans. on Circuits and Systems I: Fundamental Theory and Applications, vol. 40, no. 10, pp. 707-721, 1993. H. -C. Chen, 1. -I. Guo, L. -CO Huang, 1. -C. Yen, "Design and Realization of a New Signal Security System for Multimedia Data Transmission", EURASIP Journal on Applied Signal Processing 2003:13, 1291-1305. 1. -C. Yen and 1. -I. Guo, "A chaotic neural network for signal encryption/decryption and its VLSI architecture," in Proc. 10th VLSI Design/CAD Symposium, pp. 319-322, Nan-Tou, Taiwan, August 1999.

[2] [3]

[4]

[5]

[6]

[7]