A Novel Encryption Scheme for Digital Image -based on One Dimensional Logistic Map

In this paper, an implementation of digital image encryption scheme based on one dimensional logistic map is proposed. The chaotic cryptography technique concentrates in general on the symmetric key cryptographic technique. In the proposed algorithm, a random key table lookup criterion was combined with a one-dimensional chaotic map were used for high degree 2-stage security image encryption while maintaining acceptable overhead delay time. The proposed algorithm is based on image row shuffling and pixel-wise XOR encryption. To increase the security of row shuffling variable rotation and inversion were applied to each shuffled row, based on the difference between old and new row location. The experimental results showed that the proposed algorithm is effective and applicable. The combination of logistic map and key table lookup shows advantages of large random key space and high-level of security. The resulting cipher image is suitable for practical use in secure image storing and transmission.


Introduction
Image encryption has become emergency research in recent years due of the multimedia technology and internet.Images are classified by high correlation between the adjacent pixels, for practical image encryption the traditional cryptographic algorithms such as Data Encryption Standard (DES), International Data Encryption Algorithm (IDEA) and Advanced Encryption Standard (AES) are not satisfy the standard security analysis tests against different types of attacks.In other words, the outline of the encrypted images using the traditional algorithms is clear, and some of them cost more time while the others cannot resist certain attacks, so there is a is a needed and a room and a wide space for more efficient method for image encryption (Hao, 1993).
In 1990 digital chaotic ciphers gained enormous attention.Brown and Chua (1996) have noticed that there exists the close relationship between chaos and cryptography.Chaotic systems have several significant features favorable to secure communications, which can be connected with some conventional cryptographic properties of good ciphers, such as sensitive dependence on initial condition, psudo-randomness, periodicity, reproduction, confusion, and diffusion (Fridrich, 1998).With all of these features researchers expected to introduce new and powerful tools for image encryption based on chaotic cryptography.In term of digital images, cryptography is the science of using mathematics which play major role by converting the plain-images to cipher-images.Typically, cryptographic algorithms are divided between those that are symmetric key cryptography and those that are asymmetric key cryptography (Parker & Chua, 1995;Fridrich, 1998).In this paper, we are going to use symmetric key cryptography.Parker and Chua (1995) showed theoretically that the image encryption algorithms can be classified into three parts, position permutation, value transformation, and chaotic systems.This paper chiefly focuses on the chaotic digital encryption algorithms because the security of digital images becomes increasingly important issue since the communications of digital images over network (i.e.internet) occur more frequently (Teng & Zengqiang, 2008).However, image encryption system used randomization systems to increase the uncertainty of the encryption process.Chaotic is one of the most important theories that used to create a random sequence that firstly used in the computer by Edward Lorenz in 1963.Therefore, in this paper a new algorithm for image encryption is proposed based on one dimensional chaotic maps (i.e.logistic map).Logistic map is used because of its basic characteristics, such as sensitivity to the initial conditions, unpredictability, and very simple non-linear dynamical equations which reduce a significant overhead delay in both encryption and decryption processes (Obaida M. et al., 2014;Yong et al., 2008) as described in the following section.

Logistic Map
In order to understand the chaotic behavior, logistic map is presented in this section.The logistic map is one dimensional chaotic system with X output and input variable and two initial conditions X0 and α (Patidar et al, 2009;Yong et al.,2008;Behnia et al, 2007), the basic form of the one dimensional logistic map is: Where α ϵ [0-4], X ϵ (0-1) in which, the chaotic behavior is achieved when α ϵ [0-4] as shown in Figure 1.In this paper, logistic map is used in the proposed algorithm because it has the advantages of high level efficiency and simplicity in term of mathematical models with very complicated dynamics in the key table size and very good random like properties (Behnia et al, 2007).

Proposed Algorithm
In this section, a new proposed cryptosystem is presented.The proposed algorithm is a symmetric key block cipher algorithm in which one dimensional logistic map is used.Diagrammatically, the steps are represented in Figure 3. Generally, the proposed algorithm is mainly consists of the following steps: Step 1: Initialization.In this step, the input image is converted into a two dimensional gray level matrix with i, j represents the pixel location and r is row number, then, an empty cipher matrix C, a flag array size is the number of rows, empty key table are created, and finally initiating table pointer to 0 is performed.
Step 2: The initial input condition is set for the logistic map (X n+1 = α X n (1-X n ), where α = 3), and then iterate logistic map for 100 times in order to remove the transient effect.
Step 3: Checking, if rows are completely shuffled, go to step 7.
Step 4: In this step, the logistic map is iterated once, and then converting result into row indexes r in is done based on (r in = x n+1 *10 14 mod r).
Step 5: In this step, the flag bit of the new row location generated from the previous step is tested, if the flag bit is true (1), go back to step 3. Otherwise r in will be used as new location for row shuffling process.
Step 6: Compute the difference between the new and old row location.Modify the row according to diff value (rotate left, right, or invert), store it in new location and go to step 3.
Step 7: At the end, after completing row shuffling and generating key table processes, for each pixel logistic map is iterated once, and then converting result into key table index to encrypt pixel value based on C (i i , j) = Key_Table (Key_Ptr)C(i, j).
To make it clear, our implementations have been done based on the following pseudo-code as shown in Figure 2.For decryption process, the ciphered image needs to receive encryption keys and follow the introduced steps in reverse order.It involves converting the ciphered image back to its original form (plain-image) for the receiver to understand.

Experimental Results
In general, this section concentrates on the performance evaluation of the proposed algorithm.The MATLAP simulation of the new algorithm has been done with a set of gray scale images (i.e.Cameraman, and Baboon) sized 256 x 256 as shown in Figure 4(a) and 4(e).The main encryption keys are the logistic map parameter  = 3 and X0 as initial condition utilized for shuffling Image rows, the second key is the difference between each row and its new shuffled location utilized to rotate (left or right) or invert row as described in the previous section.In addition, a set of chaotic values which is not used in shuffling process will form the key table .The key table has a random size and content depending on the main encryption keys and image size.Also key selection process is based on logistic map The performed experiments were implemented through MATLAB application tool on a 1.6 GHz core i5 (IV), 8 GB memory and 750 GB hard disk capacities.
With a statistical analysis of Cameraman, and Baboon images and its encrypted image, their grey-scale histograms are given in Figure 4© and 4(g).Figure 4(d) and 4(h) shows grey-scale histogram distribution of the ciphered image after applying the steps of the proposed algorithm.

Security Analysis and Discussion
In this paper, we have proposed a new scheme for digital image encryption based on one dimensional logistic map to increase the security level of the digital images.In 1998, Shannon carried out a first survey and discussion of the security analysis and evaluation for any image encryption scheme.In this section, several tests have been done to justify the security and performance of the proposed image encryption algorithm such as key space analysis, information entropy, correlation analysis of two adjacent pixels, and differential attack to prove that the proposed image encryption algorithm is effective and secure against the most common attacks (i.e.cryptanalytic, statistical, and brute force attacks).

Key Space Analysis
Key space size is the total number of different keys that can be used in the cryptosystem (Patidar et al., 2009;Behnia et al., 2008).Cryptosystem should be completely sensitive to all secret keys (i.e. a small change in secret key in the encryption process results into a completely different cipher-image).In this paper, the precision is 10 -14 which means the key space size for initial conditions and control parameters is over than 2260.Apparently, the key space in the proposed image encryption is large enough and sufficient to resist all kinds of brute force attacks.

Information Entropy
According to Claude E. Shannon (1949), Information theory is the mathematical theory of data communication and storage.To test the information entropy, the modern information theory is mainly concerned with error-correction, data compression, cryptography, communications systems.To calculate the entropy H(s) of a source s, we have: Where, P contains the histogram counts for gray scale image that have 256 levels, the theoretical value of entropy is 8 bits (Obaida, 2012a;2012b).The entropy value is calculated and listed in Table 1.

Correlation Analysis of Two Adjacent Pixels
To test the correlation coefficients, Tao et al. (1998) carried out a study to define the relationship between characteristics of plain-image and ciphered image.Typically, to test the correlation between two vertically adjacent pixels, two horizontally adjacent pixels, and two diagonally adjacent pixels, the following procedure was carried out.1000 pairs of two adjacent pixels from plain-image and their corresponding ciphered image produced using the proposed algorithm were randomly selected in three directions, vertical, horizontal, and diagonal and the correlation coefficients were calculated by using the following two formulas: Where, Where, x and y are grey scale values of two adjacent pixels in the image.Figure 5 shows the correlation distribution of adjacent pixels for vertical, horizontal, and diagonal direction respectively in the plain image (a), (c), and (e).image are 1.00.This indicates that the plain image and ciphered image are not correlated, as suggested by Tao Sang et al.

Differential Attack
For any encryption algorithm, it is desirable property that a small change in plain-image should cause a significant change in the cipher-image.To test the influence of one-pixel change on the whole cipher image encrypted by the proposed algorithm, the most two common measures were used: UACI and NPCR (Chen at al., 2003;Van et al., 2004).Number of Pixel Change Rate (NPCR) and Unified Average Change Intensity (UACI) are defined by formula 5, and formula 6 respectively.
In this paper, the values of NPCR and UACI are calculated and listed in Table 3.In general, higher NPCR values are desired for ideal encryption schemes.The UACI values must be in the range of 13% (Shujun et al., 2002;Parker & Short, 2001;Wei et al., 2000).In our evaluation, six images are taken for comparison.The results demonstrate that the proposed algorithm can survive differential attack.

Conclusion
In this paper, a way of improving the security of the digital image cryptosystem is proposed using one dimensional logistic map.The conducted experiments and the statistical analysis of the algorithm show that the proposed algorithm is strong, fast, and secure because it has satisfied the standard security analysis tests against different types of attacks such as correlation coefficient test, differential attack test, key space analysis, and entropy analysis.Thus, we expect that the proposed algorithm will be efficiently employed in serious applications that require a high level of security (i.e.digital images) or it could be considered as a high-quality alternative to the other algorithms because of the high level of security and performance in term of overhead delay time.

Figure
Figure 3. Proposed algorithm architecture

Figure 4 .
Figure 4. Proposed encryption algorithm for some of plain images locations (x,y) P ix el v alues on loc ations (x + 1locations (x,y) P ixel values on locations (x+1,y)