Improving Image Encryption Using 3 D Cat Map and Turing Machine

Security of data is of prime importance. Security is a very complex and vast topic. One of the common ways to protect this digital data from unauthorized eavesdropping is encryption. This paper introduces an improved image encryption technique based on a chaotic 3D cat map and Turing machine in the form of dynamic random growth technique. The algorithm consists of two main sections: The first does a preprocessing operation to shuffle the image using 3D chaotic map in the form of dynamic random growth technique. The second uses Turing machine simultaneous with shuffling pixels’ locations to diffuse pixels’ values using a random key that is generated by chaotic 3D cat map. The hybrid compound of a 3D chaotic system and Turing machine strengthen the encryption performance and enlarge the key space required to resist the brute force attacks. The main advantages of such a secure technique are the simplicity and efficiency. These good cryptographic properties prove that it is secure enough to use in image transmission systems. Keywords—chaotic 3D cat map; brute force attacks; Dynamic random growth technique; Turing machine; key space


INTRODUCTION
Up-to-date development and progress in the means of multimedia industry and the ways of communications have made studies focus on creating new schemes to enhance the security of transmission and storing multimedia data over open channels including the Internet and wireless networks.In mean times, multimedia data were transmitted over computer networks can be audio, image, and other multimedia types.During that, the images can be considered one of the most usable forms of information.These images often contain private or confidential information and sometimes they associated with financial interests [1,2].Security of digital image has become more and more important because of the advances in communication technology and multimedia technology.Three different ways to protect these digital images from unauthorized eavesdropping are cryptography, steganography and watermarking.Among these three techniques, cryptography has become one of the major tools to provide a high level of security.Image encryptions have applications in various fields including Internet communication, multimedia systems, medical imaging, telemedicine and military communication.As a result, the security for images, it needs to be hidden from unauthorized access to decode by transferring the multimedia data into an entirely different format, protected from unauthorized change, and available to an authorized entity, when it is needed.Although the three previously mentioned requirements have not changed, they now have some new dimensions.Not only should images be confidential, when it is stored in the computer; there should also be a way to maintain its confidentiality when it is transmitted from one computer to another.-Fig.1‖ presents a diagrammatic view of general encryption-decryption mechanism.
The primary essence of this paper would be the protection of images.The high efficiency of any cryptographic algorithm is the most important criterion by which the robustness of encryption is measured.Traditional image encryption algorithms, for instance, private key encryption standards (DES and AES) faces problems when used to encrypt large images and therefore, its efficiency becomes low and weak, public key standards such as Rivest Shamir Adleman (RSA), and the family of elliptic-curve-based Encryption (ECC), as well as the international data encryption algorithm (IDEA) requires a great computational time and super computers when used in encrypting real-time images, may not be the most desirable candidates for image encryption, especially for fast and realtime communication applications because of Cryptographic algorithms that use less time are much more preferable for encrypting such real-time images.Also, some encryption schemes may be run very slowly, and this increases the degree of security features, yet they would be of little use when dealing with real-time images [3].In the last decade, chaos-based encryption techniques are considered suitable for practical applications since they have a perfect combination of speed, high security, complexity, reasonable computational overheads, and computational power.Moreover, chaos-based and other dynamical systems based algorithms have many important properties such as the www.ijacsa.thesai.orgsensitive dependence on initial conditions and system parameters, pseudorandom properties, ergodicity, and nonperiodicity [4].Some chaos image encryption schemes have developed in recent years.In [5] proposed a new image encryption algorithm based on 3D chaotic map; this algorithm does not use the whole chaotic numbers, but only utilizes partial elements as running key.In chaotic sequence, those used elements keep certain interval, which is determined by the current ciphertext.Due to ciphertext closely related to plaintext, running-key is indirectly related with plaintext.In [6], shuffles the RGB layers by using 3D Cat map and standard map, and finally, the image is encrypted by performing XOR operation on the shuffled image and diffusion template.In [7], suggested a novel image encryption algorithm based on a three dimensional (3D) chaotic map; the design of the proposed algorithm based on three phases.In phase I, the image pixels are shuffled according to a search rule based on the 3D chaotic map.In phases II and III, 3D chaotic maps are used to scramble shuffled pixels through mixing and masking rules, respectively.
In this paper, an encryption algorithm for digital images which based on chaotic 3D cat map and the Turing machine is proposed.As cat map is weakness and has some common drawbacks that are: 1) periodic, and 2) can be easily cracked By chosen plaintext attack, we use cat map in another more secure way, which has benefits of mixing and sensitivity to initial conditions and parameters, to overcome these former defects; through calculating an intermediate parameter based on the blue layer of the image.The intermediate parameter is used as the initial parameter of a chaotic map to generate a random key stream.Consequently, the generated key streams are dependent on the plaintext image, which can resist the chosen plaintext attack [8].The 3D chaotic map with random choose of initial conditions and parameters are used to generate three discrete chaotic sequences with high sensitivity by iterations.Two of the sequences are then used to design a twodimensional permutation by calculating new coordinates of each pixel of the image and shuffle it.Then elements of the third one affect the behavior of the other two sequences through effect the initial values of the chaotic system for the further encryption process, which increases the sensitivity of plaintext images of the scheme.Both theoretical and computer simulations show that the algorithm is secure enough to use in image transmission system.
Organize other sections of this paper as follows: Section 2 introduces a chaotic 3D cat map; Section 3 discusses Turing machine; Section 4 shows the proposed image encryption and decryption schemes; Sections 5 and 6 present the experiment results and security analysis; Section 7 presents time complexity; finally, Section 8 concludes this paper.

II. THE CHAOTIC 3D CAT MAP
Arnold's cat map is a discrete-time dynamical system.Specifically, it is a kind of cut-out transformation, is originally introduced into traverse theory by Arnold and so-called Arnold transformation [9].Arnold cat transformation is a classical encryption algorithm.Mathematically, Arnold's cat map is given by -(1)‖: In the process of image encryption, the use of Arnolds Cat Map provides extra security, as it approaching higher randomness.The above 2D cat map is now generalized by producing two new parameters, p and q into -(1)‖, which increase key spaces to resist brute-force attacks and longer averaged period lengths improve map randomness [10] to resist statistical attacks, as follows -(2)‖: To increase the security of the Arnold's cat map, the generalized 2D cat map is extended to a 3D discrete chaotic map by introducing six control parameters; , , , , , , a a a b b b x y z x y z a three-dimensional cat map can be presented as the following formula -(3)‖: One can be easily verified that det 1, A  which means the 3D discrete cat map is a 11  map and the sensitivity to initial conditions and parameters are kept unchanged.By simply setting  .Consequently, the corresponding 3D cat map is higher chaotic with properties of mixing and sensitivity to initial conditions and parameters of it.

III. TURING MACHINE
A Turing machine deals with a sequential tape having only three symbols: 0, 1,  .In this example the machine will take a binary number delimited by two  , and increment it by

A. The proposed encryption scheme
In the proposed method, three pseudorandom discrete variables of 3D chaotic cat map are adopted to permute color image   , O i j of size IJ  using the formula of -(3)‖.The presented method is a combination of two essential operations, permutation and substitution.-Fig.3‖ gives the flow diagram of the encryption algorithm.The procedure of our encryption scheme is described as follow: 1) For 3D cat map "(3)", as shown in [10] 2) Before, presenting theses intrinsic processes, a preprocess operation is performed which use three initial values   ,, 0 0 0 y x z to iterate the 3D chaotic map n c times to avoid the harmful effect of the initial values, where is a present integer and served as a secret key, too.Assign the last three outputs   ,, 0 0 0 y x z from "(3)", to be new initial values of a 3D discrete cat map.
3) Permutation Operation: In this procedure, a 3D cat map is still used.This process can be achieved through the following steps: a) The plain image is divided into three basic layers (red, green and blue), each of them divided into four subblocks which are equal in size, then rotate the first three subimages 90 degree where the sub-image is rotated 90 degree twice times, the sub-image is rotated 90 degree triple times, and the sub-image is rotated 90 degree only once time.
b) We apply a 3D discrete chaotic cat map on red and green layers for each sub-image, while blue layer for all blocks is still unchanged.c) While we iterate a chaotic 3D cat map for n c times; where c) Turing machine works as if pixel value equals 1 converts it to 0 until reached to the pixel value equals 0, then converts it to 1 and the rest of bits still un-changed, as introduced in "Fig.2".
d) After applying Turing machine for red and green layers of each sub-image, we get www.ijacsa.thesai.orge) To enhance the security of encryption process, apply a bit exclusive OR, using the following formula: f) After applying Permutation-Substitution Operation on all sub-blocks in the three layers we combine these subblocks into one block for each layer then combine this layer to construct cipher image.

B. The proposed decryption scheme
The decryption process is the inverse process of the corresponding encryption scheme.-Fig.4‖ gives the flow diagram of the decryption algorithm.-Fig.5‖ and -Fig.6‖ show the results both of original and cipher images, Splash and Jet standard color test images, respectively.In the proposed encryption scheme, round of the scheme indicates that the cipher reaches a high secure level.

VI. SECURITY ANALYSES
Security and performance are the crucial requirements for any encryption system.Different from the encryption of textual information, the encryption of visual information requires security against cryptographic attacks such as differential analysis, related-key attack, and statistical attack.Generally, an encryption scheme should be thoroughly analyzed before it can be used in practical applications.Indeed, several metrics can be used to measure the cipher's resistance to some typical attacks, for example, sensitivity analysis, statistical analysis, numeric analysis, etc.Generally, if the encryption scheme is secure against most of the attacks, we can say that the encryption scheme is of high level of security.Otherwise, the encryption scheme is regarded as of low security.The detailed analyses are investigated in this section as follows.

A. Key space analysis
For an effective cryptosystem, the key space should be sufficiently large enough to prevent brute-force attack.-It is known that [11] the ideal key space should be larger than while considering the current computer computation speed.The total key space of our presented algorithm composed of three parts which are summarized as follow: ① the initial


which is much larger than in the algorithms of G. Gu, J. Ling [10] and X. Wang et al. [8]; so it is obvious that the presented technique has a large enough key space to resist common brute-force attacks.The key space comparison with our encryption scheme is shown in Table I. www.ijacsa.thesai.org

B. Statistical analysis
Since most of the existing cipher systems [12] have been cryptanalyzed successfully; we need to prove the robustness and effectiveness of the proposed image encryption scheme against statistical attacks.So in this section, we provide and analyze three statistical tests which are histograms analysis DH and the correlations computation of the adjacent pixels in encrypted images rxy, and information entropy of the ciphered image in order to evaluate the ability of the encryption algorithm to substitute the original image with uncorrelated encrypted image and two other metrics, NPCR and UACI, in order to which evaluate the diffusion characteristics of the encryption algorithm.

1) Histograms of corresponding images
To prevent the information leakage and aggressive attacks [13,14], it must be ensured that the original and encrypted images do not have any statistical similarity.Histogram analysis is a visual test which reveals the distribution information of pixel values and statistical characteristics of images, by graphing the number of pixels at each color or grey scale intensity level.
An ideal histogram of the encrypted image should have a uniform and completely different histogram against the plainimage.The experimental results of histograms analysis on both original image and its corresponding cipher image using the introduced scheme are shown in -Fig.7‖; where Frame is the original image and its histogram, Frame is the encrypted image and its corresponding histogram.The histogram of RGB layers are shown in -Fig.8‖ where upper figure is the red layer of original image and its histogram, center is the green layer of original image and its histogram, and lower is the blue layer of original image and its histogram.

2) Correlations Coefficient
In a digital image pixels are not independent and their relevance is great.This may indicate that a large area of the image has similar values.For example, in a common television digital image, the correlation coefficient of adjacent pixels may reach 0.9; that is, the relevance (which means information redundancy) is very big.The smaller the relevance, the better is the encryption effect and the higher is the security.We show the fact that the relevance [2] between plain images and cipher images is very small in two ways.It is important to calculate the correlation coefficients of two adjacent pixels of the encrypted image, so we analyze 2500 pairs of two-adjacent pixels of both original and encrypted images either in vertical, or horizontal, or diagonal directions.To do that, we use the following relations: where ( ) is the mean of , ( ) denotes the variance at pixel value , and ( ) is the covariance between two www.ijacsa.thesai.orgcolor ; where are the gray-scale values of two pixels in the same place in the plain and cipher images, is the total number of pixels selected from the image for the calculation.For the plain-image, the correlations between adjacent pixels in those directions are close to 1.This means that the adjacent pixels are highly correlated to each other.On the other hand, the correlation coefficients of the encrypted image are close to 0 and hence the adjacent pixels in the encrypted image are entirely uncorrelated to each other as shown in -Fig.9‖.All the correlation coefficients are calculated and listed in Table II.

3) Entropy analysis
Entropy is the most significant feature of disorder, or more precisely unpredictability.Relaying on Shannon's theory, -it measures [16] the randomness and quantifies the expected value of the information contained in a message‖.For example, a long sequence of repeating characters has entropy of 0, since every is predictable and a truly random sequence has maximum entropy, since there is no way to predict the next character in the sequence.The information entropy ( ) of a plain image of a random variable can be calculated using the following formula: where ( ) represents the probability distribution of appearance of symbol .The ideal information entropy value of the cipher image should be close to 8 after encryption, which leads to less possible for the cryptosystem to divulge the information.Table III shows the entropy values of the proposed scheme, as we can find that they are all close to the ideal value 8.As one can see, the information entropy in the proposed algorithm is close to G. Gu, J. Ling [10], and better than X.Wang et al. [8] algorithms as shown in Table IV.

4) Differential attack
A desirable property for cipher image [17] is being sensitive to any tiny changes (e.g., modifying only one pixel) in plain-image to monitor the change in the result.Consequently, we can be able to figure a meaningful relationship between both original and encrypted images.An Assailant often tries to elicit this crucial relationship by making minor changes, usually only one pixel, in the plain-image while encrypting the plain-image with the same encryption keys, and then observes the changes of corresponding cipher image.Also, this action facilitates finding the encryption keys and breaking them.
To test the influence of one-pixel change on the plain image encrypted by the proposed scheme, two common measures may be used [18], number of pixels change rate (NPCR) and unified average changing intensity (UACI), which are calculated.The NPCR is used to measure the percentage of the number of pixels changed in cipher-text after making a slight change in plaintext.Therefore, the theoretical greatest upper-bound of the NPCR is 100%.Therefore, the NPCR is calculated by using the following formula -(9)‖ and - (10) The UACI is used to measure the averaged intensity change for pixels in cipher-text images after making a slight change in a plaintext image.It is demonstrable that the UACI of an ideal cipher for 8-bit gray images is about 0.3346.Therefore, the UACI is calculated by using the following formula -(11)‖: www.ijacsa.thesai.org    ; a bipolar array is defined as -(10)‖.Table V shows the results of NPCR and UACI for one pixel change in the following standard images.It is clear that, the proposed cipher has good performances in both the NPCR and UACI analyses.Simulation results fit the expectations of the ideal cipher very well.
As one can see, the NPCR and UACI values in the proposed algorithm are close to G. Gu, J. Ling [10]   Time complexity has become more and more important issue when the scale of an application grows.So, [19] it is the relation of computing time and the amount of input.Time complexity of an algorithm signifies the total time required by the program to run to completion.In ''computational complexity theory", intuitively the "computational" part means problems that can be modeled and solved by a computer.-The main idea of algorithm's analysis [20] is to have a measure of efficiency of algorithms that doesn't depend on machine specific constants, and doesn't require algorithms to be implemented and time taken by programs to be compared‖.
Formally, the time complexity ( ( )) of the proposed algorithm can be calculated using the following formula:

VIII. CONCLUSIONS
This paper develops an improving permutationsubstitution image encryption architecture, based on a chaotic 3D cat map and Turing machine in the form of dynamic random growth technique.A new block encryption scheme was proposed for secure digital images that included two primary processes, Turing machine for substation and a chaotic 3D cat map for pixels permutation.Many statistical tests were operated to prove the suitability of the algorithm.Experimental tests and statistical analyses have shown effectiveness and robustness of the presented scheme against various attacks; prove that our introduced technique is pretty fast image encryption.According to theses pretty characteristics, the proposed encryption scheme may be convenient for different applications, and demonstrate that it reaches a high-security level while transmitting of digital images over the open network.The results of the comparison show that the proposed scheme has more benefits compared to these algorithms of G. Gu, J. Ling [8] and X. Wang et al. [10] ciphers.

Fig. 1 .
Fig. 1.General Encryption-Decryption Mechanism leading Lyapunov exponent is strictly positive since and given by ln 1


. And so on.-Fig.2‖presents the flow diagram of the encryption algorithm.There are four ways to represent Turing Machine which are be from either right-to-left, or right-to-left inverse, or left-toright, or left-to-right inverse.

Fig. 2 .
Fig. 2. Flow Diagram of Process of Left-to-Right Turing Machine , choose at random three initial value   b ab y z x y xz which are served as secret keys.

1, 2
, ..., 204, n c  we get three pseudorandom chaotic key stream values   of "(3)".d) The chaotic sequence S z is produced using the pseudorandom chaotic key stream value 1 z which is generated by "(3)".In order to avoidance fleeting effects, neglect the first 200 values resulting from iterating 3D cat map.e) Let [8]: sum for the original blue layer of each block; since ij S B represents the pixels' values of blue layer B at position   , ij to affect the resulted values of a 3D separate chaotic cat map.g) Perform the confusion procedure to the lower part of the size low low ii  of each of the four sub-images of the plainimage using 3D chaotic map respectively."This is the so called [8] dynamic random growth technique, since the size of the lower part of each block of the plaintext image permuted by 3D chaotic map is random."h) Operate confusion operation to the whole each subblock by 3D chaotic map.4) Substitution Operation: In this procedure, the pixels' values are altered by performing Turing machine on each block of the four sub-images.This process can be achieved through the following steps: a) While confusing pixels' values in permutation process, performing Turing machine (TM) either from left-toright or vice versa.b) We convert every pixel value to a binary number B of 8 bit lengths.

Fig. 3 .
Fig. 3. Flow Diagram of Process of the Introduced Encryption Scheme x y z ; ③ preprocess parameter n c of a chaotic 3D cat map, and then it is around 392 2

Fig. 5 .
Fig. 5. Encryption and decryption results: Left side with original image, center with encrypted image, and right side with deciphered image of Splash image

Fig. 9 .
Fig. 9. Correlation chart.Upper frame with horizontal distribution, center with vertical distribution, and lower with diagonal distribution.Left side with Lena tested image, right side the proposed technique m m m m m  Consequently, the time complexity for the proposed scheme is 1.For example, if it reads  1111 0110  it should give  1111 0111  .If it reads  0001 0011  it should give  0001 0100  .If it reads  1111 1111  it should give  0000 0000 www.ijacsa.thesai.org

TABLE II .
CORRELATION COEFFICIENTS OF ADJACENT PIXELS IN SPLASH IMAGE

TABLE III
and better than X.Wang et al. algorithms as shown in Table VI.

TABLE V .
THE NPCR AND UACI OF CIPHERED IMAGES WITH ONE BIT DIFFERENT BETWEEN THE PLAIN IMAGES

TABLE VI .
THE NPCR AND UACI PERFORMANCE