In modern technological era image encryption has become an attractive and interesting field for researchers. They work for improving the security of image data from unauthorized sources. Chaos theory, due to its randomness and unpredictable behaviors, is considered favorite for the purpose of image encryption. This paper proposes a diffusion based image encryption algorithm by using chaotic maps. Firstly a chaotic map (piecewise linear chaotic map) is used for the generation of S-box, then it is used for the pixel values modification to generate element of non-linearity. After this these modified values are further diffused with another random sequence, generated by tent logistic chaotic map. Finally the color components of pre-encrypted image are mixed with each other so that the developed randomness uniformly distributed in them. For image data we develop non-linearity and diffusion by using S-box and then more randomness is added in the pre-encrypted image with the help of Boolean operation XOR. The use of this combination of chaotic maps along with S-box and Boolean operation XOR is a different technique, that provides satisfactory results for security aspects and also works efficiently.
In modern technological era image encryption has become an attractive and interesting field for researchers. They work for improving the security of image data from unauthorized sources. Chaos theory, due to its randomness and unpredictable behaviors, is considered favorite for the purpose of image encryption. This paper proposes a diffusion based image encryption algorithm by using chaotic maps. Firstly a chaotic map (piecewise linear chaotic map) is used for the generation of S-box, then it is used for the pixel values modification to generate element of non-linearity. After this these modified values are further diffused with another random sequence, generated by tent logistic chaotic map. Finally the color components of pre-encrypted image are mixed with each other so that the developed randomness uniformly distributed in them. For image data we develop non-linearity and diffusion by using S-box and then more randomness is added in the pre-encrypted image with the help of Boolean operation XOR. The use of this combination of chaotic maps along with S-box and Boolean operation XOR is a different technique, that provides satisfactory results for security aspects and also works efficiently.
21st century is the century of innovation and technology. In its early years, we saw a rapid progress in every aspect of life. Social media and communication sector revolutionized in previous two decades. Internet has completely changed the way of communication and socializing with each other. In many of our daily use internet applications like Facebook, WhatsApp, Video conferencing, Skype etc., we have to deal with digital images. Digital image communication is also used in some sensitive institutions like military image database, medical imaging system etc. Researchers use image based data to analyze, diagnose and resolve the real world problems. Tiwari et al. [48] proposed image based rapid pests detection and identication technique for soyabean crop. Dhiman et al. [14] proposed a computation approach for the analysis of medical images used for COVID-19 disease. Singh et al. [45] used fuzzy entropy approach for remotely sensed high resolution satellite images to analyze the difference and uncertainty representation.Unfortunately, there are a few downsides to social networking. Some of these are cyber bulling [16] and online harassment [17]. Another damaging impact is privacy theft. Providing personal information on social sites can make users vulnerable to crime like identity theft, stalking, cyberbulling [57] etc. In all these sectors we need high level, reliable and robust security system to prevent illegal use of digital images from unauthorized sources.In cryptography, traditional encryption techniques like AES [13], RSA [43], IDEA [37] etc. are used to encrypt text data. Structure of a digital image is quite different from text data. Digital images have redundancy, strong relationship with adjacent pixels, less avalanche effect, that is, a little change in attribute of pixel does not generate huge effect in quality of image and bulk of data. Therefore, ordinary used schemes of data encryption are not well suited for the encryption of digital images.For the solution of the problems related to communication involving images, chaos theory has provided a potential platform. Chaotic maps have properties [4] such as sensitivity for initial condition, control parameters, unpredictable behavior, randomness and simple implementation on software and hardware. Due to their random and unpredictable behavior, these maps, automatically fulfill many cryptographic requirement for the security of encrypted data like confusion, diffusion, balancedness at bit level and avalanche effect. For these properties chaotic maps are widely used in cryptography. Chaos based encryption algorithms are considered as highly secure, robust, computationally powerful and possessing good complexity level to make cryptanalysis harder. To fulfill image encryption requirements many encryption techniques [6–8, 11] etc for digital images are developed to help out in providing good security and efficiency.Chaos theory [31] was established in 1969 and since then, it has been playing a vital role in physics, mathematics, biology, engineering etc. In 1989 Matthews [33] gave the idea that under certain conditions some easy nonlinear iterative maps have the ability to generate chaotic sequences. He also derived a chaotic map and proposed that it could be helpful for cryptographic purposes. He had used logistic chaotic map to generate keystream for encryption purpose of secret information. Habutsu et al. [22] used a one dimensional chaotic map to generate a cryptosystem in 1991. His generated cryptosystem was based on tent map. He used this chaotic map to make a ciphertext from plaintext. Then in 1997 Fridrich [19] used two dimensional chaotic baker map for image encryption. He used substitution diffusion architecture for this purpose, where substitution and diffusion were taken separately. Chen et al. [10] and Mao [34] in 2004 used three dimensional cat map and baker map for the generation of permutation in image data. in 2005 Guan et al. [21] proposed image encryption scheme that uses two chaotic maps. He used two dimensional cat map and chen’s map for generating permutation in pixel position and pixel value modification. Patidar et al. [39] proposed a modified substitution diffusion architecture in 2010. His modified architecture was more secure against chosen plaintext and known plaintext attacks. Stoyanov and Kordov proposed an image encryption method in 2014 that is based on chebychev polynomial together with chaotic maps [47] and rotation equation in [46]. Li et al. [30] proposed an image encryption scheme that uses modified tent map. Chai et al. [7] used improved genetic algorithm and STP for effective color image crypytosystem. In [8], the authors have proposed an efficient approach for encryption of double images into visually meaningful cipher image.Recently scientists are working to improve the chaotic maps by removing their weaknesses, enhancing their chaotic behaviors and randomness. Then these modified and improved chaotic systems are used for the intensification of the security features in various encryption schemes. In this perspective [24] introduced improved tent-sine system and also used this map by employing a novel technique to construct a substitution box. Lu et al. [32] presented a new compound chaotic system (tent logistic system) that has a better chaotic performance, vast chaotic range and huge key space. He also used this chaotic map in a novel substitution box generation algorithm. Ali et al. used tent logistic tent system introduced by [1] for medical image signcryption [2] purpose to enhance the security and authentication of sensitive medical images.The aim of this research is to propose an image encryption scheme that depends on the piecewise linear chaotic map (PWLCM) and a compound chaotic map. The PWLCM is employed to form a cryptographically strong substitution box (S-box) that is used for the value substitution of image pixels. Then compound chaotic system is used as pseudo random number generator to produce three chaotic sequences which are utilized to encrypt each component of color image individually. Another novel reversible self mixing operation based on Boolean operation XOR is performed that ensures further diffusion in image. The encryption process using compound chaotic system mainly used Boolean function XOR to mix the chaotic random sequence, substituted pixel value and preceding pixel value. The use of compound chaotic system, S-box, inclusion of random sequences and also implementation of reversible self mixing operation provide good performance for the encryption of color images.The manuscript is organized as: Section 2 is based on the introduction of chaotic maps. Section 3 is concerned with the S-box. In this section algorithm for the generation of S-box using PWLCM and its role in cryptography is presented. In Section 4 the proposed image encryption and image decryption algorithms are presented. Section 5 is devoted for the presentation of the results and discussions with the help of examples and figures. Section 6 provides the detailed security analysis of the proposed scheme particularly key space analysis, distribution of pixels in original and cipher images, correlation analysis, information entropy, mean squared error, peak signal to noise ratio, complexity analysis and the speed analysis of proposed algorithm. Section 7 presents the conclusion of the above discussed work.
Chaotic maps
There are many chaotic systems, that are being used in the applications of information security. In this section we briefly describe some of the basic chaotic maps and then a dynamic compound chaotic system generated by the combining tent [59] and logistic chaotic map [38].
Logistic map
A chaotic system shows deterministic behavior. It is non-linear in nature. A famous example of one dimensional chaotic map is logistic map [36]. In this system, states change with iterations in a deterministic way. Logistic map is discrete time, one dimensional and non-linear map with quadratic non-linearity [38]. The logistic map has the following state equation:
where y0 ∈ (0, 1) shows the initial state of the chaotic system at any time n and μ ∈ (0, 4), is the system parameter also known as bifurcation parameter. The next state of the system is expressed by y, where n shows the discrete time (Fig. 1).
Fig. 1
a The bifurcation diagram of Logistic map, b Lyapunov exponent of Logistic map
a The bifurcation diagram of Logistic map, b Lyapunov exponent of Logistic mapThe behavior of logistic map highly depends on the value of control parameter μ. The chaotic behavior of (1) can be achieved for the μ between 3.567 and 4, where it shows a chaos with infinite period. In this range there are uncountable initial points y0 that give non-periodic trajectories, no matter how much long time series created by f(y), generated pattern never repeats itself.Sequences generated in this way are highly sensitive to the initial condition y0. The sensitive dependence on initial condition of a chaotic system is measured with the help of Lyapunov exponent [35]. Negative value of Lyapunov exponent expresses that the orbit converges with time, while its positive value shows that distance between nearby orbit increases with time. The Lyapunov exponent mostly shows a positive behavior for μ = 3.57 to 4, that indicates the chaotic behavior of logistic map.The logistic map also suffers from some shortcomings, like limited chaotic range, non uniform distribution and also periodic windows in its chaotic region.
Tent chaotic map
Another one dimensional discrete chaotic iterative map is tent map, that exhibit tent like shape in the bifurcation diagram as shown in the Fig. 2b. It is also known as triangle map and its mathematical model is as follows:
where the system parameter x0 ∈ (0, 1) and the control parameter r ∈ (0, 2). The chaotic map (2) is simplistic and has linear equations but for certain parameter values it shows a complicated and chaotic behavior. The chaotic properties of tent map are shown in Fig. 2. The figure shows that the chaotic range of tent map (2) is from 2 to 4. Some drawbacks of tent map are short chaotic range and lackness in uniform distribution among the output state values.
Fig. 2
a The bifurcation diagram of Tent map, b the diagram of Tent map function
a The bifurcation diagram of Tent map, b the diagram of Tent map function
Piecewise linear chaotic map
Piecewise linear chaotic map (PWLCM) is used as it has ample non linear dynamic action and a positive Lyapunov exponent as shown in Fig. 3. The multi-segmented map shows some fantastic dynamic properties like uniform invariant density function, large positive Lyapunov exponent, and random like behavior.
Fig. 3
a plot of piecewise linear chaotic map, b Lyapunov exponent
a plot of piecewise linear chaotic map, b Lyapunov exponentThese properties are particularly valuable and useful for cryptographic purposes. A piecewise linear chaotic map is given by:Here x0 ∈ [0, 1) is the initial state/initial condition and m ∈ (0, 0.5) is the control parameter of chaotic map (3).The output of PWLCM has uniformly continuous distribution, confusion and ergodicity. It can also be used to generate good chaotic sequences for making strong S-boxes.
The tent logistic system
For the solution of problems faced by logistic and tent maps, [32] suggested a new compound chaotic system by bringing together the tent and logistic map. Hence formed new system is named as tent logistic system. The mathematical form of this system can be presented as:
Where μ ∈ [0, 9] is the system parameter of the chaotic map (4). For μ = 0 the above equation behaves like logistic map, while for μ = 9 the above described equation degenerates to form the tent chaotic map. Due to this both the logistic and tent chaotic maps can be considered as the special cases of this system. Figure 4 shows the bifurcation and state distribution diagram of said chaotic system. From this figure it is evident that the whole range μ ∈ [0, 9] has chaotic behavior, also this chaotic region is much greater than the logistic and tent map. The output of this system is uniformly distributed within [0, 1]
Fig. 4
a Bifurcation diagram of tent logistic chaotic map, b the state distribution of tent logistic chaotic map
a Bifurcation diagram of tent logistic chaotic map, b the state distribution of tent logistic chaotic mapThis chaotic system is more suitable for the use in cryptographic application as it provides a large chaotic range. Also if the control parameter is used as the secret key key space for the generation of random chaotic sequences, then this key space would be much large to resist brute force attacks. The output random sequence is uniformly distributed to give a good uniformly distributed random sequence.
NIST randomness test for tent logistic system
National Institute of standards and technology (NIST) has issued Federal Information Processing Standard for the random number generators. There are 16 tests in this test suit that focus on different sorts of randomness present in any sequence generated by pseudo random number generator. To apply the test first we design a pseudo random number generator of tent logistic chaotic map.
Algorithm 1 (Pseudo Random Number Generator (PRNG))
Given the chaotic map (4), we construct a PRNG by executing the following steps.Set system’s control parameter μ, the initial value x0, the positive integer n0 and the L the length of generated sequence.Iterate the chaotic map (4) for L to get a random sequence.Discard first n0 values of above generated sequence to get rid of the harmful effects of transient process.Use a non linear transformation (5) to convert the obtained random sequence X into integer sequence Y
where mod gives back the remainder after dividing by 256, while the floor(x) returns the largest integer less than or equal to x. Hence the output sequence lies in the range of [0, 255].Convert each y to binary number of size 8 bit. Hence a bit sequence is formed that isChange the bit sequence to a single stream of length 100 × 106 bits.Divide the bit sequence to 100 subsequences, of length 106 bit each.By using the above algorithm we have generated 100 sub sequences, each of length 106 bits.These sequences are input in NIST statistical suite for their randomness and the obtained results are depicted in the Table 1. The obtained results shows that the sequences generated from tent logistic chaotic map pass almost all the tests. Hence tent logistic map can be used as a potential platform for the generation of a good chaotic random sequence
Table 1
Statistical randomness tests results
Test #
NIST statistical test name
p. value
Pass Rate
Result
1
Frequency (monobit)
0.911413
99/100
✓
2
Block Frequency (m = 128)
0.897763
99/100
✓
3
The Run Test
0.202268
100/100
✓
4
Cumulative Sums (Forward)
0.637119
100/100
✓
5
Cumulative Sums (Reverse)
0.779188
100/100
✓
6
Longest Run of Ones
0.897763
98/100
✓
7
Non Overlapping Template (m = 9, B = 000000001)
0.045675
99/100
✓
8
Overlapping Template (m = 9)
0.834308
99/100
✓
9
Rank
0.401199
100/100
✓
10
DFT Spectral
0.574903
98/100
✓
11
Universal Statistical Test
0.236810
98/100
✓
12
Approximate Entropy (m = 10)
0.574903
99/100
✓
13
Random Excursions
0.554420
57/57
✓
14
Random Excursions Variant
0.474986
56/57
✓
15
Serial (m = 16)
0.935716
99/100
✓
16
Linear Complexity (M = 500)
0.090936
100/100
✓
Statistical randomness tests results
S-boxes in cryptography
Substitution boxes, in short, S-boxes are considered as main component in many conventional algorithms of cryptography like DES [26], AES [13] etc. The design of S-box is based on Shannon’s theory of confusion and diffusion [44]. S-boxes can also be used efficiently as look-up table for substitution in encryption and decryption processes [23]. The objective of such substitution boxes is to establish the element of non-linearity in the encrypted data and also to induce confusion and diffusion [44] in cipher. Use of S-box gives high resistance for linear and differential cryptanalysis. Cryptographically strong S-boxes play vital role in the design of a secure cryptosystem. They increase security level against known attacks. Many researchers have proposed different methods [5, 24, 29] to generate strong S-boxes. Chaotic maps, due to its properties [4] as ergodicity, sensitive to initial condition, randomness and ability to generate again with a key are potential platform for the generation of a strong S-box. In this section an algorithm for generating S-box using PWLCM (3) is presented. The following shows the proposed algorithm:
Algorithm 2 (Chaotic S-box)
For the chaotic map (3), the following steps lead to the creation of an S-box.Divide the interval into 256 sub-intervals each of fixed length △ h, i. e., △ h = (0.9 − 0.1)/256 = 0.003125.Classify each sub-interval as L0, L1, ... , L255.Choose an arbitrary initial condition and m ∈ (0, 0.5) for (3) to create a sequence x of the values lying in [0.1, 0.9].Start a void array S.Whenever an output value x lies in a particular interval L(i = 0, ... , 255), give that sub-interval index i to S. Leave those values which do not belong to any sub-interval or giving repeated sub-interval index value.Stop iterating PWLCM when it traverses all the sub-intervals L0 to L255.Return the elements of array as S in the range of 0 to 255, containing 256 distinct integers.Note that in step 3, a slightly different value of will provide a totally different S-box. Thus, it is possible to create many S-boxes using the above stated algorithm. One such S-box is generated by setting parameter x0 = 0.76 and with fixed value of m = 0.15 in (3). Table 2 displays the resulting S-box.
Table 2
S-Box
50
65
110
238
134
95
195
94
192
102
215
38
33
17
113
246
241
52
71
126
2
96
197
89
177
147
233
97
202
75
138
98
74
133
82
156
205
67
114
248
231
191
106
225
8
120
109
235
51
69
121
157
93
189
243
112
104
221
20
61
116
255
187
118
154
213
43
47
57
86
170
166
178
142
245
250
18
10
228
1
103
216
34
19
21
70
124
16
55
81
44
48
201
77
252
206
62
100
209
63
32
15
23
244
171
164
183
130
14
73
131
22
190
236
11
169
168
165
180
136
132
80
152
217
31
13
84
162
188
36
27
0
186
146
101
198
176
149
227
200
153
107
9
53
167
174
155
79
4
211
66
111
49
108
240
92
151
219
26
159
85
158
218
28
210
68
117
35
24
99
207
208
59
91
143
184
115
175
220
125
78
232
214
40
37
12
54
87
173
76
139
254
25
242
90
137
212
46
239
7
234
145
204
122
3
253
196
140
127
135
179
141
128
119
230
237
226
6
5
199
83
160
203
64
229
249
58
181
172
161
72
129
223
251
56
182
105
222
42
29
39
148
185
247
193
45
41
30
224
88
144
123
150
194
60
163
S-BoxThe properties of this S-box are tested using SET (S-box Evaluation Tool) [41]. It is observed that S-box is fairly balanced and holds reasonably strong cryptographic characteristics.
Proposed cryptosystem for digital images
In this section, we describe a new image encryption mechanism for the protection of digital images. In the proposed scheme initially an S-box is generated by PWLCM used as lookup table for pixel substitution. Then three random sequences are generated and bitwise XOR is performed with substituted pixel values of each image component. The algorithm is based mainly on two secret keys k1, k2 containing the parameters of both PWLCM (3) and chaotic tent logistic map (4), that is , where m ∈ (0, 0.5), and k2 = (μ1, μ2, μ3, x0, y0, z0), where μ1, μ2, μ3 ∈ (0, 9) and x0, y0, z0 ∈ (0, 1) (Figs. 5, 6 and 7).
Fig. 5
User interface preview in real time encryption mechanism
Fig. 6
Flow diagram of the proposed cryptosystem
Fig. 7
Flow diagram of the proposed image encryption scheme
User interface preview in real time encryption mechanismFlow diagram of the proposed cryptosystemFlow diagram of the proposed image encryption scheme
Key management
The proposed cryptosystem is hybrid in nature, it uses a symmetric and asymmetric scheme for the security of images. For this purpose initial secret key is developed by using the plain image. SHA 256 is implemented on the image that gives 256 bits output.
This hash value will be used in the generation of secret keys. The output H is split into 8 bit blocks h as follows:
The initial states of used chaotic maps are derived from the above blocks as:
While the control parameters m, μ1, μ2, μ3 are formed as:
The secret random numbers T0, M0 and N0 used in encryption are generted as:
The SHA 256 value of plain image is encrypted by RSA encryption algorithm. The asymmetric encryption technique is adopted for the secure transmission of key. The receiver’s public key is used to encrypt the hash value in (6). The receiver only use his private key for the decryption of the master key.
Here H is the master key, K is its related encrypted key and (e, r) is the public key of receiver. For the decryption receiver uses his private key (d, r) in the following relation to get the master key as:
After receiving H the receiver uses (7)–(18) to form the subkeys and then use them in decryption algorithm to get the secret image.
Algorithm 3 (Image encryption algorithm)
Input: Image I, Secret keys k1, k2, Algorithm (2), PWLCM (3), tent logistic map (4). Output: Encrypted image C.Read the given secret image I.Convert the color (RGB) image I into its primary color components i.e., Red, Green and Blue components.Input m and from secret key k1 in Algorithm (2) to generate an S-box, S.Use S as lookup table, for the color components of I obtained in Step 1. That is, replace each entry m ∈ I by S(m), to get P = {p1, ... , p}.Change the substituted color components into 1 dimensional array of numbers.Iterate the tent logistic map for initial state x0, y0, z0 and control parameter μ1, μ2, μ3 for L times.Discard first n0 values from L
i.e., L∗ = L − n0 to eliminate the harmful effects of transient process.Convert the obtained sequence to 8-bit integer values using the relationwhere mod gives back the remainder after dividing by 256, while the floor(x) gives the largest integer less than or equal to x. Hence the output sequences lie in the range of [0, 255].Pre encrypt each color component separability by using the above generated chaotic sequence as follows:The scrambling process of the pre encrypted image’s red component:The scrambling process of the pre encrypted images green component:The scrambling process of the pre encrypted images blue component:Mix pre encrypted color components to combine the diffusion effects as follows:Convert and into image form and concatenate these color components, to get ciphered image C.The ciphered image C can be converted back to its original image by using following decryption algorithm.
Algorithm 4 (Image decryption algorithm)
Input: Cipher image C, Secret key k1, k2, Algorithm (2), PWLCM (3), tent logistic map (4). Output: Original image I.Read the cipher image C.Convert the cipher image into its primary color components i. e.,
.Transform these color components into their digital form and then reshape into one dimensional array form.Re-mix color components as follows to get the pre decrypted image componentsIterate the tent logistic map for initial states x0, y0, z0 and control parameters μ1, μ2, μ3 for L times to get three chaotic random sequences.Discard first n0 values to eliminate the harmful effects of transient process.Convert the obtained sequences to 8-bit integer values using these relations:where mod gives back the remainder after dividing by 256, while the floor(x) gives the largest integer less than or equal to x. Hence the output sequences lie in the range of [0, 255].Perform the initial decryption using chaotic random sequences as follows:The unscrambling process of red component of Cipher image:The green component of the cipher image is unscrambled as follows:The following shows the unscrambling procedure of the blue component of cipher image:Convert the obtained one dimensional sequences into two dimensional array.Input k1 for m and in Algorithm (2) to generate an S-box and then generate its inverse S-box, S− 1.By using inverse S-Box, (S− 1) as lookup table for substitute values, obtained after step 5. That is, to get I = {m1, ... , m}.By converting resulting matrix I into image form, original image I is obtained.The validation of the proposed image encryption scheme is demonstrated by correctly recovering the original image from the encrypted image. The decryption algorithm correctly reverses all the effects performed during encryption and only the intended receiver can successfully recover the original image.
Results and discussions
For the demonstration of proposed scheme, we have applied Algorithms 3 and 4 on two different RGB image files in the following examples. These files are taken from the http://sipi.usc.edu/database/ that is also known as the USC-SIPI Image Database to analyze the utility and the do-ability of our proposed RGB image encryption scheme. All the related experiments and simulations have been performed in the environment of MATLAB.
Example 1
For image encryption we have selected the standard Lena 256 × 256 image. The original Lena image shown in the Fig. 8a is encrypted by using the proposed Algorithm 3. The resulting encrypted image is visible in Fig. 8b. The figure shows that the proposed encryption mechanism completely scramble the original image without leaving any clue to reveal the original information. The decryption is then performed by using the proposed image decryption Algorithm 4 and displayed in Fig. 8c. The decryption result indicates that the proposed scheme effectively works and perfectly recover the original image.
Fig. 8
Experimental results for the Lena image (a) Original image (b) Encrypted image (c) Decryption
Experimental results for the Lena image (a) Original image (b) Encrypted image (c) Decryption
Example 2
In the next example we have taken a Pepper 256 × 256 image. The original image is shown in Fig. 9a, the encryption result is displayed in Fig. 9b. The encryption result signifies that the proposed technique generates a noise like structure that does not reveal any useful information about the original image. The decryption result using Algorithm 4 is presented in Fig. 9c. From the decryption result it is evident that the proposed scheme is able to give a flawless recovery.
Fig. 9
Experimental results for the Pepper image (a) Original image (b) Encrypted image (c) Decryption
Experimental results for the Pepper image (a) Original image (b) Encrypted image (c) Decryption
Security analysis
The algorithm is capable for the use in real time application such as internet communication, multimedia systems etc. For the evaluation of the quality and performance of proposed image encryption scheme, we apply different security measures and analysis indicators on it. This section is devoted to address the security properties of the proposed scheme.
Key space
Key space in a cryptosystem is considered an essential feature. It should be sufficiently large to withstand against brute force attack. In the proposed encryption algorithm, secret key is actually a pair k = (k1, k2) having two secret keys used in encryption algorithm. These secret keys contain the parameters of used chaotic maps, i.e., for Chaotic map (3) and k2 = (x0, μ1, y0, μ2, z0, μ3) for tent logistic map (4). In consonance with IEEE floating point precision [54] the precision of each key should be greater than 10− 15. We use precision level for chaotic map’s parameters as 10− 15. Hence the keyspace size will be (1015)8 = 10120 ≈ 2398. This keyspace is large enough to prevent brute force attack. The resulting keyspace is larger than minimum requirement [4] of key size 2100. A comparison of key space using our proposed technique with some other state of the art schemes is also shown in Table 3.
Table 3
Key space size comparison
Image encryption schemes
Key Space
Cuaric et al. [12]
2128
Wang et al. [50]
2149
Rehman et al. [42]
2209
Guesmi et al. [20]
2256
Proposed scheme
2398
Key space size comparison
Key sensitivity
Another essential requirement for an image encryption scheme is its highly sensitive behavior towards its secret keys. For a good encryption system, a single bit modification in secret key gives completely different encrypted result. In this research we have used PWLCM and tent logistic maps. These chaotic maps are highly sensitive to initial conditions and control parameters. If we take a very insignificant change in key or control parameter, the resulting generated random sequence will completely changed. Which in response gives entirely different encryption/decryption results.In Fig. 10 two test images Lena and Peppers are used for key sensitivity analysis. First we encrypt them using key components x0 = 0.76 and m = 0.15 for PWLCM and x0 = 0.479, μ1 = 4.5, y0 = 0.596, μ2 = 6.2, z0 = 0.964, μ3 = 7.9 for tent logistic map. Figure 10c, g show the result of using slightly different key than original key, that is x0 is changed from 0.479 to 0.47900000000000000009. Figure 10d, h depict the difference between the encryption results and modified key based encryption results. From these results it is evident that the encryption results are significantly change by taking a minor modification in any of the key component.
Fig. 10
Experimental results of proposed encryption method for the minor modification in the secret key: (a, e) original images of Lena and Peppers (b, f) encrypted images (c, g) encrypted images using slightly modified key (d, h) absolute intensity difference images
Experimental results of proposed encryption method for the minor modification in the secret key: (a, e) original images of Lena and Peppers (b, f) encrypted images (c, g) encrypted images using slightly modified key (d, h) absolute intensity difference images
Distribution of pixels in cipher image
Image histogram shows that how pixels in an image are dispersed. From the above Example 1, Lena image, Fig. 8a is taken as original image, with size (256 × 256). Histograms of its corresponding ciphered image components are shown in Fig. 11a, b, c. From the histogram it is clear that, there does not exist any clue to mount a statistical analysis attack on the encrypted image.
Fig. 11
Histogram of encrypted image (a) red component (b) green component (c) blue component
Histogram of encrypted image (a) red component (b) green component (c) blue component
Correlation analysis of two adjacent pixels
The quantitative analysis for the evaluation of having high confusion and diffusion among neighboring pixels in plain image and the corresponding cipher image is evaluated by a test of correlation. We have examined the correlation in the adjacent pixels in Lena ciphered image. Figure 12 shows row-wise correlation in components of encrypted Lena image. For calculation of correlation coefficient in horizontal, vertical and diagonal in cipher image, the following relation [40] has been used.
where x and y are the values of the adjacent pixels in the image and n is the cumulative number of pixels taken for the calculation of correlation (19).
Fig. 12
Correlation (row-wise) in the encrypted Lena image (a) red component (b) green component (c) blue component
Correlation (row-wise) in the encrypted Lena image (a) red component (b) green component (c) blue componentThe values in resulting Table 4 tells that correlation coefficient of cipher image approaches to zero. Hence neighboring pixels in cipher image are almost uncorrelated.
Table 4
Correlation coefficient of two neighboring pixels in original and ciphered image
Direction
Orig. Img.
Prop. Scheme
Wang et al. [49]
Wang et al. [50]
Zhang et al. [58]
Wei et al. [53]
Horizontal
0.9355
0.0019
0.0019
0.0037
0.0036
0.0042
Vertical
0.9093
0.0035
0.0038
0.0029
0.0023
0.0033
Diagonal
0.8815
0.0008
0.0019
0.0047
0.0039
0.0024
Correlation coefficient of two neighboring pixels in original and ciphered image
Information entropy
This feature of analysis is used to test the randomness in the encrypted image. It also indicates an average amount of information contained in ciphered image. For the cipher image C the entropy value [55] can be computed with the formula:Here p(c) in (20) shows the probability of occurrence of symbol c in cipher image C. For exact random source emitting 256 symbols, the ideal value of entropy H(C) is 8. If value of entropy less than 8 in cipher image then it means that there is a possibility of predictability of plain image. Which is dangerous for security of image encryption algorithm. In proposed algorithm entropy for ciphered image C, that is H(C) is checked. The calculated value of entropy of ciphered image C with comparison to other images is shown in Table 5.
Table 5
Entropy values comparison
Encryption schemes
Entropy values
Fu et al. [18]
7.9880
Wu et al. [56]
7.9971
Choi et al. [11]
7.8198
Wu et al. [52]
7.9912
Proposed scheme
7.9959
Entropy values comparisonThe result shows that entropy of encrypted image is very near to ideal entropy value which is 8. It shows that amount of information leakage in proposed image encryption algorithm is almost zero. Hence it is secure enough.
Sensitivity analysis of the proposed algorithm
Number of pixel change rate (NPCR) and the unified average changing intensity (UACI) are used as the measuring criterion’s for investigating the effect of varying one pixel of the plain image on the cipher image. These indicators are calculated by the following formulas:
Here w and h indicate the width and height of the cipher image respectively. X and are cipher images obtained from the original image and one pixel difference in the original image respectively. If X and are same then K = 0 otherwise 1. For the resistance against differential attacks, NPCR and UACI [51] values should be large and close to their optimum values. In this research, for Lena 256 × 256 image the calculated NPCR and UACI values are 99.62 and 33.46 respectively. The proposed scheme shows high performance for these indicators. Therefore it will provide well resistance against “known plaintext attacks” and “chosen plaintext attacks”.
Noise and data loss attacks
A good encryption scheme also has the property to minimize the noise effects generated due to the pixel discrepancies in the decrypted image. For the capacity evaluation of our proposed method against the resistance of noise and data loss attacks, we use color Lena image as test case of size 256 × 256. The encrypted test image is noised by adding 1%, 5% and 10% salt and pepper noise as shown in the Fig. 11.It is obvious from the figure that when the encrypted image encounter the salt and pepper noise, the decryption results retains a significant majority of original information and also contains a small portion of evenly distributed noise. The quantitative analysis for the difference between the plain image I and the decrypted image I is carried out by using peak signal to noise ratio (PSNR). While the mean square error (MSE) is used to measure the cumulative squared error between the original image and the decrypted image. For the calculation of PSNR and MSE [5] of MN sized image, we use the following relations:
The smaller MSE values calculated from (22) indicate the minimal error in the decryption results. Whereas the higher PNSR values obtained from (21) reveal the higher decrypted image fidelity against its original plain image (Fig. 13).
Fig. 13
Experimental results for the performance evaluation of data loss attacks: (a, c, e) cipher images with 1%, 5% and 10% salt and pepper noise, (b, d, f) decryption results of corresponding images using our scheme
Experimental results for the performance evaluation of data loss attacks: (a, c, e) cipher images with 1%, 5% and 10% salt and pepper noise, (b, d, f) decryption results of corresponding images using our schemeThe calculated values of PSNR for these modified cipher images by 1%, 5% and 10% salt and pepper noise are shown in Table 6. The findings show that the encryption strategy provides reasonable efficiency for data loss and noise attacks.
Table 6
Performance of MSE and PSNR about salt and pepper noise
Salt & pepper noise
1%
5%
10%
MSE
392.49
1845.3
3357.43
PSNR
22.2370
15.5095
12.9098
Performance of MSE and PSNR about salt and pepper noise
Complexity analysis
There is a strong relationship between the complexity in the chaotic system and the robustness of the cryptosystem based on that chaotic system. In this research we have used two chaotic maps, the piecewise linear chaotic map (3) and tent logistic map (4). The chaotic map (3) is used to generate a random sequence of length MN, where as chaotic map (4) gives 3 random sequences, floor function is used to convert these values into integer form. The XOR function is used to generate randomness in the image and also to accumulate the generated randomness in different components of image. Thus the calculated complexity value for used chaotic maps and applied operations, is . The high complexity of the proposed scheme ensures good quality encryption results.
Encryption/decryption time
For any algorithm, security considerations are important but a good encryption algorithm should also robust and efficient. The running speed of encryption algorithm is an important aspect. Using our proposed algorithm, we have measured the encryption/decryption time of Lena image of size 256 × 256. The time analysis is done on CORE i7-3520M, 2.90GHz CPU with 8GB RAM notebook running on Windows 8, 64 bit operating system using Matlab R2013a (8.1.0.604). The average time taken by the proposed encryption/decryption algorithm for Lena image is 0.277 second.
Comparison
A deep and detailed overall comparison of the proposed scheme with other image encryption schemes is given below.The comparison presented in Table 7 shows that the proposed scheme has better results for correlation analysis and key space while the performance against entropy analysis, NPCR and UACI is also comparable with many other state of the art encryption techniques.
Table 7
Properties comparison of cipher generated by taking Lena as test image
Algorithms
NPCR
UACI
Correlation
Keyspace
Entropy
Proposed scheme
99.62
33.46
0.002066
10120
7.9959
Ali et al. [3]
99.6094
33.4635
0.0020
1090
7.9984
Kanwal et al. [25]
99.61
33.46
0.002977
1084
7.9990
Chai et al. [6]
99.63
–
0.0037
1051
7.9983
Wu et al. [52]
100
33.47
0.00603
10112
7.9912
Wang et al. [50]
99.5956
33.5512
0.0038
1056
7.9975
Properties comparison of cipher generated by taking Lena as test image
Conclusion
In this study a novel and different technique for the encryption/decryption of color images is proposed based on S-box and chaotic system. Hybrid cryptographic approach is used for this purpose. It uses a plain image based master key for the generation of subkeys to encrypt the corresponding image. The master key is sent to the receiver by using the asymmetric cryptographic technique RSA after encrypting with the public key of the receiver. Encryption and decryption processes are carried out by using symmetric cryptographic approach. In encryption phase the generated S-box by PWLCM takes the substitution of image pixel values and hence generates confusion and diffusion in the image. The tent logistic system is used as PRNG for the generation of random chaotic sequence. Then a mixing technique employed for the mixing of this generated sequence with substituted image pixels values and their preceding values. Finally a self mixing operation on the components of image is used for stable noise like effects in the encrypted image.The proposed algorithm has provided resistance to different types of cryptographic attacks as brute force attack, known plaintext attack, noise and data loss attacks etc. It is also capable of handling with different sizes and formats of images. The security analysis shows the practicability and effectiveness of proposed scheme. The proposed encryption scheme is based on multi chaotic maps, therefore it may require large memory and hence increase computational cost. As a future work, the image encryption and decryption coding algorithms can be further improved by using some recent work on the optimization of alogrithms and code design like [9, 15, 27, 28].