Sunteți pe pagina 1din 21

Image Authentication using

Genetic Algorithm

23 November
2015

Guided by
Prof. Manik Lal Das

By-Arjun Londhey
ID-201411024

Contents
1. Overview
2. Previous Work
3. Authentication Properties
4. Key analysis
5. Future Work
6. References

Message Authentication
Used to verify the integrity of a message.
Message authentication assures that data received are
exactly as sent by (i.e., contain no modification, insertion,
deletion) .
The two most common cryptographic techniques for
message authentication are a message authentication
code (MAC) and a secure hash function.
A MAC is an algorithm that requires the use of a secret
key. A MAC takes a variable length message and a secret
key as input and produces an authentication code.
A hash function maps a variable-length message into a
fixed length hash value, or message digest. For message
authentication, a secure hash function must be combined
in some fashion with a secret key.

Why Authentication?
if public-key encryption is used:
encryption provides no confidence of sender
since anyone potentially knows public-key
however if
sender signs message using their private-key
then encrypts with recipients public key
have both secrecy and authentication
again need to recognize corrupted messages

Message Authentication Code


(MAC)
Generated by an algorithm that creates a
small fixed-sized block
depending on both message and some key
like encryption though need not be reversible

Appended to message as a signature


Receiver performs same computation on
message and checks it matches the MAC
Provides assurance that message is
unaltered and comes from sender

Message Authentication
Code
Source
Destination
M

||
Key

M
C

Fig. Message
Authentication

Key

Compare

Method Used

(1)

1. Obtain the size of image to be authenticated. Split


the image into set of N vectors of each length L.
2. Find the values of R1 and R2, Assume the values as
the start values of any random number generation
algorithm used.
3. Select two variables x and y and set x= R1 and
y=R2, for each vector I=0 to N-1 set the following:
.Crossover Index=x
.Crossover Iteration=V(x).
.Mutation Index=y
.Mutation Iteration=V(y)

(1)Al husainy,2006. Image Encryption Using Genetic Algorithm. The 2006 Information Technology jou

Method Used
4. If x or y > L , set x=0 and y=0. Perform Crossover and
mutation operation for each vector Vi from set of N.
5. Crossover Operation: For j=0 to Crossover Iteration of vector
Vi, generate two random number N1 and N2, then perform
crossover on Vi(N1) and Vi(N2) to produce two offspring,
fitness is calculated.
6. If the offspring's fitness is greater than the parent fitness
than the parent would be replaced with their offspring.
Crossover rate depends on the nature of the image.
7. Mutation Operation: For j=0 to Mutation Iteration of vector V i
generate one random vector N1 with value between (0 to L-1)
then perform two-point mutation on it , if the fitness value is
greater than the original than replace it with new one.

Method Used
7. The process is repeated till a fitness
value is reached or the sufficient
number of repetitions are reached.
8. Fitness value here is the minimum
correlation coefficient of the adjacent
pixel of the image.

Step1. Divide the image into N vectors of

V1
V2
V3
V4
V5
V6
V7
V8
V9
V10

26

28

32

39

41

35

32

98

94

47

15

18

19

17

21

25

26

27

20

18

27

29

23

20

29

21

26

29

23

20

52

59

64

69

72

76

79

84

86

89

84

83

70

69

64

76

79

70

64

60

75

79

84

83

82

87

81

89

92

95

51

49

53

59

51

59

67

63

60

69

69

61

59

57

53

50

56

59

51

49

32

39

42

46

49

38

37

34

36

38

48

49

42

40

46

49

43

47

49

44

equal size
ie V1,V2,V3V10.
Step2. Choose two random values R1 and R2
(5 and 9)
Step 3.
Crossover Index=x
Crossover Iteration=V(x).
Mutation Index=y
Mutation Iteration=V(y)
Set x=R1 and y=R2.
V(5)=41 and V(9)=94

Step 4
Fig. Image intensity values

For each vector in the image:


For(i=0 to 41)
Do crossover operation
For(i=0 to 94)
Do mutation operation
Increment R1 and R2 for each vector.

Crossover operation
V1
V2
V3
V4
V5
V6
V7
V8
V9
V10

2
6

2
8

3
2

1
5

1
8

2
7

V1(5
3 ) 4
3

V1(8)

1
9

1
7

2
1

2
5

2
6

2
7

2
0

1
8

2
9

2
3

2
0

2
9

2
1

2
6

2
9

2
3

2
0

5
2

5
9

6
4

6
9

7
2

7
6

7
9

8
4

8
6

8
9

8
4

8
3

7
0

6
9

6
4

7
6

7
9

7
0

6
4

6
0

After crossover:

7
5

7
9

8
4

8
3

8
2

8
7

8
1

8
9

9
2

9
5

V1(5)=

5
5
6
6
6
intensity
values
1
9
7
3
0

6
9

V1(8)=

V1(5)= 105 and V1 (8)= 34

5
1

4
Fig.
9

5
5
Image
3
9

9
8

9
4

4
7

Crossover operation:
Selected random number: 5 and 8
Crossover Iteration: V1(5)=41 and V1(8)=98

3
2

6
9

6
1

5
9

5
7

5
3

5
0

5
6

5
9

5
1

4
9

3
2

3
9

4
2

4
6

4
9

3
8

3
7

3
4

3
6

3
8

4
8

4
9

4
2

4
0

4
6

4
9

4
3

4
7

4
9

4
4

V1(5)=

0 0 1 0 1 0 0 1

V1(8)=

0 1 1 0 0 0 1 0

0 1 1 0 1 0 0 1
0 0 1 0 0 0 1 0

Mutation operation
V1
V2
V3
V4
V5
V6
V7
V8
V9
V10

2
6

2
8

3
2

1
5

1
8

2
7

V1(5
3 ) 4
3
9

3
2

1
9

1
7

2
1

2
5

2
6

2
7

2
0

1
8

2
9

2
3

2
0

2
9

2
1

2
6

2
9

2
3

2
0

5
2

5
9

6
4

6
9

7
2

7
6

7
9

8
4

8
6

8
9

8
4

8
3

7
0

6
9

6
4

7
6

7
9

7
0

6
4

7
5

7
9

8
4

8
3

8
2

8
7

8
1

8
9

6
9

6
1

5
9

5
7

5
3

5
0

3
2

3
9

4
2

4
6

4
9

4
8

4
9

4
2

4
0

4
6

5
1

9
8

9
4

4
7

Mutation operation:
Selected random number: 5
Mutation Iteration: V1(5)=41
V1(5)=

0 0 1 0 1 0 0 1

6
0

V1(5)=

0 1 1 1

9
2

9
5

After Mutation:

6
9

V1(5)= 121

5
6

5
9

5
1

4
9

3
8

3
7

3
4

3
6

3
8

4
9

4
3

4
7

4
9

4
4

Fig.
values
9 Image
3
9 intensity
1
9
7
3
0

0 0 1
1

Authentication using Genetic Algorithm


Destination

Source

Imag
e

E(Imag
e)

E(Imag
e)

E(Imag
e)

D(Imag
e)

Digest

Digest

Digest
GA

GA
Compress function
Diges
t

Image

Compar
e

Compress functio
Diges
t

Hash Functions
condenses arbitrary message to fixed
size
usually assume that the hash function is
public and not keyed
hash used to detect changes to message
can use in various ways with message

Hash Properties
A cryptographic hash function must have the following properties:
Pre-image resistance:
Given a hash value h it should be difficult to find any message m
such that
h=hash(m).
Second pre-image resistance
Given an input m1 it should be difficult to find different input m2
such that hash(m1)= hash(m2).
Collision Resistance
It should be difficult to find two different messages m 1 and m2
such that hash(m1)=hash(m2).Such a pair is called a
cryptographic hash collision.

EXPERIMENTS
Correlation Coefficient [2]
A good algorithm is one in which the correlation coefficient between pairs of
encrypted adjacent pixels in the horizontal and vertical directions are at the least
possible level. The correlation coefficient is calculated by using following equation.

rxy =
In the above relation x and y are the gray levels in two adjacent pixels of the image.
In calculating the correlation coefficient, the following equations are employed:
cov(x,y)= (xi E(x))(yi E(y))
E(x)=

D(x)= i-E(x))2
R. Enayatifar, Image security via Genetic Algorithm, in proceeding of International conference on computer
and software modeling, Singapore (2011).
[2]

Experiment and Results

Fig1. image size(512*512)

Original Image and image after GA operations

Image

Horizon Vertical
tal
correlatio
correlat n
ion

Average

Original
image

0.9478

0.9482

0.948

image after
GA
operations

0.0232

0.0149

0.01905

Image

Horizon Vertical
tal
correlatio
correlat n
ion

Average

Original
image

0.9647

0.9632

0.9639

image after
GA
operations

0.0356

0.0453

0.04045

Fig2. image size(80*80)

Original Image and image after GA operations

Results
Image
size

Image 1

GA
SHA160

SHA256

80*80

24.681

27.0612

27.875

79.430408

128*128

218.8419

223.9713

232.264

190.292

256*256

4164.149

4875.9840

4964.8140

2844.789

512*512

13387.652 15670.816 16281.24


8261.896
3
Table1. Running
time 53504.027
comparison of
GA with other
standard Algorithms(Image
1
1024*1024
63043.264
65124.96
34562.481
Image
size

Image 2

MD5

MD5

GA
SHA160

SHA256

80*80

25.181

26.1904

27.1875

79.634

128*128

219.389

229.9561

239.1814

208.864

256*256

4131.1538

4864.189

5232.161

3122.2089

512*512

14135.238

15320.816

16142.41

9067.584

1024*1024 49841.16
62481.189 65018.296 36270.481
Table2. Running time comparison of GA with other standard Algorithms(Image 2

Key Analysis
A suitable algorithm must be sensitive to small
change in keys.
Key must be long enough to resist brute force
attack
In this study a 512 byte key size is used.
Produces key space equivalent to 2512*8 .
Sensitivity of the key is tested by using the GA
method on an image.
The same image is passed again through GA
method but this time with 1 bit change in the key.
The two images are 99.23% different.

Future Work
Implement a unique compression
function required to convert
Authenticated image into message
digest output.
To explore the security of the
Authentication algorithm used.

References
Mohammed A.F. Al-Husainy, Image encryption using Genetic Algorithm,
Information Technology Journal 5 (3): 2006, 516-519.
R. Enayatifar, Image security via Genetic Algorithm, in proceeding of
International conference on computer and software modeling, Singapore
(2011).
A.H. Abdullah, A hybrid genetic algorithm and chaotic function model for
image encryption, in Int. J.Electron. Commun.(AEU) 66 (2012), 806-816.
R.Z. Wang, Image hiding by optimal LSB substitution and genetic
algorithm, in Pattern Recognition 34 (2001), 671-683.
Lafe O. Data compression and encryption of compressed images and
videos, in IEEE Transactions on Signal Processing 2000 48(8), 2439-51.
S.A.N Gilani , Enhanced block based color image encryption technique
with confusion, in proceedings of IEEE International Multitonic conference
2008, 200-206

S-ar putea să vă placă și