image encryption using chaotic based cryptosystem

83

Upload: others

Post on 17-Oct-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM
Page 2: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

MUHAMAD LUQMAN NULHAKIM BIN MANSOR

BACHELOR OF COMPUTER SCIENCE (COMPUTER NETWORK SECURITY)

WITH HONORS

FACULTY OF INFORMATICS AND COMPUTING

UNIVERSITI SULTAN ZAINAL ABIDIN, TERENGGANU, MALAYSIA

MAY 2019

Page 3: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

i

CONFIRMATION

This Image Encryption using Chaotic Based Cryptosystem project report was

prepared and submitted by Muhamad Luqman Nulhakim bin Mansor (BTBL16043975)

and has meet the satisfactory in terms of scope, quality and presentation as partial

fulfillment of the requirement for the Bachelor of Computer Science (Computer

Network Security) with honours in University of Sultan Zainal Abidin.

Signature: …………………………………….

Supervisor: Prof Madya Dr. Afendee bin Mohamed

Date: .……………………………………

Page 4: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

ii

DECLARATION

This dissertation is submitted as a partial fulfilment for receiving a Bachelor of

Computer Science (Computer Network Security) with honours at University of

Sultan Zainal Abidin, Terengganu. The work is a result of my own research and

study. Texts, and results for all section was obtained from other sources, are fully

referenced.

Signature : …………………………………….

Name : Muhamad Luqman Nulhakim bin Mansor

Date : …………………………………….

Page 5: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

iii

ACKNOWLEDGEMENT

Alhamdulillah, in the Name of Allah, the Most Gracious and the Most Merciful.

This project could not have been conducted without the support, encouragement

and cooperation of many people. First of all, I would like to thanks to my supervisor,

Prof Madya Dr Afendee bin Mohamed who always supported and gave good ideas in

this project. I would like to thank her for giving the opportunity to learn under her

guidance, which has been the most memorable experience.

I would also like to take this opportunity to thank to my parents, friends and special

thanks to all lecturers of faculty of Informatics and Computing for their guidance and

good advice to help in the implementation of this project. May Allah S.W.T bless all

the effort that has been taken to finish this project.

Thank you.

Page 6: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

iv

ABSTRAK

Ini merupakan satu kajian yang telah dijalankan untuk menghasilkan projek dimana

ianya adalah mengenai Penyulitan Gambar menggunakan Kriptosistem berasaskan

Chaotic. Tujuannya adalah untuk mencipta satu persekitaran dimana penyulitan

gambar mempunyai unsur tambahan dengan mengadaptasikan ciri-ciri teori chaos.

Implementasi teori chaos didalam kriptosistem ini, dimana ia mempunyai elemen

yang tidak menentu dan sangat sensitif pada nilai awalan sesuatu perkara. Penyulitan

ini menggunakan kaedah kunci simetrik. Penjanaan kunci untuk setiap pixel gambar

diambil dari peta chaotic. Peta chaotic adalah satu fungsi matematik tidak linear

yang mengadaptasi elemen chaos, elemen yang tidak menentu, dan rawak

berdasarkan nilai awalan sesuatu perkara. Jika keadaan awalan berubah, ia akan

mengubah nilai akhir untuk fungsi tersebut. Tambahan pula, penyulitan ini dapat

membantu dalam menghasilkan satu persekitaran perkongsian gambar yang selamat

melalui rangkaian terbuka. Hal ini kerana data daripada gambar dan teks boleh

digodam oleh penggodam dalam rangkaian tersebut.

Page 7: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

v

ABSTRACT

This paper is a research on the proposed project about Image Encryption using Chaotic

Based Cryptosystem. The purpose is to create an image encryption environment with

additional features that exhibits from chaos theory. Where the element of uncertainty

and sensitive to initial condition is applied in this cryptosystem. This encryption used

symmetric key, where the key generation for every pixels of image use from chaotic

map. Chaotic map is a non-linear mathematical function that exhibit the uncertainty and

randomness based on the initial values. If the initial conditions change it will affect the

outcome result for the function. Furthermore, this encryption is to help to create a secure

image sharing environment via public network. This is because the image data or text

data can be tapped or eavesdropped by unwanted users in the network.

Page 8: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

vi

TABLE OF CONTENT

CONFIRMATION ...................................................................................................................... i

DECLARATION ....................................................................................................................... ii

ACKNOWLEDGEMENT ........................................................................................................ iii

ABSTRAK .................................................................................................................................. iv

ABSTRACT ............................................................................................................................... v

TABLE OF CONTENT ............................................................................................................ vi

LIST OF FIGURES ................................................................................................................ viii

LIST OF TABLES ................................................................................................................... xii

LIST OF ABBREVITIONS .................................................................................................... xiii

LIST OF FORMULAE ........................................................................................................... xiv

Chapter 1 .................................................................................................................................... 1

1.1. Background ................................................................................................................ 1

1.2. Problem Statement ..................................................................................................... 3

1.3. Objective .................................................................................................................... 4

1.4. Scope .......................................................................................................................... 4

1.5. Limitation of Work .................................................................................................... 4

1.6. Summary .................................................................................................................... 5

Chapter 2 .................................................................................................................................... 6

2.1. Introduction ................................................................................................................ 6

2.2. Chaos Theory and Chaotic Based Crypto-system ...................................................... 7

2.3. Previous Research .................................................................................................... 10

2.4. Summary .................................................................................................................. 16

Chapter 3 .................................................................................................................................. 17

3.1. Methodology ............................................................................................................ 17

3.2. Defining Phase ......................................................................................................... 18

Page 9: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

vii

3.2.1. Field of Study ................................................................................................... 19

3.2.2. Software Requirement ...................................................................................... 20

3.3. Planning Phase ......................................................................................................... 21

3.4. Designing Phase ....................................................................................................... 22

3.3.1. Flowchart Encryption ....................................................................................... 23

3.3.2. Flowchart Decryption ...................................................................................... 24

3.4. Development Phase .................................................................................................. 25

3.4.1. Encryption Phase .............................................................................................. 25

3.4.2. Decryption Phase ............................................................................................. 32

3.5. Analysis Phase ......................................................................................................... 36

3.5.1. Key Sensitivity Analysis .................................................................................. 37

3.5.2. Statistical Analysis (Histogram) ...................................................................... 38

3.5.3. Statistical Analysis (Correlation and Coefficient) ........................................... 40

3.5.4. Fixed Point Analysis ........................................................................................ 41

3.5.5. Intensity Analysis ............................................................................................. 41

3.6. Summary .................................................................................................................. 42

4.1. Introduction .............................................................................................................. 43

4.2. Cryptographic Scheme ............................................................................................. 43

4.2.1. Image Encryption Cryptosystem Scheme ........................................................ 44

4.2.2. Image Decryption Cryptosystem Scheme ........................................................ 47

4.3. Simulation ................................................................................................................ 49

4.3.1. Encryption Process ........................................................................................... 49

4.3.2. Decryption Process .......................................................................................... 53

4.4. Result Analysis ........................................................................................................ 56

4.4.1. Image Channel Analysis .................................................................................. 56

4.4.2. Image Histogram Analysis ............................................................................... 58

5.1. Summary .................................................................................................................. 63

References ................................................................................................................................ 65

Page 10: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

viii

LIST OF FIGURES

FIGURE TITLE PAGE

1 Pixel Size in 2.54 centimetre 5

2 Chaotic System’s Characteristics 8

3 Relationship of Chaos Theory and Cryptography 9

4 Histograms of the Plain Image and Encrypted Image 11

5 Model Encryption of Region Based Selective Image

Encryption

12

6 Region-based Encryption Result 13

7 Project Methodology 17

8 Defining Field of Study 18

9 General Overview of Proposed Cryptosystem 21

10 Encryption Operation for Proposed Cryptosystem 23

11 Decryption Operation for Proposed Cryptosystem 24

12 Input Plain-image and Image Channel Separation 25

13 Process for Image Channel Separation 26

14 Chaos Sequence Key Generation 26

15 Rossler System’s Equation (1) 27

16 Pixels Illustration 27

17 Channel Encryption 28

18 RGB Channel of Lena.png 29

19 Image Channel Merger 29

20 Process after Encryption for Different Image Channels 30

21 Outcome from Image Merger Operation 30

Page 11: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

ix

22 Overview for Cipher-image and Key Distribution 31

23 Input Cipher-image, Input Key, and Image Channel Separation 32

24 Operation for Image Channel Separation 33

25 Reverse Channel Encryption 34

26 Operation for Reverse Channel Encryption 34

27 Image Channel Merger and Plain Image 35

28 Operation for Image Channel Merger and Plain Image 36

29 Key Sensitivity Analysis 37

30 Statistical Analysis Histogram of Greyscale Image 38

31 Statistical Analysis Histogram of RGB Channel Image 39

32 Statistical Analysis Correlation and Coefficient of the

Greyscale Image

40

33 Intensity Analysis Tampered Images as Input) 42

34 Pixel (1, 1) Representation for Lena.png 44

35 Rossler Sequence Generation 45

36 Encryption Process for each Channels 45

37 Lena.png after Encryption in 3 Different Channels 46

38 Decryption Process for each Channels 47

39 Lena.png after Decryption in 3 Different Channels 48

40 Encryption Flow (i) – Menu Interface 49

41 Encryption Flow (ii) – Upload Image Interface 50

42 Encryption Flow (iii) – Preview Image Upload Interface 50

43 Encryption Flow (iv) – Image Channel Separator Preview

Interface

51

44 Encryption Flow (v) – Image Encrypted Interface 51

Page 12: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

x

45 Encryption Flow (vi) – Time Taken for Encryption Status 52

46 The Encrypted Image and Key for the Image 52

47 The Content of encryptedimg.txt 53

48 The Content of key.txt 53

49 Decryption Flow (i) – The Upload Encrypted Image and Key

Interface

54

50 Decryption Flow (ii) – The File Selection Interface 54

51 Decryption Flow (iii) – Encrypted Image Preview Interface 55

52 Decryption Flow (iv) – Image Decrypted Preview Interface 55

53 Decryption Flow (v) - Time Taken for Decryption Status 55

54 Folder Contain Files during Process Encryption and

Decryption

56

55 Image Channel Analysis (i) – Image Preview Interface 57

56 Image Channel Analysis (ii) – Split Channels Option Interface 57

57 Image Channel Analysis (iii) – RGB Channels Preview for the

Encrypted Lena.png

58

58 Image Histogram Analysis (i) – Example Histogram Analysis. 59

59 Image Histogram Analysis (ii) – Inputs for Histogram Analysis 59

60 Image Histogram Analysis (iii) – Grayscale Histogram for

Lena.png

60

61 Image Histogram Analysis (iv) – Extract Histogram Lena.png

in MATLAB

60

62 Image Histogram Analysis (v) – Grayscale Histogram for

Encrypted Lena.png

60

Page 13: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

xi

63 Image Histogram Analysis (vi) – Extract Encrypted Lena.png

in MATLAB

61

64 Image Histogram Analysis (vii) – RGB Histogram

Representation Lena.png

61

65 Image Histogram Analysis (viii) – Extracting Lena.png in

MATLAB

62

66 Image Histogram Analysis (ix) – RGB Histogram

Representation Encrypted Lena.png

62

67 Image Histogram Analysis (x) – Extracting Encrypted

Lena.png in MATLAB

62

Page 14: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

xii

LIST OF TABLES

TABLE TITLE PAGE

1 Research about AES Based for Image Encryption 10

2 Entropies of Encrypted Image of Mickey Image.bmp 11

3 Correlation Coefficient of Two Adjacent Pixels in Original and

Encrypted Image

11

4 Performance of AES and Modified AES Encryption 12

5 Research about Region Based Image Encryption 13

6 Research about Image Encryption using Block-Cipher 14

7 Research about Image Encryption with Hybrid Chaotic Systems 14

8 Research about Image Encryption using AdvHill Cipher 15

Page 15: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

xiii

LIST OF ABBREVITIONS

ABBREVIATION EXPLANATION

AES Advanced Encryption Standard

2D Two-Dimensional

AdvHill Advanced Hill

IDE Integrated Development Environment

RGB Red, Green, Blue

PNG Portable Network Graphics

Page 16: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

xiv

LIST OF FORMULAE

FORMULA TITLE PAGE

1 General Formula Encryption using Chaotic Based 44

2 Detailed Formula Encryption using Chaotic Based 46

3 General Formula Decryption using Chaotic Based 47

4 Detailed Formula Decryption using Chaotic Based 48

Page 17: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

1

Chapter 1

Introduction

1.1. Background

As time goes by, humans and machine interaction become famous from sharing

general data to confidential data. These data we talk about, came in different type like

video, audio, text, and image. Usually we don’t really care what the consequences from

exposing general data to wrong person or someone eavesdropping the data. But when it

comes to confidential data that is going to have a serious problem when people exploit

the confidentiality of data.

That is when computer scientist and mathematician came up with the idea of masking

the real message or we call it encryption. Encryption is a technique use to scramble the

original content of messages (data) before transferring. In order to read an encrypted

data, one shall decrypt the encrypted data into its original content. In this proposed

project, I’m going to specify my scope to image data type. The idea is to create an image

encryption using a chaos based algorithm. In order to work on this new

multidisciplinary field, the challenge is to propose a new algorithm of encryption and

decryption that maximize the security and lessen the potential of attacker to retrieve

information from images [1].

Page 18: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

2

As the fundamental of securing a data, there will be a key that help to lock (encrypt)

and unlock (decrypt) the data. The image encryption is a method to hide the information

contains in the image.

The idea is to exhibit the behaviour and characteristic of chaos theory where chaos

theory is famous with it randomness and deterministic. Where the initial condition of

the system will affect the behaviours of the system. That means one simple changes

might affect the most part of the result.

The process of encryption and decryption using a chaos based algorithm for this

proposed project will be explain further detail in Chapter 3, the methodology part of the

project. This idea was developing and come out from multiple research by choosing a

suitable chaos based algorithm where it can help to encrypt the data that contain in

image file.

Page 19: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

3

1.2. Problem Statement

Nowadays, information security is become more important especially when it comes to

transmission of confidential data to other person or even store it for your own use.

Usually this problem will relate to the process of transferring data via public network.

The hacker can eavesdrop on every single packet movement (the data transmission

process) on the network. He can retrieve the data and have all the confidential

information from you without our conscious.

If we apply an image encryption before sending it to desired person via public network.

He/she the eavesdropper have a hard time trying to figure out how to read the data from

image. Storing personal or confidential data can be a bit challenging where people have

access to our machine (computer or laptop). Yes, creating a specific folder won’t help

much in preserving the confidentiality of the data. In this way, people have hard time to

save images in a places where people can discover it easily.

a) Image data has been widely being used in many industry and it has been used

for many private data

b) Storing image data locally, can be less secure. Because the image only being

stored without any security measure applied.

c) When transferring data via public network, data such as text or images can be

tapped and eavesdropped from unwanted person.

Page 20: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

4

1.3. Objective

a. To apply a suitable chaotic map for encryption

b. To develop an image encryption based on chaotic cryptography

c. To evaluate the performance of the cryptosystem

d. To create a secure image sharing environment

1.4. Scope

This proposed project is to create an encryption for the user that want to secure the

image before sharing or user that want to save data locally. This consists medium

users, students and also corporation that want to save their image data in a reliable

way.

1.5. Limitation of Work

The limitation of this proposed project, is depend on the image. The higher the

resolution of the image, the more amount of pixel cover in certain region, refer

Figure 1. That means that is a lot of time taken in the encryption process. The

encryption is still possible but in the time measurement, it might take a while.

Page 21: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

5

Figure 1: Pixel Size in 2.54 centimetre

1.6. Summary

This chapter describes about a few topics that should be included in introduction of

projects such as background of project, problem statements, objectives, scope, and

limitation of work. Thus it helps to organize a better documentation of the project.

Page 22: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

6

Chapter 2

Literature Review

2.1.Introduction

This section describes the theory, techniques and concepts that were studied in order

to create an understanding on the problem and how researcher come out with

method to solve the problem. Generally speaking, encryption is a method to ensure

the confidential of data is taken care during file sharing through open network or

save into personal storage locally [2]. Decryption basically is a method to open the

encrypted data. However in this proposed project I use the cryptosystem towards

image encryption. The image encryption is the ability to hide the interpretation data

in real image (from plain-image to cipher-image).

This is to help protecting the original form of data that contains valuable information

[3]. Furthermore, it also help from unauthorised access from non-receiver for the

data and increase the reliability from being attack by any kind cryptanalysis attack.

In addition, the image encryption method is based on chaotic cryptosystem. Where

the encryption process need to be set with an initial values to be a parameters in

chaotic map. Where the random-like behaviours of the system and sensitivity of

data based on initial values [4]. In term of security models and cryptosystem that

Page 23: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

7

based on number theory and chaotic map, most of it has been proposed and research

found that some of them are either inefficient based on performance or weak in scale

of computational complexity and security [5-7]. In this chapter we will see literature

discussion from previous research that have co-related with the proposed project

characteristic. The discussion will be touch in image encryption, chaotic map, and

how the researcher optimizing their work in order to have a better solution to get rid

of problem in image encryption.

2.2.Chaos Theory and Chaotic Based Crypto-system

The chaos theory, in a simple term is a process where the system behaviours are

based on initial condition of the system or also can be called sensitive dependency

to the initial conditions. To make an example for the chaos theory, let say a system

that predict the future forecast might need several of initial inputs to create accurate

prediction. But once the system altered the inputs during process, it will behave in

a way that we don’t expect it to be. That means, even with a small difference from

the input might change the behaviour of the system itself [8]. That is chaos. Beside

from weather forecast, chaos theory have more practical applications in many

industry such as sciences, physics, dynamical systems, non-periodic order, and

mathematics [9]. But in this situation, we will see the implementation of chaos

theory in mathematics and might be a part of physics and those implementation will

create a chaotic system.

Page 24: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

8

To be more specific, a chaotic system must be equivalent to these characteristics

[12].

Figure 2: Chaotic System’s Characteristics

Based on Figure 2, we will go through the characteristic of chaotic system. The

first characteristic is nonlinearity, nonlinearity means that the change in an element

at initial time can bring to a change in the same or different element at later time.

It is not depend on the change at the initial time. The next thing is, determinism.

Deterministic means that the system is governed or based on rules and does not

exhibit the element of chances. Meaning that, the system behaviour will behave

from the previous cause or the initial value.

By that, we can tell that chaotic system is a system that sensitive to the initial

condition. The trajectories of variables in chaotic system was pre-defined by initial

parameters. The changes of condition during the system execution, might not give

the same result of the final outcome.

Nonlinearity Determinism Sensitivity to initial

conditions

Long-term Prediction Irregularity

Page 25: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

9

Talking about outcome, one of the chaotic system is their long-term prediction

characteristic. The outcome from the initial condition cannot be easily predict.

Because we were controlled by the initial conditions of the system, which can only

be known to a finite degree of precision.

Figure 3: Relationship of Chaos Theory and Cryptography

Before you get to know what chaotic based crypto-system is, there is something

you need to know. The invention of chaotic based cryptosystem was came up from

the idea of exhibiting the chaos theory and implement it in cryptosystem refer to

Figure 3.

Chaos Theory Cryptography

Chaos-Based Cryptography

Page 26: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

10

2.3. Previous Research

In this field that I have studied, consist many related research in image encryption

and the application of chaos theory in the cryptosystem. Among the researches, I

choose five (5) of it. The first research is from Seyed Hossein Kamali, and Reza

Shakeria as seen in Table 1.

Author Title Description Method

Seyed Hossein Kamali, Reza Shakeria

A New Modified Version of Advanced Encryption Standard Based Algorithm for Image Encryption

An encryption technique using Symmetrical Encryption and ShiftRow transformation based on a modified version of AES

Modified Version of AES; ShiftRow Transformation and Symmetrical Encryption

Table 1: Research about AES Based for Image Encryption

In this encryption method, the application of AES is applied in the ShiftRow

transformation [11]. In the ShiftRow Transformation for this paper, if the first row and

the first column is even, it will stay. But when the third and fifth rows of the state, it

will cycle and shifted to left or to the different number. This encryption performance

analysis has been recorded from aspect of image histogram of encrypted image (Refer

Figure 4), information entropy analysis (Refer Table 2) and correlation coefficient of

two adjacent pixels in original and encrypted image (Refer Table 3) [3,10,13].

Page 27: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

11

Figure 4: Histograms of the Plain Image and Encrypted Image

Encryption Algorithm Entropy Value

AES 7.9989

Modified AES 7.9992

Table 2: Entropies of Encrypted Image of Mickey Image.bmp

Direction Plain image Cipher image

Horizontal 0.9452 -0.0112

Vertical 0.9471 -0.0813

Diagonal 0.9127 0.0009

Table 3: Correlation Coefficient of Two Adjacent Pixels in Original and Encrypted Image

The modification that implement to the AES by adjusting ShiftRow Transformation. The

performance of AES and Modified AES were recorded (Refer Table 4) where the performance

uses various image size (pixels) of grey-scale image.

Page 28: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

12

Image Size (pixels)

Image size on disk

Encryption time in ms with AES

Encryption time in ms with Modified AES

256x256 192 KB 6.443 6.349

512x512 257 KB 8.643 8.565

512x512 768 KB 25.256 25.007

1024x1024 2.25 MB 75.862 75.114

Table 4: Performance of AES and Modified AES Encryption

Next, this image encryption technique is based on region and selective part of the image

(refer to Table 5). This encryption is for those who want to encrypt or hide a certain part

of the images. There are few outer step for this encryption. First, select an image that

want to encrypt. Then, choose amount of part in the image or region to encrypt. After

that, an encryption process is executed and private key is being distributed. The user

now acquires an image with regional-encrypted and a key to decrypt the region part of

the image [14]. The model encryption for region based selective image encryption

shown in Figure 3new [15]. This research is based on previous work which working on

image encryption using position permutation technique and value transformation

technique [15-16].

Figure 5: Model Encryption of Region Based Selective

Image Encryption

Page 29: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

13

Author Title Description Method

K.C.Ravishankar,

M.G.

Venkateshmury

Region Based

Selective

Image

Encryption

The encryption

technique uses the

selective region in the

image. It will use

transposition

technique

Position permutation

technique, value

transformation and

combine both.

Table 5: Research about Region Based Image Encryption

To see the result or the outcome from this image encryption, refer to the Figure 6.

Only a region in the image are encrypted.

Figure 6: Region-based Encryption Result

For the third image encryption research (refer Table 6), I choose the research conduct

by Aditee Gautam, Meenakshi Panwar and Dr. P. R Gupta. This research is about a

new image encryption using a block based transformation algorithm.

Page 30: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

14

Author Title Description Method

Aditee

Gautam,

Meenakshi

Panwar,

Dr.P.R

Gupta

A New Image

Encryption Approach

Using Block Based

Transformation

Algorithm

An encryption

technique using block

cipher by combining a

multiple image in

transformation

Block-cipher

modes, Image

permutation

technique

Table 6: Research about Image Encryption using Block-Cipher

This encryption technique uses a transformation approach where the original image

is divided to a number of block as it is used block based. The block then shuffled

within the image to build a newly transformed image. Which means the encryption

is performed by shuffling the block of pixels in the image. This encryption uses a

secret key approach [17].

Author Title Description Method

Xiang

FeiˈGuo

Xiao-

cong

An Image Encryption

Algorithm based on

Scrambling and

Substitution using

Hybrid Chaotic

Systems

This project simulates an

encryption technique by

scrambling the image

pixel then substitution

technique was applied

after scrambling.

Scrambling

Technique, and

Substitution based

on Chua’s Chaotic

Map

Table 7: Research about Image Encryption with Hybrid Chaotic Systems

And in this research (refer Table 4) it is a bit different with others, it applies a chaotic

system in the encryption technique. This paper use two different chaotic maps that

is why it is a hybrid system. The chaotic maps use is 2-Dimensional Logistic map

and a complicated Chua’s system. The encryption starts with a generation of

Page 31: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

15

scrambling matrix by using the 2D Logistic map to generate a chaos sequence and

the length of the generated sequence is respect to the value of MxN (where M is

width and N is height of the image) [18]. After that, a substitution for the pixels is

perform between original pixel and chaotic sequences that generated by the Chua’s

system using Equation (3). This algorithm provides a good confusion and diffusion

where the key space is large and the algorithm also very sensitive to the initial

conditions.

The last one that I chose from most of the research is a paper about Image Encryption

using Advanced Hill Cipher Algorithm as stated in Table 8.

Author Title Description Method

Bibhudendra

Acharya Saroj

Kumar Panigrahy,

SaratKumar Patra,

and Ganapati Panda

Image

Encryption

Using

Advanced Hill

Cipher

Algorithm

This image encryption

uses a novel Advanced

Hill Cipher Algorithm

which can be use both

for greyscale image and

colour-image.

Advanced

Hill Cipher

Algorithm

Table 8: Research about Image Encryption using AdvHill Cipher

This paper proposed an Advanced Hill or (AdvHill) cipher algorithm which uses an

involuntary key matrix for encryption. The objective for this research is to overcome

the drawback of using a random key matrix that happen to be used in Hill Cipher

algorithm for encryption, where it may not be able to decrypt the encrypted message

if the key is not invertible [19]. This encryption works well for greyscale, colour

image, except the one that have background of same grey level.

Page 32: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

16

2.4.Summary

This chapter discussed about the implementation of chaos theory and for further

explanation how this image encryption works will be explain in Chapter 3 and

Chapter 4 for this proposed project. A few selected research is discussed throughout

this chapter.

Page 33: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

17

Chapter 3:

Methodology

In this chapter, explanation about how the project been develop and what

components and requirement are needed in order to reach the project goals. The

methodology part for this chapter covered the logical schematic how my proposed

project behaves. The theory, method and simple description are demonstrated in this

chapter. Next, this chapter illustrate the flowchart, framework and detailed logical

process how the proposed project looks like.

3.1. Methodology

Figure 7: Project Methodology

Defining Phase Planning Phase Designing Phase

Analysis Phase

Phase Development

Phase

Page 34: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

18

The initiative that I had took was using a general project methodology as shown in

Figure 7. This project development took five phase. Which is defining, planning,

designing, development and last one is analysis the project. All those phase have their

own contribution toward this project development. In the next section, are to provide

the general understanding along the project development.

3.2. Defining Phase

Figure 8: Defining Field of Study

In this phase, exposure towards field that I needed and software requirement for

this project. To be exact, this phase only covered the general knowledge regarding to

this project (refer Figure 8). Therefore, subject that are need to be consider are, image

encryption, block cipher, and chaotic map. This is to fulfil the objective of the proposed

project where I created an image encryption using chaotic map (chaotic-based

cryptosystem) in block cipher. For software requirement. This proposed project need a

few software like ImageJ, NetBeans IDE, MATLAB

Field of Study

Image Encryption

Chaotic Map

Block Cipher

Software Requirement

ImageJ: Image Analysis

NetBeans IDE

MATLAB

Page 35: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

19

3.2.1. Field of Study

Image encryption is an ability to hide the information or content of the images

by converting the real image (plain-image) into an unreadable image (cipher-image).

This is to protect the confidentiality of the image from any unauthorized users from

reading it. However, in order to read the cipher-image, one need to have a “key” in

order to read the image. So how it works? We will see it in the planning phase and

designing phase.

Chaotic Map is the mathematical function that produce unpredictable trajectories in

graphical interpretation. Usually, this map parameterised by a discrete-time or a

continuous-time parameter. This form of function usually iterated and it often occur in

the study of dynamical systems. Impact from iteration can produce a fractal. Fractal is

a detailed, recursive and infinitely of self-similar mathematical set.

Block Cipher is a method of encryption that applies a pre-determined (deterministic)

algorithm along with distribution of symmetric key to encrypt a block of data. Data can

be in a form of binary or string. Binary data can be obtain from a pixel of image or a

character of string. The block cipher method use a predetermined length of key. The

length of key can be 128, 192 or 256 bits. Block cipher can help to ease the process of

encrypting where the data can be segment into multiple file and encrypt with different

keys.

Page 36: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

20

3.2.2. Software Requirement

ImageJ is a standalone software that use to measure the image properties. Image

properties can be in form of RGB colour channel, histogram, and image filtering. This

tool help us to analyse the image encryption from before and after the process. RGB

Colour Channel is a process where we split the encrypted image into three part of filter,

red, green and blue colour channel; this is to ensure that where the encryption takes

place. It also applies for original images. The histogram is an interpretation of images

in graphical concept. This is to show how many pixel represent certain tonal variations

in the image.

NetBeans IDE use to provide an interface image encryption for user to experience the

project that we proposed. Beside, NetBeans also use as a platform to develop this project

from the scratch. The language that going to be carry along the development is Java

language.

MATLAB is a software that use to compute and illustrate a mathematical function. In

this project, we used a chaotic map. Therefore, we used MATLAB to illustrate how the

function behave when we interpret in graphical concept using certain parameters.

Page 37: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

21

3.3. Planning Phase

In this phase, we start to model a framework that going to be use along the development.

The chaotic-based cryptosystem will receive input from user and process it to produce

an encrypted output with a key. Key that can decrypt the output.

Figure 9: General Overview of Proposed Cryptosystem

Based on Figure 9, situation is John have multiple images that are confidential and need

to send it to Mike. However, they use have two choice to share the image via public

network or share a drive that store the images. The question is, does the sharing session

safe? Then, John came out with the idea to encrypt the images first using a system that

can help to preserve the content of the images from being view by unauthorised person.

So as the system, receive the inputs from John (which are the pictures that he wants

Mike to receive it)

John

Mike

Page 38: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

22

Then, the cryptosystem will produce outputs. These outputs came in two things. First,

the encrypted-image or cipher-image and a key. Assume that the inputs are three

images. There will be three pair of cipher-images and keys. The purpose of the key is

to unlock (decrypt) the cipher-image. Different key, for different picture.

As Mike received the cipher-image and key, Mike cannot read the image yet. He still

need the cryptosystem to decrypt the cipher-image using the key provided. After

decryption process executed by the system, then Mike will retrieve the real image to see

the content.

3.4. Designing Phase

Designing Phase is a phase where we design a logical concept based on the

framework model in planning phase. The logical concept consists two things in this

proposed project, which are flowchart encryption and decryption.

Page 39: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

23

3.3.1. Flowchart Encryption

The flowchart encryption demonstrates the logical concept model how the

encryption process happens from the input, to the process and until the output.

Figure 10: Encryption Operation for Proposed Cryptosystem

Figure 10 is a simple representation how the cryptosystem looks like in general

way. The explanation for this logical concept will be demonstrate in detail process.

Processes that take part in encryption operation are:-

a) Input Plain-image and Image Channel Separation

b) Chaos Sequence Key Generation

c) Channel Encryption

d) Image Channel Merger

e) Cipher-image and Key

Page 40: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

24

3.3.2. Flowchart Decryption

We will go through the steps for encryption logically to get the general understanding

for this purposed project. Before that, let us go through the decryption operation. Refer

to the Figure 11 to see the simple decryption representation.

Figure 11: Decryption Operation for Proposed Cryptosystem

Decryption operation is a reverse operation for encryption. The purpose of this

operation is to retrieve the original image (plain-image) by using two inputs, the

encrypted-image (cipher-image) and the key. These are tasks in the decryption

operation:-

a) Input Cipher-image, Input Key, and Image Channel Separation

b) Reverse Channel Encryption

c) Image Channel Merger and Plain Image

Page 41: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

25

3.4. Development Phase

In this phase, demonstration of logical concept for this cryptosystem are illustrated. This

phase contains every process throughout the encryption and decryption. First, let see

how encryption process logically using this concept.

3.4.1. Encryption Phase

Figure 12: Input Plain-image and Image Channel Separation

3.4.1.1.Input Plain-image and Image Channel Separation

In this Figure 12, it shows that input image is insert and the image then get into the

image channel separation. In the image separation, split the image into three channel,

red, green and blue channel as shown in Figure 13. The reason we separate the channels

Page 42: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

26

for the image is that we want to create an encryption for those channel to create “a layers

of scrambling”.

Figure 13: Process for Image Channel Separation

Figure 14: Chaos Sequence Key Generation

Page 43: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

27

3.4.1.2.Chaos Sequence Key Generation

In the Chaos Sequence Key Generation stage (as shown in Figure 14), an Equation (1)

in the Rossler System will be demonstrated. The purpose application of Rossler System

in this encryption is to generate amount of chaos sequence to create a key. The Equation

(1) in the Figure 15 have a chaotic behaviour based on these initial conditions, where

a= 0.2, b=0.2, and c=5.7

Then we set the initial conditions for x,y and z. Based on 128-bit key that taken from

ASCII form. The sequence will be in a form of K. Where K is denoting the 8-bit key

character. K is the size of 16. That is probably need only 128bits per encryption.

Figure 15: Rossler System’s Equation (1)

Figure 16: Pixels Illustration

Page 44: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

28

The key provided from this equation will be used throughout the process encryption and

decryption. This encryption will take place from pixel by pixel for an image, consider

x is a row, and y is a column. Then the encryption will be in I(x,y). Figure 16 is an

example illustration of where the encryption happened. The encryption will be on every

pixel of the image, the coordinate for the pixel determined by the value of x and y.

3.4.1.3.Channel Encryption

Figure 17: Channel Encryption

In Digital Image Processing, image is constructed by pixels. Where pixels are made from

combination of primary colour. For this part, we will see about how Red, Green, Blue and Alpha

affect this encryption. This encryption will be demonstrate to every single pixels in four

different channels refer Figure 18 to see preparation of image before encrypt. This encryption

also affect the transparency level for the image (Alpha Channel), the higher the number, and

the more opaque the pixel will be. For further detail on the encryption process will be explain

in the Chapter 4.

Page 45: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

29

Figure 18: RGB Channel of Lena.png

3.4.1.4.Image Channel Merger

Figure 19: Image Channel Merger

In this Image Channel Merger, the encrypted image for those channels will be merge

again. The post-process for the image will be like Figure 20. The encryption method

will be applied to all three channel this to provide an unpredictable sequence of

encrypted pixels for the image; the outcome should looks like Figure 21.

Page 46: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

30

Figure 20: Process after Encryption for Different Image Channels

Figure 21: Outcome from Image Merger Operation

Page 47: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

31

3.4.1.5.Cipher Image and Key

As the process merger complete. User will get two different files, which are the

encrypted images, and the key to decrypt the images. Figure 22, generally tells us the

concept for this cryptosystem.

Figure 22: Overview for Cipher-image and Key Distribution

Page 48: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

32

3.4.2. Decryption Phase

3.4.2.1.Input Cipher-image, Input Key, and Image Channel Separation

In this process refer Figure 23, the cryptosystem will receive two inputs. Those input

are cipher-image and key. Key that correlated with the cipher-image. Because without

a proper key, it cannot decipher the image. Figure 24 shows an illustration how the

cryptosystem acquired cipher-image, input key. One other thing, this decryption process

is a reverse-form of encryption. Therefore, it will separate the cipher-image to get the

encrypted image in three different channels, red, green and blue. After the process done,

those image with different channels will proceed to Reverse Channel Encryption

process.

Figure 23: Input Cipher-image, Input Key, and Image Channel Separation

Page 49: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

33

Figure 24: Operation for Image Channel Separation

Page 50: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

34

3.4.2.2.Reverse Channel Encryption

Figure 25: Reverse Channel Encryption

After uploading the key and encrypted image has been separated into three different

channels (Red, Green, and Blue) with information of Alpha Channel in encrypted

image. Then, the decryption process will be execute where all the channel will be

decrypted using formula explain in the Chapter 4. For general review, refer to Figure

26.

Figure 26: Operation for Reverse Channel Encryption

Page 51: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

35

You surely do not want to read the image in different channel right? Therefore, these

images will be send to Image Channel Merger process.

3.4.2.3.Image Channel Merger and Plain Image

Figure 27: Image Channel Merger and Plain Image

This image channel merger processes the image by combining the different image

channel and produce a single plain-image. Now user can view and save the plain-image

from the encrypted image. Logical concept for this image channel merger were

illustrated in Figure 28

Page 52: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

36

Figure 28: Operation for Image Channel Merger and Plain Image

3.5. Analysis Phase

Analysis Phase is phase where the cryptosystem being measure by a few things

that might help in my study on how the cryptosystem response towards inputs. These

are following analysis that would take part in this proposed project.

a) Key Sensitivity Analysis

b) Statistical Analysis (Histogram)

c) Statistical Analysis (Correlation and Coefficient)

d) Fixed Point Analysis

e) Intensity Analysis

Page 53: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

37

3.5.1. Key Sensitivity Analysis

This analysis is test the reliability of the key in the string value. This is because, the

initial condition for this key generation requires user to input and generate it

automatically. When the initial condition for the image decryption change, it will

produce a different outcome during decryption process.

Figure 29: Key Sensitivity Analysis

As you can observe in Figure 29, the key analysis was performed. If you can see

properly, there is one-bit change at the end of both key. When user tend to alter the key,

the result of decryption cannot produce the plain-image. This shows that this encryption

Page 54: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

38

is reliable because when a key can be altering even one-bit, that means the encryption

is not secured.

3.5.2. Statistical Analysis (Histogram)

In histogram analysis, it just provides how the image looks like in graphical

interpretation on how the tonal distributed in the image. As you can see in Figure 30 is

a histogram analysis for greyscale picture, the picture of Lena (Figure 1(a) in Figure 30)

representation in histogram can be found in (Figure 1(c) in Figure 30) this to show a

quantity of tonal distribution of the image is stated and it follows the image. But if you

see the “Encrypted Lena” and its histogram. The tonal distributes in a random way

where it cannot be determined.

Figure 30: Statistical Analysis Histogram of Greyscale Image

Page 55: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

39

Figure 31 is another example but in RGB picture. This encryption took place for these

three different channels. This is why this analysis is studied, because we want to get the

amount of unpredictable for every single pixel in the picture.

Figure 31: Statistical Analysis Histogram of RGB Channel Image

Page 56: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

40

3.5.3. Statistical Analysis (Correlation and Coefficient)

In this analysis, we going to figure out what happen to the correlation every pixel in the

image. The objective is to ensure that the amount of pixel that still correlated after

encryption is less. That means, the lesser the amount of pixel correlated after encryption,

the better the encryption. As you can see in Figure 32, the pixel somehow still correlated

to one another before encryption. After the decryption process, the correlation between

pixels is uncertainty and complete random.

Figure 32: Statistical Analysis Correlation and Coefficient of the Greyscale Image

Page 57: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

41

3.5.4. Fixed Point Analysis

The fixed point analysis is an analysis that demonstrate how many pixels that still the

same value, after encryption. In every encryption, the must be one or two pixel that are

still in the same value. Logically this analysis objective is to give a visual interpretation

of how many pixels that are still in the same spot after encryption process.

3.5.5. Intensity Analysis

This analysis is to give a visual how tampering an encrypted image can affect the

decryption process. This analysis conduct with inputs from key from encryption and

image that were used in the encryption process but only the image has been tampered.

Tampered means that partial or region part of the image has been replaced with black

pixel. Figure 33 shows how tampered picture can affect the decryption process.

Page 58: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

42

Figure 33: Intensity Analysis (Tampered Images as Input)

As you can see, the distorted outcome is measured by how much it has been tampered.

So the image can still be seen if the amount of tampered region is small.

3.6. Summary

Methodology is one of the most important roles in the any project development,

it gives insight generally for people to get our idea for the proposed project. So in this

methodology I choose the methodology that consists, defining phase, planning phase,

designing phase, development and analysis phase. Which I can say that this

methodology help to have a reliable project method. The operation and tasks in this

methodology are explained in order to get understanding for the proposed project.

Page 59: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

43

Chapter 4

Implementation and Result

4.1. Introduction

In this chapter will provide an insight how the image encryption and decryption

using chaotic-based encryption works. It will measure the encryption and decryption

based on the time taken to complete, the result channel comparison and analysis

histogram. The result will also be shown particularly for encryption process.

4.2. Cryptographic Scheme

Throughout this section 4.2(Cryptographic Scheme), please refer to Figure 34 in order

to understand the encryption and decryption process. In the Figure 34, it shows Pixel

for column 1 and row 1 on the image.

Page 60: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

44

Figure 34: Pixel (1, 1) Representation for Lena.png

4.2.1. Image Encryption Cryptosystem Scheme

The encryption method use as shown in Formula 1 below. This formula cannot be fully

understand the mechanism, proceed to the Formula 2 to understand the whole

encryption process. 256 in the Formula 1 represent the limit or boundary for the image

encryption. Which the image contain 28 which equals to 256 binary bit weight in

decimal

Encryption = (RosslerSequenceChannel * 256) * (Next Channel –

RosslerSequenceChannel)

Formula 1: General Formula Encryption using Chaotic Based

This encryption process require the image to be split in term of channels. The

channels used in the splitting process are Red, Green, Blue and Alpha and the most

important part is the Rossler Sequence that generate from Rossler Equation (1) that

Page 61: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

45

mentioned in Chapter 3.5.1.2. Figure 35 shows a sequence generated from Rossler

Equation (1). This sequence is generated based on how much pixels wants to be

encrypted and the floating point is generated instead of integer numbers. There are four

columns each four can be a sequence in Red, Green, Blue and Alpha channels. Check

on the Formula 2 for implementation of Rossler sequence for each channel for pixel

shown in Figure 34.

Figure 35: Rossler Sequence Generation

Figure 36: Encryption Process for each Channels

Page 62: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

46

The encryption process will be use the first row of Rossler Sequences in Figure 35 and

the calculation is based on Figure 36. The input variable use in Formula 2 was taken

from Figure 34.

Encrypted Red Channel: (1.0676625 * 256) * (137 - 1.0676625) = 36855

Encrypted Green Channel: (-6.7932353 * 256) * (226 - (-6.7932353)) = -403448

Encrypted Blue Channel: (1.0208428 * 256) * (125 - 1.0208428) = 66033

Encrypted Alpha Channel: (1.01 * 256) * (255 - 1.01) = 31734

Formula 2: Detailed Formula Encryption using Chaotic Based

After the encryption, it will produce the image as shown in the Figure 37. The image

is Lena.png after encryption and demonstrate in term of image channel.

RGB

Red Channel

Green Channel

Blue Channel

Figure 37: Lena.png after Encryption in 3 Different Channels

Page 63: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

47

4.2.2. Image Decryption Cryptosystem Scheme

In this section we will discuss about how the decryption method being apply in order to

retrieve the original image. The image in Figure 34 will be used in order to retrieve the

original image.

Decryption = EncryptedNextChannel / (RosslerSequenceNextChannel * 256) +

RosslerSequenceNextChannel)

Formula 3: General Formula Decryption using Chaotic Based

Figure 38: Decryption Process for each Channels

What makes this encryption special is that it use the symmetrical keys to encrypt and

decrypt the image. Thus, the channels of the image is bind in pair. Where the red channel

will be bind with green channel of the image and the blue channel will be bind with the

alpha channel of the image. Refer to Figure 38 and Formula 4 for more detail

explanation. Formula 4 used the input based on result from Formula 2.

Page 64: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

48

Decrypted Red Channel: -403448 / (-6.7932353 * 256) + (-6.7932353)

Decrypted Green Channel: 36855 / (1.0676625 * 256) + (1.0676625)

Decrypted Blue Channel: 31734 / (1.01*256) + (1.01)

Decrypted Alpha Channel: 66033 / (1.0208428 *256) + (1.0208428)

Formula 4: Detailed Formula Decryption using Chaotic Based

RGB

Red Channel

Green Channel

Blue Channel

Figure 39: Lena.png after Decryption in 3 Different Channels

After the formula for decryption process has been done all pixels in the image using the

formula provide in Formula 4. The image channels will be merge and create an image

that has been decrypted.

Page 65: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

49

4.3.Simulation

For this project, a development of application using NetBeans IDE and Java

Programming were used to create a simulation of how the image encryption and

decryption using the chaotic based. Figures in this section will be divided into two parts,

the encryption process and decryption process.

4.3.1. Encryption Process

The encryption takes place where the user have to upload the image for encryption

process.

Figure 40: Encryption Flow (i) – Menu Interface

The user can only upload image in order to proceed to the next process, which is the

image channel separator. If the file upload is not an image file, further process will not

be execute.

Page 66: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

50

Figure 41: Encryption Flow (ii) – Upload Image Interface

Figure 42: Encryption Flow (iii) – Preview Image Upload Interface

Page 67: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

51

Figure 43: Encryption Flow (iv) – Image Channel Separator Preview Interface

The purpose of image channel separator is to let user see and preview their image, how

does the image look in three different channel (Red, Green and Blue). After user click

on the button next. Encryption process will be done for each pixel using the formula

stated in Chapter 4.2.1.

Figure 44: Encryption Flow (v) – Image Encrypted Interface

Page 68: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

52

The simulation also timed the encryption process. For Lena.png with the width and

height 512x512pixels. The encryption process take up to 63437056000 nanoseconds

which equivalent to 1.05 minutes. The time taken in nanoseconds, seconds and minutes

are stated in Figure 45.

Figure 45: Encryption Flow (vi) – Time Taken for Encryption Status

As stated in the Flowchart for Encryption in Chapter 3.3.1. The encryption process also

provide three files, the encrypted image and the key to decrypt the image in text file and

the encrypted image in PNG file, refer Figure 46. The process of decryption will be

explain in the next section.

Figure 46: The Encrypted Image and Key for the Image

Page 69: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

53

4.3.2. Decryption Process

The decryption process will required two things, the encrypted image and the key in

form of text file as shown in Figure 46. The content of those file will look like Figure

47 and Figure 48. Only the text file interpretation can be upload for decryption. The

PNG is not allowed because the reconstruction of pixel requires every single coordinate

store in the text file.

Figure 47: The Content of encryptedimg.txt

Figure 48: The Content of key.txt

Page 70: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

54

The similarities between these two files are the number of column it had is 4 (represent

the channels Red, Green, Blue and Alpha) and the number of row is equal to the amount

of pixel the image had. Based on Figure 49 and 51, the process of decryption will only

be further when the encrypted image and key is identical and match. If the encrypted

image and key file is recognized, the interface in Figure 51 will open and the image is

ready for decryption process.

Figure 49: Decryption Flow (i) – The Upload Encrypted Image and Key Interface

Figure 50: Decryption Flow (ii) – The File Selection Interface

Page 71: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

55

Figure 51: Decryption Flow (iii) – Encrypted Image Preview Interface

Figure 52: Decryption Flow (iv) – Image Decrypted Preview Interface

Figure 53: Decryption Flow (v) - Time Taken for Decryption Status

Page 72: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

56

After click on “Decrypt Image”, the interface of the system shows in Figure 52 with the

time taken for decryption. The decryption process took 54444287574 nanoseconds

which equivalent to 0.9 minutes to decrypt the image. The process seems faster than the

encryption process, this is because the clock speed of the machine, process running also

affect in term of efficiency for the system.

4.4.Result Analysis

There are few analysis were made during and after the image encryption. The analysis

that we mentioned are the Image Channel Analysis and Image Histogram Analysis.

4.4.1. Image Channel Analysis

In image channel analysis, the purpose is to observe how much the encryption affect

the pixels formation in each channel. This analysis can be perform in the simulation

itself (Refer Figure 44) and ImageJ application. For easier explanation, ImageJ were

used to perform the Image Channel Analysis. Choose the encrypted image as shown in

Figure 54.

Figure 54: Folder Contain Files during Process Encryption and Decryption

Page 73: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

57

Figure 55: Image Channel Analysis (i) – Image Preview Interface

After open the file, ImageJ will preview the image and amount of pixels the image had.

Go to the menu Image > Color > Split Channels (as shown in Figure 56) to perform

the Image Channel Splitting. The result will be displayed

Figure 56: Image Channel Analysis (ii) – Split Channels Option Interface

Page 74: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

58

After the option has been chose, ImageJ will execute the channel splitting process. The

result can be seen in Figure 57.

RGB Channel for Encrypted

Lena.png

Red Channel for Encrypted

Lena.png

Green Channel for

Encrypted Lena.png

Blue Channel for Encrypted

Lena.png

Figure 57: Image Channel Analysis (iii) – RGB Channels Preview for the Encrypted

Lena.png

4.4.2. Image Histogram Analysis

Image Histogram Analysis is a practice to study the context of the image via pixel

density value of the image. It plot the pixel density for each tonal value. For example,

in Figure 58 shows that the Histogram for Red, Green, and Blue image after Image

Separation of random image (this is not Lena.png’s Histogram Analysis). The pixel

intensity is measure by how many pixel frequency appeared in the image itself.

Page 75: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

59

Figure 58: Image Histogram Analysis (i) – Example Histogram Analysis.

The process for this analysis will required a software called MATLAB. MATLAB

enable us to convert the image into a histogram interpretation. But, MATLAB only

produce the histogram for grayscale image and histogram for red, green and blue

channel separately. In this analysis, two image were used Lena.png and Encrypted

Lena.png as shown in Figure 59.

Lena.png (512x512 pixels)

Encrypted Lena.png (512x512 pixels)

Figure 59: Image Histogram Analysis (ii) – Inputs for Histogram Analysis

Page 76: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

60

There are two Image Histogram Analysis been perform for this image. The analysis

shows that there are no similarities between two images in Figure 59. The grayscale

histogram analysis for these image can be seen in Figure 60 and Figure 62. Figure 61

and Figure 63 shows the execution code to perform Histogram Analysis in MATLAB.

Figure 60: Image Histogram Analysis (iii) – Grayscale Histogram for Lena.png

Figure 61: Image Histogram Analysis (iv) – Extract Histogram Lena.png in MATLAB

Figure 62: Image Histogram Analysis (v) – Grayscale Histogram for Encrypted

Lena.png

Page 77: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

61

As you can see the pixel density and frequency does not match between before and after

encryption of the image. This is a good practice where the intruder or anyone cannot

have a precise guess on how the image looks like.

Figure 63: Image Histogram Analysis (vi) – Extract Encrypted Lena.png in MATLAB

Next, a demonstration for Histogram Analysis for each channels in the image (Red,

Green and Blue). This is the part where the image will be separate to each channel,

MATLAB then produce the histogram and merge all three channel into one histogram.

Each colour represent each channel in the image. Figure 64 and 67 shows the histogram

analysis.

Figure 64: Image Histogram Analysis (vii) – RGB Histogram Representation

Lena.png

Page 78: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

62

Figure 65: Image Histogram Analysis (viii) – Extracting Lena.png in MATLAB

Figure 66: Image Histogram Analysis (ix) – RGB Histogram Representation

Encrypted Lena.png

Figure 67: Image Histogram Analysis (x) – Extracting Encrypted Lena.png in

MATLAB

Page 79: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

63

Chapter 5

Conclusion

5.1. Summary

Image Encryption is an art of scrambling, transposing, or even altering the pixel value

of the image in order to secure the content of the image. This is an important field to

practice and do a research on how to provide a reliable security services in terms of data

exchange. Because nowadays, people have many private and personal image data that

being kept locally and virtually (using Cloud Storage). This is a good opportunity to

emphasize the cryptography implementation in any kind of data.

Furthermore, cryptography is a study to provide a security in protect data integrity from

being compromised to other parties by kept the data secret (encryption) and provide a

key (public key or private key). Where they key is the solution to decipher the encrypted

data and view the original data (decryption). In this project, where combining the

chaotic-based cryptosystem, every single pixels from the image channels are being

transpose into other pixel. Where the encrypted pixels can only be decrypt using the

only key (private key) provide during encryption.

This research focus on the study of image encryption using chaotic based cryptosystem

to ensure the integrity and availability of image data during data exchange. In this

Page 80: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

64

research, the chaotic system that been implement is Rossler Equation (I) where I use

the Rossler Sequence to generate numbers to be use as variable to encrypt each channels

for the image (refer Chapter 4.2) for more explanation. It is a small contribution towards

creating a new environment of safe image data exchange in the network.

For future work, I hope someone who have genuine interest and passion to continue this

research and improve any weakness that might be find technically or logically.

Implementing chaotic cryptosystem with public key infrastructure would be a great

combination.

To conclude, I have already fulfilled all the objective and tasks I have propose earlier

in the developing this project. This issue in encrypting image to have secure data

exchange environment does not ends here. There are probably a way to tackle the

problem, where people need a new secure environment in an open network to share

their own data to their own particular people.

Page 81: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

65

References

[1] Li, C., Lin, D., & Lü, J. (2017). Cryptanalyzing an image-scrambling

encryption algorithm of pixel bits. IEEE MultiMedia, 24(3), 64-71.

[2] Boneh, D., Sahai, A., & Waters, B. (2011, March). Functional encryption:

Definitions and challenges. In Theory of Cryptography Conference (pp. 253-

273). Springer, Berlin, Heidelberg.

[3] Divya, V. V., Sudha, S. K., & Resmy, V. R. (2012). Simple and secure image

encryption. International Journal of Computer Science Issues (IJCSI), 9(6),

286.

[4] Zhang, X., & Chen, W. (2008, July). A new chaotic algorithm for image

encryption. In Audio, Language and Image Processing, 2008. ICALIP 2008.

International Conference on(pp. 889-892). IEEE.

[5] Alvarez, G., & Li, S. (2009). Cryptanalyzing a nonlinear chaotic algorithm (NCA) for

image encryption. Communications in Nonlinear Science and Numerical Simulation,

14(11), 3743-3749.

[6] Cheng, H., & Li, X. (2000). Partial encryption of compressed images and videos. IEEE

Transactions on signal processing, 48(8), 2439-2451.

[7] Rhouma, R., & Belghith, S. (2008). Cryptanalysis of a new image encryption algorithm

based on hyper-chaos. Physics Letters A, 372(38), 5973-5978.

[8] Kattan, P. I., & Books, P. (2012). Chaos Theory Simply Explained.

[9] Mann, S. R. (1992). Chaos theory and strategic thought. ARMY WAR COLL

CARLISLE BARRACKS PA.

[10] Ditto, W., & Munakata, T. (1995). Principles and applications of chaotic

systems. Communications of the ACM, 38(11), 96-102.

Page 82: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

66

[11] Kamali, S. H., Shakerian, R., Hedayati, M., & Rahmani, M. (2010, August). A

new modified version of advanced encryption standard based algorithm for

image encryption. In Electronics and Information Engineering (ICEIE), 2010

International Conference On (Vol. 1, pp. V1-141). IEEE.

[12] Kamali, S. H., Shakerian, R., Hedayati, M., & Rahmani, M. (2010, August). A new

modified version of advanced encryption standard based algorithm for image

encryption. In 2010 International Conference on Electronics and Information

Engineering (Vol. 1, pp. V1-141). IEEE.

[13] Li, S., Zheng, X., Mou, X., & Cai, Y. (2002, February). Chaotic encryption scheme for

real-time digital video. In Real-Time Imaging VI (Vol. 4666, pp. 149-161).

International Society for Optics and Photonics.

[14] Ravishankar, K. C., & Venkateshmurthy, M. G. (2006, June). Region based

selective image encryption. In Computing & Informatics, 2006. ICOCI'06.

International Conference on (pp. 1-6). ieee.

[15] Van Droogenbroeck, M., & Benedett, R. (2002). Techniques for a selective encryption

of uncompressed and compressed images. ACIVS advanced concepts for intelligent

vision systems, proceedings, 90-97.

[16] Jui-Cheng Yen and Jiun-In Guo, "A New Chaotic Image Encryption Algorithm", IEEE

Int. Con! Circuits and Systems, 2000, Vol. 4, pp.49-52.

[17] Gautam, A., Panwar, M., & Gupta, D. P. (2011). A new image encryption

approach using block based transformation algorithm. international Journal of

advanced engineering sciences and technologies, 8(1), 90-96.

[18] Fei, X., & Xiao-cong, G. (2011, December). An image encryption algorithm

based on scrambling and substitution using hybrid chaotic systems.

Page 83: IMAGE ENCRYPTION USING CHAOTIC BASED CRYPTOSYSTEM

67

In Computational Intelligence and Security (CIS), 2011 Seventh International

Conference on(pp. 882-885). IEEE.

[19] Acharya, B., Panigrahy, S. K., Patra, S. K., & Panda, G. (2009). Image

encryption using advanced hill cipher algorithm. International Journal of

Recent Trends in Engineering, 1(1), 663-667.