1 Introduction

With the progress of science and technology and the development of the Internet, emerging technologies such as the Internet of things and big data have gradually entered people’s life [3, 41], which has greatly facilitated people’s daily life and promoted the development of society. With the increase in data volume, the risk of data leakage increases accordingly. The security of information is the primary problem of cloud computing and big data, and it is also the main problem at present. Therefore, secure communication and multimedia security have become important research topics in the field of computer science. To ensure the security of multimedia information in communication, scholars have proposed many methods, including multimedia hiding technology, digital media forensics, biometrics, and so on [14]. As the most representative part of multimedia information, the digital image is also a research hotspot in the field of secure communication and multimedia information hiding. Scholars have also proposed many protection strategies, such as image encryption [28, 30] and image watermarking [19]. In recent years, the emergence of chaotic cryptography, which combines chaos theory with cryptography, can better meet the security needs of the image field.

Chaos theory originated in 1960s, which was put forward by Lorenz [18], an American meteorologist, when he studied atmospheric flow. Chaos has many good properties such as pseudo-random and initial sensitivity. Therefore, chaos theory has an important influence in many fields, such as economics, computer science and communication [1, 8, 15]. In 1989, Kaneko [12] proposed the coupled map lattice (CML) model, which is a spatiotemporal chaotic model originated from the field of fluid mechanics. CML has been widely concerned and studied because of its excellent dynamic behavior. Khellat [13] proposed global nonlocal coupled map lattice, Meherzi [22] proposed one-way coupled map lattice, Zhang and Wang [44, 45] proposed Arnold coupled logistic map lattice (ACLML) and mixed linear-nonlinear coupled logistic map lattice (MLNCML). These spatiotemporal chaotic systems improve their chaotic performance to some extent, but there are still some shortcomings. Generating chaotic signals on machines with limited accuracy will lead to the degradation of the dynamic behavior of chaotic characteristics. Several feasible methods are proposed to solve this problem [10, 16, 27, 34], such as using higher accuracy, cascading multiple chaotic systems, etc. Common operations in image encryption [3039] include Arnold map, DNA coding, wavelet transform, etc. Wang [29] applied a synchronous update Boolean network to the field of image encryption and designed an image encryption algorithm. Hua [11] proposed a new 2D Logistic-adjusted-Sine map (2D-LASM). Xian [38] proposed the concept of fractal matrix and combined it with image encryption to design an encryption algorithm. Ye [42] proposed a new chaotic circuit with multi-mode resistor and applied it to encryption. However, these algorithms have some disadvantages due to their own limitations, such as the periodicity of Arnold map.

In the era of big data, image encryption is often aimed at not only one image, but multiple images. The characteristics of the spatiotemporal chaotic system just meet this demand, but the traditional CML and other systems have many shortcomings. Therefore, in order to improve the characteristics of the spatiotemporal chaos and the efficiency of image encryption algorithm, a new spatiotemporal chaotic system and encryption algorithm are proposed in this paper. A spatiotemporal chaotic system with dynamic coupling coefficient and coupling term perturbation, dynamic coupling perturbation map lattice (DCPML), is constructed. This operation enhances the pseudo-randomness of chaos to a certain extent and proves the performance of the system through various indexes. On this basis, a bit-level image encryption algorithm is designed. Through simulation and analysis, it is proved that the encryption scheme is feasible and DCPML has good cryptographic and chaotic characteristics. The overall contribution of the proposed work can be summarized as follows:

  1. 1)

    An improved spatiotemporal chaotic system is proposed, in which the coupling term is replaced by the perturbation function to improve the chaotic characteristics.

  2. 2)

    The chaotic characteristics of the proposed system are verified and applied to the field of chaotic encryption to prove the performance of the system.

  3. 3)

    A new bit-level image encryption algorithm is proposed, which is proved to have high security and robustness through simulation and test.

  4. 4)

    It has a good performance in the test of images in USC-SIPI image database.

The remainder of the paper is organized as follows. Second 2 introduces the related work. Section 3 introduces the proposed DCPML system and analyzes the proposed system. Section 4 introduces the application of DCPML system in image encryption. Section 5 is the experimental results and safety analysis. Finally, the conclusion is in Section 6.

2 Related work

In recent years, spatiotemporal chaotic system and image encryption have become a research hotspot [6]. Many scholars have also devoted themselves to the research in this direction and published many papers.

Zhang et al. [46] proposed a new two-dimensional nonlinear coupled map lattices and a color image encryption algorithm. The spatiotemporal chaotic system adopts spatial nonlinear coupling to replace the adjacent coupling and reduce the periodic window. However, when the coupling coefficient is in part, the chaotic characteristics will still be low. The encryption algorithm only encrypts the color image, and the object of encryption is also limited.

Wang et al. [34] proposed a nonlinear delayed feedback Logistic chaotic map (NDFL), applied it to DMLNCML, improved it, and obtained the delayed feedback dynamic mixed linear nonlinear coupling map lattice (DFDMLMCML). The spatiotemporal chaotic system has achieved good performance in chaotic characteristics and randomness. The encryption algorithm adopts the mixed encryption algorithm of pixel value, pixel bit, and binary bit. At the same time, the linear nonlinear diffusion operation is introduced to complete the scrambling and diffusion process at one time. However, due to the introduction of delayed feedback and the complex calculation of encryption, the complexity increases, and the efficiency decreases when applied to encryption.

Liu et al. [17] proposed an image encryption algorithm based on DNA dynamic coding and adaptive permutation. A new four-dimensional hyperchaotic system is designed, which has strong pseudo-randomness and a wide range of chaotic parameters. On this basis, an image encryption algorithm is designed, which adopts the methods of DNA dynamic coding, dynamic calculation, and dynamic decoding to make the operation result more unpredictable and improve the sensitivity of the algorithm to plaintext image and key. However, the cost of image encryption algorithm is high in terms of time efficiency, and the robustness of the algorithm needs to be further improved.

Yildirim et al. [43] proposed an optical device and encryption technology using chaotic system. Firstly, the circuit is used to realize the chaotic system, and an operational transmission amplifier (OTA) is designed. Then the encryption algorithm adopts the DNA encoding and decoding operation mode and expands it to greatly increase the encoding and decoding rules and operation rules. Then many security tests are carried out. The numerical test results show that the encryption algorithm can resist common attacks. However, due to the need for DNA encoding, decoding and operation, the encryption complexity is improved.

In addition, in recent years, many excellent papers on image encryption based on chaos have been published successively [7]. In Table 1, we combed the methods and highlights used in some papers. These research results have greatly promoted the efficiency and security in the field of chaos and image encryption, but these algorithms still have some shortcomings, such as Ref. [35] each encryption requires three images, which is partially limited in practical application scenarios; Ref. [36] when converting color images and DNA coding operations, the encryption efficiency of the algorithm is low. Therefore, there are still some problems to be solved in this field.

Table 1 Related work

3 Introduction of DCPML model

3.1 DCPML model

The most classical CML model was proposed by Kaneko [12], and its mathematical expression can be expressed as follows:

$$\left\{\begin{array}{l}{x}_{n+1}(i)=\left(1-e\right)f\left({x}_n(i)\right)+\frac{e}{2}\left(f\left({x}_n\left(i-1\right)\right)+f\left({x}_n\left(i+1\right)\right)\right)\\ {}f\left({x}_n\right)=\mu {x}_n\left(1-{x}_n\right)\end{array}\right.$$
(1)

where x represents the lattice in the chaotic sequence, e represents the coupling coefficient, f (x) represents the Logistic map and μ represents the parameter of Logistic map, and x and e are values between 0 and 1.

In order to overcome the defect that some lattice chaotic state is weak or even not chaotic when the coupling parameters of the spatiotemporal chaotic model are in some ranges, Wang [31] proposed logistic-dynamic coupled logistic map lattice (LDCML). The difference between LDCML model and CML model is that dynamic function L(e) is used instead of coupling coefficient e, where L(e) = γe(1 − e), γ represents the parameter of Logistic map.

To enhance the pseudo-randomness of the spatiotemporal chaotic system, the output term of 2D chaotic system is used as the coupling coefficient of spatiotemporal chaos, and the coupling term is perturbed. The definition of DCPML model is as follows:

$$\left\{\begin{array}{l}{x}_{n+1}(i)=\left(1-{e}_n\right)f\left({x}_n(i)\right)+\frac{e_n}{2}\left(f\left(\sqrt{u_n\times {x}_n\left(i-1\right)}\right)+f\left(\sqrt{u_n\times {x}_n\left(i+1\right)}\right)\right)\\ {}f(x)=\mu x\left(1-x\right)\\ {}\left\{\begin{array}{c}{e}_{n+1}=\sin \left(\pi r\left({u}_n+3\right){e}_n\left(1-{e}_n\right)\right)\\ {}{u}_{n+1}=\sin \left(\pi r\left({e}_{n+1}+3\right){u}_n\left(1-{u}_n\right)\right)\end{array}\right.\end{array}\right.$$
(2)

where e and u are two output terms of the 2D-LASM. The boundary condition of spatiotemporal chaos system is periodic boundary which makes space dimension i belong to [1, L].

Next, by analyzing the Kolmogorov-Sinai entropy, information entropy, and other indicators of CML and DCPML, it can be proved that DCPML has better cryptographic properties than the CML. In order to better demonstrate the advantages of the DCPML model and eliminate the influence of Logistic mapping and two-dimensional chaos, the parts with better chaotic performance are selected in terms of parameter selection., the parameter μ of Logistic map is 3.99, the parameter r of 2D chaotic map is 0.66 and the lattices number L = 100.

3.2 Kolmogorov-Sinai entropy analysis

Lyapunov exponent (LE) [25, 26] can be used to estimate the separation of adjacent orbits in phase space, and can be used to measure the dynamic characteristics, so it is one of the characteristics used to identify chaos. The formula is as follows:

$$\lambda =\mathit{\lim}\frac{1}{n}\sum_{i=0}^{n-1}\mathit{\ln}{\left|\frac{dF(x)}{dx}\right|}_{x={x}_i}$$
(3)

where F(x) is the dynamic system and i is the time sequence index.

Kolmogorov-Sinai entropy analysis can effectively show the influence of different parameters on the chaotic behavior of the system. Kolmogorov-Sinai entropy density (KED) h is used to measure the chaos of spatiotemporal chaotic system by normalized positive LE. Kolmogorov-Sinai entropy breadth (KEB) hu is proposed by Zhang to describe the proportion of chaotic lattice in the system. The calculation formulas are as follows:

$$h=\frac{\sum_{i=1}^L{\lambda}_{(i)}^{+}}{L}$$
(4)
$$hu=\frac{L^{+}}{L}$$
(5)

where L+ represents the number of time sequences in which LE is a positive number. The KED and KEB of CML and DCPML are shown in Fig. 1a-d respectively. The X-axis represents the coupling coefficient e. The Y-axis represents the Logistic map coefficient μ. The Z-axis is KSD and KSB. It is obvious that compared with CML system, the chaos performance of DCPML system is obviously better. With the increase of the parameter μ, the chaotic performance of the two spatiotemporal chaotic systems becomes stronger. However, in the two intervals of 0.1 < e < 0.2 and 3.7 < μ < 3.8, the chaotic performance of CML system decreases obviously. However, the dynamic coupling coefficient and disturbance function of DCPML system improve these shortcomings, and the chaotic characteristics of DCPML system are obviously improved.

Fig. 1
figure 1

KS entropy: (a) KED of CML; (b) KED of DCPML; (c) KEB of CML; (d) KEB of DCPML

It can be seen in Fig. 2 about 75% of the parameter pairs can make DCPML system satisfy the requirement that all spatial lattices are in chaotic state, while only about 37% of the parameter pairs can make CML system satisfy the requirement. Compared with CML, DCPML has nearly 40% more parameter pairs, which can make the chaotic system completely in chaotic state. It shows that compared with CML system, DCPML system has better chaotic characteristics.

Fig. 2
figure 2

Percentage of lattices in chaos for different parameter pairs in DCPML (blue) and CML (red)

3.3 Bifurcation diagram

Bifurcation diagram is an intuitive representation of a series of period doubling generated by chaotic system under different parameters. Without losing generality, we analyze the bifurcation diagrams of the 20th, 50th and 80th lattices of CML and DCPML respectively. In Fig. 3, the bifurcation diagrams of two spatiotemporal chaotic systems are shown when the initial value of e is 0.6. It can be seen that the period window of DCPML is obviously smaller than that of CML.

Fig. 3
figure 3

Bifurcation Diagram: (a) 20th lattice of CML; (b) 50th lattice of CML; (c) 80th lattice of CML; (d) 20th lattice of DCPML; (e) 50th lattice of DCPML; (f) 80th lattice of DCPML

3.4 Information entropy

In 1949, the concept of information entropy was proposed by Shannon [24], which can describe the randomness of dynamic system and chaotic system. Therefore, the pseudo-random sequence can be evaluated by information entropy. It can be defined as Eq. (6):

$$H(s)=-\sum_{i=1}^nP\left({s}_i\right){\mathit{\log}}_2p\left({s}_i\right)$$
(6)

where s is the information source. In this paper, the number of information source states n is 10. Because the value of the sequence is between 0 and 1, the ten states are s1 = [0, 0.1), s2 = [0.1, 0.2), ..., s10 = [0.9, 1]. In addition, p (si) is the probability of state si. Theoretically, the maximum information entropy of each lattice in spatiotemporal chaotic system is log210 ≈ 3.32.

As shown in Fig.4a-d, the information entropy of CML and DCPML is compared when μ = 3.8 and μ = 3.99. It can be seen that CML system has obvious defects in these parameter ranges, while DCPML system is almost close to the ideal value in this range.

Fig. 4
figure 4

Information entropy of each lattice: (a) The CML system at μ = 3.8; (b) The DCPML system at μ = 3.8; (c) The CML system at μ = 3.99; (d) The DCPML system at μ = 3.99

3.5 Mutual information

Mutual information can represent the independent relationship between two random variables, indicating the strength of the dependence between two variables. It can be defined as Eq. (7). According to the definition of entropy, the expansion result can be obtained, as shown in Eq. (8):

$$I\left(X,Y\right)=H(X)-H\left(X|Y\right)$$
(7)
$$I\left(X,Y\right)=\sum_{x,y}p\left(x,y\right)\mathit{\log}\frac{p\left(x,y\right)}{p(x)p(y)}$$
(8)

where X = {x1, x2, …, xn}, Y = {y1, y2, …, yn}, represents different time sequences in spatiotemporal chaotic system. H(X) denotes the information entropy of sequence X. In spatiotemporal chaotic system, the mutual information between multiple lattices should be as low as possible to prevent the chaotic sequence of unknown lattice from being recovered based on the chaotic sequence of known lattice. To display the mutual information of the system more intuitively under different parameters, we analyze the system through average mutual information. It can be defined as Eq. (9):

$$Ld=\frac{\sum\limits_{i=1}^L\sum\limits_{j=1}^{L,j\ne i}I\left({x}_i,{y}_j\right)}{L\left(L-1\right)}$$
(9)

For the convenience of analysis, let L = 10. The average mutual information of CML and DCPML is shown in Fig. 5. When the parameters μ ∈ [3.6, 4] and e ∈ [0, 1], more than half of CML systems have mutual information values higher than 0.5, while DCPML systems almost have mutual information values close to 0 within this parameter range.

Fig. 5
figure 5

Average mutual information: (a) CML; (b) DCPML

3.6 Spatiotemporal behaviors

The traditional CML model of spatiotemporal chaotic system has six spatiotemporal modes: frozen random pattern, complete turbulence pattern, and so on. As can be seen in Fig. 6, when the parameter μ ≥ 3.7, DCPML system is in complete turbulence pattern. Compared with CML system, chaos is improved significantly.

Fig. 6
figure 6

Space-time diagram and space amplitude diagram of DCPML: (a) μ = 3.7; (b) μ = 3.8; (c) μ = 3.9; (d) μ = 4

4 Application in image encryption

The encryption process can be roughly divided into several parts: the generation of secret key and chaotic sequences, bit-level confusion based on DCPML system, and diffusion. After encryption, the original plain image is transformed into a noise like image, so that the information in the plain image can be protected. The brief encryption flow chart is shown in Fig. 7. Without losing generality, this section describes the detailed steps of encrypting an image of size M × N.

Fig. 7
figure 7

Encryption flow chart

4.1 Key and chaotic sequences generation

In order to resist violent attacks more effectively, there are certain requirements for the key, in which the length of the secret key should not be less than 2100 [2]. In this paper, the length of the secret key is set to 280-bits. The secret key consists of a random string K of 260-bits length and the average value of plaintext pixels. The initial value of DCPML system is determined by the first 200-bits, and the parameter of DCPML system {e, u, μ} are determined by the rest of the key and the average value of the plain image pixels. The specific process can refer to Algorithm 1. Without losing generality, the random string is taken as K:

$$K=5\mathrm{b}\mathrm{e}9\mathrm{cb}317\mathrm{c}7\mathrm{c}277\mathrm{c}5\mathrm{d}5\mathrm{b}0\mathrm{f}1\mathrm{e}260\mathrm{f}24\mathrm{f}840\mathrm{c}04\mathrm{f}0\mathrm{af}628\mathrm{d}9617\mathrm{ad}5\mathrm{f}6\mathrm{b}3\mathrm{d}733\mathrm{e}9\mathrm{cfd}$$

According to Algorithm 1, we can get the system parameters {e, u, μ} = {0.5489025115966, 0.5882196426391, 3.9947808265686} and the initial value. By iterating DCPML system 2MN times, discard the values of the first 500 time to avoid the transient effect, the sequence S1, S2 and SI used for encryption is obtained.

Algorithm 1
figure a

The generation of initial values and sequences

4.2 Bit-level confusion and diffusion

Confusion and diffusion are the two most common operations in image encryption. They can effectively destroy the correlation between image pixels and resist attacks.

Firstly, the image with the size of M × N is converted into a binary matrix with the size of MN × 8, and the bits of each pixel value are scrambled by cyclic shift operation. Then, each row of the matrix performs the cyclic shift operation again according to the value of sequence S1, and reorders the rows according to SI. Finally, perform the reverse cyclic shift operation in the first step, and convert the decimal matrix with the size of M × N to obtain the scrambled image. Algorithm 2 describes the encryption process in more detail, and Fig. 8 shows an example of the confusion process.

The diffusion adopts XOR operation. The generated chaotic sequence S2 is used to XOR the scrambled image and change its pixel value. The processes can be defined as:

$$C(i)=\left\{\begin{array}{l}{C}_2(i)\oplus S2(i),i=1\\ {}\left(\left({C}_2\left(i-1\right)+{C}_2(i)\right)\mathit{\operatorname{mod}}\;256\right)\oplus S2(i),i\ne 1\end{array}\right.$$
(10)

where ⊕ represents the XOR operation. After diffusion, the ciphered image C can be obtained.

Algorithm 2
figure b

Bit-level confusion and diffusion

Fig. 8
figure 8

A example of bit-level confusion

5 Simulation results and security analysis

In this algorithm, the main time-consuming parts are chaos iteration, confusion and diffusion. When the encrypted image size is M × N. The time complexity of iterative chaotic system is O(M × N). In the confusion stage, the time complexity of cyclic shift and index permutation is O(8M × N). In the diffusion phase, the time complexity of bit-level XOR is O(M × N). Therefore, the time complexity is O(10M × N).

In order to prove the feasibility and security, common security experiments are done on the encryption algorithm, and its security is analyzed and verified. The encryption and decryption program are implemented with MATLAB 2020A. The operating system and configuration are Windows 10 and 8 GB RAM.

5.1 Simulation results

In Fig. 9, we give the simulation results of gray image, binary image and color image, and the gray histogram of images. From Fig. 9a and c, we can see that the plain image becomes a noise like image after encryption. By using the correct key to decrypt the cipher image, the original image can be restored to the original image losslessly. Comparing the histogram of plain image and cipher image, we can find that the gray histogram of encrypted image is more uniform, and the attacker cannot obtain effective information from it.

Fig. 9
figure 9

Simulation results: (a) Plain images; (b) Histogram of (a); (c) Encryption of (a); (d) Histogram of (c); (e) Decryption of (c)

5.2 Secret key analysis

A secure encryption algorithm should not only ensure the size of the secret key space, but also ensure the sensitivity to the secret key. Even if the secret key changes slightly, the image encrypted twice will be greatly different, or the image decrypted with two secret keys will be completely different. Here we select K as the correct key, K1 is a key slightly different from K:

$${\displaystyle \begin{array}{c}K=5\mathrm{b}\mathrm{e}9\mathrm{cb}317\mathrm{c}7\mathrm{c}277\mathrm{c}5\mathrm{d}5\mathrm{b}0\mathrm{f}1\mathrm{e}260\mathrm{f}24\mathrm{f}840\mathrm{c}04\mathrm{f}0\mathrm{af}628\mathrm{d}9617\mathrm{ad}5\mathrm{f}6\mathrm{b}3\mathrm{d}733\mathrm{e}9\mathrm{cf}\mathrm{d}\\ {}K1=5\mathrm{b}\mathrm{e}9\mathrm{cb}317\mathrm{c}7\mathrm{c}277\mathrm{c}5\mathrm{d}5\mathrm{b}0\mathrm{f}1\mathrm{e}260\mathrm{f}24\mathrm{f}840\mathrm{c}04\mathrm{f}0\mathrm{af}628\mathrm{d}9617\mathrm{ad}5\mathrm{f}6\mathrm{b}3\mathrm{d}733\mathrm{e}9\mathrm{cf}6\end{array}}$$

The key sensitivity analysis results are shown in Fig. 10. Among them, Fig. 10b and c are the results of encryption using secret key K and K1 respectively, Fig. 10d is the absolute value of the difference between the pixel values of the two cipher images encrypted with two secret keys, and Fig. 10e and f are the results of using two keys to decrypt the image encrypted with K, respectively. Even if the key change is very small, the difference between encryption and decryption is very large.

Fig. 10
figure 10

Key sensitivity analysis: (a) Plaintext image; (b) Image encrypted with K; (c) Image encrypted with K1; (d) The difference between (b) and (c); (e) Image decrypted with K; (f) Image decrypted with K1

5.3 Statistical analysis

5.3.1 Correlation analysis

In the plain image with visual significance, there is a strong correlation because of the small difference between the pixel values of adjacent pixels, which has a certain security risk. One of the most important tasks in image encryption is to break the correlation to resist the attacker’s statistical analysis attack. The calculation formula is as follows:

$${r}_{xy}=\frac{E\left(\left(x-E(x)\right)\left(y-E(y)\right)\right)}{\sqrt{D(x)}\sqrt{D(y)}}$$
(11)

where x and y are the pixel values of two adjacent pixels in the correlation analysis. E(x) and D(x) are defined as follows:

$$\left\{\begin{array}{l}E(x)=\frac{1}{N}\sum\limits_{i=1}^N{x}_i\\ {}D(x)=\frac{1}{N}\sum\limits_{i=1}^N{\left({x}_i-E(x)\right)}^2\end{array}\right.$$
(12)

where N is the total number of randomly selected pixels. In this paper, 5000 pairs of adjacent pixels are randomly selected to verify the ability of the algorithm to break the pixel correlation. The correlation test results of Pepper’s plain image and cipher image in three directions are shown in Fig. 11. From the test results, it can be seen that the proposed algorithm can well break this correlation.

Fig. 11
figure 11

Correlation coefficients: (a) Horizontal correlation of Pepper’s plain image and cipher image; (b) Vertical correlation of Pepper’s plain image and cipher image; (c) Diagonal correlation of Pepper’s plain image and cipher image

Figure 12 shows the correlation coefficients of 21 images from the USC-SIPI miscellaneous image database. It can be seen from Fig. 12, the correlation between adjacent pixels of plain images of these images is between 0.8 and 1, which is very strong, while the correlation between adjacent pixels of encrypted images is between −0.1 and 0.1, which is almost zero. In Table 2, the average correlation is compared with other algorithms. It can be seen that the proposed algorithm has lower average correlation and stronger resistance to statistical attacks.

Fig. 12
figure 12

Correlation coefficients

Table 2 Compared with other algorithms

5.3.2 Information entropy

The definition of information entropy is as Eq. (6) in Section 3.4. For the signal source with 2N signals, the ideal value should be N. In this section, information entropy is used to evaluate the disorder and randomness of cipher image pixel values. Table 3 and Table 4 gives the test results and comparison with the other three algorithms. It can be seen that the information entropy of the image encrypted by this algorithm is above 7.99, indicating that the pixel value of the encrypted image has strong randomness.

Table 3 Information entropy
Table 4 Information entropy

5.4 Differential attack

Differential attack is to encrypt the plain image with small change, and then analyze the difference between these encrypted images to crack the encryption algorithm. It is a selective plaintext attack. The diffusion operation can amplify the small changes and make the pixels interact with each other, to achieve the complete avalanche effect. The pixel number change rate (NPCR) refers to the degree of difference between two images. The calculation method is the number of pixels with the same position but different pixel values divided by the total number of pixels in two images with the same total number of pixels. Unified average intensity of change (UACI) refers to the sum of the absolute value of the pixel value difference at the corresponding position of two images divided by the product of pixel level and total number of pixels. NPCR and UACI are used to evaluate the differential attack capability of encryption algorithms. They are defined as follows:

$$\boldsymbol{NPCR}=\frac{\sum_{i,j}E\left(i,j\right)}{TP}\times 100\%$$
(13)
$$\boldsymbol{UACI}=\frac{1}{TP}\sum_{i,j}\frac{\left|{C}_1\left(i,j\right)-{C}_2\Big(i,j\Big)\right|}{255}$$
(14)

where TP is the number of pixels. C1 and C2 are cipher images of the two images. If C1(i, j) is equal to C2(i, j), then E(i, j) is equal to 0; otherwise, E(i, j) is equal to 1.

\({N}_{\alpha}^{\ast }\) and \({U}_{\alpha}^{\ast }\) are the two critical values [37]. In the NPCR and UACI test, in order to limit the change rate to the image and the change intensity of the pixel value of the encryption algorithm, the value of NPCR must larger than \({N}_{\alpha}^{\ast }\), the value of UACI is in the interval (\({U}_{\alpha}^{\ast -}\), \({U}_{\alpha}^{\ast +}\)). They are defined as Eq. (15) and Eq. (16).

$${N}_{\alpha}^{\ast }=\frac{L-{\Phi}^{-1}\left(\alpha \right)\sqrt{L/ RC}}{L+1}$$
(15)
$$\left\{\begin{array}{c}{U}_{\alpha}^{\ast -}=\frac{L+2}{3L+3}-{\varPhi}^{-1}\left(\alpha /2\right)\times \sqrt{\frac{\left(L+2\right)\left({L}^2+2L+3\right)}{18{\left(L+1\right)}^2\times L\times MN}}\\ {}{U}_{\alpha}^{\ast +}=\frac{L+2}{3L+3}+{\varPhi}^{-1}\left(\alpha /2\right)\times \sqrt{\frac{\left(L+2\right)\left({L}^2+2L+3\right)}{18{\left(L+1\right)}^2\times L\times MN}}\end{array}\right.$$
(16)

where Φ‐1(⋅) is inverse cumulative density function of standard normal distribution N (0, 1). In the NPCR test, the value of NPCR must larger than \({N}_{\alpha}^{\ast }\), the value of UACI is in the interval (\({U}_{\alpha}^{\ast -}\), \({U}_{\alpha}^{\ast +}\)).

In Tables 5, 6 and 7, we list the experimental results of this algorithm on some images in the image database, and list and compare three more advanced algorithms. It can be seen that the average value and standard deviation of this algorithm are better than other algorithms, and it also has a good performance in the passing rate.

Table 5 NPCR and UACI
Table 6 NPCR
Table 7 UACI

5.5 Robustness analysis

In the process of communication, all kinds of interference often lead to the loss of information in the cipher image, destroy the integrity of the transmitted information, and make the receiver unable to obtain the information in the original image. A robust encryption algorithm can ensure that when this happens, the damaged part of the cipher in the process of information transmission has as little impact on decryption as possible. Therefore, robustness is very important for encryption algorithm. The common malicious attacks mainly include clipping attack and noise attack. In this paper, we simulate the resistance to different degrees of clipping attack and salt & pepper noise attack. Image encryption scheme should be able to minimize the impact of data loss on decryption. In Fig. 13, the decryption results of cipher image after 1/16, 1/8, 1/4, and 1/2 degree clipping are shown respectively. In Fig. 14, the decryption results of encrypted images under 2%, 5%, 10%, and 15% degree salt & pepper noise are shown. It can be seen that most of the information can still be identified visually after the recovered image.

Fig. 13
figure 13

Clipping attack: (a) 1/16-degree clipping; (b) 1/8-degree clipping; (c) 1/4-degree clipping; (d) 1/2-degree clipping

Fig. 14
figure 14

Noise attack: (a) 2% intensity; (b) 5% intensity; (c) 10% intensity; (d) 15% intensity

6 Conclusion

In this paper, a new spatiotemporal chaos model is proposed and applied to the field of image encryption. DCPML model uses perturbation function instead of chaotic coupling term, and adopts dynamic coupling coefficient. Through the analysis of multiple indexes, it is proved that DCPML model has stronger chaotic characteristics and higher information entropy, and reduces the mutual information value between lattices. Then a bit-level image encryption algorithm based on DCPML system is proposed. Due to the excellent chaotic performance of spatiotemporal chaotic model, the encryption algorithm has higher security. Through the analysis of encryption and decryption algorithms, it is proved that the algorithm can resist various common attacks, and has better security and lower computational complexity compared with other encryption algorithms. Although DCPML has improved its performance, the parameter range of its chaotic state is still affected by the parameters of Logistic map. In the future research, we will further study this problem and more efficient encryption algorithms.