Colour Image Encryption Using Chaotic System
T.Jaspar Vinitha Sundari1*, K.Karthika2
1,2Assistant Professor, Department of Electronics and Communication Engineering,
Kumaraguru College of Technology, Coimbatore-641049
*CorrespondingAuthorEmail:jasparvinithasundari.t.ece@kct.ac.in
ABSTRACT:
In this paper, color image encryption using the chaotic algorithm for a highly secure transmission is proposed. The RGB image matrices are divided into blocks of 16 pixels such that every 16 pixels will be encrypted with different session keys using chaotic logistic map. This is done by changing the initial condition with change in key for every block of pixels. The proposed scheme utilizes two chaotic logistic maps and an external key of 80-bit. To make the cipher more sheltered, the secret key is customized after encrypting a block of pixels of the image. To improve the speed and Accuracy, the number of blocks of pixels for which the key has to be changed, is increased. The results of several experimental, statistical analysis and key sensitivity tests show that the proposed image encryption scheme provides an efficient and secure way for real-time image encryption and transmission.
.
KEYWORDS:Secure image encryption, Logistic map, Pixels Block division.
INTRODUCTION:
In this modern world, multimedia components have a great role in every aspect of communication. Thus it requires secure transmission. 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 have been proposed in the literature based on different ideas. Among them, chaos based encryption techniques are considered good for real time as these techniques provide speed, high security, complexity, reasonable computational overheads and computational power etc.
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.
Recently, Li et al. [1] 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 pseudo random signals to mask the video and to perform pseudo random permutation of the masked video. Very recently, Chen et al. [2] have proposed a symmetric image encryption in which a two-dimensional chaotic map is generalized to three dimensions 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. Chaotic algorithm has High sensitivity to initial conditions when compared to other encryption algorithms .High sensitivity means a small difference in initial condition produces a great change in the output [3]. Logistic maps used here are highly chaotic when compared to all other maps like cat map, chen map , standard map, baker map, etc.[4] .µ value used in logistic maps in chaotic algorithm is 3.999 which indicates that it is highly chaotic [5,6]. Chaos signals have properties of pseudo random property and non periodicity [2]. AES and RSA algorithms have high complexity in computation (power and time) and Conventional algorithms like AES, DSA, IDEA and RSA are less suitable for real time image encryption because of its slow speed because of high correlation among the pixels of the image but chaotic algorithm is a fast and secure means of data protection[2][7][8].
Chaotic systems has good measure of ergodicity [2]. Most of the times encryption designs are in the form of block ciphers, which is usually considered as faster than stream cipher but stream cipher provides much security than Block cipher. To further increase the security level, the secret key used is modified for every predetermined block of pixels and thus it is made highly secure against all kinds of cipher attacks [9][10]
METHODOLOGY:
Figure 1: The Proposed Encryption
The proposed image encryption process utilizes an external secret key of 80-bit long. Further, the secret key is divided into blocks of 8-bit each, referred as session keys as follows
k = k(1) k(2) k(3)
k(20)
Here, k(i) are the alphanumeric characters (0–9 and A–F) and each group of two alphanumeric characters represents a session key. Alternatively, the secret key can be represented in ASCII mode as here, each
k(i) represents one 8-bit block of the secret key i.e session key. In the proposed algorithm, two chaotic logistic maps are employed to achieve the goal of image encryption which are two logistic maps mentioned below.
X(n+1) =µ*(1-X(n)).
Y(n+1) =µ*(1-Y(n)).
Throughout the algorithm, we keep the value of the system parameter of the both logistic maps to be constant (µ = 3.9999) which corresponds to a highly chaotic case while the initial conditions (X0 and Y0) for these maps are calculated using some mathematical manipulations on session keys. To calculate the initial condition X0 for the first logistic map, choose three blocks of session keys (k4,k5,k6) and convert them into a binary string as B1, Where Kij’s are the binary digits (0 or 1) of the ith block of the session key. Next, we compute a real number X01 using the above binary representation obtained from k4 k5 k6. Further, we compute another real number X02 using the equation.
Here ki’s are parts of secret key in hexadecimal mode. Now we compute the initial condition X0 for the first logistic map using X01 and X02 as:
We generate a sequence of 24 real numbers f1,f2,f24 by iterating the first logistic map using the initial condition. Keeping in mind that we have considered only those values, which fall in the interval [0.1,0.9], the other values are discarded from the sequence. The real number sequence is converted into an integer sequence using the following formula.
Where k = 1,2,3,.....24.
To calculate the initial condition Y0 for the second logistic map, we choose three blocks of session keys (k1,k2,k3) and convert them into a binary string as B2.The real number is obtained asY02 using the formula
Further, we compute another real number Y02 using the equation
here, B2˝Pk_ denotes the value of P(k)th bit in the binary string B2i.e. it is either 0 or 1. Now we compute the initial condition Y0 for the second logistic map using Y01 and Y02 as:
Read the three consecutive bytes from the image file. These three bytes represent the value of the red, green and blue (RGB) color respectively and together form a single pixel of the image. We divide the range [0.1,0.9] into 24 non-overlapping intervals and arrange them into eight different groups. Then we assign different type of corresponding to each of these groups.
Table 1: Functions Used For Decryption
S. No |
Range of real number sequence |
Encryption function |
1 |
0-0.04 , 0.33-0.38 , 0.67-0.71 |
NOT operation on R,G,B values of the pixel |
2 |
0.04-0.08 , 0.38-0.42 , 0.71-0.75 |
XOR operation on R, G,B with k4 , k5 , k6 (session keys) |
3 |
0.08-0.13,0.42-0.46, 0.75-0.79 |
(R+k4+k5) mod256 (G+k5+k6) mod256 (B+k6+k4) mod256 |
4 |
0.13-0.17,0.46-0.5, 0.79-0.83 |
NOT(R+k4) , NOT(G+K5), NOT(B+k6) |
5 |
0.71-0.21,0.5-0.54, 0.83-0.88 |
XOR operation on R,G,B with k7 , k8 ,k9 (session keys) |
6 |
0.21-0.25,0.54-0.58, 0.88-0.92 |
(R+k7+k8) mod256 (G+k8+k9) mod256 (B+k9+k7) mod256 |
7 |
0.25-0.29,0.58-0.63, 0.92-0.96 |
NOT(R+k7) , NOT(G+k8) , NOT(B+k9) |
8 |
0.29-0.33, 0.63-0.67, 0.96-1 |
NO OPERATION on R,G,B values |
In Table 1, we have given the interval ranges for the groups and their corresponding operations. Further, we iterate once the second logistic map using the initial condition Y0 obtained. The outcome of the second logistic map decides which operation to be performed for encryption/decryption of red, green and blue (RGB) color bytes. This step is repeated (decimal value of k10) times (i.e. the decimal equivalent of 10th session key) times. Finally, the encrypted bytes of red, green and blue colors are written in a file i.e. encryption of a pixel is achieved. We repeat the above algorithm for next 15 pixels of the image file. After encryption of a block of 16 pixels of image file, we modify the session keys K1 to K9 and we redo the procedure again so that secret key is completely changed for every particular block of pixels. The session keys are modified using the formula
And then they are used for generation of next set of real number sequence until the encryption of complete image. And then the process is repeated until the complete image is encrypted.
SIMULATION RESULTS:
The real number sequence is generated using the secret key and the logistic maps. Based on the range of the real number sequence the encryption function on the pixel values is decided. After the encryption of every block of pixels the initial condition is generated again using the modified secret key and logistic maps. This procedure is repeated until the complete image is encrypted. The image is encrypted without any change in the secret key. The output obtained is shown in the figure 2(b). When the image is encrypted with a change in the keys for every pixel, the encrypted image is obtained as shown in the figure 2(c). When the image is encrypted with a change in the whole algorithm, that is the initial condition for logistic maps is calculated for every predetermined blocks of pixels the image is obtained as shown in the figure 2(d).
When the proposed algorithm is used for encryption, the number of blocks of pixels is increased from 16 to 64 pixels or blocks of 8*8 pixels and further analyzed with incrementing the number of blocks and the output is obtained as shown in the figure 2(d). In order to evaluate the encryption quality of the proposed encryption algorithm, the correlation coefficient is used. To calculate the correlation coefficients between two vertically, horizontally and diagonally adjacent pixels of an encrypted image, the following equation is used Where x and y are gray values of two adjacent pixels in an encrypted image. The original image used for these changes has a correlation coefficient of 0.2562 and entropy of 6.5750.
(a) (b) (c) (d)
Figure 2(a) Input Image (b) No change in Key (c) Key changed for every Pixel (d) Key changed for every block of Pixels
A number of images are taken and encrypted with various changes in the algorithm in order to find better changes in the technique. Some parameters determining the quality of secure encryption are calculated and tabulated in table 2. An image encryption method is of no practical use if it has large execution time. The average time taken to encrypt images with changes in algorithm is given in Table 2.
Table 2 Comparison of various parameters of encrypted image
S. No |
Algorithm |
Correlation Coefficient |
PSNR (log.decibels) |
Runtime |
1 |
Encryption using chaotic logistic map without any change in key |
0.2888 |
40 |
2.5 s |
2 |
Encryption using chaotic logistic map with change in session keys |
0.7245 |
42 |
2.4s |
3 |
Encryption using Chaotic logistic map with change from initial condition with change in key for a block of pixels |
0.2728 |
46 |
3.1s |
4 |
Encryption using chaotic logistic map with change from initial condition and decrease in the number of blocks of pixels |
0.2486 |
44 |
4.03s |
5 |
Encryption using chaotic logistic map from initial condition for every pixel. |
0.1573 |
47 |
3.6s |
Table 3: Parameters of Proposed Algorithm
S.No |
Name of the color image |
Correlation Coefficient of the existing algorithm |
Correlation Coefficient of the proposed algorithm |
1 |
Lenna (256X256) |
0.2560 |
0.1560 |
2 |
Peppers (256X256) |
0.2224 |
0.2024 |
3 |
Jelly beans (24X24) |
0.2975 |
0.2075 |
4 |
White Image (24X24) |
0.0002 |
0 |
5 |
Black Image (24X24) |
0.01 |
0 |
6 |
Penguin (256X256) |
0.2628 |
0.2420 |
7 |
Shadow (24X24) |
0.0881 |
0.0723 |
8 |
Apple (256X256) |
0.6864 |
0.2434 |
9 |
Painting (256X256) |
0.3219 |
0.2219 |
10 |
Flower (24X24) |
0.8077 |
0.4077 |
Original Image Encrypted image Decrypted Image
Figure 3 Proposed Encryption Algorithm on Various images
From the table 2, it is realized that encryption of an image with change from initial condition and separation of image into blocks of pixels gives an optimum value of correlation coefficient, PSNR, and run time. The image is encrypted with a low correlation coefficient and a high PSNR, when the key is changed for every pixel but it takes high runtime. The table 3 gives the results of the correlation coefficient of the encrypted images of the basic algorithm [6][11] and the proposed algorithm. This table clearly depicts the increase in efficiency of encryption.
The encrypted image is given to the images segmentation block so that the encrypted image is divided into a number of blocks of pixels. The decryption algorithm is similar to the encryption algorithm but there is difference in the functions used for the decryption. The encrypted image obtained using our proposed algorithm is decrypted using the same algorithm and the original image is obtained. The decrypted image is obtained. The encrypted image is given to the image segmentation block so that the encrypted image is divided into a number of blocks of pixels. The decryption algorithm is similar to the encryption algorithm but there is difference in the functions used for the decryption. The encrypted image obtained using our proposed algorithm is decrypted using the same algorithm and the original image is obtained. The decrypted image is obtained as shown in the figure 3.
CONCLUSION:
An algorithm of encryption and decryption of images based on the concept of key stream generation and logistic maps is studied and the results are analyzed for a better idea of encryption. A secret key of 20 hexadecimal bits (eighty binary bits) is used to calculate the initial conditions of the first logistic map. Depending upon the outcome of the logistic map, algorithm performs any of eight different types of operations on image pixels. To make the algorithm more robust, secret key is modified after encrypting a block of pixels. All the simulation and experimental analysis show that the proposed image encryption system has high sensitivity to secret keys, an optimum range of peak signal to noise ratio and low correlation coefficients close to the ideal value 0. Hence, we can say that all the analysis prove the security, effectiveness and robustness of the proposed image encryption algorithm.
ACKNOWLEDGEMENT:
The authors are grateful to the authorities of Kumara guru College of Technology, Coimbatore for the facilities.
REFERENCES
1. Zhu, Z., et al., “A chaos-based symmetric image encryption scheme using a bit-level permutation”. Information Sciences, 2011. 181(6): p. 1171-1186.
2. Musheer ahmad, M. Shamsher Alam, 2009 “A new algorithm of encryption and decryption of image using Chaotic Mapping”, IJCSE, Vol.2 (1), pp.46-50.
3. K.W. Wong, B.S.H. Kwok, W.S. Law, 2008 “A fast image encryption scheme based on chaotic standard map,” Phys.Lett. A, vol. 372, pp. 2645–2652.
4. G. Chen, Y. Mao, C.K. Chui, 2004, “A symmetric image encryption based on 3D chaotic maps,” Chaos Solitons Fractals, vol. 21, pp. 749–761
5. H.S. Kwok, W.K.S. Tang, 2007, “A fast image encryption system based on chaotic maps with finite precision representation,” Chaos Solitons Fractals, vol. 32, pp.1518–1529.
6. N.K.Pareek, Vinod Patidar, K.K.Sud, 2006,” Image encryption using choatic logistic map”, Image and Vision Computing Volume 24,Issue 9, pp.926- 934.
7. Ravindra K. Purwar, Priyanka, May 2013,” An improved image encryption scheme Using Chaotic Logistic Maps” IJLTET Volume 2, Issue 3, pp.220-227.
8. Shubo Liu, Jing Sun, Zhengquan Xu, November 2009, “An improved image encryption algorithm based on chaotic system” Journal of computers, Volume 4, no.11, pp.1091-1100
9. S. Li, X. Zheng, 2002, “Cryptanalysis of a chaotic image encryption method,” Proceedings of the IEEE International Symposium on circuits and systems, Scottsdale, AZ, USA.
10. Vinod Patidar and K. K. Sud, 2008, “A pseudo random bit generator based on Chaotic Logistic Map and its Statistical Testing”, Informatica 33, May 20, pp.441-452.
11. N.K. Pareek, Vinod Patidar, K.K. Sud, 2003, “Discrete chaotic cryptography using external key,” Phys. Lett., vol. 309, pp. 75–82.
Received on 02.08.2017 Accepted on 09.10.2017
©A&V Publications all right reserved
Research J. Engineering and Tech. 2017; 8(4): 301-305.
DOI:10.5958/2321-581X.2017.00051.4