1. Introduction
Under the background of the rapid development of data network and information technology, the application of image is increasingly extensive. Image encryption is one of the common means to protect image information [
1]. The classical cryptographic encryption algorithms, including DES(Data Encryption Standard) and AES(Advanced Encryption Standard),mainly deal with text information, and the processing efficiency is not high. Traditional encryption algorithms cannot achieve efficient encryption of images.
In recent years, many image encryption schemes have been proposed successively, such as chaos theory [
2,
3,
4,
5], the DNA method [
6,
7,
8,
9], cellular automata [
10,
11,
12,
13] and so on. The article published by Fridrich in 1997 used chaos theory for the first time [
14]. He designed an image-encryption algorithm and constructed a classical scrambling-diffusion image encryption framework. Chaos can be divided into two categories: high-dimensional chaos and one-dimensional chaos [
15]. A one-dimensional chaotic system is a simple function with a low computational cost.
Due to its simplicity and efficiency, these have been used in various encryption algorithms [
16,
17,
18]. However, they have the disadvantages of a small key space, single parameter and weak randomness of the generated chaotic sequence [
19,
20]. The high-dimensional chaotic structure is complex and is more sensitive to the initial values and parameters. However, it is difficult to implement software and hardware due to its complex structure and huge iterative calculation amount [
21]. Therefore, the algorithm in this paper mainly uses a one-dimensional chaotic system to ensure the efficiency of encryption.
At first, scholars made efforts in the design of image-encryption algorithms based on one-dimensional chaotic systems. For example, in 2012, Wang et al. proposed a chaotic image encryption scheme, in which only the classical Logistic system was used to scramble and diffuse images [
22]. In the following year, Arroyo successfully cracked the scheme of Wang by choosing plaintext attack [
23]. It is shown that this method of scrambling and diffusing images with a one-dimensional chaotic system has a small key space and low sensitivity of plaintext.
In recent years, people have begun to use treatments on one-dimensional chaotic systems to improve the chaotic performance. PakC et al. used the difference between the one-dimensional chaotic map output sequence and its rounded and amplified output sequence to construct a new system with better performance and a wider chaotic range [
24]. In 2018, Lan et al. used three one-dimensional chaotic maps to construct two more chaotic integrated chaotic systems and performed cascade, nonlinear combination and switching operations [
25].
In the same year, Parvaz et al. combined Logistic, Sine and Tent chaotic maps to construct a combined chaotic system to perform multiple rounds of cyclic shift encryption on images [
26]. This method of combining multiple one-dimensional chaotic systems to form a new chaotic system not only improves the performance of the original chaotic system but also ensures the operation efficiency.
Image information faces the dual pressures of security and resource constraints during storage and transmission. The theory of compressed sensing (CS) [
27] realizes the simultaneous encryption and compression of the image and reconstructs the signal through the convex optimization solution process. Many scholars have implemented image encryption using compressed sensing [
28,
29,
30,
31].
It should be indicated that, when using compressed sensing to encrypt an image, in essence, the measurement matrix is used as the encryption key, and the corresponding measurement result is used as the ciphertext. This is essentially a linear measurement process so that it cannot resist known-plaintext attacks and chosen-plaintext attacks. It is necessary to combine compressed sensing with traditional diffusion encryption algorithms to ensure sufficient security of the encryption scheme [
32]. By further improving the sparse basis, measurement matrix and reconstruction algorithm in compressed sensing theory, the quality of the restored image under the same compression rate can be effectively improved.
This paper uses a one-dimensional chaotic map to generate a measurement matrix for compressed sensing. The ZUC cryptosystem [
33] is introduced to improve the shortcomings of the one-dimensional chaotic system, which has a small key space and insufficient randomness.The algorithm adopts parallel compressed sensing technology as a whole. First, the sparse coefficient matrix of the image is obtained by discrete wavelet transform, and then it is randomly divided into blocks. Then, we set the initial chaotic value and use the one-dimensional Sine–Tent–Logistic (STL) chaotic map to iteratively generate the chaotic sequence.We use the ZUC stream cipher system to sample the STL sequence to obtain a new chaotic sequence.
In the compressed sensing stage, the new chaotic sequence is used to construct the compressed sensing measurement matrix and parallel compressed sensing processing is performed on the divided matrix. Finally, subsequent scrambling and diffusion operations are performed on the compressed matrix. The image is reconstructed using the Orthogonal Matching Pursuit (OMP) algorithm at the decryption stage.
The main contributions of this algorithm are:
(1) Randomly partition the sparse coefficient matrix of the image to reduce the pixel correlation of the image. (2) Use the chaotic initial value as the key for encryption and decryption to avoid the waste of resources caused by transmitting the entire measurement matrix. (3) After the image is divided into blocks and encrypted in parallel, the time required for image encryption can be reduced, and the encryption efficiency can be improved. (4) Using the ZUC stream cipher system to sample the one-dimensional chaotic sequence, the randomness of the one-dimensional chaotic system is improved, and the key space is enlarged.
The remainder of this article is as follows.
Section 2 introduces the fundamental knowledge involved in the proposed encryption algorithm, mainly including compressed sensing, STL chaotic map and ZUC stream cipher.
Section 3 introduces the sampling method of a one-dimensional chaotic system and the effect after sampling. A image random block method is also proposed in this section.
Section 4 summarizes the specific details of the proposed encryption scheme.
Section 5 presents the simulation results of the algorithm and analyzes its performance.
Section 6 presents our conclusions and summarizes the full text.
2. Fundamental Knowledge and Related Technologies
This section mainly introduces the basic theories and techniques involved in the proposed algorithm, including the compressed sensing technology, STL chaotic map and ZUC stream cipher system. The main purpose of this section is to facilitate the description of the encryption schemes that follow.
2.1. Parallel Compressed Sensing
CS breaks through the limitation of the traditional Nyquist sampling theorem. Parallel compression sensing technology [
34] is divided into compression measurement and reconstruction. Signal compression is achieved through linear measurement, and signal reconstruction is achieved through sparse prior characteristics of signals. Divide an image of size
into
K sub-blocks
of size
,
. Represented as follows:
where
is a sparse basis matrix. The block operation can perform the process of image compression measurement, and reconstruction can be performed in parallel, which can reduce the image processing time. The image is measured in columns, and the measurement process can be expressed as:
where
is the measurement matrix of size
.
, and
r is the compression ratio. The measured value of the whole image can be expressed as:
In the process of image restoration, the sparse sparse matrix of the original image can be recovered by solving the L1 norm problem as long as it meets the requirements of
and
is not relevant. In the process of image restoration, the complicated operation of inverting the matrix is avoided. This process can be described as follows:
Commonly used measurement matrices include the Gaussian random matrix, partial Adama matrix and measurement matrix constructed by a chaotic sequence, etc., [
35]. There are two reconstruction methods of compressed sensing [
36]. One is to seek a minimum
norm based on a greedy iterative algorithm, including matching pursuit (MP), orthogonal matching pursuit (OMP), etc. The other is a convex optimization algorithm to find the
norm, including the base tracking method, gradient projection method, etc. In the proposed scheme, the OMP algorithm is used to reconstruct the image.
2.2. STL Chaotic Map
Zhou proposed a method of a cascading Tent and Logistic chaotic system to improve the performance of a one-dimensional chaotic system [
37]. On this basis, Pounma et al. proposed STL (Sine–Tent–Logistic) chaotic system. This is a one-dimensional system combining the above three chaotic systems [
38]. The Sine map, Tent map and Logistic map are shown in (
5).
where
,
and
are chaotic parameters. The steps of constructing the STL system are as follows:
(1) Fusion: Since Tent mapping shows highly chaotic behavior when the parameters are controlled, the control parameter is fixed, and the Logistic and Tent seed mappings are fused to generate a new mapping;
(2) Cascading: Use the Sine mapping and the mapping generated in Step (1) to perform cascading. As the Sine mapping shows highly chaotic behavior, the control parameter of the Sine mapping in the cascading step is set to 1.
Figure 1 shows the STL map structure. The fusion operation combines Tent and Logistic seed maps in a nonlinear way.
was input to the two seed maps, and we add their outputs. The cascade calculation connects Sine mapping with Tent and Logistic mapping and finally obtains
.
The specific mathematical representation of the STL system [
38] is shown in (6).
Figure 2 for the bifurcation diagram of the STL chaos mapping shows that the STL map produced by the chaos and chaotic sequence is highly uniform in distribution.
The traditional three one-dimensional chaotic maps can only keep the chaotic properties within a very small range of control coefficients, while the STL map can stably remain pseudo random in the whole range. The comparison shows that STL maps have better random performance than other maps. In this algorithm, the STL chaotic map is combined with a ZUC stream cipher to enhance its security.
2.3. ZUC Stream Cipher
ZUC [
39] is a stream cipher named after the Chinese mathematician ZU Chongzhi. It has a series of advantages, such as fast generation of a key stream, a low propagation error rate and easy realization of the hardware circuit. Research proved that the ZUC algorithm has high security and can resist many typical attacks against sequence ciphers. The overall structure of the ZUC algorithm consists of three parts as shown in
Figure 3. The input of the ZUC-256 algorithm is a 256-bit initial key(
K) and 184-bit initial vector(
). The 32-bit key stream data are generated every cycle.
The specific process is as follows:
(1) Initialization stage: it is necessary to enter the preparation stage before key abortion. The process of sending
and
K into the system is called key loading. In this process,
K and
are split according to certain rules and spliced together with a set of fixed arrays. Then, start 32 rounds of initialization operations, which can be expressed as:
where
indicates that the high 31 bits of
W are fed back into the register.
(2) Preparatory work stage: there is no external input in the system at this stage. The difference between the working state and the initialization stage is that LFSR needs to enter the working mode for one iteration; however, the output is abandoned.
(3) Working stage: also called the key stream generation stage. In this stage, the output
W generated by the nonlinear function and the XOR of the Bit Recombination layer are output as the key stream. The specific operation steps are shown in (
8).
4. The Encryption and Decryption Scheme
As a whole, the algorithm in this chapter divides the image into blocks first and then performs parallel compressed sensing. The chaotic sequences used are all sequences sampled by the ZUC system, and the encryption process is shown in
Figure 7.
Step 1: Set the initial vector and initial key of the ZUC stream cipher and run the ZUC system to obtain the binary sequence .
Step 2: The discrete wavelet transform (DWT) is used to obtain the image sparse coefficient matrix with a size of
. Then, set the initial chaotic value
and divide the coefficient matrix into eight blocks
with a size of
using the random block method proposed in
Section 3.2.
,
. Eight initial chaotic values are obtained according to (
11).
where
is the ZUC sequence with 8-bit length.
.
Step 3: Set the compression ratio of compression sensing as
r. According to the chaos initial value calculated above, the chaotic sequence is iterated and sampled by ZUC flow cipher. Eight sequences of length
m are obtained to construct the measurement matrix of compressed sensing, which is normalized according to (
12):
The measurement matrix is constituted as follows:
where
is the number of rows of the measurement matrix.
Step 4: Perform compression sensing measurement on block images as shown in (
14) to obtain the compression matrix
and map it to the interval [0, 255] in accordance with (
15) to facilitate subsequent diffusion operations and obtain the compressed image
.
The measurement matrix is constituted as follows:
Step 5: The compressed image blocks are, respectively, encrypted within the block and encrypted as a whole. The initial values and are set, and the chaotic sequences are iterated, respectively. Both sequences are sampled by ZUC to obtain and . is used to diffuse and scramble the block image. Then, the image blocks are reassembled, and is used to carry out the whole diffusion and scrambling operation again in order to avoid the block effect.
The decryption process of this algorithm is shown in
Figure 8.
(1) The decryption process of this algorithm is the reverse process of encryption. The receiver first performs inverse diffusion and scrambling on the encrypted image according to the key to obtain the compressed image.
(2) Inverse mapping of the compressed image according to (
16). Then, eight measurement matrices are constructed according to the key, and each image block is reconstructed. In this paper, the OMP algorithm is chosen as the reconstruction algorithm.
(3) Finally, the sparse coefficient matrix of the image is obtained by re-partitioning the image. The original image can be obtained by inverse DWT.
This algorithm is suitable for both grayscale and color images. When encrypting a color image, it only needs to be decomposed into the three components of RGB. When preparing the chaotic sequence required for encryption, the sequence length can be three times the original.
5. Simulation Results and Performance Analysis
This section will simulate the performance of the proposed algorithm and analyze the results. Experiments are conducted on MATLAB R2014a in a computer with Intel Core i5 2.6 GHz and 8 GB RAM. In this algorithm, compressive sensing is used to realize image compression, and the measurement matrix consists of STL chaotic sequences sampled by the ZUC system. In the decryption process, the OMP algorithm is used to reconstruct the image. The initial key and initial value vector of the ZUC system are all zero. Set the control parameter of chaotic system , initial value and compression ratio .
Figure 9 shows the encryption and decryption results of color images and grayscale images. It can be seen from the image in the second line that the size of the image processed by the algorithm is compressed. The encrypted image is similar to the noise image, and the information of the original image cannot be observed subjectively. It can be seen from the decrypted image in the third row that the algorithm achieves good reconstruction of the image.
5.1. Histogram Analysis
As the original image contains certain information, the values of some pixels will be close to or even the same. The gray histogram will be uneven and will contain certain statistical information. For a good encryption algorithm to resist statistical analysis, the image pixels should be evenly spread through the gray range [0, 255].
Figure 10 shows the histograms of the original, encrypted and decrypted images for the R, G and B components of the color Lena image.
Figure 11 shows the histograms of the two grayscale images before and after encryption. It can be seen that the number of pixels at each gray value in the encrypted image is basically the same in the interval [0,255], and thus the stealer cannot obtain the original image through the statistical information of the encrypted image.
As compressed sensing is a lossy compression technology; some details contained in the original image are lost in the reconstruction process, and the reconstructed image is not completely consistent with the original image histogram. It can be seen from the above histogram that several peak values of the histogram reconstructed for Lena are reduced, and the histogram becomes flat by comparing the first and third rows in the diagram. However, it can be seen in
Figure 9 that the reconstruction of the decrypted image is still successfully achieved intuitively according to the analysis.
5.2. Pixel Correlation Analysis
The correlation distribution of the original adjacent pixels is shown in
Figure 12a. It can be seen that the values of adjacent pixels are very similar with strong correlations no matter in which direction. The evenly distributed pixels of the encrypted image in
Figure 12b indicate that the pixels of the ciphertext image have been scrambled. The encryption requirements are met from the perspective of pixel correlation.
We calculated the correlation coefficient of adjacent pixels of the encrypted image and compared it with other algorithms that use compressed sensing technology to achieve image encryption. The results are shown in
Table 2. The correlation of adjacent pixels in the image processed by the algorithm in this paper is lower than that of the other two algorithms in the horizontal and vertical directions, and the pixel correlation is generally lower than the other two algorithms. The pixel confusion effect of this algorithm is better, the security is higher, and the ability to resist malicious analysis is stronger.
5.3. Information Entropy Analysis
Information entropy can calculate the uniformity of gray distribution by measuring the probability of gray appearance. The calculation formula is:
where
m is the grayscale set of image pixels.
is the probability of
occurring.
n is the total number of
.
In order to explore the information entropy of the image encrypted by this algorithm and the influence of the compression rate on the information entropy value,
Table 3 shows the information entropy of three different encrypted images and calculates them by changing the compression rates. It can be seen that the encrypted images with different compression rates maintain high entropy, and the uniformity of the gray distribution is not affected by the compression operation, indicating that the algorithm can resist information entropy attacks.
5.4. Key Sensitivity Analysis
The key sensitivity in this section is analyzed from two aspects. On the one hand, the encryption key is slightly changed, and the changes of the encrypted image before and after the change are observed. On the other hand, in the decryption process, we make a slight adjustment on the basis of the correct key, use the wrong key to decrypt and observe whether the decryption can be correct. During the encryption process, the encryption key
is slightly changed (order of magnitude
). The encrypted images before and after the key change and the difference images of the two images are shown in
Figure 13.
In order to quantify the difference degree of the encrypted image before and after the key change, the mean structural similarity (MSSIM) of the two images is calculated. The smaller the MSSIM value is, the greater the influence of key changes on the encryption result is, and the higher the encryption key sensitivity of the algorithm is. The calculation formula is shown in (
18).
where
,
,
and
are the mean and variance of
x and
y, respectively.
is the covariance of Windows
x and
y.
N is the total number of Windows for the image.
and
. The MSSIM of
Figure 13b,c was calculated as
. The Hamming distance is used in data transmission error control coding, which indicates the number of different characters in the corresponding positions of two strings of the same length. We converted the two images into binary vectors, and the calculated Hamming distance was 0.4999. Different encryption results were obtained when the key was infinitesimally changed. The algorithm has good encryption key sensitivity.
The decryption key sensitivity of the algorithm is analyzed below. In the decryption stage, a small disturbance is added on the basis of the correct decryption key to obtain a new encrypted image.
Figure 14 shows the wrong decrypted images after making some slight changes in the decryption key. It can be seen that, even if there is such a small deviation of the key used in encryption and decryption, the decryption result is still completely wrong. The proposed algorithm is highly sensitive regarding the decryption key.
5.5. Key Space Analysis
The contents of the key in this algorithm include 10 chaotic initial values, the initial vector and the initial key of the ZUC system. The calculation accuracy is according to the IEEE745 standard. The key space is . This algorithm expands the key space by introducing the ZUC stream cipher.
Table 4 shows that the key space of this algorithm is much larger than that of the other five algorithms. The stronger the resistance of this scheme to exhaustive analysis, the higher the security.
5.6. Differential Attack Analysis
Avalanche effect analysis studies the impact of changes in the input information of encrypted images. There are two important indicators: the pixel number change rate (NPCR) and the unified average intensity change (UACI). Inputting different plaintext images and calculating the NPCR can quantify the number of pixels that have been changed, and UACI is biased towards calculating the intensity of the changes in pixel values at corresponding positions. The calculation formulas are as follows:
where
is a normal encrypted image, and
is an encrypted image after changing a pixel in the original image.
when the pixel values of the two images are the same, otherwise
. A pixel value in the original image was randomly changed, and the values of NPCR and UACI before and after the change were calculated as shown in
Table 5.
Compared with [
40,
41,
42,
44], the values of NPCR and UACI are closer to the expected values. Our algorithm is more sensitive to small changes in the original image. A random pixel change in the plaintext image makes the encrypted image a completely different image when compared with the original one. The algorithm has good performance in resisting differential attacks.
5.7. Analysis of the Reconstruction Effect
The compressed sensing operation loses image information to a certain extent. The reconstruction effect of quantified images can be calculated by calculating the peak signal-to-noise ratio (PSNR). The mean square error (MSE) of the original image and the reconstructed image is regarded as a noise signal, and the PSNR is the ratio of the maximum possible power to the mean square error of the two images. The formula is as follows:
In order to verify the effect of the ZUC stream cipher on the image reconstruction effect of the chaotic sequence sampling operation, the decrypted image obtained is directly reconstructed without the mapping step of the compressed matrix. The original chaotic sequence and the sampled chaotic sequence are used to construct the measurement matrix of compressed sensing, and the PSNR and MSSIM of the reconstructed image and the original image are compared.
In
Table 6, using the chaotic sequence sampled by the ZUC stream cipher to construct the measurement matrix can not only make the chaotic sequence more difficult to predict but also improve the image reconstruction effect to a certain extent.
The following image encryption is performed according to the algorithm proposed in this paper. We used multiple images with a size of
for encryption and decryption to calculate the PSNR of the original image and the decrypted image. It can be seen in
Table 7 that the PSNR of the image is above 27dB, and the MMSIM is above 0.84.
Then, the original image is replaced with an image of size
, which is compressed and reconstructed.
Table 8 shows the PSNR of different decrypted images, which are compared with [
40,
41,
44]. It can be seen by comparison that the PSNR value of the algorithm in this paper is relatively high. The reconstruction effect of this algorithm is good, and the distortion caused by encryption and decryption is small.
In order to compare the effect of the compression ratio on the image reconstruction effect, the PSNR under different compression ratios was obtained and compared with [
43].
Figure 15 shows that the proposed algorithm has a better image reconstruction effect when the compression ratio is less than 0.8. It shows that the algorithm can compress the image into a smaller image and achieve good reconstruction.
5.8. Analysis of Encryption and Decryption Efficiency
In the evaluation of encryption algorithms, security and efficiency are two important indicators. The security of this algorithm has been explained in several aspects. For images of different sizes, the encryption times required by this algorithm are shown
Figure 16. The encryption time required by this algorithm is largely less than that [
40], which is very close to the time required by [
43]. When the image size is less than
, the encryption time is less than 0.6 s. The comparison results of the encryption time and decryption time are shown in
Table 9. Compared with [
41], this algorithm spends less time in the decryption phase.
It can be seen from the comparison that, since the algorithm adopts the block-parallel compressed sensing method to process the image, the encryption and decryption time is less. Even if the ZUC algorithm is introduced, some elements in the chaotic sequence need to be lost in the sampling process; however, there is no obvious loss of efficiency.