An improved image encryption algorithm with finite computing precision
Journal Pre-proof
An improved image encryption algorithm with finite computing precision Chen Chen, Kehui Sun, Shaobo He PII: DOI: Reference:
S0165-1684(19)30393-7 https://doi.org/10.1016/j.sigpro.2019.107340 SIGPRO 107340
To appear in:
Signal Processing
Received date: Revised date: Accepted date:
22 July 2019 8 October 2019 9 October 2019
Please cite this article as: Chen Chen, Kehui Sun, Shaobo He, An improved image encryption algorithm with finite computing precision, Signal Processing (2019), doi: https://doi.org/10.1016/j.sigpro.2019.107340
This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of record. This version will undergo additional copyediting, typesetting and review before it is published in its final form, but we are providing this version to give early visibility of the article. Please note that, during the production process, errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. © 2019 Published by Elsevier B.V.
Highlights • A new two-dimensional chaotic map is proposed derived from the Sine map, the Chebyshev map and a linear function, namely the 2D-SCL map. Performance assessment results show that it has good dynamical characteristic for encryption application. • An improved cryptosystem with finite computing precision is designed based on the 2D-SCL map. The scheme introduces the SHA-1 hash values of plain image and a universal anti-degradation algorithm to ensure information security with low computing precision. • We analyze performance of the proposed image encryption algorithm, and simulation results show that it maintains high security and low time complexity when the largest precision is 2−16 .
1
An improved image encryption algorithm with finite computing precision Chen Chen, Kehui Sun∗, Shaobo He School of Physics and Electronics, Central South University, Changsha 410083, Hunan, China
Abstract When a digital chaotic system is realized on hardware of finite computing precision, it will lead to short period orbits. Although many existing image encryption algorithms declared that the average cycle lengths of their digital chaotic system are larger than the required cycle lengths in image encryption, there are still many period orbits whose lengths are far smaller than the average cycle length. To further improve security with finite precision, an improved cryptosystem is proposed based on a new two-dimensional chaotic map derived from the Sine map, the Chebyshev map and a linear function (2D-SCL). Performance estimation demonstrates that the 2D-SCL has good ergodicity, hyperchaotic behavior, large cycle lengths under low computing precisions, and its complexity is larger and more stable than that of several newly developed 2D chaotic maps. Thus we design an improved cryptosystem based on the 2D-SCL map. In the scheme, we combine the confusion and diffusion processes in one stage to improve the running speed. Based on the SHA-1 hash values of plain image and the chaotic sequence, a pseudorandom sequence is designed and then an anti-degradation method is introduced to improve the dynamic degradation of the 2D-SCL map under finite computing precision. Meanwhile, this algorithm also updates the initial values of the 2D-SCL map in real-time, thus enhancing the ability to resist known-plaintext and chosenplaintext attacks. The largest precision is set at 2−16 , and simulation results show that this algorithm has high security, low time complexity, and the ability to withstand common attacks. Keywords: Chaos; image encryption; cryptography; dynamical degradation. 1. Introduction With the development of communication technology, the real-time secure communication is widely noted in medicine, aerospace, education, military and other fields. As a visualized communication way, digital image information has become very prevalent. To efficiently protect private images and ensure transmission rate, fast image encryption is an important technology to mask the information itself. Many encryption algorithms are proposed including the wavelet transmission [1, 2], DNA coding [3, 4], reversible cellular automata [5, 6] and chaos [7–23]. Among the proposed image encryption schemes, chaos presents good randomness and high complexity, thus it is comprehensively applied in image encryption. Meanwhile, cryptanalysis of encrypted images is also a challenge for designers to construct image encryption schemes [24]. Many encrypted images are proven to be easily cracked by attackers [25, 26]. Therefore, it is increasingly difficult to ensure image security, especially under finite computing precision. For the encryption algorithms based on chaotic systems, the performance is affected by the computing precision and the chaotic map. Although many studies have proposed chaos-based cryptosystems, most algorithms ignore the effect of computing precision. When chaotic ∗ Corresponding
author Email address:
[email protected] (Kehui Sun)
Preprint submitted to Signal Processing
systems are realized on digital signal processors or digital computers with finite computing precision, their dynamical performances degrade, including short cycle orbit, nonergodicity, nonuniform distribution, strong corrlation and low complexity [27–30]. Owing that the degradation greatly affects the security of chaos-based cryptosystems, many image encryption algorithms investigate the dynamical degradation [15, 31]. Meanwhile, many methods are proposed to address the degradation phenomenon of digital chaotic system. Therefore, it is significant to design an image encryption algorithm with good performance under finite computing precision. In addition, the applied chaotic maps are roughly classified into two categories: (1) one-dimensional (1D) chaotic maps and (2) higherdimensional (HD) chaotic maps. Most 1D chaotic maps are simple in structure. With only one variable and relatively few system parameters, the trajectory, initial conditions and system parameters are easily estimated [32]. In contrast, with more variables and more parameters, HD chaotic maps have larger key space and relatively complicated structure. Therefore, their orbits are rather difficult to be estimated and their parameters are much more difficult to be predicted. Furthermore, HD chaotic maps usually have longer chaotic orbits with finite computing precision, so they are more applicable for image encryption. Recently, many new chaos-based image encryption schemes were proposed, and most of them are based on the permutation-diffusion mechanism [11–16, 18–22]. However, owing to the fact that the permutation and diffuOctober 10, 2019
sion are two independent processes, these algorithms take a great number of iterations to generate secret keys. To raise the transmission rate, Liu et al. proposed a fast image encryption algorithm based on 2D-SIMM chaotic map in Ref. [23]. By employing the permutation and diffusion simultaneously, the cryptosystem has low time complexity and good ability to withstand chosen-plaintext attack. However, it fails to resist noise and cropping attacks. Furthermore, the performance of 2D-SIMM chaotic map depends on computing precision, which will crash when the iterative value approaches 0 under low computing precision. In this paper, an improved cryptosystem is proposed to enhance the algorithm in Ref. [23] further. We design a new 2D hypherchaotic map based on the Sine map, the Chebyshev map and a linear function (2D-SCL). The secret key is constructed by the initial conditions of the 2DSCL map and the SHA-1 hash values of plain image. Then a pseudorandom sequence is generated by the combination of this SHA-1 hash values and the chaotic sequence. It is used to improve the dynamic degradation of the chaotic system. In this way, the initial values of the 2D-SCL map are also updated in real-time. Under low computing precisions, the improved 2D-SCL map is used to encrypt plain images based on the permutation-diffusion mechanism. This algorithm can further improve the security and maintain short execution time. The rest of this paper is organized as follows. In Section 2, the discrete 2D-SCL chaotic map is presented and the performance is analyzed. In Section 3, we propose an improved image encryption scheme. In Section 4, the performance of the proposed algorithm is analyzed. Finally, the conclusions and future directions are discussed.
where k, a, b and c are the system parameters and k ∈ (0, 1), a, b ∈ (0, +∞), c ∈ (−∞, +∞). In this model, the linear function is employed to modulate the Chebyshev map, and it is expanded into two dimensions based on close-loop coupling pattern [33]. Then the output is compounded with the Sine map to further improve system dynamics. With two state variables and four parameters, the proposed 2D-SCL map is more complex than its 1D seed systems. 2.2. Dynamical performance of the 2D-SCL hyperchaotic map Here, the dynamical properties of the 2D-SCL are analyzed by the phase diagram, the Lyapunov exponent spectrum, the period length and the permutation entropy (PE) complexity measuring algorithm [34]. It is compared with 2D-SIMM map in Ref. [23] and some other existing chaotic maps. 2.2.1. Phase diagram analysis The phase diagram of a chaotic map shows the randomness of chaotic sequence. Set k = 1, a = 2π, b = π, c = 8, the phase diagram of the 2D-SCL is shown in Fig. 1 (a). It can be seen that the attractor almost fills the entire phase space. Compared with 2D-SIMM map shown in Fig. 1 (b), the 2D-SCL has better ergodicity and larger parameter space. Furthermore, it is obvious that the attractor of the 2D-SCL map occupies a more larger space in the phase diagram than TD-SLMM map proposed in Ref. [11] and 2DLogistic map proposed in Ref. [35]. Besides, the outputs of the 2D-SCL map distribute more uniform than 2D-LASM map propsed in Ref. [36] and 2D-LICM map proposed in Ref. [17]. The results indicate that the proposed 2D-SCL map can generate more random chaotic sequences.
2. The 2D-SCL hyperchaotic map 2.1. Model of the 2D-SCL map The 2D-SCL is derived from one linear function and two existing 1D chaotic maps, namely the Sine map and the Chebyshev map. The Sine map is xi+1 = k sin(axi ), a)
where k, a are the system parameters. The Chebyshev map is xi+1 = cos(b arccos xi ),
Figure 1: Phase diagrams of two attractors: a) 2D-SCL with k = 1, a = 2π, b = π, c = 8. b) 2D-SIMM with a = 1, b = 5
where b is the system parameter. The linear function is
2.2.2. Lyapunov exponent spectrum analysis Lyapunov exponent spectrum is an important indicator to evaluate the dynamical characteristics of chaotic systems. Figure 2 shows the Lyapunov exponent spectrum of the 2D-SCL map and 2D-SIMM map. Results show that both of them are hyperchaotic with two positive Lyapunov exponents when the parameter varies from 0.73 to 1. However, the 2D-SIMM has an obvious periodic window at a ∈ (0.71, 0.73], while the 2D-SCL is hyperchaotic over the whole range. Furthermore, the 2D-SCL map has larger
xi+1 = xi + c, where c is a control parameter. To obtain more complex chaotic sequences, we design a HD hyperchaotic map based on the three seed maps, namely the 2D-SCL map, which is ( xi+1 = k · sin(a · cos(b arccos xi ) · (yi + c)); yi+1 = k · sin(a · cos(b arccos yi ) · (xi+1 + c)),
b)
3
6 5
LEs
3 1
2 1 0.7
3. An improved cryptosystem 3.1. Secret key structure
LEs
4
6 4 2 0 -2 -4 -6 -8 0.7
2
0.8
0.9
1
k
a)
As shown in Fig. 5, the proposed cryptosystem has nine parts, including the system initial value x0 , y0 , x1 , y1 ∈ [0, 1], the system parameters k ∈ (0, 1), a, b ∈ (0, +∞), c ∈ (−∞, +∞) and a predefined constant calculated by SHA-1 hash values of plain image λ ∈ (0 1). The process of generating λ is described as follows. Step 1: Get the SHA-1 hash values of the plain image, which is shown as a 160-bit secret key K. Divide K into 4-bit blocks and then each block is converted to a decimal number. Thus 40 decimal numbers K1 , K2 , ..., K40 are obtained. Step 2: The predefined constant λ is computed by
1 2
0.8
0.9
1
a
b)
Figure 2: Lyapunov exponent spectrum a) 2D-SCL versus k ∈ (0.7, 1] (a = 2π, b = π, c = 8). b) 2D-SIMM versus a ∈ (0.7, 1] (b = 5).
LEs than 2D-LSCM map, TD-SLMM map, 2D-LASM map and 2D-Logistic map at the same parameter range. Besides, its LEs are more stable than 2D-LICM map and 2D-SIMM map. It further demonstrates that the 2D-SCL has better and more stable dynamical performance. Figure 3 shows the Lyapunov exponent spectrum versus parameters a, b and c, where the parameter range is a ∈ (6, 14), b ∈ (6, 14) and c ∈ (2, 10). There are still two stable positive Lyapunov exponents over the whole range, and the values become larger with parameters a, b and c increasing. The results indicate that the 2D-SCL has complex and stable dynamical behaviors.
λ=
K1 + K2 + ... + K40 . 40 × 16
The first eight parts of the secret key are used to generate the initial state for the 2D-SCL map, and the last part is used to generate a pseudorandom sequence to counteract the dynamical degradation of the 2D-SCL map realized on low-precision devices. Obviously, it varies as the plain image changes, which significantly improves its ability to resist the known-plaintext and chosen-plaintext attacks. 3.2. Image encryption algorithm
2.2.3. Period analysis
Figure 6 shows the confusion and diffusion architecture of the proposed algorithm. The chaotic sequence generated by the 2D-SCL map is used for the row substitution, the row shift, the column substitution and the column shift. Meanwhile, a dynamical perturbation-feedback mixed control (DPFMC) method [40] is introduced to improve the dynamical degradation of the 2D-SIMM map. The specific encryption algorithm is introduced as follows. (1) Row encryption: Step 1: Set i = 1. The initial values (xr0 , yr0 ) and system parameters are obtained by the secret keys x0 , y0 , k, a, b and c. Pre-iterate the 2D-SCL system for 50 times and it is then discarded to avoid the transient effect, while also enhancing the initial value sensitivity. Step 2: Introduce the DPFMC method and then the improved 2D-SCL map is ( xi+1 = ((k · ssi +V ∗ +V · e10 · xi ) mod 1) × 2 − 1;
The cycle length of chaotic maps is a key measure to investigate the dynamical degradation. Select three initial values of the 2D-SCL map and 2D-SIMM map, and then calculate their cycle lengths with different precisions. The period test results are shown in Table 1. The results show that 2D-SIMM map is vulnerable to computing precision. If x∗ = 0, 0 becomes the denominator in the next iteration. Therefore, the 2D-SIMM system will crash when the output is degraded to 0. However, the proposed 2D-SCL map remains stable and its orbit length is longer under most precisions, which is more suitable for image encryption.
2.2.4. Complexity analysis Complexity is also an important indicator to analyze the predictability and randomness of a chaotic system. The complexity of a chaotic pseudorandom sequence can be calculated by many algorithms, such as PE, approximate entropy (ApEn) [37], spectral entropy (SE) [38] and fuzzy entropy (FuzzyEn) [39]. Here, since PE has faster speed and relatively accurate for complexity estimation, it is chosen to analyze the complexity of the proposed maps. Besides the 2D-SIMM, five existing 2D chaotic maps (2D-LSCM map, TD-SLMM map, 2D-LASM map, 2D-Logistic map, 2D-LICM map) are compared with the proposed 2D-SCL map. As shown in Fig. 4, the proposed map has a larger and more stable PE complexity value than the other comparative maps, verifying that it has the best randomness among them.
yi+1 = ((k · ssi +V ∗ +V · e10 · yi ) mod 1) × 2 − 1,
where
( 0 V = V ∗
if i ≡ 0 mod 3; if i . 0 mod 3,
ssi = sin(a·cos(b arccos xi )·(yi +c)), V is a pseudorandom sequence and e represents Eulers number. Here, V is generated by the chaotic sequence and the constant λ in the secret key. The equation is V = (xi + yi + λ ) mod 1. 4
5
4
4
4
3
3
1
2 1
LEs
6
5
LEs
6
5
LEs
6
2
6
8
10 a
12
3
1
2 14
1
2
4
a)
6 b
8
1
2
2
10
1
2
6
8
b)
10 c
12
14
c)
Figure 3: Lyapunov exponent spectrum of the 2D-SCL a) parameter a ∈ (6, 14). b) parameter b ∈ (6, 14). c) parameter c ∈ (2, 10). 1.2 2D-SCL 2D-SIMM
2D-LSCM TD-SLMM
2D-LSAM 2D-Logistic
2D-LICM
1
PE
0.8 0.6 0.4 0.2 0 0.7
0.75
0.8
0.85 Parameter
0.9
0.95
1
Figure 4: PE complexity of the different maps.
Precision 2−8 2−10 2−12 2−14 2−16 2−18 2−20
x0
y0
x1
y1
k
Table 1: The period test results(− denotes system crush) x1 = 0.1, y1 = 0.7 x1 = 0.3, y1 = 0.5 x1 = 0.2, y1 = 0.8 2D-SCL 2D-SIMM 2D-SCL 2D-SIMM 2D-SCL 2D-SIMM 172 – 172 – 107 60 298 515 298 – 7 – 41 – 41 – 2393 – 2899 – 463 – 2899 – 39885 – 39885 – 39885 – 60886 1099 60886 1099 60886 – 135509 16301 120806 16301 120806 16301
a
b
c
Step 5: Do row shift. Circular shift the first Dry pixels of P(i, ·) to left. Step 6: Set i = i + 1, and conduct steps 3 - 5 in a loop until i > M. (2) Column encryption: Step 7: Set i = 1. The initial values (xc0 , yc0 ) and system parameters are obtained by the secret key x1 , y1 , k, a, b and c. Pre-iterate the 2D-SCL system for 50 times and it is then discarded to avoid the transient effect, while also enhancing initial value sensitivity. Step 8: Iterate the improved system once to obtain the new values (xc1 , yc1 ). Similar to row encryption, the output values xc1 , yc1 are used to calculate the parameter Dcx for the column substitution and the parameter Dcy for the column shift respectively. The two parameters are ( Dcx = ((|xc1 | × 105 ) mod 254) + 1;
Figure 5: Secret key structure.
Step 3: Iterate the improved system once to obtain the new output values (xr1 , yr1 ). The xr1 is used to calculate the parameter Drx = ((|xr1 | × 105 ) mod 254) + 1,
where Drx ∈ [1, 255]. Assume the size of the plain image P is M × N. Then the output value yr1 is used to calculate the parameter Dry = ((|yr1 | × 105 ) mod N − 1) + 1
for the row shift, where Dry represents the step size of the circular shifting and Dry ∈ [1, N]. Step 4: Do row substitution. For i-th row pixels P(i, ·), conduct xor operation and the encrypted row pixels are P(i, ·) = P(i, ·) ⊕ Drx .
Dcy = ((|yc1 | × 105 ) mod M − 1) + 1,
where Dcx , Dcy are integers and Dcx ∈ [1, 255], Dcy ∈ [1, M]. 5
Original Original image image
Row Row substitution substitution
All All rows rows encrypted encrypted
Row Row shift shift
Y
N DPFMC DPFMC method method
Encrypted Encrypted image image
Chaotic Chaotic sequence sequence generator generator N
Y Secret Secret key key
Column Column substitution substitution
Column Column shift shift
All All columns columns encrypted encrypted
Figure 6: The encryption flowchart.
Step 9: Do column substitution. For i-th column pixels P(·, i), conduct xor operation and the encrypted column pixels are P(·, i) = P(·, i) ⊕ Dcx .
3.5. Simulation results Taking the 256 × 256 Lena image as an example, its corresponding secret key λ0 is computed according to Eq. (5). Setting computing precision L = 2−16 , K = [0.12341994, 0.56781988, 0.323243, 0.33491031, 1, 2π, π, 8, λ0 ]. Figure 8 shows the simulation results. Obviously, the encrypted image no longer provides any information about the plain image, and the decrypted image is the same as the plain image, indicating that this algorithm is effective.
Step 10: Do column shift. Circular shift the first Dcy pixels of P(·, i) to left. Step 11: Set i = i + 1, and conduct steps 8 - 10 in a loop until i > N. (3) Two-round encryption: Step 12: After the first-round encryption, conduct steps 1 - 11 again to further improve the algorithm performance.
4. Performance analysis and comparison 4.1. Statistical analysis Here, histogram, pixel correlation and information entropy are three indicators to evaluate the ability to resist statistical attack of the proposed algorithm.
3.3. Advantages about the encryption algorithm Compared with the cryptosystem in Ref. [23], this algorithm mainly improves in the following three aspects. (1) Chaotic system performance: Compared with the 2D-SIMM map proposed in Ref. [23], the proposed 2DSCL map has a larger parameter space and more stable performance, especially under low precision. (2) Algorithm robustness capability: For the decryption process in Ref. [23], one pixel change in the encrypted image spreads over all pixels in the decrypted image, thus this algorithm is easily affected by noise and occlusion attacks. In our algorithm, the SHA-1 hash function is applied and the initial values are still different with different plain images. This improvement makes our algorithm demonstrate robustness to resist against noise and occlusion attacks. (3) Anti-degradation performance: The 2D-SCL map has a longer cycle length than 2D-SIMM map under finite precision. In addition, our algorithm introduces the DPFMC method [40] to improve the dynamical degradation. Therefore, the proposed algorithm is effective to ensure information security with low computing precision.
4.1.1. Histogram analysis The histogram shows the distribution of the pixel intensity values for the image. Figure 9 (a) shows the histograms of plain image. In contrast, from Fig. 9 (b), the encrypted image produces a near-uniform distribution at the interval of [0, 255], and it is totally different from the plain image. From Fig. 9 (c), the decrypted image completely preserves the information of the plain image. Therefore, it is difficult for attackers to predict the plain image by statistical analysis. 4.1.2. Correlation of two adjacent pixels Pixel correlation is a common way to evaluate the performance of image encryption algorithm. The correlation of two adjacent pixels is measured by N
ρxy = s
3.4. Image decryption algorithm The decryption algorithm is the inverse of the encryption algorithm. Similarly, as shown in Fig. 7, the secret key and the DPFMC method are applied to the 2D-SCL map to generate a chaotic sequence for decryption, and then it is used for the column shift, the column substitution, the row shift and the row substitution.
∑ (xi − E(x))(yi − E(y))
i=1 N
2
N
, 2
∑ (xi − E(x)) ∑ (yi − E(y))
i=1
i=1
where x, y are two adjacent pixels, and N is the sample 1 N 1 N counts, and E(x) = ∑ xi , E(y) = ∑ yi . The distriN i=1 N i=1 bution of adjacent pixels in different directions is shown in Fig. 10. Apparently, from Fig. 10 (a)-(c), Lena image 6
Encrypted Encrypted image image
Column Column substitution substitution
Column Column shift shift
All All columns columns decrypted decrypted
Y
N DPFMC DPFMC method method
Decrypted Decrypted image image
Chaotic Chaotic sequence sequence generator generator N
Y Row Row substitution substitution
Row Row shift shift
Secret Secret key key
All All rows rows decrypted decrypted
Figure 7: The decryption flowchart.
tively more satisfactory. The comparisons with some existing algorithms are shown in Table 3 and the result further verifies that the proposed cryptosystem is capable of effectively resisting statistical attacks. a)
b)
4.1.3. Information entropy Here, information entropy is used to evaluate the randomness of images, and the entropy of an information source is M 1 H(m) = ∑ p(mi ) log , p(mi ) i=1
c)
Figure 8: Encryption and decryption results. a) Plain image. b) Encryption image. c) Decryption image. 800
800
800
600
600
600
400
400
400
200
200
200
0
0 0
100
a)
200
where m represents a message source, M is a total number of symbol, and p(mi ) is the probability of symbol mi [41]. For a 256×256 gray level image, the maximum information entropy is 8. The results for different images are listed in Table 4. Although the dynamics of the 2D-SCL system is degraded when the largest precision is 2−16 , the information entropy of the proposed algorithm are still extremely close to 8. Therefore, it is almost impossible to get visual information from encrypted images even with relatively low precision.
0 0
100
b)
200
0
100
200
c)
Figure 9: Histograms results. a) Histograms of plain image. b) Histograms of encrypted image. c) Histograms of decryption image.
4.2. Secret key analysis a)
b)
c)
d)
e)
f)
4.2.1. Key space analysis To ensure encryption security, the key space should be no less than 2128 . For the proposed secret key structure, −1 < x0 , y0 , x1 , y1 , λ < 1, the parameters k, a, b and c are acceptable at least at the range of (0.7, 1), (6, 14), (6, 14) and (2, 10) respectively. If the precision is set at 10−15 , the key space is (2 × 1015 )5 × 0.3 × 1015 × (8 × 1015 )3 = 4.9152 × 10138 , which is much larger than 2128 . Given that this cryptosystem is implemented with finite computing precision, the largest precision is set at 2−16 . Thus the key space is degraded into (2 × 216 )5 × 0.3 × 216 × (8 × 216 )3 = 0.3 × 2158 > 2128 , which is still sufficient for the encryption security demands. Therefore, the proposed algorithm is shown to have a large enough key space to resist different kinds of brute-force attacks.
Figure 10: Distribution of adjacent pixels. a) Horizontal direction of plain image. b) Vertical direction of plain image. c) Diagonal direction of plain image. d) Horizontal direction of encrypted image. e) Vertical direction of encrypted image. f) Diagonal direction of encrypted image.
has strong correlation between adjacent pixels in horizontal, vertical and diagonal directions. From Fig. 10 (d)-(f), points of the encrypted image are full of the space and distribute randomly. Furthermore, Table 2 shows the value of ρxy for different plain images and their corresponding encrypted images. Clearly, for both of the comparable schemes, the correlation of pixel values between two adjacent points is greatly reduced, but our algorithm is rela-
4.2.2. Key sensitivity analysis Key sensitivity is an significant indicator for measuring cryptosystem. Taking Lena as plain image, test results are displayed in Fig. 11. In the encryption process, 7
Image Flowers Boats Man Sailboat
Algorithms Plain image Ref. [9] Ref. [10] Ref. [23] Ours (2−16 )
Table 2: Correlation coefficients of the different images. Plain image Ref. [23] Horizontal Vertical Diagonal Horizontal Vertical Diagonal 0.9504 0.9239 0.8999 0.0014 0.0033 -0.0013 0.9571 0.9358 0.9016 0.0054 -0.0075 -0.0021 0.9565 0.9444 0.9140 -0.0017 -0.0044 -0.0014 0.9568 0.9584 0.9294 0.0003 0.0019 -0.0019
Horizontal 0.9646 0.0051 -0.0156 0.0021 0.0022
Lena Vertical 0.9324 0.0038 -0.0022 -0.0026 0.0013
Horizontal 0.0028 0.0007 0.0020 0.0014
Table 3: Correlation coefficients of different algorithms. Peppers Diagonal Horizontal Vertical Diagonal 0.9075 0.9421 0.9707 0.9264 0.0092 0.0094 0.0070 0.0057 -0.0028 0.0067 -0.0098 0.0007 -0.0037 0.0061 -0.0006 -0.0025 0.0008 0.0001 -0.0026 -0.0023
Ours (2−16 ) Vertical Diagonal -0.0013 -0.0010 -0.0026 0.0013 0.0030 0.0049 0.0001 0.0006
Horizontal 0.9483 0.0003 0.0025 0.028 0.0039
Camera Vertical 0.9221 0.0048 -0.0041 0.0152 0.0007
Diagonal 0.8927 0.0039 0.0004 0.0073 -0.0005
Table 4: Information entropy of different images. Image Lena Flowers Peppers Boats Man
a)
Plain image
Ref. [23]
Ours (2−16 )
7.2046 7.3213 7.4963 7.1914 7.1926
7.9976 7.9973 7.9974 7.9972 7.9974
7.9970 7.9974 7.9973 7.9974 7.9969
b)
c)
a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
k)
l)
d)
e)
f)
g)
h)
i)
j)
k)
l)
Figure 12: Secret key sensitivity test results under low computing precision. a) Encrypted image with x1 + 2−16 . b) Subtraction of a) and Fig. 8b). c) Encrypted image with y1 + 2−16 . d) Subtraction of c) and Fig. 8b). e) Encrypted image with b + 2−16 . f) Subtraction of e) and Fig. 8b). g) Encrypted image with c + 2−16 . h) Subtraction of g) and Fig. 8b). i) Decrypted image with x1 + 2−16 . j) Decrypted image with y1 + 2−16 . k) Decrypted image with b + 2−16 . l) Decrypted image with c + 2−16 .
thus more reliable in practical applications.
Figure 11: Secret key sensitivity test results. a) Lena image. b) Encrypted image. c) Encrypted image with x0 + 10−15 . d) Subtraction of c) and b). e) Encrypted image with b + 10−15 . f) Subtraction of e) and b). g) Encrypted image with λ + 10−15 . h) Subtraction of g) and b). i) Decrypted image. j) Decrypted image with x0 + 10−15 . k) Decrypted image with b + 10−15 . l) Decrypted image with λ + 10−15 .
4.3. Differential attack analysis Number of pixel changing rate (NPCR) and unified average changed intensity (UACI) are two common ways to measure the ability of resisting differential attack. Here, our cryptosystem is evaluated by the mathematical model established in Ref. [42]. The NPCR and the UACI are M N |sign(C1 (i, j) −C2 (i, j))| NPCR(C1 ,C2 ) = ∑ ∑ ; MN i=1 j=1
the encrypted images are quite different if one secret key is slightly changed by only 10−15 . In the decryption process, their corresponding decrypted images are wrong and image information is completely obscured. Considering the finite computing precision, Figure 12 shows the results of secret key sensitivity test when the largest precision of the algorithm decreases to 2−16 . Obviously, the proposed cryptosystem still extremely sensitive to the minimum step size 2−16 in both the encryption and decryption processes,
M N |C1 (i, j) −C2 (i, j)| UACI(C ,C ) = , 1 2 ∑ ∑ MNF i=1 j=1
where M × N is the size of the plain image, C1 and C2 represent two different images of the same size, and F is the 8
largest allowed pixel value in the images. sign(·) is the symbol function, if C1 (i, j) = C2 (i, j), |sign(·)| = 0. Otherwise, |sign(·)| = 1. Here, set M=256, N=256 and F=255, the ideal value of NPCR µN = 0.9961 and the ideal value of UACI µU = 0.3346. According to the criteria proposed in Ref. [42], the hypotheses of NPCR with α-level significance are ( HN0 : NPCR(C1 ,C2 ) = µN ;
they are used to evaluate resistance of the proposed cryptosystem against known-plaintext and chosen-plaintext attacks. The results are displayed in Fig. 13 and Table 8. As with other test images, the encrypted images for all-black and white images are not intelligible and their histogram are uniform as shown in Fig. 13. Table 8 shows that the correlation coefficients are greatly reduced, and entropies of the two images are both close to 8. In addition, their NPCR values are larger than N ∗ (0.05) and their UACI values are between U−∗ (0.05) and U+∗ (0.05). As all the tests are close to the ideal value, known-plaintext and chosenplaintext attacks can be effectively resisted in the proposed algorithm.
HN1 : NPCR(C1 ,C2 ) < µN .
And there is a critical value N ∗ , which is q F F − Φ−1 (α) MN ∗ , N = F +1
800 600 400
where Φ−1 (α) is the inverse cumulative density function of the standard normal distribution. When NPCR(C1 ,C2 ) < N ∗ , we reject HN0 . Otherwise, we accept HN0 . Similarly, the hypotheses of UACI with α-level significance are ( HU0 : UACI(C1 ,C2 ) = µU ;
200 0 0
a)
b)
100
200
c)
800 600 400
HU1 : UACI(C1 ,C2 ) < µU .
200 0
The critical value U−∗ and U+∗ is
0
d)
s −1 α Φ (F + 2)(F 2 + 2F + 3) F + 2 U−∗ = − ; 3(F + 1) 2 18MNF(F + 1)2 s −1 α F + 2 Φ (F + 2)(F 2 + 2F + 3) ∗ . + U+ = 3(F + 1) 2 18MNF(F + 1)2
e)
100
200
f)
Figure 13: Encryption results of all-black and white images. a) All-black image. b) Encrypted image for image a). c) The histogram of image b). d) All-white image. e) Encrypted image for image d). f) The histogram of image e).
If UACI(C1 ,C2 ) < (U−∗ , U+∗ ), we reject HU0 . Otherwise, we accept HU0 . In the test, one pixel value of the plain image was randomly changed by 1 bit. Each plain image is tested 100 times and the corresponding index is calculated. The results with different levels of significance are shown in Table 5 and Table 6. The pass rates are all stable above 90%. To further test the performance of the cryptosystem, the algorithm is compared with some existing algorithms newly proposed based on the Lena image, the Peppers image and the Boats image. As shown in Table 7, the result further shows that the proposed algorithm can effectively withstand differential attacks. 4.4. Known-plaintext and chosen-plaintext attacks analysis
a)
b)
c)
d)
e)
f)
Figure 14: Robustness against noise attack under low computing precision. a) Encrypted image with 0.2 salt and pepper noise. b) Encrypted image with 0.02 speckle noise. c) Encrypted image with 0.02 guassian noise. d) Decrypted image with 0.2 salt and pepper noise. e) Decrypted image with 0.02 speckle noise. f) Decrypted image with 0.02 guassian noise.
Here, two common attacks are used to evaluate image encryption algorithm: known-plaintext and chosenplaintext attacks. In our scheme, the SHA-1 hash values of the plain image are used to construct the secret key, and the iteration values of the 2D-SCL map are influenced by the plain image. Thus the values for substitution and shift are different with different images. All-black or white images are often used for adversaries to decipher algorithms, thus
4.5. Robustness analysis against noise and occlusion attacks To further analyze the security of the proposed algorithm, the robustness to resist noise and occlusion attacks 9
Images Lena Flowers Peppers Boats Man Sailboat
Images Lena Flowers Peppers Boats Man Sailboat
Table 5: NPCR results with different levels of significance Pass rate Minimum(%) Maximum(%) Mean(%) N ∗ (0.05) = 99.5693% N ∗ (0.01) = 99.5527% 99.55444 99.67651 99.60934 0.94 1 99.56360 99.65668 99.60732 0.99 1 99.52393 99.66431 99.60576 0.91 0.94 99.54834 99.66431 99.61235 0.96 0.98 99.52698 99.66736 99.60683 0.96 0.99 99.55750 99.66583 99.61247 0.95 1
Table 6: UACI results with different levels of significance Pass rate Minimum(%) Maximum(%) Mean(%) U−∗ (0.05) = 33.2824% U−∗ (0.01) = 33.2255% U+∗ (0.05) = 33.6447% U+∗ (0.01) = 33.7016% 33.27227 33.62435 33.45969 0.99 1 33.18326 33.61233 33.44325 0.97 0.98 33.29313 33.78318 33.50204 0.94 0.97 33.21376 33.69159 33.44747 0.95 0.99 33.27777 33.63484 33.44610 0.98 1 33.26352 33.62385 33.41567 0.94 1
Table 7: NPCR and UACI results of different algorithms. Ref. [9] Ref. [11] Ref. [23] NRCR UACI NPCR UACI NPCR UACI 99.59 33.48 99.60 33.49 99.61 33.33 99.61 33.41 99.60 33.43 99.65 33.59 99.61 33.43 99.60 33.46 99.60 33.42
Image Lena Peppers Boats
Ours(2−16 ) NPCR UACI 99.61 33.46 99.62 33.48 99.62 33.49
Table 8: The performance assessment results of all-black and white images. Correlation coefficients Information entropy NPCR(%) UACI(%) Horizontal Vertical Diagonal -0.0017 -0.0021 0.0016 7.9972 99.60686 33.45667 0.0014 -0.0020 0.0018 7.9974 99.60625 33.45387
Images All-black All-white
a)
b)
c)
d)
e)
f)
the encrypted pixel value, so the change of one pixel in the encrypted image affects the step size of cyclic shift and the secret key for substitution, then it spreads over all pixels in the decryption image. Therefore, this algorithm fails to resist noise and occlusion attacks. For the proposed scheme, the pixel change in the encrypted image does not affect the next iteration values of the 2D-SCL map, thus the impact of noise and occlusion attacks is shown to be limited. In the simulation, taking Lena as plain image, three different noises and three different sizes of data loss are added to test the robustness. As shown in Fig. 14 and Fig. 15, only a few pixels are contaminated in the decrypted image. Therefore, the proposed cryptosystem has strong robustness to resist against noise and occlusion attacks.
Figure 15: Robustness against occlusion attack under low computing precision. a) Encrypted image with 0.1 data loss. b) Encrypted image with 0.2 data loss. c) Encrypted image with 0.3 data loss. d) Decrypted image with 0.1 data loss. e) Decrypted image with 0.2 data loss. f) Decrypted image with 0.3 data loss.
4.6. Time complexity analysis Besides the security of encryption algorithms, running speed is also an essential condition to evaluate the performance of cryptosystems. The experimental environment is MATLAB R2016a with Intel Core i7-6700HQ CPU @ 2.60 GHz and 8.0 GB RAM on Windows 7 OS. Taking the Lena image as an example, the plain image is encrypted 50 times and the results are shown in Table 9. The time complexity of the two algorithms is θ (2(M + N)). In Ref. [23], the encryption image pixel value is calculated for each iteration to update the value of the 2D-SCL map. For our
is introduced, which is necessary for the transmission of encrypted images. For an ideal encryption algorithm, it must be extremely sensitive to a minor change of plain image or even one pixel change, while the pixel change of encrypted image has less impact on the decryption process. The iteration values in Ref. [23] are influenced by 10
scheme, the SHA-1 hash values are used to influence the iteration values and it is only calculated once at initialization, which takes less execution time. Therefore, although using the DPFMC method increases the time complexity, the total encryption time of the proposed algorithm is almost as fast as the algorithm proposed in Ref.[23].
Image size 256×256 512×512
Table 9: Time complexity comparisons Ours Ref. [23] One-round Two-round One-round Two-round 0.0146 0.0261 0.0133 0.0257 0.0331 0.0605 0.0302 0.0579
5. Conclusion This paper proposed a new hyperchaotic map based on the Sine map, the Chebyshev map and a linear function. Its performance was evaluated, and the results show that the proposed 2D-SCL map has wide attractor distribution, large Lyapunov exponents, high PE complexity and enough large cycle lengths under low computing precisions. Thus it presents favorable dynamical performances and has a wide application prospect. Based on the proposed map, a new image encryption scheme was designed. This scheme introduced a universal anti-degradation algorithm for chaotic maps, which improves the performance degradation of cryptosystem realized on low-precision devices. The performance assessment results show that the encryption algorithm maintains high security and low time complexity when the largest precision is 2−16 . It is also shown to be able to resist common attacks. Therefore, the proposed algorithm is applicable in devices with finite computing precision. In the future, more anti-degradation works and cryptanalysis works will be done for encryption algorithms based on chaotic systems. Acknowledgment This work is supported by the National Natural Science Foundation of China (61573383, 61161006 and 11747150), and the Postdoctoral Innovative Talents Support Program (BX20180386). References [1] C. L. Li, H. M. Li, F. D. Li, D. Q. Wei, X. B. Yang, J. Zhang, Multiple-image encryption by using robust chaotic map in wavelet transform domain, Optik 171 (2018) 277–286. doi:10.1016/j. ijleo.2018.06.029. [2] Y. Luo, Y. Liu, J. Liu, X. Ouyang, Y. Cao, X. Ding, Ecm-ibs: a chebyshev map-based broadcast authentication for wireless sensor networks, International Journal of Bifurcation and Chaos 29 (9) (2019) art. no. 1950118. doi:10.1142/S0218127419501189. [3] N. B. Slimane, N. Aouf, K. Bouallegue, M. Machhout, An efficient nested chaotic image encryption algorithm based on dna sequence, International Journal of Modern Physics C 29 (7) (2018) 1850058. [4] W. Liu, K. Sun, Y. He, M. Yu, Color image encryption using threedimensional sine icmic modulation map and dna sequence operations, International Journal of Bifurcation and Chaos 27 (11) (2017) 1750171.
11
[5] Y. G. Yang, J. Tian, H. Lei, Y. H. Zhou, W. M. Shi, Novel quantum image encryption using one-dimensional quantum cellular automata, Information Sciences 345 (2016) 257–270. [6] A. Souyah, K. M. Faraoun, An image encryption scheme combining chaos-memory cellular automata and weighted histogram, Nonlinear Dynamics 86 (1) (2016) 1–15. doi:10.1007/ s11071-016-2912-0. [7] L. Liu, J. Lin, S. Miao, B. Liu, A double perturbation method for reducing dynamical degradation of the digital baker map, International Journal of Bifurcation and Chaos 27 (7) (2017) 1750103. doi:10.1142/S0218127417501036. [8] C. Li, G. Luo, Q. Ke, C. Li, An image encryption scheme based on chaotic tent map, Nonlinear Dynamics 87 (1) (2017) 127–133. doi:10.1007/s11071-016-3030-8. [9] X. Wang, S. Wang, W. Na, Y. Zhang, A novel chaotic image encryption scheme based on hash function and cyclic shift, IETE Technical Review 36 (1) (2018) 39–48. doi:10.1080/02564602.2017. 1393352. [10] Y. Qi, C. Wang, A new chaotic image encryption scheme using breadth-first search and dynamic diffusion, International Journal of Bifurcation and Chaos 28 (4) (2018) 1850047. doi:10.1142/ S0218127418500475. [11] G. Ye, P. Chen, X. Huang, Q. Mei, An efficient pixel-level chaotic image encryption algorithm, Nonlinear Dynamics 94 (1) (2018) 745–756. doi:10.1007/s11071-018-4391-y. [12] L. Huang, C. Shuting, X. Mingqing, X. Xiaoming, A simple chaotic map-based image encryption system using both plaintext related permutation and diffusion, Entropy 20 (7) (2018) 535. doi:10. 3390/e20070535. [13] L. Liu, S. Miao, A new simple one-dimensional chaotic map and its application for image encryption, Multimedia Tools and Applications 77 (1) (2018) 1–18. doi:10.1007/s11042-017-5594-9. [14] J. Chen, F. Han, W. Qian, Y. D. Yao, Z. L. Zhu, Cryptanalysis and improvement in an image encryption scheme using combination of the 1d chaotic map, Nonlinear Dynamics 93 (4) (2018) 2399–2413. doi:10.1007/s11071-018-4332-9. [15] Z. Hua, J. Fan, B. Xu, H. Huang, 2d logistic-sine-coupling map for image encryption, Signal Processing 149 (2018) 148–161. doi: 10.1016/j.sigpro.2018.03.010. [16] H. Liu, X. Wang, Color image encryption based on one-time keys and robust chaotic maps, Computers and Mathematics with Applications 59 (10) (2010) 3320–3327. doi:10.1016/j.camwa. 2010.03.017. [17] C. Cao, K. Sun, W. Liu, A novel bit-level image encryption algorithm based on 2d-licm hyperchaotic map, Signal Processing 143 (2017) 122–133. doi:10.1016/j.sigpro.2017.08.020. [18] R. Ye, A novel chaos-based image encryption scheme with an efficient permutation-diffusion mechnism, Optics Communications 284 (22) (2011) 5290–5298. doi:10.1016/j.optcom.2011.07. 070. [19] X. Wang, W. Qian, A novel image encryption algorithm based on dynamic s-boxes constructed by chaos, Nonlinear Dynamics 75 (3) (2014) 567–576. doi:10.1007/s11071-013-1086-2. [20] Z. Hua, Y. Zhou, C. M. Pun, C. L. P. Chen, 2d sine logistic modulation map for image encryption, Information Sciences 297 (2015) 80–94. doi:10.1016/j.ins.2014.11.018. [21] Wang, Xingyuan, Xu, Dahai, A novel image encryption scheme based on brownian motion and pwlcm chaotic system, Nonlinear Dynamics 75 (1-2) (2014) 345–353. doi:10.1007/ s11071-013-1070-x. [22] H. Liu, X. Wang, Color image encryption using spatial bit-level permutation and high-dimension chaotic system, Optics Communications 284 (16) (2011) 3895–3903. doi:10.1016/j.optcom. 2011.04.001. [23] W. Liu, K. Sun, C. Zhu, A fast image encryption algorithm based on chaotic map, Optics and Lasers in Engineering 84 (2016) 26–36. doi:10.1016/j.optlaseng.2016.03.019. [24] C. Li, Y. Zhang, E. Y. Xie, When an attacker meets a cipher-image in 2018: A year in review, Journal of Information Security and Applications 48 (2019) 102361. doi:10.1016/j.jisa.2019. 102361. [25] C. Li, D. Lin, Cryptanalyzing an image encryption algorithm based on autoblocking and electrocardiography, IEEE Multimedia 25 (4)
(2018) 46–56. doi:10.1109/MMUL.2018.2873472. [26] S. Dhall, S. K. Pal, K. Sharma, Cryptanalysis of image encryption scheme based on a new 1d chaotic system, Signal Processing 146 (2018) 22–32. [27] M. Antonelli, L. D. Micco, H. Larrondo, O. A. Rosso, Complexity of simple, switched and skipped chaotic maps in finite precision, Entropy 20 (2) (2018) 135. doi:10.3390/e20020135. [28] C. Beck, G. Roepstorff, Effects of phase discretization on the longtime behavior of dynamical systems, Physica D Nonlinear Phenomena 25 (1) (1987) 173–180. doi:10.1016/0167-2789(87) 90100-x. [29] L. I. Shujun, G. Chen, X. Mou, On the dynamical degradation of digital piecewise linear chaotic maps, International Journal of Bifurcation and Chaos 15 (10) (2005) 3119–3151. doi:10.1142/ S0218127405014052. [30] C. Li, B. Feng, S. Li, J. Kurths, G. Chen, Dynamic analysis of digital chaotic maps via state-mapping networks, IEEE Transactions on Circuits and Systems I: Regular Papers 66 (6) (2019) 2322–2335. doi:10.1109/TCSI.2018.2888688. [31] J. T. Xiao, W. Zhu, Z. Miao, L. Yang, X. Hui, M. Jing, An image encryption algorithm based on the perturbed high-dimensional chaotic map, Nonlinear Dynamics 80 (3) (2015) 1493–1508. doi: 10.1007/s11071-015-1957-9. [32] L. D. Liu, H. S. Song, Parameter estimation of one-dimensional discrete chaotic system based on chaotic synchronization, Electronic Design Engineering 13 (2014) 123–125. doi:10.14022/j.cnki. dzsjgc.2014.13.032. [33] M. Yu, K. Sun, W. Liu, S. He, A hyperchaotic map with grid sinusoidal cavity, Chaos Solitons Fractal 106 (2018) 107–117. doi: 10.1016/j.chaos.2017.11.004. [34] S. He, K. Sun, H. Wang, Multivariate permutation entropy and its application for complexity analysis of chaotic systems, Physica A Statistical Mechanics and Its Applications 461 (2016) 812–823. doi:10.1016/j.physa.2016.06.012. [35] W. Yue, G. Yang, H. Jin, J. P. Noonan, Image encryption using the two-dimensional logistic chaotic map, Journal of Electronic Imaging 21 (1) (2012) 013014. doi:10.1117/1.JEI.21.1.013014. [36] Z. Hua, Y. Zhou, C. M. Pun, C. L. P. Chen, 2d sine logistic modulation map for image encryption, Information Sciences 297 (2015) 80–94. doi:10.1016/j.ins.2014.11.018. [37] S. Pincus, Approximate entropy (apen) as a complexity measure, Chaos 5 (1) (1955) 110–117. doi:10.1063/1.166092. [38] K. Sun, S. He, Y. He, L. Yin, Complexity analysis of chaotic pseudo-random sequences based on spectral entropy algorithm, Acta Physica Sinica 142 (2017) 292–300. doi:10.1016/j. sigpro.2017.06.014. [39] K. Sun, H. Shaobo, Y. Linzi, D. LiKun, Application of fuzzyen algorithm to the analysis of complexity of chaotic sequence, Acta Physica Sinica 61 (13) (2012) 130507. doi:10.1007/ s12043-012-0289-2. [40] C. Chen, K. Sun, Y. Peng, A. O. A. Alamodi, A novel control method to counteract the dynamical degradation of a digital chaotic sequence, The European Physical Journal Plus 134 (31) (2019) 1– 12. doi:10.1140/epjp/i2019-12374-y. [41] C. Li, D. Lin, B. Feng, J. L¨u, F. Hao, Cryptanalysis of a chaotic image encryption algorithm based on information entropy, IEEE Access 6 (2018) 75834–75842. doi:10.1109/ACCESS.2018. 2883690. [42] Y. Wu, J. Noonan, S. Agaian, Npcr and uaci randomness tests for image encryption, Cyper J(JSAT) 90 (2011) 146–154.
12