Xitong Xu1, Shengbo Chen1. 1. College of Geo-Exploration Science and Technology, Jilin University, Changchun 130026, China.
Abstract
In this paper, aiming to solve the problem of vital information security as well as neural network application in optical encryption system, we propose an optical image encryption method by using the Hopfield neural network. The algorithm uses a fuzzy single neuronal dynamic system and a chaotic Hopfield neural network for chaotic sequence generation and then obtains chaotic random phase masks. Initially, the original images are decomposed into sub-signals through wavelet packet transform, and the sub-signals are divided into two layers by adaptive classification after scrambling. The double random-phase encoding in 4f system and Fresnel domain is implemented on two layers, respectively. The sub-signals are performed with different conversions according to their standard deviation to assure that the local information's security is guaranteed. Meanwhile, the parameters such as wavelength and diffraction distance are considered as additional keys, which can enhance the overall security. Then, inverse wavelet packet transform is applied to reconstruct the image, and a second scrambling is implemented. In order to handle and manage the parameters used in the scheme, the public key cryptosystem is applied. Finally, experiments and security analysis are presented to demonstrate the feasibility and robustness of the proposed scheme.
In this paper, aiming to solve the problem of vital information security as well as neural network application in optical encryption system, we propose an optical image encryption method by using the Hopfield neural network. The algorithm uses a fuzzy single neuronal dynamic system and a chaotic Hopfield neural network for chaotic sequence generation and then obtains chaotic random phase masks. Initially, the original images are decomposed into sub-signals through wavelet packet transform, and the sub-signals are divided into two layers by adaptive classification after scrambling. The double random-phase encoding in 4f system and Fresnel domain is implemented on two layers, respectively. The sub-signals are performed with different conversions according to their standard deviation to assure that the local information's security is guaranteed. Meanwhile, the parameters such as wavelength and diffraction distance are considered as additional keys, which can enhance the overall security. Then, inverse wavelet packet transform is applied to reconstruct the image, and a second scrambling is implemented. In order to handle and manage the parameters used in the scheme, the public key cryptosystem is applied. Finally, experiments and security analysis are presented to demonstrate the feasibility and robustness of the proposed scheme.
In the development of digital technology and computer industry, the requirements for information confidentiality has attracted increasing attention. In order to provide protection to multimedia applications, many algorithms have been developed during the past several decades. The application of optical methods in information security has become a hot trend due to its inherent capabilities of parallel processing [1,2,3,4,5]. The classic double random-phase encoding was proposed based on an optical Fourier transform system. Subsequently, a large number of approaches have been developed to searching for other types of optical encryption methods in different domains, such as fractional Fourier domain [6,7,8], Fresnel domain [9,10] and gyrator domain [11]. However, due to inherent symmetry and linearity, the security of such cryptosystems is greatly affected [12,13]. During the process of optical image encryption, it is necessary not only to conceal the information of whole image, but also to selectively encrypt the important information, so as to improve local security. In addition, considering the characteristics of chaotic systems (i.e., sensitivity to initial values, deterministic dynamics, nonlinear transformation and pseudo-randomness) [14,15], applying chaotic systems to optical image encryption may have a positive impact on the overall security.Hopfield neural network, proposed for the first time by Hopfield in 1982 [16], is a typical dynamic neural network which has been applied in information processing and engineering, such as associative memory [17] and optimization problems [18]. It is worth noting that the Hopfield neural network plays a crucial role in neuro-computing due to its similarity to brain dynamics [19], and the complex behaviors and properties of the Hopfield neural network have been investigated [20,21,22,23]. As more and more research is done to combine chaos theory and information security, neural networks have become a vital method to be considered in image encryption. Particularly, a Hopfield neural network with chaos can greatly improve the space–time complexity of an encryption scheme through outstanding nonlinear and associative memory effects [24,25,26,27]. However, few studies have integrated the Hopfield neural network and optical methods to enhance the security of information.In recent years, chaotic systems have been combined with different cryptosystems and technologies for image encryption, such as compression sensing [28,29] and DNA [30,31]. The combination has been proved to effectively improve the key space and the stability of encryption algorithms [32,33], and plenty of simple chaotic systems (e.g., logistic map and sine map) have been applied due to uncomplicated structure [34,35,36]. Nevertheless, the security of optical image encryption cannot be improved by using simple chaotic systems on account of their structure and insufficient parameters. Moreover, the sensitivity to computer precision may cause the systems to degenerate into non-chaotic systems immediately [37]. The single neuronal dynamic system was derived from the Hopfield neural network by Xu et al. in 2021 [38]. The system has sufficient parameters and complex chaotic dynamical behavior, whereas chaos cannot always be maintained in the interval of some parameters. Fuzzy numbers have a large field of study with applications in dynamical systems, which promote the systems to present many chaos-related phenomena [39,40,41]. The single neuronal dynamic system also has the applicability to combine with fuzzy numbers to further enhance the stability and chaotic phenomena.In this paper, a chaotic Hopfield neural network and fuzzy single neuronal dynamic system are combined with a hybrid optical method to construct a new encryption method. In this scheme, the input image is decomposed into sub-signals through wavelet packet transform, and the sub-signals are divided into two layers by adaptive classification after scrambling. The chaotic random-phase masks are constructed by chaotic sequences. The first layer of sub-signals is encrypted by double random phase encoding (DRPE) in 4f system, and the second layer is encrypted by double random phase encoding in Fresnel domain. After inverse wavelet packet transform, the obtained image is secondarily scrambled. In addition, the keys used in the process of encryption are integrated and hidden by RSA cryptosystem. Finally, simulation experiments demonstrate the feasibility and security of the proposed method.
2. Related Chaotic System and Public Key Cryptosystem
2.1. Fuzzy Single Neuronal Dynamical System
The single neuronal dynamical system in Hopfield neural network was proposed by Xu et al. in 2021 [38]. The mathematical model of the system is described as follows:
where , , , and are system parameters. The robustness and sensitivity of single neuronal dynamical system has been verified in [38]. However, the performance of single neuronal dynamical system can be further improved by using fuzzy numbers.In this work, we consider the triangular form of fuzzy number as Equation (2), and the full presentation of fuzzy number can be found in [42,43,44].
where is the peak of the triangular fuzzy number.We propose partitioning single neuronal dynamical system by combining it with the triangular form of fuzzy number to generate fuzzy single neuronal dynamical system fuzzy single neuronal dynamic system, as shown in Equation (3).Considering , the Lyapunov exponent evolution comparison between the single neuronal dynamical system and the fuzzy single neuronal dynamic system is performed, as shown in Figure 1, Figure 2, Figure 3, Figure 4 and Figure 5. It can be seen that the stability of the fuzzy single neuronal dynamic system and the interval in the chaotic state are significantly increased. For parameter , Figure 1 shows the instances of entering the chaotic state at and , which indicates there are larger chaos intervals on the both sides of the zero point. A similar phenomenon is also observed in parameters and . For parameter , as shown in Figure 4, its Lyapunov exponent fluctuates more smoothly, which is similar to parameters k and z.
Figure 1
Lyapunov exponent diagram of parameter when , , , and for (a) single neuronal dynamic system and (b) fuzzy single neuronal dynamic system.
Figure 2
Lyapunov exponent diagram of parameter when , , , and for (a) single neuronal dynamic system and (b) fuzzy single neuronal dynamic system.
Figure 3
Lyapunov exponent diagram of parameter when , , , and for (a) single neuronal dynamic system and (b) fuzzy single neuronal dynamic system.
Figure 4
Lyapunov exponent diagram of parameter when , , , and for (a) single neuronal dynamic system and (b) fuzzy single neuronal dynamic system.
Figure 5
Lyapunov exponent diagram of parameter when , , , and for (a) single neuronal dynamic system and (b) fuzzy single neuronal dynamic system.
2.2. Hopfield Chaotic Neural Network
This paper considers a 3-neuron Hopfield network of the form:
where is the neuron state vector, the neuron activation function , and synaptic weight matrix is:When the 3-neuron Hopfield network applies the weight matrix, the system can display chaotic behavior. The dynamic behavior of the chaotic Hopfield network is complex and suitable for image encryption. Figure 6 demonstrates the phrase portrait of the network with the initial state , which shows a double-scroll chaotic attractor.
Figure 6
The double-scroll chaotic attractor of chaotic Hopfield neural network: (a) projection in x-y-z, (b) projection in x-y, (c) projection in x-z, (d) projection in y-z.
2.3. Public Key Cryptosystem
The RSA public key cryptosystem was proposed by Rivest et al. [45] in 1978, and its implementation depend on the difficulty of large integer decomposition. In RSA, users have their own public key and private key . The key generation process is described as follows:Two large prime numbers (i.e., and ) are generated randomly, and .The key and Euler function are calculated as Equations (7) and (8):An integer number is generated as one of public keys obeyed Equations (9) and (10):
where, denotes the great common divisor.Then, is calculated as Equation (11) as private key:
where denotes the modulo operation.After obtaining public key and private key, the plaintext is divided into multiple groups, each of which is a decimal number of bit length less than . The encryption operation can be described as Equation (12):
where represents the ciphertext. The decryption operation is performed as Equation (13):
3. Algorithm Description
3.1. Encryption Steps
In this paper, an optical image encryption algorithm based on Hopfield neural network is proposed, as shown in Figure 7. To enhance the level of security, we use wavelet packet transform to decompose and filter the signal. Then, there are two layers in the subsequent encryption process. The DRPE method is applied to two layers through 4f system and Fresnel transform, respectively. Furthermore, RSA cryptosystem is performed for key-sequence management. It should be noted that there is no specific method and limitation for random matrix construction in the traditional DRPE. Thus, we construct random-phase masks to encrypt the decomposed signal by different chaotic sequences. The detail of the process is described in Figure 7.
Figure 7
Diagram of the optical image encryption.
Suppose the size of plaintext image is , where is the length of the row and is the length of the column.Step 1: The plaintext image is decomposed using order wavelet packet transform, and sub-signals are obtained. Each sub-signal has a corresponding number, ranging from 1 to . Set , , as the initial values of the Hopfield chaotic neural network, and the times iteration is performed to get three sequences.Step 2: Calculate the state variable by Equation (14). When , insert to new sequences. When , insert to new sequences. When , insert to new sequences. After iterations, three new sequences , , are obtained.Step 3: The sequence is divided into subsequences [, , …, ], and each sub-signal is converted into a 1D matrix [, , …, ]. Sort each sequence in ascending order, and matrix is obtained according to the sorting result. The process is shown in Figure 8. Then, is converted back to a 2D matrix.
Figure 8
Scrambling process of matrix.
Step 4: The standard deviation of each scrambled sub-signal is calculated, and the mean of [] is obtained. If , the sub-signal is assigned to the first layer. If , the sub-signal is assigned to the second layer.Step 5: The sequence and is divided into subsequences numbered from 1 to , respectively. Each subsequence is converted into matrix with the size of sub-signal. Then, perform Arnold scrambling on each chaotic matrix as in Equation (15):
where is the original coordinate, is the scrambled coordinate.Step 6: After Arnold scrambling, normalize each matrix from to obtain chaotic random matrix , and normalize each matrix from to obtain chaotic random matrix . Then construct chaotic random phase:Step 7: Perform DRPE of 4f system on sub-signals of the first layer as in Equation (18). Then, DRPE of Fresnel transform is performed on sub signals of the second layer as in Equation (19):
where is the original coordinate of sub-signal, is the coordinate after DRPE in 4f system or Fresnel transform, and is the incident light wavelength, and represent the diffraction distance. and represent Fourier transform and inverse Fourier transform, respectively. represents Fresnel transform.Step 8: Sub-signals are transformed into matrix by order inverse wavelet packet transform. Then, the complex-value matrix is normalized.Step 9, , , , , and are initial value and system parameters of fuzzy single neuronal dynamic system, therefore they are used as key sequence. Iterate fuzzy single neuronal dynamic system times, and a chaotic sequence is obtained. This sequence is used to scramble matrix to obtain an encrypted image; the process is the same as Step 3.The keys used in the process of encryption are divided into three sequences. The first sequence includes initial values of chaotic Hopfield neural network and parameters of Arnold scrambling (i.e., , , ,, ). The second sequence consists of initial value and system parameters of fuzzy single neuronal dynamic system (i.e., , , , , , , ). The third sequence is composed of wavelet packet transform order, incident light wavelength and diffraction distance (i.e., , , , ). The ciphertext sequences are obtained by RSA cryptosystem using public keys .
3.2. Image Decryption
In this work, keys used in the scheme are integrated and hidden by an RSA cryptosystem. Thus, the process of decryption can be performed for cases where three key sequences are retrieved. The users can restore the sequences to perform the decryption process according to private keys .
4. Experimental Results and Security Analysis
4.1. Experimental Results
The numerical simulation and security verification of the algorithm are performed by Matlab R2017a. A standard grayscale image Lena of size is shown in Figure 9a is the original image. The initial values and system parameters of the algorithm are , , , , , , , , , , , , , , , , respectively. In addition, two prime numbers ( and ) are applied in the RSA cryptosystem to obtain public key (, ) and private key (). Figure 9b shows the encrypted grayscale image Lena, and the decrypted image with correct keys is shown as Figure 9c.
In this work, the precision of noninteger key is considered as . This algorithm covers a chaotic Hopfield neural network with 3 noninteger initial values, fuzzy single neuronal dynamic system with 7 noninteger initial values and other system parameters. Thus, the key space is larger than , which is enough to resist brute force attacks [46,47].
4.2.2. Sensitivity Analysis
In order to test key sensitivity, the influence of varying initial values and system parameters on the decryption result is explored. When the initial deviation of the chaotic Hopfield neural network or fuzzy single neuronal dynamic system is , the generated sequence and random phase masks cannot correctly decrypt the image, as shown in Figure 10.
Figure 10
Encryption experiment results: (a) original image; (b) decrypted image with initial deviation of ; (c) decrypted image with initial deviation of .
In addition, the correlation coefficient (CC) is used as the criterion for quantitative analysis of the difference between the original image and decrypted image.
where represents the plaintext image, represents the recovered image, and represents the expected value operation.The relationship between CC of the decrypted image and initial values is obtained, as shown in Figure 11. It can be seen that any information about the plaintext image cannot be retrieved when keys change slightly. Thus, the sensitivity of the algorithm is qualified.
Figure 11
Sensitivity analysis of the keys of chaotic systems: (a) decrypted CC curve of the key ; (b) decrypted CC curve of the keys , and .
4.2.3. Correlation Analysis
Due to the discernibility of information in plaintext images, adjacent pixels are usually highly correlated. Therefore, the reduction of the correlation between adjacent pixels of the cipher images is necessary [48]. The calculation of pixel correlation is shown as Equation (21).
where and represent the values of adjacent pixels, and denotes the correlation between adjacent pixels. The results of correlation coefficients of plaintext images and cipher images in horizontal direction, vertical direction and diagonal direction are shown in Table 1.
Table 1
Correlation coefficients of plain images and cipher images in horizontal direction, vertical direction and diagonal direction.
Images
Correlation Coefficient
Horizontal
Vertical
Diagonal
Lena (512×512)
Plain image
0.9850
0.9719
0.9593
Cipher image (our scheme)
−0.0005
−0.0033
−0.0009
Cipher image [49]
0.9407
−0.0273
−0.0140
Cipher image [50]
−0.0097
0.0032
−0.0051
Cipher image [51]
−0.0084
−0.0017
−0.0019
Cipher image [52]
−0.0023
0.0028
−0.0030
Cameraman (256×256)
Plain image
0.9592
0.9340
0.9089
Cipher image (our scheme)
−0.0004
−0.0003
0.0030
Cipher image [49]
0.9176
−0.0175
−0.0312
Cipher image [50]
−0.0186
0.0053
0.0095
Cipher image [51]
0.0208
0.0009
0.0021
Cipher image [52]
0.0005
−0.0034
0.0008
Peppers (256×256)
Plain image
0.9651
0.9759
0.9457
Cipher image (our scheme)
−0.0007
−0.0009
0.0041
Cipher image [49]
0.9235
−0.0304
−0.0240
Cipher image [50]
−0.0247
−0.0129
−0.0031
Cipher image [51]
−0.0131
0.0024
0.0002
Cipher image [52]
−0.0027
0.0010
−0.0069
Baboon (256×256)
Plain image
0.8003
0.8763
0.7627
Cipher image (our scheme)
0.0015
−0.0030
0.0007
Cipher image [49]
0.9323
−0.0482
−0.0306
Cipher image [50]
−0.0155
−0.0251
0.0013
Cipher image [51]
0.0026
−0.0015
0.0014
Cipher image [52]
−0.0060
−0.0064
−0.0050
It should be noted that the scheme combines double random phase encoding in 4f system and Fresnel domain with Hopfield neural network to address inherent limitation of random matrix construction. The correlation coefficients of four encrypted images using various schemes are also demonstrated in Table 1. It can be seen that our method reaches relatively low correlation coefficients compared with other methods, which indicates that the integration of double random phase encoding and Hopfield neural network can achieve better performance.
4.2.4. Histogram Analysis
Histogram analysis is the statistic of the number of times each value appears, in order to demonstrate the distribution of pixel values [26]. The histogram of cipher image should not reflect any information about the original image. Figure 12 shows the histogram analysis of four images. It can be seen that the histograms of encrypted test images approximate Rayleigh distribution function, therefore the frequency distribution of plaintext images is hidden.
Figure 12
Histogram analysis of the plain images and cipher images: (a) Lena; (b) Cameraman; (c) Peppers.
4.2.5. Binary Image Test
Due to the simple content of binary images, the traditional methods are not applicable sometimes. To test the performance of the algorithm on binary images, the results of encryption are shown in Figure 13. It can be seen that our algorithm works well on binary images, and the correlation coefficients of cipher images are listed in Table 2.
Figure 13
Binary images test: (a) black image and corresponding encrypted image; (b) cameraman and corresponding encrypted image; (c) peppers and corresponding encrypted image.
Table 2
Correlation coefficient of encrypted binary images.
Images
Correlation Coefficient
Horizontal
Vertical
Diagonal
Black (256×256)
Cipher image
0.0035
−0.0017
0.0022
Cameraman (256×256)
Cipher image
−0.0033
0.0007
0.0040
Peppers (256×256)
Cipher image
−0.0050
0.0010
−0.0030
4.2.6. Noise Attack
In practice, the cipher images may be affected by noise. We consider the robustness of our algorithm against noise by polluting the encrypted images of Lena with Gaussian random noise, which is expressed as:
where denotes the original cipher image, denotes the noise-affected cipher image, k is the noise strength and is the Gaussian random noise with zero-mean and variance 1. The decrypted images with the noise intensity k = 0.01, k = 0.05 and k = 0.1 are shown in Figure 14. The CC value changing with the noise strength is shown in Figure 15. It can be seen that the contour of original image can be distinguished from the decrypted image.
Figure 14
Decrypted Lena obtained with (a) ; (b) ; (c) .
Figure 15
The CC curve of noise attack.
4.2.7. Comparative Analysis
The comparative analysis among different schemes is demonstrated in Table 3. The experimental environments are as follows: Matlab R2017a, AMD Ryzen 5 3600 6-Core Processor 3.60 GHz with 16 GB memory and Windows 10 Operation System, and grayscale Pepper is used as the plaintext image. Table 3 shows that our method reaches the lowest running time in the decryption process, and the running time is slightly higher than [50] in the encryption process. In addition, CC values between the original image and decrypted image are listed in Table 3. It can be seen that the scheme in this study achieves the highest CC value, which is related to the more accurate reconstruction of random phase mask by using the chaotic Hopfield neural network.
Table 3
Comparative analysis of different schemes.
Scheme
Encryption Time (s)
Decryption Time (s)
CC
[50]
0.1136
0.2031
0.9998
[51]
0.4111
0.4259
0.9996
[53]
0.2974
0.3708
0.9832
Our scheme
0.1249
0.1596
0.9999
5. Conclusions
This paper proposes an optical image encryption method using double random-phase encoding in 4f system and Fresnel domain based on chaotic system. The chaotic sequences are constructed by applying a fuzzy single neuronal dynamic system and a Hopfield chaotic neural network. The plaintext image is decomposed into sub-signals by wavelet packet transform, and then the sub-signals are scrambled. By adaptive classification, the sub-signals are divided into two layers. The first layer and second layer are encrypted in 4f system and Fresnel domain, thus completing the hybrid encryption. After inverse wavelet packet transform, the encrypted image is obtained through another scrambling. The RSA cryptosystem is applied to the allocation and management of the keys used in the scheme. Numerical simulations have demonstrated the security and effectiveness of the proposed scheme. The suggested scheme implements selective encryption of the local image, which improves the protection efficiency of vital information. It should be noted that the fuzzy numbers effectively enhance the stability and key space of the single neuronal dynamic system, and different fuzzy numbers other than triangular may be applicable to more chaotic systems. In addition, the feasibility of combining the chaotic Hopfield neural network with optical methods to construct an image encryption scheme has been verified. In further work, the application of other neural networks or chaotic systems may have more positive effects on optical image encryption.