Images Encryption Using Chaos and Random Generation

Due to the network and multimedia application development information security become important since information can be attacked over the transmission channels and the combination of cryptography and chaotic become important filed of information security, where many encryption algorithm are based on chaotic mapping due to the inherent features of image like high redundancy and bulk data capacity. In this paper, three chaotic maps are used to achieve good diffused image by setting the initial conditions to generate the shuffling sequence randomly by 2D zaslevskii map and employ them in 2D cat map for shuffling the image pixels positions, also baker map is used to decomposed image into four rectangles and shuffle them. To increase the security level of the encryption algorithm Geffe random key generator is used to generate 128 bit key and employ it with exclusive-OR equation to the diffused image. The results indicated that the combination of chaotic and cryptography proved to be good for high security level. All the experimental results show that the proposed algorithm is secure due to the large key space and the high sensitivity to the secret key


‫العشوائي‬ ‫التوليد‬ ‫و‬ ‫الفوضى‬ ‫نظرية‬ ‫بأستخدام‬ ‫الصور‬ ‫تشفير‬
Traditional encryption schemes such as RSA, AES and DES are not suitable for image encryption because they have weakness of lower level efficiency when the image is large and the images inherent features like bulk data capacity and elevated data redundancy [1,2].
Due to the important properties of chaos signals they are conceded good for image encryption and increases the robustness of cryptosystem against statistical attacks.These properties includes pseudo-random, non-periodicity and high sensitive to system parameters and initial conditions, etc.Therefore, combining cryptography with chaotic theory is concedered one of the important fields in information security [3,4].
The chaos based encryption algorithm lead to new efficient ways to develop images security schemes to satisfy the demand secure image transmission over the communication channel.Therefore, many encryption algorithms are based on chaotic maps like a standard map, Logistic map, Zaslavskii map, Cat map, Baker map, Henon map, Chen map, etc.So, as to get better security performance of image encryption algorithm, the concept of diffusion is used to change the pixels position of plain image and confusion is used to change the gray level value of diffused image [3,5].
In recent years, many researches studied the image security system using chaos and random generators, such as: Lv et al. [6], designed a scheme that employ henon and cat maps to encrypte the original image by confusing and diffusing the image pixels positions and values.Banthia et al. [7], used random number generator to generat key for shuffling and logistic map to generat index for shuffling then combined the two methods.Mishra et al. [4], presnt an algorithm based on combination of pixel shuffling and three chaos map for encryption.
In this paper, three chaotic maps are used to achieve good diffused image and random key generator is used for confusion to increase the security level of the proposed encryption algorithm.

CHAOTIC MAPPING
The chaos maps used in the proposed scheme are summarized as the following: a) Zaslavskii Map The 2D Zaslavskii map is a discrete-time dynamical system, and is defined as [8]: The statistical properties of the generated sequence of Zaslavskii map can be improved by the preprocessing equations defined as [9]: where Floor(x,y) returns the value of x to the nearest integer, mod(x,y) returns the reminder of the division and abs(x n , y n ) returns the absolute value of x,y.The preprocessed sequence lead to a batter balance distribution and better correlation properties also they can be used in the encryption process.

b) Baker Map
The baker's map from the unit square into itself.The name baker's map comes because it is similar to baking process, and it is defined as [3]: where, F is found by cutting [0, 1) 2 into two vertical rectangles R0 = [0, 1/2) × [0, 1) and R1 = [1/2, 1)×[0, 1), these rectangles are stretched and compressed to produce an interval of horizontal width 1 and vertical height 1/2 and then place them on top of each other.

c) Cat Map
The cat map is a 2-D invertible chaotic map, it uses two parameters and can be defined as [10]: where, a, b are positive integers stand for the control parameters, x,y is the old pixel position and x',y' is the new pixel position.The cat map is applied to the original image and pixel positions are shuffled, after several iterations the image will be meaningless and distorted and the correlation among adjacent pixels is completely disturbed.But, after iterating many times the original image will be returned due to cat map periodicity [2,11].To deal with this problem a, b parameters are generated randomly by using a 2-D Zaslavskii map.

Random Generator
Several computational methods for random number generation are carefully designed to generate a sequence of numbers or symbols.In this proposal Geffe random generator is used to generate keys for confusion.
Geffe generator uses three LFSRs mutual in a nonlinear manner [12].Two of the LFSRs are input into a multiplexer, and the third LFSR controls the output of the multiplexer.If LFSR1, LFSR2 and LFSR3 are the outputs of the three LFSRs, then the output of the Geffe Generator (result) is found using the nonlinear function given by the equation: From the 'result' of this equation any number of bits can be taken to form the random sequence.The procedure can be repeated to produce more random numbers so that the length of the random sequence produced can be increased as desired, see Figure 1., [12].

Figure 1: Geffe Generator The Proposed Algorithm
The high correlation among image adjacent pixels is considered as a weak point in image security, to overcome this weakness the correlation need to be disturb completely.An image diffusion and confusion scheme is proposed to accomplish this.The diffusion and confusion are the two main steps of the proposed image encryption algorithm.First in diffusion scheme 2D cat map and baker map are used to shuffle the image pixel position then to increase the security level, confusion scheme is used to change the pixel value of the diffused image by using randomly generated key and exclusive-OR equation.
In this proposed algorithm, control parameters and key are generated randomly first by generating x, y sequence by 2D zaslavskii map, then preprocessed them to obtain a, b sequence.First, the map of the Equations ( 1), ( 2) are iterates 1000 times with initial conditions as: X0= 0.01, Y0= 0.01,  =12.6695,  =0.3,  =3.0, these 1000 values of x, y are discarded to overcome the cat map periodicity weakness.The map iterated again n times to produce x i and y i, where n is the image size i= 1, 2 … n. then x i , y i are preprocessed by Equations ( 3), (4) to produce a i , b i control parameter.Second, the key is generated by Geffe generater, this is done by taking two random 8X8 matrices and multiply them to prudence one matrix then select the first three rows from the matrix where each row will be convert to binary and used as the input for the linear feedback register (LFSR).Then, after creating the LFSRs for Geffe generator as initial seeds to generate the key by Equation (9).
The encryption algorithms are sensitive to keys and control parameters a i , b i and key are made sensitive, so the diffusion and confusion schemes become sensitive to the minor change in keys and the attacker cannot obtain the original image without the secret key.The following steps illustrate image encryption scheme: Step 1.Let the plain image I 0 (x, y) of size NxN the input to be diffused, where x, y=1, 2, 3… N.
Step 3. Apply cat map Equations ( 7), ( 8) within each block Bi by the use of control parameters a i , b i to shuffle the pixels within each block and this step is done n time to obtain partially diffused image I 1 (x, y).
Step 4. Apply baker map within whole diffused image I 1 (x, y) to produce four stretched and compressed rectangles R 0 R 1 R 2 R 4.
Step 5. Apply cat map Equations ( 7), ( 8) within each rectangle twice using the control parameters a j , b j to obtain a partially diffused image I 2 (x, y), where j= 1, 2 … r, and r is the rectangle size.
Step 6. Apply cat map Equations ( 7), (8) within complete image I 2 (x, y) by the use of control parameters ai, bi to shuffle pixels, this step is done n time to obtain a final diffused image I 3 (x, y).
Step 7. Convert the diffused image I 3 (x, y) into binary Db (x, y) , where x, y= 1, 2 … N and generate the binary key Kb i using Geffe generator, where i= 128 bit is the key size.The diffused image is encrypted by: (10), where Eb(x, y) is the binary equivalent of a confused image within the pixel coordination (x, y) and the sign  symbolizes the exclusives-OR operation.The binary encrypted image Eb(x, y) is converted to decimal to obtain the confused image I 4 (x, y). Figure (2) shows the block diagram of the proposed scheme.To reconstruct the original image apply the algorithm steps in reverse order.

Histogram Analysis
The statistical features of images are presented using histogram that plots the occurrences frequency of image pixel value, this analysis is done to compare original and encrypted images where there should be no similarities between original image and encrypted image histograms.The  The correlation coefficient between adjacent pixels of an encrypted image can be calculated using the following equation [13]: )) where x, y are the gray level value of two adjacent pixels in an encrypted image and L is the number of pixels involved in calculation.The adjacent pixels either selecte horizontally, vertically, or diagonally.The closer correlation coefficient value to zero is, the better quality of encryption algorithm.1.The value of correlation coefficients of the original image are equal to 1, indicating that high correlation exists among adjacent pixels, while the correlation coefficients of diffused and confused images are close to 0, i.e., there is a highly uncorrelated adjacent pixels in the encrypted image.

b) Analysis of Key Space
The key space indicate the entire number of keys that are possible to use in an encryption algorithm.In order to resist any attack this key should be as large as possible.The encryption algorithm should be sensitive to all secret keys.In diffusion scheme, the initial five parameters of Zaslavskii map are {x 0 , y 0 ,    , , } for each 8 bits so the total binary key size is 40 bits.In confusion scheme key of 128 bits is used where the key was randomly generated by Geffe genretor and LFSR using two randomly selected matrices as input.In such case the key space is 2 168 and it is large enough to fight the attack.

c) Analysis of Key Sensitivity
A high-quality encryption algorithm should be sensitive to a small change in secret keys, where such change leads to completely different decrypted image.To evaluate the key sensitivity property of the proposed algorithm, the same key is used in decryption except that the value of x 0 is changed to 0.65 and the decrypted image, as shown in Figure 6.

CONCLUSION
An efficient image encryption and decryption algorithm based on combination of chaos and cryptography along with random generator is proposed in this paper.This combination proved to be good for high security level.All the experimental results show that the proposed algorithm is secure due to the large key space and the high sensitivity to the secret key.The algorithm demonstrated in this paper can be widely used in any information security areas.

,
where X n, Y n are current chaotic values and X n+1 , Y n+1 are the next produced chaotic values and and e stand for exponentiation.The Zaslavskii map key set is {X 0 , Y 0 , system is chaotic when the initial values are X0= 0.01, Y0= 0.01,  =12.6695,  =0.3,  =3.0 and X, Y sequence generated by iterating the Equations (1),(2) n times where n is the image size.

Figure ( 3 )
shows the original image with its histogram, Figure(4) shows the proposed diffusion scheme for n=2 with its histogram and Figure(5) shows result of proposed confusion schemes with its histogram.

Figure 6 :
Figure 6: Decrypted image with wrong key