Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# A hybrid genetic algorithm and chaotic function model for image encryption

1,247
views

Published on

A hybrid genetic algorithm and chaotic function model for image encryption

A hybrid genetic algorithm and chaotic function model for image encryption

Published in: Education, Technology

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total Views
1,247
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. A HYBRID GENETIC ALGORITHM AND CHAOTIC FUNCTION MODEL FOR IMAGE ENCRYPTION SADIQUE NAYEEM, M.Tech. Pondicherry University
• 2. Introduction  A new method based on a hybrid model is proposed for image encryption which is composed of a genetic algorithm and a chaotic function.  In the first stage, a number of encrypted images are constructed using the original image and the chaotic function.  In the next stage, these encrypted images are used as the initial population for the genetic algorithm.  In each stage of the genetic algorithm, the answer obtained from the previous iteration is optimized to produce the best-encrypted image ( with the highest entropy and the lowest correlation coefficient among adjacent pixels). 2
• 3. Terminology  Genetic algorithm  Entropy of an image  Histogram of an image  Chaotic function  Correlation coefficient among adjacent pixels 3
• 4. Genetic algorithms  Genetic algorithms which mimic principle of evolution in nature, search for final solutions among a population of potential solutions.  The best solutions are chosen in each generation.  These solutions, after mating, produce a new set of offspring.  At the beginning, the initial population is randomly formed, and the fitness function evaluates every population.  Optimum result is not met, new generations are produced through the process of recombination and mutation.  The more suitable generations are selected to produce new generations until the optimum result is obtained. 4
• 5. Entropy of an image  Entropy is a statistical measure of randomness that can be used to characterize the texture of the input image.   It is one of the prominent features in randomization and can be calculated as:  where N is the number of gray levels used in the image (for gray level images, N is 8), and P(Si) shows the probability of having a ith gray level in the image.  Matlab Code: ‘E = entropy(I)’  In images that are produced completely randomly, N will be 8, and this N is considered as an ideal value. 5
• 6. Histogram of an image.  The histogram of an image refers to the frequency of any gray level in it.  This feature is one of the most important statistical features of an image. 6
• 7. Chaotic function  Chaotic functions are similar to noise signals, but they are completely certain; that is, if we have the primary quantities and the drawn function, the exact signal can be reproduced.  Advantages:  Sensitivity to primary conditions  Apparently accidental feature  Deterministic work 7 Logistic Map Signal r=3.999 (Completely Chaotic)
• 8. Correlation coefficient among adjacent pixels  The correlation coefficient matrix represents the normalized measure of the strength of linear relationship between variables. The variable can be the two adjacent pixel. Correlation coefficient is given by: 8 The correlation coefficients range from -1 to 1, where Values close to 1 suggest that there is a positive linear relationship between the data columns. Values close to -1 suggest that one column of data has a negative linear relationship to another column of data. Values close to or equal to 0 suggest there is no linear relationship between the data columns.
• 9. THE PROPOSED METHOD FORMATION OF THE INITIAL POPULATION GENETIC OPTIMIZATION 9
• 10. Formation of the initial population  To form the initial population from the plain-image, first the plain- image is divided into four equal parts.  The chaotic function logistic map is employed to separately encrypt all of the pixels present in each of these four parts as follows: 1. Five pixels are selected as the encryption key for forming the initial value of the logical map function and for encrypting that part of the image. 10
• 11. Formation of the initial population cont.. 2. The initial value of the chaotic function logistic map is determined by taking five pixels as under: P = [P1, P2, P3, P4, P5] (gray scale). Convert P into an ASCII code: B = [P1,1, P1,2, P1,3, . . ., P5,7, P5,8] The initial value of the logistic map function(U0k), which lies in the interval 0–1, is obtained. 11 3. For each part of the plain-image, step 2 is repeated. Therefore, in the end, there will be 4 different initial values for each image (one value for each part of the image).
• 12. Formation of the initial population cont… 4. For encrypting the pixels in each part of the image, the initial value of that part and Eq. is used as follows: The symbol ⊗ represents XOR. OldValue stands for the current value of the pixel. NewValue shows the new value of the pixel after it is encrypted. The value of Uikrefers to the ith value of the chaotic function in the kth part of the original image, determined for each step using Eq.  All of the pixels in each part, except the five pixels used as the key, are sequentially (row-by-row) encrypted in this manner.  To build the rest of the population, steps one through four are repeated. 12
• 13. First generation of the genetic population 13
• 14. Genetic optimization  Crossover:  After forming the initial population, the genetic algorithm is used to optimize the encrypted images.  (a)&(b) are the input images.  (c)&(d) are images after crossover. 14
• 15. Fitness function  The fitness function used is the correlation coefficient between pairs of adjacent pixels of the image.  At each stage, the new generations are produced and the previous ones are evaluated using the fitness function.  The generation is required to have the lowest correlation coefficient for the encrypted image to be as the final cipher-image. 15
• 16. Selection  50% of the population with the minimum correlation coefficient + 10% of the remaining population are selected for the next generations.  Non-Elites are not selected.  Therefore, 10% of the remaining population are chosen arbitrarily to help the selected elites from 90% to produce new generations.  This process is repeated until the correlation coefficient of the best generation produced does not significantly change in two successive stages.  After this stage, the generation that has the lowest correlation coefficient is encrypted as the final cipher-image. 16
• 17. Example… 17 Plain-image Plain-image divided into fourequal parts.
• 18. Example… cont..  A matrix with dimensions 12 × 12 is used in which the numbers are in the interval [0, 7].  The first five pixels of the first row of each part are used in determining the initial value of the chaotic function logistic map.  The first five pixels of the first part of the image are (3, 1, 7, 6, 2)  P=[ 2, 6, 7, 1, 3 ] 18
• 19. Example… cont.. 19 First generation Second generation
• 20. Example… cont.. 20 Third generation aftercrossover Forth generation after crossover.
• 21. EXPERIMENTAL RESULTS21 1. ANALYSIS OF THE ENTROPY OF THE IMAGE 2. HISTOGRAM ANALYSIS 3. ANALYSIS OF THE CORRELATION COEFFICIENT 4. ANALYSIS OF THE FITNESS FUNCTION 5. KEY ANALYSIS
• 22. Test conducted  Gray level images with dimensions of 256 × 256.  The initial number of the population for GA = 128.  The crossover operation rate = 90%  Mutation operation rate = Zero. 22
• 23. 1. ANALYSIS OF THE ENTROPY OF THE IMAGE Entropy is a statistical measure of randomness of the pixels 23
• 24. 2. HISTOGRAM ANALYSIS  Fig. 8. (a) Plain-image, (b) cipher-image, (c) histogram of plain-image, and (d) histogram of cipher-image. 24
• 25. 2. HISTOGRAM ANALYSIS CONT… 25 Fig. 9. (a) Plain-image, (b) histogramof plain-image, histogramof image after, (c) 2nd iteration, (d) 25th iteration, and (e) 70th iteration.
• 26. 3. ANALYSIS OF THE CORRELATION COEFFICIENT  In a good encryption algorithm, the correlation coefficient between pairs of encrypted adjacent pixels in the horizontal, vertical, and diagonal positions are as small as possible.  To test the correlation coefficient between two adjacent vertical pixels, two adjacent horizontal pixels, and two adjacent diagonal pixels in a cipher-image, the following procedure was used: first, 2500 pairs of pixels were randomly selected. Then, the correlation coefficients were obtained using Eq. 26
• 27. 3. ANALYSIS OF THE CORRELATION COEFFICIENT 27 Fig:(a) Correlation analysis of plain-image and (b) correlation analysis of cipherimage.
• 28. 3. ANALYSIS OF THE CORRELATION COEFFICIENT  In another test, the results of the correlation coefficients of two adjacent pixels in the vertical, horizontal, and diagonal positions were investigated in each of the different iterations.  The results obtained for the correlation coefficients in this method are far better than those of the methods of [22,24,25] 28
• 29. 4. ANALYSIS OF THE FITNESS FUNCTION  Selection of the fitness function in genetic algorithms is one of the most important and most influential elements for achieving the desired result.  Tests conducted showed that the correlation coefficient is a better optimizerthan the function of the entropy of the image.  As observed in this table, when the correlation coefficient is used as the fitness function, the degree of entropy and the correlation coefficient of the image are better than when entropy is used as the fitness function. 29
• 30. 5. KEY ANALYSIS  For a good encryption algorithm, key must be long enough to resist brute-force attacks.  A 40-bit key is suggested which produces a key space equivalent to 2^40. 30 Fig: (a) Plain-image, (b and c) encrypted images using userkeys with 1-bit difference in each part, (d) the similarity between (b) and (c), (99.76% different.)
• 31. KEY ANALYSIS CONT…. 31 Fig: Percentage of difference between encrypted images versus iterations.
• 32. Decryption  The decryption of encrypted images is possible if the chaotic function logistic map and the numbers of the population (or the numbers of the two populations) from which the final image is composed are known. 32
• 33. Conclusions  A new method has been suggested for encrypting images with a chaotic function logistic map and a genetic algorithm.  In this method, the chaotic function is employed for initial encryption, and the genetic algorithm is used to improve the encryption process of the image.  The main innovation in this paper is that this is the first time genetic algorithms are used in this manner to encrypt images.  The results obtained for the correlation coefficients and the entropies of the images proved the high efficiency of this method.  This algorithm can be used in the future with a new crossover operatoror with anotherfitness function to encrypt images. 33
• 34. My Idea for further enhancement  Use of RGB image  Separate the Red, green and blue component.  Use the chaotic function logistic map to encrypt the each component.  Do the crossover among each component.  Use “Intensity Profile” as the fitness function. 34
• 35. 35