1 Introduction

Nowadays, digital image is an improtant carrier of information, because of the inherent performance of digital images, including bulk data capacity, high redundancy and extremely strong correlation in adjacent pixels, which make digital image processing a research hotspot. For example, prediction error preprocessing for image compression [1], histogram equalization of images [2], image compression and reconstruction [3], and so on. To achieve the requirement of digital image safety transmission, researchers are interested in an encryption algorithm based on a chaotic system. Chaos is a random or uncertain movement in a particular system. It has inherent properties of ergodicity, sensitivity of initial value and parameters, and complex dynamic characteristic [4, 5]. Especially, chaotic attractors coexist [6, 7]. Therefore, a chaos system could be used in the image encryption fields.

Up to now, all kinds of image encryption algorithms through chaotic system are proposed [1, 8,9,10,11,12,13]. For example, Hua et al. [8] proposed an image encryption scheme using 2D Logistic-adjusted-Sine map. Yang et al. [9] presented novel quantum image encryption through 1D quantum cellular automata. Because low-dimensional chaotic maps have fewer system parameters, the structures are simple. The system parameters and initial value may be predicted by using chaotic signal estimation technologies. On the contrary, high-dimensional chaotic maps, especially hyperchaotic maps, possess excellent chaotic performance and complex structure. Therefore, Natiq et al. [10] designed a new hyperchaotic map and its application for image encryption. Luo Y and his research team [11] proposed a parallel image encryption algorithm through two chaotic maps.

Recently, an encryption scheme using DNA addition in combination with chaotic system was proposed by Zhang et al. [14]. Soon afterwards, some cryptosystems were applied to DNA sequence operations and chaotic systems [2,3,4,5, 7, 15,16,17,18,19,20,21,22,23,24,25,26,27]. These schemes applied DNA encoding and DNA sequence operation to encrypt images. An idea of DNA subsequence operation, rather than complex biological operation of image encryption scheme, was introduced by Zhang et al. [25]. Liu and his research team [26] employed a chaotic map and the DNA complementary rule in an image encryption algorithm. SaberiKamarposhti et al. [27] proposed hybrid image encryption algorithm through DNA sequences and a logistic map. However, compared with the general chaotic system, the fractional-order system has nonlocal character and high nonlinearity, and the encryption algorithm of fractional-order chaotic has higher security features [20, 28]. Compared with the general chaotic system, dynamic features of the memristor chaotic system depend not only on system parameters but also on the initial conditions of memristor retention internal state variables [29, 30]. However, the memristor chaotic systems are not widely used for image and data encryption algorithms. Therefore, to improve the safety performance of image encryption algorithm, in this paper, a color image encryption using a fractional-order 4D hyperchaotic memristive system and DNA sequence operations is proposed.

The following is the architecture of this paper. Preliminary materials are described in Section 2. The encryption and decryption scheme and the simulation results are presented in Section 3. In Section 4, security performance is analyzed. Finally, the conclusion is given in Section 5.

2 Preliminary materials

2.1 Adomian decomposition method

For a certain fractional-order differential equation *Dq to(t) = f(x(t)), here x(t) = [x1(t),x2(t),…,xn(t)]T, *Dq to are variables and *Dq to is the Caputo derivative operator of order q((m − 1) < q ≤ m, mN). The following initial value is obtained by making f (x (t)) been separated into three parts [31, 32]:

$$ \left\{\begin{array}{l}{}^{\ast }{D}_{to}^qx(t)= Lx(t)+ Nx(t)+g(t)\\ {}{x}^{(k)}\left({t}_0^{+}\right)={b}_k,k=0,1,\dots, m-1\end{array}\right. $$
(1)

Here, L and N are linear and nonlinear parts of system functions, g(t) = [g1(t),g2(t),…,gn(t)]T are constants for autonomous systems, and bk is a specified constant. On both sides of Eq. (3) perform Jq to operators, the following equation is obtained [33]:

$$ x={J}_{t0}^q Lx+{J}_{t0}^q Nx+{J}_{t0}^qg+\sum \limits_{k=0}^{m-1}{b}_k\frac{{\left(t-{t}_0\right)}^k}{k!} $$
(2)

Jq to is fractional integral operator of order q based on Riemann-Liouville. For t∈ [t0,t1], q ≥ 0, r ≥ 0, γ > − 1 and real constant C, the fundamental properties of Jq to are described by [34]:

$$ {J}_{t0}^q{\left(t-{t}_0\right)}^{\gamma }=\frac{\Gamma \left(\gamma +1\right)}{\Gamma \left(\gamma +1+q\right)}{\left(t-{t}_0\right)}^{\gamma +q} $$
(3)
$$ {J}_{t0}^qC=\frac{C}{\Gamma \left(q+1\right)}{\left(t-{t}_0\right)}^q $$
(4)
$$ {J}_{t0}^q{J}_{t0}^rx(t)={J}_{t0}^{q+r}x(t) $$
(5)

Based on ADM, the nonlinear terms of Eq. (4) are decomposed according to

$$ \left\{\begin{array}{l}{A}_j^i=\frac{1}{i!}{\left[\frac{d^i}{d{\lambda}^i}N\left({\nu}_j^i\left(\lambda \right)\right)\right]}_{\lambda =0}\\ {}{\nu}_j^i\left(\lambda \right)={\sum}_{k=0}^i{\left(\lambda \right)}^k{x}_j^k\end{array}\right. $$
(6)

where i = 0,1,…,∞, j = 1,2,…n. Then the nonlinear terms are expressed as

$$ Nx=\sum \limits_{i=0}^{\infty }{A}^i\left({x}^0,{x}^1,\dots, {x}^i\right) $$
(7)

So the solution of Eq. (3) x = ∑∞ i = 0 is derived from

$$ \left\{\begin{array}{l}{x}^0={J}_{t0}^qg+{\sum}_{k=0}^{m-1}{b}_k\frac{{\left(t-{t}_0\right)}^k}{k!}\\ {}{x}^1={J}_{t0}^q{Lx}^0+{J}_{t0}^q{A}^0\left({x}^0\right)\\ {}{x}^2={J}_{t0}^q{Lx}^1+{J}_{t0}^q{A}^1\left({x}^0,{x}^1\right)\\ {}\dots \\ {}{x}^i={J}_{t0}^q{Lx}^{i-1}+{J}_{t0}^q{A}^{i-1}\left({x}^0,{x}^1,\dots, {x}^{i-1}\right)\\ {}\dots \end{array}\right. $$
(8)

2.2 Fractional-order 4D hyperchaotic memristive system

The fractional-order 4D hyperchaotic memristive system is described by [30]:

$$ \left\{\begin{array}{l}{D^{\ast}}_{t0}^qx=\alpha \left(y-x\right)\\ {}{D^{\ast}}_{t0}^qy=- xz+\beta y-\rho W(w)x\\ {}{D^{\ast}}_{t0}^qz= xy-\gamma z\\ {}{D^{\ast}}_{t0}^qw=x\end{array}\right. $$
(9)

where x, y, z and w are the stateful variables of chaotic system, q(0 < q ≤ 1) is the order of fractional-order differential equation, where W(w) is defined as W(w) = a + 3bw2, and a, b, α, β, γ, and ρ are the system parameters.

In order to evaluate the chaotic system for image encryption, the dynamic characteristics of the fractional-order 4D hyperchaotic memristive system by the phase diagram, Lyapunov exponent spectrum, and bifurcation diagram are analyzed according to Adomian decomposition method.

Let parameters a = 4, b = 0.01, α = 36, β = 20, γ = 3, q = 0.85 and ρ = 3, the initial value of the Eq. (9) is (1, 0, 1, 0). We get the phase diagram shown Fig. 1a. Then make parameters a = 4, b = 0.01, α = 36, β = 20, γ = 3, ρ = 3 and versus q∈[0.75, 1]. The Lyapunov exponent spectrum and bifurcation diagram of the fractional-order 4D hyperchaotic memristive system are obtained as shown in Fig. 1b and c. Obviously, the phase diagram, Lyapunov exponent spectrum and bifurcation diagram of the fractional-order 4D hyperchaotic memristive system distribute in a large region. This means that the system has good randomness, large key space and pseudorandom sequence generator.

Fig. 1
figure 1

Dynamic analysis of 4D hyperchaotic memristive system. a Phase diagram; b Lyapunov exponent spectrum with a = 4, b = 0.01, α = 36, β = 20, γ = 3, ρ = 3, versus q∈[0.75,1]; c bifurcation diagram with a = 4, b = 0.01, α = 36, β = 20, γ = 3, ρ = 3, versus q∈[0.75,1]

2.3 DNA encoding and decoding rules

A DNA sequence is composited of four nuclear acid bases ATCG (adenine, thymine, cytosine, guanine); here, A and T are complementary, and C and G are complementary. The information is represented binary in the current generation theory of the electronic computer, and in the DNA coding theory, all information is represented by four nuclear acid bases A, T, C, G. According to complementary rules of binary 0 and 1, the 00 and 11 are complementary, and 01 and 10 are complementary. Therefore, acid bases A, T, C and G are encoded 00, 01, 10 and 11. Obviously, the coding rules has 4! = 24 kinds, but only 8 kinds of coding rules are satisfied with Watson-Crick mutual complement rule [35], as shown in Table 1. DNA decoding is the opposite of DNA encoding. For instance, if the value of image pixel is 152, we can get the corresponding binary sequence “10011000,” and it can be encoded as “TCGA” based on Rule 1. If the encoded sequence is “TGCA,” it can be decoded “00100111” by Rule 3, the final DNA decoding result is decimal value 39.

Table 1 DNA encoding rules

2.4 DNA addition and subtraction rules

On the basis of traditional binary addition and subtraction, the DNA addition and subtraction are obtained. Thus, according to the eight kinds of DNA encoding rules, we can get the corresponding eight kinds of DNA addition and subtraction rules. For example, on the basis of DNA encoding rule 1, DNA addition rule 1 and subtraction rule 1 are shown in Table 2.

Table 2 Addition rules and subtraction rules

2.5 DNA complementary rule

The DNA complementary rule [26] must satisfy Eq. (10) for each nucleotide xi.

$$ \left\{\begin{array}{l}{x}_i\ne L\left({x}_i\right)\ne L\left(L\left({x}_i\right)\right)\ne L\left(L\left(L\left({x}_i\right)\right)\right)\\ {}{x}_i=L\left(L\left(L\left(L\left({x}_i\right)\right)\right)\right)\end{array}\right. $$
(10)

where L (xi) and xi are basic pairs and they are complementary, the basic pairs are satisfied with the injective map.

On the basis of (12), there are six kinds of reasonable combination of complementary base pairs, as shown below:

  1. (1)

    L1(A) = T, L1 (T) = C, L1 (C) = G, L1 (G) = A;

  2. (2)

    L2(A) = T, L2 (T) = G, L2 (G) = C, L2 (C) = A;

  3. (3)

    L3 (A) = C, L3 (C) = T, L3 (T) = G, L3 (G) = A;

  4. (4)

    L4 (A) = C, L4 (C) = G, L4 (G) = T, L4 (T) = A;

  5. (5)

    L5 (A) = G, L5 (G) = T, L5 (T) = C, L5 (C) = A;

  6. (6)

    L6 (A) = G, L6 (G) = C, L6 (C) = T, L6 (T) = A,

where Li (i = 1,2,...,6) represents the ith complement rule.

In the diffusion of pixels, used DNA complementary rule bases complementary replacement, and we can randomly select one of the six kinds of complementary combination rules are complementary to replace, which achieve the goal of pixel diffusion.

3 Method - image encryption and decryption algorithm

3.1 The key design

The key design of the proposed color image encryption algorithm is shown in Fig. 2. It consists of five parts, chaotic system initial values(x0,y0,z0,w0), parameters a, b, α, β, γ, q, ρ, cycle numbers m, n, starting acid base c0(c0∈A, T, C, G) and DNA encoding rules in Table 1 α1, β1(α1, β1∈ [1, 8]).

Fig. 2
figure 2

Key format

3.2 Image encryption algorithm

3.2.1 Pixel position scrambling

The pixel location is scrambled in order to destroy correlation of the original image, and an image is rearranged, which makes the image become disturbed. The random sequences through the fractional-order 4D hyperchaotic memristive system are generated, and the image is permutated. The detailed confusion process can be presented as the following steps.

Step 1. The input is color original image I with the size of M × N × 3. Setting secret key values a, b, α, β, γ, q, ρ, x0, y0, z0, w0. New initial conditions of the fractional-order 4D hyperchaotic memristive system are generated by

$$ s=\frac{\left[\sum \limits_{i=1}^M\sum \limits_{j=1}^N\sum \limits_{k=1}^3I\left(i,j,k\right)\right]}{10^{10}} $$
(11)
$$ \left\{\begin{array}{l}{x}_0^{\hbox{'}}={x}_0+s\\ {}{y}_0^{\hbox{'}}={y}_0+s\\ {}{z}_0^{\hbox{'}}={z}_0+s\\ {}{w}_0^{\hbox{'}}={w}_0+s\end{array}\right. $$
(12)

Step 2. Setting the L = max(M, N). Let the chaotic system (9) iterate for (m + L) times based on new initial conditions, and then throw out the former m values to improve initial value sensitivity. The four chaotic sequences {xi}L i = 1, {yi}L i = 1, {zi}L i = 1 and {wi}L i = 1 are obtained by Eq. (9). The following shift step numbers are used for scrambling:

$$ Bri=\operatorname{mod}\left(\left\lfloor \left|{x}_i\right|\times {10}^{16}\right\rfloor, \frac{N}{2}\right) $$
(13)
$$ Bcj=\operatorname{mod}\left(\left\lfloor \left|{y}_j\right|\times {10}^{16}\right\rfloor, \frac{M}{2}\right) $$
(14)

where Bri means that the cyclic step size of row i, and Bcj is the cyclic step number of column j. Here, i = 1,2,...,M, j = 1,2,...,N.

Step 3. Color image I is decomposed into R, G, B parts, and then R, G, B parts are converted into three matrices and the rows are shifted. The shift results TR1, TG1 and TB1 are obtained by the following rules. Assumption xi > 0, let the row i of R would be moved to left and step number is Bri; otherwise, the row i of R would be moved to the right with step number Bri, where i = 1,2,...,M. The same rules are used as in the G and B channels.

Step 4. The columns shift results TR, TG and TB are obtained as follows. When yj > 0, the column j of TR1 would be moved up with the size of step is Bcj, or else the column j of TR1 would be moved down with the size of step is Bcj, where j = 1,2,...,N. The same rules are used as in the TG1 and TB1.

3.2.2 DNA sequence operation

The pixel values are diffused according to DNA operations and include addition and complementary operations. Specific steps are as follows.

Step 1. The M × 8 N binary matrices R, G and B are obtained by TR, TG and TB. Then the matrices R, G and B are encoded through the DNA encoding Rule α, and then the M × 4 N DNA matrix S1, S2 and S3 are obtained.

Step 2. Setting the chaotic system initial values of x0, y0, z0, w0 and getting chaotic sequences {xi}MN i = 1, {yi}MN i = 1, {zi}MN i = 1, {wi}L i = 1 by iterating system (1) (n + M × N) times and discarding the former n values. Three sequences k1, k2 and k3 are obtained by

$$ \left\{\begin{array}{l}k1=\operatorname{mod}\left(\left\lfloor \left|{x}_i\right|\right\rfloor \right)\times {10}^{16},256\Big)\\ {}k2=\operatorname{mod}\left(\left\lfloor \left|{y}_i\right|\right\rfloor \right)\times {10}^{16},256\Big)\\ {}k3=\operatorname{mod}\left(\left\lfloor \left|{z}_i\right|\right\rfloor \right)\times {10}^{16},256\Big)\end{array}\right. $$
(15)

where i = 1,2,….,MH.

Step 3. The sequence k1, k2 and k3 are transformed into binary matrix, and the matrixes are encoded according to the same DNA rule α to get three M × 4 N matrixes K1, K2 and K3.

Step 4. According to the DNA complementary rule, the middle encryption result of DNA formulation matrix C = {ci}4MN i = 1 is obtained as follows:

$$ {\displaystyle \begin{array}{l}\mathrm{If}\ {\mathrm{c}}_{2i-2}=\mathrm{A},\mathrm{then}\ {\mathrm{c}}_{2i-1}={L}_{l1}\left({\mathrm{s}}_{2i-1}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-2}=\mathrm{C},\mathrm{then}\ {\mathrm{c}}_{2i-1}={L}_{l2}\left({\mathrm{s}}_{2i-1}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-2}=\mathrm{G},\mathrm{then}\ {\mathrm{c}}_{2i-1}={L}_{l3}\left({\mathrm{s}}_{2i-1}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-2}=\mathrm{T},\mathrm{then}\ {\mathrm{c}}_{2i-1}={L}_{l4}\left({\mathrm{s}}_{2i-1}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-1}=\mathrm{A},\mathrm{then}\ {\mathrm{c}}_{2i}={L}_{l5}\left({\mathrm{s}}_{2i}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-1}=\mathrm{C},\mathrm{then}\ {\mathrm{c}}_{2i}={L}_{l6}\left({\mathrm{s}}_{2i}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-1}=\mathrm{G},\mathrm{then}\ {\mathrm{c}}_{2i}={L}_{l7}\left({\mathrm{s}}_{2i}\right);\\ {}\mathrm{If}\ {\mathrm{c}}_{2i-1}=\mathrm{T},\mathrm{then}\ {c}_{2i}={L}_{l8}\left({\mathrm{s}}_{2i}\right).\end{array}} $$

Step 5. The encrypted image of DNA sequence D = {di}4MN i = 1 is calculated by

$$ {d}_i={c}_i+K(i)+{d}_{i-1} $$
(16)

Here, i = 1,2,….,MH. “+” means that the DNA addition operation, and d0 = c4MN. Three DNA matrices D1, D2 and D3 are obtained by Eq. (18).

Step 6. The matrices D1, D2, and D3 are decoded by DNA Rule β and then recovering three binary formulations C1, C2 and C3. Finally, the encrypted image C by combination C1, C2 and C3 is obtained.

3.3 Decryption algorithm

The decryption algorithm is a process of restoring the original image. First, the encryption image C is decomposed C1,C2 and C3, and then C1,C2 and C3 are encoded as matrices D1, D2 and D3 through DNA rule β, and then the middle encryption result of DNA formulation matrix C = {ci}4MH i = 1 is recovered as

$$ {c}_i={d}_i-K(i)-{d}_{i-1} $$
(17)

where i = 1,2,….,MH. “–” is the DNA subtraction, and d0 = c4MH. The matrices K1, K2 and K3 are generated by doing Step 3 of the DNA sequence operation. Second, the image of DNA sequence matrices S1, S2 and S3 is recovered. The same iteration as Step 3 and Step 4 of pixel position scrambling is performed. Finally, the encrypted image is recovered.

3.4 Simulation result

The color Lena image with the size of 256 × 256 is used for an algorithm simulation test, resulting in the Lena image as shown in Fig. 3a. The key a = 4, b = 0.01, α = 36, β = 20, γ = 3, q = 0.855, ρ = 2.67, x0 = 1, y0 = 0, z0 = 1, w0 = 0, m = 1000, n = 5000, c0 = A, α = 1, β = 3. The encrypted Lena image can be obtained as in Fig. 3b and the corresponding decryption image as shown in Fig. 3c.

Fig. 3
figure 3

Encryption and decryption results. a Original Lena image; b encrypted Lena image; c decrypted Lena image

4 Results and discussion

4.1 Key space

As a good image encryption algorithm, it should have large enough key space to resist the brute-force attack. In our encryption scheme, the keys are x0, y0, z0, w0, a, b, α, β, γ, q, ρ; if the calculation precision is 10− 15, the key space will be 2548. For the other part of key c0, α1, β1, b1, b2,...b8, because DNA has four acid base, eight kinds of encoding and decoding rules and six DNA complementary rules, and get the key space 22 × 26 × 220 = 228. So, all the key space would be 2576, which shows that the algorithm key space is large enough and can resist the brute-force attack.

4.2 Key sensitivity analysis

The restored image will be completely different from its original image when the key has a tiny change, which means that the encryption algorithm is well and should also be extremely sensitive with its key. In this paper, we respectively used six slightly changed keys, (x0 + 10− 16), (y0 + 10− 16), (z0 + 10− 16), (a + 10− 15), (b + 10− 15) and (c + 10− 15), to decrypt the encrypted Lena image shown in Fig. 3b and the sensitivity test shown in Fig. 4. Obviously, these restored images are completely different from the correct decrypted image in Fig. 3c. Therefore, the proposed algorithm is very sensitive to its key.

Fig. 4
figure 4

Key sensitivity test results. a Decryption with (x0 + 10− 16); b decryption with (y0 + 10− 16); c decryption with (z0 + 10− 16); d decryption with (a + 10− 16); e decryption with (b + 10− 16); f decryption with (c + 10− 16)

4.3 Statistical analysis

4.3.1 Histogram analysis

The distribution of pixel values in the image is shown by the histogram. The histogram of the encrypted image is flat and can well resist statistical attacks. The histograms of original color Lena image and its encrypted image are shown in Fig. 5. It can be seen that the cipher image histogram is very smooth, which indicates that the proposed encryption algorithm is well. So, in this paper, the encryption algorithm is proposed that will not make the attacker by analyzing the ciphertext to get any image with statistical information; thus, it can prevent the attacker from doing a statistical attack.

Fig. 5
figure 5

Histogram of the color Lena image and cipher image. a Histogram of Lena in R channel; b histogram of Lena in G channel; c histogram of Lena in B channel; d histogram of encrypted in R channel; e histogram of encrypted in G channel; f histogram of encrypted in B channel

4.3.2 Correlation coefficient analysis

For the original image, it has extremely strong correlation in adjacent pixels. A good of image encryption algorithm should break the correlation between neighboring pixels. The correlation coefficients rxy of pixels x and y is calculated as:

$$ {r}_{xy}=\frac{\operatorname{cov}\left(x,y\right)}{\sqrt{D(x)D(y)}} $$
(18)
$$ \operatorname{cov}\left(x,y\right)=E\left\{\left[x-E(x)\right]\left[y-E(y)\right]\right\} $$
(19)
$$ E(x)=\frac{1}{N}\sum \limits_{i=1}^N{x}_i $$
(20)
$$ D(x)=\frac{1}{N}\sum \limits_{i=1}^N{\left[{x}_i-E(x)\right]}^2 $$
(21)

where x and y are the pixel values of different image pixels, cov (x, y) represents the covariance, and D(x) means that the variance of x. Similarly, E(x) is the average, and N represents the number of all pixels. Correlation coefficients of the original Lena image and encrypted image in R, G, and B channels are listed in Table 3. The correlation coefficients of the encrypted image with identical positions in R, G, B components are listed in Table 4. Table 5 lists the correlation coefficients of the encrypted image with adjacent positions in R, G, B components. The tabular data indicate that the original images have significant correlation, whereas encrypted images are very small, which shows the encryption algorithm effect is up to the mustard.

Table 3 Correlation coefficients in R, G, B channels
Table 4 Identical position with R, G, B
Table 5 Adjacent position with R, G, B

To clearly see the correlation of the original and encrypted images, the correlation distributions of horizontally adjacent pixels for the Lena image are shown in Fig. 6. Obviously, the original image has extremely strong correlation between adjacent pixels as shown in Fig. 6a, b and c. In the figure, we can see that all the pixel dots of the original image are congregated along the diagonal. However, the encrypted image pixel dots are scattered over the entire plane as shown Fig. 6d, e and f. This indicates that the correlations of different pixels in the encrypted image are greatly reduced in the encrypted image. Therefore, the image encryption algorithm has the ability to resist statistical attack.

Fig. 6
figure 6

Correlation distributions between two horizontal different pixels. a Original image in R channel; b original image in G channel; c original image in B channel; d encrypted image in R channel; e encrypted image in G channel; f encrypted image in B channel

4.4 Information entropy

Information entropy is an important gray value for image random, and it is defined as

$$ H(m)=\sum \limits_{i=0}^{L-1}p\left({m}_i\right)\log \frac{1}{p\left({m}_i\right)} $$
(22)

where p(mi) means that the probability of occurrence for symbol mi, and L represents all the number of symbols mi. Because there are 28 states of the 256 gray-level images, so the theoretical value of information entropy is 8. The information entropy values of encryption image in R, G, B channels, and the combination of R, G, B components S, are listed Table 6. It can be seen clearly from Table 6 that calculation of the values of the new algorithm is close to 8. Therefore, randomness of the encrypted images is good.

Table 6 Information entropy of encryption image

4.5 Differential attack

The attacker makes a subtle change in the original image. Then the original image is encrypted and changed by encryption methods, and then attacker can be compared with two encrypted images to find the original image and the encrypted image correlation to attack image information. Therefore, researchers usually use the number of pixels change rate (NPCR) and unified average changing intensity (UACI) to evaluate whether the encryption algorithm can resist differential attack. NPCR and UACI are calculated as follows:

$$ \mathrm{NPCR}=\frac{\sum \limits_{i,j}D\left(i,j\right)}{L}\times 100\% $$
(23)
$$ \mathrm{UACI}=\frac{1}{L}\sum \limits_{i,j}\frac{\left|C\left(i,j\right)-{C}_1\Big(i,j\Big)\right|}{255}\times 100\% $$
(24)

where L is the number of all image pixels. C and C1 are pixel values before and after the same position change, respectively, and D(i, j) is obtained through the following rules. If C(i, j) ≠ C1(i, j), then D(i, j) = 1, if C(i, j) = C1(i, j), then D(i, j) = 0.

In this experimental test, we just change the one random pixel of the original image and carry out the test ten times with one round of encryption to obtain the average values NPCRs and UACIs are listed in Table 7. The results illustrate that the mean values NPCRs and UACIs of the proposed algorithm are over 99.6% and 33.3%, respectively, which means the value is large enough to resist the differential attack.

Table 7 Mean values number of pixels change rates and unified average changing intensities of encryption image

4.6 Robustness analysis

4.6.1 Noise attack

The encrypted image is disturbed by noise in the transmission process. So we added the Gaussian noise to the encrypted image to carry out antinoise test. Three different variances of Gaussian noise are added to the encrypted Lena image, and corresponding recovery results are shown in Fig. 7a, b and c. Among them, the quality of the decrypted images becomes increasingly worse with the increase of noise variance. However, the main image information can be obtained. This proves that the proposed encryption scheme has strong antinoise capability.

Fig. 7
figure 7

Noise attack analysis. a Variance is 0.0000001; b variance is 0.0000003; c variance is 0.0000005

4.6.2 Cropping attack

The cropping attack is an important standard of evaluating the cryptosystem in order to test resistance of cropping attack of the proposed algorithm. The encrypted Lena image with three different data losses is shown in Fig. 8a, b and c, and the decrypted images are shown in Fig. 8d, e and f, respectively. In Fig. 8, we can see that even though the encrypted image is cropped, the main information of the image can be recovered. Moreover, our algorithm could resist cropping attack to a certain degree.

Fig. 8
figure 8

Cropping attack analysis results. a 1/16 data loss; b 1/32 data loss; c 1/64 data loss; d decrypted image of (a); e decrypted image of (b); f decrypted image of (c)

5 Conclusion

In this paper, we focus on studying a color image encryption algorithm through a fractional-order 4D hyperchaotic memristive system and DNA sequence operations. The dynamic analysis results show that the fractional-order 4D hyperchaotic memristive system has more complexity in dynamic characteristics and randomness; moreover, it is more suited for image encryption. Algorithm simulation test and security performance analysis indicate that our algorithm not only can effectively to encrypt image but also has excellent safety features. Therefore, image encryption algorithm based on the fractional-order 4D hyperchaotic memristive system can effectively encrypt images and has more efficiency, which provides the related theoretical basis and practical application foundation applied to cryptography, secure communication and information security and other fields.