You are on page 1of 6

Fast Partial Image Encryption using Chaos

Bhagyashri R. Pandurangi
a
, Vinay Sangolli
b
, Meenakshi R. Patil
c

a
Dept of Electronics and Communication, Visveshvaraya Technological University
KLS Gogte Institute of Technology,
Udyambag, Belgaum, India-590 008
e-mail:brpandurangi@git.edu

b
Dept of Electronics and Communication, Visvesvaraya Technological University
KLS Gogte Institute of Technology,
Udyambag, Belgaum, India-590 008
e-mail:vinaymsangolli@gmail.com

c
Dept of Electronics and Communication, Visvesvaraya Technological University
AGM rural College of Engineering and Technology,
Varur, Hubli, India-581207
e-mail : meenakashirpatil@gmail.com

Abstract:
In recent years, the chaos based cryptographic algorithms have
suggested some new and efficient ways to develop secure image
encryption techniques. Image encryption based on Chaos
became very popular for cryptography since properties of Chaos
are related to two basic properties of good cipher Confusion and
Diffusion. In this paper, Partial Image Encryption using Chaos
has been proposed. In Partial encryption speed is the main
factor. We decompose the original greyscale image into its
corresponding binary eight bit planes then encrypted using
chaotic map based o n pseudorandom binary number
generator (PRBNG). The four significant bit planes, determined
by the level of significance on contribution of a bit plane in
determination of a pixel value, are encrypted using keys which
are obtained by applying the recurrence relation of chaotic map.
The insignificant bit planes along with encrypted significant bit
planes are combined to form the final cipher image. In order to
evaluate performance, the proposed algorithm was measured
through a series of tests to measure the security and effectiveness
of the proposed algorithm. These tests includes visual test
through histogram analysis, correlation coefficient analysis,
information entropy test, Measurement of Encryption Quality
NPCR, UACI.

I. INTRODUCTION
Due to phenomenal growth in internet, multimedia content
such as image, video and audio can be easily transmitted from
source to destination. This has a huge impact on development
of entertainment, industry, multimedia and e-commerce which
rely on the Internet for their business. Thus, to prevent
corruption of multimedia content from unauthorized user,
security plays a significant role for content protection. In the
past few years, encryption has becoming a major tool for
securing multimedia content such as image, video and audio.
Image encryption is somehow different from text encryption
due to some inherent features of image such as bulk data
capacity and high correlation among pixels, which are
generally difficult to handle by traditional methods [2]. Many
applications like military image databases, confidential video
conferencing, medical imaging system, cable TV, online
personal photograph album, etc. require reliable, fast and
robust security system to store and transmit digital images.
The requirements to fulfill the security needs of digital images
have led to the development of good encryption techniques.
During the last decade, numerous encryption algorithms [1
13] have been proposed in the literature based on different
principles. Among them, chaos based encryption techniques
are considered good for practical use as these techniques
provide a good combination of speed, high security,
complexity, reasonable Computational overheads and
computational power etc. The properties of chaotic systems
including sensitivity to initial conditions, pseudorandom
nature, and non-periodicity, have made them a proper tool for
image encryption. The digital images have certain
characteristics such as: redundancy of data, strong correlation
among adjacent pixels, being less sensitive as compared to the
text data i.e. a tiny change in the attribute of any pixel of the
image does not drastically degrade the quality of the image
and bulk capacity of data etc. Consequently, the traditional
ciphers like IDEA, AES, DES, RSA etc. are not suitable for
real time image encryption as these ciphers require a large
computational time and high computing power. For real time
image encryption only those ciphers are preferable which take
lesser amount of time and at the same time without
compromising security. An encryption scheme which runs
very slowly, even may have higher degree of security features
would be of little practical use for real time processes.


II. RELATED WORKS
A number of chaos based image encryption scheme
havebeen developed in recent years which we discuss in brief
in this paragraph.In 1992, Bourbakis and Alexopoulos [1]
International J ournal of Engineering Associates (ISSN: 2320-0804) #19 / Special Issue -1 (Volume 3)
NC-EMPIRE Conference proceeding 2014 IJ EA. ALL RIGHTS RESERVED 19
have proposed an image encryption scheme which utilizes the
SCAN language to encrypt and compress an image
simultaneously. Further,Scharinger [4] designed a chaotic
Kolmogorov-flow-based image encryption technique, in
which whole image is taken as a single block and which is
permuted through a key-controlled chaotic system. In
addition, a shift register pseudo random generator is also
adopted to introduce the confusion in the data. Fridrich [5]
demonstrated the construction of a symmetric block
encryption technique based on two-dimensional standard
baker map.Further, Yen and Guo [6] also proposed an
encryption method called CKBA (Chaotic Key Based
Algorithm) in which a binary sequence as a key is generated
using a chaotic system. The image pixels are rearranged
according to the generated binary sequence and then XORed
and XNORed with the selected key. Yen and Guo [9]
proposed an encryption method called BRIE based on chaotic
logistic map. The basic principle of BRIE is bit recirculation
of pixels, which is controlled by a chaotic pseudo random
binary sequence. The secret key of BRIE consists of two
integers and an initial condition of the logistic map. In [10] the
partial image encryption has been described in two ways using
hill cipher technique. First encryption technique uses two
slightly different keys to construct two self-invertible
matrices, which are used in two different stages to get
partially encrypted image. Second encryption technique use
one key to construct one self-invertible matrix and it is used in
first stage. In second stage same key matrix along with few
modification in diagonal values are used to construct another
self-invertible matrix which leads to partial image encryption.
Later in 2002, Li and Zheng [11] pointed out some defects in
the encryption schemes presented in the references [6,9] and
also discussed some possible improvements on them.
Recently, Li et al. [12] have proposed a video encryption
technique based on multiple digital chaotic systems which is
known as CVES (Chaotic Video Encryption Scheme). In this
scheme, 2n chaotic maps are used to generate pseudorandom
signals to mask the video and to perform pseudorandom
permutation of the masked video. Very recently, Chen et al.
[13] have proposed a symmetric image encryption in which a
two-dimensional chaotic map is generalized to three
dimension for designing a real time secure image encryption
scheme. This approach employs the three-dimensional cat
map to shuffle the positions of the image pixels and uses
another chaotic map to confuse the relationship between the
encrypted and its original image. The characteristics of the
chaotic maps have attracted the attention of cryptographers to
develop new encryption algorithms. As these chaotic maps
have many fundamental properties such as ergodicity, mixing
property and sensitivity to initial condition/system parameter
and which can be considered analogous to some cryptographic
properties of ideal ciphers such as confusion, diffusion,
balance and avalanche property etc.


III. THE PROPOSED IMAGE ENCRYPTION TECHNIQUE
A. Decomposition of planes into bit planes
In a gray-level image, the pixel intensity is quantized into
an integer number of levels ranging from 0 to 255. The value
of the pixel at coordinate (x, y) is denoted as g(x, y).Each
pixel can be decomposed into an 8 bit binary value, given by
g(x,y) = P
8
P
7
P
6
P
5
P
4
P
3
P
2
P
1
The input image can be subdivided into eight binary images
according to bit locations within a pixel.
In Fig 1 Original grayscale image Lena of size 256 256
and Fig 2 shows binary images obtained by collecting all the 8
bits of the plane image pixel is shown.



Fig 1 Plain Image Lena of size 256 256



Fig 2 Bit plane decomposition of grayscale image Lena
(a)bitplane8, (b)bitplane7, (c)bitplane6, (d)bitplane5,
International J ournal of Engineering Associates (ISSN: 2320-0804) #20 / Special Issue -1 (Volume 3)
NC-EMPIRE Conference proceeding 2014 IJ EA. ALL RIGHTS RESERVED 20
(e)bitplane4, (f)bitplane3, (g)bitplane2, (h)bitplane1


B. To Determine Significant bit planes

To determine whether a bit-plane is significant or not
considering level critical region at = 0.05 i.e. 5% level of
significance from Table I we consider the first four bit-planes
to be insignificant in terms of their percentage contribution.
Percentage of contribution of different bit positions in the
formation of a pixel of intensity 255 is shown in Table I that
can be derived by the formula as stated in [14]




A bit can carry different amount of information depending
on its position in an 8 bit binary number i.e. if there exists a 1
at the 8th position (MSB) of a 8 bit binary number then its
contribution towards the formation of corresponding decimal
number is 127 where as it contributes only 1 if it is present at
the 1st position (LSB).

TABLE I.
PRERCENTAGE OF CONTRIBUTION IN THE PIXEL
INTENSITY.

Bit position Contribution in the formation of pixel
intensity (Percentage)
1 0.392156
2 0.784313
3 1.568627
4 3.137254
5 6.274509
6 12.546019
7 25.098039
8 50.196083


C. Pseudorandom Binary Number Generator

A Pseudo random bit generator (PRBG) based on two one-
dimensional tent maps proposed by K. K. Sud et al.[16]
running side-by-side and starting from random independent
initial conditions has been used in the literature. The
pseudorandom bit sequence is generated by comparing the
outputs of both the chaotic logistic maps. The pseudo random
bit generator (PRBG) is based on two tent maps stated as
pseudo random bit generator (PRBG) is based on two tent
maps stated as

(x
n
) =


and (2)

(y
n
) =




The bit sequence is generated as shown in (3)


(3)

IV. PROPOSED SCHEME FOR ENCRYPTION AND DECRYPTION
A. Encryption

Step 1: Consider the plain image to be I (x, y) of size M N
where x = 0, 1, 2, M - 1 and y = 0, 1, 2 N - 1.

Step 2: Each pixel value P
i
(x, y) in I (x, y) is decomposed
into its corresponding 8 bit binary equivalent and thus 8 bit-
planes B
i
P
i
(x, y) for all i = 1,2, . . , 8 are formed.

Step 3: Significant bit planes are determined by the level
critical region

Step 4: Keys for diffusing the significant bit planes are
generated using Tent Map based PRNG, with initial values as
x
0
y
0
stated in [15] [16]. These values are iterated M times
i.e. the number of pixels of the original image. The final
iterated values of (x
n + 1
, y
n +
1) for highest significant bit plane
become the initial values (x
0
, y
0
) for generating the next key
and so on.

Step 5: The significant bit planes determined are ciphered by
EXOR-ing the binary equivalent planes with the key as

for j = 1, 2 4

Step 6: Each value is stored after EXOR ing to form the cipher
image shown in Fig 3 The cipher bit planes

and the
unencrypted bit planes B
i
P
i
are combined together to form
cipher image
As C
i
(x, y) =

+ B
k
P
k
for i = 1, 2..8, j = 1, 2.4 and
k = 5, 68


Fig 3. Ciphered significant bit planes.
International J ournal of Engineering Associates (ISSN: 2320-0804) #21 / Special Issue -1 (Volume 3)
NC-EMPIRE Conference proceeding 2014 IJ EA. ALL RIGHTS RESERVED 21
B. Decryption

Step 1: Consider the cipher image to be C
a
(x, y) of size M
N where x = 0, 1, 2, M - 1 and y =0,1, 2 N - 1.

Step 2: Each pixel value P
i
(x, y) in C
a
(x, y) is decomposed
into its corresponding 8 bit binary equivalent and thus 8 bit-
planes B
i
P
i
(x, y) for all i = 1,2,. . , 8 are formed.

Step 3: Significant bit planes are determined by the level
critical region.

Step 4: Upon receiving x
0
y
0
the Keys for diffusing the
significant bit planes are generated using Tent Map based
PRNG, with initial values as x
0
y
0


stated in [15] [16].
These values are iterated M times i.e. the number of pixels of
the original image. The final iterated values of (x
n + 1
, y
n +
1)
for highest significant bit plane become the initial values (x
0
,
y
0
) for generating the next key and so on.

Step 5: The significant cipher bit planes, determined by %
level of significance, are deciphered as BP
j
= CBP
j
K
j
for j
= 1, . . ,4.

Step 6: The decipher bit planes BPj and the insignificant bit
planes BP
i
are combined together to form original image
as P
i
(x, y) = BP
j
+ BP
k
for i = 1,2, . . , 8, j = 1, . .4 and k = 5, .
. ,8 where + is used to denote combining process.


V. SECURITY TEST AND ANALYSIS
A good encryption procedure should be robust against all
kinds of cryptanalytic, statistical and brute-force attacks. In
this section, we discuss the security analysis of the proposed
image encryption scheme such as statistical analysis,
sensitivity analysis, key space analysis etc. to prove that the
proposed cryptosystem is secure against the most common
attacks.

A. Statistical analysis
It is well known that many ciphers have been successfully
analyzed with the help of statistical analysis and several
statistical attacks have been devised on them. Therefore, an
ideal cipher should be robust against any statistical attack. To
prove the robustness of the proposed image encryption
procedure, we have performed statistical analysis by
calculating the histograms, the correlations of two adjacent
pixels in the encrypted images and the correlation coefficient
for several images and its corresponding encrypted images.
(a) Histogram analysis: An image-histogram illustrates how
pixels in an image are distributed by graphing the number of
pixels at each color intensity level. In Fig 4 the histogram of
the original image of Lena of size 256 256 and the
histogram of Corresponding Cipher Image has been presented
which depicts that the histogram of plain image has certain
pattern where as that of the Cipher image are uniformly
distributed.



(a)


(b)
Fig 4 Visual Test and Histogram analysis (a) Plain original
image, (b) histogram of original image


(c)


(d)
(c) Encrypted Image, (d) Histogram of encrypted image (d)


International J ournal of Engineering Associates (ISSN: 2320-0804) #22 / Special Issue -1 (Volume 3)
NC-EMPIRE Conference proceeding 2014 IJ EA. ALL RIGHTS RESERVED 22
B. Correlation Coefficient Analysis
In most of the plain images, there exists high correlation
among adjacent pixels whereas poor correlation between the
neighbouring pixels of corresponding cipher image is
observed. The correlation of horizontally, vertically and
diagonally adjacent pixels of both the plain and cipher image
are shown in Fig 5.





Fig 5. Horizontal, vertical diagonal pixel distribution of
plain image and encrypted image.



TABLE II.
CORRELATION DO EFFICIENT BETWEEN
HORIZONTAL, VERTICAL, DIAGONAL ADJACENT
PIXELS OF ORIGINAL AND ENCRYPTED IMAGES

Image
Name
Horizontal
Correlation
Vertical
Correlation
Diagonal
Correlation
Plain
Image
Cipher
Image
Plain
Image
Cipher
Image
Plain
Image
Cipher
Image
Lena 0.9453 -0.0012 0.9716 -0.0095 0.9194 0.0078
Jellyfish 0.9669 0.0170 0.9694 0.0150 0.9531 -0.0106
Elaine 0.9707 0.0068 0.9738 0.0198 0.9495 -0.0255
Astronaut 0.9633 0.0039 0.9670 0.0367 0.9419 0.0217


C. Sensitivity analysis
An ideal image encryption procedure should be sensitive
with respect to the secret key i.e. the change of a single bit in
the secret key should produce a different encrypted image. As
an example plain image Lena of size 256 256 is encrypted
with x0 = 0.45001, y0 = 0.54001, 1 = 2 = 1.97. In Fig 6
different cipher images of Lena of size 256 256 with minor
changes in secret keys has been presented.



(a)


(b) (c)
Fig 6 Key sensitivity test (a)Plain Image Lena of size 256
256 (b) Cipher image with chosen key (c) Cipher image with
change in x
0
=

0.45002, y
0
= 0.54002

D. Information Entropy analysis
Entropy is a statistical measure of randomness that can be
used to characterize the texture of an image. It is well known
that the entropy H(s) of a message source s can be calculated
as:

H(s) =

(4)

Where

represents the probability of message

.
When an image is encrypted, its entropy should ideally be
8. If it is less than this value, there exists a certain degree of
predictability which threatens its security. The entropy of
partially and complete encrypted images are found to be
different by 0.2%

TABLE III.
INFORMATION ENTROPY

Image Name

Information Entropy
Plain Image Cipher Image
Lena 7.44 7.99
Jellyfish 6.35 7.86
Elaine 7.48 7.99
Astronaut 7.44 7.94
International J ournal of Engineering Associates (ISSN: 2320-0804) #23 / Special Issue -1 (Volume 3)
NC-EMPIRE Conference proceeding 2014 IJ EA. ALL RIGHTS RESERVED 23
E. Encryption quality NPCR, UACI

Opponent can create a small change in the input image to
observe changes in the result. By this method, the meaningful
relationship between original image and encrypted image can
be found. If one small change in the plain image can cause a
significant change in the cipher-image then the differential
attack actually loses its efficiency and becomes useless. To
test the effect of one-pixel change on the image encrypted by
the proposed algorithm, two common measures were used
Number of Pixel Change Rate (NPCR) and Unified Average
Change in Intensity (UACI) . Consider two cipher-images,
Ca(i, j) and Cc(i , j) where i = 0,1,2, , M - 1 and j = 0,1,2,
, N - 1,whose corresponding plain-images have only one
pixel difference. Then NPCR and UACI are defined as

NPCR=







UACI =

/ 255 100%


TABLE IV.
MEASUREMENT OF ENCRYPTION QUALITY AND
TIME TAKEN
Image Name NPCR UACI Time Elapsed
Lena 99.57 33.48 1.20
Jellyfish 99.52 33.40 1.16
Elaine 99.62 33.37 1.17
Astronaut 99.57 33.46 1.12

VI. CONCLUSION
The proposed algorithm was found to be very fast and
secured which can be applied for real time applications which
have bandwidth and power constraints. This is because it
requires less time to encrypt and decrypt image since they are
partially encrypted. This will also help to improve security
since the intruder does not know which all coefficients are
partially encrypted. Application of chaos theory helps to
achieve complex dynamics. Future scope of this method is to
design an adaptive algorithm to detect the significant bit
planes. Extend the algorithm for videos.

References

[1] N. Bourbakis, C. Alexopoulos, Picture data encryption using
SCAN pattern, Pattern Recogn. 25 (1992) 567581.

[2] Sahar Mazloom, Amir-Masud Eftekhari-Moghadam, Color
Image Cryptosystem using Chaotic Maps, in Computational
Intelligence for Multimedia, Signal and Vision Processing
(CIMSIVP), 2011 IEEE Symposium, April 2011, pp. 142-147.

[3] H.K.L. Chang, J.L. Liu, A linear quad tree compression scheme
for image encryption, Signal Process. 10 (4) (1997) 279290.

[4] J. Scharinger, Fast encryption of image data using chaotic
Kolmogrov flow, J. Electronic Eng 7 (2) (1998) 318325.

[5] Fridrich Jiri, Symmetric ciphers based on two dimensional chaotic
maps, Int. J. Bifurcat Chaos 8 (6) (1998) 12591284.

[6] J.C. Yen, J.I. Guo, A new chaotic key based design for image
encryption and decryption, Proceedings of the IEEE International
Symposium Circuits and Systems, vol. 4, 2000, pp. 4952

[7] J.C. Yen, J.I. Guo, An efficient hierarchical chaotic image
encryption algorithm and its VLSI realization, IEE Proc. Vis.
Image Process. 147 (2000) 167175.

[8] H. Cheng, X.B. Li, Partial encryption of compressed image and
videos, IEEE Trans. Signal Process. 48 (8) (2000) 24392451.

[9] J.C. Yen, J.I. Guo, A new image encryption algorithm and its VLSI
architecture, in: Proceedings of the IEEE workshop signal
processing systems, 1999, pp. 430437

[10] C.C. Chang, M.S. Hwang, T.S. Chen, A new encryption algorithm
for image cryptosystems, J. Syst. Software 58 (2001) 8391.

[11] S. Li, X. Zheng, Cryptanalysis of a chaotic image encryption
method, in: Proceedings of the IEEE International. symposium
on circuits and systems, Scottsdale, AZ, USA, 2002

[12] S. Li, X. Zheng, X. Mou, Y. Cai, Chaotic encryption scheme for
real time digital video, Proceedings of the SPIE on electronic
imaging, San Jose, CA, USA, 2002

[13] G. Chen, Y. Mao, C.K. Chui, A symmetric image encryption based
on 3D chaotic maps, Chaos Solitons Fractals 21 (2004) 749761.

[14] Lin Teng, Xingyuan Wang, A bit-level image encryption
algorithm based on spatiotemporal chaotic system and self-
adaptive, Optics Communication, 285, pp 4048 54, 2012.

[15] C. Dongming, Z. Zhiliang, Y. Guangming, "An Improved Image
Encryption Algorithm Based on Chaos." in Proceedings of IEEE
International Conference for Young Computer Scientists, 2008.

[16] N.K. Pareek, VinodPatidar, K.K. Sud, Cryptography using
Multiple one-dimensional chaotic maps, Communications in
Nonlinear Science and Numerical Simulation, 2005.





International J ournal of Engineering Associates (ISSN: 2320-0804) #24 / Special Issue -1 (Volume 3)
NC-EMPIRE Conference proceeding 2014 IJ EA. ALL RIGHTS RESERVED 24