Abstract

Aiming at the problems of small key space, low security, and low algorithm complexity in a low-dimensional chaotic system encryption algorithm, an image encryption algorithm based on the ML neuron model and DNA dynamic coding is proposed. The algorithm first performs block processing on the R, G, and B components of the plaintext image to obtain three matrices, and then constructs a random matrix with the same size as the image components through logistic mapping and performs DNA encoding, DNA operation, and DNA decoding on the two parts. Second, it performs determinant permutation on the matrix by two different chaotic sequences obtained by logistic mapping iteration. Finally, it merges the block and image components to complete the image encryption and obtain the ciphertext image. Wherein, DNA encoding, DNA operation, and DNA decoding methods are all randomly and dynamically determined by the chaotic sequence generated by the ML neuron chaotic system. According to simulation results and performance analysis, the algorithm has a larger key space, can effectively resist various statistical and differential attacks, and has better security and higher complexity.

1. Introduction

With the rapid development of cloud computing technology [1] and the widespread application of the 5G network technology [2] in recent years, digital image transmission has already become an indispensable part in all walks of life. As digital images contain a large amount of important data such as security privacy and confidential information, there is a risk of theft in the transmission of digital image information in various fields. Fortunately, the birth of image encryption technology [36] solves this problem and ensures the confidentiality of digital images. Since chaotic systems have the characteristics of sensitivity to initial values, pseudo-randomness, and unpredictability, more and more image encryption algorithms based on chaos have been proposed [79]. The image encryption algorithm proposed in literature [7] is based on the image segmentation and a multi-diffusion model, which improves the security of the algorithm. The chaotic image encryption algorithm proposed in the literature [8] combines two methods of block scrambling and dynamic index diffusion, and its advantages are fast and safe. The image encryption algorithm based on the fractional order chaotic system proposed in literature [9] has higher security and execution efficiency.

The advantage of DNA computing lies in that it can perform parallel computing, which reduces power consumption and has a high storage density. Researchers have explored the complementary base pairing principle in DNA theory [1012] and introduced it to realize image encryption. Literatures [13, 14] proposed many DNA-based encryption schemes. Although these schemes combine the chaotic system with DNA encoding theory, which improves the complexity of the system, the security performance still needs improvement because of the not-high chaotic dimension and the not-large key space. In recent years, more and more new image encryption algorithms that combine chaotic mapping and DNA encoding have been proposed by scholars. The newly emerged algorithms have better encryption effects and are more secure than previous ones. Therefore, many researchers from various fields have also begun to pay attention to and deeply understand this type of an image encryption algorithm that combines chaotic mapping and DNA encoding [1518].

This paper proposes a new image encryption algorithm to generate the required ciphertext image more securely by adopting the DNA random dynamic coding method and combining the ML neuron chaotic system.

2.1. ML Neuron Model

The ML neuron model is a two-dimensional model [1921] based on the research results of the muscle fibers of the Arctic goose. This article uses an improved three-dimensional ML neuron model [22, 23], and its differential equation is as follows:

In formula (1): is the neuron membrane potential; is the neuron recovery variable; is the slow-changing regulation current; , , and are the maximum conductance of , , and the leakage current channel, respectively; , , and are the reversal voltages corresponding to the abovementioned channels, respectively; is the activation time constant; and are the steady-state values of the opening probability of the ion channel and , respectively; and is a constant.

Part of the parameters of the abovementioned ML neuron model are set, respectively, as  = 1.2 ,  = 1 mV,  = 2 ,  = 0.5 ,  = −0.5 mV,  = 0.005, and keep other parameters unchanged. When the parameter  = 0.83 mV, the ML neuron model is at the chaotic discharge state, whose time history diagram is shown in Figure 1. Moreover, the phase plane diagram also shows that it is in a chaotic state, as shown in Figure 2.

2.2. Logistic Chaotic Mapping

The logistic equation is also called the insect-population model [24, 25], and its equation is as formula (2):wherein is the system parameter and  ∈ (0, 1),  ∈ (0, 4). When  ∈ (3.569945, 4), logistic mapping is in a chaotic state, and its dynamic behavior is more complicated.

2.3. DNA Encoding and Operations
2.3.1. DNA Encoding

There are 4 kinds of nucleotides in a DNA sequence, namely, A (adenine), G (guanine), C (cytosine), and T (thymine). Wherein, A and T, G, and C have complementary relationships, which are very similar to that of the binary code 0 and 1 in mathematics, so 00 and 11, 01 and 10 also have a complementary relationship. A, T, G, and C are represented by two-digit binary 00, 11, 10, and 01, respectively. According to the principle of complementary pairing, there are 8 sets of encoding rules. As shown in Table 1, the corresponding DNA decoding rules and DNA encoding rules are on the contrary.

2.3.2. DNA Operations

In order to make the algorithm more complex, this paper uses 4 kinds of DNA operations at the same time, namely, DNA addition, DNA subtraction, DNA XOR, and DNA XNOR operations. The operation rules are similar to those of addition, subtraction, XOR, and XNOR in binary mathematics. Because there are 8 DNA encoding methods, so there are 8 corresponding operation rules. Taking one of the DNA encoding methods as an example, the DNA addition, subtraction, XOR, and XNOR operations are shown in Tables 25.

3. Image Encryption Algorithm

This paper divides the color digital image into three two-dimensional matrices, which greatly reduce the time and space resources required. DNA encoding and calculation are performed on each two-dimensional matrix block, then row and column permutations are performed again after encryption, and finally the three channels are merged to obtain a color encrypted image. The three chaotic sequences generated by the ML neuron chaotic system determine the DNA encoding, decoding, and operation rules of each block. The initial value of the chaotic system is determined by the original image to ensure the effect of “one image, one cryptogram.” Three different chaotic sequences which are obtained by performing three iterations on the logistic mapping are used to perform DNA operations with the original image, as well as row and column permutations after DNA decoding operations. The flowchart of the image encryption algorithm is shown in Figure 3. The specific encryption procedure can be summed up by Algorithm 1.

Input: Original plaintext image
(1)Divide the original plaintext image into three two-dimensional matrices.
(2)Divide the three two-dimensional matrices into blocks of size , fill the three two-dimensional matrices so that their sizes all satisfy Algorithm 1
(3)Set the initial value x0 according to Algorithm 1, and obtain the chaotic sequence after successive iterations of the Logistic chaotic mapping
(4)Process the sequence according to Algorithm 1 so that all elements are belong to [0, 255], and divide it into random matrices of the same size , .
(5)Use MATLAB’s built-in Runge–Kutta function ode45 to calculate to obtain the three sequences of length in the ML neuron model. The initial value is calculated by Algorithm 1
(6)According to the initial value and the number of blocks r, solve the ML neuron model and get four chaotic sequences X, Y, Z, and H.
(7)Use X and Y to determine the DNA encoding method of the image matrix and the chaotic matrix. There are 8 kinds, 1∼8.
(8)Use Z to determine the DNA operation method between the image matrix and the chaotic matrix. There are 4 kinds, 0∼3.
(9)Use H to perform DNA decoding operations on the computed sub-blocks. There are 8 kinds, 1∼8.
(10)Obtain two logistic chaotic sequences. The initial value is obtained according to Algorithm 1 to produce two chaotic sequences
(11)Sort the two chaotic sequences obtained in the previous step in descending order and obtain the position sequence before the ranking. Take the sequence value before ranking and its corresponding index as the exchange coordinates of row and column to perform row and column permutation on the matrix.
(12)Combine the three component matrices after row and column permutation.
Output: ciphertext image

The decryption algorithm is the inverse process of the abovementioned encryption algorithm and will not be described in detail here.

4. Experimental Simulation and Safety Performance Analysis

4.1. Experimental Simulation

The experiment was completed on the MATLABR2017, a platform in the Win10 system, and the algorithm in this paper was used to encrypt and decrypt a color Lena image with a size of 512 × 512. The result of encrypting and decrypting the Lena image is shown in Figure 4.

4.2. Safety Performance Analysis
4.2.1. Histogram Analysis

The grayscale histogram of the image can objectively reflect the distribution of image pixels. Figure 5 shows the grayscale histogram of the R, G, and B channels before and after the Lena image encryption through the comparison of grayscale.

In order to quantitatively compare whether the difference between the histograms of the test ciphertext and the ideal ciphertext image is significant, a chi-square test is used to analyze the uniformity of the histograms. The calculation method is shown in formula (3):wherein, , , represents the size of the image. is the frequency of occurrence of gray value .

When the significance level is 0.05, the corresponding chi-square critical value is 293.2478. The calculation results of the chi-square analysis are shown in Table 6, from which it can be seen that the chi-square values of all ciphertexts are less than 293.2478, and the encryption algorithm has passed the chi-square test. Therefore, the encryption algorithm proposed in this paper can effectively resist statistical attacks [26].

4.2.2. Correlation Analysis of Adjacent Pixels

The correlation between adjacent pixels of a plaintext image is very strong, so the image is vulnerable to statistical analysis attacks. The calculation formula of the correlation coefficient between two pixels in the image is as shown in formulas (4)–(7):wherein N is the logarithm of the required pixel, and x, y are the gray values of adjacent pixels. Different selection methods of x, y will lead to the correlation coefficients in different directions, including the horizontal direction, the vertical direction, and the opposite angle direction.

N pixels point pairs are randomly selected from different directions, which makes N = 5000, and the correlation coefficient of each plaintext and ciphertext is calculated. It can be seen from the results of a certain experiment shown in Table 7 that the correlation coefficients of the three plaintext images in each direction are very large and close to 1, indicating that the adjacent pixels in each direction of the plaintext image are extremely correlated; at the same time, the correlation coefficients of the three ciphertext images are all extremely small and very close to 0, indicating that the correlation between adjacent pixels in all directions of the ciphertext image is extremely weak. In addition, compared with the methods proposed in literature [27] and literature [28], the algorithm proposed in this paper can eliminate the correlation between adjacent pixels and conceal the data characteristics of the original image.

Figures 68are the pixel distribution diagrams of three channels R, G, and B of the Lena plaintext and ciphertext image in different directions. It can be seen that the distribution of plaintext pixels is linear, while the distribution of ciphertext pixels is disorderly and irregular. Therefore, the algorithm in this paper can effectively reduce the correlation between adjacent pixels of plaintext images and can effectively resist statistical analysis attacks.

4.2.3. Global Entropy and Local Entropy Analysis

The definition of information entropy refers to the uncertainty of information, while the definition of image information entropy refers to the distribution probability of image gray values. When the distribution probability reaches the equal condition, the information entropy will be at the maximum value, which shows that the randomness of the ciphertext image is very high and that the encryption algorithm has a strong ability to resist statistical attacks. The calculation formula of global entropy is as formula (8):where refers to the gray level of the image and represents the probability that the gray value appears.

Table 8 shows the comparison with the encryption algorithms in existing literature. It can be seen that the global entropy of the encryption algorithm proposed in this paper is closer to the ideal value of 8.

On the basis of global entropy, Wu Y et al. proposed a calculation method called “local Shannon entropy,” which overcomes the shortcomings of inaccuracy, inconsistency, and low efficiency of global entropy [31]. The local entropy is an improvement over the global entropy. It first randomly selects non-overlapping blocks in the image and then calculates the average value of the global entropy for the small image blocks. According to the method described in the literature, 30 non-overlapping blocks are randomly selected in the image. When the number of pixels in each block is 1936, the local entropy is calculated, and the ideal value is 7.9024. Within the 0.01 level, if the local entropy is between 7.9017 and 7.9032, it means that the local entropy of the image is ideal and the image has good randomness. The local entropy test results are shown in Table 9.

4.2.4. Key Sensitivity Analysis

Key sensitivity refers to the resulting chaotic sequence changes after a small change to the key in the encryption algorithm, which has a great impact on the encrypted and decrypted image. If the key is not sensitive enough to correctly reconstruct the original image even with a slightly different key, the key may degenerate. In this paper, the key sensitivity test method of the encryption algorithm is given.

The first method is direct observation. The same encrypted image is decrypted with a slightly changed key and the differences between the images are observed. We can improve the anti-cracking ability of the encryption algorithm by increasing a certain number of digits after the decimal point of the key. The decrypted image obtained when one of the encrypting keys is changed from 0.5475 to 0.547500000000001 is shown in Figure 9. It can be found that the decryption is not successful when the key is changed slightly, which shows that the proposed encryption algorithm has good key sensitivity and can effectively resist the exhaustive attacks.

When one of the keys changes slightly, the histograms of the three channels of R, G, and B of the incorrectly decrypted images are as shown in Figure 10. It can be found that even if the original image is not successfully decrypted, the histograms of the decrypted image are still evenly distributed and can effectively resist attacks.

The second method is to use the indicator NBCR (number of bit change rate) to quantitatively illustrate the key sensitivity from another perspective [32]. The NBCR of matrices and is defined as formula (9):where is the Hamming distance of the two matrices and and is the total number of bits of and .

If the NBCR result is close to 50%, it means that and are completely different matrices without any correlation. Specifically, the seven parameters (, , , , , , ) in the algorithm are used as keys to form an infinite dimensional key space, and is slightly changed to obtain another key . Every parameter change in (, , , , , , ) is in a very small interval. For example, the small change of is , and other parameters remain unchanged. Encrypting the original image with the keys and , respectively, to obtain the encryption results and , and then calculate the NBCR values of and ; the same encryption result is decrypted with keys and , respectively, to obtain decryption results and , and then calculate the NBCR values of and . The NBCR test results of the algorithm in this paper are shown in Table 10.

It can be seen from Table 10 that the calculated NBCR is very close to 50%, indicating that the results are completely different, which means that the algorithm is very sensitive to slightly changed keys.

4.2.5. Plaintext Sensitivity Analysis

The plaintext sensitivity analysis aims to analyze the degree of change of the ciphertext image caused by the slight change of the plaintext image under the same key condition. When the change is large, the encryption system has a strong plaintext sensitivity and can effectively resist differential attacks. NPCR (pixel change rate) and UACI (pixel average change intensity) are usually used to detect the ability of image encryption schemes to resist differential attacks. The calculation formulas (10) and (11) are as follows:

In the formula, is the image size. Assuming that two plaintext images are different in only one pixel, after using the same algorithm to encrypt, the pixel values of the positions in the ciphertext image are, respectively, and ; when the value of the two is the same, then the value of is 0, otherwise the value is 1. In the Lena plaintext, a pixel is randomly selected and its value is increased by 1, the same algorithm is used to encrypt, and the NPCR and UACI values are calculated. The results are shown in Table 11.

It can be seen from Table 11 that the NPCR of the image encrypted by the algorithm proposed in this paper is close to the ideal value of 100%, and the UACI is close to the ideal value of 33%. Compared with literature [33] and literature [34], the algorithm in this paper has stronger anti-differential attack capability.

Although the calculated NPCR and UACI values are close to the ideal values, only the NPCR and UACI values of the encrypted image are given quantitatively. In order to qualitatively analyze whether the encryption algorithm can produce ciphertext images that are secure enough and can resist differential attacks, Wu et al. proposed the method of randomness test for NPCR and UACI, analyzed their confidence intervals, and obtained critical value results under different parameter combinations. For detailed results, please refer to reference [35].

At the same time, two images of different sizes are taken. According to the abovementioned method, the NPCR and UACI values of the two ciphertext images are obtained and compared with the corresponding critical values ( = 0.05). The test results are shown in Table 12. From the data in the table, it can be seen that the NPCR value and the UACI value are both within the confidence interval, so it can be proved that the algorithm proposed in this paper is sufficient to resist differential attacks.

4.2.6. Key Space Analysis

The algorithm proposed in this paper uses a total of three logistic chaotic mappings. Although the values of parameter are the same, the initial values of each time are different. Therefore, , , and the three initial values , , and of the ML neuron chaotic system can all be used as the system keys. The image is decrypted by changing the number of digits after the decimal point of the key to get the key sensitivity of the key , , , , , , , respectively, so the key capacity of the encryption algorithm is obtained. Literature [36] pointed out that the key space of a security cryptosystem should be greater than 2100 and both ENISA and NIST standards require a key size of at least 2112. The key space of the encryption scheme in this paper is larger than the above standards.

4.2.7. Robustness Analysis

This paper uses noise attack and cropping attack to analyze the robustness of the proposed image encryption algorithm. There is often a lot of noise in the transmission channel, which has a serious impact on the transmission of encrypted images, and even causes the decryption algorithm to fail to restore the identifiable original image. Therefore, an excellent encryption algorithm must have certain noise robustness. In the process of information transmission, the loss of encrypted image information data will occur from time to time, which is often referred to as cropping attack. Therefore, the image encryption algorithm needs to be able to resist the cropping attack, so that it can successfully decrypt and recover recognizable images. PSNR (peak signal-to-noise ratio) between the original image and the decrypted image is an important indicator to measure the quality of the decrypted image, and its definition is shown in formulas (12) and (13).where is the image size, and are the original image and decrypted image, respectively, and is the square of the maximum pixel value of the image.

In order to analyze the anti-noise capability of the encrypted image, salt and pepper noises with different noise densities were added to the encrypted image, and the PSNR of the original image and the decrypted image was calculated. The Lena encrypted images after adding noise densities of 0.005, 0.05, and 0.1 and the images decrypted using the proposed encryption algorithm are shown in Figure 11. It can be concluded from the figure that under the attack of salt and pepper noise, the decrypted image can still be recognized well. The PSNR value between the original image and the decrypted image under the noise attack is calculated , and the results are shown in Table 13. Experiments show that the proposed encryption algorithm has strong robustness against salt and pepper noise attacks.

In order to analyze the anti-cropping attack capability of the encrypted image, the data of the encrypted image are crop by 1/16, 1/4 and ½, respectively, and the encryption algorithm proposed in this paper is used for decryption, respectively. The experimental effect is shown in Figure 12. As can be seen from the figure, under the crop attack, the decrypted image still has a certain degree of recognition. The PSNR value between the original image and the decrypted image under the crop attack is calculated, and the results are shown in Table 14. Experiments show that the proposed encryption algorithm has the ability to resist crop attack.

4.2.8. Speed Performance Analysis

In addition to considering security, encryption speed is also an important aspect to measure the pros and cons of encryption algorithms, especially for real-time network transmission requirements. For images of different sizes, the encryption speed of this algorithm and existing encryption algorithms is compared, as shown in Table 15. The computer used for testing is Intel(R) Core(TM) i5-8265U CPU (1.60 GHz), 8G memory. It can be seen from the table that the algorithm in this paper has certain advantages and high real-time performance, which is very necessary for the image encryption algorithm.

5. Conclusions

The encryption algorithm proposed in this paper combines an improved ML neuron model with DNA encoding. First, the original image and the logistic chaotic matrix are divided into blocks and DNA encoding is performed, respectively, and then the DNA operation and decoding between the same positions of the two image blocks is continued. Second, the continuous iteration of the chaotic sequence is used to perform determinant permutation on the matrix. Finally, the ciphertext image is obtained, in which the DNA encoding, operation, and decoding methods are determined by the chaotic sequence generated by the ML neuron chaotic system. Encryption performance analysis proves that the algorithm has a larger key space, better statistical characteristics, stronger key sensitivity and plaintext sensitivity, and can effectively resist various attacks such as exhaustive attacks, statistical analysis attacks, and differential attacks, indicating that it has good security and effectiveness.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (No. 61966022).