# Pseudorandom Number Generator Based on Three Kinds of Four-Wing Memristive Hyperchaotic System and Its Application in Image Encryption

Authors: Xi Chen; Shuai Qian; Fei Yu; Zinan Zhang; Hui Shen; Yuanyuan Huang; Shuo Cai; Zelin Deng; Yi Li; Sichun Du
Journal: Complexity
 (2020)

---

## Abstract

In this paper, we propose a method to design the pseudorandom number generator (PRNG) using three kinds of four-wing memristive hyperchaotic systems (FWMHSs) with different dimensions as multientropy sources. The principle of this method is to obtain pseudorandom numbers with good randomness by coupling XOR operation on the three kinds of FWMHSs with different dimensions. In order to prove its potential application in secure communication, the security of PRNG based on this scheme is analyzed from the perspective of cryptography. In addition, PRNG has passed the NIST 800.22 and ENT test, which shows that PRNG has good statistical characteristics. Finally, an image encryption algorithm based on PRNG is adopted. In the encryption algorithm, the optimized Arnold matrix scrambling method and the diffusion processing based on XOR are used to obtain the final encrypted image. Through the evaluation of encryption performance, it is concluded that there is no direct relationship between the pristine image and encrypted image. The results show that the proposed image encryption scheme has good statistical output characteristics and security performance in line with cryptography.


---

## Body

## 1. Introduction

With the continuous development of information technology, from the security of state secrets to the security of personal privacy, the issue of information security is increasingly concerned by the society and researchers [1–9]. Random numbers (RNs) are closely related to cryptography, which has attracted much attention due to its extreme sensitivity to keys, mixed data, pseudorandom behavior, and determinism. Therefore, the research of random number generator (RNG) with cryptographic security has become a hot spot [10–12]. These generators, which can produce true random numbers (TRNs) or pseudorandom numbers (PRNs), are called true random number generators (TRNGs) [11] and pseudorandom number generators (PRNGs) [10, 12], respectively. The TRNG based on physical phenomena (e.g., thermal noise and oscillator) has the disadvantage of the slow generation of TRN. In order to meet the needs of practical calculation, PRNG has been widely used due to its advantages of fast generation, repeatability, and less memory.The existing PRNGs include linear congruence generators, carry-add-borrow subtractive generators, inverse congruence generators, and PRNGs based on chaotic systems. Due to some advantages of chaotic systems, such as sensitivity to initial conditions, ergodicity, pseudorandom behavior, and high complexity, chaotic systems are widely used in electronic circuits [13–17], synchronization [18–21], secure communication [22–24], complex networks [25–29], and PRNGs [10–12, 30–32]. In [10], in order to make the possible key of the encryption scheme more difficult to crack, the author proposes a multiparameter mapping to determine the region of chaotic behavior and introduces additional disturbance into the chaotic map. Compared with traditional mapping, the randomness and superiority of the proposed scheme are proved. In [12], a PRNG based on piecewise logistic mapping (PLM) is proposed, and PLM is an enhanced version of logistic mapping. However, the PRNG based on this system needs 18 arithmetic operations to obtain 8-bit numbers, which is complex in calculation and inefficient in speed. Because the behavior characteristics of hyperchaotic systems are more complex than those of chaotic systems, which leads to better chaotic characteristics, higher sensitivity to initial conditions and control parameters, larger key space, stronger antidecoding ability of algorithms, and more complex dynamic characteristics [33–36]. This indicates that their dynamic sequences are more divergent than chaotic systems, and all these advantages are very useful for generating pseudo-random sequences with better statistical properties. Therefore, the PRNGs construction method based on the hyperchaotic system has attracted more and more scholars’ attention and research. In [37], a self-perturbed PRNG based on the hyperchaotic system is proposed. A novel hyperchaotic system is constructed, in which the linear feedback controller is used as a disturbance factor to make the controllers interact with each other, thus achieving more complex dynamic behavior and avoiding the appearance of a short period sequence.Memristor is a physically realized dynamic nonvolatile nanoscale device. As a controllable nonlinear device, it makes the generation of chaotic signals easier. Due to the addition of a memristor, the interaction between each variable in the memristive chaotic system or hyperchaotic system is intensified, resulting in the chaos, or hyperchaotic range is enlarged, and the dynamic characteristics become more complex [38–45]. On this basis, some RNGs based on memristive chaotic system or hyperchaotic system have been proposed successively [42, 46, 47]. Yu et al. [42] proposed a multistable 5D memristive hyperchaotic system. The multistable system is reflected in its different types of coexistence attractors, chaos, hyperchaos, period, and limit cycle. The authors designed an RNG suitable for actual image encryption application based on the complex characteristics of the multistable memristive hyperchaotic system. The resulting sequence passed the National Institute of Standards and Technology (NIST) test package and security analysis. Hashim et al. [46, 47] proposed a five-stage random number generator based on memristor. Each stage includes a memristor and an NMOS transistor. Their results show that the random number generator based on memristor is more random than the inverter-based random number generator because the memristor can produce highly random output in the circuit design.Due to the good autocorrelation characteristics and larger key space, the design of RNG using multiple chaotic systems as entropy sources has attracted extensive attention of scholars recently [48–53]. In [48], a PRNG using a 4D memristor memristive hyperchaotic and Bernoulli map as double entropy source is proposed and implemented by FPGA. The pseudorandom sequence generated based on the double entropy source system has a good effect, which has passed the tests of statistical test suites such as NIST 800.22, ENT, and AIS.31. The key space, key sensitivity, and information entropy are analyzed to meet the security requirements of cryptography. In [49], a new PRNG is proposed based on two Tinkerbell maps. Despite the success of the statistical tests, the Tinkerbell mapping is a 2D system, and if the PRNG algorithm uses two mappings, there will be 26 arithmetic operations in each iteration, which will be slower to implement in hardware digital systems. In [50], a PRNG is designed by mixing three chaotic maps generated by an input initial vector together as an entropy source. In [51], a random bitstream is generated by comparing piecewise linear chaotic maps consisting of cross-coupled two Tent maps. In [51, 52], a PRNG based on two chaotic logistic maps and two standard chaotic maps is proposed, respectively. The abovementioned PRNGs based on multientropy source chaotic system meet the requirements of cryptographic communication through NIST 800.22 test package, statistical analysis, and relevant security analysis.Images are processed differently from text because of their larger data capacity and the serious correlation between adjacent pixels. Image encryption algorithm involves a variety of alternative or transposition methods to convert ordinary images into encrypted images. For image, video, and other multimedia data with a large amount of data and strong correlation between adjacent data, the chaotic key has a stronger advantage in real-time encryption, so the research of the chaotic image encryption method is attracting more and more attention [54–60]. PRNG can generate sufficiently long pseudo-random digital key streams that are critical to the encryption of image pixels. For example, Ismail et al. [61] proposed a lossless image encryption algorithm based on edge detection and generalized chaotic mapping. A variety of pseudo-random number key generators based on generalized chaotic maps, including fractional order, delay, and bimodal logistic maps, are designed. Tsafack et al. [62] implemented an image encryption protocol based on chaos using the S-box structure and PRNG generation mechanism. In order to verify the performance of the protocols, the standard security analysis methods are adopted in [61, 62] and compared with other methods. The results show that the chaotic pseudorandom sequence has a broad application prospect in image encryption.This paper presents a method to generate PRNGs using three kinds of four-wing memristive hyperchaotic systems (FWMHSs) with different dimensions. We conducted a comprehensive security analysis from the perspective of cryptography to verify the effectiveness of the proposed PRNG algorithm in cryptography applications, and the PRNG passed the NIST 800.22 test suite and ENT test. On this basis, a PRNG image encryption algorithm based on the multientropy source FWMHSs is proposed, and related security analysis is carried out. The rest of the paper is organized as follows. Section2 enumerates the mathematical models of three kinds of FWMHSs and briefly introduces their dynamic characteristics. In Section 3, these three kinds of FWMHSs are used to obtain the real number sequence by XOR operation, and then the binary quantization process is designed. Finally, the quantized binary sequence successfully passed the statistical test of NIST 800.22 and ENT test. Section 4 analyzes the proposed PRNG algorithm and its performance. In Section 5, PRNG is used to study the image encryption algorithm, and some security analysis is carried out on the image encryption. Finally, the conclusion is drawn in Section 6.


## 2. Three Kinds of FWMHSs

In recent years, many researchers have suggested using the complex chaotic system as an entropy source to design RNG, which can be used to improve the complexity and security level of the system because the complex chaotic system may have good randomness and complex chaos characteristics, so that the cipher system can obtain higher security [48–53]. In this paper, three kinds of FWMHSs with different dimensions are used as composite systems to construct the PRNG. The following three kinds of FWMHSs are, respectively, introduced.


### 2.1. 4D FWMHS

Recently, a 4D FWMHS is proposed in [38]. In this system, the periodic piecewise function is used to replace the control parameters of the Chen system, and a flux-controlled memristor with linear memductance is introduced. The nonlinear equation of the system is given by the following equation:(1)x˙1=a1x2−x1,x˙2=c1−a1x1−k1+signsinωtx1x3+c1x2+Wx4x1,x˙3=x1x2−b1x3,x˙4=x1,where x1,x2,x3,x4 are state variables and a1,b1,c1,k1 are system parameters. Wx1 is the flux-controlled memristor with linear memductance and Wx4=−β1x4. When a1=35,b1=3,c1=28,k1=2,β1=0.24 and the initial conditions are 0.1,0.1,0.1,0.1, the Lyapunov exponents are calculated as LE1 = 1.976, LE2 = 0.l, LE3 = 0 and LE4 = −11.950, respectively. System (1) contains two positive Lyapunov exponents, and the bifurcation diagram of the corresponding parameter range is shown in Figures 1(c) and 1(d), indicating that it is a hyperchaotic system, and its four-wing phase portrait is shown in Figures 1(a) and 1(b).Figure 1
(a)x1−x3 plane of 4D FWMHS attractors; (b) x2−x3 plane of 4D FWMHS attractors; (c) x1−x4 plane of 4D FWMHS attractors; (d) x2−x3−x4 plane of 4D FWMHS attractors; (e) the Lyapunov exponent spectrum for control parameter β1; (f) bifurcation diagram for control parameter β1.
(a)(b)(c)(d)(e)(f)


### 2.2. 5D FWMHS

A 5D FWMHS is proposed in [24] which has rich dynamic characteristics, and there exists a new critical point, called the permanent point. The coexistence of symmetric and multiwing attractors under different initial values of system parameters is discussed. Therefore, under certain initial conditions, chaotic or hyperchaotic attractors, periodic attractors, and quasiperiodic attractors also exist; for more dynamic characteristics, please refer to [24]. The mathematical model of the 5D memristor hyperchaotic system is(2)y˙1=−a2y1+y2y3,y˙2=−b2y2+y1y3,y˙3=y1y2−c2y3+d2y4Wy5,y˙4=y1y2−e2y4,y˙5=−y3,where y1,y2,y3,y4,y5 are state variables and a2,b2,c2,d2,e2 are system parameters. Wy5 is the flux-controlled memristor and Wy5=1−β2y5. When the system parameters are a2=10,b2=12,c2=30,d2=2,e2=3, and β2=0.2, and the initial values of system (2) are given as 0.1,0.1,0.1,0.1,0.1, the Lyapunov exponents of system (2) are calculated as follows: LE1 = 3.5610, LE2 = 0.3092, LE3 = 0, LE4 = −2.0660, and LE5 = −23.4708. It can be seen that system (2) has two positive Lyapunov exponents, which means that the 5D FWMHS (2) can exhibit hyperchaotic dynamics. The bifurcation diagram of the four-wing hyperchaotic attractor, the Lyapunov exponent spectrum, and the bifurcation diagram of the corresponding parameters of system (2) are shown in Figure 2.Figure 2
(a)y1−y2 plane of 5D FWMHS attractors; (b) y1−y3 plane of 5D FWMHS attractors; (c) y2−y3 plane of 5D FWMHS attractors; (d) y3−y4 plane of 5D FWMHS attractors; (e) the Lyapunov exponent spectrum for control parameter b2; (f) bifurcation diagram for control parameter b2.
(a)(b)(c)(d)(e)(f)


### 2.3. 6D FWMHS

More and more attention has been paid to high dimensional systems. The generated signals are usually used for secure communication and random number generation due to their complexity. High dimensional systems originated from neuroscience, laser, and other real-world systems with many interaction characteristics [63]. In [40], a 6D FWMHS with line equilibria based on a flux-controlled memristor model is proposed. Under different system parameters and initial values, the system exhibits rich dynamic behaviors, including quasiperiodic bifurcation and one-wing, two-wing, and four-wing chaotic attractors. The dynamics of the 6D FWMHS is described by the following set of equations:(3)z˙1=−a3z1+z1z2,z˙2=−b3z2+f3Wz6z5,z˙3=−c3z3+z1z2+g3z5,z˙4=d3z4−h3z3,z˙5=e3z5−z12z2,z˙6=z5,where z1,z2,z3,z4,z5,z6 are state variables and a3,b3,c3,d2,e3,f3,g2,h3 are system parameters. Wz6 is the flux-controlled memristor and Wz6=m+3nz62. When system parameters are select as a3=10,b3=60,c3=20,d3=15,e3=40,f3=1,g3=50,h3=10,m=13, and n=0.02, the initial conditions are 1,1,1,1,1,1, LEs=10.16,2.187,0.0136,−0.5759,−16.08,−18.86, which indicates system (3) has two positive Lyapunov exponents and the 6D FWMHS is in hyperchaos. Figure 3 shows the phase portrait of the four-wing hyperchaotic attractor, Lyapunov exponent spectrum, and the bifurcation diagram of corresponding parameters of system (3).Figure 3
(a)z1−z3 plane of 6D FWMHS attractors; (b) z1−z5 plane of 6D FWMHS attractors; (c) z2−z3 plane of 6D FWMHS attractors; (d) z1−z3−z4 plane of 6D FWMHS attractors; (e) bifurcation diagram for control parameter e3; and (f) bifurcation diagram for control parameter e3.
(a)(b)(c)(d)(e)(f)


## 2.1. 4D FWMHS

Recently, a 4D FWMHS is proposed in [38]. In this system, the periodic piecewise function is used to replace the control parameters of the Chen system, and a flux-controlled memristor with linear memductance is introduced. The nonlinear equation of the system is given by the following equation:(1)x˙1=a1x2−x1,x˙2=c1−a1x1−k1+signsinωtx1x3+c1x2+Wx4x1,x˙3=x1x2−b1x3,x˙4=x1,where x1,x2,x3,x4 are state variables and a1,b1,c1,k1 are system parameters. Wx1 is the flux-controlled memristor with linear memductance and Wx4=−β1x4. When a1=35,b1=3,c1=28,k1=2,β1=0.24 and the initial conditions are 0.1,0.1,0.1,0.1, the Lyapunov exponents are calculated as LE1 = 1.976, LE2 = 0.l, LE3 = 0 and LE4 = −11.950, respectively. System (1) contains two positive Lyapunov exponents, and the bifurcation diagram of the corresponding parameter range is shown in Figures 1(c) and 1(d), indicating that it is a hyperchaotic system, and its four-wing phase portrait is shown in Figures 1(a) and 1(b).Figure 1
(a)x1−x3 plane of 4D FWMHS attractors; (b) x2−x3 plane of 4D FWMHS attractors; (c) x1−x4 plane of 4D FWMHS attractors; (d) x2−x3−x4 plane of 4D FWMHS attractors; (e) the Lyapunov exponent spectrum for control parameter β1; (f) bifurcation diagram for control parameter β1.
(a)(b)(c)(d)(e)(f)


## 2.2. 5D FWMHS

A 5D FWMHS is proposed in [24] which has rich dynamic characteristics, and there exists a new critical point, called the permanent point. The coexistence of symmetric and multiwing attractors under different initial values of system parameters is discussed. Therefore, under certain initial conditions, chaotic or hyperchaotic attractors, periodic attractors, and quasiperiodic attractors also exist; for more dynamic characteristics, please refer to [24]. The mathematical model of the 5D memristor hyperchaotic system is(2)y˙1=−a2y1+y2y3,y˙2=−b2y2+y1y3,y˙3=y1y2−c2y3+d2y4Wy5,y˙4=y1y2−e2y4,y˙5=−y3,where y1,y2,y3,y4,y5 are state variables and a2,b2,c2,d2,e2 are system parameters. Wy5 is the flux-controlled memristor and Wy5=1−β2y5. When the system parameters are a2=10,b2=12,c2=30,d2=2,e2=3, and β2=0.2, and the initial values of system (2) are given as 0.1,0.1,0.1,0.1,0.1, the Lyapunov exponents of system (2) are calculated as follows: LE1 = 3.5610, LE2 = 0.3092, LE3 = 0, LE4 = −2.0660, and LE5 = −23.4708. It can be seen that system (2) has two positive Lyapunov exponents, which means that the 5D FWMHS (2) can exhibit hyperchaotic dynamics. The bifurcation diagram of the four-wing hyperchaotic attractor, the Lyapunov exponent spectrum, and the bifurcation diagram of the corresponding parameters of system (2) are shown in Figure 2.Figure 2
(a)y1−y2 plane of 5D FWMHS attractors; (b) y1−y3 plane of 5D FWMHS attractors; (c) y2−y3 plane of 5D FWMHS attractors; (d) y3−y4 plane of 5D FWMHS attractors; (e) the Lyapunov exponent spectrum for control parameter b2; (f) bifurcation diagram for control parameter b2.
(a)(b)(c)(d)(e)(f)


## 2.3. 6D FWMHS

More and more attention has been paid to high dimensional systems. The generated signals are usually used for secure communication and random number generation due to their complexity. High dimensional systems originated from neuroscience, laser, and other real-world systems with many interaction characteristics [63]. In [40], a 6D FWMHS with line equilibria based on a flux-controlled memristor model is proposed. Under different system parameters and initial values, the system exhibits rich dynamic behaviors, including quasiperiodic bifurcation and one-wing, two-wing, and four-wing chaotic attractors. The dynamics of the 6D FWMHS is described by the following set of equations:(3)z˙1=−a3z1+z1z2,z˙2=−b3z2+f3Wz6z5,z˙3=−c3z3+z1z2+g3z5,z˙4=d3z4−h3z3,z˙5=e3z5−z12z2,z˙6=z5,where z1,z2,z3,z4,z5,z6 are state variables and a3,b3,c3,d2,e3,f3,g2,h3 are system parameters. Wz6 is the flux-controlled memristor and Wz6=m+3nz62. When system parameters are select as a3=10,b3=60,c3=20,d3=15,e3=40,f3=1,g3=50,h3=10,m=13, and n=0.02, the initial conditions are 1,1,1,1,1,1, LEs=10.16,2.187,0.0136,−0.5759,−16.08,−18.86, which indicates system (3) has two positive Lyapunov exponents and the 6D FWMHS is in hyperchaos. Figure 3 shows the phase portrait of the four-wing hyperchaotic attractor, Lyapunov exponent spectrum, and the bifurcation diagram of corresponding parameters of system (3).Figure 3
(a)z1−z3 plane of 6D FWMHS attractors; (b) z1−z5 plane of 6D FWMHS attractors; (c) z2−z3 plane of 6D FWMHS attractors; (d) z1−z3−z4 plane of 6D FWMHS attractors; (e) bifurcation diagram for control parameter e3; and (f) bifurcation diagram for control parameter e3.
(a)(b)(c)(d)(e)(f)


## 3. PRNG Based on Three Kinds of FWMHSs

### 3.1. The Structure of PRNG Algorithm

The PRNG design method of the chaotic system with a single entropy source is too simple, easy to be intercepted reversely, and the complexity is low. The chaotic characteristics of multientropy source memristive hyperchaotic systems are dependent on the hyperchaotic systems (1)–(3) described above. Therefore, it is more complex than every single hyperchaotic system. The RNs generated by PRNG is designed with these three kinds of FWMHSs as multientropy source to achieve a better random effect and meet security requirements.The binary quantization process of the chaotic real number sequence is an important step in the design of generating the pseudo-random sequence. It will directly affect the randomness and complexity of the sequence and ultimately affect the security of its application system. In order to make the pseudo-random generator have a good output rate and good robustness, the binary quantization of three kinds of fwmhs is carried out, and the real number sequence is output. For three kinds of continuous memristive hyperchaotic systems, the RK-4 algorithm is used to discretize the system, and a 32‐bit floating-point number is generated for every iteration. Then, the output sequence of chaos in each dimension is calculated by exclusive or operation, and the hetero scheme is as follows:x1y1,x1z1,x2y2,x2z2,x3y3,x3z3,x4y4,x4z4,y5z5.Then, the XOR operation is performed to enhance the randomness, and the output sample is taken as the final bit sequence. The specific flow chart is shown in Figure4, where Xi_OUT,Yi_OUT,Zi_OUT are the output sequences of 4D, 5D, and 6D continuous memristive hyperchaotic systems.Table 1
Flow chart of the specific process of the PRNG design.
Initialization:X=x1,x2,x3,x4Y=y1,y2,y3,y4,y5Z=z1,z2,z3,z4,z5,z6While (key condition) do choose the last 22 binary decimal values from the sequences of 4D, 5D, and 6D continuous memristive hyperchaotic that called Xi_OUT, Yi_OUT, and Zi_OUT,Xi–OUT=32:0Yi–OUT=32:0Zi–OUT=32:0Obtain bit stream based on XOR ofx1y1,x1z1,x2y2,x2z2,x3y3,x3z3,x4y4,x4z4,y5z5t=t+1 until n = N end whileFigure 4
Flow diagram of PRNG design.


### 3.2. Randomness Tests

A large number of randomness testing algorithms and related standards have been published to evaluate the generated pseudo-random sequences, which can provide a lot of reference data for theoretical analysis. ENT (pseudo-random number sequence test program) test program can easily give four statistics to measure randomness, Shannon entropy of each byte in a pseudo-random sequence,π value calculated by the Monte Carlo method, arithmetic mean root of sequence, and first-order self-correlation number of sequence. The 800.22 test grouping provided by NIST suggests 16 statistical test methods for randomness testing arbitrary long binary sequences. Some of these 16 test items contain multiple subtest items, and the results of each test item have two indicators, namely, pvalue and pass rate. For p value, when pvalue≥0.01 0.01, we consider the sequence to be random. The usual value is 0.001,0.01, where we deem the set significance level α=0.01. For the value of the pass rate, if the value is within the confidence interval, it means that the sequence passes the test and is set as the group number of the sequencing column; then, the confidence interval is(4)1−α−3α1−αββ,1−α+3α1−αβ.In this experiment, the pseudorandom sequences generated by our proposed method generate 130 different binary sequences of 1M bits length. That is,β=130, and the calculated confidence interval is 0.96384,1. As can be seen from Table 2, the P−value of each item is greater than the significance level, and the pass rate proportion value is within the confidence interval, so the generated sequence can completely pass the NIST test, and Table 3 shows that the test results of ENT reach the ideal value. That is, the sequence is random.Table 2
The results of NIST test suite.
Statistical testProportionP−valueResultsFrequency0.96670.074177SuccessBlock Frequency0.99170.585209SuccessCumulative Sums0.97500.051391SuccessRuns0.99170.980883SuccessLongest Run0.96670.378138SuccessRank0.99170.213309SuccessFft0.97500.931952SuccessNonoverlapping Template10.772760SuccessOverlapping Template0.98330.970538SuccessUniversal0.98330.337162SuccessApproximate Entropy0.99170.222869SuccessRandom Excursions10.437274SuccessRandom Excursions Variant10.706149SuccessSerial0.99170.324180SuccessLinear Complexity0.99170.048716SuccessTable 3
The results of ENT test suite.
Test nameTest outputIdeal valueResultsEntropy7.999998SuccessArithmetic Mean0.50000.5SuccessMonte Carlo Value for Pi3.1424443.141592SuccessSerial Correlation Coefficient−0.0000330Success


## 3.1. The Structure of PRNG Algorithm

The PRNG design method of the chaotic system with a single entropy source is too simple, easy to be intercepted reversely, and the complexity is low. The chaotic characteristics of multientropy source memristive hyperchaotic systems are dependent on the hyperchaotic systems (1)–(3) described above. Therefore, it is more complex than every single hyperchaotic system. The RNs generated by PRNG is designed with these three kinds of FWMHSs as multientropy source to achieve a better random effect and meet security requirements.The binary quantization process of the chaotic real number sequence is an important step in the design of generating the pseudo-random sequence. It will directly affect the randomness and complexity of the sequence and ultimately affect the security of its application system. In order to make the pseudo-random generator have a good output rate and good robustness, the binary quantization of three kinds of fwmhs is carried out, and the real number sequence is output. For three kinds of continuous memristive hyperchaotic systems, the RK-4 algorithm is used to discretize the system, and a 32‐bit floating-point number is generated for every iteration. Then, the output sequence of chaos in each dimension is calculated by exclusive or operation, and the hetero scheme is as follows:x1y1,x1z1,x2y2,x2z2,x3y3,x3z3,x4y4,x4z4,y5z5.Then, the XOR operation is performed to enhance the randomness, and the output sample is taken as the final bit sequence. The specific flow chart is shown in Figure4, where Xi_OUT,Yi_OUT,Zi_OUT are the output sequences of 4D, 5D, and 6D continuous memristive hyperchaotic systems.Table 1
Flow chart of the specific process of the PRNG design.
Initialization:X=x1,x2,x3,x4Y=y1,y2,y3,y4,y5Z=z1,z2,z3,z4,z5,z6While (key condition) do choose the last 22 binary decimal values from the sequences of 4D, 5D, and 6D continuous memristive hyperchaotic that called Xi_OUT, Yi_OUT, and Zi_OUT,Xi–OUT=32:0Yi–OUT=32:0Zi–OUT=32:0Obtain bit stream based on XOR ofx1y1,x1z1,x2y2,x2z2,x3y3,x3z3,x4y4,x4z4,y5z5t=t+1 until n = N end whileFigure 4
Flow diagram of PRNG design.


## 3.2. Randomness Tests

A large number of randomness testing algorithms and related standards have been published to evaluate the generated pseudo-random sequences, which can provide a lot of reference data for theoretical analysis. ENT (pseudo-random number sequence test program) test program can easily give four statistics to measure randomness, Shannon entropy of each byte in a pseudo-random sequence,π value calculated by the Monte Carlo method, arithmetic mean root of sequence, and first-order self-correlation number of sequence. The 800.22 test grouping provided by NIST suggests 16 statistical test methods for randomness testing arbitrary long binary sequences. Some of these 16 test items contain multiple subtest items, and the results of each test item have two indicators, namely, pvalue and pass rate. For p value, when pvalue≥0.01 0.01, we consider the sequence to be random. The usual value is 0.001,0.01, where we deem the set significance level α=0.01. For the value of the pass rate, if the value is within the confidence interval, it means that the sequence passes the test and is set as the group number of the sequencing column; then, the confidence interval is(4)1−α−3α1−αββ,1−α+3α1−αβ.In this experiment, the pseudorandom sequences generated by our proposed method generate 130 different binary sequences of 1M bits length. That is,β=130, and the calculated confidence interval is 0.96384,1. As can be seen from Table 2, the P−value of each item is greater than the significance level, and the pass rate proportion value is within the confidence interval, so the generated sequence can completely pass the NIST test, and Table 3 shows that the test results of ENT reach the ideal value. That is, the sequence is random.Table 2
The results of NIST test suite.
Statistical testProportionP−valueResultsFrequency0.96670.074177SuccessBlock Frequency0.99170.585209SuccessCumulative Sums0.97500.051391SuccessRuns0.99170.980883SuccessLongest Run0.96670.378138SuccessRank0.99170.213309SuccessFft0.97500.931952SuccessNonoverlapping Template10.772760SuccessOverlapping Template0.98330.970538SuccessUniversal0.98330.337162SuccessApproximate Entropy0.99170.222869SuccessRandom Excursions10.437274SuccessRandom Excursions Variant10.706149SuccessSerial0.99170.324180SuccessLinear Complexity0.99170.048716SuccessTable 3
The results of ENT test suite.
Test nameTest outputIdeal valueResultsEntropy7.999998SuccessArithmetic Mean0.50000.5SuccessMonte Carlo Value for Pi3.1424443.141592SuccessSerial Correlation Coefficient−0.0000330Success


## 4. Security Analysis

### 4.1. Complexity Analysis

The complexity of multientropy source memristor hyperchaotic system is mainly reflected by approximate entropy (ApEn). ApEn is a kind of used to quantify the time sequence regularity of volatility and unpredictability of nonlinear dynamics parameters, it, with a negative number to represent the complexity of a time series, reflects the time series of the possibility of new information, its physical meaning is when the dimension change, the size of the time series of the new model of probability, produce the greater the probability of new pattern, the more complex time series, the greater the corresponding approximate entropy [64]. Later, the approximate entropy is extended to measure the randomness of binary sequences [65]. In this chapter, we discuss the effect of the length of the pseudo-random sequence on the approximate entropy value. The more uniform the general probability distribution is, the more complex the sequence will be, and the greater the approximate entropy will be. The process of ApEn definition is as follows:Definition.
1(1)
When there is an n-dimensional time seriesκ1,κ2,…,κN obtained by sampling at equal time intervals.(2)
Reconstruct m-dimension vectorX1,X2,…,XN−m+1, where Xi=κi,κi+1,…,κi+m−1.(3)
For1≤i≤N−m+1, count the number of vectors that meet the following conditions:(5)Cimr=number ofXjsuch thatdXi,Xj≤rN−m+1,wheredX,X∗ is defined as dX,X∗=maxκa−κ∗a, κa is the element of vector X, d is the distance between vectors Xi and Xj, which is determined by the maximum difference value of the corresponding element, and the value range of j is 1,N−m+1, including j=i.(4)
ApEn is defined as(6)ApEn=θmr−θm+1r,wherem is an integer representing the length of the comparison vector; r is a real number, representing the measure of “similarity,” usually r=0.2×std, where std represents the standard deviation of the original time series.
Table4 lists the ApEn values corresponding to different sequence lengths. It can be seen that with the increase of chaotic sequence length, the complexity of chaotic sequence increases, and the ApEn value of chaotic sequence also has risen, showing the superiority of random sequence.Table 4
ApEn values corresponding to different sequence lengths.
Sequence length (bits)ApEn13200.693066000.6931220000.7707


### 4.2. Key Space and Running Speed Analysis

Generally speaking, it is not secure when the key space is less than2128. With the respect to an ideal cryptosystem, it should be lagre enough to make brute force attack infeasible. In a multientropy source based on FWMHSs, when we fix another parameter or initial value and change a parameter or initial value, the changed parameter or initial value is called a secret key. The key is sensitive to any differences equal to or larger than 10−12. Therefore, the key space is larger than 1012. So that roughly the key space of the multientropy source based on FWMHSs can be calculated as follows: 1013×1013×⋯×1013︸4keys for4DFWMHS×1013×1013×⋯×1013︸6keys for5DFWMHS×1013×1013×⋯×1013︸9keys for6DFWMHS=10228≈2760, which is enough to resist all kinds of violent attacks. One of the advantages of chaotic cryptography is higher running speed. In addition, when it comes to the proposed PRNGs meeting today’s safety standards, the proposed method has a fairly satisfactory running speed. The experimental hardware environment is 1.8 GHz Intel Celeron CPU and 8 GB memory computer; the software environment is windows 7 and MATLAB 2014 compiler, and the proposed PRNG can achieve a running speed of 0.3256 Mbits/s.


### 4.3. Key Sensitivity Analysis

In the key sensitivity analysis, we use the bit change rate to measure its sensitivity to the key, that is, to observe the degree of the number of bits in the sequence generated by the PRNG when the key is slightly changed. By counting the change of the value of “0” and “1” in the corresponding position of the binary sequence, the corresponding bit change rate is calculated:(7)T=n′n,where n and n′ are binary sequences generated before and after minor changes in the initial key of the system. Take the key of 4D FWMHS as an example, when a1 to a1+10−12 (Ka1) and x0 to x0+10−12 (Kx0) change, respectively, the key sensitivity analysis of PRNG proposed in this paper is shown in Table 5. The ideal bit change rate is 50%. The closer the bit change rate obtained through simulation is to 50%, the more sensitive the PRNG is to the initial value.Table 5
Sensitivity analysis of initial value.
Initial keyKa1Kx0T/%49.91149.796


### 4.4. Correlation Analysis

Correlation analysis refers to the analysis of two or more elements with correlation variables to measure the degree of correlation between two sequences. Autocorrelation function refers to the correlation between a sequenceηi and its corresponding shifted sequence ηi+t. The autocorrelation function of a pseudorandom sequence with good performance is similar to that of a function δ. When used to measure the correlation of two given sequences at different times, the autocorrelation function of a pseudo-random sequence with good performance tends to 0. The correlation coefficient between sequence Xii=0,1,…,n generated by the original key and sequence Yii=0,1,…,n generated after the key is slightly changed can be expressed as(8)Co=∑i=0NXi−μX⋅Yi−μYσX⋅σY,where μ and σ represent mean and standard deviation, respectively. If Co=0, the difference between the two sequences is obvious and there is almost no correlation. Take the key of 4D FWMHS as an example, the trajectories of each sequence and the corresponding sequence generated after the minor change of the key are shown in Figure 5. The red trajectory represents the sequence generated after the minor change of the original key, and the blue trajectory represents the sequence after the minor change of the original key. The system trajectory produced a separation after about five iterations, indicating that it was very sensitive to small changes in the key. Moreover, from the uniform results of autocorrelation and cross-correlation in Figure 6 and the correlation coefficient in Table 6 approaching 0, it is verified that there is almost no correlation between the pseudo-random sequences generated by this method, and it can be seen that the PRNG proposed by our method is ideal and conforms to security. The academic degree of the proposed PRNG has a high sensitivity to the key.Figure 5
Time domain waveform. (a) The parametersa1 (red) and a1+10−12 (blue). (b) The initial conditions x0 (red) and x0+10−12 (blue).
(a)(b)Figure 6
The correlation properties analysis. (a) Autocorrelation. (b) Cross-correlation.
(a)(b)Table 6
Correlation coefficient of different initial keys.
Initial keyCorrelation coefficientKx0Ka1Kb1—0.00410.0018−0.0022


### 4.5. Spectral Entropy Complexity Analysis

Based on the Fourier transform, theSampEn algorithm is used to calculate the relative power spectrum and spectral entropy complexity of the sequence in combination with the Shannon entropy [66–68]. Its function is to analyze the complexity and security of the chaotic system. The more complex the spectrum of a general sequence, the greater the spectral entropy [69–71]. Figure 7 shows the spectral entropy complexity of the three kinds of FWMHSs when some parameters change with each other. It can be seen from these figures that spectral entropy is in these high-complexity regions when a1∈10,10.5 and d2∈4,6 (as shown in Figure 7(a)), a1∈6,10 and β3∈4,6 (as shown in Figure 7(b)), and d2∈0,8 and β3∈6.2,6.8 (as shown in Figure 7(c)). It shows that these three systems have high complexity in a large range; that is, chaos or hyperchaos exist in these ranges.Figure 7
Spectral entropy complexity: (a) ina1−d2 plane; (b) in a1−β3 plane; and (c) in d2−β3 plane.
(a)(b)(c)As people are more and more interested in the study of chaotic systems, some PRNGs based on chaos have been implemented. Since the PRNG is the main core of cryptography encryption algorithm, in order to evaluate the advantages of the proposed scheme, we focus on the security and give the comparison results with other latest schemes in Table7, including the number of types of entropy sources, randomness test packages, and security analysis.Table 7
Comparison of the three kinds of FWMHSs with recent literature.
Refs.[10][12][37][40][49][50]ProposedTypePRNGPRNGPRNGPRNGPRNGPRNGPRNGEntropy sourceAdaptive chaotic mapsMultimodal map4D hyperchaotic system5D memristive hyperchaotic systemTwo Tinkerbel mapsThree chaotic mapsThree kinds of FWMHSsPast processing✓XOR✓XOR✓XORXORTest suitNISTNISTNISTNISTNIST, ENT DIEHARDNISTNIST, ENTKey space2424215927021922183—2760Key sensitivity—?49.74% (bit change rate)50.0028% (bit change rate)?✓49.911% (bit change rate)Correlation<0.02<0.05−0.000470.000198−0.000330—0.0018Entropy——7.9896————Speed (Mbit/s)0.3—0.5017—0.4901—0.3256Comparison analysis✓——✓——✓Entropy complexity——————✓


## 4.1. Complexity Analysis

The complexity of multientropy source memristor hyperchaotic system is mainly reflected by approximate entropy (ApEn). ApEn is a kind of used to quantify the time sequence regularity of volatility and unpredictability of nonlinear dynamics parameters, it, with a negative number to represent the complexity of a time series, reflects the time series of the possibility of new information, its physical meaning is when the dimension change, the size of the time series of the new model of probability, produce the greater the probability of new pattern, the more complex time series, the greater the corresponding approximate entropy [64]. Later, the approximate entropy is extended to measure the randomness of binary sequences [65]. In this chapter, we discuss the effect of the length of the pseudo-random sequence on the approximate entropy value. The more uniform the general probability distribution is, the more complex the sequence will be, and the greater the approximate entropy will be. The process of ApEn definition is as follows:Definition.
1(1)
When there is an n-dimensional time seriesκ1,κ2,…,κN obtained by sampling at equal time intervals.(2)
Reconstruct m-dimension vectorX1,X2,…,XN−m+1, where Xi=κi,κi+1,…,κi+m−1.(3)
For1≤i≤N−m+1, count the number of vectors that meet the following conditions:(5)Cimr=number ofXjsuch thatdXi,Xj≤rN−m+1,wheredX,X∗ is defined as dX,X∗=maxκa−κ∗a, κa is the element of vector X, d is the distance between vectors Xi and Xj, which is determined by the maximum difference value of the corresponding element, and the value range of j is 1,N−m+1, including j=i.(4)
ApEn is defined as(6)ApEn=θmr−θm+1r,wherem is an integer representing the length of the comparison vector; r is a real number, representing the measure of “similarity,” usually r=0.2×std, where std represents the standard deviation of the original time series.
Table4 lists the ApEn values corresponding to different sequence lengths. It can be seen that with the increase of chaotic sequence length, the complexity of chaotic sequence increases, and the ApEn value of chaotic sequence also has risen, showing the superiority of random sequence.Table 4
ApEn values corresponding to different sequence lengths.
Sequence length (bits)ApEn13200.693066000.6931220000.7707


## 4.2. Key Space and Running Speed Analysis

Generally speaking, it is not secure when the key space is less than2128. With the respect to an ideal cryptosystem, it should be lagre enough to make brute force attack infeasible. In a multientropy source based on FWMHSs, when we fix another parameter or initial value and change a parameter or initial value, the changed parameter or initial value is called a secret key. The key is sensitive to any differences equal to or larger than 10−12. Therefore, the key space is larger than 1012. So that roughly the key space of the multientropy source based on FWMHSs can be calculated as follows: 1013×1013×⋯×1013︸4keys for4DFWMHS×1013×1013×⋯×1013︸6keys for5DFWMHS×1013×1013×⋯×1013︸9keys for6DFWMHS=10228≈2760, which is enough to resist all kinds of violent attacks. One of the advantages of chaotic cryptography is higher running speed. In addition, when it comes to the proposed PRNGs meeting today’s safety standards, the proposed method has a fairly satisfactory running speed. The experimental hardware environment is 1.8 GHz Intel Celeron CPU and 8 GB memory computer; the software environment is windows 7 and MATLAB 2014 compiler, and the proposed PRNG can achieve a running speed of 0.3256 Mbits/s.


## 4.3. Key Sensitivity Analysis

In the key sensitivity analysis, we use the bit change rate to measure its sensitivity to the key, that is, to observe the degree of the number of bits in the sequence generated by the PRNG when the key is slightly changed. By counting the change of the value of “0” and “1” in the corresponding position of the binary sequence, the corresponding bit change rate is calculated:(7)T=n′n,where n and n′ are binary sequences generated before and after minor changes in the initial key of the system. Take the key of 4D FWMHS as an example, when a1 to a1+10−12 (Ka1) and x0 to x0+10−12 (Kx0) change, respectively, the key sensitivity analysis of PRNG proposed in this paper is shown in Table 5. The ideal bit change rate is 50%. The closer the bit change rate obtained through simulation is to 50%, the more sensitive the PRNG is to the initial value.Table 5
Sensitivity analysis of initial value.
Initial keyKa1Kx0T/%49.91149.796


## 4.4. Correlation Analysis

Correlation analysis refers to the analysis of two or more elements with correlation variables to measure the degree of correlation between two sequences. Autocorrelation function refers to the correlation between a sequenceηi and its corresponding shifted sequence ηi+t. The autocorrelation function of a pseudorandom sequence with good performance is similar to that of a function δ. When used to measure the correlation of two given sequences at different times, the autocorrelation function of a pseudo-random sequence with good performance tends to 0. The correlation coefficient between sequence Xii=0,1,…,n generated by the original key and sequence Yii=0,1,…,n generated after the key is slightly changed can be expressed as(8)Co=∑i=0NXi−μX⋅Yi−μYσX⋅σY,where μ and σ represent mean and standard deviation, respectively. If Co=0, the difference between the two sequences is obvious and there is almost no correlation. Take the key of 4D FWMHS as an example, the trajectories of each sequence and the corresponding sequence generated after the minor change of the key are shown in Figure 5. The red trajectory represents the sequence generated after the minor change of the original key, and the blue trajectory represents the sequence after the minor change of the original key. The system trajectory produced a separation after about five iterations, indicating that it was very sensitive to small changes in the key. Moreover, from the uniform results of autocorrelation and cross-correlation in Figure 6 and the correlation coefficient in Table 6 approaching 0, it is verified that there is almost no correlation between the pseudo-random sequences generated by this method, and it can be seen that the PRNG proposed by our method is ideal and conforms to security. The academic degree of the proposed PRNG has a high sensitivity to the key.Figure 5
Time domain waveform. (a) The parametersa1 (red) and a1+10−12 (blue). (b) The initial conditions x0 (red) and x0+10−12 (blue).
(a)(b)Figure 6
The correlation properties analysis. (a) Autocorrelation. (b) Cross-correlation.
(a)(b)Table 6
Correlation coefficient of different initial keys.
Initial keyCorrelation coefficientKx0Ka1Kb1—0.00410.0018−0.0022


## 4.5. Spectral Entropy Complexity Analysis

Based on the Fourier transform, theSampEn algorithm is used to calculate the relative power spectrum and spectral entropy complexity of the sequence in combination with the Shannon entropy [66–68]. Its function is to analyze the complexity and security of the chaotic system. The more complex the spectrum of a general sequence, the greater the spectral entropy [69–71]. Figure 7 shows the spectral entropy complexity of the three kinds of FWMHSs when some parameters change with each other. It can be seen from these figures that spectral entropy is in these high-complexity regions when a1∈10,10.5 and d2∈4,6 (as shown in Figure 7(a)), a1∈6,10 and β3∈4,6 (as shown in Figure 7(b)), and d2∈0,8 and β3∈6.2,6.8 (as shown in Figure 7(c)). It shows that these three systems have high complexity in a large range; that is, chaos or hyperchaos exist in these ranges.Figure 7
Spectral entropy complexity: (a) ina1−d2 plane; (b) in a1−β3 plane; and (c) in d2−β3 plane.
(a)(b)(c)As people are more and more interested in the study of chaotic systems, some PRNGs based on chaos have been implemented. Since the PRNG is the main core of cryptography encryption algorithm, in order to evaluate the advantages of the proposed scheme, we focus on the security and give the comparison results with other latest schemes in Table7, including the number of types of entropy sources, randomness test packages, and security analysis.Table 7
Comparison of the three kinds of FWMHSs with recent literature.
Refs.[10][12][37][40][49][50]ProposedTypePRNGPRNGPRNGPRNGPRNGPRNGPRNGEntropy sourceAdaptive chaotic mapsMultimodal map4D hyperchaotic system5D memristive hyperchaotic systemTwo Tinkerbel mapsThree chaotic mapsThree kinds of FWMHSsPast processing✓XOR✓XOR✓XORXORTest suitNISTNISTNISTNISTNIST, ENT DIEHARDNISTNIST, ENTKey space2424215927021922183—2760Key sensitivity—?49.74% (bit change rate)50.0028% (bit change rate)?✓49.911% (bit change rate)Correlation<0.02<0.05−0.000470.000198−0.000330—0.0018Entropy——7.9896————Speed (Mbit/s)0.3—0.5017—0.4901—0.3256Comparison analysis✓——✓——✓Entropy complexity——————✓


## 5. Image Encryption Application

Digital image has been regarded as the main carrier of information communication because of its intuitive and vivid features. Digital image files mainly store the color and grayscale information of the image, but the image information in the process of image transmission may involve a large number of private information, so ensuring the security of the image in the process of transmission and storage has become the focus of attention and research [72–77]. At present, the combination of the chaotic system and image encryption becomes a hot topic in cryptography. In this section, based on the pseudorandom sequence generated by the three kinds of FWMHSs, the position or pixel value of image pixels is scrambled and replaced. Finally, the validity analysis of encrypted images, key space, histogram analysis, key sensitivity, antidifferential aggression, and correlation between adjacent pixel points are carried out.


### 5.1. Bit Plane Layering

In an image, a pixel is a number of bits. The grayscale of each pixel is made up of eight bits (bytes). Then, an 8-bit image can be considered to be composed of 8 1-bit planes [78], as shown in Figure 8. Figures 9(b)–9(i) refer to the eight 1-bit planes of the 8-bit image, from top to bottom, from the highest order bit to the lowest order bit. The acquisition of each bit layer is the binary image obtained under the processing of the threshold gray transformation function (denoted as ε). Generally speaking, all grayscale mappings greater than ε are 1, and all grayscale mappings less than ε are 0. However, for the convenience of image encryption, we set all grayscale mappings less than ε to 0.5.Figure 8
Bit plane representation of an 8-bit image.Figure 9
An 8-bit grayscale image with a size of256×256 pixels.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The decomposition of an image into a bit plane can help us determine the adequacy of the number of bits used to quantify the image. Reconstruction is made by multiplying the pixels of then-th plane by the constant 2n−1. The plane used to reconstruct an image can be less than all the bitplanes decomposed. As can be seen from Figure 9, the higher the bit image, the more information the original image contains. The three-bit layers constitute the image in Figure 10(c), which generally restores the original image. Although the main features of the original image have been restored, they are somewhat flat and lack details, especially in the background area. Adding bitplane 5 to reconstruction effectively improves this situation, as shown in Figure 10(b). After many trials, adding more planes will not contribute much to the appearance of the image. Similarly, compared with the time consumed by the proposed encryption scheme, it takes 0.1568 s to encrypt an 8-bit Lena image and 0.1576 s to encrypt a 4-bit Lena image. The time consumed by encrypting two different bit planes can be regarded as equal. Thus, storing four higher-order bitplanes can restore the details in the accepted range to reconstruct the original image, and using four bit planes to reconstruct the original image can reduce the storage by 50%.Figure 10
(a) Eight-bit grayscale original image of256×256 pixels in size; (b) images reconstructed using bitplanes 5, 6, 7, and 8; and (c) image reconstructed using bitplanes 6, 7, and 8.
(a)(b)(c)


### 5.2. Proposed Image Encryption Algorithm

In this section, we will encrypt the image based on the proposed pseudo-random number sequence, and the image scrambling and diffusion can be realized in the spectrum domain. The process of the proposed image encryption algorithm is as follows:Step 1: The 4-bit plane obtained by bit layered decomposition and reconstruction is used as the original 2D plaintext imageP, as shown in Figures 11(a) and 11(d).Step 2: Random scrambling. PRNG based on multientropy source FWMHSs is used to generate pseudorandom number vectorX with length 2M×N, each random number Xi∈1,2,…,10MN, and then random one-dimensional vector a and b with size M×N are generated from X. The image matrix P is then transformed into a one-dimensional vector A with the size of M×N. Arnold transformation is performed on any coordinate position of vector A to obtain the coordinate m,n of the row, namely,(9)mn=1abab+11j.Som=1+aj and n=b+ab+1j. Here, take ab+1 as a new random number through optimization, which is still recorded as a; then n=b+aj. Finally, the scrambled image D is obtained, as shown in Figures 11(b) and 11(e).Step 3: The imageD and the pseudorandom sequence Cd∈d=1,2,…,M×N generated by PRNG of length M×N are diffused for XOR; that is, the final encrypted image is T=D⊕C, as shown in Figures 11(c) and 11(f). The decryption algorithm is the inverse process of the encryption algorithm. The specific encryption and decryption flow chart is shown in Figure 12.Figure 11
(a) Original image Lena. (b) Encrypted image Lena. (c) Decrypted image Lena. (d) Original image Baboon. (e) Encrypted image Baboon. (f) Decrypted image Baboon.
(a)(b)(c)(d)(e)(f)Figure 12
Proposed chaotic digital image cryptography system.


### 5.3. Security Analysis

#### 5.3.1. Key Space and Execution Efficiency

The encryption scheme proposed in this paper uses the initial value of state variables of multientropy source memristor hyperchaotic system as the original key, and the key space can reach2760, which is equivalent to 760-bit key length. If the system parameters are also used as the original key, the key space is larger. Therefore, this algorithm has the ability to resist the exhaustive attack. The main way to improve efficiency is to use integer operation and implement the subgraph parallel encryption strategy.


#### 5.3.2. Histogram and Correlation Analysis

Due to the spectrum characteristics of the digital image, the algorithm must have similar security and performance for any image encryption. The ideal histogram distribution of the ciphertext image should be uniform to prevent attackers from obtaining some information from the fluctuating histogram. We use the proposed algorithm to encrypt the original two-dimensional plaintext image P to obtain an encrypted image similar to noise, as shown in Figure11(c). When we use four-bit layer image analysis and image encryption, some pixels in each pixel pi∈0,255 of the original plain-text reconstructed image P are missing, and the histogram display is shown in Figures 13(a) and 13(c)). However, we will inevitably lose some unimportant values (mainly the image micro detail data, which does not affect the image vision). Through the histogram of ciphertext in Figures 13(b) and 13(d), we can see that the value of ciphertext pixel is very small, which is due to the loss of some micro detail data pixel value; in this case, the histogram cannot reflect the uniformity. We will verify the uniformity of the encrypted image by the following security analysis.Figure 13
(a) Histogram of the original image Lena. (b) Histogram of the encrypted image Lena. (c) Histogram of the original image Baboon. (d) Histogram of the encrypted image Baboon.
(a)(b)(c)(d)The correlation between adjacent pixels indicates the quality of image encryption. Of course, the correlation between adjacent pixels of the plaintext image will be very high. Through a good encryption algorithm, the correlation between these pixels can be eliminated, which avoids the attacker from the perspective of correlation to obtain image information. We randomly select 1000 pairs of pixel values on the horizontal, vertical, and diagonal adjacent pixels of plaintext imagep and encrypted image t. Then, we calculate the correlation coefficient in Table 8 through the correlation coefficient equation (8). Among the correlation coefficients of the two images, the two correlation coefficients of the encrypted image generated by the proposed algorithm are the smallest among all the comparable algorithms, and [79, 80] have a minimum correlation coefficient, respectively. In addition, the correlation coefficients of the encrypted image in three directions are close to 0, which means that the correlation between adjacent pixels in the plane image is effectively eliminated, and the image obtained is completely unrecognizable. In this paper, histogram and correlation tests are used to prove the resistance to statistical attacks.Table 8
Correlation coefficients analysis.
ImageDirectionPlain imageEncrypted imageRef. [57]Ref. [79]Ref. [80]Ref. [81]LenaHorizontal0.77724−0.0045−0.0031−0.0084−0.01240.0519Vertical0.848580.0004−0.0293−0.0017−0.0038−0.0385Diagonal0.7369−0.0194−0.0077−0.0194−0.00900.0046BaboonHorizontal0.52256−0.1480.0224———Vertical0.510420.00600.0115———Diagonal0.419890.0069−0.0025———


#### 5.3.3. Differential Key Attack Analysis

Differential cryptanalysis is one of the most effective methods to attack iterative block cipher. It is to recover some key bits by analyzing the influence of plaintext pair difference on ciphertext pair difference. The number of pixels change rate (NPCR) and the unified average changing intensity (UACI) are two widely used metrics to evaluate the strength of the image encryption algorithm (or cipher) under differential attack. Assuming that the encrypted image after the pixel change of the original plaintext image isP and T, respectively; then, the pixel values at i,j in P and T are expressed as Pi,j and Ti,j, and their bipolar array is expressed as equation (10). Then, NPCR and UACI can be defined by equations (11) and (12). For the reconstruction of the four-bit layer image, the results of NPCR and UACI are ideal and the results are shown in Table 9:(10)Δi,j=0,ifPi,j=Ti,j,1,ifPi,j≠Ti,j,(11)NPCR:NP,T=∑i,jΔi,jT×100%,(12)UACI:UP,T=∑i,jPi,j−Ti,j255×MN×100%.Table 9
NPCR and UACI test results for the two images reported in the experiments.
ImageLenaBaboonNPCR (%)83.456483.2596UACI (%)34.682834.7289


#### 5.3.4. Entropy Analysis

Information entropy is a measure of system complexity and reflects the randomness of system information. If the system information is more complex and there are more types of different situations, then its information entropy is relatively large [82], and its value can be calculated by equation (13). For an 8-bit gray level image, the closer it is to 8 bits, the less likely the algorithm is to leak information:(13)Hm=∑i=0npmilog1pmi.In Table10, we can see that the entropy of the plaintext image is relatively low, and the entropy of the encrypted image is close to 8. In the information entropy of the two images, compared with [57, 83–85], the entropy of the encrypted image generated by our proposed algorithm is close to 8 bits.Table 10
Information entropy.
ImageLenaBaboonProposed7.99727.9971Ref. [57]7.99937.9993Ref. [83]7.99727.9025Ref. [84]7.8683—Ref. [85]7.90307.9026


## 5.1. Bit Plane Layering

In an image, a pixel is a number of bits. The grayscale of each pixel is made up of eight bits (bytes). Then, an 8-bit image can be considered to be composed of 8 1-bit planes [78], as shown in Figure 8. Figures 9(b)–9(i) refer to the eight 1-bit planes of the 8-bit image, from top to bottom, from the highest order bit to the lowest order bit. The acquisition of each bit layer is the binary image obtained under the processing of the threshold gray transformation function (denoted as ε). Generally speaking, all grayscale mappings greater than ε are 1, and all grayscale mappings less than ε are 0. However, for the convenience of image encryption, we set all grayscale mappings less than ε to 0.5.Figure 8
Bit plane representation of an 8-bit image.Figure 9
An 8-bit grayscale image with a size of256×256 pixels.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The decomposition of an image into a bit plane can help us determine the adequacy of the number of bits used to quantify the image. Reconstruction is made by multiplying the pixels of then-th plane by the constant 2n−1. The plane used to reconstruct an image can be less than all the bitplanes decomposed. As can be seen from Figure 9, the higher the bit image, the more information the original image contains. The three-bit layers constitute the image in Figure 10(c), which generally restores the original image. Although the main features of the original image have been restored, they are somewhat flat and lack details, especially in the background area. Adding bitplane 5 to reconstruction effectively improves this situation, as shown in Figure 10(b). After many trials, adding more planes will not contribute much to the appearance of the image. Similarly, compared with the time consumed by the proposed encryption scheme, it takes 0.1568 s to encrypt an 8-bit Lena image and 0.1576 s to encrypt a 4-bit Lena image. The time consumed by encrypting two different bit planes can be regarded as equal. Thus, storing four higher-order bitplanes can restore the details in the accepted range to reconstruct the original image, and using four bit planes to reconstruct the original image can reduce the storage by 50%.Figure 10
(a) Eight-bit grayscale original image of256×256 pixels in size; (b) images reconstructed using bitplanes 5, 6, 7, and 8; and (c) image reconstructed using bitplanes 6, 7, and 8.
(a)(b)(c)


## 5.2. Proposed Image Encryption Algorithm

In this section, we will encrypt the image based on the proposed pseudo-random number sequence, and the image scrambling and diffusion can be realized in the spectrum domain. The process of the proposed image encryption algorithm is as follows:Step 1: The 4-bit plane obtained by bit layered decomposition and reconstruction is used as the original 2D plaintext imageP, as shown in Figures 11(a) and 11(d).Step 2: Random scrambling. PRNG based on multientropy source FWMHSs is used to generate pseudorandom number vectorX with length 2M×N, each random number Xi∈1,2,…,10MN, and then random one-dimensional vector a and b with size M×N are generated from X. The image matrix P is then transformed into a one-dimensional vector A with the size of M×N. Arnold transformation is performed on any coordinate position of vector A to obtain the coordinate m,n of the row, namely,(9)mn=1abab+11j.Som=1+aj and n=b+ab+1j. Here, take ab+1 as a new random number through optimization, which is still recorded as a; then n=b+aj. Finally, the scrambled image D is obtained, as shown in Figures 11(b) and 11(e).Step 3: The imageD and the pseudorandom sequence Cd∈d=1,2,…,M×N generated by PRNG of length M×N are diffused for XOR; that is, the final encrypted image is T=D⊕C, as shown in Figures 11(c) and 11(f). The decryption algorithm is the inverse process of the encryption algorithm. The specific encryption and decryption flow chart is shown in Figure 12.Figure 11
(a) Original image Lena. (b) Encrypted image Lena. (c) Decrypted image Lena. (d) Original image Baboon. (e) Encrypted image Baboon. (f) Decrypted image Baboon.
(a)(b)(c)(d)(e)(f)Figure 12
Proposed chaotic digital image cryptography system.


## 5.3. Security Analysis

### 5.3.1. Key Space and Execution Efficiency

The encryption scheme proposed in this paper uses the initial value of state variables of multientropy source memristor hyperchaotic system as the original key, and the key space can reach2760, which is equivalent to 760-bit key length. If the system parameters are also used as the original key, the key space is larger. Therefore, this algorithm has the ability to resist the exhaustive attack. The main way to improve efficiency is to use integer operation and implement the subgraph parallel encryption strategy.


### 5.3.2. Histogram and Correlation Analysis

Due to the spectrum characteristics of the digital image, the algorithm must have similar security and performance for any image encryption. The ideal histogram distribution of the ciphertext image should be uniform to prevent attackers from obtaining some information from the fluctuating histogram. We use the proposed algorithm to encrypt the original two-dimensional plaintext image P to obtain an encrypted image similar to noise, as shown in Figure11(c). When we use four-bit layer image analysis and image encryption, some pixels in each pixel pi∈0,255 of the original plain-text reconstructed image P are missing, and the histogram display is shown in Figures 13(a) and 13(c)). However, we will inevitably lose some unimportant values (mainly the image micro detail data, which does not affect the image vision). Through the histogram of ciphertext in Figures 13(b) and 13(d), we can see that the value of ciphertext pixel is very small, which is due to the loss of some micro detail data pixel value; in this case, the histogram cannot reflect the uniformity. We will verify the uniformity of the encrypted image by the following security analysis.Figure 13
(a) Histogram of the original image Lena. (b) Histogram of the encrypted image Lena. (c) Histogram of the original image Baboon. (d) Histogram of the encrypted image Baboon.
(a)(b)(c)(d)The correlation between adjacent pixels indicates the quality of image encryption. Of course, the correlation between adjacent pixels of the plaintext image will be very high. Through a good encryption algorithm, the correlation between these pixels can be eliminated, which avoids the attacker from the perspective of correlation to obtain image information. We randomly select 1000 pairs of pixel values on the horizontal, vertical, and diagonal adjacent pixels of plaintext imagep and encrypted image t. Then, we calculate the correlation coefficient in Table 8 through the correlation coefficient equation (8). Among the correlation coefficients of the two images, the two correlation coefficients of the encrypted image generated by the proposed algorithm are the smallest among all the comparable algorithms, and [79, 80] have a minimum correlation coefficient, respectively. In addition, the correlation coefficients of the encrypted image in three directions are close to 0, which means that the correlation between adjacent pixels in the plane image is effectively eliminated, and the image obtained is completely unrecognizable. In this paper, histogram and correlation tests are used to prove the resistance to statistical attacks.Table 8
Correlation coefficients analysis.
ImageDirectionPlain imageEncrypted imageRef. [57]Ref. [79]Ref. [80]Ref. [81]LenaHorizontal0.77724−0.0045−0.0031−0.0084−0.01240.0519Vertical0.848580.0004−0.0293−0.0017−0.0038−0.0385Diagonal0.7369−0.0194−0.0077−0.0194−0.00900.0046BaboonHorizontal0.52256−0.1480.0224———Vertical0.510420.00600.0115———Diagonal0.419890.0069−0.0025———


### 5.3.3. Differential Key Attack Analysis

Differential cryptanalysis is one of the most effective methods to attack iterative block cipher. It is to recover some key bits by analyzing the influence of plaintext pair difference on ciphertext pair difference. The number of pixels change rate (NPCR) and the unified average changing intensity (UACI) are two widely used metrics to evaluate the strength of the image encryption algorithm (or cipher) under differential attack. Assuming that the encrypted image after the pixel change of the original plaintext image isP and T, respectively; then, the pixel values at i,j in P and T are expressed as Pi,j and Ti,j, and their bipolar array is expressed as equation (10). Then, NPCR and UACI can be defined by equations (11) and (12). For the reconstruction of the four-bit layer image, the results of NPCR and UACI are ideal and the results are shown in Table 9:(10)Δi,j=0,ifPi,j=Ti,j,1,ifPi,j≠Ti,j,(11)NPCR:NP,T=∑i,jΔi,jT×100%,(12)UACI:UP,T=∑i,jPi,j−Ti,j255×MN×100%.Table 9
NPCR and UACI test results for the two images reported in the experiments.
ImageLenaBaboonNPCR (%)83.456483.2596UACI (%)34.682834.7289


### 5.3.4. Entropy Analysis

Information entropy is a measure of system complexity and reflects the randomness of system information. If the system information is more complex and there are more types of different situations, then its information entropy is relatively large [82], and its value can be calculated by equation (13). For an 8-bit gray level image, the closer it is to 8 bits, the less likely the algorithm is to leak information:(13)Hm=∑i=0npmilog1pmi.In Table10, we can see that the entropy of the plaintext image is relatively low, and the entropy of the encrypted image is close to 8. In the information entropy of the two images, compared with [57, 83–85], the entropy of the encrypted image generated by our proposed algorithm is close to 8 bits.Table 10
Information entropy.
ImageLenaBaboonProposed7.99727.9971Ref. [57]7.99937.9993Ref. [83]7.99727.9025Ref. [84]7.8683—Ref. [85]7.90307.9026


## 5.3.1. Key Space and Execution Efficiency

The encryption scheme proposed in this paper uses the initial value of state variables of multientropy source memristor hyperchaotic system as the original key, and the key space can reach2760, which is equivalent to 760-bit key length. If the system parameters are also used as the original key, the key space is larger. Therefore, this algorithm has the ability to resist the exhaustive attack. The main way to improve efficiency is to use integer operation and implement the subgraph parallel encryption strategy.


## 5.3.2. Histogram and Correlation Analysis

Due to the spectrum characteristics of the digital image, the algorithm must have similar security and performance for any image encryption. The ideal histogram distribution of the ciphertext image should be uniform to prevent attackers from obtaining some information from the fluctuating histogram. We use the proposed algorithm to encrypt the original two-dimensional plaintext image P to obtain an encrypted image similar to noise, as shown in Figure11(c). When we use four-bit layer image analysis and image encryption, some pixels in each pixel pi∈0,255 of the original plain-text reconstructed image P are missing, and the histogram display is shown in Figures 13(a) and 13(c)). However, we will inevitably lose some unimportant values (mainly the image micro detail data, which does not affect the image vision). Through the histogram of ciphertext in Figures 13(b) and 13(d), we can see that the value of ciphertext pixel is very small, which is due to the loss of some micro detail data pixel value; in this case, the histogram cannot reflect the uniformity. We will verify the uniformity of the encrypted image by the following security analysis.Figure 13
(a) Histogram of the original image Lena. (b) Histogram of the encrypted image Lena. (c) Histogram of the original image Baboon. (d) Histogram of the encrypted image Baboon.
(a)(b)(c)(d)The correlation between adjacent pixels indicates the quality of image encryption. Of course, the correlation between adjacent pixels of the plaintext image will be very high. Through a good encryption algorithm, the correlation between these pixels can be eliminated, which avoids the attacker from the perspective of correlation to obtain image information. We randomly select 1000 pairs of pixel values on the horizontal, vertical, and diagonal adjacent pixels of plaintext imagep and encrypted image t. Then, we calculate the correlation coefficient in Table 8 through the correlation coefficient equation (8). Among the correlation coefficients of the two images, the two correlation coefficients of the encrypted image generated by the proposed algorithm are the smallest among all the comparable algorithms, and [79, 80] have a minimum correlation coefficient, respectively. In addition, the correlation coefficients of the encrypted image in three directions are close to 0, which means that the correlation between adjacent pixels in the plane image is effectively eliminated, and the image obtained is completely unrecognizable. In this paper, histogram and correlation tests are used to prove the resistance to statistical attacks.Table 8
Correlation coefficients analysis.
ImageDirectionPlain imageEncrypted imageRef. [57]Ref. [79]Ref. [80]Ref. [81]LenaHorizontal0.77724−0.0045−0.0031−0.0084−0.01240.0519Vertical0.848580.0004−0.0293−0.0017−0.0038−0.0385Diagonal0.7369−0.0194−0.0077−0.0194−0.00900.0046BaboonHorizontal0.52256−0.1480.0224———Vertical0.510420.00600.0115———Diagonal0.419890.0069−0.0025———


## 5.3.3. Differential Key Attack Analysis

Differential cryptanalysis is one of the most effective methods to attack iterative block cipher. It is to recover some key bits by analyzing the influence of plaintext pair difference on ciphertext pair difference. The number of pixels change rate (NPCR) and the unified average changing intensity (UACI) are two widely used metrics to evaluate the strength of the image encryption algorithm (or cipher) under differential attack. Assuming that the encrypted image after the pixel change of the original plaintext image isP and T, respectively; then, the pixel values at i,j in P and T are expressed as Pi,j and Ti,j, and their bipolar array is expressed as equation (10). Then, NPCR and UACI can be defined by equations (11) and (12). For the reconstruction of the four-bit layer image, the results of NPCR and UACI are ideal and the results are shown in Table 9:(10)Δi,j=0,ifPi,j=Ti,j,1,ifPi,j≠Ti,j,(11)NPCR:NP,T=∑i,jΔi,jT×100%,(12)UACI:UP,T=∑i,jPi,j−Ti,j255×MN×100%.Table 9
NPCR and UACI test results for the two images reported in the experiments.
ImageLenaBaboonNPCR (%)83.456483.2596UACI (%)34.682834.7289


## 5.3.4. Entropy Analysis

Information entropy is a measure of system complexity and reflects the randomness of system information. If the system information is more complex and there are more types of different situations, then its information entropy is relatively large [82], and its value can be calculated by equation (13). For an 8-bit gray level image, the closer it is to 8 bits, the less likely the algorithm is to leak information:(13)Hm=∑i=0npmilog1pmi.In Table10, we can see that the entropy of the plaintext image is relatively low, and the entropy of the encrypted image is close to 8. In the information entropy of the two images, compared with [57, 83–85], the entropy of the encrypted image generated by our proposed algorithm is close to 8 bits.Table 10
Information entropy.
ImageLenaBaboonProposed7.99727.9971Ref. [57]7.99937.9993Ref. [83]7.99727.9025Ref. [84]7.8683—Ref. [85]7.90307.9026


## 6. Conclusion

In this paper, a new PRNG method is proposed by coupling three kinds of FWMHSs with different dimensions. The security of the generated chaotic pseudo-random sequence is analyzed. The results show that the random number generated by the proposed method has good statistical characteristics, including large enough key space and excellent key sensitivity, and the generated random number sequence can pass NIST and ENT randomness detection. As a typical application of PRNG, an image encryption algorithm based on PRNG using three kinds of FWMHSs different dimensions as a multientropy source is proposed. The results of encryption and decryption, security analysis, and antidifferential attack ensure the effectiveness of the algorithm, and the pixel correlation of encrypted image tends to zero. Finally, the performance comparison with the existing encryption algorithms shows that the proposed image encryption algorithm based on the proposed PRNG can be effectively applied in cryptography.



---

*Source: 8274685-2020-12-24.xml*