Upload
sadique-nayeem
View
223
Download
0
Embed Size (px)
Citation preview
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
1/35
A HYBRID GENETIC ALGORITHM AND
CHAOTIC FUNCTION MODEL FOR IMAGE
ENCRYPTION
SADIQUE NAYEEM,M.Tech.
Pondicherry University
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
2/35
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 lowestcorrelation coefficient among
adjacent pixels).
2
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
3/35
Terminology
Genetic algorithm
Entropy of an image
Histogram of an image
Chaotic function Correlation coefficient among adjacent pixels
3
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
4/35
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 thefitness 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 newgenerations until the optimum result is obtained.
4
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
5/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
6/35
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/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
7/35
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)
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
8/35
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.
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
9/35
THE PROPOSED METHOD
FORMATION OF THE INITIAL
POPULATION
GENETIC OPTIMIZATION
9
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
10/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
11/35
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 01,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).
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
12/35
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 ofUik refers 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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
13/35
First generation of the genetic population
13
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
14/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
15/35
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 andthe previous ones are evaluated using the fitness
function.
The generation is required to have the lowest correlationcoefficient for the encrypted image to be as the final
cipher-image.
15
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
16/35
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 arbitrarilyto 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 correlationcoefficient is encrypted as the final cipher-image.
16
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
17/35
Example
17
Plain-image Plain-image divided into four equalparts.
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
18/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
19/35
Example cont..
19
First generation Second generation
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
20/35
Example cont..
20
Third generation after crossover Forth generation aftercrossover.
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
21/35
EXPERIMENTAL
RESULTS21
1. ANALYSIS OF THE ENTROPY OF THE
IMAGE
2. HISTOGRAM ANALYSIS3. ANALYSIS OF THE CORRELATION
COEFFICIENT
4. ANALYSIS OF THE FITNESS FUNCTION
5. KEY ANALYSIS
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
22/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
23/35
1. ANALYSIS OF THE ENTROPY OF THE
IMAGE
Entropy is a
statistical measure of
randomness of the
pixels
23
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
24/35
2. HISTOGRAM ANALYSIS
Fig. 8. (a) Plain-image, (b) cipher-image, (c) histogram of plain-image, and (d)
histogram of cipher-image.
24
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
25/35
2. HISTOGRAM ANALYSIS
CONT25
Fig. 9. (a) Plain-image, (b) histogram of plain-image, histogram of image after, (c) 2nd iteration, (d) 25th iteration, and
(e) 70th iteration.
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
26/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
27/35
3. ANALYSIS OF THE CORRELATION
COEFFICIENT27
Fig:(a) Correlation analysis of plain-image and (b) correlation analysis of
cipherimage.
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
28/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
29/35
4. ANALYSIS OF THE FITNESS
FUNCTION
Selection of the fitness function in genetic algorithms is one of themost 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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
30/35
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
user keys with 1-bit difference in
each part,
(d) the similarity between (b) and(c), (99.76% different.)
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
31/35
KEY ANALYSIS CONT.
31
Fig: Percentage of difference between encrypted images versus
iterations.
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
32/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
33/35
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 another fitness function to encrypt images.
33
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
34/35
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
7/29/2019 A Hybrid Genetic Algorithm and Chaotic Function Model for Image Encryption
35/35
35