A Novel Image Encryption Algorithm Based on Improved Arnold Transform and Chaotic Pulse-Coupled Neural Network

Information security has become a focal topic in the information and digital age. How to realize secure transmission and the secure storage of image data is a major research focus of information security. Aiming at this hot topic, in order to improve the security of image data transmission, this paper proposes an image encryption algorithm based on improved Arnold transform and a chaotic pulse-coupled neural network. Firstly, the oscillatory reset voltage is introduced into the uncoupled impulse neural network, which makes the uncoupled impulse neural network exhibit chaotic characteristics. The chaotic sequence is generated by multiple iterations of the chaotic pulse-coupled neural network, and then the image is pre-encrypted by XOR operation with the generated chaotic sequence. Secondly, using the improved Arnold transform, the pre-encrypted image is scrambled to further improve the scrambling degree and encryption effect of the pre-encrypted image so as to obtain the final ciphertext image. Finally, the security analysis and experimental simulation of the encrypted image are carried out. The results of quantitative evaluation show that the proposed algorithm has a better encryption effect than the partial encryption algorithm. The algorithm is highly sensitive to keys and plaintexts, has a large key space, and can effectively resist differential attacks and attacks such as noise and clipping.


Introduction
In the age of informatization and digitization, digital images, as the mainstream carrier of information transmission, play an indispensable role in information transmission and storage. In the era of rapid information flow, how to protect user privacy; ensure the safe transmission and storage of image information; and avoid theft, tampering, and public dissemination by illegal persons in the process of data transmission has become a hot issue in information security research in recent years [1]. The image encryption technology has become one of the effective technical means to solve this problem, which can well ensure the security of the image information and data of the user in the military, aviation, and other fields and will not easily lead to the leakage of information [2].
At present, there are two main technical methods for image encryption-the scrambling of image position and the replacement of image pixel value. Among them, the image scrambling method mainly uses a certain transformation to scramble the position of the image pixel points and then changes the positional relationship between the original image pixel points. This method achieves the effect of image encryption by reducing the correlation between adjacent pixels in the image. Commonly used image position scrambling methods include Zigzag transformation, Arnold transformation (also known as cat mapping), Standard mapping, magic square transformation, etc. For example, Rui Liang et al. [3] proposed a double-scrambling encryption algorithm based on the of the image, this paper also proposes a new encryption method based on a chaotic pulsecoupled neural network. The chaotic pulse-coupled neural network system has many parameters, strong sensitivity to the initial value and large key space, and good encryption performance.
The main contributions of this work include: (1) This paper proposes a new image encryption algorithm based on improved Arnold transform and chaotic pulse-coupled neural network, which has good encryption performance and is safe and reliable. (2) In order to solve the limitation that the traditional Arnold transform can only scramble square image, this paper proposes a variable sliding window Arnold transform method. (3) In order to enhance the security of image encryption, we introduce the pixel position index to increase the scrambling degree of the image and also solve the periodic problem of Arnold transform.
The work arrangement of this paper is as follows. In Section 2, we propose the chaotic PCNN model and image encryption algorithm and introduce its basic principles. In Section 3, the specific scheme and process of image encryption and decryption are introduced. In Section 4, we introduce the experimental environment, parameter settings, and experimental results. In Section 5, the security of image encryption is analyzed, and the performance of the proposed encryption algorithm is evaluated through experiments in the chapter. Finally, the conclusion is given in Section 6.

Uncoupled Linking PCNN Model
A pulse-coupled neural network is a single-layer, third-generation artificial neural network that does not require training [12]. In 1990, Eckhorn et al. proposed a neural network model based on the signal transduction of cats' visual cortices [13]. In 1999, Johnson et al. improved it into a model suitable for image processing and named it PCNN [14]. Up to now, the model has been widely used in various fields of digital image processing and has achieved good results. PCNN is a mathematical model that simulates the relationship between the structure of biological neurons and the interaction between neurons [15], and its simplified model is shown in Figure 1. U ij (n) = F ij (n) = S ij + e −a F F ij (n − 1) (1) Entropy 2022, 24, 1103 4 of 27 According to Equations (1)- (3), the iterative equation of uncoupled linking PCNN can be obtained, as shown in Equation (4).
Equations (1)-(3) represent the feeding input subsystem, the firing subsystem, and the dynamic threshold subsystem, respectively, where S ij represents the input of the PCNN and is the normalized gray value of a pixel corresponding to a neuron. Subscripts i, j represent the position of the center pixel of the PCNN. α E represents the time constant of the iteration decay of the dynamic threshold subsystem. V E represents the linking weight amplification coefficient between the dynamic threshold and the firing subsystem. Y ij , the output of the PCNN, represents the firing state of the neuron (0 or 1). The state of a neuron (i.e., firing or fire extinguishing) depends upon the output of the firing subsystem.
In the n = (n 1 + 1), (n 1 + 2), (n 1 + 3) . . . moment, the value of the dynamic threshold E ij decays exponentially again, and the general formula becomes: Suppose neurons fire for the third time at n = n 2 , then: From the conditions for neuron fire, we have: ; therefore, Suppose neurons fire for the fourth time at n = n 3 , then: From the above, we can conclude that when n 4 . . . , n m = 1 + n m−1 + 1 a E ln( . From the above analysis, we can conclude that the firing period T ij for uncoupled linking PCNN is:

Uncoupled Linking Chaotic PCNN
It can be inferred from Section 2.1.1 that when the initial value of the dynamic threshold of the uncoupled linking PCNN model is constant, the neuron's pulse firing is periodic, and its firing period is shown in Equation (5). In order to obtain the discrete chaotic PCNN model, we changed the initial dynamic threshold value of the original PCNN model into the oscillatory reset voltage, and its simplified model is shown in Figure 2.

Uncoupled Linking Chaotic PCNN
It can be inferred from Section 2.1.1 that when the initial value of the dynamic threshold of the uncoupled linking PCNN model is constant, the neuron's pulse firing is periodic, and its firing period is shown in Equation (5). In order to obtain the discrete chaotic PCNN model, we changed the initial dynamic threshold value of the original PCNN model into the oscillatory reset voltage, and its simplified model is shown in Figure 2.
where w is the angular frequency, and n is the neuron firing moment. Multiply Equation (6) with w , and let ( ) ( ) x m wn m = ; then, we have: Equation (7) is the one-dimensional circular map of the uncoupled linking chaotic PCNN.

Basic Bifurcation Behavior Analysis of Chaotic PCNN
According to the above analysis, the discrete chaotic map mathematical model used for image encryption in this paper is: x w a c S π − + + + = + +  Substituting the oscillatory reset voltage V E (n) = V Em (1 + a 0 sin(wn)) into Equation (5) to obtain Equation (6) below [16]: where w is the angular frequency, and n is the neuron firing moment. Multiply Equation (6) with w, and let x(m) = wn(m); then, we have: Equation (7) is the one-dimensional circular map of the uncoupled linking chaotic PCNN.

Basic Bifurcation Behavior Analysis of Chaotic PCNN
According to the above analysis, the discrete chaotic map mathematical model used for image encryption in this paper is: where c = c = 1−e −(n+1)a F 1−e −a F , a F , V Em , a E , and S ij are controlling parameters, with set fixed parameters n = 500, a = 0.8, and w = 7.7.
When setting initial value x 0 = 3, the controlling parameters are a F = 0.12, V Em = 17.2, and S ij = 0.16. When parameter a E changes between [1.3, 1.5], the bifurcation diagram and Lyapunov exponent spectrum with respect to x are shown in Figure 3a,b, respectively. We know from Figure 3 that, as parameter a E changes, the system has different dynamic oscillation behaviors such as period, multiple periods, chaos, etc. When a E is within [1.3, 1.368], the system has a periodic solution and is in a periodic motion state when the maximum Lyapunov exponent is less than zero; when a E is within [1.369, 1.481], the system has chaotic dynamic behavior, where the maximum Lyapunov exponent is greater than zero; when fixing initial value x 0 = 3, controlling parameters S ij = 0.16, V Em = 17.2, and a E = 1.5, as in Figure 4, when a F is within [1.631, 1.674], the system has a periodic solution and is in a periodic motion state; when a F is within [2.072, 2.5], the system has chaotic dynamic behavior. Based on the same reasoning, the bifurcation diagram and Lyapunov exponent spectrum of the system as a function of other parameters can also be obtained.
When setting initial value 0 3 x = , the controlling parameters are When parameter E a changes between [1.3, 1.5], the bifurcation diagram and Lyapunov exponent spectrum with respect to x are shown in Figure 3a,b, respectively. We know from Figure 3 that, as parameter E a changes, the system has different dynamic oscillation behaviors such as period, multiple periods, chaos, etc. When E a is within [1.3, 1.368], the system has a periodic solution and is in a periodic motion state when the maximum Lyapunov exponent is less than zero; when E a is within [1.369, 1.481], the system has chaotic dynamic behavior, where the maximum Lyapunov exponent is greater than zero; when fixing initial value 0 3 x = , controlling parameters , as in Figure 4, when F a is within [1.631, 1.674], the system has a periodic solution and is in a periodic motion state; when F a is within [2.072, 2.5], the system has chaotic dynamic behavior. Based on the same reasoning, the bifurcation diagram and Lyapunov exponent spectrum of the system as a function of other parameters can also be obtained.   From the definition of Lyapunov exponent, when the Lyapunov exponent is greater than zero, the system is in a chaotic state. When fixing 0 3 x = , with controlling parameters , the Lyapunov exponent is greater than zero, and the system is in a chaotic state; its chaos diagram is shown in Figure  5. From the definition of Lyapunov exponent, when the Lyapunov exponent is greater than zero, the system is in a chaotic state. When fixing x 0 = 3, with controlling parameters a F = 0.12, V Em = 17.2, and S ij = 0.16, from Figure 3b, when a E = 1.5, the Lyapunov exponent is greater than zero, and the system is in a chaotic state; its chaos diagram is shown in Figure 5.  From the definition of Lyapunov exponent, when the Lyapunov exponent is greater than zero, the system is in a chaotic state. When fixing 0 3 x = , with controlling parameters 0.12 , the Lyapunov exponent is greater than zero, and the system is in a chaotic state; its chaos diagram is shown in Figure  5.

Non-Periodicity Analysis of Sequence
In order to verify the non-periodicity of the sequence generated by the chaotic pulsecoupled neural network proposed in this paper, we used the Fourier transform to conduct a lot of experiments and analyses. The magnitude spectrum is shown in Figure 6, and the mean variance diagram of the magnitude spectrum is shown in Figure 7. The analysis results show that the spectrum has no peak in the frequency domain. Since the random sequence generated by our algorithm have the same spectrum characteristics, the generated sequence is a non-periodic sequence.

Non-Periodicity Analysis of Sequence
In order to verify the non-periodicity of the sequence generated by the chaotic pulsecoupled neural network proposed in this paper, we used the Fourier transform to conduct a lot of experiments and analyses. The magnitude spectrum is shown in Figure 6, and the mean variance diagram of the magnitude spectrum is shown in Figure 7. The analysis results show that the spectrum has no peak in the frequency domain. Since the random sequence generated by our algorithm have the same spectrum characteristics, the generated sequence is a non-periodic sequence.

Improved Arnold Transform Image Scrambling Method
The traditional Arnold transformation mainly uses Equation (9) to transform the pixels in the image from position (x, y) to position (x1, y1) and traverses all the pixels of the image through Arnold transformation so that the pixels of the entire image are scrambled

Improved Arnold Transform Image Scrambling Method
The traditional Arnold transformation mainly uses Equation (9) to transform the pixels in the image from position (x, y) to position (x1, y1) and traverses all the pixels of the image through Arnold transformation so that the pixels of the entire image are scrambled

Improved Arnold Transform Image Scrambling Method
The traditional Arnold transformation mainly uses Equation (9) to transform the pixels in the image from position (x, y) to position (x 1 , y 1 ) and traverses all the pixels of the image through Arnold transformation so that the pixels of the entire image are scrambled to achieve the effect of image encryption [17].
where a, b, c, and d are parameters that satisfy ad − bc = 1, and N is the order of the image matrix. For the traditional Arnold transform, although it can scramble the position of image pixels simply and efficiently, it has the following shortcomings: (1) only square images can be scrambled, which reduces the scope of practical applications [18]; (2) it has periodicity, is easy to be deciphered by illegal persons, and the security is poor; as shown in Table 1, the period of Arnold transformation is related to the image size [19]. Illegal persons can reconstruct the original image according to the periodicity of Arnold transformation, which is not conducive to the security of image encryption; and (3) the key space is small, and the anti-attack ability is poor. In order to solve the shortcomings of the traditional Arnold transform and further improve the security of digital image encryption, this paper improves the Arnold transform. First, in order to solve the problem that the traditional Arnold transform can only scramble the square image, this paper uses a square sliding window (M × M) of variable size to traverse the image from left to right and from top to bottom. During the sliding process of the window, the pixels in the window undergo Arnold transformation, and the step size of the sliding window can be set according to actual needs. Secondly, due to the periodicity of the Arnold transform, for cryptography, the periodic encryption method is easy to be illegally cracked, and the security is not high. Therefore, this paper uses the proposed CPCNN chaos system to generate the chaos sequence and sort the chaotic sequence to obtain the image position index value. According to the position index value, the image after Arnold transformation is scrambled with a special level to make it lose the original periodicity of the Arnold transformation. At the same time, the method has a large key space, which can solve the problems of small key space and poor security of Arnold transform. The structure diagram and flow chart of this method are shown in Figure 8. is small, and the anti-attack ability is poor. In order to solve the shortcomings of the traditional Arnold transform and further improve the security of digital image encryption, this paper improves the Arnold transform. First, in order to solve the problem that the traditional Arnold transform can only scramble the square image, this paper uses a square sliding window (M × M) of variable size to traverse the image from left to right and from top to bottom. During the sliding process of the window, the pixels in the window undergo Arnold transformation, and the step size of the sliding window can be set according to actual needs. Secondly, due to the periodicity of the Arnold transform, for cryptography, the periodic encryption method is easy to be illegally cracked, and the security is not high. Therefore, this paper uses the proposed CPCNN chaos system to generate the chaos sequence and sort the chaotic sequence to obtain the image position index value. According to the position index value, the image after Arnold transformation is scrambled with a special level to make it lose the original periodicity of the Arnold transformation. At the same time, the method has a large key space, which can solve the problems of small key space and poor security of Arnold transform. The structure diagram and flow chart of this method are shown in Figure 8.

Scheme and Process of Image Encryption and Decryption
The image encryption algorithm proposed in this paper is mainly divided into two parts: (1) pixel replacement, using the chaotic pulse-coupling neural network to generate a chaotic sequence, taking the modulo of the chaotic sequence, and performing XOR operation with the original image to obtain a pre-encrypted image and (2) pixel scrambling, using the improved Arnold transform in this paper to scramble the pixel position of the pre-encrypted image to obtain the final encrypted image.
The flow chart of encryption in this paper is shown in Figure 9. Algorithm 1 gives the steps involved in the encryption process. The specific encryption steps are as follows: Entropy 2022, 24, 1103 10 of 28 The flow chart of encryption in this paper is shown in Figure 9. Algorithm 1 gives the steps involved in the encryption process. The specific encryption steps are as follows: Step 1: Image input, parameter initialization. Input the grayscale image of size W × H, and convert it into a one-dimensional matrix I1; set the initial parameter value of the chaotic system. See Section 4.2 for the initial parameter value; Step 2: Generate chaotic sequence L1. Use discrete CPCNN to iterate M × N times to generate a chaotic sequence of length M × N; Step 3: Normalize the sequence L1. The sequence generated by the chaotic system is normalized by Equation (10), and the sequence is converted into the range of [0, 1] to obtain the sequence L3; where max/min refers to the maximum/minimum value of the sequence obtained.
Step 4: Generate an encrypted key sequence. The key sequence I2 is obtained by con- Step 1: Image input, parameter initialization. Input the grayscale image of size W × H, and convert it into a one-dimensional matrix I 1 ; set the initial parameter value of the chaotic system. See Section 4.2 for the initial parameter value; Step 2: Generate chaotic sequence L1. Use discrete CPCNN to iterate M × N times to generate a chaotic sequence of length M × N; Step 3: Normalize the sequence L1. The sequence generated by the chaotic system is normalized by Equation (10), and the sequence is converted into the range of [0, 1] to obtain the sequence L3; where max/min refers to the maximum/minimum value of the sequence obtained.
Step 4: Generate an encrypted key sequence. The key sequence I 2 is obtained by converting the sequence L3 into an integer in the range of [0, 255] using the modulo operation of Equation (11), where "sum" in Equation (11) refers to the sum of all pixel values of the input grayscale image; where mod in Equation (11) is the modulo function, and floor is the rounding function.
Step 5: Preliminary encryption operation. XOR the one-dimensional matrix I 1 with the key sequence I 2 to generate a new random sequence, as shown in Equation (12), and then convert the new random sequence into a pre-encrypted image Q1 of size W × H; where bitxor in Equation (12) refers to the bitwise exclusive OR operation.
Step 6: Arnold transform on the pre-encrypted image. Using a 100 × 100 square sliding window and setting the step size to 30, the pre-encrypted image is traversed, and the entire pre-encrypted image is Arnold transformed to obtain a new scrambled image Q2; Step 7: Repeat the process of steps 2-4 to generate a new key sequence I 3 , and convert the key sequence I 3 into an image matrix M2 with a size of W × H; Step 8: Row the image matrix M2 in ascending order and obtain its position index value at the same time. If the pixel value of the first row of image matrix M2 is assumed to be [0, 5,3,9], the position index value obtained in ascending row order is [1,3,2,4]; Step 9: Use the image position index value generated in step 8 to reverse the index the scrambled image Q2 generated in step 6 to obtain the final encrypted image Q3. If the pixel value of the first row of the image Q2 is [1, 6,3,7], use the position index value [1,3,2,4] of step 8 to perform reverse indexing to obtain the pixel of the first row of the final encrypted image Q3; the value is [1, 3,6,7]. The flowchart of steps 7-9 is shown in Figure 10.
where bitxor in Equation (12) refers to the bitwise exclusive OR operation.
Step 6: Arnold transform on the pre-encrypted image. Using a 100 × 100 square sliding window and setting the step size to 30, the pre-encrypted image is traversed, and the entire pre-encrypted image is Arnold transformed to obtain a new scrambled image Q2; Step 7: Repeat the process of steps 2-4 to generate a new key sequence I3, and convert the key sequence I3 into an image matrix M2 with a size of W × H; Step 8: Row the image matrix M2 in ascending order and obtain its position index value at the same time. If the pixel value of the first row of image matrix M2 is assumed to be [0, 5,3,9], the position index value obtained in ascending row order is [1,3,2,4]; Step 9: Use the image position index value generated in step 8 to reverse the index the scrambled image Q2 generated in step 6 to obtain the final encrypted image Q3. If the pixel value of the first row of the image Q2 is [1,6,3,7], use the position index value [1,3,2,4] of step 8 to perform reverse indexing to obtain the pixel of the first row of the final encrypted image Q3; the value is [1, 3,6,7]. The flowchart of steps 7-9 is shown in Figure 10. The decryption process of the encryption algorithm proposed in this paper is the inverse process of the encryption process. As long as the encryption process is reversed, the original plaintext image can be restored without distortion. This paper will not describe it in detail.  The decryption process of the encryption algorithm proposed in this paper is the inverse process of the encryption process. As long as the encryption process is reversed, the original plaintext image can be restored without distortion. This paper will not describe it in detail.

Experiment Environment
The equipment environment used in this experiment was Windows 10 (64-bit) operating system with 16 G memory; the processor of the running platform was Intel (R) Core (TM) i7-10510U CPU @ 1.80 GHz 2.30 GHz; GPU is NVIDIA GeForce MX250; Development and testing software environment was MATLAB R2019a.

Experiment Parameter Setting and Result
Parameter setting: for the experiment in this paper, set fixed parameters for CPCNN mapping n = 500, a = 0.8, w = 7.7; controlling parameters a F = 0.12, V Em = 17.2, S ij = 0.16, a E = 1.5; and initial value x 0 = 3. Set the Arnold transform parameters as a = 1, b = 1, c = 2, and d = 3.
Sliding window parameter setting: The choice of the window size will affect the speed of encryption and the effect of encryption. Therefore, in order to weigh the efficiency of encryption and the effect of encryption, Formulas (13) and (14) are recommended to determine the window size (N × N) and step size (S), respectively.
In the above formula, L and W are the length and width of the input image, N is the size of the sliding window, and S is the sliding step. N and S must be integers.
Result: The algorithm proposed in this paper can implement encryption processing for images of any size. In the experimental simulation, this paper uses standard Lena, Cameraman, White and Black grayscale images as encrypted images, and the image sizes are 256 × 256 and 300 × 400. As shown in Figure 11, Figure 11a,d,g,j are the encrypted images of Figure 11b,e,h,k obtained after the original images are encrypted by the algorithm in this paper. Comparing the images before and after encryption, it can be seen that, after the original images are encrypted, the original feature information of the images is completely lost, and the algorithm in this paper has a good encryption effect. At the same time, after the encrypted image is decrypted, the information characteristics of the original images can be restored accurately and losslessly, as shown in Figure 11c,f,i,l.

Histogram Statistical Analysis
The grayscale histogram of the image can intuitively reflect the distribution and distribution rules of each grayscale value. Statistical analysis attack means that the illegal persons can crack the encrypted image by comparing and analyzing the image statistical law and image gray value distribution information of the plaintext and ciphertext of the image [20]. Therefore, the grayscale histogram of the image can reflect the ability of the algorithm in this paper to resist statistical analysis attacks to a certain extent. The more uniform the distribution of the gray histogram of the image, the smaller the corresponding variance. The smaller the variance, the less statistical information contained in the image, the stronger the ability to resist statistical analysis attacks and the higher the security. According to the histogram of pixel distribution before and after encryption in Figure 12, it The grayscale histogram of the image can intuitively reflect the distribution and distribution rules of each grayscale value. Statistical analysis attack means that the illegal persons can crack the encrypted image by comparing and analyzing the image statistical law and image gray value distribution information of the plaintext and ciphertext of the image [20]. Therefore, the grayscale histogram of the image can reflect the ability of the algorithm in this paper to resist statistical analysis attacks to a certain extent. The more uniform the distribution of the gray histogram of the image, the smaller the corresponding variance. The smaller the variance, the less statistical information contained in the image, the stronger the ability to resist statistical analysis attacks and the higher the security. According to the histogram of pixel distribution before and after encryption in Figure 12, it can be seen that the histogram of the plaintext image is unevenly distributed and has rich image statistical information. After image encryption processing, the histogram distribution of the image is relatively uniform, indicating that the encryption algorithm in this paper breaks the statistical feature information of the original image and can effectively resist the statistical analysis attack of illegal persons. In order to quantitatively analyze the uniformity of the histogram distribution, this paper uses the histogram 2 χ distribution to verify. Equation (15)   In order to quantitatively analyze the uniformity of the histogram distribution, this paper uses the histogram χ 2 distribution to verify. Equation (15) (15) In this paper, the significance level a = 0.05 is used for verification, and Equation (15) is used to calculate the original and encrypted images of Lena, Cameraman, White, and Black, and the obtained values are shown in Table 2. The values of the ciphertext images are 237.8047, 257.2188, 263.6016, and 260.2813 and are less than χ 2 0.05 (255)= 293.24783. Therefore, the histogram of the ciphertext image can be considered to meet the uniform distribution at the significance level a = 0.05, and it also shows that the algorithm in this paper can change the histogram distribution of the original image well and has a good ability to resist statistical analysis attacks.

Correlation Analysis of Adjacent Pixels
The correlation of correlation between adjacent pixels in an image reflects the degree of correlation and similarity between adjacent pixels. The closer the pixel values between adjacent pixels are, the stronger the correlation between adjacent pixels of the image, and the easier it is for illegal attackers to use the feature of strong correlation between adjacent pixels to infer the pixel value of surrounding pixels through a single pixel point [21]. The meaning of encryption is to break the original strong correlation between image pixels and reduce the correlation between adjacent pixels of the image. Therefore, the encryption effect of the algorithm in this paper can be judged by the correlation between the adjacent pixels of the image before and after encryption. As can be seen from Figures 13-16, the adjacent pixel scatter plots of the plaintext image show a linear relationship, while the ciphertext image shows a uniform distribution.
In order to quantitatively analyze the correlation of adjacent pixels, this paper introduces the correlation coefficient to calculate the correlation strength in the horizontal, vertical, and diagonal directions of the image. The calculation formula of the correlation coefficient of adjacent pixels in the image is shown in Equation (16). In this paper, 10,000 adjacent pixels are randomly selected from the plaintext and ciphertext of the image for calculation. The calculation results are shown in Table 3.
meaning of encryption is to break the original strong correlation between image pixels and reduce the correlation between adjacent pixels of the image. Therefore, the encryption effect of the algorithm in this paper can be judged by the correlation between the adjacent pixels of the image before and after encryption. As can be seen from Figures 13-16, the adjacent pixel scatter plots of the plaintext image show a linear relationship, while the ciphertext image shows a uniform distribution.          Among them, in Equation (16), y is the adjacent pixel of x, and n is the total number of image pixels; E(x) and D(x) are the mean and variance of the image pixel value; cov(x, y) is the covariance of two adjacent pixels x and y; and R xy is the correlation coefficient of adjacent pixels. When the correlation coefficient is closer to 1, it indicates that the correlation of adjacent pixels is higher, and the closer it is to 0, the lower the correlation. It can be seen from Table 3 that the correlation coefficient of the plaintext image is close to 1, while the correlation coefficient of the ciphertext image is close to 0. Therefore, the encryption algorithm in this paper can well break the correlation between adjacent pixels of the original image to achieve a good encryption effect.

Information Entropy Analysis
Information entropy is an important indicator used to measure the randomness of the signal source, and its calculation formula is as Equation (17). This paper uses information entropy to quantitatively compare the randomness of images before and after encryption. The larger the information entropy value, the stronger the randomness of the information distribution of the image and the better the encryption effect [22]. The ideal information entropy of the ciphertext image is eight, indicating that the information distribution of the image is completely random. It can be easily obtained from Table 4 that the information entropy of the encrypted images is greater than 7.997. Therefore, it can be shown that the encryption effect of this paper is better, and the security of the encrypted image is higher.
where M = 256 in Equation (17) represents all states of image pixel values (0-255), x i represents the pixel value of the image, and P(x i ) refers to the probability that the number of pixels with corresponding pixel value x i accounts for the total number of the entire image.

Tests for Randomness
In order to test the randomness of the generated sequences, TestU01 test was used to verify the statistical characteristics of the proposed system. For each test, a p-value was calculated. If the p-value was in the range [10 −4 , 1−10 −4 ], the test was successful [23]. Any p-value outside this range is considered a failed test. Table 5 shows the final test results of TestU01; it can be seen that the sequences produced by the chaotic system proposed in this paper can pass the TestU01 test. The experimental results show that the chaotic sequence generated by chaotic pulse-coupled neural network has good randomness and is safe and reliable. At the same time, in order to further verify the randomness, we also introduced the performance index of the average neighborhood gray difference for quantitative analysis and comparison. The degree of gray difference is another statistical measure to compare the randomness between the original image and the encrypted image [24]. The final result of the Equations (18)- (20) is called the GVD score. The GVD score is closer to 0 if the two images are closer, and closer to 1 otherwise. The GVD results of our algorithm are shown in Table 6. Since the GVD score for encrypted images obtained by our algorithm is closer to one, the randomness is quite good. G (x, y) represents the gray value at position (x, y). AN and AN represent the average neighboring gray value before and after encryption, respectively.

Key Space Analysis
The key space refers to the set of all keys, that is, the value range of the keys. Illegal attackers usually use brute force attacks to decipher encrypted images by traversing all possible keys, so a large enough key space can effectively resist brute force attacks by illegal attackers [25]. The encryption algorithm in this paper uses parameters such as a F , V Em , S ij , a E , and x 0 as encryption keys; if the value step size of each key is taken as 10 −16 , then a F , V Em , S ij , a E , and x 0 have available key spaces of 10 12 , 10 12 , 10 13 , 10 14 , and 10 14 , respectively. From cryptographic theories, only a key space larger than 2 128 can resist illegal brute force attacks. The key space of the encryption algorithm in this paper can reach above 10 130 , which is larger than 2 430 . Therefore, the encryption algorithm in this paper has a large enough key space and can effectively resist brute force attacks. The key space comparison results are shown in Table 7. Table 7. Comparison results of key space.

Method
Year

Key Sensitivity Analysis
An ideal encryption algorithm should have good key sensitivity; that is, making a small change to the key produces a completely different encryption result [31]. The stronger the key sensitivity of the encryption algorithm, the higher the security of encryption. In order to verify the key sensitivity of the algorithm in this paper, through qualitative analysis, only a small change is made to a single key value each time, and the difference between the two values before and after the change is only 10 −10 . It can be seen from Figure 17 that the correct plaintext image cannot be restored as long as the key is slightly changed in the decryption process, and the image obtained by making a slight change to a single key value is very different from the plaintext image. Therefore, it can be shown that the algorithm in this paper has a very good key sensitivity in the decryption process.
In order to further analyze the key sensitivity of the algorithm in the encryption process, this paper introduces two indicators, the Number of Pixel Change Rate (NPCR) and the Unified Average Change Intensity (UACI), to quantitatively evaluate the key sensitivity of the encryption process in this paper. NPCR and UACI, respectively, represent the proportion and average change intensity of the number of pixel changes between the two encrypted images, and the calculation formula is as Equation (21). The ideal NPCR and UACI values are 99.609375% and 33.463542%, respectively. The closer the NPCR and UACI values are to the ideal values, the higher the key sensitivity of the encryption algorithm and the higher the security. When the value of a single key increases by 10 −10 , the NPCR and UACI values are between the corresponding encrypted image and the original encrypted image, and the proportions of different pixels of the two encrypted images are shown in Table 8.
where P(i, j) is the pixel at corresponding location (i, j) of the encrypted image, and M and N are the height and width of the image, respectively. In order to further analyze the key sensitivity of the algorithm in the encryption process, this paper introduces two indicators, the Number of Pixel Change Rate (NPCR) and the Unified Average Change Intensity (UACI), to quantitatively evaluate the key sensitivity of the encryption process in this paper. NPCR and UACI, respectively, represent the proportion and average change intensity of the number of pixel changes between the two encrypted images, and the calculation formula is as Equation (21). The ideal NPCR and UACI values are 99.609375% and 33.463542%, respectively. The closer the NPCR and UACI values are to the ideal values, the higher the key sensitivity of the encryption algorithm and the higher the security. When the value of a single key increases by 10 −10 , the NPCR and UACI values are between the corresponding encrypted image and the original encrypted image, and the proportions of different pixels of the two encrypted images are shown in Table 8.
( 1( , ) 2( , )) 1 100% 255 where ( , ) P i j is the pixel at corresponding location ( , ) i j of the encrypted image, and M and N are the height and width of the image, respectively.   5.6. Anti-Attack Ability Analysis 5.6.1. Anti-Differential Attack Analysis A differential attack means that an illegal attacker obtains a new encrypted image after making slight changes to the plaintext image, then compares it with the original encrypted image to find the data relationship and law between the two encrypted images, and then realizes the cracking of the ciphertext image [32]. As shown in Figure 18, this paper only changes the pixel value of one pixel of the original plaintext image (at the arrow in Figure 11c). By comparing the original ciphertext image and the encrypted image after changing a single pixel value, it is found that in the obtained two images, more than 99% of the pixels in the encrypted image are not identical, as shown in Table 9. At the same time, this paper also uses the NPCR and UACI values to make a quantitative comparison. As shown in Table 10, the calculation results of NPCR and UACI are closer to the ideal values. Therefore, it can be proved that the algorithm in this paper has a strong ability to resist differential attacks. A differential attack means that an illegal attacker obtains a new encrypted image after making slight changes to the plaintext image, then compares it with the original encrypted image to find the data relationship and law between the two encrypted images, and then realizes the cracking of the ciphertext image [32]. As shown in Figure 18, this paper only changes the pixel value of one pixel of the original plaintext image (at the arrow in Figure 11c). By comparing the original ciphertext image and the encrypted image after changing a single pixel value, it is found that in the obtained two images, more than 99% of the pixels in the encrypted image are not identical, as shown in Table 9. At the same time, this paper also uses the NPCR and UACI values to make a quantitative comparison. As shown in Table 10, the calculation results of NPCR and UACI are closer to the ideal values. Therefore, it can be proved that the algorithm in this paper has a strong ability to resist differential attacks. Figure 18. Comparison diagram before and after differential processing. (a,e) Plain-text image, (b,f) encrypted image, (c,g) plain-text image after differential processing, and (d,h) encrypted image after differential processing. Table 9. Comparison of different pixels of encrypted images before and after differential processing (%).

Anti-Salt and Pepper, Gaussian Noise Attack Analysis
In the process of information transmission, the image will inevitably encounter the influence of various communication noises. When the encrypted image is attacked by noise, it will have a certain impact on the decryption of the image so that the ciphertext image is difficult to restore the clear original image [33]. Therefore, a good encryption algorithm should have the ability to resist noise attacks, and when the encrypted image is attacked by noise, it can restore the original image clearly. In order to verify the anti-noise ability of the encryption algorithm in this paper, this paper randomly adds 10% salt and pepper noise and Gaussian noise with a mean of 0 and a variance of 0.001 to the encrypted image, as shown in Figures 19 and 20. It can be easily seen from Figures 19 and 20 that after the noise processing of the encrypted image, we can still see the decrypted image information clearly. Therefore, the encryption algorithm in this paper has a good ability to resist noise attacks, and it also shows that the algorithm in this paper has strong robustness.

Anti-Salt and Pepper, Gaussian Noise Attack Analysis
In the process of information transmission, the image will inevitably encounter the influence of various communication noises. When the encrypted image is attacked by noise, it will have a certain impact on the decryption of the image so that the ciphertext image is difficult to restore the clear original image [33]. Therefore, a good encryption algorithm should have the ability to resist noise attacks, and when the encrypted image is attacked by noise, it can restore the original image clearly. In order to verify the anti-noise ability of the encryption algorithm in this paper, this paper randomly adds 10% salt and pepper noise and Gaussian noise with a mean of 0 and a variance of 0.001 to the encrypted image, as shown in Figures 19 and 20. It can be easily seen from Figures 19 and 20 that after the noise processing of the encrypted image, we can still see the decrypted image information clearly. Therefore, the encryption algorithm in this paper has a good ability to resist noise attacks, and it also shows that the algorithm in this paper has strong robustness.  Due to the fact that some data are easy to be lost or cropped during the image transmission process, a good decryption algorithm should have a good ability to resist crop-

Analysis of Anti-Shearing Attack Ability
Due to the fact that some data are easy to be lost or cropped during the image transmission process, a good decryption algorithm should have a good ability to resist cropping and data loss, even if some data are lost in the decryption process, basically restoring the original image [34]. In this paper, in order to verify the ability of the algorithm to resist cropping and data loss, the encrypted image is cropped by 1/16, 1/8, 1/4, and 1/2, and then the decrypted images obtained by decrypting there are shown in Figure 21. It can be seen from Figure 21 that even if the encrypted image loses some information, the characteristic information of the original image can be basically recovered after decryption, and the content in the image can be easily distinguished by the naked eye. Therefore, the algorithm in this paper has better ability to resist cropping and data loss.

Analysis of Anti-Shearing Attack Ability
Due to the fact that some data are easy to be lost or cropped during the image transmission process, a good decryption algorithm should have a good ability to resist cropping and data loss, even if some data are lost in the decryption process, basically restoring the original image [34]. In this paper, in order to verify the ability of the algorithm to resist cropping and data loss, the encrypted image is cropped by 1/16, 1/8, 1/4, and 1/2, and then the decrypted images obtained by decrypting there are shown in Figure 21. It can be seen from Figure 21 that even if the encrypted image loses some information, the characteristic information of the original image can be basically recovered after decryption, and the content in the image can be easily distinguished by the naked eye. Therefore, the algorithm in this paper has better ability to resist cropping and data loss. Images are easily affected by various external factors during network transmission, resulting in decrypted images mixed with various noises. In order to filter out the noise in the image and restore the detailed information of the original image more clearly, this paper adopts the noise filtering method based on the multi-layer PCNN proposed by the author earlier. For the specific method, please refer to the literature [35]. This method mainly utilizes the pulse ignition feature of PCNN to locate the pepper noise and salt noise in the decrypted image. Then, without changing the size of the filter window, multi-layer PCNN is used to process the image to reduce the salt and pepper noise in the decrypted image and better restore the details of the original image. The experiments show that this Figure 21. The cropped ciphertext image and its decryption renderings. Encrypted image with (a,i) 1/16 data loss, (b,j) 1/8 data loss, (c,k) 1/4 data loss, and (d,l) 1/2 data loss; decrypted image with (e,m) 1/16 data loss, (f,n) 1/8 data loss, (g,o) 1/4 data loss, and (h,p) 1/2 data loss.

Noise Processing of Decrypted Images
Images are easily affected by various external factors during network transmission, resulting in decrypted images mixed with various noises. In order to filter out the noise in the image and restore the detailed information of the original image more clearly, this paper adopts the noise filtering method based on the multi-layer PCNN proposed by the author earlier. For the specific method, please refer to the literature [35]. This method mainly utilizes the pulse ignition feature of PCNN to locate the pepper noise and salt noise in the decrypted image. Then, without changing the size of the filter window, multi-layer PCNN is used to process the image to reduce the salt and pepper noise in the decrypted image and better restore the details of the original image. The experiments show that this method can filter out most of the salt and pepper noise in the decrypted image. The experimental results are shown in Figure 22. It can be seen from the figure that the image obtained after decryption has some salt and pepper noise, as shown in Figure 22c,g. After the decrypted image is processed by the noise filtering method of the multi-layer PCNN proposed by the author, the salt and pepper noise in the image can be effectively reduced, and the feature information of the original image can be better preserved. 5.6.4. Noise Processing of Decrypted Images Images are easily affected by various external factors during network transmission, resulting in decrypted images mixed with various noises. In order to filter out the noise in the image and restore the detailed information of the original image more clearly, this paper adopts the noise filtering method based on the multi-layer PCNN proposed by the author earlier. For the specific method, please refer to the literature [35]. This method mainly utilizes the pulse ignition feature of PCNN to locate the pepper noise and salt noise in the decrypted image. Then, without changing the size of the filter window, multi-layer PCNN is used to process the image to reduce the salt and pepper noise in the decrypted image and better restore the details of the original image. The experiments show that this method can filter out most of the salt and pepper noise in the decrypted image. The experimental results are shown in Figure 22. It can be seen from the figure that the image obtained after decryption has some salt and pepper noise, as shown in Figure 22c,g. After the decrypted image is processed by the noise filtering method of the multi-layer PCNN proposed by the author, the salt and pepper noise in the image can be effectively reduced, and the feature information of the original image can be better preserved.

Analysis of Speed
In addition to the evaluation of the security performance of the encryption algorithm in this paper, the encryption efficiency is also an important index in practice. Table 11 lists the time required to encrypt the two images "Lena" and "Cameraman" using the encryption algorithm proposed in this paper and the time required to encrypt images of the same size by other literature algorithms. We can see from the table that, compared to other encryption algorithms, our algorithm can better meet the needs of fast encryption.

Conclusions
This paper proposes a new image encryption algorithm based on improved Arnold transform and a chaotic pulse-coupled neural network. First, the chaotic sequence is generated by the chaotic pulse-coupling neural network proposed in this paper, then the chaotic sequence is XORed with the pre-encrypted image to achieve the effect of preencryption, and then the image is scrambled by the improved Arnold transform to obtain the final encrypted image. Among them, the original Arnold transform is improved to better solve the limitation that the Arnold transform is only suitable for square images. At the same time, the pixel position index is introduced to eliminate the periodicity of Arnold transform, which improves the security of the Arnold transform for image scrambling, and it is not easy for illegal persons to use the periodic characteristics of Arnold transform to decipher.
Finally, experiments show that the pixel histogram of the encrypted image obtained by the algorithm in this paper is relatively uniform, which can break the statistical feature information of the original image and has the ability to resist statistical analysis attacks; the correlation coefficient of the encrypted image is close to 0, which can break the correlation between pixels in the original image; the information entropy is close to 8, which can resist statistical attacks. It has a large enough key space and can effectively resist brute force attacks; at the same time, the algorithm in this paper also has good resistance to differential attacks, anti-noise attack and anti-shearing attack ability, good robustness, and high security. Therefore, the algorithm in this paper has a good encryption effect.