Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
N
j1
a
k
N
k1
b
k
N
k1
fa
2
k
g
N
k1
fa
k
g
_ _
2
_ _
N
N
k1
b
2
k
_ _
N
k1
fb
k
g
_ _
2
_ _
5
1. Horizontal correlation a
k
= X(i, j) and b
k
= X(i, j + 1) with condition 1 6 i 6 H, 1 6 j 6 W 1 and take any N pairs of (a, b)
samples with different values of i and j.
2. Vertical correlation a
k
= X(i, j) and b
k
= X(i + 1, j) with condition 1 6 i 6 H 1, 1 6 j 6 W and take any N pairs of (a, b) sam-
ples with different values of i and j.
3. Diagonal correlation a
k
= X(i, j) and b
k
= X(i + 1, j + 1) with condition 1 6 i 6 H 1, 1 6 j 6 W 1 and take any N pairs of
(a, b) samples with different values of i and j.
4.1.3. Correlation between original and cipher images
We have analyzed the correlation between various pairs of original and cipher images by computing the 2D correlation
coefcients between original and encrypted images. We have chosen 10 images for this analysis (cf. Tables 1 and 2).
0
100
200
300
400
500
600
700
800
0 50 100 150 200 250
0
100
200
300
400
500
600
0 50 100 150 200 250
Fig. 2. Experimental results: (a) Lena image; (b) encrypted image; (c) histogram of Lena image; (d) histogram of encrypted image.
Table 1
Correlation coefcients for the two adjacent pixels in the original and encrypted shown in Fig. 2.
Original image (Fig. 2(a)) Encrypted image (Fig. 2(b))
Horizontal 0.9187 0.0004992
Vertical 0.9511 0.00198
Diagonal 0.8934 0.0008371
Table 2
Average correlation between the original and cipher images.
Plain vs Encrypted image Correlation
0.00182
A. Kumar, M.K. Ghose / Commun Nonlinear Sci Numer Simulat 16 (2011) 372382 377
4.2. Sensitivity analysis of the encryption.
4.2.1. Sensitivity analysis for the cipher to key
A good encryption algorithm must possess the property that a slight change in the key changes the encrypted le almost
completely. The key sensitivity of a cryptosystem is observed by two different method.
1. Encrypted image should be very sensitive to the secret key. If we use two slightly different keys to encrypt the same
image then the correlation between two encrypted images should be negligible. Results are shown in Table 3.
(a) First Lena image is encrypted by using a pair of keys of 4.94785238984676 and 0.31256128342389, and then the least
signicant bit of key x is changed. The new keys become 4.94785238984675 and 0.31256128342389 in this example,
which are used to encrypt the Lena image. The resulting image is Fig. 3(b).
(b) Now change the least signicant bit of y of the original key.The new keys become 4.94785238984676 and
0.31256128342388 in this example, which are used to encrypt the Lena image.The resulting image is Fig. 3(c).
2. The encrypted image should not be decrypted correctly if there is slight difference between the encryption and decryp-
tion keys. We will encrypt image by using the pairs of key 4.94785238984676 and 0.31256128342389. After try to decrypt
with slight change in keys.
First by changing least signicant bit of x key, and decrypt with keys 4.94785238984675 and 0.31256128342389. The
resulting image is Fig. 4(b).
After that changing the least signicant bit of y key, and decrypt with keys 4.94785238984676 and 0.31256128342388.
The resulting image is Fig. 4(c).
4.2.2. Difference attacks sensitivity analysis for the cipher to plaintext
For implementation of various types of attacks such as known plaintext attack, chosen plaintext attack and more ad-
vanced adaptive chosen plaintext attack, a slight change in plain image and compare the encrypted images in order to extract
some relationship between plain image and encrypted image, which help attackers in determining the secret key. Such anal-
ysis is termed as differential cryptanalysis in cryptographic terminology. If one minor change in the original image causes
large changes in the encrypted image then such differential analysis may become useless.
Table 3
Sensitivity analysis for the cipher to key.
Test item Test results
Sensitivity for cipher to key (key difference ( 10exp 14) in x
0
) 0.00173
Sensitivity for Cipher to Key (key difference ( 10exp 14) in y
0
) 0.0005932
Fig. 3. Sensitivity analysis for the cipher to keys when encrypt with slightly different key: (a) encrypted image; (b) encrypted image with change in x; (c)
encrypted image with change in y.
Fig. 4. Sensitivity analysis for the cipher to keys when decrypt with slightly different key: (a) decrypted image with original key; (b) decrypted Image with
change in x; (c) decrypted Image with change in y.
378 A. Kumar, M.K. Ghose / Commun Nonlinear Sci Numer Simulat 16 (2011) 372382
We have measured the number of pixels change rate by calculating the number of pixel change rate (NPCR) and the uni-
ed average changing intensity (UACI) of the two encrypted images. And we have also calculated the correlation between
these two encrypted image which is 0.0002342.
NPCR
H
i1
W
j1
fD
ij
g
W H
100 6
UACI
1
W H
H
i1
W
j1
fC
1
i; j C
2
i; jg
255
_ _
100 7
where W and H are the width and height of encrypted image. Two encrypted images C
1
and C
2
, whose corresponding original
images have only 1-pixel difference. We dene a two-dimensional array D, which has the same size as C
1
and C
2
. If C
1
(i, j) = -
C
2
(i, j), then D
i,j
= 0, otherwise D
i,j
= 1.
The proposed image encryption technique shows extreme sensitivity on the original and hence not vulnerable to the dif-
ferential attacks (see Table 4 and Fig. 5).
4.2.3. Avalanche criterion
As we knowthat if one bit change in the plaintext should make ideally 50% difference in the bits of the cipher, and we also
done analysis about the changing rate of the bits of the cipher, the changing rate is 49.97%, so our scheme is nearly ideal.
4.3. Experimental proof for chosen plaintext attack
The various attacks are following that can be done by adversary.
1. Ciphertext only: Adversary possesses a string of cipher data. Adversary is to recover the plaintext, or nd the key.
2. Known plaintext: Adversary possesses a string of plaintext a, and the corresponding cipher text b. Adversary is to nd the
key or an approach so that he can decrypt a new cipher encrypted with the help of the same key.
3. Chosen plaintext: Adversary has obtained temporary access to the encryption machinery. So, he can choose a plaintext of
his choice string a, and can construct the corresponding encrypting string b.
4. Chosen cipher text: Adversary has obtained temporary access to the decryption machinery. So he can choose a ciphertext
of his choice string b, and can get corresponding plaintext string a. Adversary is to nd the key.
Take picture X and Y are encrypted in the same key [3], and the plaintext Y as PlainY, the key as K, XOR key and Plaintext as
Z
0
Y
XORPlainY; K, the permutation and diffuse this of Z
0
Y
as Z
Y
PZ
0
Y
, and K
0
= XOR(Z
Y
, PlainY).
Permutation and diffusion performed on the XOR value Z
0
Y
, so it is not possible to decrypt Z
0
X
with the key K
0
. Because
K
0
K. And therefore the attack matrix has no use in proposed technique.
The original images are Figs. 6(a) and (b), the corresponding encrypted images are Figs. 6(c) and (d). We try to recover
Fig. 6(b) from Fig. 6(a) and (c) by the iterating attack matrix, Fig. 6(e) on the basis of this we can say that the proposed
scheme is safe to against the method of attack matrix. So the our scheme is safe to against the attack of iterating attack ma-
trix [12].
Table 4
Sensitivity to plaintext.
Test item Test results
NPCR 0.9972
UACI 0.32821
Fig. 5. Difference attacks sensitivity analysis for the cipher to plaintext: (a) encrypted image; (b) encrypted Image with 1-bit change in original image.
A. Kumar, M.K. Ghose / Commun Nonlinear Sci Numer Simulat 16 (2011) 372382 379
4.4. Speed analysis
The running speed of a cryptosystem is the most important parameter for the practical applications. In order to achieve
this,the computational complexity is decreased by decreasing the numbers of multiplication and oating-points number to
integer conversion [13]. To support our analysis, we have performed various basic operations which are repeated 10,000,000
times on two computers with different conguration, where PC1 with a 2.1 GHz Pentium processor and 2G RAM and PC2
with a 2.67 GHz HPZ400 workstation and 6G RAM. Results are shown in Table 6 shows that multiplication and conversion
from oating-points to integers should be avoided to get high efciency for encryption and decryption.
Let consider the gray scale image of W width and H height (Table 5).
4.4.1. Patidar cryptosystem
1. Calculation of XOR key
(a) Multiplication: 2*W*H.
(b) Floating-points number to integer conversion: W*H.
(c) Modolus: 0.5*W*H.
2. Confusion using XOR key
(a) XOR: W*H.
3. Diffusion
(a) XOR: 2*W*H.
4. Generation of CKS
(a) Total multiplication: 7*W*H.
(b) Floating-points number to integer conversion: W*H.
(c) Modulus: 2*W*H.
(d) Addition: 3*W*H.
5. Confusion using CKS image
(a) XOR: W*H.
6. Total
(a) Multiplication: 9*W*H.
(b) Floating-points number to integer conversion: 2*W*H.
(c) XOR: 4*W*H.
(d) Modulus: 3*W*H.
(e) Addition: 3*W*H.
4.4.2. Proposed cryptosystem
1. Generation of Synthetic image
(a) Multiplication: 6*256.
(b) Floating-points number to integer conversion: 6*256.
Table 5
Computational complexity.
Computation Patidar cryptosystem Proposed cryptosystem
FP number to integer conversion 2*W*H 1536
Multiplication 9*W*H 1536
Modulus 3*W*H 1536
XOR 4*W*H (3*N
D
+ N
R
+ 2) *W*H
Addition 3*W*H
Permutation N
R
*(W + H)
Rotation N
R
*(W + H)
Fig. 6. Attack matrix: (a) Lena image; (b) house image; (c) encrypted Lena image; (d) encrypted house image; (e) attack to (b) by using (a) and (c).
380 A. Kumar, M.K. Ghose / Commun Nonlinear Sci Numer Simulat 16 (2011) 372382
(c) Modolus: 2*256.
(d) XOR: 2*W*H.
2. Numbers of Rounds
(a) XOR: 3*W*H.
(b) Modolus: 2.
3. Rotation
(a) XOR: N
R
*W*H.
(b) Permutation: N
R
*(W + H).
(c) Tranformation: N
R
*(W + H).
4. Diffusion
(a) XOR: 3*N
D
*W*H.
5. Total
(a) Multiplication: 6*256.
(b) Floating-points number to integer conversion: 6*256.
(c) XOR: (3*N
D
+ N
R
+ 2) *W*H.
(d) Modulus: 6*256.
(e) Permutation: N
R
*(W + H).
(f) Rotation: N
R
*(W + H).
4.5. Entropy
Entropy of a message m measured by
HM
N
i1
pm
i
log
1
pm
i
8
where N is the total number of symbols, p(m
i
) represents the probability of occurrence of symbol m
i
. For an ideal random
image of 256 symbols entropy is equal to 8-bits. For encrypted images 6(c), (d) entropies are 7.9996 and 7.9993, respec-
tively. This shows that encrypted images are very close to the random image. Hence, the proposed method is secure against
the entropy attack.
4.6. Key space analysis
The key space should be large enough. The effective key space for the proposed method is of nearly 157-bits [1]. This is
large enough to resist the brute-force attack.
5. Conclusions
The improved encryption concept is proposed using the rotation, diffusion and numbers of rounds for both stages de-
pends upon plain image and key combination. This method is immune to various types of cryptographic attacks like known
plaintext, chosen plaintext attacks. The proposed algorithm is lossless. The proposed scheme is secure and useful for real-
time application.
Acknowledgement
This work is part of the Research Project funded by All India Council of Technical Education (Government of India) vide
their ofce order: F.No. 8023/BOR/RID/RPS-236/2008-09. Also thankful to Department of Science & Technology (Ministry of
Science & Technology, Government of India) vide Ref. No. SR/SS/963/2009-10 under Research and Development Support
SERC (1009) Scheme.
Table 6
Time required for various basic operations (ms).
Operators PC1 PC2
Floating point number to integer conversion 190 145
Multiplication 60 42
Modulus 15 10
XOR 15 10
Addition 18 12
A. Kumar, M.K. Ghose / Commun Nonlinear Sci Numer Simulat 16 (2011) 372382 381
References
[1] Patidar V, Pareek NK, Sud KK. A new substitution diffusion based image cipher using chaotic standard and logistic maps. Commun Nonlinear Sci Numer
Simulat 2009;14:305675.
[2] Schneier B. Applied cryptography: protocols algorithms and source code in C. New York (USA): Wiley; 1996.
[3] Tong Xiaojun, Cui Minggen. Image encryption with compound chaotic sequence cipher shifting dynamically. Image Vision Comput 2008;26:84350.
[4] Mazloom Sahar, Masud Eftekhari-Moghadam Amir. Color image encryption based on coupled nonlinear chaotic map. Chaos Solitons Fract
2009;42:174554.
[5] Chen HC, Guo JI, Huang LC, Yen JC. Design and realization of a new signal security system for multimedia data transmission. EURASIP J Appl Signal
Process 2003;2003(13):1291305.
[6] Wang Yong, Wong Kwok-Wo, Liao Xiaofeng, Xiang Tao, Chen Guanrong. A chaos-based image encryption algorithm with variable control parameters
chaos. Solitons Fract 2009;41:177383.
[7] Li Chengqing, Li Shujun, Chen Guanrong, Halang Wolfgang A. Cryptanalysis of an image encryption scheme based on a compound chaotic sequence.
Image Vision Comput 2009;27:10359.
[8] Rhouma Rhouma, Ercan Solak, Safya Belghith. Cryptanalysis of a new substitutiondiffusion based image cipher. Commun Nonlinear Sci Numer
Simulat. doi:10.1016/j.cnsns.2009.07.007.
[9] Alvarez G, Li Shujun. Cryptanalyzing a nonlinear chaotic algorithm (NCA) for image encryption. Commun Nonlinear Sci Numer Simulat
2009;14:37439.
[10] Lian S, Sun J, Wang Z. A block cipher based on a suitable use of chaotic standard map. Chaos Solitons Fract 2005;26:11729.
[11] Rajpal N, Kumar A, Jindal PR. Demonstrating the use of error coding technique in the eld of steganography, along with linear feedback shift register
technique. In: Proc of the 2nd Workshop on Computer Vision, Graphics and Image Processing, Gwalior, India; 2004. p. 227.
[12] Tong Xiaojun, Cui Minggen, Wang Zhu. A new feedback image encryption scheme based on perturbation with dynamical compound chaotic sequence
cipher generator. Opt Commun 2009;282:27228.
[13] Yong Wang, Kwok-Wo Wong, Xiaofeng Liao, Guanrong Chen. A new chaos-based fast image encryption algorithm. Appl Soft Comput J. doi:10.1016/
j.asoc.2009.12.011.
382 A. Kumar, M.K. Ghose / Commun Nonlinear Sci Numer Simulat 16 (2011) 372382