#### Abstract

We present a novel image encryption algorithm using Chebyshev polynomial based on permutation and substitution and Duffing map based on substitution. Comprehensive security analysis has been performed on the designed scheme using key space analysis, visual testing, histogram analysis, information entropy calculation, correlation coefficient analysis, differential analysis, key sensitivity test, and speed test. The study demonstrates that the proposed image encryption algorithm shows advantages of more than key space and desirable level of security based on the good statistical results and theoretical arguments.

#### 1. Introduction

In recent years, the dynamical chaotic systems have been commonly used for the design of cryptographic primitives featuring chaotic behaviour and random-like properties. In his seminal work [1], Shannon pointed out the excellent possibilities of the dynamical chaotic maps in the communications. He identified two basic properties that the good data encryption systems should have to prevent (resist) statistical attacks: diffusion and confusion. Diffusion can propagate the change over the whole encrypted data, and confusion can hide the relationship between the original data and the encrypted data. Permutation, which rearranges objects, is the simplest method of diffusion, and substitution, that replaces an object with another one, is the simplest type of confusion. The consistent use of dynamical chaotic system based permutation and substitution methods is in the deep cryptographic fundamental.

The authors of [2] used Chebyshev polynomial to construct secure El Gamal-like and RSA-like algorithms. A new more practical and secure Diffie-Hellman key agreement protocol based on Chebyshev polynomial is presented in [3]. In [4], a stream cipher constructed by Duffing map based message-embedded scheme is proposed. By mixing the Lorenz attractor and Duffing map, a new six-dimensional chaotic cryptographic algorithm with good complex structure is designed [5]. In [6], an improved stochastic middle multibits quantification algorithm based on Chebyshev polynomial is proposed. Three-party key agreement protocols using the enhanced Chebyshev polynomial are proposed in [7, 8].

Fridrich [9] describes how to adapt Baker map, Cat map, and Standard map on a torus or on a rectangle for the purpose of substitution-permutation image encryption. In [10], a new permutation-substitution image encryption scheme using logistic, tent maps, and Tompkins-Paige algorithm is proposed. In [11], chaotic cipher is proposed to encrypt color images through position permutation part and Logistic map based on substitution. Yau et al. [12] proposed an image encryption scheme based on Sprott chaotic circuit. In [13], Fu et al. proposed a digital image encryption method by using Chirikov standard map based permutation and Chebyshev polynomial based diffusion operations.

In [14], a bit-level permutation scheme using chaotic sequence sorting has been proposed for image encryption. The operations are completed by Chebyshev polynomial and Arnold Cat map. An image encryption algorithm in which the key stream is generated by Chebyshev function is presented in [15]. Simulation results are given to confirm the necessary level of security. In [16], a new image encryption scheme, based on Chebyshev polynomial, Sin map, Cubic map, and 2D coupled map lattice, is proposed. The experimental results show the security of the algorithm.

In [17], a color image encryption scheme based on skew tent map and hyper chaotic system of 6th-order CNN is presented. An image encryption scheme based on rotation matrix bit-level permutation and block diffusion is proposed in [18].

A new chaos based image encryption scheme is suggested in this paper. The algorithm is a simple improvement of one round substitution-permutation model. The encryption process is divided in two major parts: Chebyshev polynomial based on permutation and substitution and Duffing map based on substitution. In Section 2, we propose two pseudorandom bit generators (PRBGs): one based on Chebyshev polynomial and the other based on Duffing map. In Section 3, in order to measure randomness of the bit sequence generated by the two pseudorandom schemes, we use NIST, DIEHARD, and ENT statistical packages. Section 4 presents the proposed image encryption algorithm, and some security cryptanalysis is given. Finally, the last section concludes the paper.

#### 2. Proposed Pseudorandom Bit Generators

##### 2.1. Pseudorandom Bit Generator Based on the Chebyshev Polynomial

In this section, the real numbers of two Chebyshev polynomials [2, 19] are preprocessed and combined with a simple threshold function to a binary pseudorandom sequence.

The proposed pseudorandom bit generator is based on two Chebyshev polynomials, as described by where and are control parameters. The initial values and and parameters are used as the key.

*Step 1*. The initial values , , , and of the two Chebyshev polynomials from (1) are determined.

*Step 2*. The first and the second Chebyshev polynomials from (1) are iterated for and times to avoid the harmful effects of transitional procedures, respectively, where and are different constants.

*Step 3*. The iteration of (1) continues, and, as a result, two decimal fractions and are generated.

*Step 4*. These decimal fractions are preprocessed as follows:
where returns the absolute value of , returns the value of to the nearest integers less than or equal to , and returns the reminder after division.

*Step 5*. The following threshold function from (3) is applied:
and a pseudorandom bit is produced.

*Step 6*. Return to Step 3 until pseudorandom bit stream limit is reached.

##### 2.2. Pseudorandom Bit Generator Based on the Duffing Map

In this section, the real numbers of two Duffing maps are preprocessed and combined with a simple threshold function to a binary pseudorandom sequence.

The Duffing map is a 2D discrete dynamical system which takes a point in the plane and maps it to a new point. The proposed pseudorandom bit generator is based on two Duffing maps, given by the following equations: The maps depend on the two constants and . These are usually set to and to produce chaotic nature. The initial values , , , and are used as the key.

*Step 1*. The initial values , , , and of the two Duffing maps from (4) are determined.

*Step 2*. The first and the second Duffing maps from (4) are iterated for and times, respectively, to avoid the harmful effects of transitional procedures, where and are different constants.

*Step 3*. The iteration of (4) continues, and, as a result, two real fractions and are generated.

*Step 4*. The following threshold function from (5) is applied:
and a pseudorandom bit is produced.

*Step 5*. Return to Step* *3 until pseudorandom bit stream limit is reached.

#### 3. Statistical Test Analysis of the Proposed Pseudorandom Bit Generators

In order to measure randomness of the zero-one sequence generated by the new pseudorandom generators, we used NIST, DIEHARD, and ENT statistical packages.

The Chebyshev polynomial and the Duffing map based pseudorandom bit schemes are implemented by software simulation in C++ language, using the following initial seeds: , , , , , , , and , stated as a key K1.

##### 3.1. NIST Statistical Test Analysis

The NIST statistical test suite (version 2.1.1) is proposed by the National Institute of Standards and Technology [20]. The suite includes 15 tests, which focus on a variety of different types of nonrandomness that could exist in a sequence. These tests are frequency (monobit), block-frequency, cumulative sums, runs, longest run of ones, rank, fast Fourier transform (spectral), nonoverlapping templates, overlapping templates, Maurer’s “universal statistical,” approximate entropy, random excursions, random-excursion variant, and serial and linear complexity. The testing process consists of the following steps:(1)state the null hypothesis; assume that the binary sequence is random;(2)compute a sequence test statistic; testing is carried out at the bit level;(3)compute the -value; -value ;(4)fix , where ; compare the -value to ; is declared whenever -value ; otherwise, is declared.

Given the empirical results from a particular statistical test, the NIST suite computes the proportion of sequences that pass. The range of acceptable proportion is determined using the confidence interval defined as where and is the number of binary tested sequences. In our setup, . Thus the confidence interval is The proportion should lie above 0.9805607.

The distribution of -values is examined to ensure uniformity. The interval between 0 and 1 is divided into 10 subintervals. The -values that lie within each subinterval are counted. Uniformity may also be specified through an application of test and the determination of a -values corresponding to the goodness-of-fit distributional test on the -values obtained for an arbitrary statistical test, -values of the -values. This is implemented by calculating where is the number of -values in subinterval and is the sample size. A -values is calculated such that , where is the complemented incomplete gamma statistical function. If , then the sequences can be deemed to be uniformly distributed.

Using the proposed pseudorandom Using the proposed pseudorandom bit generators were generated 1000 sequences of 1000000 bits. The results from all statistical tests are given in Table 1.

The entire NIST test is passed successfully: all the -values from all 2 1000 sequences are distributed uniformly in the 10 subintervals and the pass rate is also in acceptable range. The minimum pass rate for each statistical test with the exception of the random excursion (variant) test is approximately 980 for a sample size of 1000 binary sequences for both of pseudorandom generators. The minimum pass rate for the random excursion (variant) test is approximately 589 for a sample size of 603 binary sequences for Chebyshev polynomial based PRBG and 604 for a sample size of 618 binary sequences for Duffing map based PRBG. This shows that the generated pseudorandom sequences feature reliable randomness.

Overall, the results confirm that the novel chaotic cryptographic schemes based on Chebyshev polynomial and Duffing map accomplish a very high level of randomness of the bit sequences.

##### 3.2. DIEHARD Statistical Test Analysis

The DIEHARD suite [21] consists of a number of different statistical tests: birthday spacings, overlapping 5-permutations, binary rank (31 × 31), binary rank (32 × 32), binary rank (6 × 8), bit stream, Overlapping Pairs Sparse Occupancy, Overlapping Quadruples Sparse Occupancy, DNA, stream count-the-ones, byte count-the-ones, 3D spheres, squeeze, overlapping sums, runs up, runs down, and craps. For the DIEHARD tests, we generated two files with 80 million bits each, from the proposed chaotic pseudorandom bit generators. The results are given in Table 2. All -values are in acceptable range of . The proposed pseudorandom bit generators passed all the tests of DIEHARD software.

##### 3.3. ENT Statistical Test Analysis

The ENT package [22] performs 6 tests (entropy, optimum compression, distribution, arithmetic mean value, Monte Carlo estimation, and serial correlation coefficient) to sequences of bytes stored in files and outputs the results of those tests. We tested output of the two strings of 125000000 bytes of the proposed Chebyshev polynomial based pseudorandom bit generator and Duffing map based pseudorandom bit generator, respectively. The results are summarized in Table 3. The proposed pseudorandom bit generators passed all the tests of ENT.

#### 4. Image Encryption Based on Chebyshev polynomial and Duffing Map

Here, we describe an image encryption scheme based on the proposed Chebyshev polynomial and Duffing map based pseudorandom bit generators. We also provide security analysis of the encrypted images.

##### 4.1. Encryption Scheme

The proposed image encryption algorithm is modification of the classical substitution-permutation scheme [9], column by column shuffling and masking procedures [23], and the diffusion-substitution model [24]. Here, every single pixel relocation is based on random permutation at once with substitution. The novel derivative scheme has the features of a two-round permutation-substitution color image encryption algorithm. The image encryption method is based on the unique combination of the output bits of the new proposed pseudorandom bit generators.

Without loss of generality, we assume that the dimension of the plain images is size, where is the number of rows and is the number of the columns. The binary lengths of and are and , respectively. The encryption process is divided into two stages. In the first stage, we generate buffer image of size by rearranging and modifying the pixel values of the plain image by Chebyshev polynomial based PRBG. In the second stage, we generate ciphered image of size by modifying the buffer pixel values by Duffing map based PRBG. The encryption process starts with empty buffer image. The plain image pixels are passed sequentially left to right and top to bottom. The entire encryption process is given below.

*Step 1*. The Chebyshev polynomial based PRBG is iterated continuously to produce and bits pseudorandom numbers and which are transformed modulo and , respectively.

*Step 2*. Repeat Step* *1 until an empty pixel with () coordinates in the buffer image is detected.

*Step 3*. Continue to do iteration of Chebyshev polynomial based PRBG until 24 bits are produced.

*Step 4*. To produce buffered image pixel , do XOR between a plain image pixel and the last generated 24 bits.

*Step 5*. Repeat Steps* *1–4 until all of the plain image pixels are processed.

*Step 6*. Iterate the Duffing map based PRBG to produce bits. Then, do XOR operation between the pseudorandom bit sequence and all of the buffer pixels in the buffered image to produce the encryption image .

For the reasons of security, we propose several overall rounds of the encryption procedure.

##### 4.2. Security Analysis

The novel image encryption algorithm is implemented in C++ language. All experimental results discussed in the next subsections have been taken by using one iteration of the scheme.

Sixteen 24-bit color images have been encrypted for the security tests. The images are selected from the USC-SIPI image database, miscellaneous volume, available and maintained by the University of Southern California Signal and Image Processing Institute (http://sipi.usc.edu/database/). The image numbers are from 4.1.01 to 4.1.08, size 256 256 pixels, from 4.2.01 to 4.2.07, size 512 512 pixels, and House, size 512 512 pixels. The chosen images are currently stored in TIFF format and we have converted them into BMP format (24 bits/pixel).

###### 4.2.1. Key Space Analysis

The key space is the set of all possible keys that can be used in encryption/decryption algorithm. The key of the proposed image encryption scheme is that it is produced by the combination of Chebyshev polynomial based PRBG and Duffing map based PRBG. The novel scheme has eight secret keys , , , , , , , and . According to the IEEE floating-point standard [25], the computational precision of the 64-bit double-precision number is about . If we assume the precision of , the secret key’s space is more than . This is large enough to defeat brute-force attacks [26] and it is larger than key space size of the image encryption algorithms proposed in [10, 27–29].

Moreover, the initial iteration numbers , , , and can also be used as a part of the secret key.

###### 4.2.2. Visual Testing

The new algorithm is tested using simple visual inspection of the plain images and corresponding encrypted images. The visual observation does not find convergences between every plain image and its encrypted versions. As an example, Figure 1 shows the plain image 4.2.05 Airplane (F-16), Figure 1(a), and its encrypted version, Figure 1(b). The encrypted image does not contain any constant regions in representative color or texture. The proposed chaos based image encryption breaks any visual data from the plain images.

**(a)**

**(b)**

###### 4.2.3. Histogram Analysis

An image histogram of pixels is a type of a bar graph. It illustrates the visual impact of a distribution of colors that are at certain intensity. We have calculated histograms of red, green, and blue channels of both plain images and their encrypted version by the new image encryption scheme. One representative example among them is shown in Figure 2. The histograms of encrypted image are completely uniformly distributed and considerably different from that of the plain image.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

In addition, the average pixel intensity calculations in Table 4, for all of the encrypted images, confirmed the uniformity in distribution of red, green, and blue channels.

###### 4.2.4. Information Entropy

The entropy is statistical measure of uncertainty in information theory [1]. It is defined as follows: where is a random variable and is the probability mass function of the occurrence of the symbol . Let us consider that there are 256 states of the information source in red, green, and blue colors of the image with the same probability. We can get the ideal , corresponding to a truly random source.

The information entropy of red, green, and blue channels of the plain images and their corresponding encrypted images are computed and displayed in Table 5. From the obtained values, it is clear that the entropies of red, green, and blue colors of the encrypted images are very close to the best possible theoretical value, which is an indication that the new chaos based image encryption scheme is trustworthy and secure upon information entropy attack.

###### 4.2.5. Correlation Coefficient Analysis

The adjacent pixels in plain images are strongly correlated in either horizontal, vertical, or diagonal direction. The correlation coefficient between two adjacent pixels is computed in accordance with the way described in [30]. Consider where is the total number of couples , obtained from the image, and , are the mean values of and , respectively. Correlation coefficient can range in the interval .

Table 6 shows the results of horizontal, vertical, and diagonal adjacent pixels correlation coefficients calculations of the plain images and the corresponding encrypted images. It is clear that the novel image encryption scheme does not retain any linear dependencies between observed pixels in all three directions: the inspected horizontal, vertical, and diagonal correlation coefficients of the encrypted images are very close to zero. Overall, the correlation coefficients of the proposed algorithm are similar to results of four other image encryption schemes [27–30].

###### 4.2.6. Differential Analysis

In the main, a typical property of an image encryption scheme is to be sensitive to minor alterations in the plain images. Differential analysis supposes that an enemy is efficient to create small changes in the plain image and inspect the encrypted image. The alteration level can be measured by means of two metrics, namely, the number of pixels change rate (NPCR) and the unified average changing intensity (UACI) [30, 31].

Suppose encrypted images before and after one pixel change in plain image are and . The NPCR and UACI are defined as follows: where is a two-dimensional array, having the same size as image or , and and are the width and height of the image. The array is defined by and ; if , then ; otherwise, . The NPCR and UACI test results from the proposed chaos based algorithm are shown in Table 7.

The obtained NPCR values for the images from 4.1.01 to 4.1.08 are larger than critical values , , and and, for the images from 4.2.01 to 4.2.07 and House image, are larger than critical values , , and [31].

The obtained UACI values for the images from 4.1.01 to 4.1.08 are in the intervals from to , from to , and from to . The obtained UACI values for the images from 4.2.01 to 4.2.07 and House image are in the intervals from to , from to , and from to [31].

The results from NPCR and UACI computations indicate that the new image encryption scheme is highly sensitive with respect to small changes in the plain images and has a strong ability of resisting differential cryptanalysis.

###### 4.2.7. Key Sensitivity Test

Another important component of correlation analysis is the key sensitivity test. A good image encryption algorithm should be sensitive with respect to the secret key, that is, a slight modification of the secret key. We encrypted the 16 images with three similar secret keys: K1, K2 (, , , , , , , and ), and K3 (, , , , , , , and ). The results are shown in Table 8. It is evident that the proposed image encryption is highly key sensitive: the calculated correlation coefficients are very close to 0.00.

Moreover, in Figure 3, the results of two tests are shown to decrypt the Figure 1(b), with the secret keys K2 and K3.

**(a)**

**(b)**

We observed that the two decrypted images (Figure 3(a) and Figure 3(b)) have no relation with the plain image 4.2.05, Figure 1(a).

###### 4.2.8. Speed Test

We have measured the encryption time for 256 256 and 512 512 sized images by using the novel image encryption algorithm. Speed analysis has been done on 2.8 GHz Pentium IV personal computer. In Table 9, we compared the speed of our method with [24, 32, 33]. The data show that the proposed image encryption scheme has a satisfactory speed.

#### 5. Conclusions

A novel image encryption algorithm based on dynamical chaotic systems is proposed in this paper. The developed encryption scheme combines Chebyshev polynomial based permutation and substitution and Duffing map based substitution. A precise security analysis on the novel encryption algorithm is given. Based on the experimental results of our computations, we conclude that the proposed chaos based image encryption technique is perfectly suitable for the practical image encryption.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This paper is supported by the Project BG051PO001-3.3.06-0003 “Building and steady development of PhD students, post-PhD and young scientists in the areas of the natural, technical and mathematical sciences.” The project is realized by the financial support of the Operative Program “Development of the human resources” of the European social fund of the European Union.