# Image Encryption Technique Combining Compressive Sensing with Double Random-Phase Encoding

Authors: Huiqing Huang; Shouzhi Yang
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

A new image compression-encryption method based on compressive sensing and double random-phase encoding is proposed, which can complete image compression and encryption simultaneously. We utilize the hyperchaotic system to generate a measurement matrix and two random-phase masks first. Then the original image is measured by measurement matrix to accomplish encryption and compression at the same time, next the compressed image is reencrypted by the double random-phase encoding technique with the two random-phase masks, and lastly the resulting image is confused and diffused by using hyperchaotic system simultaneously. Some numerical simulations verify the validity and the reliability of the proposed algorithm.


---

## Body

## 1. Introduction

With the development of network and communication technology, encryption technique becomes more and more important for the information security and network security. It is one of the most important methods in protecting network security, which can prevent the illegal easy stealing, distorts, duplicates, and spreads of sensitive information. In 1989, a typical image encryption method with advantages of good performance and high security was based on chaos theory which was proposed by Matthews [1]. Subsequently, all kinds of chaos-based image encryption techniques have been reported [2–7]. Guan et al. employed Arnold cat map and Chen’s chaotic system to shuffle the positions and change the gray values of image pixels [3]. In [2], Chen et al. proposed a symmetric image encryption scheme based on 3D chaotic cat maps. Gao and Chen proposed a novel image encryption algorithm based on hyperchaos, which uses a new image total shuffling matrix to shuffle the pixel positions of the plain image and then the states combination of hyperchaos is used to change the gray values of the shuffled-image [6]. A chaos-based image encryption algorithm with variable control parameters is proposed [7].The double random-phase encoding (DRPE) was first proposed in 1995 [8]; since then, many researchers have proposed and analyzed a lot of encryption algorithms based on DRPE [9–14]. In [9], Zhang and Karim proposed a new encryption technique to encrypt color images using existing optical encryption systems for gray-scale images. Subsequently, Unnikrishnan et al. proposed an optical architecture that encodes a primary image to stationary white noise by using two statistically independent random-phase codes, the encoding is done in the fractional Fourier domain, and the optical distribution in any two planes of a quadratic phase system is related by fractional Fourier transform of the appropriately scaled distribution in the two input planes [10]. After that, a lensless optical security system based on double random-phase encoding in the Fresnel domain was designed [11]. To enhance security further, a novel image encryption method is proposed by utilizing random-phase encoding in the fractional Fourier domain to encrypt two images into one encrypted image with stationary white distribution [12].Recently, encryption methods [15–18] based on compressive sensing (CS) [19, 20] have been widely studied. Zhang et al. proposed a new color image encryption algorithm combining compressive sensing with Arnold transform, which can encrypt the color image into a gray image [15]. In [16], an image information encryption method based on compressive sensing and double random-phase encoding is proposed. Lately, Zhou et al. proposed a novel image compression-encryption scheme by combining 2D compressive sensing with nonlinear fractional Mellin transform [17]. To overcome the low-security and reduce the possible transmission burden, an efficient image compression-encryption scheme based on hyperchaotic system and 2D compressive sensing is proposed [18].In this paper, a new image encryption method based on CS and DRPE technique is proposed which can accomplish encryption and compression at the same time. In this scheme, the original image is measured by the measurement matrix first, where the measurement matrix is controlled by hyperchaotic system with initial conditions. And then the two random-phase masks generated by the hyperchaotic system performs DRPE with the compressed image. Lastly, the resulting image is confused and diffused by using hyperchaotic system simultaneously.


## 2. Preliminaries for Proposed Technique

In this section, some preliminaries about the CS theory and DRPE technique used in image encryption algorithm are introduced.


### 2.1. Compressive Sensing

CS is a new sample theory, which can reconstruct original signal by directly sampling a sparse or compressible signal at a rate much lower than the Nyquist rate. For a 1D signalx in RN with length N could be represented as(1)x=∑i=1NαiΨi=Ψαorα=ΨTx,where Ψ is the N×N matrix with Ψii=1N as columns and αi is the coefficient sequence of signal x. Suppose that M measurements of x are taken through the following linear measurement:(2)y=Φx=ΦΨα,where Φ is an M×N measurement matrix incoherent with basis matrix Ψ. In fact, the magic of CS is that Φ can be designed such that x can be recovered approximately form the measurements y when the matrix ΦΨ satisfies the Restricted Isometry Property (RIP) [22].To recover the signalx from y, it is required to solve the optimal problem below:(3)minα0s.t.y=Φx.The problem above can be solved by greed iterative algorithm, one of the most commonly used algorithms is the orthogonal matching pursuit (OMP) method [23].


### 2.2. Double Random-Phase Encoding

In 1995, Refregier and Javidi proposed the DRPE technique [8]. The encoded image is obtained by random-phase encoding in both the input and the Fourier planes. If two random-phase masks are used to encrypt the image in the input and Fourier planes, respectively, the input image is transformed into a complex-amplitude stationary white noise.Letf(x,y) denote the image to be encoded and g(x,y) denote the encoded image. ϕ(x,y) and φ(u,v) stand for the key function in the spatial and frequency domain, respectively, and the values of which are distributed from 0 to 1 with uniform probability.The encoding and decoding procedures are shown as follows:(4)gx,y=F-1Ffx,yexp⁡i2πϕx,yexp⁡i2πφu,v,fx,y=F-1Fgx,yexp⁡-i2πφu,vexp⁡-i2πϕu,v,where F and F-1 represent the 2D fast Fourier transformation and inverse 2D fast Fourier transformation, respectively.


### 2.3. Hyperchaotic System

In the proposed encryption scheme, a new hyperchaotic system generated from Gao et al.’s chaotic system is used in key scheming, which is defined by [24](5)x˙=ay-x,y˙=dx-xz+cy-h,z˙=xy-bz,h˙=x+k,where a, b, c, d, and k are the control parameters of the hyperchaotic system. When a=36, b=3, c=8, d=-16, and -0.7≤k≤0.7, the system is in a hyperchaotic state. The hyperchaos attractors are shown in Figure 1. With parameters a=36, b=3, c=8, d=-16, and k=0.2, its Lyapunov exponents are λ1=1.552, λ2=0.023, λ3=0, and λ4=-12.573, respectively. Since the hyperchaotic system has two positive Lyapunov exponents, the prediction time of the hyperchaotic system is shorter than the original chaotic system [25]; as a result, it is safer than chaos in security algorithm. Because of this advantage of the hyperchaotic system, we will use it to generate the keys in the compression and encryption stage of our algorithm.Figure 1
Hyperchaos attractors of system (5) with k=0.2.
(a)
x-y plane (b)
x-z plane


## 2.1. Compressive Sensing

CS is a new sample theory, which can reconstruct original signal by directly sampling a sparse or compressible signal at a rate much lower than the Nyquist rate. For a 1D signalx in RN with length N could be represented as(1)x=∑i=1NαiΨi=Ψαorα=ΨTx,where Ψ is the N×N matrix with Ψii=1N as columns and αi is the coefficient sequence of signal x. Suppose that M measurements of x are taken through the following linear measurement:(2)y=Φx=ΦΨα,where Φ is an M×N measurement matrix incoherent with basis matrix Ψ. In fact, the magic of CS is that Φ can be designed such that x can be recovered approximately form the measurements y when the matrix ΦΨ satisfies the Restricted Isometry Property (RIP) [22].To recover the signalx from y, it is required to solve the optimal problem below:(3)minα0s.t.y=Φx.The problem above can be solved by greed iterative algorithm, one of the most commonly used algorithms is the orthogonal matching pursuit (OMP) method [23].


## 2.2. Double Random-Phase Encoding

In 1995, Refregier and Javidi proposed the DRPE technique [8]. The encoded image is obtained by random-phase encoding in both the input and the Fourier planes. If two random-phase masks are used to encrypt the image in the input and Fourier planes, respectively, the input image is transformed into a complex-amplitude stationary white noise.Letf(x,y) denote the image to be encoded and g(x,y) denote the encoded image. ϕ(x,y) and φ(u,v) stand for the key function in the spatial and frequency domain, respectively, and the values of which are distributed from 0 to 1 with uniform probability.The encoding and decoding procedures are shown as follows:(4)gx,y=F-1Ffx,yexp⁡i2πϕx,yexp⁡i2πφu,v,fx,y=F-1Fgx,yexp⁡-i2πφu,vexp⁡-i2πϕu,v,where F and F-1 represent the 2D fast Fourier transformation and inverse 2D fast Fourier transformation, respectively.


## 2.3. Hyperchaotic System

In the proposed encryption scheme, a new hyperchaotic system generated from Gao et al.’s chaotic system is used in key scheming, which is defined by [24](5)x˙=ay-x,y˙=dx-xz+cy-h,z˙=xy-bz,h˙=x+k,where a, b, c, d, and k are the control parameters of the hyperchaotic system. When a=36, b=3, c=8, d=-16, and -0.7≤k≤0.7, the system is in a hyperchaotic state. The hyperchaos attractors are shown in Figure 1. With parameters a=36, b=3, c=8, d=-16, and k=0.2, its Lyapunov exponents are λ1=1.552, λ2=0.023, λ3=0, and λ4=-12.573, respectively. Since the hyperchaotic system has two positive Lyapunov exponents, the prediction time of the hyperchaotic system is shorter than the original chaotic system [25]; as a result, it is safer than chaos in security algorithm. Because of this advantage of the hyperchaotic system, we will use it to generate the keys in the compression and encryption stage of our algorithm.Figure 1
Hyperchaos attractors of system (5) with k=0.2.
(a)
x-y plane (b)
x-z plane


## 3. The Proposed Image Encryption Scheme

This section presents the proposed scheme for image encryption by using CS and DRPE. Assume that the size of original imageX is N×N. The procedure of encryption is given as follows.Step 1.
Confirm the values of the initial conditionsx10, y10, z10, h10, k10 and iterate the hyperchaotic system for a suitable times by Runge-Kutta algorithm to avoid the harmful effect of transient procedure.Step 2.
The hyperchaotic system is iterated, and as a result, four hyperchaotic sequences{x1i}, {y1i}, {z1i}, and {h1i} would be generated, respectively. And then transform these sequences into sequences {ηi′}, ηi that can be replaced by x1i, y1i, z1i, and h1i.(6)ηi′=10kηi-round10kηi.Step 3.
The hyperchaotic sequences are exploited to construct the measurement matrixΦ. By taking MN successive elements of the hyperchaotic sequences, we convert it into measurement matrix Φ of size M×N.Step 4.
The original imageX is extended in the Ψ domain and then performed the projection measurement in Φ to obtain Y=ΦΨTX, where Ψ is set to be wavelet transform.Step 5.
Divide the measurementY into two equal blocks; that is, Y=[Y1,Y2]. Each block has size M×(N/2). We can add a random column to Y if N is not an even number.Step 6.
The hyperchaotic sequences are exploited to construct the random-phase masksM1 and M2. Take the construction of the random-phase mask M1, for example, and the steps are as follows:
(1) By takingMN/2 successive elements of the sequence {y1i′}, we convert it into a random matrix Q1 of size M×(N/2).
(2) LetM1(x,y)=exp⁡(i2πQ1).
With another sequence{z1i′}, the random-phase mask M2 could be constructed in the same way.Step 7.
CombineY1 and Y2 to obtain the complex-amplitude image:(7)A=Y1+Y2i.Step 8.
A is first multiplied by the first random-phase mask M1, then transformed by 2D fast Fourier transformation (FFT), and multiplied by the second random-phase mask M2 and inverse 2D fast Fourier transformation. Thus, we obtain the intermediate encryption result B=[B1,B2], which is given by(8)B1=ERF-1FA·M1·M2,B2=EIF-1FA·M1·M2,where ER{} denotes the extracting real part operator and EI{} denotes the extracting imaginary part operator.Step 9.
All pixels ofB are mapped into an integer range from 0 to 255.(9)C1=round255×B1-min⁡Bmax⁡B-min⁡B,C2=round255×B2-min⁡Bmax⁡B-min⁡B.And then arrange the pixels from row to column, and we can get two sequences of C1, C2, shown as follows:(10)C1=c11,c12,…,c1MN/2,C2=c21,c22,…,c2MN/2.Step 10.
Confirm the values of the initial conditionsx20, y20, z20, h20, k20 and iterate the hyperchaotic system for a suitable times by Runge-Kutta algorithm. Four hyperchaotic sequences {x2i}, {y2i}, {z2i}, and {h2i} will be generated, respectively.Step 11.
Transform the four hyperchaotic sequences{x2i}, {y2i}, {z2i}, and {h2i} into integer sequences wi∗, w can be replaced by x2, y2, z2, and h2.(11)wi∗=floor10kwimod⁡256,where mod returns the remainder after division.Step 12.
TookMN/2 successive elements of sequences {x2i∗}, {y2i∗}, {z2i∗}, and {h2i∗}, respectively. And we can get four new sequences D1, D2, D3, and D4.(12)D1=d11,d12,…,d1MN/2,D2=d21,d22,…,d2MN/2,D3=d31,d32,…,d3MN/2,D4=d41,d42,…,d4MN/2.Step 13.
Perform pixel value diffusion according to (14), and we can get H1 and H2.(13)H1=h11,h12,…,h1MN/2,H2=h21,h22,…,h2MN/2,where(14)h1i=c1i+c1i-1+c2i-1+h1i-1+h2i-1+d1imod⁡256⊕d2i,h2i=c2i+c2i-1+c1i-1+h1i-1+h2i-1+d3imod⁡256⊕d4i.Here i=1,2,…,MN/2 and initial values c10, c20, h10, and h20 are keys. The symbol ⊕ represents the exclusive OR operation bit-by-bit.Step 14.
Reshape the sequencesH1, H2 and obtain the two matrices E1, E2 with the size M×(N/2).(15)E1=H1255×max⁡B-min⁡B+min⁡B,(16)E2=H2255×max⁡B-min⁡B+min⁡B.In the encryption process,E=[E1,E2] is saved for encrypted image. In the decryption process, the encrypted image is first performed by the inverse diffusion process, and then original image information is reconstructed approximately via OMP algorithm after the decryption of double random-phase encoding.


## 4. Numerical Simulation and Analysis

We illustrate the performance of the proposed image encryption algorithm by means of a series of numerical simulations. In the numerical simulations, the gray image “Lena” and “Cameraman” with 256  ×  256 pixels, shown in Figures2(a) and 2(d) serve as the test images of the image encryption scheme combining CS with DRPE. Ψ is designed 256  ×  256, 2D wavelet transform matrix which has the same size with image “Lena” and “Cameraman”, and Φ is an 192  ×  256 measurement matrix. Therefore, the size of the ciphered image is 192×256. For convenience, the encryption key 1 (x10,y10,z10,h10,k10) and key 2 (x20,y20,z20,h20,k20) are fixed at (1,0.1,1.3,4,0.2) and (0.4,2.1,0.3,0.4,0.6), respectively. And they are also the decryption keys. The encrypted “Lena” and “Cameraman” are shown in Figures 2(b) and 2(e). The decrypted image with the correct keys are shown in Figures 2(c) and 2(f).Figure 2
Results of encryption and decryption process.
(a) (b) (c) (d) (e) (f)In order to verify the results of the investigation, the peak signal-to-noise ratio (PSNR) between the original image and decryption image is used for measuring the quality of decrypted digital image as described:(17)PSNR=10log⁡25521/N2∑i=1N∑j=1NRi,j-Ii,j2,where R(i,j) and I(i,j) denote the values of reconstructed image and original image at pixel (i,j), respectively. The experimental result demonstrates that the quality of the decrypted image is very good and the PSNR is 30.84 dB. From Table 1, the quality of the decrypted image is acceptable for different compression ratios, it means that the compression ability of the proposed algorithm is very well.Table 1
The results of different compression ratios.
Compression ration Compressed and encrypted image Decrypted image PSNR (dB) 4 : 3   30.84 2 : 1   26.19 4 : 3   27.93 2 : 1   24.23


### 4.1. Statistical Analysis Attack

We test the statistical analysis of the proposed image encryption scheme from the histograms of the encrypted images of different images and the correlations of adjacent pixels of the original image and its corresponding encrypted image.The histograms of “Lena” and “Cameraman” are shown in Figures3(a) and 3(c), respectively, while Figures 3(b) and 3(d) display the histograms of their corresponding encrypted images, respectively. Although the two images are markedly different, the histograms of their encrypted images are very similar. In general, an effective and safe image encryption algorithm should make the encrypted images corresponding to different original images have similar histograms. In other words, the attacker cannot get any useful information by analyzing the histograms of the encrypted images. Therefore, the proposed algorithm is effectively resistant to the basic statistical analysis attack.Figure 3
Histograms: (a) “Lena”; (b) encrypted “Lena”; (c) “Cameraman”; (d) encrypted “Cameraman”.
(a) (b) (c) (d)The correlation coefficientCxy of any two adjacent pixels is calculated as follows:(18)Cxy=∑i=1Nxi-x¯yi-y¯∑i=1Nxi-x¯2∑i=1Nyi-y¯2,where x¯=(1/N)∑i=1Nxi and y¯=(1/N)∑i=1Nyi. The correlation coefficients of the proposed algorithm and the algorithm in [21] are compiled in Table 2, which indicated that the proposed algorithm possesses better property than the algorithm in [21]. Figures 4(a)–4(d) show the correlation distribution of two vertically adjacent pixels in the original “Lena,” the encrypted “Lena,” the original “Cameraman,” and the encrypted “Cameraman,” respectively. The adjacent pixels of the original in each direction are tightly correlated and the correlation coefficients are all greater than 0.92 in each direction, while the correlation of the encrypted image is almost smaller than 0.004 in each direction.Table 2
Correlation coefficients of adjacent pixels.
Algorithm Image Horizontal Vertical Diagonal Lena 0.9663 0.9491 0.9250 Proposed algorithm [21] Encrypted Lena 0.0005 −0.0013 −0.0011 Encrypted Lena 0.0198 0.0141 0.0026  Cameraman 0.9592 0.9227 0.9272 Proposed algorithm [21] Encrypted Cameraman 0.0017 0.0021 −0.0038 Encrypted Cameraman 0.0128 0.0061 0.0057Figure 4
Correlation distribution of two vertically adjacent pixels: (a) “Lena”; (b) encrypted “Lena”; (c) “Cameraman”; (d) encrypted “Cameraman”.
(a) (b) (c) (d)


### 4.2. Key Space and Sensitivity Analysis

It is generally known that an effective encryption algorithm should be still secure even if the eavesdroppers know everything except the key. It requires that the key space should be large enough to resist brute-force attacks. In this proposed algorithm,x10, y10, z10, h10, k10, x20, y20, z20, h20, and k20 are used as main keys. Here, the key space is calculated for x10 to generate two different sequences x and x′ by using x10 and x10+∆x10 as initial values and both sequences are of length N; define mean absolute error between the two sequences as [26](19)MANx,x′=1N∑x-x′.The key space of x10 is equal to 1/∆0, where ∆0 is the value of ∆x10 for MAE=0. The simulation results show that ∆0 comes out to be 10-15; that is, the key space of x10 is 1015, and so are y10, z10, h10, x20, y20, z20, and h20. Similarly, the key space of k10 and k20 is about 1016. Thus, the total key space is 10152, which is large enough to withstand the brute-force attack.As is well known, a good image encryption algorithm should be sensitive to the keys, which means that a tiny change in the keys would lead to a great distortion in the decrypted images visually. So in order to measure the differences of two image, the mean square error (MSE) is employed here. The MSE between decrypted image and original image is defined as follows [12]:(20)MSE=1MN∑i=1M∑j=1NIi,j-Hi,j2,where N and M are the sizes of the images and I(i,j) and H(i,j) denote the values of the original and the decrypted image of the pixel (i,j), respectively. To analyze the key sensitivity, eleven groups of keys are used to decrypt the encrypted “Lena,” and the calculated MSE values between the original “Lena” and its corresponding decrypted “Lena” are shown in Table 3. It is noted from Table 3 that the MSE is very large with deviation 10-15 to one parameter of (x10,y10,z10,h10,k10,x20,y20,z20,h10,k20), and the MSE is small only when the keys are correct. In other words, the decrypted image can be recognized only when the keys are correct; that is, the proposed scheme is very sensitive to the keys. The simulation results of five sets of keys are shown in Figures 2(c) and 5. Figure 2(b) is the decrypted image with the correct keys. Figure 5 shows the decrypted “Lena” with the incorrect keys deviated 10-15 from one parameter of (x10,k10,x20,k20), respectively.Table 3
The values of MSE between the original “Lena” and its corresponding decrypted “Lena.”
Correct keys Incorrectx10 Incorrecty10 Incorrectz10 Incorrecth10 Incorrectk10  MSE 53.6 2.65 × 1 0 4 2.59 × 1 0 4 2.39 × 1 0 4 2.49 × 1 0 4 2.34 × 1 0 4  Incorrectx20 Incorrecty20 Incorrectz20 Incorrecth20 Incorrectk20  MSE 6.65 × 1 0 4 6.83 × 1 0 4 6.95 × 1 0 4 6.67 × 1 0 4 6.72 × 1 0 4Figure 5
Decrypted “Lena” with (a) incorrect independent parameterx10; (b) incorrect decryption key k10; (c) incorrect decryption key x20; (d) incorrect decryption key k20.
(a) (b) (c) (d)


### 4.3. Differential Analysis

We have also measured the number of pixels change rate (NPCR) to see the influence of changing a single pixel in the original image on the encrypted image by the proposed algorithm. The NPCR measures the percentage of different pixel numbers between the two images. We take two encrypted images,C1 and C2, whose corresponding original images have only one-pixel difference, respectively. We define a two-dimensional array D, having the same size as the image C1 or C2. Then, D(i,j) is determined by C1(i,j) and C2(i,j); namely, if C1(i,j)=C2(i,j), then D(i,j)=1; otherwise, D(i,j)=0. The NPCR is evaluated by the following equation [2]:(21)NPCR=∑i,jDi,jN×M×100%,where N and M are the width and height of C1 or C2.In the proposed scheme, a small difference in the plain image can affect the whole cipher image. The percentage of pixel changed in the cipher image is 100% even with a one-bit difference in the plain image (here, we randomly choose a pixel at position (146,12)), Figure 6(a) shows the cipher image corresponding to only one-pixel difference in the original “Lena”, and the difference image between Figures 2(b) and 6(a) is shown in Figure 6(b). Thus, the proposed encryption scheme is able to resist the differential attack.Figure 6
The cipher image corresponding only one-pixel difference in the original “Lena” and difference image.
(a) (b)


## 4.1. Statistical Analysis Attack

We test the statistical analysis of the proposed image encryption scheme from the histograms of the encrypted images of different images and the correlations of adjacent pixels of the original image and its corresponding encrypted image.The histograms of “Lena” and “Cameraman” are shown in Figures3(a) and 3(c), respectively, while Figures 3(b) and 3(d) display the histograms of their corresponding encrypted images, respectively. Although the two images are markedly different, the histograms of their encrypted images are very similar. In general, an effective and safe image encryption algorithm should make the encrypted images corresponding to different original images have similar histograms. In other words, the attacker cannot get any useful information by analyzing the histograms of the encrypted images. Therefore, the proposed algorithm is effectively resistant to the basic statistical analysis attack.Figure 3
Histograms: (a) “Lena”; (b) encrypted “Lena”; (c) “Cameraman”; (d) encrypted “Cameraman”.
(a) (b) (c) (d)The correlation coefficientCxy of any two adjacent pixels is calculated as follows:(18)Cxy=∑i=1Nxi-x¯yi-y¯∑i=1Nxi-x¯2∑i=1Nyi-y¯2,where x¯=(1/N)∑i=1Nxi and y¯=(1/N)∑i=1Nyi. The correlation coefficients of the proposed algorithm and the algorithm in [21] are compiled in Table 2, which indicated that the proposed algorithm possesses better property than the algorithm in [21]. Figures 4(a)–4(d) show the correlation distribution of two vertically adjacent pixels in the original “Lena,” the encrypted “Lena,” the original “Cameraman,” and the encrypted “Cameraman,” respectively. The adjacent pixels of the original in each direction are tightly correlated and the correlation coefficients are all greater than 0.92 in each direction, while the correlation of the encrypted image is almost smaller than 0.004 in each direction.Table 2
Correlation coefficients of adjacent pixels.
Algorithm Image Horizontal Vertical Diagonal Lena 0.9663 0.9491 0.9250 Proposed algorithm [21] Encrypted Lena 0.0005 −0.0013 −0.0011 Encrypted Lena 0.0198 0.0141 0.0026  Cameraman 0.9592 0.9227 0.9272 Proposed algorithm [21] Encrypted Cameraman 0.0017 0.0021 −0.0038 Encrypted Cameraman 0.0128 0.0061 0.0057Figure 4
Correlation distribution of two vertically adjacent pixels: (a) “Lena”; (b) encrypted “Lena”; (c) “Cameraman”; (d) encrypted “Cameraman”.
(a) (b) (c) (d)


## 4.2. Key Space and Sensitivity Analysis

It is generally known that an effective encryption algorithm should be still secure even if the eavesdroppers know everything except the key. It requires that the key space should be large enough to resist brute-force attacks. In this proposed algorithm,x10, y10, z10, h10, k10, x20, y20, z20, h20, and k20 are used as main keys. Here, the key space is calculated for x10 to generate two different sequences x and x′ by using x10 and x10+∆x10 as initial values and both sequences are of length N; define mean absolute error between the two sequences as [26](19)MANx,x′=1N∑x-x′.The key space of x10 is equal to 1/∆0, where ∆0 is the value of ∆x10 for MAE=0. The simulation results show that ∆0 comes out to be 10-15; that is, the key space of x10 is 1015, and so are y10, z10, h10, x20, y20, z20, and h20. Similarly, the key space of k10 and k20 is about 1016. Thus, the total key space is 10152, which is large enough to withstand the brute-force attack.As is well known, a good image encryption algorithm should be sensitive to the keys, which means that a tiny change in the keys would lead to a great distortion in the decrypted images visually. So in order to measure the differences of two image, the mean square error (MSE) is employed here. The MSE between decrypted image and original image is defined as follows [12]:(20)MSE=1MN∑i=1M∑j=1NIi,j-Hi,j2,where N and M are the sizes of the images and I(i,j) and H(i,j) denote the values of the original and the decrypted image of the pixel (i,j), respectively. To analyze the key sensitivity, eleven groups of keys are used to decrypt the encrypted “Lena,” and the calculated MSE values between the original “Lena” and its corresponding decrypted “Lena” are shown in Table 3. It is noted from Table 3 that the MSE is very large with deviation 10-15 to one parameter of (x10,y10,z10,h10,k10,x20,y20,z20,h10,k20), and the MSE is small only when the keys are correct. In other words, the decrypted image can be recognized only when the keys are correct; that is, the proposed scheme is very sensitive to the keys. The simulation results of five sets of keys are shown in Figures 2(c) and 5. Figure 2(b) is the decrypted image with the correct keys. Figure 5 shows the decrypted “Lena” with the incorrect keys deviated 10-15 from one parameter of (x10,k10,x20,k20), respectively.Table 3
The values of MSE between the original “Lena” and its corresponding decrypted “Lena.”
Correct keys Incorrectx10 Incorrecty10 Incorrectz10 Incorrecth10 Incorrectk10  MSE 53.6 2.65 × 1 0 4 2.59 × 1 0 4 2.39 × 1 0 4 2.49 × 1 0 4 2.34 × 1 0 4  Incorrectx20 Incorrecty20 Incorrectz20 Incorrecth20 Incorrectk20  MSE 6.65 × 1 0 4 6.83 × 1 0 4 6.95 × 1 0 4 6.67 × 1 0 4 6.72 × 1 0 4Figure 5
Decrypted “Lena” with (a) incorrect independent parameterx10; (b) incorrect decryption key k10; (c) incorrect decryption key x20; (d) incorrect decryption key k20.
(a) (b) (c) (d)


## 4.3. Differential Analysis

We have also measured the number of pixels change rate (NPCR) to see the influence of changing a single pixel in the original image on the encrypted image by the proposed algorithm. The NPCR measures the percentage of different pixel numbers between the two images. We take two encrypted images,C1 and C2, whose corresponding original images have only one-pixel difference, respectively. We define a two-dimensional array D, having the same size as the image C1 or C2. Then, D(i,j) is determined by C1(i,j) and C2(i,j); namely, if C1(i,j)=C2(i,j), then D(i,j)=1; otherwise, D(i,j)=0. The NPCR is evaluated by the following equation [2]:(21)NPCR=∑i,jDi,jN×M×100%,where N and M are the width and height of C1 or C2.In the proposed scheme, a small difference in the plain image can affect the whole cipher image. The percentage of pixel changed in the cipher image is 100% even with a one-bit difference in the plain image (here, we randomly choose a pixel at position (146,12)), Figure 6(a) shows the cipher image corresponding to only one-pixel difference in the original “Lena”, and the difference image between Figures 2(b) and 6(a) is shown in Figure 6(b). Thus, the proposed encryption scheme is able to resist the differential attack.Figure 6
The cipher image corresponding only one-pixel difference in the original “Lena” and difference image.
(a) (b)


## 5. Conclusion

A new image compression-encryption algorithm combining compressive sensing with double random-phase encoding is proposed. We utilize the characteristics of the CS theory to cutdown the size of the original image proportionally in the encryption process. Then, the transformed image information can be reencrypted by DRPE technique where the random-phase masks are generated by the hyperchaotic system. Lastly, the resulting image is confused and diffused by using hyperchaotic system simultaneously. The simulation results indicate that the proposed scheme can resist statistical analysis, brute-force attack, and differential attack due to its considerably large key space.



---

*Source: 6764052-2018-04-03.xml*