Chaos-based algorithms have been widely adopted to encrypt images. But previous chaos-based encryption schemes are not secure enough for batch image encryption, for images are usually encrypted using a single sequence. Once an encrypted image is cracked, all the others will be vulnerable. In this paper, we proposed a batch image encryption scheme into which a stacked autoencoder (SAE) network was introduced to generate two chaotic matrices; then one set is used to produce a total shuffling matrix to shuffle the pixel positions on each plain image, and another produces a series of independent sequences of which each is used to confuse the relationship between the permutated image and the encrypted image. The scheme is efficient because of the advantages of parallel computing of SAE, which leads to a significant reduction in the run-time complexity; in addition, the hybrid application of shuffling and confusing enhances the encryption effect. To evaluate the efficiency of our scheme, we compared it with the prevalent “logistic map,” and outperformance was achieved in running time estimation. The experimental results and analysis show that our scheme has good encryption effect and is able to resist brute-force attack, statistical attack, and differential attack.
Nowadays, though the communication system has been greatly developed, insecure communication channels such as the Internet are still prevalent and a growing number of digital images are transmitted through them. Nevertheless, as long as the images are transmitted and stored over public networks, they are easy to be intercepted and tampered by unauthorized IPs. If the images have confidential information, specially, they need to be encrypted before exchange across Internet. However, traditional encryption algorithms such as 3DES, AES, and IDEA are typically designed for text encryption and are not suitable for image encryption on account of the intrinsic features of images as high correlation between pixels and redundancy [
Chaotic cryptography with artificial neural networks (ANNs) has been extensively developed due to the following characteristics: nonlinear computation, associative memory, large-scale parallel processing, and highly fault tolerance. Those characteristics contribute much to enhancing chaos security. For example, in [
With previous chaos-based encryption schemes, a batch of images are usually encrypted using a single chaotic sequence. In this paper, we proposed a batch image encryption scheme that encrypts each image with an independent sequence. Firstly, a SAE based five-layer deep neural network was constructed to produce two chaotic matrices; and then the two matrices were used together for mixing encryption processing, that is, one for a total shuffling matrix generation and another for multiple chaotic sequence generation; finally the shuffling matrix was used to shuffle the pixel positions on each plain image, and each chaotic sequence was used to confuse the relationship between the corresponding shuffled image and the encrypted image. Several security evaluation results proved that the proposed scheme completely met the requirements of image encryption. Compared with traditional image schemes such as the logistic map, the proposed scheme is more powerful. In other words, the scheme is able to generate a large number of chaotic sequences in parallel and then to encrypt a lot of images simultaneously. Our scheme has a better performance in run-time complexity and a significant effect on batch image encryption.
Autoencoder (AE) is a single-hidden-layer and unsupervised learning neural network. It is actually generated by two identical Restricted Boltzmann Machine models (RBMs) [
Stacked autoencoder (SAE) network.
In the pretraining period, each layer is trained in turn with a lay-wise approach: the SAE network encodes the input data The activation of each hidden layer is computed successively in the feed-forward processing. Firstly, in the output layer, the grade error is calculated by the following function: The grade error of each hidden layer is as follows: The partial derivatives are
where
The SAE network can learn levels of features. And given the same hyperparameters, the extracted feature information can be reproduced. Sequences composed of those features satisfy the basic requirements of chaos and can be utilized to encrypt images. In this paper, we extracted two sets of features to encrypt images in batch using a five-layer neural network based on SAE, and experimental results show that our scheme is effective and efficient.
In order to obtain practicable chaotic matrices, we modified the SAE model in Figure
The chaotic matrix generation network.
As we can see in Figure
The process of batch image encryption.
The following pseudocode is presented to depict the process of batch image encryption.
Here, sl_matrix is the total shuffling matrix, chaotic_sequences is the set of chaotic sequences, the function shuffling(·) is described as step
This encryption scheme was evaluated over a group of gray-level images. Those images have the same dimension of 512 by 512 and are all 256 gray-level. Pixel values were normalized, that is, each image was represented by a
Image encryption and decryption.
Histograms of original and encrypted images.
We selected ten pairs of adjacent pixels in each plain and encrypted image, and we listed the correlation coefficients of these pairs in Table
Correlation analysis.
Images | Correlation coefficients | ||||
---|---|---|---|---|---|
Plain Gold-hill | 0.9871 | 0.9833 | 0.9847 | 0.9865 | 0.9872 |
0.9841 | 0.9852 | 0.9835 | 0.9877 | 0.9928 | |
Plain Barbara | 0.9859 | 0.9828 | 0.9852 | 0.9874 | 0.9865 |
0.9888 | 0.9849 | 0.9843 | 0.9857 | 0.9873 | |
Plain Yacht | 0.9856 | 0.9847 | 0.9865 | 0.9838 | 0.9869 |
0.9868 | 0.9838 | 0.9856 | 0.9877 | 0.9838 | |
Plain Peppers | 0.9856 | 0.9871 | 0.9835 | 0.9875 | 0.9873 |
0.9849 | 0.9862 | 0.9864 | 0.9849 | 0.9882 | |
Encrypted Gold-hill | 0.0038 | −0.0044 | 0.0182 | −0.0054 | −0.0231 |
0.0085 | 0.0057 | −0.0248 | 0.0058 | 0.0105 | |
Encrypted Barbara | 0.0047 | 0.0157 | 0.0287 | 0.0108 | 0.0091 |
−0.0092 | 0.0038 | −0.0217 | −0.0098 | 0.0124 | |
Encrypted Yacht | −0.0157 | −0.0134 | 0.0158 | 0.0064 | −0.0158 |
−0.0085 | 0.0068 | −0.0263 | 0.0097 | −0.0215 | |
Encrypted Peppers | −0.0074 | 0.0238 | 0.0398 | 0.0087 | 0.0378 |
−0.0159 | −0.0105 | 0.0485 | −0.0182 | −0.0082 |
The correlation distribution of an image is commonly depicted using a scattered diagram. We randomly selected 1000 pairs of adjacent pixels from each image in vertical, horizontal, and diagonal directions, and the correlation is illustrated in Figure
Correlation distribution of two adjacent pixels.
The decrypted images with a changed cipher code.
The decrypted Gold-hill
The decrypted Barbara
The decrypted Yacht
The decrypted Peppers
According to the two measures, our scheme is compared with several other encryption schemes and results are listed in Table
Comparative study of NPCR and UACI of the proposed algorithm to some existing algorithms.
Images | NPCR (%) | UACI (%) | Images | NPCR (%) | UACI (%) |
---|---|---|---|---|---|
Ref. [ | 99.89 | 33.68 | Ref. [ | 99.61 | 33.48 |
Ref. [ | 99.6972 | 33.5086 | Ref. [ | 99.6086 | 33.4273 |
Ref. [ | 99.6000 | 33.5000 | Ref. [ | 99.6100 | 33.4400 |
Ref. [ | 99.5983 | 33.6883 | Ref. [ | 99.5865 | 33.4834 |
Ref. [ | 99.6399 | 33.5916 | Ref. [ | 99.5926 | 33.3386 |
Ours (Gold-hill) | 99.6108 | 33.5852 | Ours (Barbara) | 99.6432 | 33.5454 |
Ours (Yacht) | 99.4968 | 33.6011 | Ours (Peppers) | 99.4205 | 33.3396 |
In addition to the gray-level images, our scheme is also used to encrypt color images. The color image can be considered to be three channels overlapping together which are Red, Green, and Blue channels. Each channel is like a gray-level image. The three channels are encrypted, respectively, and then merged together to become an encrypted color image. Figure
Color image encryption and decryption.
The comparative study on running time is performed with “logistic map” [
Comparative study on running time of the proposed scheme and the logistic map.
Schemes | Number of generated sequences | ||||
---|---|---|---|---|---|
10 | 50 | 100 | 200 | ||
Ours (seconds) | Total time | 483.2845 | 782.8963 | 546.7157 | 523.7215 |
Average time | 48.3285 | 15.6579 | 5.4672 | 2.6186 | |
Logistic map (seconds) | Total time | 6314.5490 | 6373.6024 | 6449.8472 | 6601.2951 |
Average time | 631.4549 | 127.4720 | 64.4985 | 33.0065 |
Our scheme has the following advantages: fast batch image encryption and independent chaotic sequence for each image, which ensures the efficiency and security of our scheme. The experimental results prove that our scheme can be used for batch image encryption in variant applications as real-time remote image transmission and image protection.
There is a drawback to our scheme that all plain images must have the same size (
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work was supported by Scientific and Technological Research Program of Chongqing Municipal Education Commission (no. KJ1501405, no. KJ1501409); Scientific and Technological Research Program of Chongqing University of Education (no. KY201522B, no. KY201520B); and Fundamental Research Funds for the Central Universities (no. XDJK2016E068).