1 Introduction

Nowadays, with the rapid development of network technology, more digital images need to be stored and communicated. The confidentiality and security of image transmission have received close attention. While technology has brought convenience to life, it has also brought inconvenience to confidentiality and security, and the confidentiality of image information is more important because the information covered by some images is related to personal privacy and important secrets, even involving state secrets, which may cause economic losses even more serious consequences. Exploring efficient and secure image encryption methods has become a hot spot for researchers. Among them, the realization of information encryption and decryption through chaos has become a key topic for scholars in various countries. The main principle is to use an encryption algorithm to change the position or gray value of the pixel in image, thereby changing the overall structure of the image.

Traditional encryption algorithms generally use AES, DES, etc., according to the nature of the digital image itself, such as large amount of data, a two-dimensional space distribution, uneven energy distribution and a large number of redundancies of the original image, which make the traditional encryption algorithm not to be applicable that needs to find a new method to ensure the security of information. The encryption algorithm of chaotic mapping has immeasurable significance and status in the field of image encryption.

Due to its excellent cryptographic properties such as initial value sensitivity and pseudorandomness, many domestic scholars have mentioned different types of encryption designs in digital image related to chaotic encryption. Commonly used classical ideas are mainly divided into: pixel location scrambling, diffusion transformation of grayscale values and both the mix. In the early years, it changes from low-dimensional to high-dimensional chaotic mapping, from single- to high-dimensional chaotic system. DNA coding sequence encryption has become a new research hot spot, and DNA encoding encodes each pixel GTCA, which can get a larger key space and can be lower than the common attack. However, the computational problem in bioengineering considers the problems of high experimental costs and high computational complexity, which are not very practical and vulnerable to attack.

The initial interpretation of cryptography needs to start with Shannon’s masterpiece [1] in 1949. Shannon believed that cryptography is the study of a true secret system. In 1989, Matthews [2] proposed a generalized logistic mapping and used this mapping to generate a large number of pseudorandom numbers for data encryption. Therefore, people realized that the characteristics of chaos are very suitable for image encryption. Since then, a large number of scholars have begun to study the use of chaotic systems for image encryption. Huang [3] used a modified Henon method to encrypt the gray value of each band in the remote sensing image. The retrieval experiments show the method has better security and accuracy, but has the problem of unequal ciphertext, and the choice of parameters in the encryption process of a band is extra complicated and requires more factors to be considered. Based on the combination of generalized Henon and CNN hyperchaos system, Zhao [4] processed the generated sequence to obtain the image encryption with strong anti-attack and security. In the hyperchaotic nature of cellular neural networks adopted by Huang and Li [5], images are scrambled by pixels of the image to achieve the purpose of encryption, resulting in a higher degree of confusion and easy implementation. Wang [6] proposed a plaintext-related image encryption scheme that uses basic XOR operations to process the values of plaintext pixels and pseudorandom sequences, but this scheme has a large number of iterative loop operations, slow encryption and low practical value. Ganesan and Murali [7] proposed a plaintext-related image encryption algorithm, which is a typical plaintext association. After the loop, the information of any plaintext pixel can be diffused into the entire ciphertext image. Cheng [8] proposed a fast image encryption algorithm based on chaos mapping and S-box, which utilizes the Tent mapping, cyclic shift and look-up table operation to improve the pseudorandom sequence generation rate and effectively reduce floating-point operations. Xie [9] adopted quantum logistic chaos and fractional Fourier transform to make the traditional encryption system simple, random, periodic poor and vulnerable to such issues. Xie [10] adopted two-dimensional discrete Fourier transform for scrambling operation, combined with chaos, to improve the disadvantage of grayscale histogram not smooth enough. Yan [11] proposed an image encryption algorithm that combines discrete cosine transform (DCT) and chaotic systems. Using DCT to compress data in the frequency domain, chaos systems are used to generate permutation rules and chaotic sequences. In 1994, the successful experiment [12] of DNA computing opened a new era for the information age. Using DNA as a carrier, new cryptography ushered in new opportunities. Shi [13] used bit algorithm and DNA encoding algorithms to scramble on the bit plane and uses DNA encoding to encrypt color images. Yang [14] proposed a color image encryption algorithm based on chaotic systems and dynamic DNA coding and operation. In 2016, Li [15] proposed a color image encryption method based on qubit rotation around the axis. In terms of encoding, Bloch spherical description is used to encode the image, and qubit rotation is used to achieve image encryption, which provides a new idea for encryption of quantum images. Xu [16] proposed an algorithm combining the quantum logistic map with the three-dimensional Arnold map, which improved the complexity of the image encryption and further improved the application of the quantum chaotic map in image encryption.

Most current chaos encryption methods are natural chaotic systems, which are more likely to be attacked and deciphered. In this paper, an improved H–L chaos algorithm is proposed, this method uses Henon mapping to iteratively scramble image pixels, disrupting rows and columns, and then the pixel matrix of the original image is multiplied by the array to perform the α-order DFRFT transformation in the x direction. After multiplication with the array, the β-order DFRFT is transformed in the y direction to obtain an encryption matrix, an encryption matrix is generated, and simultaneously the Hilbert gradient image is synthesized the ciphertext image. Logistic chaos mapping is used to perform the diffusion and encryption operations on the transformed ciphertext image. The improved chaotic algorithm operates sequentially according to the sequence of the best scheme. This method overcomes the problems of simple structure, less pseudorandom generation and fewer parameter variables caused by some traditional methods operating on a certain scheme only in the frequency domain, the spatial domain and a single chaotic system. Experimental results show that the algorithm has higher security and anti-attack than the traditional encryption algorithm, a combination of two kinds of chaotic map encryption algorithms is used to solve the optimal solution by using exhaustive method to avoid the unsafe and easily broken encrypted images of the simplex encryption algorithm, and the improved chaotic encryption method is simpler to calculate, easier to implement and less difficult to decipher. It can be verified from both theoretical analysis and computer simulation.

The structure of the article is as follows: The first part of the article is about the research of image encryption and the main work of this paper. The second part is the basic theory of chaos knowledge. The third part is the main algorithm proposed in this paper. The fourth part is the experiment after the algorithm of this paper. The fifth part is the detection analysis of the experimental results. The sixth part is the conclusion of the paper and the future research direction and content.

2 Chaos mapping and fractional Fourier transform

2.1 Encryption principle

In this paper, aiming at the problems of traditional natural chaos and low security of single chaotic system, this paper proposes an image encryption algorithm based on the optimal solution sequence and fractional Fourier transform chaos. The optimal solution sequence is applied to the improved HL chaos mapping algorithm that combines chaos system and Fourier transform, achieves good scramble effect and avoids the problem of easy crack. It not only increases the difficulty in decryption of encrypted images, but also improves the security level of encrypted information. The improved algorithm first uses Henon mapping to iteratively process the digital matrix of the image to generate two sequences, intercepts the M sequences, sorts them in ascending order to obtain a row-steering matrix (ind1) and a column-steering matrix (ind2) and disrupts the row and column of the original digital matrix to obtain an encrypted box matrix. Then, a matrix of α-order DFRFT in the horizontal direction is multiplied by the matrix of encryption box and the matrix of the scrambling matrix, and the β-order DFRFT transform in the vertical direction is continued after the matrix is multiplied with the array. Finally, the ciphertext image is embedded into Hilbert gradient image to complete the improved Henon mapping. Logistic mapping carries out XOR processing on ciphertext images and encrypts them according to sequence order. The method solves the structural simplicity of the traditional algorithm in the spatial domain, the frequency domain and the single chaotic system and solves the problems of low security level and easy to crack. After the simulation, the method has higher security level than the traditional encryption.

2.2 DCT

Two-dimensional discrete cosine transform for image transformation, assuming a matrix MxN, is defined as:

$$ \begin{aligned} B_{p,q} = a_{p} a_{q} \sum\limits_{m = 0}^{M - 1} {\sum\limits_{n = 0}^{N - 1} {A_{m*n} \cos \frac{\pi (2n + 1)p}{2N}} } , \hfill \\ 0 \le p \le M - 1,0 \le q \le N - 1, \hfill \\ \end{aligned} $$
(1)
$$ a_{p} = \left\{ \begin{array} {ll}1/\sqrt M ,\quad p = 0 \hfill \\ \sqrt {2/M} ,\quad1 \le q \le M - 1 \hfill \\ \end{array} \right., $$
(2)
$$ a_{q} = \left\{ \begin{array}{ll} {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {\sqrt N }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\sqrt N }$}},\quad q = 0 \hfill \\ \sqrt {{\raise0.7ex\hbox{$2$} \!\mathord{\left/ {\vphantom {2 N}}\right.\kern-0pt} \!\lower0.7ex\hbox{$N$}}} ,\quad 1 \le q \le N - 1 \hfill \\ \end{array} \right., $$
(3)

where B is the DCT coefficient of the A, and based on fast Fourier transform (FFT), inverse discrete cosine transform is performed on the image to set the coefficient of the DCT value not > 20–0, and after inverse transform, the reconstructed image is obtained.

2.3 Henon mapping (Hilbert as carrier image)

Henon mapping is a two-dimensional nonlinear mapping system, and Henon algorithm makes the use of chaotic sequences to disrupt the rows and columns of the image matrix; the kinetic equation is shown in Eq. (4).

$$ \begin{aligned} {\text{x}}_{{{\text{n}} + 1}} & = 1 - ax_{n}^{2} + y_{n} , \\ y_{n + 1} & = bx_{n} . \\ \end{aligned} $$
(4)

In the above equation, a and b are the parameters of the chaotic system, and the parameters of Henon in chaos state are controlled as a = 1.4 and b = 0.3. At this time, the Lyapunov exponent is 0.418. When b = 1, the system maintains the flat area unchanged during the movement, which is a conservative system. When b < 1, the system reduces the flat area in motion, a dissipative system. A large number of studies have shown that there are chaos and chaotic attractors in the dissipative system. The key of the Henon map is k = − 0.40001, and the key is used as the initial value to obtain two chaotic sequences. Delete some of the elements behind X, according to the bubbling method, the images are sorted according to the chaotic sequences. Finally, the images of the corresponding order Hilbert curves are embedded to form a composite image, and the Hilbert image is bit-aligned with 11110000 = 240. The encrypted image is subjected to 240 bit-by-bit operations of the same dimension, the upper 8 bits of the encrypted image are moved to the lower 8 bits, and the encrypted image is embedded into the lower 8 bits of the Hilbert image of the carrier image to form a composite image (Fig. 1).

Fig. 1
figure 1

Henon mapping bifurcation diagram

2.4 Logistic mapping

Logistic map is a typical dynamical system [17], and chaos phenomenon occurs in iterative operation of logistic map. Logistic discrete form equation is as follows:

$$ x_{n + 1} = ux_{n} (1 - x_{n} ),\quad u \in [0,4],x \in [0,1]. $$
(5)

The initial value of the logistic chaotic map is selected as 0.2915826302, the parameter of the map is selected as: u = 4.0, and the image and the XOR operation are encrypted, and in the next process, the XOR operation is again used for decryption.

2.5 Fourier transform

With the improvement in and development of the basic theory of fractional Fourier [18, 19], the “arbitrary” function can be represented as a linear combination of sinusoidal functions by a certain factorization and has been widely used in the fields of communication technology and cryptography.

$$ X_{p} = F^{p} [x(t)] = \int_{ - \infty }^{ + \infty } {x(t)K_{p} (u,t){\text{d}}t} . $$
(6)

Among them, the fractional Fourier transform kernel function is as follows:

$$ K_{p} (u,t) = \left\{ {\begin{array}{ll} {\sqrt {\frac{1 - j\cot \alpha }{2\pi }\exp } \left[ {j\left( {\frac{{u^{2} + v^{2} }}{2\pi }\cot \alpha - \frac{ut}{\sin \alpha }} \right)} \right],\quad \alpha \ne n\pi } \\ {\delta (t - u),\quad \alpha = 2n\pi } \\ {\delta (t + u),\quad \alpha = (2n \pm 1)\pi } \\ \end{array} } \right.. $$
(7)

In the above equation, n is an integer and \( \alpha = p\pi /2 \) is the angle of the transformation. When P is equal to 1, it is the traditional Fourier transform, and when p = 0, it is a signal. In the image processing, it needs to be converted to a discrete form, two-dimensional continuous fractional Fourier as follows:

$$ X_{p1,p2} (u,v) = \int_{ - \infty }^{ + \infty } {\int_{ - \infty }^{ + \infty } {x(s,t)K_{p1,p2} (s,t,u,t){\text{d}}s{\text{d}}t} } , $$
(8)

where x(s,t) is original two-dimensional signal, and then two-dimensional transformation of the nuclear equation is as follows:

$$ \begin{aligned} K_{p1,p2} (s,t,u,t) & = \frac{{\sqrt {1 - j\cot \alpha } \sqrt {1 - j\cot \beta } }}{2\pi } \\ & \quad \times \exp \left[ {j\left( {\frac{{s^{2} + u^{2} }}{2}\cot \alpha - \frac{su}{\sin \alpha }} \right)} \right]\\ &\quad \times \exp \left[ {j\left( {\frac{{t^{2} + v^{2} }}{2}\cot \beta - \frac{tv}{\sin \beta }} \right)} \right]. \\ \end{aligned} $$
(9)

It makes fractional Fourier separate, and it can be separated into two one-dimensional fractional Fourier transforms in the x and y directions, respectively.

3 The principle and implementation of this algorithm

Encryption process flowchart is shown in Figs. 2 and 3.

Fig. 2
figure 2

Improved Henon encryption flow chart

Fig. 3
figure 3

Image encryption flow chart

The main steps to improve the algorithm are as follows:

  1. 1.

    The pixel extraction is operated: acquiring the pixel digital matrix Q of the original image and extracting the image information for performing DCT on the target sample image.

  2. 2.

    After the Henon map iteration, two chaotic sequences \( X = \left\{ {x_{k} |k = 0,1,2} \right., \ldots ,\left. m \right\} \) and \( Y = \left\{ {y_{k} |k = 0,1,2,3, \ldots ,\left. m \right\}} \right. \) are generated. From the i + 1th item in the sequence, intercept the T term to get the sequence \( E = \left\{ {E_{k} |k = i + 1,i + 2} \right., \ldots ,\left. {i + T} \right\} \) and \( F = \left\{ {F_{k} |k = i + 1,i + 2} \right., \ldots ,\left. {i + T} \right\} \), as well as \( \left\{ {e_{i + 1} ,e_{i + 2} } \right. \ldots ,\left. {e_{i + T} } \right\} \) and \( \left\{ {f_{i + 1} ,f_{i + 2} } \right., \ldots ,\left. {f_{i + T} } \right\} \), then sort the chaotic sequence from small to large to obtain \( \left\{ {e_{1}^{'} ,e_{2}^{'} } \right. \ldots ,\left. {e_{t}^{'} } \right\} \) and \( \left\{ {f_{1}^{'} ,f_{2}^{'} } \right., \ldots ,\left. {f_{t}^{'} } \right\} \) and calculate the X and Y position information of this sequence in the original sequence. Recording position index E′ and F′, the pixel matrix Q of the sample image is again sorted according to the position index of E′ to obtain the row scrambling matrix ind1, and the same applies to the column scrambling matrix ind2 according to the index sequence of F′, and the encryption keys are a, b, x0 and y0 in the Henon chaotic map.

  3. 3.

    The pixel matrix Q of the original image is multiplied by the row scrambling matrix ind1 to obtain a matrix R, and the R matrix is regarded as a row vector \( R' = (u_{1} ,u_{2} ,u_{3} , \ldots u_{M} ) \) to perform an ɑ-order DFRFT transform in the horizontal direction to obtain a complex matrix I, and then the complex matrix I is regarded as the column vector \( I' = (v_{1} ,v_{2} ,v_{3} , \ldots v_{M} ) \) for the column scrambling matrix ind2 in the vertical direction. The β-order DFRFT transform yields an encrypted complex matrix. The amplitude spectrum is obtained by (10).

    $$ \left| {F(m,n) = \left[ {R^{2} (m,n) + I^{2} (m,n)} \right]^{1/2} } \right|, $$
    (10)

    where R(m,n) is the real part and I(m, n) is the imaginary part. Then, the inverse transform of the complex matrix is transferred from the frequency domain to the space domain by (11) and (12).

    $$ F(m,n) = \sum\limits_{x = 0}^{M - 1} {\sum\limits_{y = 0}^{M - 1} {f(x,y)e^{{ - j2\pi \left( {\frac{mx}{M} + \frac{ny}{M}} \right)}} } } , $$
    (11)
    $$ F(m,n) = \left| {F(m,n)} \right|e^{j\varphi (m,n)} , $$
    (12)

where F (m, n) is the frequency distribution function and \( \left| {F(m,n)} \right| \) is its amplitude spectrum.

  1. 5.

    Insert the ciphertext image into the carrier image (Hilbert gradient graph) through Henon mapping to obtain a new encrypted image.

  2. 6.

    The new ciphertext graph as a new round of samples, after logistic XOR operation, to obtain the second ciphertext image.

  3. 7.

    According to the sequence of optimal sequence to be solved, the final encrypted image will be obtained finally.

  4. 8.

    Decryption: the reverse process of encryption, which will not be repeated here.

In the Henon chaos mapping algorithm, the Hilbert curve is used as the carrier image, and the process of local encryption is performed when performing the encryption process in different stages. Hilbert’s image has ergodic characteristics when the gradient changes, and eight Hilbert images are used as a carrier image.

As shown in Fig. 4 as a carrier image Hilbert curve, in Henon chaotic mapping algorithm, Hilbert curve image fusion encryption process in different stages is used to achieve the effect of encryption.

Fig. 4
figure 4

Hilbert curve gradient

4 Simulation experiment

4.1 DCT reconstruction of the image

The plaintext image is processed by DCT to obtain the reconstructed plaintext image.

As shown in Fig. 5, (a) is a grayscale image, which is reconstructed by DCT as shown in (b), and obtained DCT results of energy distribution are shown in (c), plaintext in (d) and DCT histogram in (e). The histogram of the original image without the DCT processing shows that the energy of the plaintext image is unevenly distributed and is mainly distributed in the upper left corner, and the energy of the previous segment and the next segment is 0 as a whole. After the DCT process, the energy distribution is uniform, which also shows that the effect of DCT treatment is better.

Fig. 5
figure 5

Experimental results of DCT. a Grayscale, b reconstruction of the image, c execution of DCT, d histogram of clear text, e histogram after DCT processing

4.2 Logistic chaos encryption operation

The logistic method is used to encrypt the plaintext image, in which the number of times of encryption is one, and the result of the encryption is shown as follows.

After the logistic chaos mapping, the image of the plaintext image (Fig. 6a) is encrypted. A logistic chaotic is encrypted (b), although it is difficult to find the specific local information for the confidential image. Obviously, this requires once again the chaotic mapping process, so analyzing the image of the stage is difficult. After a general logistic ciphertext map, interpretation of passing the message is difficult. In this case, the inverse of the logistic chaotic map is used to obtain the decrypted image as shown in (c).

Fig. 6
figure 6

Logistic encrypted results. a Plain text, b encryption figure, c decryption of the image

4.3 Encryption of Henon’s chaotic images (carrier images as first-order Hilbert images)

The Henon mapping encrypts the plaintext image (Fig. 7a), where the carrier image is a Hilbert first-order processed image (b). After a Henon mapping (c), it shows that encryption is relatively efficient. The decrypted image is obtained after inverse process of Henon’s chaotic mapping, as shown in Fig. 7d.

Fig. 7
figure 7

Hilbert’s encryption figure. a Plaintext, b first-order Hilbert, c after a Henon, d after decryption figure

4.4 Solving the optimal sequence

A theorem is proposed to solve the optimal sequence by using an approximate method for solving combinatorial optimization problems. The exhaustive method is used to solve the problem. The principle is that the standard of the value required by the article is not more than 255 and the total amount is the largest, and the corresponding rows and columns are convoluted; the details are as follows: defining the variable, taking \( x_{j} = 1 \) when selecting the jth data, otherwise \( x_{j} = 0 \), then the selected maximum value is \( z = c_{1} x_{1} + c_{2} x_{2} + \cdots + c_{n} x_{n} \) and the total amount is \( a_{1} x_{1} + a_{2} x_{2} + \cdots a_{n} x_{n} \). The problem is expressed as:

$$ \begin{aligned} \hbox{max} z = c_{1} x_{1} + c_{2} x_{2} + \cdots c_{n} x_{n} , \hfill \\ s.t.\left\{ \begin{aligned} a_{1} x_{1} + a_{2} x_{2} + \cdots + a_{n} x_{n} \le b \hfill \\ x_{j} = 0,1(j = 0,1, \ldots n) \hfill \\ \end{aligned} \right.. \hfill \\ \end{aligned} $$
(13)

A random row and its corresponding column are extracted from the pixel matrix of the plaintext image, and the selected maximum value b is set to 255. That is, the randomly selected row data are a = [56,165,58,9,36,125,30,65], corresponding to the selected column data of 8 digits, and then 8 × 8 data are selected.

Specific algorithm:

  1. 1.

    List all selected scenarios and filter out projects that do not exceed the criteria.

  2. 2.

    The maximum z is calculated for each scheme.

  3. 3.

    Select the largest from all the maximum data and find the corresponding solution.

  4. 4.

    Output the total amount of the best plan, the total value and the number of the selected data.

After the experiment, the article selects the optimal solution and the optimal sequence solution is [1,0,1,1,0,0,0,1].

4.5 After the optimal solution sort, according to the order of the encrypted image

The color image of face image Smark (256 × 256) is chosen as the simulation object of the test. The key data used in the experiment are as follows: initial value of Henon: x0 = 0.00111140001, control parameter ɑ = 1.4, β = 0.3, initial value of logistic map x0′ = 0.2915826302, x0′ = y0′; the control parameters of the two-dimensional discrete fractional Fourier transform are: α = 0.351726 in the X direction and β = 0.213628 in the Y direction. The optimal solution sequence solved by the exhaustive method is {1,0,1,1,0,0,0,1}: Set the number 0 for logistic and 1 for the Henon mapping algorithm.

(a) is the plaintext; (b) is the encrypted amplitude of the DFRFT in the x direction; (c) is the encrypted amplitude of the DFRFT in the y direction; (d) is the Henon encryption of the first-order Hilbert gradient as the carrier; (e) and (f) are Henderson-based encryption of the carrier image of the second-order Hilbert gradient; (g) the third-order Hilbert gradient graph of vector is Henon encrypted to get the fourth pass; the final figure (h) is arranged in order; (i) is the decrypted graph. It is quite difficult to distinguish the original image features of the encrypted final image after many encryption processes. From the simulation result of the encrypted image, the encrypted image cannot have the image features at all. Furthermore, according to the sequence of the encrypted sequence, when the image is once encrypted, discerning the recognition degree of the image is more difficult for the next time. The final encrypted image according to the sequence is also disorganized, showing that the encryption effect is better (Fig. 8).

Fig. 8
figure 8

Encrypted renderings for a given arrangement. a Plaintext, bX direction FRFT amplitude, cY direction FRFT amplitude, d 1, e 1–0, f 1–0–1, g 1–0–1–1, h final encrypted image, i decryption of the image

5 Results of test performance analysis

5.1 Ciphertext statistical characteristics analysis

For histogram analysis, the probability of each pixel value appears as flat as possible, which shows that the security of image is relatively stable. As shown in Fig. 9, the energy distributions are greatly different, the probability of appearance of the gray value is obviously different, and the frequency of the encrypted image pixels is basically the same. With the increase in the number of sequences, the energy distribution of pixel in ciphertext histogram is more uniform; the histogram of ciphertext image is more stable, the degree of fluctuation is smaller and the distribution effect is also greatly improved, which perfectly covers the distribution of the original images, increases the breadth and difficulty in decryption and also can effectively resist attacks.

Fig. 9
figure 9

Histogram analysis of experimental sample images. a Plaintext histogram, b a Henon map, c logistic, d ciphertext image

5.2 Key sensitivity analysis

  1. 1.

    The logistic and Henon mappings have complex dynamic performance; selections of key and parameter are sensitive; the weak digital difference can produce completely different ciphertexts and also cannot restore the plain text; the logistic chaotic key is increased by 0.0000000000000001; an error has occurred, as shown in Fig. 10a, and logistic chaotic mapping XOR operation is also prone to decryption error.

    Fig. 10
    figure 10

    Wrong decrypt image. a Wrong key, b incorrectly decrypted graph of the reverse order of the sequence

  2. 2.

    The difficulty in decryption is increased in the order based on the optimal solution sequence, and the security of the image is enhanced. That is to say, when the decryption operation is performed, if the inverse sequence of the optimal sequence order during encryption is not completely followed, such as reversed order and other erroneous operations, the result of the decryption will also be different (b).

  3. 3.

    NPCR and UACI: NPCR (pixel change rate) represents that when any pixel value in the plaintext changes slightly or the key makes minor changes, the ciphertext significantly changes; the UACI is the normalized average change intensity; ciphertext for the plaintext image value changes. They are shown in the following formula :

    $$ {\text{NPCR}} = \frac{{\sum\nolimits_{i = 1}^{M} {\sum\nolimits_{j = 1}^{N} {D(i,j)} } }}{M \times N} \times 100\% , $$
    (14)
    $$ {\text{UACI}} = \frac{1}{M \times N}\left[ {\sum\nolimits_{i} {\sum\nolimits_{j} {\frac{{\left| {D_{1} (i,j) - D_{2} (i,j)} \right|}}{256}} } } \right] \times 100\% . $$
    (15)

A little coordinate of a plaintext image is taken and transformed slightly, for example, pixels (7125) into (7136). The above formula shows that NPCR = 98.78% and UACI = 3.99%. The improved algorithm has strong sensitivity and anti-differential attack ability (Table 1).

Table 1 NPCR and UACI

5.3 Information entropy analysis

Information entropy analysis is used to describe uncertainty of information. The distribution of image gray values is more uniform and the information entropy is larger. The formula of information entropy is as follows:

$$ H(m) = - \sum\limits_{i = 0}^{255} {p(m_{i} )\log_{2} p(m_{i} )} . $$
(16)

The P(mi) is probability of occurrence of gray value mi, then \( \sum\nolimits_{i = 0}^{255} {p(m_{i} ) = 1} \); the closer information entropy is to 8, the better its attack resistance. It is stated that the closer the probability of occurrence of each pixel value, the more uniform the distribution of the grayscale values, the better the anti-statistic offensiveness. Then, the information entropy is the maximum value of 8 when the probability of all the gray values is equal. The information entropy in the improved encryption algorithm is H = 7.8892; the information entropy before encryption is H = 7.2639, concluding that the encrypted information entropy is closer to 8 and then the improved algorithm can better resist the statistical attack.

5.4 Correlation coefficients of adjacent pixels

The correlation analysis of neighboring pixels is used to reflect the degree of pixel diffusion, which is often expressed by the correlation coefficient r. In general, plaintext images have strong correlations between adjacent pixel points in the horizontal, vertical and diagonal directions, while there is almost no correlation between adjacent pixel points in the ciphertext image. In order to verify the correlation between the adjacent pixels of the plaintext diagram and the ciphertext graph, 1000 pairs of pixels are randomly selected in the two graphs to test their correlation coefficients in the horizontal, vertical and diagonal directions. Their gray value is denoted as \( (u_{i} ,v_{i} ),i = 1,2, \ldots N \), and then the correlation coefficient between the vectors \( u = \{ u_{i} \} \) and \( v = \{ v_{i} \} \) is calculated as follows:

$$ r_{xy} = \frac{{\text{cov} (u,v)}}{{\sqrt {D(u)} \sqrt {D(v)} }}, $$
(17)
$$ \text{cov} (u,v) = \frac{1}{N}\sum\limits_{i = 1}^{N} {(x_{i} - E(u))(y_{i} - E(v))} , $$
(18)
$$ D(u) = \frac{1}{N}\sum\limits_{i = 1}^{N} {(u_{i} - E(u))^{2} } , $$
(19)
$$ E(u) = \frac{1}{N}u_{i} . $$
(20)

Set the coordinates of \( u_{i} \) to \( \{ x_{i} ,y_{i} \} \); if the coordinate of \( v_{i} \) is \( \{ x_{i} + 1,y_{i} \} \), then the correlation coefficient in the horizontal direction is calculated; if the coordinate of \( v_{i} \) is \( \{ x_{i} ,y_{i} + 1\} \), the correlation coefficient in the vertical direction is calculated; if the coordinate of \( v_{i} \) is \( \{ x_{i} \pm 1,y_{i} + 1\} \), the correlation coefficient in the positively opposing angle is calculated. Figure 11 shows the correlation between the adjacent pixel values in the horizontal, vertical and diagonal directions of the plaintext and ciphertext. It can be seen from the figures that the plaintext image has a strong correlation in all directions, and there is a clear linear relationship. The ciphertext image has almost no relationship with the adjacent points in all directions.

Fig. 11
figure 11

Plaintext and ciphertext adjacent pixel scatter plot. A Clear text related to the image: a Horizontal direction, b vertical direction, c diagonal direction. B Ciphertext related to the image: d Horizontal direction, e vertical direction, f diagonal direction

Table 2 shows the calculation of plaintext and ciphertext adjacent pixels between the correlation coefficient, and the pixel pair is selected randomly. As can be seen from the data, the original image is highly correlated, close to 1, and the ciphertext correlation coefficient is close to zero, indicating that the correlation between adjacent pixels in the plaintext has completely disrupted and is almost irrelevant and random. The correlation coefficient of ciphertext is far less than that of plaintext, which indicates that the anti-statistic ability of the improved algorithm is very strong, indicating that the effect of encryption according to this method is better.

Table 2 Correlation coefficient

5.5 Key space analysis

In this algorithm, the key is a double-precision type; the initial value of the dual chaos mapping and the parameters are used as the key of the initial conditions. Parameter selection of the fractional Fourier transform at least reaches 1064, which provides a considerable key space for the algorithm. Plus exhaustive method is used to find the optimal solution of the sequence selection of the infinite. Therefore, searching an algorithm that has such a key space without exhaustive method is very difficult

6 Conclusion

The improved encryption algorithm is based on the Windows 10 operating system, mainly using MATLAB R2016a as an experimental platform, using an improved dual chaos algorithm, combining the characteristics of fractional Fourier transform to connect the time domain and the spatial domain. The double chaos algorithm of fractional Fourier of the optimal solution sequence is proposed. By using Henon chaos to pixel-point iteration, the scrambling operation is used to obtain the encryption box. The encryption box is multiplied by the row matrix; the α-order DFRFT transform is performed in the x direction, and then the β-order DFRFT transform in the y direction is performed after being multiplied with the array. The acquired image is processed with Henon mapping of Hilbert’s gradient image to get the encrypted image. The logistic map is obtained through the exclusive OR operation to gain the encrypted image. The sequence in this paper is the given optimal solution. The algorithm solves the problem that the traditional natural system uses a one-way method in a single area and the parameter is reduced so that the system structure is simple and easily attacked and the security is greatly reduced. The key space of the improved algorithm becomes larger, the computing complexity is lower, the sensitivity is high, the security level is high, and the image transmission has the advanced features. Based on the above, the algorithm not only has a very good encryption effect, but also has strong anti-decryption ability. In future studies, this algorithm will study the encryption of video. This scheme is used in the information transmission process to construct encryption software that can be used directly for information encryption. It can be applied to encryption in daily life, image encryption in the commercial field, cyber security in anti-terrorism, etc.; it can better protect people’s personal and property safety, commercial confidentiality and anti-terrorism network security.