Abstract
A new image encryption and decryption algorithm based on chaotic map and dynatomic modular curve is proposed in this paper. Firstly, the definition of dynatomic modular curve and its periodic points are introduced, and a property of the dynatomic modular curve is proved. Secondly, the relationship between the Logistic map and the dynatomic modular curve is discussed. Finally, the encryption algorithm which is composed of permutation of pixels and substitution is given. In order to eliminate sufficiently the relation between adjacent pixels in the image, pixel values of the original image are sorted as index function, which derives from Logistic map and dynatomic modular curve. And XOR operation is performed between the scrambled pixel sequence and projective transformation sequence. Simulation experiments and nonparametric hypothesis test demonstrate that the proposed algorithm is secure to resist different types of attacks and it can be applied to real-time encryption.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resource(e.g., network, servers, storage, applications)that can be rapidly provisioned and released with minimal management effort or service provider interaction. Attracted by these appealing features, both individuals and enterprises are actively outsourcing their data to the cloud. But, outsourcing sensitive information (such as e-mails, personal health records, company finance data, government documents, and secret images etc.) to remote servers will bring privacy concerns. The general approach of preserving privacy data is to encrypt it before outsourcing [10]. From a security point of view, this process mainly contains two aspects. On the one hand, the inverted sort index of the file needs to be encrypted [5, 26]. On the other hand, the file to be uploaded needs to be encrypted [18, 19]. Some encryption algorithms have been proposed to solve the latter problem, such as AES and DES algorithm. But, comparing these conventional encryption algorithms, chaos-based ones have suggested more secure and fast encryption methods [15, 24].
The first chaos-based encryption algorithm was proposed in 1989 [12]. Since then more and more researchers have investigated and analyzed many kinds of chaos-based encryption algorithms. The improvement of encryption algorithm mainly includes security and computational cost. In terms of security, some researchers were working to eliminate sufficiently the relativity of adjacent pixel in images [8, 13, 17, 27, 29, 30]. In addition, other researchers were studying how to increase the size of the key space to ensure the security of the encryption algorithm [7, 20, 28]. Moreover, some people even put forward the method of keeping secret communication from the angle of pulse synchronization [2, 22, 23, 25]. In terms of computational cost, a real-time and fast encryption method was presented based on orthonormal matrices [3]. The algorithm not only considers the statistical attack, but also pays more attention to the speed of encryption. In [21], a two stage combinational approach for image encryption was proposed. This algorithm need only one password for both stages and it had a low computational complexity. The above mentioned schemes have made a great contribution to the security and computational cost. However, there are few algorithms which can simultaneously take into account the two aspects. In [28], an image encryption scheme was designed based on 2D hyper-chaotic system. They claimed that the algorithm had high security. However, the computational cost of using two-dimensional hyper chaotic system was relatively high. If 1-D chaotic system be used in this algorithm, the speed of operation would be improved. But, the security could not be guaranteed. Moreover, the encryption scheme based on chaotic hiding and modulation of 1-D chaotic systems was decrypted by multi-step nonlinear prediction method. So, it is a great challenge to design a low dimensional chaotic encryption scheme with security and low computational cost. Fortunately, some people started to study this problem. In [14], the author proposed a new image encryption algorithm based on parameter-varied Logistic map. This method could resist the attack of phase space reconstruction, and it has a low computational complexity. However, the difference between some data which derived from Logistic map would be very small for different parameters. It may cause a larger calculation error and reduce the security of the algorithm. In order to make up for these deficiencies and expand the scope of the data, this paper proposes a new image encryption scheme based on Logistic map and dynatomic modular curve (DMC). In stage of diffusion, the original pixel values are sorted as index function which derives from the logistical map and the DMC. In stage of confusion, the XOR operation between the scrambled pixel sequence and projective transformation sequence is performed. The simulation experiments show that the proposed algorithm has a low computational complexity, and sensitivity to the key, and it has a good property of resistance statistical attack, differential attack, and malicious attack.
The advantages of the proposed scheme are summarized as follows:
-
(1)
The DMC is the first time to apply in image encryption. Not only it can help us improve the calculation precision by increasing infinity point and infinity line, but also can expand the scope of chaotic data.
-
(2)
The relationship between the Logistic map and the DMC is discussed, and it is used to encrypt and decrypt image.
-
(3)
Chi-square and Kolmogorov-Smirnov test are applied to verify the distribution of the encrypted image pixels and correlation coefficients in performance analysis. They can help us test the security of the encryption algorithm from the view of statistical analysis.
-
(4)
The key space is extended by introducing the adjustment parameter and amplification parameter.
The rest of this paper is organized as follows. In section 2, in order to find the relationship between the Logistic map and the DMC, the definition of the DMC and the type of period are introduced, and a property of the DMC is proved. In section 3, the relationship between the Logistic map and the DMC is discussed, and its role in image encryption is summarized. In section 4, image encryption and decryption algorithm based on the Logistic map and the DMC are given. In section 5, some images which selected from the USC-SIPI image database are used to test effectiveness of the proposed algorithm. And the Chi-square test is used to verify the histogram distribution of the encrypted image pixels. Performance analysis of the proposed algorithm is described in section 6. It includes statistical analysis, adjacent pixels correlation analysis and simulation, NPCR and UACI calculation and simulation, key sensitivity test, information entropy calculation and algorithm intensity analysis. In this section, the distribution of correlation coefficient of encrypted image is verified by K-S test, and the experimental results are compared with other algorithms from correlation coefficient, key sensitivity and computational complexity. Section 7 summaries the main innovative points of the proposed algorithm and lists some research problems in the future.
2 Dynatomic modular curve
Firstly, we introduce the definition of dynatomic polynomial and its periodic point in projective space. And then, the conception of the DMC is put forward. Finally, a property theorem of the DMC is proved.
Definition 1
[22] \( {\Phi}_n^{\ast }(z) \) is called the n -th dynatomic polynomial and is given by the following formula,
Here μ is the Mobius function. μ is defined byμ(1) = 1and
ϕ k(z)is the k -th iteration of ϕ. If we let ϕ(z) ∈ K[z] be a polynomial, where K[z] is a polynomial set on perfect field K. And consider that
Some expressions of \( {\Phi}_n^{\ast }(z) \) can be obtained,
Similarly, other expressions of \( {\Phi}_n^{\ast }(z) \) (n = 4 , 5 , ⋯) can be obtained. Let Φ n (P) = ϕ n(P) − P, we can make the following definition.
Definition 2
Let ϕ(z) ∈ K[z] be a rational map and let P∈ ℙ1 be a periodic point for ϕ, where P 1 represents 1-dimensional projective space.
-
(1)
P has period n if Φ n (P) = 0.
-
(2)
P has formal period n if \( {\Phi}_n^{\ast }(P)=0 \).
-
(3)
P has primitive (or exact) period n if Φ n (P) = 0 and Φ m (P) ≠ 0 for all m < n.
We set the notation
Thus, Per n (ϕ) is the set of points of period n, \( {\mathrm{Per}}_n^{\ast}\left(\phi \right) \) is the set of points of formal period n, and \( {\mathrm{Per}}_n^{\ast \ast}\left(\phi \right) \) is the set of points of primitive (or exact) period n. This definition will be used to prove proposition theorm1. Beyond that, we also need the definition of the DMC.
Replacing c with y in Eq. (1), (2), (3) and so on, we can obtain affine curve in affine space. That is,
Definition 3
The dynatomic modular curve Y 1(n)⊂A 2 is the affine curve defined by the equation
The normalization of the projective closure of Y 1(n) is denoted by X 1(n).Where A 2 represents 2-dimensional affine space.
Indeed, Y 1(n) is a curve in affine space, which satisfies the equation Φ1 ∗(y, z) = 0. (y, z) represents the coordinates of the curve Y 1(n). When (y, z) is replaced by homogeneous coordinates \( \left(\frac{y}{w},\frac{y}{w}\right) \), we can get projective curve X 1(n) in projective space (w is a constant). That is,
X 1(n) is a curve in projective space, and there is a close correspondence between X 1(n) and Y 1(n). Such as, affine curve Y 1(1) satisfies Φ1 ∗(y, z) = 0, that is, −z 2 − z + y = 0. And, projective curve X 1(1) satisfies Φ1 ∗(y, z, w) = 0, that is, z 2 + zw − yw = 0. Similarly, the affine curve Y 1(2) satisfies z 2 − z + (1 − y) = 0. And projective curve X 1(2) satisfies z 2 − zw − yw + w 2 = 0. In [21], the author has shown that X 1(1)and X 1(2) are rational curve. Indeed, X 1(3) is a rational curve too.
Proposition 1
Let dynatomic modular curve Y 1(3) satisfies Φ3 ∗(y, z) = 0. X 1(3) is the normalization of the projective closure of Y 1(n). So the X 1(3) is a rational curve.
Proof. In order to parameterize X 1(3), suppose that ϕ(z) = Az 2 − Bz + C is any quadratic polynomial with a periodic point of primitive period 3. Note that, as long as the field K does not have characteristic 2, the any quadratic polynomial ϕ(z) = Az 2 − Bz + C can be put into the form (−z 2 + c) as the following method. Let \( f(z)=\frac{B-2 z}{2 A} \), which results to \( {f}^{-1}(z)=\frac{B}{2}- Az \). Thus
Then, conjugating by a linear map z ↦ αz + β, we may assume that the given 3-cycle has the form 0 → 1 →t → 0for some t.This gives the equations
Solving for A, B, C in terms of t yields
Put A, B and C into the expressions of ϕ f(z) and f −1(z), we obtain
It shows that for every value of t ∉ {0, 1}, the point
is a solution to the equation
It also can be verified by using a computer. That is to say, \( {P}^{\ast}\in {\mathrm{Per}}_3^{\ast}\left(\phi \right) \) and it is formal period 3. We have thus constructed a nonconstant rational map
That is, rational map can be obtained for t ∉ {0, 1} from (5). Thus, X 1(3) is a rational curve.
Moreover, X 1(3) is birational to ℙ 1 based on Lüroth’s theorem [6]. For it, we can make further explanation. Assuming that (c, b) be a root of \( {\Phi}_3^{\ast } \), and set g(z) = (−b 2 + c − b)z + b. So, g sends 0 to b and 1 to ϕ(b). Then
and
It can be computed that ϕ g(0) = 1, ϕ g(1) = b 2 − b − c + 1 from (6), and
Since (c, b) is a root of \( {\Phi}_3^{\ast } \), that is to say \( {\Phi}_3^{\ast}\left( c, b\right)=0 \). Putting (c, b) into \( {\Phi}_3^{\ast } \), we may obtain
Thus we can get the 3-cycle for ϕ g, that is, 0 → 1 → b 2 − b − c + 1 → 0. Compared with the above 3-cycle, it gives the map
which is inverse to (5), this can also be checked directly with a computer yet. For example, let
When t = 0.35, the correspondence y = 5.3964 , z = 2.7083. At this time,z 2 − z − y + 1 = 0.35 = t.
Since (7) is the inverse mapping of (5), there is a one to one mapping between P 1 and X 1(3). This mapping can be used to encrypt and decrypt private data. This scheme has the following two advantages.
-
(a)
Increasing infinity point and infinity line can reduce effectively calculation error, and improve the calculation accuracy.
For example, let t 1 = 0.000012. When reserved four decimal places, it will produce larger rounding error by direct calculation in affine space. However, in projective space, we can let w = 0.00001. Then we can obtain t 1 ∗ = 1.2, which will reduce calculation error if we use this value to calculate.
-
(b)
It can help us expand or compress the scope of data by choosing an appropriate value of w.
For example, given arbitrarily t 2 ∈ (0, 1), we may choose w = 0.01, and it makes t 2∗ ∈ (0, 100). Similarly, if we choose w = 100, the scope of t will be compressed to (0, 0.01). This property can be used to adjust the scope of chaotic attractor according to the requirement of the problem.
However, due to the existence of periodic points, it is not enough to use the above properties to design the encryption algorithm. In order to get rid of periodic points, we must build the relationship between the Logistic map and the DMC.
3 The relationship between logistic map and dynatomic modular curve
In this section, the relationship between the Logistic map and the DMC is discussed. In addition, the periodic points are analyzed, in order to ensure the security of the proposed algorithm.
Now we see that the expression of ϕ(z) = − z 2 + c play an important role for dynatomic polynomial \( {\Phi}_n^{\ast }(z) \). It has close relationship for Logistic map.
Given some parameters and initial values, some sequences can be obtained from (8), which would be used in the next section. Equation (8) can be described by ψ(z) = a(z − z 2), and it can be transformed into the form −z 2 + c based on the process of proposition1. Such as, let \( h(z)=\frac{1}{2}+\frac{1}{2} \), thus \( {h}^{-1}(z)=-\frac{a}{2}+ az \).
Then
The expression of ψ h(z) is consistent with (4). Therefore, we can analyze Logistic map as the method in section 2. That is to say, when a and t satisfies the equation
we can obtain rational map (5) and (7). That is, Logistic map can be considered a special kind of the DMC based on Eq. (9).
Let a = 3.8355, then t = − 0.7356 from (9). It makes (1.76, 0.0238) is the solution to \( {\Phi}_3^{\ast}\left( y, z\right)=0 \). So, 0.0238 is the formal period 3 point of ψ. According to Li-Yorke theorm, ψ can produce chaos when a = 3.8355. Thus, the chaotic state of the Logistic map is verified from the perspective of the DMC. Since 0.0238 ∈ (0, 1), we should get rid of this periodic point in encryption algorithm. Therefore, for arbitrary parameters a ∈ [0, 4], we need remove the periodic point which belongs to (0, 1) to improve the security of the algorithm. But, when a = 4, there exists t = 2.8794, which makes (2, 1.5321) is the solution to the equation \( {\Phi}_3^{\ast}\left( y, z\right)=0 \). So, 1.5321 is also the formal period 3 point of ψ. Since 1.5321 ∉ (0, 1) in Logistic map, we can use sequences to encrypt the image directly, instead of eliminating it in advance. Anyhow, the processes of removing the periodic points need to be discussed in design of algorithm.
In order to obtain more secure encrypted image, not only we should get rid of those periodic points, but also ensure that sequence after transformation is far from them. Therefore, an adjustment coefficient b is introduced into the encryption algorithm.
4 Image encryption based on chaos and dynatomic modular curve
4.1 Image encryption flowchart
From Fig. 1, we can see that the proposed algorithm mainly adopts Logistic map, and the most important step is projective transform. After it, we can obtain two sequences. One is used to scramble the original image pixels and another is used to replace pixel values.
4.2 Encryption and decryption algorithm
According to the flowchart, the process of the proposed algorithm can be summarized as follows:
-
Step 1:
Set effective parameter and initial value, and one sequence T = {t 1, t 2, ⋯ , t N } can be generated from the Logistic map. N = m × k is the length of the sequence, where m is the number of rows of the image matrix and k is the number of columns of the image matrix.
-
Step 2:
Projective transform. Suppose t i ∈ T, i = 1 , 2 , ⋯ , N.Using the projective transform (5), t i is changed into (y i , z i ), y i forms a set Y. And another set \( Z=\left\{{z}_i^{\prime}\right\} \) can be obtained by the following function.
where b is called adjustment coefficient and p is called amplification parameter. z i (i = 1, 2, ⋯ , N) can be converted to some other elements which belong to [0, 255] by Eq. (10).
-
Step 3:
Image scrambling. Assume that the original image matrix X = {x ij |i = 1, 2, ⋯ , m; j = 1, 2, ⋯ , k}.
Then the elements of Y are sorted by the ascending order. In fact, this rearrangement is a kind of transformation. We can rearrange original image pixels according to this transformation function. The pixel set after scrambling is denoted as \( {X}^{\prime }=\left\{{x}_{ij}^{\prime}\left| i=1,2,\cdots, m; j=1,2,\cdots, k\right.\right\} \).
-
Step 4:
Pixel replacement. Performing the operation of XOR between the sequence Z and the scrambled image sequence X ′ as follows:
Then, we obtain a set Y ′ = {y ij |i = 1, 2, ⋯ , m; j = 1, 2, ⋯ , k}, which is the pixel set of the encrypted image.
The decryption is the inverse process of the encryption. Firstly, do the operations as step 1 to 2 in the encryption algorithm. Secondly, the XOR operation is performed between the encrypted image data and the sequence Z. Finally, the scrambling operation is performed by using of index inverse transform function and reconstructs the original image.
Figure 2 shows the index transform function and its inverse function for some data.
From Fig. 2, the index of the sorted elements has a corresponding relationship with the original elements. Assume φ represents the function between the indexes, we can obtain that
And
This algorithm can make full use of the advantages of the DMC to improve the security of the encrypted image, and it can reduce calculation error. These conclusions can be verified by the following experiments.
5 Experimental results
Five images are taken for testing effectiveness of the proposed algorithm and they are two gray images (256 × 256,512 × 512) and three color images (256 × 256,512 × 512,600 × 400). R represents red, G represents green, and B represents blue in color images. The histograms of the original image and encrypted image are shown in Figs. 3, 4, 6, 7, and 8. The histograms of decrypted image are shown in Fig. 5. Choose parameters a = 3.8355 , p = 10 , b = 2.345 and initial valuez(0) = 0.58.
From Figs. 3, 4, 6, 7, and 8, histograms of the original image and the encrypted image are very different. The histogram of encrypted image is uniform distribution. Indeed, it can be verified by Chi-square test for each image. Here, we take the gray image as an example to verify this conclusion.
-
H 0: Encrypted pixel values of the gray image obey uniform distribution.
-
H 1: Encrypted pixel values of the gray image not obey uniform distribution.
Assume that n 1 represents the number of samples, X i (i = 1, 2, ⋯ , n 1) represent random variable of encrypted gray values, and all samples are divided into m 1 groups, f j (j = 1, 2, ⋯ , m 1) represents frequency of group j. Let \( \overline{X} \) represents the mean value, θ and ω are parameters of this distribution. Then, the estimated value of θ and ω can be obtained by the point estimate method.
The probability p j {X = j} , j = 1 , 2 , ⋯ , m 1 can be calculated as uniform distribution which parameters have been known. Finally, we can make a decision through comparing the value of
with χ 2(97). Results are listed in Table 1 which derives from SPSS statistics 19.
Table 1 demonstrates the progressive significance p ∗ > 0.05. So, we can’t reject H 0.That is to say, encrypted pixel values of the gray image obey uniform distribution. As is known to all, the color image is composed of three pixel matrixes, which are R matrix, G matrix and B matrix. Each pixel matrix can be encrypted and decrypted according to the same processing method of gray image. Then, encrypted image can be got by merging them. So, the proposed scheme is feasible to color image. Moreover, it can also be verified that encrypted pixel values of the color image obey uniform distribution through Chi-square test. Results are listed in Table 2.
Table 2 shows that each progressive significance value P ∗ is far greater than 0.05. Moreover, all values of progressive significance are greater than 0.454. That is to say, the proposed encryption algorithm works better for color image.
The computational time of these images is listed in Table 3. In addition, other seventeen color images which have different size are selected from the USC-SIPI image database. Encryption and decryption time of all images are shown in Fig. 9. And all the algorithms are calculated by MATLAB R2013a on the same computer with Inter Xeon E5-2630v2/16G, DDR3.
Let T e represents encryption time, T d represents decryption time, and P s represents the size of images. Thus, T e and T d of different images which size belongs to (10,000, 160,000) are shown in Fig. 9a. T e and T d of different images which size belongs to (10,000, 640,000) are shown in Fig. 9b. Figure 9 indicate that T e and T d of different images increase with the size of images. Specially, for different size of images, the shortest T e = 0.2196s and T d = 0.1335s, and the longest T e = 2.4534s and T d = 2.5047s. Moreover, the relationship between T e and P s can be approximately represented by T e = 3.6714 × 10−6 P s + 0.1705, which derives from fitting (Fig. 10a). Similarly, the relationship between T d and P s can be approximately represented by T d = 3.6271 × 10−6 P s + 0.1586 (Fig. 10b). Thus, the encryption and decryption time of all images in the USC-SIPI image database can be estimated through the above two linear function. For example, a color peppers (512 × 512) image is selected to verify it, and its file name is 4.2.07 in the USC-SIPI image database. When P s = 262144, we can obtain that T e = 1.1329s and T d = 1.1094s.They are very close to the experimental results in Table 3. Therefore, the proposed algorithm is applicable to any image of this database. And because of it, we use the above five images as the representative to analysis the performance of the proposed algorithm in the next section.
6 Performance analysis
In this section, the performances of the encryption algorithm are measured by calculating the correlation coefficient, the information entropy, the values of NPCR and UACI. Moreover, the key space, the key sensitivity and the algorithm intensity are discussed.
6.1 Correlation coefficient
Correlation coefficient measures the dependence of two adjacent variables at a certain direction. The closer this value is zero the less correlation exists between two adjacent. Conversely, the value is to 1. The two variables are not relevant and unpredictable when correlation coefficient is close to 0. The calculation formula of correlation coefficient is as follows [9].
where \( n\left(\sum_{i=1}^n{x}_i{y}_i\right)-\left(\sum_{i=1}^n{x}_i\right)\left(\sum_{i=1}^n{y}_i\right) \) represents the sample variation, \( \left[ n\left(\sum_{i=1}^n{x}_i^2\right)-{\left(\sum_{i=1}^n{x}_i\right)}^2\right] \) and \( \Big[ n\left(\sum_{i=1}^n{y}_i^2\right) \) \( -{\left(\sum_{i=1}^n{y}_i\right)}^2\Big] \) are the sample standard variation of X j and Y j (j = 1, 2, ⋯ , m), respectively.
All correlation coefficients of adjacent pixel of the original and encrypted image are calculated from the horizontal, vertical and diagonal directions. For example, let X j = {x j1, x j2⋯, x jn } represents one pixel vector of the gray image, the adjacent pixel vector of X j is Y k = {y k1, y k2⋯, y kn }, which satisfies k = j + 1 , j = 1 , 2 , ⋯ , m − 1. According to (12), the correlation coefficient of X j and Y k can be calculated. Finally, the correlation coefficient of the gray image in a fixed direction is obtained by averaging. For color images, the correlation coefficients of R, G and B matrices are calculated respectively. And then their average value which represents the correlation coefficients of the color image is calculated. Thus, the number of correlation coefficient varies with the size of the image. Some computational results are listed in Table 4, which only includes average values. Each value of correlation coefficients is shown in Figs. 11, 12, 13, 14, and 15.
Table 4 shows that correlation coefficients of the different original images in horizontal, vertical and diagonal directions are close to 1. However, they are close to 0 after encryption. More specifically, the correlation coefficient of the original Filtration image is 0.991562 in vertical direction, but it drops to 0.000097 by encrypting. Similar results can be obtained in horizontal and diagonal direction.
The adjacent pixels of the original image have a significant correlation from Figs. 11, 12, 13, 14, and 15a. However, the correlation disappeared after encryption. Moreover, all correlation coefficients of the encrypted image evenly are distributed in the small range of zero from Figs. 11, 12, 13, 14, and 15b. In order to more accurately determine the distribution type of the correlation coefficients in the encrypted image, we describe the frequency charts in different directions in Fig. 16.
Figure 16 shows that the correlation coefficients of the encrypted image obey normal distribution, and this conclusion can be verified by single sample K-S test. The process of this test is given as follows.
-
H 0: Correlation coefficients of the encrypted image obey normal distribution.
-
H 1: Correlation coefficients of the encrypted image don’t obey normal distribution.
Let x i represents sample, F 0(x) represents theory distribution function, and \( {F}_{n_2}(x) \) represents sample cumulative frequency function. And let
In order to obtain F 0(x), we must estimate μ and σ, which are parameters of normal distribution in H 0. They can be obtained by the following formulas,
And, \( {F}_{n_2}(x)= F/{n}_2 \), where F represents cumulative frequency, and n 2 represents sample size. When D > D(n 2, α) (α is significance level, here α = 0.05), reject H 0. Otherwise, accept H 0.
SPSS is used to test correlation coefficient’s distribution. The results of K-S test are listed in Table 5.
From Table 5, the maximum value of progressive significant is 0.9645 and the minimum value is 0.6251. Each value of progressive significant is greater than 0.05. Moreover, the mean value and standard deviation are close to zero. The results indicate that the correlation coefficients of the encrypted image obey normal distribution.
In addition, we randomly select two adjacent pixel vectors in the original image and the encrypted image. And the distribution of these pixel values is shown in Figs. 17 and 18.
Before encryption, the distribution of two adjacent pixel vectors is close to a straight line. However, the distribution is not regular after encryption. Therefore, it is difficult for the attacker to analyze the distribution law of the image under such an irregular distribution.
6.2 Resistance statistical analysis
We have done statistical analysis for the proposed algorithm in section 5. The results show that the histogram of encrypted image is uniform distribution. That is to say, the frequency of each pixel value is very close after encryption. The result is quite different from the distribution of the original image. It makes the attacker cannot obtain the statistical law of the encrypted image, which is a precondition for breaking the code. Moreover, Correlation coefficient analysis demonstrates that all correlation coefficients of different encrypted images are close to zero in section 6.1. It makes the attacker cannot predict the original image by analyzing the statistical characteristics of the encrypted image. So, the proposed algorithm can resist statistical attack.
6.3 Key sensitivity
A good encryption algorithm should be very sensitive to the key. A slight variation of the key should result in totally different image in the reconstructing process. Figure 19a–e show some decrypted images with the correct key. Figure 19f–j show some decrypted images with different keys which have a slightly change.
In this algorithm, all the original images can be recovered when using of the correct keys ((Fig. 19a–e). However, when the parameter or the initial value of Logistic map is changed slightly, it can’t obtain the original image (Fig. 19f–g). If parameter p is changed to 9 from 10, it can’t obtain the original image (Fig. 19h), and if parameter b is changed to 2.3450001 from 2.345, it can’t obtain the original image yet (Fig. 19i). If all keys are changed slightly, the original image is more difficult to obtain (Fig. 19j). Moreover, each histogram of decrypted image obeys uniform distribution when used wrong key. So, the proposed algorithm is sensitive to the key.
6.4 NPCR and UACI
NPCR is the comparison of relational positions between original and encrypted images in order to ensure that the pixels of every level matrix can be altered. UACI is, on the other hand, the percentage of the average level matrix change between the relational positions of two images [9]. The following equations define NPCR and UACI:
and
where A is the original image of M × N dimension, and A cs is the encrypted image. M and N are width and height of the image. Taking the gray image as an example, we discuss the influence of the parameter p on the NPCR and UACI. Figure 20 shows that the values of NPCR and UACI are different for different parameter p. It has a fixed trend when p → ∞. That is to say, NPCR and UACI are invariable for some p. A few precise values of NPCR and UACI are listed in Table 6.
From Table 6, there exists large difference when p ≥ 19, which is caused by the calculation accuracy. Moreover, experiments show that each pixel value of encrypted image is equal after p = 24, which also consists of 8-bit integer and 16-bit decimal numbers. In this time, Eq. (10) will fail. That is, the proposed algorithm only contains scrambling process without replacement. Thus, the value of NPCR is 99.3790% which stay away from the ideal value. The same reason is for UACI. In addition, the values of NPCR and UACI are unsatisfactory when p = 1. Moreover, it is found that they are still close to the ideal values when p isn’t an integer by experiments, such as p = 9.5812. At this time, the information of the encrypted image is completely different from that of the other p. So, we should choose p ∈ (2, 18) to achieve the best encryption effect in our computer. If our algorithm can be combined with cloud computing, the scope of p will dramatically increase.
We also discuss the influence of adjustment coefficient b on NPCR and UACI for different p. Values of NPCR and UACI are shown in Figs. 21 and 22.
When p = 10, the average value of NPCR and UACI is 99.6145% and 32.5906%, respectively. They have litter change for different b. We can get the same conclusion by simulation experiments when p ∈ (2, 18) and b ∈ R ∗. When p ≥ 19, the average value of NPCR and UACI remains unchanged with different b. But, the difference between them and the ideal value becomes lager duo to the role of the parameter p. Therefore, the values of NPCR and UACI are not affected by the adjustment coefficient b. Other values of NPCR and UACI are listed in Table 7 for different images whenp = 10 , b = 2.345.
According to the principle of cryptography, a good encryption algorithm should be fully sensitive to the clear text. This sensitivity is stronger; the ability to resist differential attack will be stronger. The sensitivity of the encryption algorithm to the clear text can be characterized by the number of pixels change rate (NPCR) [4]. That is to say, NPCR is an important measure index of resisting differential attack. From Table 7, the values of NPCR are very close to the ideal value 99.6094% when p = 10 and b = 2.345. The results show that the information of original images has a good spread to encryption image and the proposed algorithm can resist differential attack.
6.5 Information entropy
The information entropy of image actually measures the distribution of gray value in the image. Greater information entropy represents higher uniformity of the images. Generally, an ideal value of information entropy is approaching to 8 for an image after encryption. The closer the entropy of an encryption algorithm is to 8 the less predictable, and this scheme is more secure. It is defined as follows [29]:
where m i is i-th gray value of the image, p(m i ) represents the probability of occurrence of m i .The information entropy of different encrypted images are calculated and the results are listed in Table 8. It shows that the entropy value of the encrypted image is close to the ideal value, especially for color images.
6.6 Key space
In our algorithm, the parameter value of the Logistic map a = 3.8355 is used as secret key. So, we need 32 bits to store this value (single float number in MATLAB). Another 32 bits is needed for storing initial value 0.58. Finally, adjustment parameter b = 2.345 and amplification parameter p ∈ (2, 18) are also used as secret key. We need 64 bits to store them according to the analysis of parameter b and p in subsection 6.4. Therefore, the total number of bits used to store all the key values is 128. Thus, the cryptosystem has at least 2128 different combinations and this large key space is enough to resist brute force attack.
6.7 Algorithm intensity analysis
A malicious attacker may destroy the encrypted image, and the legitimate receiver can decrypt the image successfully. Destroyed encryption images are shown in Fig. 23a–e, and the corresponding decrypted images are shown in Fig. 23f–j.
Figure 23 demonstrates that, even if an encrypted image is destroyed by an attacker, the legitimate receiver can decrypt the image successfully, only noise exists. Hence, the encryption algorithm can resist illegal tampering.
6.8 Comparison with some existing encryption algorithms
6.8.1 Comparison of correlation coefficient
In order to reflect the advantages of the proposed algorithm in terms of security, comparison of the correlation coefficient between original image and encrypted image is preformed in Table 9. Better results are achieved than most of the schemes mentioned in this paper, such as multi-chaotic system based schemes [8], bit level permutation based schemes [13], chaotic system based schemes [27], DNA computing based schemes [30], and secure image encryption based schemes [17].
From Table 9, the average value of correlation coefficient of the proposed algorithm is 0.0053, which is smaller than Huang’s, Lin’s, Ye’s, Zhang’s and Zahra’s. This means that, the attacker will be more difficult to discover the distribution law of the encrypted image when compared with the above algorithms, and the proposed algorithm has better effect in resistance statistical attack.
6.8.2 Comparison of key sensitivity
Since the key sensitivity is an important index of the security, we also compare it with the same algorithm without the projective transformation in reference [16], which used Henon map to encrypt image. Our results are shown in Fig. 19. Their results are shown in Fig. 24.
From Fig. 24, we can’t get the original image when parameter u = 1.77(the correct parameter u = 1.76 in [16]). However, we can obtain main information of the original image when the value of u is changed very small, such as u = 1.7601(Fig. 24c, f, h, j, l). It means that the main information has been leaked when differences reach 10−4 between the correct and the wrong key. There is no doubt that the security of algorithm is not guaranteed to resist brute force attack. But, the attacker could not obtain any information about the original image when differences reach 10−15 in our algorithm. The results show that the proposed algorithm has a higher security.
6.8.3 Comparison of computational complexity
Apart from the security consideration, some other issues on an image encryption scheme are also important, including the computational complexity which is composed of time complexity and space complexity, particularly for real-time Internet applications. The computational complexity of the proposed encryption algorithm depends on data generating operation, projective transform operation, image scrambling operation, and pixel replacement operation. The complexity of the first two steps for an image is O(n), and the latter two steps is O(n2). So the total computational complexity is O(n2). Specifically, the execution time of the above five images is faster than some well-known encryption algorithms [1, 11] in the same MATLAB R2013a platform. The results of execution time for different algorithms are shown in Fig. 25a. In addition, the occupied space is also being compared, and the results are shown in Fig. 25b.
Figure 25a shows that T e of the proposed algorithm are faster than some other algorithms, such as AES and DES. From Fig. 25b, when the size of color image is 256 × 256, the occupied space of all algorithms is very close to 18.5642 MB. Moreover, the advantage of the proposed algorithm is further strengthened with the increase of the image size. Generally, the occupied space of our algorithm is lower than other algorithms when the size of the image is more than750 × 750.
In order to compare the running speed of the algorithms, we let S pe = S pa /T e . Where S pe represents the running speed, S pa represents the occupied space. Thus, the running speed of the proposed algorithm is faster than other algorithms (Fig. 25c). Concretely, the average running speed of the proposed algorithm is 44.0836 MB/s, and it is much higher than 14.4591 MB/s which is the maximum of the AES and DES algorithm. Therefore, our algorithm is more suitable for image encryption.
7 Conclusions
In this paper, we have proposed a secure and effective encryption algorithm for images based on Logistic map and the DMC. One of the most benefits of the proposed algorithm is that we increase the diffusivity by using of projective transformation. It makes our algorithm has many good performances, which can resist statistical attack, brute force attack and differential attack.
In the future, we will continue to discuss the following problems.
-
(1)
Research the relationship between Henon map and dynatomic modular curve.
-
(2)
Applying our scheme to the video encryption algorithm, and evaluating its performance.
References
Chen G, Mao YB, Chui CK (2004) A sysmmetric image encryption scheme based on 3D chaotic cat maps. Chaos, Solution & Fractals 12:749–761
Chen WH, Luo S, Zheng WX (2016) Impulsive synchronization of reaction-diffusion neural networks with mixed delays and its application to image encryption. IEEE Transactions on Neural Networks and Learning Systems 33(1):300–303
Chhotaray A, Biswas S, Chhotaray SK, Rath GS (2015) An image encryption technique using orthonormal matrices and chaotic maps. Proceeding of 3rd International conference on advanced computing. Networking and Informatics 9(44):355–362
Cong-Xu Z, Ke-Hui S (2012) Cryptanalysis and improvement of a class of hyper-chaos based image encryption algorithms. Acta Phys Sin 61(12):1–12
Fu Z, Sun X, Liu Q, Zhou L, Shu J (2015) Achieving efficient cloud Search services: multi-keyword ranked Search over encrypted cloud data supporting Parallel computing. IEICE Trans Commun E98-B(1):190–200
R. Hartshorne (1977) Algebraic geometry. Springer-Verlag, New York. GraduateTexts in Mathematics, 52
Hua T, Chen J, Pei D, Zhang W, Zhou N (2015) Quantum image encryption algorithm based on image correlation decomposition. Int J Theor Phys 54:526–537
Huang X (2012) Image encryption algorithm using chaotic chebyshev generator. Nonlinear Dyn 67:2411–2417
Huang CK, Liao CW, Hsu SL, Jeng YC (2013) Implementation of gray image encryption with pixel shuffling and gray-level encryption by single chaotic system. Telecommun Systems 52(2):563–571
Kamara S, Lauter K (2010) Cryptographic cloud storage. In: Financial cryptography and data security. Springer. pp. 136–149
Kwok HS, Tang WKS (2007) A fast image encryption system based on chaotic maps with finite precision representation. Chaos, Solution & Fractals 32:1518–1529
Li S, Zheng X (2002) Cryptanalysis of a chaotic image encryption method. Proceedings of the IEEE International Conference on Circuits and Systems 2:708–711
Lin T, Xingyuan W (2012) A bit-level image encryption algorithm based on spatiotemporal chaotic system and self-adaptive. Opt Commun 2012:940276
Liu L, Miao S (2016) A new image encryption algorithm based on logistic chaotic map with varying parameter. Spring 5(1):1–12
Liu H, Wang X (2010) Color image encryption based on onetime keys and robust chaotic maps. Comput Math Appl 59(10):3320–3327
Manjunath Prasad, K.L. Sudha (2011) Chaos image encryption using pixel shuffling. Computer Science & Information Technology 1(12):169–179
Parvin Z, Seyedarabi H, Shamsi M (2016) A new secure and sensitive image encryption scheme based on new substitution with chaotic function. Multimedia Tools and Applications 75(17):10631–10648
Qin C, Zhang X (2015) Reversible data hiding in encrypted image with privacy protection for image content. J Vis Commun Image Represent 31:154–164
Qin C, Chang C-C, Chiu Y-P (2014) A novel joint data-hiding and compression scheme based on SMVQ and image Inpainting. IEEE Trans Image Process 23(3):969–978
Rajput AS, Sharma M (2015) A novel image encryption and authentication scheme using chaotic maps. Advances in intelligent informatics. Springer International Publishing Switzerland 26:277–286
Sharath Kumar HS, Panduranga HT, Naveen Kumar SK (2013) A two stage combinational approach for image encryption. Advances in Computing & Information Technology.Conference paper (AISC,volume 177):843–849
Joseph H. Silverman (2007) The arithmetic of dynamical systems. Springer Science + Business Media, LLC.148–158
Sivakumar T, Venkatesan R (2016) A new image encryption method based on Knight’s travel path and true random number. Journal of Information Science and Engineering, Jan 32(1):133–152
Wang X-Y, Feng C, Tian W (2009) A new compound mode of confusion and diffusion for block encryption of image based on chaos. Commun Nonlinear Sci Numer Simul 15(9):2479–2485
Wang H, Xu J-P, Sheng X-S, Zan P (2014) Discrete chaotic synchronization and It’s application in image encryption. LSMS/ICSEE2014, part 2. CCIS 462:264–272
Xia Z, Wang X, Sun X, Wang Q (2016) A secure and dynamic multi-keyword ranked Search scheme over encrypted cloud data. IEEE Transactions On Parallel And Distributed Systems 27(2):340–352
Ye G, Wong K-W (2012) An efficient chaotic image encryption algorithm based on a generalized Arnold map. Nonlinear Dyn 69:2079–2087
Yuan H-M, Liu Y, Gong L-H, Wang J (2017) A new image cryptosystem based on 2D hyper-chaotic system. Multimedia Tools and Applications 76(6):8087–8108
Zhang S, Gao T (2016) An image encryption scheme based on DNA coding and permutation of hyper-image. Multimedia Tools and Applications 75(24):17157–17170
Zhang Q, Xue X, Wei X (2012) A novel image encryption algorithm based on DNA subsequence operation. Sci World J 2012:286741
Acknowledgements
This work was supported by the National Key Research and Development Program of China 2016YFB0800601.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Li, B., Liao, X. & Jiang, Y. A novel image encryption scheme based on logistic map and dynatomic modular curve. Multimed Tools Appl 77, 8911–8938 (2018). https://doi.org/10.1007/s11042-017-4786-7
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-017-4786-7