244
Int. J. Information and Communication Technology, Vol. 2, No. 3, 2010
Block cipher using 1D and 2D chaotic maps Narendra K. Pareek* University Computer Centre, Vigyan Bhawan, Block-A, M.L. Sukhadia University, Udaipur-313001, Rajasthan, India E-mail:
[email protected] *Corresponding author
Vinod Patidar and Krishan K. Sud Department of Physics, Sir Padampat Singhania University, Bhatewar, Udaipur-313601, Rajasthan, India E-mail:
[email protected] E-mail:
[email protected] Abstract: In this paper, we present a new chaotic block cipher in which a logistic map, Henon map, and secret key are used. In the proposed chaotic cipher, the confusion and diffusion are achieved respectively with the help of chain block ciphering and secret key dependent permutation boxes. Due to the excellent confusion and diffusion properties, the proposed chaotic cipher is extremely robust. The results of the statistical analysis show that the chaotic cipher posses all features needed for a secure system and useable for the security of communication system. Keywords: chaotic block cipher; permutation boxes; secret key; cryptography. Reference to this paper should be made as follows: Pareek, N.K., Patidar, V. and Sud, K.K. (2010) ‘Block cipher using 1D and 2D chaotic maps’, Int. J. Information and Communication Technology, Vol. 2, No. 3, pp.244–259. Biographical notes: Narendra K Pareek received his MSc from the University of Rajasthan, Jaipur, India in 1986 and his PhD in Computer Science from M.L. Sukhadia University, Udaipur, India in 2005. He has worked as a Lecturer in the Department of Computer Science, Banasthali University, Banasthali, India for a period of two years. Presently, he is working as a Programmer at the University Computer Centre of the M.L. Sukhadia University, Udaipur since 1991 and has been teaching various courses of computer science to undergraduate and post graduate students. His research interests are in information security, chaotic cryptology, data compression and information retrieval systems. He has published one book and 12 research papers on chaotic cryptography and image encryption in refereed international journals and conference proceeding. He has also received the most cited paper award for Image and Vision Computing in February 2009. Vinod Patidar is working as Assistant Professor of Physics at Sir Padampat Singhania University (SPSU), Udaipur, India since August, 2008. Prior to joining SPSU, he worked as Lecturer and Senior Lecturer in the Department of Physics, Banasthali University, Banasthali, India for a period of three years. He received his MSc (Physics) with University Gold Medal in 1999 and completed Copyright © 2010 Inderscience Enterprises Ltd.
Block cipher using 1D and 2D chaotic maps
245
the Doctoral Research (PhD) in the field of Non-linear Dynamics with a National Level Fellowship in 2004 from M.L.S. University, Udaipur, India. He has published more than 25 research papers in various international and national refereed journals. His present research interests include bifurcation and chaos in classical systems, control and synchronisation of chaos, dynamical behaviour of q-deformed non-linear dynamical systems, applications of chaotic dynamical systems in the development of secure cryptosystems and their security analysis and theoretical studies of electron atom/ion collisions. More details are available at http://www. vinod-patidar.webs.com. Krishan K Sud received his MSc in Physics from the University of Jodhpur, Jodhpur, India in 1965 and his MS and PhD from Ohio University, Ohio USA in 1973 and 1976, respectively. He is at present Senior Professor and Head Basic Sciences at Sir Padampat Singhania University Udaipur. He was the Director, University Computer Centre and the MCA programme (Master’s degree in Computer Applications) (1994–2005) and Chairman, Faculty of Science (2004–2005) of the M.L.S. University, Udaipur. He has supervised ten PhD dissertations, published two books and more than 100 papers in refereed national and international journals and conference proceedings in the field of external key based chaotic cryptosystems, cryptanalysis of the chaotic cryptosystems, image encryption, radiation physics and electron-atom collision problems. He was the President of the Indian Society of Atomic and Molecular Physics and Chairman Computer Society of India, Udaipur Chapter (2001–2003). He is also a Senior Member of the Computer Society of India.
1
Introduction
In recent years, with the continuous growth in the computing power of computers, conventional ciphers have become highly prone to break by brute force attack and as a result, these ciphers are becoming gradually less reliable, insecure and loosing their popularity. The chaotic dynamical systems have attracted the attention of the cryptographers owing to their deterministic nature and sensitivity to the initial condition. Such properties have the potential application in developing new cryptosystems for transmitting and storing secure information. Chaotic cryptography can be utilised for secure communication of information and data on both analogue as well as digital channels. In the literature, numerous digital chaotic cryptosystems have been discussed based on 1D and 2D chaotic maps. We refer the readers for a brief overview of the existing digital chaotic cryptosystems up to the year 2002 in the contribution by Pareek et al. (2003). Here, we present the development, in brief, in the field of discrete chaotic cryptography since year 2003. Li et al. (2003) analysed the weakness of chaotic encryption scheme developed by Zhou et al. (1997). They pointed out that dynamical degradation of the computerised chaos induces many weak keys which cause leakage of large information of the plaintext. Next, Pareek et al. (2003) developed a chaotic block cipher using the logistic chaotic map and external secret key. Further, Álvarez et al. (2003) analysed the security and studied the possible attacks on a chaotic cipher based on the logistic map’s ergodicity property. Wong (2002) proposed a cryptographic scheme based on iterating a logistic map and updated the look-up table dynamically. Later, Wong (2003) improved its original version of cryptosystem
246
N.K. Pareek et al.
which could perform both encryption and hashing to produce the ciphertext as well as the hash value for a given message. However, the length of the ciphertext was still at least twice of the size of the original message. Further, Wong et al. (2003) modified the chaotic cryptographic scheme proposed earlier (Wong, 2003) and could reduce the length of the ciphertext to the level slightly longer than the original message. Álvarez et al. (2004a) pointed out three different classes of attack on chaotic cipher proposed by Wong et al. (2001) to determine the secret key. Further, Álvarez et al. (2004b) analysed the security of chaotic ciphers proposed by Wong (2002, 2003) based on dynamically updating look-up table and recovered the key stream used by the algorithms Wong (2002, 2003) successfully. They also showed that the updating mechanism of the look-up table, which depends on the plaintext rather than the key, facilitates cryptanalysis. Machado et al. (2004) proposed a chaos-based secret key cryptosystem for digital communication in which the encryption was realised at the physical level, i.e., the encrypting transformations were applied to the wave signal instead to the symbolic sequence. Further, Li et al. (2004) pointed out the weaknesses of the Yi-Tan-Siew (2002) chaotic cipher and reported differential chosen-plaintext and differential chosen-ciphertext attacks to break the sub keys under the assumption that the time stamp can be altered by the attacker. Huang and Guan (2005) proposed a chaotic cryptosystem in which one of its secret keys was generated by a chaotic map. Wong et al. (2005) proposed a new cryptographic scheme which was improved version of their previous cryptographic scheme (Wong, 2002). Further, Lian et al. (2005) suggested a block cipher based on the chaotic standard map, which contains three parts – confusion process based on chaotic standard map, a diffusion function and a key generator. Later, Pareek et al. (2005) developed a chaotic block cipher in which multiple one dimensional chaotic maps and external secret were used. Wei et al. (2006) developed a new chaotic cryptosystem in which instead of mixing the chaotic signal, a noise-like variable was utilised to govern the encryption and decryption processes. Further, Xiang et al. (2006) proposed a block cryptographic scheme based on iterating a chaotic map, in which, random binary sequences were generated from the real-valued chaotic map, plaintext blocks were permuted by a key-dependent shift approach and encryption was carried out by the classical masking technique. Chen et al. (2006) criticised the cryptosystem proposed by Masuda and Aihara (2002) and implemented the chosen plaintext attack successfully. Further, a block encryption algorithm, called CFCEA, was suggested by Peng et al. (2006) by combining the one dimensional discrete chaotic map and Feistel network. Álvarez and Li (2006) pointed out several weaknesses of a cryptographic algorithm developed by Machado et al. (2004) and showed that the security was trivially compromised for practical implementations of the cryptosystem with finite computing precision and for the use of the iteration number as the secret key. Xiang et al. (2007) developed a chaotic cryptosystem in which two-dimensional chaotic map was employed. Recently, Li et al. (2008) analysed the security of the chaotic cryptosystem suggested by Pareek et al. (2005) and proposed its improved version. Xiang et al. (2008) developed a new cryptosystem with external key by extending the concept of Pareek et al. (2005). In this paper, we present a new block cipher, in which 1D and 2D chaotic maps and an external secret key are used. In the proposed chaotic cipher, the confusion process is achieved with the help of chain block ciphering (CBC) technique whereas for the diffusion process, dynamic permutation boxes are used. Rest of the paper is organised as
Block cipher using 1D and 2D chaotic maps
247
follows: in Section 2, we discuss in brief, the dynamics of the Henon and logistic maps, which we have used to develop the proposed chaotic block cipher. In Section 3, we describe the whole process of encryption as well as decryption. We discuss the statistical results obtained by performing the security analysis on the proposed cipher in Section 4. Finally, Section 5 concludes the paper.
2
Dynamics of chaotic maps
2.1 Henon map The Henon map is a 2D invertible iterated map proposed by the French astronomer Michel Henon (Henon, 1976) and is expressed as: X n +1 = 1 + Yn − α X n2 , Yn +1 = β X n ,
(1)
where α and β are control parameters and (Xn, Yn) are the state variables. The Henon map has been studied in detail by the researchers for the control parameter values α = 1.4 and β = 0.3, where it shows the chaotic solution. Two fundamental characteristics of chaotic systems such as sensitive dependence on the initial conditions and ergodicity can be illustrated very well by the Henon map. In the Figure 1(a), we have shown the attractor of the Henon map in X-Y space for α = 1.4 and β = 0.3 for the first 20,000 points starting at the initial conditions (0.1, 0.3) while fine structure of the attractor is shown in the Figure 1(b) for the first 1,000 points. We have also shown the temporal behaviour of the Henon map in X direction for two different set of initial conditions, which explains its sensitivity on initial conditions [Figure 1(c)] as well as its bifurcation diagram [Figure 1(d)]. In Figure 1(d), several iterates of X variable as a function of the control parameter α have been plotted, which clearly shows the period doubling route to chaos in Henon map. Figure 1
Dynamics of the Henon map: Figure (a) and (b) show the Henon map attractor in chaotic region for first 20,000 and 1,000 points, respectively. Figure (c) shows the temporal behaviour of the map in X direction for two different sets of initial conditions (0.1, 0.3) and (0.101, 0.3). The bifurcation diagram showing period doubling route to chaos is shown in Figure (d)
(a)
(b)
248
N.K. Pareek et al.
Figure 1
Dynamics of the Henon map: Figure (a) and (b) show the Henon map attractor in chaotic region for first 20,000 and 1,000 points, respectively. Figure (c) shows the temporal behaviour of the map in X direction for two different sets of initial conditions (0.1, 0.3) and (0.101, 0.3). The bifurcation diagram showing period doubling route to chaos is shown in Figure (d) (continued)
(c)
(d)
2.2 Logistic map Logistic map is the simplest example of a discrete chaotic dynamical system that exhibits chaotic behaviour and express as: X n +1 = λ X n (1 − X n ),
(2)
where Xn and λ are the initial condition and control parameter, respectively. In Figures 2(a) and 2(b), we have depicted the chaotic solution of the equation (2), which shows sensitivity on initial condition as well as on control parameter. It has also been shown that equation (2) shows period doubling route to chaos in the control parameter (λ) from 1 to 4 [see Figure 2(c)]. In the next section, we discuss the process of encryption and decryption of proposed cryptosystem in detail. Figure 2
Dynamics of the logistic map: Figure (a) shows the sensitivity of chaotic solution (Xn) on initial condition (X0) and Figure (b) shows sensitivity of chaotic solution (Xn) on system parameter (λ). The bifurcation diagram showing the period doubling route to chaos is shown in Figure (c)
(a)
(b)
Block cipher using 1D and 2D chaotic maps Figure 2
249
Dynamics of the logistic map: Figure (a) shows the sensitivity of chaotic solution (Xn) on initial condition (X0) and Figure (b) shows sensitivity of chaotic solution (Xn) on system parameter (λ). The bifurcation diagram showing the period doubling route to chaos is shown in Figure (c) (continued)
(c)
3
Proposed cryptosystem
The proposed cryptographic algorithm is a chaotic block cipher which uses an external secret key of a fixed size of 128 bits and each plaintext/ciphertext block of variable size (64 bits/128 bits) depends on the composition of external secret key. In the algorithm, we use logistic as well as Henon maps for encryption/decryption process and the control parameters values for both chaotic maps are kept fixed in the chaotic region throughout the algorithm. During encryption/decryption process, we also mix the dynamics of the logistic map with the dynamics of the Henon map. The orbit generated by the logistic map, which depend on the secret key used in the algorithm, is fed to the Henon map. The Henon map in the proposed algorithm is used to build dynamic permutation boxes. In this algorithm, both confusion and diffusion processes are used to encrypt the plaintext block. The confusion is achieved with the help of chain block ciphering (CBC) technique in which the property of plaintext block, to be encrypted, is mixed with the next adjacent plaintext block and further, the bits of the resultant block are mixed within the block itself. In the diffusion process, the position of bits of resultant block, received after the confusion process, are changed within the block by using the permutation boxes. The diffusion process is repeated for several times, which also depends on the external secret key used in the algorithm. In the following subsections, we discuss how to compute the different parameters and the procedure used for the encryption/decryption process.
250
N.K. Pareek et al.
3.1 Secret key The proposed algorithm uses a secret key of 128 bits size. Such a secret key is fairly long and is inconvenient to use directly for the encryption process. Therefore, it is divided into group of 8 bits named as session keys.
k = h1h2 h3 h4 … h32 ,
(3)
K = K1 K 2 K 3 … K16 ,
(4)
where h1, h2…h32 are the hexadecimal symbols and K1, K2…K16 are the session keys. The pair of two adjacent hexadecimal symbols forms a session key. For example, K1 and K2 are formed from h1h2 and h3h4, respectively.
3.2 Plaintext block size In the proposed algorithm, each plaintext block either 64 bits or 128 bits depend on the composition of the secret key used in the algorithm. P = P1 P2 P3 … PN ,
(5)
C = C1C2 C3 … C N ,
(6)
where PN and CN are block units of either 64 or 128 bits. The size of the plaintext block is determined as follow: xi = hi 0 otherwise
where j = 1,2,…32. If j value is over 32, re-initialise it to 1.
(9)
Block cipher using 1D and 2D chaotic maps
251
3.4 Initial condition and iterations for chaotic maps In the proposed algorithm, initial condition and number of iterations for the logistic map also depend on the secret key used in the algorithm. To calculate initial condition, we first choose all even numbered session keys (Ki) and find the HPN corresponding to each of them. The HPN is the first prime number above the ASCII value of the session key (Ki). The initial condition (ICl) and number of iterations (T) for the logistic map are calculated from the following formula: ⎛ 16 ⎞ ICl = ⎜ ( K i HPN of Ki ) ⎟ mod1, ⎜ i = 2,4... ⎟ ⎝ ⎠
∑
(10)
15
T =(
∑ K ) mod128. i
(11)
i =1,3...
To bring the logistic map in chaotic regime, we iterate it T times with initial condition (ICl) and with control parameter λ = 3.99, where the logistic map exhibits chaotic behaviour. The final value of the orbit is stored in the variable ICl for further use. ICl = LT ( ICl ),
(12)
where L represent logistic map (equation 2). The control parameter for logistic map may also be made dependent on the secret key used in algorithm to increase the robustness; however, we use fixed value of the control parameter throughout the algorithm. We feed output of the logistic map as input for the Henon map to mix up the dynamics of both logistic and Henon map. The final orbit generated by the logistic map is chosen as initial condition (both X0 and Y0) for the Henon map. ICh = H 1 ( ICh ),
(13)
where H and ICh represent Henon map and initial condition for Henon map, respectively. We choose fixed value of the control parameters for the Henon map in chaotic regime throughout the encryption/decryption process.
3.5 Generating permutation boxes In the proposed algorithm, we build dynamic permutation boxes (P-boxes) with the help of Henon map to diffuse the bits of the plaintext blocks. To build a P-box of dimension NS × 8, say Pbox, fill all its cells with the natural numbers (P) starting from zero. While filling the cells of Pbox, those natural numbers (P) are ignored which meet to the condition P mod NS ≥ 8. The order of the cells of Pbox to fill them with the natural numbers is decided by the Henon map. We iterate the Henon map once by obtaining the initial condition as discussed in Subsection 3.4. The new orbit generated by the Henon map decides the cell address in the Pbox to be filled with the first natural number zero and is given as:
252
N.K. Pareek et al. Row = ⎢ X n *105 ⎥ mod NS , ⎣ ⎦ 5 Col = ⎢Yn *10 ⎥ mod 8. ⎣ ⎦
(14)
Again, iterate the Henon map one more time and find the address of the next cell with the help of equation (14). Fill this cell with the next natural number, i.e., one. This process is repeated till the entire cells of Pbox are filled with some integer number. During the process, if a cell of Pbox is already filled with some other natural number, ignore the step.
3.6 Encryption/decryption process In Subsections 3.1–3.5, we have discussed, how to compute the values of different parameters to be used during encryption/decryption process. In this section, we discuss the steps of encryption/decryption procedure. We recognise the plaintext and ciphertext block in the following form. Pn = p1 p2 p3 … pNS ,
(15)
Cn = c1c2 c3 … cNS ,
(16)
where pNS and cNS are symbols in plaintext and ciphertext block respectively. 1
We read the first block of the plaintext (P1), its size as discussed in Subsection 3.2.
2
To introduce the confusion process in the algorithm, we apply CBC mode. In CBC mode, the plaintext block is XORed with the initialisation vector (IV). Initially, the secret key is chosen as initialisation vector for the encryption of the first block of the plaintext. Ci = Pi ⊕ Ci −1 ,
(17)
where i = 1,2,…N and C0 = K. Further, the group of bits of the resultant block are mixed within itself to avoid differential attack. The group of bits of the first block is mixed as follow: c j = c j ⊕ c j −1 ,
(18)
where j = 1,2,…NS, cj is the jth symbol in the block and c0 = cNS. 3
The resultant block is made to pass through the diffusion process. For diffusion process, each bit of the resultant block, from left to right, is placed in a individual cell of a table of size NS × 8, say Dtable (dynamic table), row by row from top to bottom.
4
Iterate the logistic map [equation (12)] with initial condition (ICl) by R times (see Subsection 3.3) and update ICl to its latest status.
5
Generate a P-box of the dimension of NS × 8, say Pbox, with the help of Henon map as discussed in Subsection 3.5.
Block cipher using 1D and 2D chaotic maps 6
253
In this step, we diffuse the bits, stored in the Dtable, with the help of the P-box, created in Step 5 given below: Ntable[i ][ j ] = Dtable[ Pbox[i ][ j ] / NS ][ Pbox[i ][ j ]% NS ] ( for encryption),
(19)
Ntable[ Pbox[i ][ j ] / NS ][ Pbox[i ][ j ]% NS ] = Dtable[i][ j ] ( for decryption),
(20)
where i = 1,2…NS and j = 1,2…8. The Ntable is renamed as Dtable. The first round, to diffuse the bits of block is over. Further, iterate the logistic map with initial condition (ICl) once and feed its output as input for Henon map. Repeat the process from Step 5 till rounds (R) [obtained from equation (9)] are over. 7
Each row of the Dtable, from top to bottom, is converted into its equivalent ASCII symbols and is written in a file. For the encryption of the next plaintext block, the last encrypted block is chosen as an initialisation vector.
8
Read the next block of the plaintext and repeat the process from Step 2 until the plaintext is exhausted.
The decryption process is exactly similar to encryption process except for the Step 6, where during the decryption process, the equation (20) is used [instead of equation (19)] and the rounds (R) are performed in reverse order. In the next section, we present the results of the statistical analysis for measuring the security of the proposed algorithm.
4
Statistical analysis
An ideal cipher should resist against all kinds of known attacks such as cryptanalytic, statistical and brute-force attacks. In the following paragraph, we discuss the results of the statistical tests applied on the proposed algorithm to measure its security features to prove that the proposed chaotic cipher is secured against the most common attacks.
4.1 Correlation analysis Correlation analysis helps to determine the strength of the linear relationship between two variables. In other words, how strongly are these two variables correlated. The correlation coefficient (CR) between the plaintext sequence p1, p2, p3…pN and its corresponding ciphertext sequence c1, c2, c3…cN is calculated using the following relation: CR =
∑ ( p c ) − (∑ p )(∑ c ) , ( N ∑ p − (∑ p ) )( N ∑ c − (∑ c ) ) N
j j
2 j
j
j
2
j
2 j
j
2
(21)
where N is the total number of symbols in plaintext/ciphertext. We have calculated the correlation coefficient between the plaintext and its corresponding ciphertext for numerous sets with a variety of keys. The correlation coefficients between plaintext having 6,400 symbols and its corresponding ciphertext for four different secret keys are shown in the Table 1.
254
N.K. Pareek et al.
Table 1
The correlation coefficient (CR) between plaintext and its corresponding ciphertext for four different secret keys
Secret keys AB34F089CBE64125FEAC783561BAFE78 6790BF45DABEC89543211FFE78CAB893 0123456789ABCDEFFEDCBA9876543210 AB67F2B490AEEB74320FE8031DC428BA
CR (N = 6,400) .0011294 .0015387 .0004182 .0006816
The value of the CR falls between μ – 2σ and μ + 2σ, i.e., (–0.025, 0.025) [the range of good correlation coefficient values (Knuth, 1997) for perfect cryptographic algorithm] where
μ=
−1 1 N ( N − 3) and σ = . N −1 N −1 N +1
(22)
Since the correlation coefficients shown in the Table 1 are very small (CR ≈ 0), it indicates that the plaintext sequences and its corresponding ciphertext sequences are completely independent of each other.
4.2 Measure of complexity The randomness of a sequence may be estimated from its complexity. By complexity, we mean that the minimum number of bits required to represent the information contained in it. A direct measure of this is its compressibility (Ritter, 1991). The ratio of the size of the original ciphertext to that of the compressed text is a measure of the complexity or randomness of the ciphertext. Compression ratio =
Size of the original data − Size of its compressed data ×100. (23) Size of the original data
The higher the compression ratio, lesser is the complexity. We have used the Linux version of gzip software with maximum compression option (gzip-9 filename) to compress the encrypted files. This is GNU lossless data compression package. In all the test cases, the compression ratio of the encrypted file has been observed to be less than one. This indicates that the complexity measure of the ciphertext sequences is same as the complexity of the embedding finite space and is its theoretical maximum.
4.3 Histogram analysis For a good cryptosystem, no pattern should appear in the ciphertext as well as the ciphertext symbols should be distributed uniformly in the entire range of the ASCII values (Pareek et al., 2003). The cryptanalysts use the histograms to observe the uniformity of ciphertext and therefore to pinpoint the loopholes in the encryption algorithms. In Figure 3(a), we have shown the ASCII value distribution of all-zero plaintext sequence having 4,200 symbols (i.e., all the symbols in the plaintext are ‘0’) which is a collection of points in the form of a straight line. We have shown in Figure 3(b), the ASCII value distribution of the ciphertext corresponding to the all-zero plaintext sequence shown in Figure 3(a) using the secret key ‘AB67F2B490AEEB74320FE 8031DC428BA’. The histogram of the ciphertext has been shown in Figure 3(c). The histogram shows the frequency of each symbol in ciphertext. We can observe from the
Block cipher using 1D and 2D chaotic maps
255
histogram that every symbol corresponding to each ASCII value in [0,255] is occurring in the ciphertext with an average frequency of about 16. Similarly, in Figure 3(d), we have shown the ASCII value distribution of a plaintext sequences consisting of 4,200 random ASCII symbols. In this randomly chosen plaintext, most of the characters are alphabets, so the distribution is dense in the interval [33, 122]. We have also shown the ASCII value distribution of its corresponding ciphertext using the secret key ‘AB67F2B490 AEEB74320FE8031DC428BA’ in Figure 3(e). We observe that the ciphertext distribution is almost uniform in the complete range of ASCII values [0,255]. The histogram of the ciphertext has been shown in Figure 3(f). In this case, we also observe that every symbol corresponding to each ASCII value in [0,255] occurs in the ciphertext with an average frequency of about 16. It is clear from Figure 3 that for both plaintexts, which have long string of symbols, the corresponding ciphertexts are uniformly distributed in the entire range of ASCII values [0,255] with an average frequency of about 16. Hence, the proposed cryptosystem produces flat ciphertext with no visible pattern, irrespective of the composition of the plaintext as well as that of the secret key. Figure 3
We show in Figure (a) the ASCII value distribution of all zero plaintext corresponding to 4,200 symbols, in Figure (b) the ASCII value distribution of ciphertext corresponding to all-zero plaintext (shown in Figure (a)) using the secret key ‘AB67F2B490AEEB74320FE8031DC428BA’ and in Figure (c) the histogram of the ciphertext (shown in Figure (b)). In Figure (d) the ASCII value distribution of a random plaintext corresponding to 4200 symbols, in Figure (e) the ASCII value distribution of ciphertext corresponding to the random plaintext (shown in Figure (d)) using the secret key ‘AB67F2B490AEEB74320FE8031DC428BA’ and in Figure (f) the histogram of the ciphertext shown in Figure (e)
(a)
250
(b)
52
200
ASCII Value
ASCII Value
50
48
46
150
100
50 44
0 0
1000
2000
3000
4000
5000
0
1000
Symbol Number
2000
3000
4000
Symbol Number
(a)
(b)
(C)
120
(d)
20 100
ASCII Value
Frequency
15
10
80
60
5 40
0
0
50
100
150
ASCII Value
(c)
200
250
20
0
1000
2000
Symbol Number
(d)
3000
4000
256
N.K. Pareek et al.
Figure 3
250
We show in Figure (a) the ASCII value distribution of all zero plaintext corresponding to 4,200 symbols, in Figure (b) the ASCII value distribution of ciphertext corresponding to all-zero plaintext (shown in Figure (a)) using the secret key ‘AB67F2B490AEEB74320FE8031DC428BA’ and in Figure (c) the histogram of the ciphertext (shown in Figure (b)). In Figure (d) the ASCII value distribution of a random plaintext corresponding to 4200 symbols, in Figure (e) the ASCII value distribution of ciphertext corresponding to the random plaintext (shown in Figure (d)) using the secret key ‘AB67F2B490AEEB74320FE8031DC428BA’ and in Figure (f) the histogram of the ciphertext shown in Figure (e) (continued) (e)
(f) 20
15
150
Frequency
ASCII Value
200
100
50
10
5
0 0
1000
2000
3000
0
4000
0
50
100
150
200
250
ASCII Value
Symbol Number
(e)
(f)
Figure 4 We show in Figure (a) ASCII values of two ciphertexts corresponding to two slightly different plaintexts ‘Chaotic cryptography’ and ‘Qhaotic cryptography’ obtained from the key ‘AB67F2B490AEEB74320FE8031DC428BA’. In Figure (b), the ASCII values of two ciphertexts corresponding to single plaintext ‘Chaotic cryptography’ obtained from two slightly different keys ‘AB67F2B490AEEB74320FE8031DC428BA’ and ‘AA67F2B490AEEB74320FE8031DC428BA’ are shown 250
ASCII Value
200
150
100
50
(a ) 0
0
2
4
6
8
10
12
14
16
18
12
14
16
18
S y m b o l N u m b er
(a) 250
ASCII Value
200
150
100
50
(b ) 0
0
2
4
6
8
10
S y m b o l N u m b er
(b)
Block cipher using 1D and 2D chaotic maps
257
4.4 Key and plaintext sensitivity An ideal cipher should be sensitive with respect to secret key, i.e., change of a single bit in key should produce a completely different ciphertext. In Figure 4(a), we have shown ASCII values of two ciphertexts corresponding to two slightly different plaintexts ‘Chaotic cryptography’ and ‘Qhaotic cryptography’ using the key ‘AB67F2B490AEEB7 4320FE8031DC428BA’. We observe that both ciphertexts obtained from the same key, are completely different and showing thereby sensitivity of the cryptosystem to the plaintext. An ideal cipher should also be sensitive with respect to plaintext, i.e., changing of a single bit of plaintext, it should produce a completely different ciphertext. In Figure 4(b), we have shown ASCII values of two ciphertexts corresponding to a single plaintext ‘Chaotic cryptography’ using two slightly different secret keys ‘AB67F2B490AEEB74320 FE8031DC428BA’ and ‘AA67F2B490AEEB74320FE8031DC428BA’. We observe that both ciphertexts, which correspond to the same plaintext and obtained by using slightly different secret keys, are completely different and showing thereby sensitivity of the cryptosystem to the secret key.
4.5 Encryption/decryption time Apart from the security consideration, running speed of the algorithm is also an important aspect for a good chaotic cipher. We have measured the time taken of several sizes text on personal computer with Intel core 2 duo 1.8 Ghz processor and 1.5 GB RAM. The average computational time required for 10 KB, 50 KB, 100 KB and 1 MB file size are 0.66 sec, 3.41 sec, 6.81 sec and 67.95 sec, respectively.
5
Conclusions
In this paper, a new chaotic block cipher has been proposed and its security analysed. The proposed algorithm posses all the features needed for robust and secure system like – sensitive with respect to plaintext, avalanche effect, non-appearance pattern in ciphertext, ciphertext size is same as plaintext size, variable sized plaintext/ciphertext blocks, variable rounds for each block, mixed operators and key dependent permutation boxes. The features of the new chaotic cryptosystem are also computational complexity and high security. Encryption results are sensitive to a tiny change in the plaintext as well as external secret key used in algorithm. In the proposed algorithm, we have used dynamic permutation boxes, generated by the Henon map and external secret key, for diffusion of the bits of the plaintext/ciphertext block received after the confusion process. The use of the key dependent dynamic permutation boxes in the cipher increases the security and robustness. The number of round as well as dynamic permutation box for each plaintext/ciphertext block is different. Simulation results show that the proposed cryptosystem produces flat ciphertext with no visible pattern, irrespective of the composition of plaintext as well as of the secret key. On encrypting the same random plaintext sequences with a number of slightly different keys, we observe that correlation coefficients fall in the range of good correlation coefficient as needed for a perfect cryptographic algorithm. This indicates that ciphertext sequences are completely independent of the plaintext sequences. Time taken by the proposed cipher for
258
N.K. Pareek et al.
encryption/decryption process depends on the composition of the external secret key. Finally, we conclude with the remark that the proposed scheme is expected to be more useful for secure communication of files over internet or any public network.
References Álvarez, G., Montoya, F., Romera, M. and Pastor, G. (2003) ‘Cryptanalysis of an ergodic chaotic cipher’, Physics Letters A, Vol. 311, Nos. 2–3. Álvarez, G., Montoya, F., Romera, M. and Pastor, G. (2004a) ‘Cryptanalysis of dynamic look-up table based chaotic cryptosystems’, Physics Letters A, Vol. 326, Nos. 3–4. Álvarez, G., Montoya, F., Romera, M. and Pastor, G. (2004b) ‘Keystream cryptanalysis of a chaotic cryptographic method’, Computer Physics Communications, Vol. 156, No. 2. Álvarez, G. and Li, S. (2006) ‘Breaking an encryption scheme based on chaotic baker map’, Physics Letters A, Vol. 352, Nos. 1–2. Chen, Y., Liao, X. and Wong, K.W. (2006) ‘Chosen plaintext attack on a cryptosystem with discretized skew tent map’, IEEE Transactions on Circuits and Systems – II, Vol. 53, No. 7. Henon, M.A. (1976) ‘Two-dimensional mapping with a strange attractor’, Communications in Mathematical Physics, Vol. 50. Huang, F. and Guan, Z.H. (2005) ‘Cryptosystem using chaotic keys’, Chaos Solitons and Fractals, Vol. 23, No. 3. Knuth, D.E. (1997) The Art of Computer Programming – Seminumerical Algorithms, AddisonWesley. Li, C., Li, S., Alvarez, G., Chen, G. and Lo, K.T. (2008) ‘Cryptanalysis of a chaotic block cipher with external key and its improved version’, Chaos Solitons and Fractala, Vol. 37, No. 1. Li, S., Mou, X., Cai, Y., Ji, Z. and Zhang, J. (2003) ‘On the security of a chaotic encryption scheme: problems with computerized chaos in finite computing precision’, Computer Physics Communications, Vol. 153, No. 1. Li, S., Chen, G. and Mou, X. (2004) ‘On the security of the Yi-Tan-Siew chaotic cipher’, IEEE Transactions on Circuits and Systems – II, Vol. 51, No. 12. Lian, S., Sun, J. and Wang, Z. (2005) ‘A block cipher based on a suitable use of the chaotic standard map’, Chaos Solitons and Fractals, Vol. 26, No. 1. Machado, R.F., Baptista, M.S. and Grebogi, C. (2004) ‘Cryptography with chaos at the physical level’, Chaos Solitons and Fractals, Vol. 21, No. 5. Masuda, N. and Aihara, K. (2002) ‘Cryptosystems with discretized chaotic maps’, IEEE Transactions on Circuits and Systems – I, Vol. 49, No. 1. Pareek, N.K., Patidar, V. and Sud, K.K. (2003) ‘Discrete chaotic cryptography using external key’, Physics Letters A, Vol. 309. Pareek, N.K., Patidar, V. and Sud, K.K. (2005) ‘Cryptography using multiple one-dimensional chaotic maps’, Communication in Nonlinear Science and Numerical Simulation, Vol. 10, No. 7. Peng, J., Liao, X.F., Eiji, O., Zhang, W. and Li, X.M. (2006) ‘Block encryption algorithm combined with the discrete chaotic map and feistel network’, Journal of Electronics and Information Technology, Vol. 28, No. 4. Ritter, T. (1991) ‘The efficient generation of cryptographic confusion sequences’, Cryptologia, Vol. 15, No. 2. Wei, J., Liao, X., Wong, K.W. and Xiang, T. (2006) ‘A new chaotic cryptosystem’, Chaos Solitons and Fractals, Vol. 30, No. 5. Wong, W.K., Lee, L.P. and Wong, K.W. (2001) ‘A modified chaotic cryptographic scheme’, Computer Physics Communication, Vol. 138, No. 3.
Block cipher using 1D and 2D chaotic maps
259
Wong, K.W. (2002) ‘A fast chaotic cryptographic scheme with dynamic look-up table’, Physics Letter A, Vol. 298, No. 4. Wong, K.W. (2003) ‘A combined chaotic cryptographic and hashing scheme’, Physics Letter A, Vol. 307, Nos. 5–6. Wong, K.W., Ho, S.W. and Yung, C.K. (2003) ‘A chaotic cryptography scheme for generating short cipher text’, Physics Letters A, Vol. 310, No. 1. Wong, K.W., Man, K.P., Li, S. and Liao, X. (2005) ‘A more secure chaotic cryptographic scheme based on the dynamic look-up table’, Circuits Systems and Signal Processing, Vol. 24, No. 5. Xiang, T., Liao, X., Tang, G., Chen, Y. and Wong, K.W. (2006) ‘A novel block cryptosystem based on iterating a chaotic map’, Physics Letters A, Vol. 349, Nos. 1–4. Xiang, T., Wong, K.W. and Liao, X. (2007) ‘A novel symmetrical cryptosystem based on discretized two-dimensional chaotic map’, Physics Letters A, Vol. 363, No. 4. Xiang, T., Wong, K.W. and Liao, X. (2008) ‘An improved chaotic cryptosystem with external key’, Communications in Nonlinear Science and Numerical Simulation, Vol. 13, No. 9. Yi-Tan-Siew (2002) ‘Yi-Tan-Siew chaotic cipher’, IEEE Transactions on Circuits and Systems – I, Vol. 49, No. 12. Zhou, H., Ling, X.T. and Yu, J. (1997) ‘Secure communication via one-dimensional chaotic inverse systems’, Proceedings of IEEE International Symposium on Circuits and Systems 2.