1. Introduction
Nowadays, digital images are becoming one of the most important data formats in our daily life. The risk of information leakage is inevitable when we share photos with others on the social network platform. Therefore, the security of digital images attracts a great of scholars’ attention.
The image encryption is an important method in image security. Many text structure encryption schemes, such as advanced encryption standard (AES), data encryption standard (DES), etc., have poor performance on image encryption. These schemes cannot break the correlation among adjacent pixels that may leak some geometric distribution of plain image. Image data are different from text data, which have some specific features, so the image encryption scheme must be designed according to these characteristics. At the beginning, the researchers used some special transformation matrixes, such as magic cube transformation, Arnold cat map, etc., in order to permutate the plain image without under security keys controlling. However, they are against Kerckhoffs’s principle, which requires the cryptosystem to be a white box, except for security keys.
Chaos theory as a cornerstone of nonlinear dynamic that is wildly used in many fields was first proposed by Lorenz [
1]. The chaotic system has many good characteristics, such as randomness, ergodicity, sensitivity to initial values, and parameters [
2], so it is suitable for the design of the cryptosystem. Matthews [
3] first introduced a chaotic system into designing image cryptosystem. After that, a variety of image encryption algorithms have been put forward in the sspatial domain. These image encryption methods can be roughly classified as: (1) image encryption that is based on transformation matrixes [
4,
5,
6]. This kind of algorithm mainly used the transformation matrix like magic cube transformation and Arnold cat map to permutation, and then used the chaotic system for diffusion. (2) The image encryption scheme that is based on deoxyribonucleic acid (DNA) encoding and chaotic system [
7,
8,
9]. In this kind of scheme, the authors usually used DNA rules to encode the plain-image and controlled permutation and diffusion process on encoded data by the chaotic system. (3) Image encryption that is based on chaotic S-box [
10,
11,
12]. Researchers usually used chaotic systems to design an S-box and encrypted image data by the nonlinear component. (4) Other spatial domain image encryption schemes [
13,
14,
15,
16].
Generally, the online transmission of image data requires a larger bandwidth. Therefore, image compression is very important for network applications, which can improve the efficiency of image transmission. In general, image compression not only utilizes the correlation between adjacent pixels, but it also encodes the non-uniform distribution of image pixels. However, image encryption will totally break the correlation among adjacent pixels and make its distribution uniform. Thus, the cipher image is not suitable for image compression. Not only that, the loss of image compression can also make the image impossible to be decrypted. Therefore, the compression must be executed early or at the same time as encryption.
Compressed sensing (CS) is a kind of effective data compression technology [
17] when the data satisfy sparsity in a certain domain. When compared with Nyquist theory, CS can recover the entire signal from a smaller number of measurements [
18]. In CS theory, when the signal is sparse in a transformation domain, a measurement matrix can be used to project the signal randomly, and then the original signal can be reconstructed by convex optimization algorithm. Fortunately, the images are sparse in many transform domains and are well suited to apply to CS theory. Therefore, based on compressed sensing, how to perform the image encryption also is a topical issue. Chai et al. [
19] proposed an image encryption scheme that is based on magnetic-controlled memristive chaotic system and compressive sensing. This scheme first transform image to discrete wavelet transform (DWT) domain. Subsequently, some permutations have been done with this coefficient matrix. Finally, the compressive sensing used a measurement matrix that was generated by a chaotic system. In this scheme, although the generation of measurement matrix is related to plain image information, the plain image sensitivity of the scheme is still not good enough. In addition, the uneven energy distribution of cipher images generated by the scheme may also cause the leakage of some plain image information. Zhu et al. [
20] proposed an image encryption scheme, which uses the random Gaussian matrix generated by Chebyshev mapping to execute compressive sensing. Chai et al. [
21] proposed a chaotic image encryption scheme, which uses elementary cellular automata and block compressive sensing. In this scheme, a plain image is transformed by DWT at first, then compressive processing under the measurement matrix generated by a parameter-varying chaotic system is done. The plain image sensitivity of this scheme is good, because all of the initial values of chaotic system are related to the plain image. However, the randomness of cipher image seems not good enough. Zhu et al. [
22] proposed an image encryption scheme, which is based on nonuniform sampling by block CS. In this scheme, the discrete cosine transform (DCT) is used to generate the coefficients matrix, and then perform compressive sensing processing by two measurement matrices that are generated by the logistic map. Finally, undertake the diffusion and permutation under logistic map controlling. However, the whole diffusion process is related to the result that is calculated in previous pixels; thus, the robustness must not be as good as mentioned. Gong et al. [
23] proposed an image compression and encryption algorithm. In this scheme, the plain image is first permuted by the Arnold transform to reduce the block effect in the compression process, and then the coefficient matrix is compressed and encrypted by CS, simultaneously. The keys in this scheme are generated by a plain image without any external keys; it means that each cipher image corresponds to a unique key, which is not conducive to key distribution management and batch image encryption. Kayalvizhi et al. [
24] proposed an image encryption scheme, which is based on compressive sensing, fractional order hyper chaotic Chen system, and DNA operations. In this scheme, block compressive sensing is executed to the plain image, and then execute DNA encoding to the measurement matrix. After that, complete some diffusion operation in DNA sequences. The whole process is not related to the plain image and the sensitivity of plain image has weak resistance to differential attack. Moreover, DNA encoding and decoding may consume a large amount of computing time, which results in the low efficiency of this algorithm.
To conquer the drawback what mentioned above, a plaintext related image encryption scheme is given using compressive sensing and two hyper chaotic systems. The detailed contributions are as follows:
In order to make the image cryptosystem more sensitive to the plain image, a plain image information-related method is proposed, which makes the plaintext information involved in the whole control process of compressive sensing and encryption, and make the image cryptosystem have excellent performance in resisting differential attack.
The generation method of the measurement matrix for compression encryption is presented, which is based on a chaotic system and the information of plain images, and make the CS process fully related to the plain image. In other words, different plain images correspond to different measurement matrices. Additionally, a permute and diffuse operation is used for the measurement matrix, which makes the pixels of the cipher image present lower correlation and uniform distribution.
The peak signal to noise ratio and structural similarity index measurement is used to evaluate compression performance, and many common security analyses methods are carried out, such as key space analysis, differential attack, statistical analysis, key sensitivity analysis, etc., in order to evaluate security performance.
This paper is organized, as follows: in
Section 2, the preliminary for this paper is given, such as compressive sensing and chaotic system. In
Section 3, an efficient image encryption scheme that is based on chaos and compressive sensing is introduced. In
Section 4, some common compression analyses and security analyses of the proposed image cryptosystem are given. In
Section 5, we conclude this paper.
3. Our Proposed Scheme
The image cryptosystem is proposed in this section. First, a plaintext related internal keys generation method is introduced in
Section 3.1. Afterwards, we present the encryption scheme in
Section 3.2. Finally, we propose the decryption scheme in
Section 3.3.
3.1. Plaintext-Related Internal Keys Generation
In this subsection, we proposed a method for generating the internal keys that are related to plaintext. The internal keys are used to generate the initial values and parameters of hyper chaotic systems that are used to control all processes of encryption and decryption. Therefore, the plaintext-related internal key generation method can make our proposed image cryptosystem more plaintext sensitive to resisting differential attack. There are two parts in plaintext-related internal key generation: plaintext information extraction and internal keys generation.
Algorithm 1 shows the plain image information extraction algorithm.
The detailed description are as follows:
Step 1: input plain image matrix P and initial key K into algorithm, and begin.
Step 2: expand the plain image matrix P into a vector P(:) in rows, and then change this vector to a string SP.
Step 3: input string SP into hash function SHA256, and denote the hash value as HP.
Step 4: input initial key K into hash function SHA256, and denote the hash value as HK.
Step 5: put hash values HP and HK together and input them into hash function SHA256. The hash value is extracted plain image information EPI.
Step 6: output the extracted plain image information EPI, and finished.
Algorithm 1 Plain image information extraction |
Input: Plain image matrix P and initial key K Output: Extracted plain image information EPI.
- 1:
String SP←P(:) - 2:
HP← SHA256(SP) - 3:
HK← SHA256(K) - 4:
EPI← SHA256([HP,HK])
|
Algorithm 2 shows the internal keys generation algorithm.
Algorithm 2 Internal keys generation |
Input: Extracted plain image information EPI, initial key K Output: Internal keys [K1,K2,K3,K4].
- 1:
HK← SHA256(K) - 2:
INKEY← SHA256([EPI,HK]) - 3:
(1:64) - 4:
(65:128) - 5:
(129:192) - 6:
(193:256) - 7:
CN1CN2 - 8:
CN3CN4 - 9:
- 10:
- 11:
- 12:
|
The detailed description are as follows:
Step 1: input extracted plain image information EPI and initial key K, and begin.
Step 2: input initial key K into hash function SHA256, and denote the hash value as HK.
Step 3: put extracted plain image information EPI and hash value HK together and input them into hash function SHA256. Denote the hash value as INKEY.
Step 4: split INKEY into four parts, and everypart with 64 bits, denoted as I1, I2, I3 and I4.
Step 5: calculate the control values as , CN2, CN3, and CN4.
Step 6: bit cyclic shift INKEYCN1 bits to right direction, and generate 256 bits internal key K1, after that, at same operation to bit cyclic shift INKEY under CN2, CN3, CN4 control, and generate internal keys K2,K3,K4.
Step 7: output internal keys [K1,K2,K3,K4], and finished.
3.2. Encryption Scheme
In this subsection, we will introduce our proposed encryption scheme. The encryption scheme takes, as inputs, plain image
P, initial key
K, and compression ratio
CR, and put outputs, such as cipher image and some additional ciphertext information. The compression ratio (CR) means the ratio of the number of pixels in the compressed image to that in the original image.
Figure 1 shows the block diagram of the encryption scheme, and the detailed description are as follows:
Step 1: input plain image P , initial key K and compression ratio CR, and the encryption process begins.
Step 2: input plain image matrix P and initial key K into Algorithm 1 to get extracted plain image information EPI. After that, input extracted plain image information EPI and initial key K into Algorithm 2 to generate internal keys [K1,K2,K3,K4].
Step 3: input plain image P into discrete wavelet transform (DWT) to sparse representation, and we denote sparse coefficient matrix as CM.
Step 4: input coefficient matrix
CM and internal key
K1 into Algorithm 3 to make plaintext energy evenly distributed.
Algorithm 3 Permutation I algorithm |
Input: Coefficient matrix CM and internal key K1 Output: Permutated coefficient matrix PM.
- 1:
(1:64); (65:128); (129:192) - 2:
; - 3:
; - 4:
Put into Equation ( 4) to generate a sequence by iterating. - 5:
- 6:
Remove the repeated elements from X, put the absent numbers at the end. - 7:
Change CM to a vector CMA in rows. - 8:
- 9:
fortodo - 10:
- 11:
end for - 12:
PM
|
Step 5: Calculate the threshold value
TS by Algorithm 4.
Algorithm 4 Calculate threshold algorithm |
Input: Coefficient matrix CM and compression ratio CR Output: Threshold value TS.
- 1:
Change CM to a vector CMA in rows. - 2:
Arrange the vector CMA from the smallest to the largest - 3:
- 4:
TS CR
|
Step 6: if the element in the permutated coefficient matrix PM absolute value less than threshold TS, then set this element to 0. The new generated matrix is denoted as PM2.
Step 7: input matrix
PM2, compression ratio
CR, and internal key
K2 into Algorithm 5 to obtain the measurements
CSM.
Algorithm 5 Compressive sensing algorithm |
Input: The matrix PM2, compression ratio CR, and internal key K2 Output: The compressive sensing measurements CSM.
- 1:
(1:64) - 2:
(65:128) - 3:
(129:192) - 4:
; - 5:
- 6:
- 7:
- 8:
- 9:
Put into Equation ( 4) to generate a sequence by iterating times. - 10:
- 11:
, where is used for normalization [ 33]. - 12:
|
Step 8: quantize the compressive sensing measurements
CSM to the range of
and generate quantized matrix
QM by
where
represents the nearest integer with
x, and
and
are the minimum and maximum numbers of
CSM.
Step 9: input quantized matrix QM and internal keys K3,K4 into Algorithm 6 to do diffusion and permutation II.
Step 10: output cipher image
C1 and additional cipher information
. The encryption process is finished.
Algorithm 6 Diffusion and permutation II algorithm |
Input:Quantized matrix QM and internal keys K3,K4 Output: Cipher image C1.
- 1:
(1:64); (65:128); (129:192); (1:64); (65:128); (129:192). - 2:
; ; . - 3:
; ; . - 4:
ifthen - 5:
- 6:
end if - 7:
ifthen - 8:
- 9:
end if - 10:
- 11:
Put into Equation ( 5) to generate a sequence by iterating times. - 12:
- 13:
- 14:
Put into Equation ( 5) to generate a sequence and by iterating times. - 15:
- 16:
- 17:
fortoMdo - 18:
- 19:
end for - 20:
fortoNdo - 21:
- 22:
end for - 23:
|
3.3. Decryption Scheme
The decryption process is the inverse process of encryption, and it takes input as cipher image
C1, additional cipher information
C2, and initial key
K, and put the output as recovering plain image.
Figure 2 shows the block diagram of the decryption scheme, and the detailed description is as follows:
Step 1: input cipher image C1, additional cipher information C2, and initial key K and the decryption process begins.
Step 2: input EPI and initial key K into Algorithm 2 to generate internal keys [K1,K2,K3,K4].
Step 3: input cipher image
C1 and internal keys
K3,K4 into Algorithm 7 to do reverse permutation II and reverse diffusion.
Algorithm 7 Reverse permutation II and reverse diffusion algorithm |
Input: Cipher image C1 and internal keys K3,K4 Output: Reverse permutation and diffusion matrix RPDM.
- 1:
(1:64); (65:128); (129:192); (1:64); (65:128); (129:192). - 2:
; ; . - 3:
; ; . - 4:
ifthen - 5:
- 6:
end if - 7:
ifthen - 8:
- 9:
end if - 10:
- 11:
Put into Equation ( 5) to generate a sequence and by iterating times. - 12:
- 13:
- 14:
fortoNdo - 15:
- 16:
end for - 17:
fortoMdo - 18:
- 19:
end for - 20:
Put into Equation ( 5) to generate a sequence by iterating times. - 21:
- 22:
|
Step 4: Do reverse quantization to the matrix
RPDM, and generate reverse quantized matrix
RQM by
Step 5: Input matrix RQM and internal keys K2 into Algorithm 8 to reconstruct matrix RCM.
Step 6: input reconstruct matrix RCM and internal key K1 into Algorithm 9 to undertake reverse permutation I.
Step 7: input matrix RPM into inverse discrete wavelet transform (IDWT) in order to recover plain image P.
Step 8: output recover plain image
P and the decryption process is finished.
Algorithm 8 Matrix reconstruction algorithm |
Input: Matrix RQM and internal keys K2 Output: Reconstruct matrix RCM.
- 1:
(1:64) - 2:
(65:128) - 3:
(129:192) - 4:
; - 5:
- 6:
- 7:
- 8:
Put into Equation ( 4) to generate a sequence by iterating times. - 9:
- 10:
, where is used for normalization. - 11:
for to N do - 12:
- 13:
end for
|
Algorithm 9 Reverse permutation I algorithm |
Input: Reconstruct matrix RCM and internal key K1 Output: Reverse permutated matrix RPM.
- 1:
(1:64) - 2:
(65:128) - 3:
(129:192) - 4:
; - 5:
- 6:
- 7:
- 8:
Put into Equation ( 4) to generate a sequence by iterating. - 9:
- 10:
Remove the repeated elements from X, put the absent numbers at the end. - 11:
Change RCM to a vector RCMA in rows. - 12:
- 13:
fortodo - 14:
- 15:
end for - 16:
RPM
|