Nothing Special   »   [go: up one dir, main page]

58 B 7 Bbebaca 27261 e 51 A 480 D

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/313787537

Image Encryption using Block Permutation and XOR Operation

Article in International Journal of Computer Applications · February 2017


DOI: 10.5120/ijca2017912981

CITATIONS READS

3 1,396

2 authors, including:

Sivakumar Thangavel
PSG College of Technology
10 PUBLICATIONS 129 CITATIONS

SEE PROFILE

All content following this page was uploaded by Sivakumar Thangavel on 02 March 2017.

The user has requested enhancement of the downloaded file.


International Journal of Computer Applications (0975 – 8887)
Volume 160 – No 9, February 2017

Image Encryption using Block Permutation and XOR


Operation
T. Sivakumar K. Gayathri Devi
Assistant Professor Assistant Professor
Department of Information Technology Department of Information Technology
PSG College of Technology,Tamilnadu-641 004, PSG College of Technology,Tamilnadu-641004, India.
India.

ABSTRACT 2. LITERATURE REVIEW


Now a days, in every communication channel there is a Mohammad Ali BaniYounes & AmanJantan [3] proposed an
necessity of transmission of messages securely from sender to block based transformation algorithm. Where the image is
the authentic receiver. In recent years, for different divided into blocks and transformed by proposed
information transfer systems, a number of data encryption transformation algorithm followed by blowfish algorithm to
techniques has been evolved. Several encryption approaches encrypt the original image.
based on permutation have been proposed by various
researchers. In this paper, for encrypting images, permutation Sesha Pallavi Indrakanthi & P.S. Avadhani [4] proposed
and XOR operation with a key matrix which together fulfill permutation based image encryption technique, which
the purpose of cipher is proposed. First the image is divided performs random pixel permutation over the image without
into blocks which are then shuffled among themselves using affecting the quality of the image by making use of 64 bit key
random numbers. Lagged Fibonacci Generator (LFG) is used shared between the sender and the receiver.
to generate random numbers and further the random numbers Chinmaya Kumar Nayak et al. [5] proposed an index based
are used as key stream for XOR operation. The proposed chaotic system for image encryption. In this method, pixels of
encryption method is simple and ensures the security of the images were permutated based on the index position on
encrypted images. chaotic sequence. Permutation process is carried on, by
storing the index position of the sequence respected to their
Keywords sorted real value of the sequence. Pixel of the image is
Cryptography, image encryption, Lagged Fibonacci Generator rearranged and mapped with index position and thus the
(LFG), Random number image is encrypted.
1. INTRODUCTION Panduranga H.T & Naveen Kumar S.K [6] proposed an
Evolution of computers and Internet has made our life easy hybrid technique for image encryption that involves scan
but added complexity in terms of security. Innovation in pattern generated by scan methodology and concept of carrier
technology over past decade is a huge one [4]. Encryption is image. Alphanumeric keyword is used to create carrier image.
the process of information transformation for securing the Thus carrier image is added with original image to produce
data [3,4]. Most of the available encryption techniques were encrypted image.
designed only for textual data [12]. There are various
Mitra A et al. [7] proposed a new approach to image
encryption algorithms such as DES, AES which comes under
encryption using combinational permutation technique. The
symmetric encryption algorithms where as RSA algorithm,
idea behind their approach is to combine different permutation
which is an asymmetric encryption algorithms [1,2].
techniques randomly based upon bit, block and pixel, which
However, these algorithms are not suitable for image
produces good results when combined together instead
applications due tosome features of images such as
carrying it separately for encryption process.
redundancy and huge capacity of data [4].Security of digital
images has attracted many in recent years and various G.A.Sathish kumar & K.BhoopathyBagan [8] proposed an
encryption methods for images has been proposed to enhance encryption methodology that involves pixel shuffling, base
the image security such as block based transformations [3,5] 64 encoding based algorithm. The process involves
and pixel permutation techniques [4,7,8,9]. In this paper, a combination of block permutation, pixel permutation and
simple approach has been proposed that involves random value transformation.
permutation of blocks and performing XOR operation over
the permuted image with the key generated by using Lagged C.K. Huang et al. [9] proposed a methodology to encrypt
Fibonacci Generator (LFG) for image encryption. The rest of gray scale image that involves pixel shuffling and gray level
the paper is organized as follows. Section 2 briefly outlines encryption by a single chaotic system. They performed
the literature review of image encryption methods. Section 3 shuffling of rows and columns combined with chaotic system
presents the working model of proposed image encryption followed by gray level encryption which eliminates image
method. Section 4 deals with the experimental results and outlines and also changes the distribution of gray level which
analysis. The paper is concluded in section 5. results in increasing key space.
Qian Mao et al. [10] proposed an image encryption scheme
based upon concatenated tour automorphisms. Based upon
this novel approach they proposed two application schemes

33
International Journal of Computer Applications (0975 – 8887)
Volume 160 – No 9, February 2017

which includes scrambling matrices and iteration keys acting 3.1 Lagged Fibonacci Generator
as secret keys. Fibonacci generator is generalized to give a family of pseudo
Qiang Zhang et al. [11] proposed a novel approach for image random number generators of the form as given in equation
encryption based upon DNA subsequence operation. In the (1)
methodology they proposed they made use of only simple Xn =Xn-l +Xn-k (mod m) where l>k>0 (1)
DNA subsequence operations such as elongation, truncation,
delection etc., combined with logistic chaotic map to get the Initially, instead of two initial values, l initial values, X0,
location and value of the pixel points in the image. ……, Xl-1, are needed inorder to compute the next sequence
element. In this expression the “lags” are k and l, so that the
B. Nagarajan & P.Manju [13] proposed a image encryption current value of X is determined by the value of X k places
algorithm by making use of Genetic operators, Original image ago and L places ago. Inaddition, for mostapplications of
is scrambled with the help of DNA encoding by performing interest m is a power of two that is, m =2M.
bit level permutation, later genetic operators such as mutation,
cross over techniques were used to produce encrypted image. Table1 gives the list of sample random numbers generated
with initial values a=0, b=1 and key values k=2 and l=3.
T.Sivakumar and R.Venkatesan [15] proposed a framework
for image encryption that uses Karhunen Loeve (KL) Table 1. Sample Random Numbers Generated Using LFG
transform that takes input image in the form of square matrix
which results in encrypted image and a decryption key. They 0 1 1 2 3 5 8 13
made use of RSA algorithm to decrypt the key matrix. At
receiver, on receiving encrypted image along with key matrix, 21 26 34 47 60 81 107 141
the receiver multiplies the encrypted image along with
transposed decrypted key matrix to get the original image. 188 248 74 181 67 0 248 67
T.Sivakumar, and R.Venkatesan [16] proposed an image 248 60 60 53 120 113 173 233
encryption approach that uses matrix reordering to permute
the pixel positions. In order to diffuse the pixel values they 31 151 9 182 160 191 87 96
performed bitwise XOR operation using pseudo random
numbers generated by linear congruential method, which 23 183 119 206 47 70 253 117
resulted in encrypted image.
68 115 185 183 45 113 228 158
3. PROPOSED IMAGE ENTRYPTION
METHOD 86 131 244 217 120 206 82 45
In this section, the proposed image encryption method using
permutation and XOR operation is presented. Initially the
original gray scale image is divided into blocks of NxN.
Random numbers from 1 to N are generated by making use of
3.2 Encryption algorithm
random function which is being used to permute the divided The following are the sequence of steps used to encrypt
image. The shuffled blocks of images are merged to form a images.
single image. LFG is being used to produce another set of Input: Original image, random numbers generated using LFG
Random numbers which is then XORed with pixels values of
the shuffled image to produce an encrypted image. Figure 1 Output: encrypted image
shows the sequence of operations involving in the proposed
Step 1: Input the original image and input the block size (N).
encryption method using a block diagram
Step 2: Original image is divided into blocks of size N*N
Original Random pixels
image numbers
Step 3: Generate Random numbers using LFG
Step 4: Shuffle the block of images using Random numbers.
Step 5: Perform XOR operation between pixel data of the
Divide it into blocks and
image in each block and the random numbers generated by
shuffle them using LFG.
Step 6: Store the encrypted image.

Scrambled image 4. EXPERIMEMTAL RESULTS AND


ANALYSIS
Lagged The proposed method is implemented using java with Intel(R)
XOR operation Fibonacc core to dual processor, clock speed of 2.40GHZ, 2GB RAM,
i 250GB hard disk and Windows 7(32 bit) operating systems.
generator Figure2(a) shows the original image, Figure 2(b) shows the
permutated image, Figure 2(c) shows encrypted image by
performing XOR operation between random numbers
Encrypted image K L generated and the pixels of permutated image, Figure 2(d)
shows the decrypted image.
Figure 1. Block diagram of proposed method

34
International Journal of Computer Applications (0975 – 8887)
Volume 160 – No 9, February 2017

Table 2. Results of NPCR measure


Proposed
Existing method
method
Image
NPCR (in NPCR (in
NPCR (in %)
%) [3] %) [13]
Camera
99.5163 99.4720 99.4385
Man
Coin 99.5209 99.5802 99.2676
(a) Original image (b) Permuted image
Leena 99.5524 99.5072 99.5285
Peppers 99.5204 99.5691 99.4583
Baboon 99.4497 99.6824 99.5316

From Table 2 it is found that, the results of NPCR of


proposed method is comparable with the existing methods
[3,13].
Table 3. Results of UACI measure

Proposed
Existing method
method
(c) Encrypted image (d) Decrypted image Image
UACI
UACI (in %) UACI (in %)
Figure 2. Results of proposed method
[3] [13] (in %)
4.1 Visual testing
There is no perceptual similarity between encrypted image Camera
and original images. The encrypted image should greatly 25.7913 30.3288 28.2449
Man
differ from its original form. In general, two difference
measures such as NPCR and UACI are used to quantify this Coin 26.7005 30.9832 27.5625
requirement [13].
Leena 26.3080 30.2477 27.1301
4.1.1 Number of Pixel Change Rate (NPCR)
The Number of Pixels Change Rate (NPCR), which indicates Peppers 25.7327 30.1095 26.7484
the percentage of different pixels between two images. The
mathematical expression for the original image Io(i, j) and its Baboon 22.8918 30.3128 23.6760
encrypted image IENC(i, j) to compute NPCR value is given in
the equation (2) shown below [13]. From Table 3, it is found that results of UACI of proposed
𝐷(𝑖,𝑗 )
method is better than the existing method [3] and slightly
𝑖,𝑗
NPCR = * 100% (2) lower than the method reported in [13]
𝑊∗𝐻

Where, W and H are the width and height of the 4.2 Adjacent pixel correlation
images It is possible to break the ciphers by statistical analysis. This
4.1.2 Unified Average Change Intensity (UACI) is done by analyzing the correlation between the adjacent
Even a minute change in original image must cause some pixels in the encrypted image. In order to check whether the
major difference or change in cipher image. UACI is helpful suggested method is secure against statistical attacks, the
to identify the average intensity of difference in pixels correlation coefficient is measured and analyzed.
between the two images. Equation (3) gives the mathematical
expression to compute UACI value for the original image Io(i, From Table 4, it is found that, the result of correlation
j) and encrypted image IENC(i, j) is shown below [13]. coefficient of proposed method is comparable with the
existing methods [3, 14].
1 𝐼𝑜 𝑖,𝑗 −𝐼𝑒𝑛𝑐 (𝑖,𝑗 )
UACI=𝑊∗𝐻 [ 𝑖,𝑗 ] * 100% (3)
255 Table4. Results of correlation coefficient
Encrypted image
Where, W and H are the width and height of the images. Images
Horizontal Vertical diagonal

Original image (Leena) 0.9929 0.9936 0.9882

Proposed method 0.0740 0.0738 0.0631

0.0603 0.0593 0.0584


Mohammad Ali et al.

35
International Journal of Computer Applications (0975 – 8887)
Volume 160 – No 9, February 2017

[3] block based transformation algorithm”, International


Journal of Research and Reviews in Computer Science,
G.A Sathish kumar et Vol. 2, No.2, 2011.
-0.0332 0.0608 0.0567
al. [14]
[6] Panduranga H.T and Naveen Kumar S.K, “Hybrid
approach for image encryption using scan pattern and
4.3 Entropy analysis carrier images”, International Journal on Computer
Entropy is a measure of information content which is Science and Engineering, vol. 2, No. 2, pp. 297-300,
unpredictable. Table 5 gives shows about the entropy analysis 2010.
of original versus encrypted image by the proposed encryption [7] A. Mitra, Y.V. subba Rao and S.R.M. Prasanna, “A new
method. image encryption approach using combinational
permutation techniques”, International Journal of
Table 5. Results of entropy analysis Electrical and Computer Engineering, Vol.1, No.2, pp.
Image Original image Encrypted image 127-131, 2006.
[8] G. A. Sathish kumar and K. Bhoopathy Bagan, “A novel
Camera man 6.7453 7.6404 image encryption algorithm using pixel shuffling and
base-64 encoding based chaotic block cipher”, WSEAS
Transactions on computers, Vol. 10, No. 6, pp. 169-178,
coins 6.2371 7.7577 2011.
[9] C. K. Huang, C.W. Liao, S.L. Hsu and Y.C. Jeng,
leena 7.5636 7.7901 “Implementation of gray image encryption with pixel
shuffling and gray-level encryption by single chaotic
peppers 6.8830 7.5878 system”, Telecommunication Systems, Vol.52, No.2, pp.
563-57, 2011.

baboon 6.7305 7.7914 [10] Qian Mao, Chin-Chen Chang and Hsiao-Ling Wu, “An
image encryption scheme based on concatenated torus
automorphisms ”, KSII Transactions on Internet and
Information Systems, Vol. 7, No. 6,pp. 1492-1511, 2013.
5. CONCLUSION
In this paper, an image encryption method based on block [11] Qiang Zhang, Xianglian Xue and Xiaopeng Wei, “A
permutation and XOR operation is implemented and the novel image encryption algorithm based on DNA
results were analyzed. The basic idea involves providing one subsequence operation’’, The Scientific World Journal,
of the easiest methods for encryption process. The process Vol. 2012, Article ID 286741, 2012.
involves dividing the image into blocks and then shuffling
[12] Manju Rani and Sudesh Kumar, “Analysis on different
them. Pixels of the blocks are XORed with the random
parameters of encryption algorithms for information
numbers to get the encrypted image. Adjacent pixel
security”, International Journal of Advanced research in
correlation value of encrypted image is found to be less than
Computer Science and Software Engineering”, Vol. 5,
that of the original image. From the results of NPCR and
No. 8, 2015.
UACI values it is clearly shown that the proposed method
produces good results comparable with some existing [13] B. Nagarajan and P.Manju, “Secure image encryption
methods. In future, the work is experimented and tested with algorithm based on genetic operators”, International
other random number generators. Journal on Engineering Technology and Sciences, Vol. 3,
No. 5, 2016.
6. REFERENCES
[1] William Stallings, “Cryptography and Network Security [14] G.A Sathishkumar, K. Bhoopathy and R. Sriraam,
Principles and Practices”, Prentice Hall, New Delhi, “Image encryption based on diffusion and multiple
2015. chaotic maps”, International Journal of Network security
and its Applications, Vol. 3, pp. 181-194, 2011.
[2] Bruce Schneier, “Applied Cryptography”, John Wiley &
Sons, New York, 2010. [15] T.Sivakumar, and Dr.R.Venkatesan, “A Novel
Framework for Image Encryption using Karhunen-Loeve
[3] Mohammad Ali BaniYounes and AmanJantan, “Image Transform”, International Journal of Computer
encryption using block-based transformation algorithm”, Applications (ISSN 0975-8887), p.no 1- 6, Volume 54–
IAENG International Journal of Computer Science, Vol No.2, September 2012.
35, No.1, 2008.
[16] T.Sivakumar, and R.Venkatesan, “A Novel Image
[4] Sesha Pallavi Indrakanti and Avadhani P.S, “Permutation Encryption Approach using Matrix Reordering”, wseas
based image encryption technique”, International Journal transactions on computers, Vol 12, Issue. 11, p.p. 407-
of Computer Applications, Vol. 28, No.8, 2011. 418, November 2013.
[5] Chinmaya Kumar Nayak, Anuja Kumar Acharya and
Satyabrata Das, “Image encryption using an enhanced

IJCATM : www.ijcaonline.org
36

View publication stats

You might also like