**1. Introduction**

With the rapid development of cloud computing, big data, blockchain and other emerging technologies, the privacy and sharing of messages provides convenience for people in their work and daily lives [1–4]. However, the convenience also threatens the security of cyberspace [5–8]. In particular, as a significant transmission medium, digital images may include a lot of personal privacy, confidential information and other important data, so their privacy protection gets more attention [9–12]. Encryption technology is a common means to assure the security of digital images, and has been widely used in various fields of digital image security [13–17]. Currently, there exist many mature block encryption schemes that are widely used in text encryption and these schemes have brilliant effects [18,19]. Nevertheless, due to the uniqueness of the image, such as being two-dimensional, redundancy and a strong correlation of two adjacent pixels, traditional text encryption faces severe challenges [20–22]. Moreover, the problem of realtime transmission should be considered in image encryption to improve the communication performance [9,23,24]. Therefore, it is quite necessary to study the new technologies and methods of image encryption.

In current international studies, digital image encryption is a research hotspot [25–27]. Various mechanisms and methods are introduced to enhance the security of algorithms [28,29].

**Citation:** Wen, H.; Xu, J.; Liao, Y.; Chen, R.; Shen, D.; Wen, L.; Shi, Y.; Lin, Q.; Liang, Z.; Zhang, S.; et al. A Security-Enhanced Image Communication Scheme Using Cellular Neural Network. *Entropy* **2021**, *23*, 1000. https://doi.org/ 10.3390/e23081000

Academic Editor: Amelia Carolina Sparavigna

Received: 23 June 2021 Accepted: 28 July 2021 Published: 31 July 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

In 2015, the authors of [16] proposed a multibiometric template protection scheme based on fuzzy commitment and a chaos-based system, as well as a security analysis method of unimodal biometrics leakage. The chaos-based system is used to encryp<sup>t</sup> the dual iris feature vectors. The experimental results show that the security of BCH ECC (1,023,123,170) based on multibiometrics template is improved from 80.53 bits to 167.80 bits. In 2017, the authors of [30] designed a special image encryption scheme based on the second-order Henon mapping hyperchaos and the fifth-order CNN. Experimental results show that the scheme features high security and is suitable to spread in the network. At the same time, in [31] a new image encryption method was proposed, based on the biological DNA sequences operation and the third-order CNN. The method could effectively enhance the plaintext sensitivity and features large key space and high security. In 2019, the authors of [17] proposed a new privacy protection encryption mechanism for medical systems based on the Internet of Things. Experimental results show that the encryption mechanism is robust and effective to protect the privacy of patients. In 2020, Zhang and Zhang [32] used the Chen chaos-based system and two-dimensional logistic mapping to propose a multi-image encryption system based on bitplane and chaos. The experiment also proved its high efficiency. At the same time, in [15] a new and effective color image cryptosystem was proposed. The experimental results show that the cryptosystem has high security efficiency and can be effectively applied to the IoHT framework of secure medical image transmission. In summary, more and more theories and technological achievements have been made in digital image encryption. However, in current studies, most digital images are regarded as a two-dimensional matrix to encrypt, meaning that only the spatial domain is processed [6,33–35]. However, two defects were exposed: (1) Some encryption algorithms have security flaws and are not associated with plaintext, so it is difficult for them to resist chosen-plaintext attack (CPA); (2) The cost of attacking the encryption algorithm is relatively low because chaos-based systems are relatively simple.

Aimed at solving the existing problems, we put forward a digital image encryption algorithm based on CNN in this paper. On the one hand, a CNN chaos-based system is selected to generate a chaos-based key sequence. The CNN chaos-based system has more complex behavioral characteristics, so it has better security performance than other encryption systems. On the other hand, the scheme adopts the security mechanism of generating a chaos-based key sequence by plaintext correlation. Therefore, compared with other encryption schemes based on a CNN chaos-based system, it effectively enhances the ability to resist CPA. Theoretical analysis and experimental results show that the proposed algorithm can effectively enhance the confusion, diffusion and avalanche effect of encryption. Therefore, the image encryption algorithm based on CNN is reliable.

#### **2. Correlation Theory**

The idea of a cellular neural network (CNN) was conceived by Chua and Yang in 1988 [34]. The basic units of CNN are called cells, and each cell is a nonlinear first-order circuit which is composed of a linear resistor, a linear capacitor and a voltage-controlled current source [36,37].

In order to make the mathematical model of CNN more comprehensible, a simplified CNN cell model is adopted:

$$\frac{d\mathbf{x}\_{\circ}}{dt} = -\mathbf{x}\_{\circ} + A\_{\circ}\mathbf{p}\_{\circ} + \mathbf{G}\_{o} + \mathbf{G}\_{s} + I\_{\circ} \tag{1}$$

where *j* is used as a cell marker, *xj* represents the state variable, *Aj* represents a constant number, *Ij* represents the threshold value, *Gs* and *Go* separately represent the linear combination of the state variables of the cell and the output value of the connecting cell, and *pj* represents the output of the cell.

The fourth-order fully interconnected CNN equation can be defined as follows:

$$\begin{cases} \frac{dx\_j}{dt} = -\mathbf{x}\_j + A\_j p\_j + \sum\_{\substack{k=1 \ j \neq j}}^4 A\_{j\mathbf{k}} p\_j + \sum\_{k=1}^4 S\_{j\mathbf{k}} \mathbf{x}\_k + I\_j\\ p\_j = 0.5 \left| \mathbf{x}\_j + 1 \right| - 0.5 \left| \mathbf{x}\_j - 1 \right| \end{cases} \tag{2}$$

where *S* represents a matrix of *j* × *k*, *Aj* and *Ij* both represent a matrix of *j* × 1, *Ajk* = 0(*j* = *k*, *j* = 1, 2, 3, 4; *k* = 1, 2, 3, 4) and it can be described by the equation of state in Equation (2) [38]:

$$\begin{cases} \frac{dx\_1}{dt} = -x\_3 - \varepsilon x\_4\\ \frac{dx\_2}{dt} = 2x\_2 + x\_3\\ \frac{dx\_3}{dt} = 14x\_1 - 14x\_2\\ \frac{dx\_4}{dt} = 200p\_4 + 100x\_1 - 100x\_4 \end{cases} \tag{3}$$

where *ε* is the control parameter of the CNN model, which can control the size and quantity of Lyapunov exponents, and the range of values for *ε* is 0 to 2. At this moment, the system is in a chaos-based state, and four aperiodic chaos-based sequences can be generated from it, which are very sensitive to the initial conditions *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0) and *<sup>x</sup>*4(0). By calculating the Lyapunov exponents of Equation (3), it can be seen that the Lyapunov exponents of the four chaos-based sequences tend to 42.8487, 2.0230, −0.0230 and −49.0391, respectively, two of which are positive. Therefore, the CNN model is a hyperchaotic system, and the Lyapunov exponents are shown in Figure 1. When the initial values of *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0) and *<sup>x</sup>*4(0) are 0.2, 0.2, 0.2 and 0.2, respectively, we use the fourth-order Runge–Kutta algorithm with the step size of *h* = 0.005 to ge<sup>t</sup> the two-dimensional chaos-based attractor, as shown in Figure 2a–d and the three-dimensional chaos-based attractor, as shown in Figure 2e–h.

**Figure 1.** Lyapunov exponents spectrum. The exponents tend to 42.8487, 2.0230 and −0.0230, and −49.0391, as can be seen in (**<sup>a</sup>**–**<sup>c</sup>**), respectively.

**Figure 2.** *Cont.*

**Figure 2.** Chaos-based attractors generated by the fourth-order CNN: (**a**) *x*1, *x*2; (**b**) *x*1, *x*3; (**c**) *x*1, *x*4; (**d**) *x*2, *x*4; (**e**) *x*1, *x*2, *x*3; (**f**) *x*1, *x*2, *x*4; (**g**) *x*1, *x*3, *x*4; (**h**) *x*4, *x*3, *x*2.

#### **3. The Proposed Encryption Algorithm**

The encryption algorithm of chaos-based image usually adopts the classical structure "permutation–diffusion" [39,40]. However, due to the lack of security, a chaos-based image encryption algorithm based on a "confusion–permutation–diffusion" structure is proposed in this paper [35].

The encryption and decryption processes are shown in Figure 3. IEA-CNN represents the image encryption algorithm based on a cellular neural network, IDA-CNN represents the image decryption algorithm based on a cellular neural network. In order to enhance the ability to resist CPA, the image encryption system of this paper adopts the security mechanisms of chaos-based key sequences produced by plaintext association and ciphertext feedback diffusion encryption. The specific steps of the encryption algorithm are given as follows:

#### **Step 1:** *Preprocessing Sequences*

The secret key of the image encryption algorithm contains the Message-Digest Algorithm 5 (MD5) value of plain image, the initial value of the fourth-order CNN and the controlling parameters. The MD5 can be used to disturb the initial value key parameters of CNN chaos; so that the key sequence changes with different plain images, the specific treatment methods are calculated using the following formulas:

$$\begin{cases} \mathbf{x}\_1'(0) = \mathbf{x}\_1(0) + (m\_1 \oplus m\_2 \oplus m\_3 \oplus m\_4)/256 \\ \mathbf{x}\_2'(0) = \mathbf{x}\_2(0) + (m\_5 \oplus m\_6 \oplus m\gamma \oplus ms)/256 \\ \mathbf{x}\_3'(0) = \mathbf{x}\_3(0) + (m\_9 \oplus m\_{10} \oplus m\_{11} \oplus m\_{12})/256 \\ \mathbf{x}\_4'(0) = \mathbf{x}\_4(0) + (m\_{13} \oplus m\_{14} \oplus m\_{15} \oplus m\_{16})/256 \end{cases} \tag{4}$$

where ⊕ is bitwise XOR operation, *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0) and *<sup>x</sup>*4(0) are the initial values of the fourth-order CNN key parameters; *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0) and *<sup>x</sup>*4(0) are the initial values updated after the disturbance from MD5. Obviously, the new initial values will change with the different plain images. Then, a preprocessing operation is adopted for the chaos-based sequences. The generating methods of obfuscated sequences are shown as follows:

$$\begin{cases} \operatorname{real\\_X} = [\mathbf{x}\_1; \mathbf{x}\_2; \mathbf{x}\_3; \mathbf{x}\_4] \\ \quad \mathbf{K}\_c^{\prime} = \operatorname{floor}(\mathbf{mod\\_(real\\_X \times 10^{10}, 256)}) \\ \quad \mathbf{K}\_c = \operatorname{reshape}(\mathbf{K}\_c^{\prime}, H, \mathcal{W}) \end{cases} \tag{5}$$

where *real* \_ *X* is composed of four sequences produced by the fourth-order CNN chaosbased system. The sequences diagram of four sequences generated by chaos-based mapping of the fourth-order CNN is shown in Figure 4. The size of *Kc* is equal to *H* × *W*, *H*

and *W* are pixel rows and pixel columns of the plain images for image confusion. The generating method of permutation sequences is shown as follows:

$$\begin{cases} seq\\_H = \ge\_2 (1, 1:H) \\ seq\\_W = \ge\_3 (2, 1:8 \times W) \\ \left[ value\_1, \le\_{pr} \right] = sort(seq\\_H) \\ \left[ value\_2, \le\_{pc} \right] = sort(seq\\_W) \end{cases} \tag{6}$$

where *sort* is the sorting function of array elements; *x*2 represents a two-dimensional sequence of *real*\_*X*; *x*3 represents the three-dimensional sequence of *real*\_*X*; *seq*\_*H* represents the chaos-based sequence of length *H* extracted from *x*2; *real*\_*W* represents the chaos-based sequence of length 8 × *W* extracted from *x*3; *Kpr* means that the pixel row is generated by the sorting function and the length is *H*; *Kpc* means that the pixel column is generated by the sorting function and the length is 8 × *W*; *value*1 and *value*2 are the sorted chaos-based sequence values.

The generating method of diffusion sequences is shown as follows:

$$\begin{cases} \begin{aligned} \text{K}\_d &= mod(floor([\mathbf{x}\_1, \mathbf{x}\_3, \mathbf{x}\_2, \mathbf{x}\_4] \times 10^5), 256) \\ \text{K}\_d &= mod(floor([\mathbf{x}\_3, \mathbf{x}\_4, \mathbf{x}\_1, \mathbf{x}\_2] \times 10^5), 256) \end{aligned} \end{cases} \tag{7}$$

where the lengths of *Kd* and *Kd* are *H* × *W*, and the key sequences of *Kd* and *Kd* are used for diffusion.

#### **Step 2:** *Confusion*

The key sequence *Kc* is used to obfuscate the plain image *P*. The image can be visualized and hidden to ge<sup>t</sup> the obfuscated image *I*1, the method is shown as follows:

$$I\_1(i) = K\_\varepsilon(i) \oplus P(i), i = (1, 2, \cdot, \cdot, H \times W) \tag{8}$$

#### **Step 3:** *Permutation*

The key sequences *Kpr*(*i*) and *Kpc*(*j*) are used to replace the pixels in *I*1 to ge<sup>t</sup> *I*3, the method is shown as follows:

$$\begin{cases} \ I\_2 = \text{swap}\left(I\_1\left(\colon, K\_{pc}(i)\right), I\_1(\colon, i)\right) \\\ I\_3 = \text{swap}\left(I\_2\left(K\_{pr}(j), \colon\right), I\_2(j\_!; \cdot)\right) \end{cases} \tag{9}$$

where *swap* function is used to swap the values of two pixels. The number of bit level rows is equal to the number of pixel level rows, and the number of bit level columns is equal to 8 times the number of pixel level columns, thus, *i* = 1, 2, ··· , *H* and *j* = 1, 2, ··· , 8 × *W*. *I*2 and *I*3 are the images after double bit column transform and row transform permutation, respectively.

**Step 4:** *Diffusion*

All the ciphertext pixels in *I*3 are diffused dynamically. *Kd* and *Kd* are used for the image diffusion operation to generate the final ciphertext image C.

The first ciphertext pixel *C*(1) is generated, and the diffusion encryption equation is shown as follows:

$$\begin{cases} \mathcal{C}(1) = I\_3(1) \oplus \mathcal{K}\_d(1) \oplus \left(sum(1) + \mathcal{K}\_d'(1)\right) \\ \sum\_{i=1}^L I\_3(i) \end{cases} \tag{10}$$

where the operator +˙ can be defined as *a*+˙ *b* Δ= mod(*a* + *b*, <sup>256</sup>), *<sup>I</sup>*3(1) is the first pixel of the permutation image *I*3, *Kd*(1) and *Kd*(1) are the first element of the diffusion encryption sequences, and *sum*(1) represents the sum of all pixels of the permutation image *I*3.

Then ciphertext pixel *C*(*i*) is produced and its diffusion formula is shown as follows:

$$\begin{cases} \mathcal{C}(i) = I\_3(i) \oplus (\mathcal{C}(i-1) + \mathcal{K}\_d(i)) \oplus (\text{sum}(i) + \mathcal{K}\_d'(i)) \\ \displaystyle \sum\_i (i) = \text{sum}(i-1) - I\_3(i) \end{cases} \tag{11}$$

where *i* = 2, 3, ... , *L* and the *i* represents the *i*th pixel of the permutation image *I*3. *C*(*i* − 1) is the (*i* − 1)th ciphertext pixel. *sum*(*i*) is the sum of the (*L* − *i* + 1) pixels of the permutation image *I*3. According to Equation (11), starting from the second ciphertext pixel *<sup>C</sup>*(2), the cipher image *C* is generated by computing iteratively *<sup>C</sup>*(*i*), *i* in {1, 2, ··· , *<sup>L</sup>*}, until the *L*th ciphertext *C*(*L*) is generated.

Decryption is the inverse process of encryption, whose process is first confusion, then permutation, and finally diffusion. While the decryption process is to first reverse diffuse the encrypted image, then reverse permutate the reverse diffuse image, and finally reverse confuse the reverse permutation image to ge<sup>t</sup> the decrypted image. When the decryption key and the encryption key are matched, the image can be restored correctly. However, when the decryption key is not equal to the encryption key, even if there is a small error, the correct image cannot be decrypted.

**Figure 3.** Principle and mechanism of image encryption and decryption.

**Figure 4.** Sequence diagram of the fourth-order CNN.

#### **4. Experimental Verification and Discussion**

In the analysis of the experimental results, we use MATLAB 2020b to simulate and validate the proposed image encryption system which is executed on a PC with Windows 10 64 bit operating system, Intel (R) Core (TM) i7-8250 CPU @ 1.60 GHz 1.80 GHz processor and 8 GB memory. In order to prove the effectiveness and practicability of the proposed image encryption scheme, we selected the images from "USC-SIPI Image Database" and "Ground Truth Database" as the test images [41,42].

#### *4.1. Key Space Analysis*

In the encryption system, the range of valid value of key can be expressed by key space. The image encryption algorithm designed in this paper uses a fourth-order CNN system and the secret key parameters involved are the initial values of the fourth-order CNN chaos-based system *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0), *<sup>x</sup>*4(0). Because the computer precision used in experimental simulation is <sup>10</sup>−15, the size of this part of encryption system key space is (10<sup>15</sup>)<sup>4</sup> = 10<sup>60</sup> ≈ 2199. Considering that MD5 of 128 bits can also be used as part of the secret key, the total secret key space 2<sup>327</sup> and the encryption system can resist the exhaustive attack effectively [43,44].

#### *4.2. Nist 800-22 Test*

The NIST 800-22 test is an internationally recognized random number test. It consists of 16 different tests. As long as the 16 test results are greater than or equal to 0.001, the random array can be considered to be qualified. In this test, we divide the generated 3,000,000 bits of byte stream data into 10 segments of 300,000 bits. The *Kc*, *Kpr*, *Kpc*, *Kd* and *K d* sequences needed in encryption passed the test successfully, and the test results of the *K d* sequence are shown in Table 1. The experimental results show that the random numbers generated by our algorithm fully conform to the international standard, and have strong randomness.


#### *4.3. Histogram Analysis*

There are three channels—R, G and B—in color images; the abscissa of the histogram containing these three channels reflects the statistical characteristics of the distribution of every pixel [45,46]. Different plain images and cipher images, as well as their relevant histograms, are shown in Figure 5. The experimental results show that the pixel values of the R, G and B channels of color cipher image are almost uniformly distributed, so the influence of statistical analysis is greatly eliminated [47,48].

**Figure 5.** The histograms of images before and after encryption: (**a**) plain image of "Zhong shan"; (**b**) histogram of the plain image of "Zhong shan"; (**c**) cipher image of "Zhong shan"; (**d**) histogram of the cipher image of "Zhong shan"; (**e**) plain image of "Greenlake10"; (**f**) histogram of the plain image of "Greenlake10"; (**g**) cipher image of "Greenlake10"; (**h**) histogram of the cipher image of "Greenlake10"; (**i**) plain image of "Greenlake13"; (**j**) histogram of the plain image of "Greenlake13"; (**k**) cipher image of "Greenlake13"; (**l**) histogram of the cipher image of "Greenlake13"; (**m**) plain image of "Greenlake47"; (**n**) histogram of the plain image of "Greenlake47"; (**o**) cipher image of "Greenlake47"; (**p**) histogram of cipher image of "Greenlake47".

#### *4.4. Correlation Analysis*

For the plain image, the correlation between adjacent pixels is strong [49,50]. Gray value of a pixel tends to be close to the gray values of its adjacent pixels. Therefore, the attacker can speculate about the gray value of a pixel from the gray value of its adjacent pixels [51,52]. An encryption system with good performance should satisfy the requirement that adjacent pixels of cipher image have low correlation coefficients to each other in order

to resist the statistical attack. Correlation coefficients are commonly used to measure the correlation of two pixels and the calculations of it are defined as [53,54]:

$$\begin{cases} E(\mathbf{x}) = \frac{1}{N} \sum\_{i=1}^{N} \mathbf{x}\_{i} \\\ D(\mathbf{x}) = \frac{1}{N} \sum\_{i=1}^{N} \left( \mathbf{x}\_{i} - E(\mathbf{x}) \right)^{2} \\\ \text{cov}(\mathbf{x}, \mathbf{y}) = \frac{1}{N} \sum\_{i=1}^{N} \left( \mathbf{x}\_{i} - E(\mathbf{x}) \right) \left( \mathbf{y}\_{i} - E(\mathbf{y}) \right) \\\ \gamma\_{\mathbf{xy}} = \frac{\text{cov}(\mathbf{x}, \mathbf{y})}{\sqrt{D(\mathbf{x}) \times \sqrt{D(\mathbf{y})}}} \end{cases} \tag{12}$$

where the gray value of every pixel is represented by *x* and *y*, while *<sup>E</sup>*(*x*) represents the mean value, *<sup>D</sup>*(*x*) represents the variance, *cov*(*<sup>x</sup>*, *y*) represents the covariance and *γxy* represents the correlation coefficients.

The correlation coefficients before and after encryption of the selected image are shown in Table 2 where "Anti-Diag". represents the correlation coefficient in the antidiagonal direction. Figure 6 shows the correlation of plain image and cipher image in horizontal, vertical, diagonal and anti-diagonal directions. It can be seen that there is no obvious correlation between adjacent pixels of a cipher image. Therefore, the cipher images encrypted by the algorithm designed in this paper have high security and can resist the statistical analysis [55].



#### *4.5. Sensitivity Analysis*

Key sensitivity is an essential indicator of the security of the encryption system. It represents the difference in the decryption results when the same cipher image is decrypted with slightly different keys. For the sake of detecting the susceptibility of the scheme to the key, the first three sequences generated by the initial key are superimposed and combined into a color map, and the minimum precision of *<sup>x</sup>*1(0) is 10−15. The initial key *<sup>x</sup>*1(0) is perturbed with the minimum precision to generate four new sequences, and the first three new sequences are superimposed and combined into a new color map. The two color images are differentiated to ge<sup>t</sup> the difference image and the histogram corresponding to the difference image. The initial key *<sup>x</sup>*2(0) is processed in the same way, as shown in Figure 7. By adding 10−<sup>3</sup> to the initial key *<sup>x</sup>*1(0), four sequences are obtained through cellular neural chaos, and these four sequences are compared with the four sequences generated by no change of *<sup>x</sup>*1(0), as shown in Figure 8. It can be seen from Figures 7 and 8 that the encryption system designed in this paper has high security and strong sensitivity to keys, which increases the difficulty for attackers to decipher the cipher image.

**Figure 6.** Correlation coefficients distribution map of plain image and cipher image of "7.1.02.tiff": (**a**) "7.1.02.tiff" plain image horizontal correlation; (**b**) "7.1.02.tiff" plain image is vertical correlation; (**c**) "7.1.02.tiff" plain image diagonal correlation; (**d**) "7.1.02.tiff" plain image against angular direction correlation; (**e**) "7.1.02.tiff" cipher image horizontal correlation; (**f**) "7.1.02.tiff" cipher image vertical correlation; (**g**) "7.1.02.tiff" cipher image diagonal correlation; (**h**) "7.1.02.tiff" cipher image inverse diagonal correlation.

**Figure 7.** The key sensitivity test: (**a**) *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0), *<sup>x</sup>*4(0); (**b**) *<sup>x</sup>*1(0) + <sup>10</sup>−15, *<sup>x</sup>*2(0), *<sup>x</sup>*3(0), *<sup>x</sup>*4(0); (**c**) Difference image after key perturbation; (**d**) Difference histogram after key perturbation; (**e**) *<sup>x</sup>*1(0), *<sup>x</sup>*2(0), *<sup>x</sup>*3(0), *<sup>x</sup>*4(0); (**f**) *<sup>x</sup>*1(0), *<sup>x</sup>*2(0) + <sup>10</sup>−15, *<sup>x</sup>*3(0), *<sup>x</sup>*4(0); (**g**) Difference image after key perturbation; (**h**) Difference histogram after key perturbation.

**Figure 8.** Comparison of four sequences (**<sup>a</sup>**–**d**) before and after key *<sup>x</sup>*1(0) perturbation.

Plaintext sensitivity is also one of the important indexes of encryption system security, which indicates the ability of encryption system to resist the differential attack. A secure encryption system should be highly sensitive to plain image. The Number of Pixels Change Rate (NPCR) and Unified Average Changing Intensity (UACI) can be used to represent the difference between two plain images with one pixel difference. The calculation formula is [56]:

$$\begin{cases} \begin{aligned} \text{NPCR} &= \frac{1}{H \times W} \times \sum\_{i=1}^{H} \sum\_{j=1}^{W} D(i, j) \times 100\% \\\ \text{UACI} &= \frac{1}{H \times W} \times \sum\_{i=1}^{H} \sum\_{j=1}^{W} \frac{|v\_1(i, j) - v\_2(i, j)|}{255} \times 100\% \end{aligned} \tag{13}$$

where *<sup>D</sup>*(*<sup>i</sup>*, *j*) = 0, *<sup>v</sup>*1(*<sup>i</sup>*, *j*) = *<sup>v</sup>*2(*<sup>i</sup>*, *j*) 1, *<sup>v</sup>*1(*<sup>i</sup>*, *j*) = *<sup>v</sup>*2(*<sup>i</sup>*, *j*). *<sup>v</sup>*1(*<sup>i</sup>*, *j*) and *<sup>v</sup>*2(*<sup>i</sup>*, *j*) denote the pixel values at positions *v*1 and *v*2. For a digital image with a gray level of 256, 99.6094% and 33.4635% are idealvaluesoftheNPCRandUACI,respectively.

Firstly, select a pixel from the "Lena" gray image randomly so that we can obtain a new image by changing its pixel value. Then, the two gray images which differ by only one pixel are each encrypted to obtain two ciphertext images. Finally, the NPCR and UACI values of the two encrypted images are obtained and the above operations will be repeated 50 times to obtain 50 groups of NPCR and UACI values. The NPCR and UACI average values of the gray images are shown in Table 3.


**Table 3.** NPCR and UACI.

The NPCR and UACI values obtained each time are shown in Figure 9. The NPCR and UACI average values are very close to the theoretical value. Therefore, the encryption system designed in this paper is extremely sensitive to both plain images and keys. The encryption algorithm designed in this study is safer and can resist the differential attack.

**Figure 9.** NPCR (**a**) and UACI (**b**).

#### *4.6. Information Entropy Analysis*

The degree of the randomness of the system can be expressed by information entropy. The information entropy of the image is positively correlated with the encryption effect. The larger the information entropy is, the better effect the encryption will have. The formula of information entropy is defined as [57]:

$$H(n) = -\sum\_{i=0}^{G-1} -1P(n\_i)\log\_2 P(n\_i) \tag{14}$$

where *G* represents the number of gray level values of the image and *<sup>P</sup>*(*ni*) the frequency of pixels with gray value *i*. The range of gray value of an image with a gray level of 256 is [0, <sup>255</sup>], and 8 is its ideal information entropy. When the value of information entropy is closer to 8, the image encryption has better effect [58].

Table 4 shows the information entropy before and after image encryption. The information entropy of the cipher image is very close to the theoretical value of information entropy. It is proven that the pixel value distribution of the cipher image is highly random and the encryption effect is better. Therefore, the algorithm can effectively resist the information entropy attack [33].


**Table 4.** Information entropy of the plain image and cipher image.

#### *4.7. Psnr and Ssim*

Peak Signal-to-Noise Ratio (PSNR) and Structural SIMilarity (SSIM) are often used to reflect the encryption quality. PSNR is essentially the same as the Mean Square Error (MSE) and can be obtained by MSE. The calculation formula is [59]:

$$\begin{cases} MSE = \frac{1}{H \times W} \sum\_{i=1}^{H} \sum\_{j=1}^{W} \left( P(i,j) - \mathbb{C}(i,j) \right)^2 \\\ PSNR = 10 \times \log\_{10} \left( \frac{Q^2}{MSE} \right) \end{cases} \tag{15}$$

where the height and width of the image are represented by *H* and *W*, respectively, the pixel level of the image is represented by *Q*, the plain image pixels are represented by *<sup>P</sup>*(*<sup>i</sup>*, *j*), and the cipher image pixels are represented by *<sup>C</sup>*(*<sup>i</sup>*, *j*). SSIM is defined as [59]:

$$SSIM(p,c) = \frac{\left(2\mu\_p \mu\_c + (0.01L)^2\right)\left(2\sigma\_{pc} + (0.03L)^2\right)}{\left(\mu\_p^2 + \mu\_c^2 + (0.01L)^2\right)\left(\sigma\_p^2 + \sigma\_c^2 + (0.03L)^2\right)}\tag{16}$$

where the average values of the plain image *P* and the cipher image *C* are denoted by *up* and *uc*, respectively. The variance of the plain image and the cipher image denoted by *σ*<sup>2</sup> *p* and *σ*<sup>2</sup> *c* indicates that the covariance of the plain image and the cipher image represented by *<sup>σ</sup>pc*. (0.01*L*) 2 and (0.03*L*) 2 are used as constant numbers to maintain stability. *L* represents the dynamic range of pixel values.

The range of SSIM is from −1 to 1. When the two images are the same, SSIM is 1. The smaller the PSNR and SSIM are, the better the encryption quality is. Tables 5 and 6 show the encryption quality of the proposed scheme and the classic encryption schemes in recent years.


**Table 5.** PSNR of cipher image with different algorithms.


**Table 6.** SSIM of cipher image based on different algorithms.

The experimental results show that the PSNR and SSIM values obtained by the proposed algorithm are lower than those of other proposed approaches. Therefore, this encryption scheme has certain advantages, and the image encryption quality is high.

#### *4.8. Robust Noise Analysis*

Robustness means that the system still has certain performance under interference or at random. Image robustness refers to the fact that the image still has a certain degree of fidelity after undergoing various signal processing or attacks. The image can still be recognized, with low distortion. Add 20% salt-and-pepper noise and 80 × 80 occlusion noise to the cipher image "Figure 5a". The experimental results are shown in the figure below [34,60,61].

It can be seen from Figure 10 that the decrypted images can still be easily identified with high fidelity after noise is added to the cipher image, which indicates the robustness of the image encryption system that can resist noise attacks.

**Figure 10.** (**a**) Salt-and-pepper noise cipher image; (**b**) Occlusion noise cipher image; (**c**) Decryption of cipher image with salt-and-pepper noise; (**d**) Decryption of cipher image with occlusion noise.

## **5. Conclusions**

This paper proposes a security-enhanced image communication scheme based on CNN under the cryptanalysis. First, the complex characteristics of CNN are used to generate some sequences. Then, a plain image and these CNN-based sequences are

confused, permuted and diffused to ge<sup>t</sup> the cipher image. Utilizing the complex dynamics of CNN can effectively enhance the confusion, diffusion and avalanche of encryption. Theoretical analysis and experimental results both demonstrate its safety performance. From the perspective of cryptanalysis, the structure of an image cipher can effectively resist various common attacks. Therefore, the image communication scheme based on CNN proposed in this paper is a competitive security technology method.

**Author Contributions:** Methodology, H.W.; Project administration, H.W. and C.Z.; Software, J.X., R.C. and D.S.; Supervision, C.Z.; Validation, J.X., Y.L. (Yunlong Liao), R.C., L.W., Y.S., Q.L., Z.L., S.Z., Y.L. (Yuxuan Liu), A.H., T.L., C.C. and J.W.; Writing—original draft, J.X.; Writing—review & editing, H.W. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported in part by the National Science Foundation of China under Grant 62071088 and Grant 61571092; in part by the Project for Innovation Team of Guangdong University under Grant 2018KCXTD033; in part by the Project for Zhongshan Social Public Welfare Science and Technology under Grant 2019B2007; in part by the Science and Technology Projects of Guangdong Province under Grant 2021A0101180005; in part by the Research Project for Talent of UESTC Zhongshan Institute under Grant 418YKQN07 and Grant 419YKQN23; and in part by the Opening Project Guangdong Province Key Laboratory of Information Security Technology under Grant 2020B1212060078.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.
