You are on page 1of 6

© 2020 IJRAR March 2020, Volume 7, Issue 1 www.ijrar.

org (E-ISSN 2348-1269, P- ISSN 2349-5138)

AN EFFICIENT SYMMETRIC KEY RGB IMAGE


ENCRYPTION AND DECRYPTION SCHEME
USING CHAOTIC ARNOLD CAT MAP AND
LOGISTIC MAP
1
Rati Ranjan Sahoo, 2Biraja Shankar Bal , 3Biswanath Rath
1
Department of Computer of Science, 1Hi-Tech Institute of Technology, Odisha, India
2
Department of Basic Science & Humanities, , 2Hi-Tech Institute of Technology, Odisha, India,
3
Department of Physics, 3North Orissa University, Takatpur, Baripada-757003,Odisha, India

Abstract:
It is inevitable to encrypt a map image as a chaotic map. It provides efficient access and maintains high data security against attacks. The
main challenge is to communicate bulk images and video data to electronic media in an unreadable format. Here we propose an algorithm
that combines encryption of cat maps into each batch of a color image and then applies the logistic map encryption to obtain a final
encrypted image in unreadable format. The resulting encrypted image is communicated through the target media to the receiver. Various
attacks, such as key space, key sensitivity, NPCR and UACI analysis, are performed on the encrypted image, proving that the system is
highly protected and efficient.

Keywords: Arnold cat map, Logistic map, Color image, encryption and decryption.
I.INTRODUCTION
Image encryption schemes are increasingly being studied to meet the demand for secure transmission of images in real time[1][2][3]. To
keep the image data safer and more efficient, a dynamic nonlinear chaotic system has been implemented. Chaos theory is the study of
nonlinear dynamic systems. Due to the butterfly effect, small deviations in the initial conditions lead to large deviations in the corresponding
trajectory, allowing long-term prediction. The 2D key-substitution cipher in cat map format changes the pixel values to an unreadable format.

1.1. Chaos theory

Chaos theory is a branch of mathematics that studies the behavior of dynamic systems. Unlike current techniques, this method recommends
mixing the pixels of planes R, G and B to form three new planes (P1, P2, P3 and so on). The algorithm is then applied to these planes. In the
proposed algorithm, a chaos map was used to generate a sequence of bits in a key processor[4][5][7].

1.2 Arnold Cat map


According to Arnold’s transformation

𝑥𝑛+1 𝑥𝑛 1 𝑝 𝑥𝑛
[𝑦 ] = 𝐴 [ 𝑦 ] (𝑚𝑜𝑑 𝑁) = [ ] [ ] (𝑚𝑜𝑑 𝑁) (1)
𝑛+1 𝑛 𝑞 𝑝𝑞 + 1 𝑦𝑛

, where N is the size of the image, p and q are positive integer and det(A) = 1. ( x𝑛 , y𝑛 )is the position of sample in the N x N data such as
image, so that
( x𝑛 , y𝑛 ) ∈ N x N, n ∈ {0, 1, 2, . . N − 1}

and (xn+1 , yn+1 ) is the position transformed after the cat map. There are two typical factors that lead to chaotic movements in cat maps:
tension (x, y) and fold (using mods to put x, y in the identity matrix)[9]. Equation (1) is used to transform each pixel coordinate of the image.
When all the coordinates have been transformed, the resulting image is a confusing image.

1.3 Logistic map


Mathematically, the logistic map is written

X (i+1) = μXi (1 − Xi ) (2)

IJRAR1BAP014 International Journal of Research and Analytical Reviews (IJRAR) www.ijrar.org 70


© 2020 IJRAR March 2020, Volume 7, Issue 1 www.ijrar.org (E-ISSN 2348-1269, P- ISSN 2349-5138)

Xi ∈ (0, 1) is a random repetition value of the initial value X0 and has µ∈ [3.9.4). To calculate the initial conditions x0 and µ, find the three
intermediate values R1, R2 and S using 20 nibble of the secret key. R1 and R2 are calculated using the key nibbles (k1, k2, ..., k6) and (k7,
k8, ..., k12) respectively:

Step1. A 20 nibbles secret key {k1 k2 ..k20}.

Step2: Compute the intermediate values S, R1 and R2 as follows

(k1k2. . k6)10 (k7k8. . k12)10 (k20k19. . k13)10


R1 = 23
, R2 = , S= (3)
2 223 100

Step3: Calculate initial value 𝑋0 and 𝜇 as follows

[(𝑆 + 𝑅2)(𝑚𝑜𝑑 1)]


𝑋0 = (𝑆 + 𝑅1 + 𝑅2)(𝑚𝑜𝑑 1) , 𝜇 = 3.9 + (4)
10

Here we limit the values of 𝑋0 and 𝜇 in chaotic behavior by extracting the fractional part of the result using module arithmetic.

II. PROPOSED MODEL


This section provides detailed instructions for the proposed image encryption and decryption process using two chaos maps.
Step1. The proposed image encryption process of Arnold's cat map is used to scramble the image as shown in eqn (1), the second phase
logistic map uses an 80 bit long secret external key.
Step2. Furthermore, in the transformation of the logistics map, the secret key is divided into 4-bit blocks, called nibbles, which represent k1,
k2, .., k20 in hexadecimal (1). ki is an alphanumeric character (0-9 and A-F).
Step3. The initial conditions 𝑋0 and 𝜇 are calculated from the 20 nibbles of the secret key by means of the intermediate values R1, R2 and
S.
Step4. Generate a sequence by repeating the logistic map eqn (2) using the initial conditions obtained in step 3. The generated sequence is
further converted to decimal. Each sequence of integers is converted into a 17-bit binary file.
Step5. Seed1 is computed from b1*2^6 + .. +b7*2^0 and Seed2 is computed from b8*2^-1 +b9*2^-
2+ .. +b16*2^-9
Step6. Final seed is computed from seed1 and seed2.
Step7. Read 16 consecutive bytes from the image file. These 16 bytes are somewhat bit XOR with the final seed to get the final converted
image.

final encrypted image

ORIGINAL RED

GREEN BLUE

[Figure 1(a) original parror.jpg. 1(b) red component.


[Figure2. Final Encrypted image]
1(c) Green Component 1(d) Blue Component]

IJRAR1BAP014 International Journal of Research and Analytical Reviews (IJRAR) www.ijrar.org 71


© 2020 IJRAR March 2020, Volume 7, Issue 1 www.ijrar.org (E-ISSN 2348-1269, P- ISSN 2349-5138)

final decrypted image


Final Decrypted Image : 256x256

[Figure 4(a) Decrypted image with change of last


[Figure3. Final Decrypted image] four bit in the second key]

III. SECURITY ANALYSIS


3.1 key space analysis:
For secure image encryption[6][8], the key space must be large enough to make brute-force attack impossible. The proposed algorithm uses
an 80-bit key and the process control parameters R1 ,R 2 , and S. Therefore, the total key space is 280 , which is almost impossible with a brute
force attack. Another key is used for the replacement figure. The keys are in matrix form and the first task is to find the inverse of this key
image. This is almost impossible with brute force attacks.

3.2 Key sensitivity analysis:


A secure image encryption system requires high key sensitivity so that even if there are slight differences in the correct key, the original
image cannot be decrypted correctly. Sensitivity has been thoroughly tested and found sensitive to minor changes in the key. The deciphered
image obtained by modifying the last 4 bits of the second key makes it impossible for an attacker to obtain the original image. The resulting
output image is shown in Fig. 4 (a). Therefore, the order and alignment of the keys are mandatory[10].

3.3. Statistical Analysis:


The statistical analysis of the proposed algorithm shows excellent confusion and diffusion properties that can resist statistical attacks. It does
this by testing the distribution of pixels in the cryptographic image and examining the correlation between adjacent pixels in the
cryptographic image. Details are provided in the following sections.
3.3.1. Histogram Analysis:
A histogram is a graphic representation of the pixel intensity distribution of an image. Therefore, the histogram clearly shows how the pixels
in the image are distributed by plotting the number of pixels at each intensity level. Histograms of the red, green, and blue components of the
original image (shown in Figures 5 (a), (b) and (c). Similarly, in Figures 5 (d), (e) and (f). However, the histogram encrypted is quite
different from the histogram of the original image and is specific to statistical similarities, which indicate that image information cannot be
obtained from the encrypted image.

3.3.2. Correlation of two adjacent pixels:


Correlation between two adjacent pixels, considering vertically, horizontally or diagonally from the encrypted image has been analyzed.
First, 1000 pairs of adjacent pixels were selected randomly, and their correlation coefficients rxy of each adjacent pair has been calculated for
the plain and ciphered images using the following formulae:
cov(x,y)
rxy = (5)
√Dx √Dy

IJRAR1BAP014 International Journal of Research and Analytical Reviews (IJRAR) www.ijrar.org 72


© 2020 IJRAR March 2020, Volume 7, Issue 1 www.ijrar.org (E-ISSN 2348-1269, P- ISSN 2349-5138)

red component input image


green component input image
blue component input image

1000 1000
1000
500 500 500

0 0 0
0 100 200 0 100 200 0 100 200
red-comp encrypt image green-comp encrypt image blue-comp encrypt image
400 400 400

200 200 200

0 0 0
0 100 200 0 100 200 0 100 200
red-comp decrypt image green-comp decrypt image blue-comp decrypt image

1000 1000 1000

500 500 500

0 0 0
0 100 200 0 100 200 0 100 200

[Figure 5 - Histogram analysis: (a) histogram of red component of original image; (b) histogram of green
component of original image; histogram of blue component of original image;5(d) histogram of red component
of encrypted image; 5(e) histogram of green component of encrypted image ; (f) histogram of blue component
of encrypted image; (g) histogram of red component of decrypted image (Fig. 3); (h) histogram of green
component of decrypted image (Fig. 3); (i) histogram of blue component of decrypted image (Fig. 3.]

L L
1 1
cov(x, y) = E[(x − E(x))(y − E(y))] , E(x) = ∑(xi ) Dx = ∑(xi − E(x))2 (6)
L L
i=1 i=1

, where x and y are values of two adjacent pixels for each channel, and L denotes the total number of samples. This phase essentially shows
that after encryption the correlation among the image pixels has broken whereas decryption will bind the pixels with the original correlation.
Fig 6 shows the correlation distribution of two horizontally adjacent pixels of RGB components in the original images. The correlation
coefficient values for image components in all directions are shown in tables 1-3.

Table 1 -Correlation coefficients of two adjacent pixels in the plane-image


and the corresponding cipher-image in horizontal direction.
Sl. Plane Cipher
Component of an RGB image
No. Image Image
1 Red component of an RGB image 0.9801 0.0036
2 Green component of an RGB image 0.9686 0.0157
3 Blue component of an RGB image 0.9773 0.0036

Table 2 -Correlation coefficients of two adjacent pixels in the plane-image


and the corresponding cipher-image in vertical direction.
Sl. Plane Cipher
Component of an RGB image
No. Image Image
1 Red component of an RGB image 0.9979 0.1768
2 Green component of an RGB image 0.9967 0.1933
3 Blue component of an RGB image 0.9983 0.2735

Table 3 -Correlation coefficients of two adjacent pixels in the plane-image


and the corresponding cipher-image in diagonal direction.
Sl. Plane Cipher
Component of an RGB image
No. Image Image
1 Red component of an RGB image 0.9933 -0.0083
2 Green component of an RGB image 0.9863 0.0103
3 Blue component of an RGB image 0.9946 0.073

IJRAR1BAP014 International Journal of Research and Analytical Reviews (IJRAR) www.ijrar.org 73


© 2020 IJRAR March 2020, Volume 7, Issue 1 www.ijrar.org (E-ISSN 2348-1269, P- ISSN 2349-5138)

correlation of two horizontally adjacent pixels in plain green plane


correlation of two horizontally adjacent pixels in plain red plane correlation of two horizontally cipher adjacent pixels in cipher red plane 200 correlation of two horizontally cipher adjacent pixels in cipher green plane
250 300 300
180

250 160 250


200

pixel gray valu on location(x+1,y)


pixel gray valu on location(x+1,y)
pixel gray valu on location(x+1,y)

pixel gray valu on location(x+1,y)


140
200
200
120
150
150 100
150
100 80
100
60 100

50 50 40

50
20
0
0 0 50 100 150 200 250 300 0
0 50 100 150 200 250 pixel gray valu on location(x,y) 0 20 40 60 80 100 120 140 160 180 200 0
pixel gray valu on location(x,y) pixel gray valu on location(x,y) 0 50 100 150 200 250 300
pixel gray valu on location(x,y)

correlation of two horizontally adjacent pixels in plain blue plane


300 correlation of two horizontally cipher adjacent pixels in cipher blue plane
300

250
250
pixel gray valu on location(x+1,y)

pixel gray valu on location(x+1,y)

200
200

150
150

100
100

50
50

0
0 50 100 150 200 250 0
pixel gray valu on location(x,y) 0 50 100 150 200 250 300
pixel gray valu on location(x,y)

[Figure 6 -
The correlation of two horizontally adjacent pixels: (a) red plane. (b) The red face of the cipher. (c) green plane; (d) cipher green
plane; (e) blue plane; (f) cipher blue plane]

3.4.

NPCR analysis
Pixel Change Rate (NPCR) refers to the speed with which the number of pixels changes in an encrypted image while a pixel is changed to a
normal image. Change the last pixel value of each component of the normal image. It is calculated as follows:

∑𝑁 𝑀
𝑖=1 ∑𝑗=1 𝐷(𝑖,𝑗)
𝑁𝑃𝐶𝑅 = × 100 (7)
𝑁×𝑀

UACI analysis
Unified Average Change Intensity (UACI) measures the average intensity of the difference between two encrypted images. It is
mathematically defined as

∑𝑁 𝑀 𝐶1 (𝑖,𝑗)−𝐶2 (𝑖,𝑗)
𝑖=1 ∑𝑗=1 255
𝑈𝐴𝐶𝐼 = × 100 (8)
𝑁×𝑀

Where 𝐶1 and 𝐶2 are the encrypted images before and after the change of a pixel of the normal image. If 𝐶1 (𝑖, 𝑗) = 𝐶2 (𝑖, 𝑗), then 𝐷(𝑖, 𝑗)= 0.
Otherwise, 𝐷(𝑖, 𝑗)= 1. Table 4 shows the NPCR (> 99%) and UACI values for each color component in the original image. Experimental
results show that the expectations and variance of NPCR and UACI are very close to the theoretical values

Table 4 –NPCR
Sl.
Component of an RGB image NPCR (%) NPCR (%)
No.
(Existing Work ) (Proposed Work )
1 Red component of an RGB image 99.5629 99.5926
2 Green component of an RGB image 99.5628 99.6216
3 Blue component of an RGB image 99.5929 99.5934

IJRAR1BAP014 International Journal of Research and Analytical Reviews (IJRAR) www.ijrar.org 74


© 2020 IJRAR March 2020, Volume 7, Issue 1 www.ijrar.org (E-ISSN 2348-1269, P- ISSN 2349-5138)

IV.CONCLUSIONS
In this paper, a new method of image encryption scheme was proposed that uses two chaos maps and an 80-bit external key. The initial
conditions of the logistics map are derived using an external secret key by weighting the bits that correspond to the positions in the key. The
proposed encryption process uses eight different types of operations to encrypt the pixels in an image and which operation to use for a given
pixel is determined by the results of the logistics map. After encrypting a 16-pixel block of the image, the secret key is changed to make
encryption more effective against attacks. Statistical analysis, key sensitivity analysis and key space analysis were performed to demonstrate
the security of the new image encryption procedure. Finally, we conclude with the statement that the proposed method should be useful for
cryptography and real-time image transmission applications.

REFERENCES
[1] N. Bourbakis, C. Alexopoulos, Picture data encryption using SCAN pattern, Pattern Recogn. 25 (1992) 567–581.
[2] Refregier, B Javidi, Optical image encryption based on input plane and fourier plane random encoding, Opt. Lett. 20 (1995) 767–769.
[3] H.K.L. Chang, J.L. Liu, A linear quad tree compression scheme for image encryption, Signal Process. 10 (4) (1997) 279–290.
[4] Fridrich Jiri, Symmetric ciphers based on two dimensional chaotic maps, Int. J. Bifurcat Chaos 8 (6) (1998) 1259–1284.
[5] J. Scharinger, Fast encryption of image data using chaotic Kolmogrov flow, J. Electronic Eng 7 (2) (1998) 318–325.
[6] 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. 430–437
[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) 167–175.
[8] H. Cheng, X.B. Li, Partial encryption of compressed image and videos, IEEE Trans. Signal Process. 48 (8) (2000) 2439–2451.
[9] 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. 49–52
[10] C.C. Chang, M.S. Hwang, T.S. Chen, A new encryption algorithm for image cryptosystems, J. Syst. Software 58 (2001) 83–91.

IJRAR1BAP014 International Journal of Research and Analytical Reviews (IJRAR) www.ijrar.org 75

You might also like