International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)287
An Image Encryption Approach Using Chaotic Map in
Frequency Domain
Shoaib Ansari
1, Neelesh Gupta
2, Sudhir Agrawal
3T.I.E.I.T BHOPAL (M.P.) Abstract - This paper presents a chaotic map based
cryptography technique, in the proposed technique; confusion and diffusion applied on spectral domain (on DCT(Discrete Cosine Transform) coefficients) hence the encryption can be achieved quickly without applying the large number of confusion and diffusion cycle as it is needed in spatial domain. Also the diffusion template is created by random number generator based on Gaussian distribution. The technique uses Bakers map and capable of providing the key length of 128 bits although it’s length can be extended further. The proposed technique is simulated using Matlab and the results prove its robustness with all type of cryptanalytic tests and faster execution.
Keywords - cryptography, chaotic Maps, image shuffling, baker’s map, information entropy.
I. INTRODUCTION
Cryptography is the practice and study of techniques for secure communication in the presence of third parties (called adversaries) [1]. More generally, it is about constructing and analyzing protocols that overcome the influence of adversaries [2] and which are related to various aspects in information security such as data confidentiality, data integrity, and authentication [3]. Modern cryptography intersects the disciplines of mathematics, computer science, and electrical engineering. Applications of cryptography include ATM cards, computer passwords, and electronic commerce. Cryptography prior to the modern age was effectively synonymous with encryption, the conversion of information from a readable state to apparent nonsense. The originator of an encrypted message shared the decoding technique needed to recover the original information only with intended recipients, thereby precluding unwanted persons to do the same. Modern cryptography is heavily based on mathematical theory and computer science practice; cryptographic algorithms are designed around computational hardness assumptions, making such algorithms hard to break in practice by any adversary. It is theoretically possible to break such a system but it is infeasible to do so by any known practical means.
These schemes are therefore termed computationally secure; theoretical advances (e.g., improvements in integer factorization algorithms) and faster computing technology require these solutions to be continually adapted. There exist information-theoretically secure schemes that provably cannot be broken even with unlimited computing power. The rest of the paper is arranged as follows: the section 2 presents a brief review of the recent works in same field. Section 3, 4 explains the mathematical concepts used in the system. Section 5 describes the proposed algorithm followed by simulation results shown in section 6. Section 7 shows the conclusion drawn on the basis of simulation results.
II. REVIEW
This section provides a brief overview of the recent work done in the same field.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)288
Musheer Ahmad and M. Shamsher Alam [6] presented a Cat map & block based shuffling algorithm, in block based algorithm the image is firstly divided into the smaller blocks then each block is independently shuffled after that the blocks are shuffled, since the Cat map having a property of cyclic repetition they used a 2D logistic map to change the Cat maps parameters after each iteration. The 1D logistic map is used to generate the diffusion template which is similar to method proposed by [7] after generating the template XOR operation is performed for diffusion. A new approach based on pixel bits permutation is proposed in [8] where each pixel is taken as a block of eight bits and then these bits are shuffled they called it the bit level permutation although for shuffling they also really on Cat Map. To implement level permutation, each bit-plane of an image is shuffled separately by using Arnold Cat map with different control parameters. The bits moved from other positions on the bit-plane. Thus it also works as effective diffusion mechanism but they still used Chebyshev map as cipher stream generator, for further diffusion. Ruisong Ye, Wei Zhou [4] proposed the Tent Map based permutation technique. They also used logistic map for diffusion template generation but they also added a coupling intensity factor which modifies the weight of generated pixels before XORing.
III. 2DBAKERS MAP
In dynamical systems theory, the baker's map is a chaotic map from the unit square into itself. It is named after a kneading operation that bakers apply to dough: the dough is cut in half, and the two halves are stacked on one-another, and compressed.
The baker's map can be understood as the bilateral shift operator of a bi-infinite two-state lattice model. The baker's map is topologically conjugate to the horseshoe map. In physics, a chain of coupled baker's maps can be used to model deterministic diffusion. The Poincare recurrence time of the baker's map is short compared to Hamiltonian maps. As with many deterministic dynamical systems, the baker's map is studied by its action on the space of functions defined on the unit square. The baker's map defines an operator on the space of functions, known as the transfer operator of the map. The baker's map is an exactly solvable model of deterministic chaos, in that the Eigen functions and Eigen values of the transfer operator can be explicitly determined.
There are two alternative definitions of the baker's map which are in common use. One definition folds over or rotates one of the sliced halves before joining it (similar to the horseshoe map) and the other does not.
The folded baker's map acts on the unit square as
( )
{
( )
( )
When the upper section is not folded over, the map may be written as
( ) ( ⌊ ⌋
⌊ ⌋
)
The folded baker's map is a two-dimensional analog of the tent map
( ) {
( )
While the non-rotated map is analogous to the Bernoulli map. Both maps are topologicallyconjugate. The Bernoulli map can be understood as the map that progressively lops digits off the dyadic expansion of x. Unlike the tent map, the baker's map is invertible.
IV. 2DDCT(DISCRETE COSINE TRANSFORM) Multidimensional variants of the various DCT types follow straightforwardly from the one-dimensional definitions: they are simply a separable product (equivalently, a composition) of DCTs along each dimension.
For example, a two-dimensional DCT-II of an image or a matrix is simply the one-dimensional DCT-II, from above, performed along the rows and then along the columns (or vice versa). That is, the 2d DCT-II is given by the formula (omitting normalization and other scale factors, as above):
∑ ( ∑ [ ( ) ]
)
[ ( ) ]
∑ ∑ [ ( ) ]
[ ( ) ]
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)289
V. PROPOSED ALGORITHM
Step1. Take the input image.
Step2. Calculate the 2D DCT of the image.
Step3. Extract the key to retrieve information about Encryption Parameters, K, X0, Y0,N1, K1, X10, Y10,N11 and
mean, variance.
Step4. Generate the Diffusion image of size of original image using mean and variance as input for Gaussian Random sequence generator
.
Step5. Initialize two Baker’s Map from decoded key for Diffusion image shuffling and DCT transformed image shuffling.
Step6. Now XOR the Shuffled DCT transformed image with Shuffled Diffusion Image.
Step7. Repeat the step 6 for N11 Times
.
[image:3.612.332.553.115.313.2]
Figure 1: Flow chart for the proposed algorithm
VI. EXPERIMENTAL RESULTS
The proposed encryption algorithm is implemented in MATLAB for computer simulations. We take a gray-scale “Lena” image of 256x256 in size for experimental purposes. The original Lena image and its histogram are shown in figure 2(a)-(b). The key chosen for encryption is 12345678 mean = 0 and variance = 0.5.
Figure 2(a): Lena original image with histogram
Figure 2(b): Lena Encrypted image with histogram
VII. CRYPTANALYTIC TESTS &ANALYSIS
A. Key Space Analysis
Key space is the total number of different keys that can be used in the cryptographic system. A cryptographic system should be sensitive to all secret keys. There are total ten initial conditions of chaotic map used in the algorithm and the initial conditions for K, X0, Y0,N1, K
1
, X10, Y 1
0,N 1
1
mean and variance can be used as secret keys of encryption and decryption. In our case, the precision is 10-14, the key space size is (1014)10 = 10140, which is extensively large enough to resist the exhaustive attack.
B. Key Sensitivity Analysis
[image:3.612.72.239.354.582.2]A good cryptosystem should be sensitive to a small change in secret keys i.e. a small change in secret keys in decoding process results into a completely different decoded image. Our proposed encryption algorithm is sensitive to a tiny change in the secret keys. The Lena image encrypted by key 12345678 mean = 0 & variance = 0.5 (figure 2(b)), when try to decrypt by the key 12345677 it shows the following result
Figure 3: left is the encrypted image by key 12345678, and right is the decrypted image by 12345677.
[image:3.612.332.553.582.667.2]International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)290
C. Correlation Coefficient Analysis [image:4.612.329.557.152.369.2]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 values of correlation coefficients in the encrypted images are close to 0; this means that the adjacent pixels in the encrypted images are highly uncorrelated to each other.Table 1
Correlation Coefficients of Two Adjacent Pixels in Encrypted Images for Various Iterations
N Horizontal Vertical Diagonal
1 0.9209 0.0249 0.9220 0.0034 0.8792 0.1830
2 0.9209 0.0131 0.9220 0.0058 0.8792 0.0453
3 0.9209 0.0059 0.9220 0.0017 0.8792 0.0285
4 0.9209 0.0013 0.9220 0.0041 0.8792 0.0755
5 0.9209 0.0077 0.9220 0.005 0.879 0.058
D. Information Entropy Analysis
The entropy H of a symbol source S can be calculated by following equation [6].Where p(si) represents the probability of symbol (s,i)and the entropy is expressed in bits. If the source S emits 28 symbols with equal probability, i.e. S = {s 1, s 2. . , s 256}, then the result of entropy is H(S) = 8, which corresponds to a
( ) ∑ (
)
(
)
true random source and represents the ideal value of entropy for message source S. Information entropy of an encrypted image can show the distribution of gray value. The more the distribution of gray value is uniform, the greater the information entropy. If the information entropy of an encrypted image is significantly less than the ideal value 8, then, there would be a possibility of predictability which threatens the image security. The value of information entropy for the plain-image is comes out to be H(S) = 7.3881. However, the values of information entropy obtained for the case of images encrypted by the proposed algorithm are very close to the ideal value 8, the entropy values of the encrypted images are listed in Table 2.
This means that the information leakage in the proposed encryption process is negligible and the image encryption system is secure against the entropy attack.
Table 2
Information Entropy of Encrypted Images for Various Iterations
N1=N11
Entropy
1
7.9928
2
7.9944
3
7.9980
4
7.9816
5
7.9846
Table 3
encryption and decryption time For Various Iterations
N1=N11 Encp. time Decp. Time
1 0.05803 0.05995 2 0.0981 0.097923 3 0.13792 0.14041 4 0.17814 0.18119 5 0.22 0.21993
VIII. CONCLUSIONS
In this paper, we presented a new algorithm of encryption and decryption of images. The algorithm is based on the concept of frequency domain shuffling and Gaussian diffusion palate. All the simulation and experimental analysis show that the proposed image encryption system has (1) a very large key space, (2) high sensitivity to secret keys, (3) has information entropy close to the ideal value 8 and (4) has 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.
REFERENCES
[1 ] Rivest, Ronald L. (1990). "Cryptology". In J. Van Leeuwen. “Handbook of Theoretical Computer Science”. 1. Elsevier. [2 ] Bellare, Mihir; Rogaway, Phillip (21 September 2005).
"Introduction". Introduction to Modern Cryptography”. p. 10. [3 ] AJ Menezes, PC van Oorschot, and SA Vanstone, “Handbook of
Applied Cryptography” ISBN 0-8493-8523-7.
[4 ] Yaobin Mao and Guanrong Chen “A Novel Fast Image Encryption Scheme Based on 3d Chaotic Baker Maps” International Journal Of Bifurcation and Chaos, Vol. 14, No. 10 (2004) 3613–3624. [5 ] Alireza Jolfaei,Abdolrasoul Mirghadri “An Image Encryption
Approach Using Chaos And Stream Cipher” Journal of Theoretical And Applied Information Technology 2010.
[image:4.612.55.280.302.360.2]International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)291
[7 ] Xin Ma, Chong Fu, Wei-min Lei, Shuo Li “A Novel Chaos-based Image Encryption Scheme with an Improved Permutation Process” International Journal of Advancements in Computing Technology Volume 3, Number 5, June 2011.