0% found this document useful (0 votes)
199 views5 pages

Choase Based Image Encryption Using Block-Based Transformation Algorithm

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

(IJCNS) International Journal of Computer and Network Security, 19

Vol. 1, No. 3, December 2009

Choase Based Image Encryption Using Block-


Based Transformation Algorithm
Kamlesh Gupta1, Sanjay Silakari2
1
RJIT, BSF Academy Tekanpur, M.P, India
kamlesh_rjitbsf@yahoo.co.in
2
UIT,RGPV,Bhopal, M.P. India
ssilakari@yahoo.co.in

Abstract: Encryption is used to securely transmit data in open them to the choase based encryption algorithm. By using the
networks. Each type of data has its own features; therefore correlation and entropy as a measure of security, this process
different techniques should be used to protect confidential results in a lower correlation and a higher entropy value
image data from unauthorized access. Most of the available when compared to using the choase based algorithm alone,
encryption algorithms are mainly used for textual data and may and thus improving the security level of the encrypted
not be suitable for multimedia data such as images. In this images. There are two main keys to increase the entropy; the
paper, we introduce a block-based transformation algorithm
variable secret key of the transformation process and the
based on the combination of image transformation and Choase
base image encryption algorithm. The original image was
variable secret key of the choase based algorithm works
divided into blocks, which were rearranged into a transformed using an iterative cipher mechanism that is based on the
image using a transformation algorithm presented here, and logistic function. The encryption module encrypts the image
then the transformed image was encrypted using the Choase pixel by-pixel, taking into consideration, in each iteration
base algorithm. The results showed that the correlation between the values of the previously encrypted pixels. This feedback
image elements was significantly decreased by using the property, combined with the external secret key of 256-bit,
proposed technique. The results also show that increasing the makes our stream cipher robust against cryptanalytic
number of blocks by using smaller block sizes resulted in a attacks. Furthermore a simple implementation of image
lower correlation and higher entropy. encryption achieves high encryption rates on general-
purpose computers.
Keywords—Image correlation, Image encryption, Image
entropy, Permutation, Choase function.
2. Background
1. Introduction Encryption is the process of transforming the information
to insure its security with the huge growth of computer
The rapid growth of computer networks allowed large networks and the latest advances in digital technologies, a
files, such as digital images, to be easily transmitted over the huge amount of digital data is being exchanged over various
internet [1]. Data encryption is widely used to ensure types of networks. It is often true that a large part of this
security however, most of the available encryption information is either confidential or private. As a result,
algorithms are used for text data. Due to large data size and different security techniques have been used to provide the
real time constrains, algorithms that are good for textual required protection [8].
data may not be suitable for multimedia data [2]-[4]. The
efficiency and success of e-commerce and business was The security of digital images has become more and more
fueled by the underlying growth of available network important due to the rapid evolution of the Internet in the
bandwidth. Over the past few years, internet-enabled digital world today. The security of digital images has
business or e-business has drastically improved revenue and attracted more attention recently, and many different image
efficiency of large scale organizations. It has enabled encryption methods have been proposed to enhance the
organizations to lower operating costs and improves security of these images [9].
customer’s satisfaction. Such applications require networks
which accommodate voice, image, video and protected data. Image encryption techniques try to convert an image to
Obviously, privacy must another one that is hard to understand [9]. On the other
In most of the natural images, the values of the hand, image decryption retrieves the original image from
neighboring pixels are strongly correlated (i.e. the value of the encrypted one. There are various image encryption
any given pixel can be reasonably predicted from the values systems to encrypt and decrypt data, and there is no single
of its neighbors) [5]-[7]. In order to dissipate the high encryption algorithm satisfies the different image types.
correlation among pixels and increase the entropy value, we
propose a transformation algorithm that divides the image Most of the algorithms specifically designed to encrypt
into blocks and then shuffles their positions before it passes digital images are proposed in the mid-1990s. There are two
20 (IJCNS) International Journal of Computer and Network Security,
Vol. 1, No. 3, December 2009

major groups of image encryption algorithms: (a) non-chaos Step3:


selective methods and (b) Chaos-based selective or non- Randomize ()
selective methods. Most of these algorithms are Image Step4:
Encryption Using Block-Based Transformation Algorithm HorizontalNoBlocks = RandomNum between
Mohammad Ali Bani Younes and Aman Jantan designed for (LowerHorizontalNoBlocks and ImageWidth)
a specific image format compressed or uncompressed, and VerticalNoBlocks = RandomNum between
some of them are even format compliant. There are methods (LowerVerticalNoBlocks and ImageHeight)
that offer light encryption (degradation), while others offer NoBlocks = HorizontalNoBlocks* VerticalNoBlocks
strong form of encryption. Some of the algorithms are Step5:
scalable and have different modes ranging from degradation Seed = | Hash value (Key) |
to strong encryption [10]. HashVal1 = |Hash val(first half of the Key)|
Mitra A et al. [11] have proposed a random HashVal2 = |Hash val (second half of the Key)|
combinational image encryption approach with bit, pixel Step6:
and block permutations.Zhi-Hong Guan et al. [12] have Randomize using seed
presented a new image encryption scheme, in which Step7:
shuffling the positions and changing the grey values of If HashVal1 > HashVal2 Then
image pixels are combined to confuse the relationship SEEDALTERNATE = 1
between the cipher image and the plain image.Sinha A. and Else
Singh K. [13] proposed an image encryption by using SEEDALTERNATE = 2
Fractional Fourier Transform (FRFT) and JigSaw End If
Transform (JST) in image bit planes. Shujun Li et al. [14] Step8:
have pointed out that all permutation-only image ciphers I=0
were insecure against known/chosen-plaintext attacks. In Number-of-seed-changes (N) = 1
conclusion, they suggested that secret permutations have to While I < NoBlocks
be combined with other encryption techniques to design R=RandomNum between (zero and NoBlocks -1)
highly secured images. Maniccam S.S. and Bourbakis N G. If R is not selected Then
[10] proposed image and video encryption using SCAN Assign location R to the block I
patterns. The image encryption is performed by SCAN- I +=1
based permutation of pixels and a substitution rule which Else
together form an iterated product cipher. If SEEDALTERNATE = 1 Then
seed = seed + (HashVal1 Mod I) +1
Ozturk I. and Sogukpinar I. [15] proposed new schemes SEEDALTERNATE = 2
which add compression capability to the mirror-like image Else
encryption MIE and Visual Cryptography VC algorithms to seed = seed + (HashVal2 Mod I) + 1
improve these algorithms. Sinha A. and Singh K. [16] SEEDALTERNATE = 1
proposed a technique to encrypt an image for secure Randomize (seed)
transmission using the digital signature of the image. End If
Digital signatures enable the recipient of a message to Else
authenticate the sender of a message and verify that the Number-of-seed-changes += 1
message is intact. Droogenbroeck M.V. and Benedett R. [2] If Number-of-seed-changes > 500,000 then
have proposed two methods for the encryption of an image; For K = 0 to NoBlocks -1
selective encryption and multiple selective encryption. If K not selected then
Maniccam S.S., Nikolaos G. and Bourbakis. [17] have Assign location K to Block I
presented a new methodology, which performs both lossless I=I+1
compression and encryption of binary and gray-scale End if
images. The compression and encryption schemes are based Next K
on SCAN patterns generated by the SCAN methodology. End if
The proposed algorithm divides the image into random End if
number of blocks with predefined maximum and minimum End While
number of pixels, resulting in a stronger encryption and a END CREATE_TRANSFORMATION_TABLE
decreased correlation. Input: BMP image file, a string Key
Output: Transformation table
3. Algorithm CREATE_TRANSFORMATION_
ALGORITHM PERFORM_TRANSFORMATION
TABLE
For I = 0 to No. Blocks -1
Step1: Load Image, Input key, Get ImageWidth and
Get the new location of block I from the
ImageHeight
Transformation table
Set block I in its new location
Step2:
END PERFORM_TRANSFORMATION
LowerHorizontalNoBlocks = Int(ImageWidth /10)
LowerVerticalNoBlocks = Int(ImageHeight /10)
(IJCNS) International Journal of Computer and Network Security, 21
Vol. 1, No. 3, December 2009

4. Algorithm Choase based feedback image Input original Block Based Transform
encryption image Transformation Image

In this section, we discuss the step by step procedure of


the proposed algorithm for image compression and
encryption. The proposed algorithm with block size of 8-bit Pi
applies wavelet transform for each block for image Ki +
compression and 256-bit secret key used for image M1 X +
M2
encryption. The key is used to generate a pad that is then
+ Ci
merged with the plaintext a byte at a time. L
1. For the image compression, we divide plaintext into Ki - 1
blocks of 8-bits. Encrypt
I1, , I2 , …………………………Ii image
P0,P1,,P2,,P3,,P4 ..........Pi
C0,C1, C2, C3, C4 .........Ci Figure 1. Proposed Encryption technique
2. The proposed image encryption process utilizes an
external secret key of 256-bit Long. Further, the secret key
6. Experiments
is divided into Blocks of 8-bit each, referred as session Keys.
K0,K1,K2,K3,K4 .........K64 (in hexadecimal)
The algorithm was applied on a bit mapped (bmp) image
here, Ki 's are the alphanumeric characters (0–9 and (A–
that has the size of 300 pixels x 300 pixels with 256 colors.
F) and each group of two alphanumeric characters
In order to evaluate the impact of the number of blocks on
represents a session key. Alternatively, the secret key can be
the correlation and entropy, three different cases were
represented in ASCII mode as
tested. The number of blocks and the block sizes for each
K0,K1,K2,K3,K4 .........K32 (in ASCII)
case are shown in Table I. Table I Different Cases to Test
Here, each Ki represents one 8-bit block of the secret key
the Impact of the Number of Blocks on the Correlation and
i.e. session key.
Entropy Case Number of blocks Block size 1 30×30 10
3. The initial condition ( X 0 ) for the chaotic map and the
pixels × 10 pixels 2 60×60 5 pixels × 5 pixels3 100×100 3
initial code C0 are generated from the session keys as:
32 pixels × 3 pixels.
R= ∑ M1[ Ki ] Table 1: Different Cases to Test the Impact of the
i=1
X0 =R – [Floor (R)] Number of Blocks on the Correlation and Entropy

[∑ ]
32
Kimod256  Case Number of Block size
C0 =
i=1 Number blocks
Here Ki , Floor , and M1 are, respectively, the decimal
equivalent of the ith session key, the floor function, and 1 30×30 10 pixels × 10
mapping from the session, key space, all integers between 0 pixels
and 255, into the domain of the logistic map, all real 2 60×60 5 pixels × 5
numbers in the interval [0,1]. pixels
4. Read a byte from the image file (that represent a block
of 8-bits) and load it as plain image pixel Pi.. 3 3 100×100 3 pixels × 3
5. Encryption of each plain image pixel Pi to produce its pixels
corresponding cipher image Pixel Ci can be expressed
mathematically as:
Case1.

 
N
Pi+M2 ∑ rXi1− Xi  mod256 .
Ci =
i=1
Where Xi represents the current input for logistic
Map and computed as:
Xi = M1[X i-1 + C i-1 + K i]
N is the number of iteration of logistic map for its current
input Xi and calculated as:
N = K i +1 + C i-1
And M2 maps the domain of the logistic map, back into
the interval [0,255]. (a) (b) (c)
6. Repeat steps 5-6 until the entire image file is Figure 2. Results of encryption by using 10 pixels × 10 pixels
encrypted. blocks. (a) Original image.(b) Transformed image. (c) Encrypted
image using transformed followed by the Choase Based algorithm.
5. An overview of the proposed technique. Case2.
22 (IJCNS) International Journal of Computer and Network Security,
Vol. 1, No. 3, December 2009

00
300×3 0.0016 5.5439
00
RC4(2048 30×30 0.0024 5.5438
60×60 0.0026 5.5437
100×1 0.0034 5.5439
00
300×3 0.0034 5.5438
00
(a) (b) (c)
Figure 3. Results of encryption by using 60 pixels × 60 pixels 7. Conclusion
blocks. (a) Original image.. (b) Transformed image. (c) Encrypted
image using transformed followed by the Choase Based algorithm In this paper a simple and strong method has been
proposed for image security using a combination of block
based image transformation and encryption techniques.
Case3. Experimental results of the proposed technique showed that
an inverse relationship exists between number of blocks and
correlation, and a direct relationship between number of
blocks and entropy. When compared to many commonly
used algorithms, the proposed algorithm resulted in the best
performance; the lowest correlation and the highest entropy.

References

[1] W. Lee, T. Chen and C. Chieh Lee, "Improvement


of an encryption scheme for binary images," Pakistan
(a) (b) (c) Journal of Information and Technology. Vol. 2, no. 2,
Figure 4. Results of encryption by using 100 pixels × 100 pixels
blocks. (a) Original image.. (b) Transformed image. (c) Encrypted 2003, pp. 191-200. http://www.ansinet.org/
[2] M. V. Droogenbroech, R. Benedett, "Techniques for
image using transformed followed by the Choase Based algorithm.
a selective encryption of uncompressed and
compressed images," In ACIVS’02, Ghent, Belgium.
Table2: the comparison of different algorithm based on Proceedings of Advanced Concepts for Intelligent
correlation and entropy Vision Systems, 2002.
[3] S. Changgui, B. Bharat, "An efficient MPEG video
Commercially available algorithms preceded by encryption a lgor i thm, " Proc e edings of the
the proposed algorithm symposium on reliable distributed systems, IEEE
System Numb Correl Entrop computer society Press, 1998, pp. 381-386.
er of ation y [4] S. Fong, P.B. Ray, and S. Singh, "Improving the
blocks lightweight video encryption algorithm," proceeding of
Choase 30×30 0.0049 5.5286 iasted international conference, single processing,
Based 60×60 0.0040 5.5439 pattern recognition and application, 2002, pp. 25-28.
Feedback(256 100×1 0.0034 5.5440 [5] S.P.Nana'vati., P. K. panigrahi.
) 00 "Wavelets:applications to image compression- I,".
300×3 0.0026 5.5437 joined of the scientific and engineering computing,
00 vol. 9, no. 3, 2004, pp. 4- 10.
BLOWFIS 30×30 0.0063 5.4402 [6] c. Ratael, gonzales, e. Richard, and woods, "Digital
H(448) 60×60 0.0049 5.5286 image processing," 2nd ed, Prentice hall, 2002.
100×1 0.0044 5.5407 [7] AL. Vitali, A. Borneo, M. Fumagalli and R.
00 Rinaldo, "Video over IP using standard-compatible
300×3 0.0028 5.5438 multiple description coding, " Journal of Zhejiang
00 [8] H. El-din. H. Ahmed, H. M. Kalash, and O. S. Farag
TWOFISH 30×30 0.0026 5.5437 Allah, "Encryption quality analysis of the RC5 block
(256) 60×60 0.0040 5.5439 cipher algorithm for digital images," Menoufia
100×1 0.0041 5.5438 University, Department of Computer Science and
00 Engineering, Faculty of Electronic Engineering.
300×3 0.0029 5.5438 Menouf-32952, Egypt, 2006.
00 [9] Li. Shujun, X. Zheng "Cryptanalysis of a chaotic
RijnDael 30×30 0.0034 5.5440 image encryption method," Inst. of Image Process.
(AES256) 60×60 0.0024 5.5439 Xi'an Jiaotong Univ., Shaanxi, This paper appears in:
100×1 0.0049 5.5438 Circuits and Systems, ISCAS 2002. IEEE International
(IJCNS) International Journal of Computer and Network Security, 23
Vol. 1, No. 3, December 2009

Symposium on Publication Date: 2002, Vol. 2, 2002,


page(s):708,711.
[10] S.S. Maniccam, N.G. Bourbakis, "Image and video
encryption using SCAN patterns," Journal of Pattern
Recognition Society, vol. 37, no. 4, pp.725– 737, 2004.
[11] A. Mitra, , Y V. Subba Rao, and S. R. M. Prasnna,
"A new image encryption approach using
combinational permutation techniques," Journal of
computer Science, vol. 1, no. 1, p.127, 2006,
Available: http://www.enformatika.org
[12] G. Zhi-Hong, H. Fangjun, and G.Wenjie , "Ch a o s
- based image encryption algorithm," Department of
Electrical and computer Engineering, University of
Waterloo, ON N2L 3G1, Canada. Published by:
Elsevier, 2005, pp. 153-157.
[13] A. Sinha, K. Singh, "Image enc rypt ion by using
Fractional Fourier Transforms and Jigsaw transform in
image bit planes," Source: optical engineering, spie-int
society optical engineering, vol. 44, no. 5 , 2005,
pp.15-18.
[14] Li. Shujun, Li. Chengqing, C. Guanrong, Fellow.,
IEEE., Dan Zhang., and Nikolaos,G., Bourbakis
Fellow., IEEE. "A general cryptanalysis of
permutation-only multimedia encryption algorithms,"
2004, http://eprint.iacr. Org/2004/374.pdf
[15] I. Ozturk, I.Sogukpinar, "Analysis and comparison
of image encryption algorithm," Journal of
transactions on engineering, computing and
technology December, vol. 3, 2004, p.38. http:
//www.enformatika.org/
[16] A. Sinha , K. Singh, "A technique for image
encryption using digi tal signature," Source: Opt ics
Communications, vol.218, no. 4, 2003, pp.229-
234.http://www.elsevier.com/
[17] S . S . Maniccam. , G.Nikolaos , and Bourbakis,
"Lossless image compressionand encryption using
SCAN," Journal of: Pattern Recognition, vol. 34, no.
6: , 2001, pp.1229– 1245.

Author Profile
Kamlesh Gupta received B.E degree in
Computer science and Engineering.
FromRajiv Gandhi Proudyogiki
Vishwavidyalaya, Bhopal in 2001 and
M.Tech degree in Computer science and
Engineering. from Rajiv Gandhi
Proudyogiki Vishwavidyalaya,Bhopal in
2005 Currently pursuing Ph...D from Rajiv
Gandhi Proudyogiki Vishwavidyalaya, Bhopal Research interests
include image processing and image security . He is working as
Lecturer in the Department of Information Technology,
Rustamji Institute of Technology, BSF Academy Tekanpur,
Gwalior Madhya Pradesh, India

You might also like