Research Article  Open Access
Xinsheng Li, Zhilong Xie, Jiang Wu, Taiyong Li, "Image Encryption Based on Dynamic Filtering and Bit Cuboid Operations", Complexity, vol. 2019, Article ID 7485621, 16 pages, 2019. https://doi.org/10.1155/2019/7485621
Image Encryption Based on Dynamic Filtering and Bit Cuboid Operations
Abstract
As one of the most widely used media types, images play an important role in the era of the Internet. And hence how to enhance the security of images has become a hot topic in the field of information security. However, due to some intrinsic characteristics of images, image security is still a challenging task. For the purpose of coping with this issue, in this paper, we propose a novel algorithm that combines a hyperchaotic system, dynamic filtering, and bit cuboid operations, namely, DFBC, for image encryption. Specifically, the proposed DFBC consists of four steps: firstly, a 7D Lorenz hyperchaotic system is utilized to generate a pseudorandom sequence; secondly, variable 1D filters are derived from the pseudorandom sequence, and dynamic filtering is conducted on each pixel of an image; thirdly, a diffusion scheme is performed and then the image is transformed to a bit cuboid; and, finally, various types of permutation (rearranging, symmetry, rotation, zigzag, and global bit permutation) are performed on the bit cuboid. The experiments on several testing images demonstrate that the DFBC achieves stateoftheart results in terms of several evaluation criteria, showing that the DFBC is promising for image encryption.
1. Introduction
Image security is one of the most important types of information security. In recent years, image encryption has become a hot topic in the field of image security. However, since images usually show some intrinsic properties such as bulky data capacity, high redundancy, and strong correlation, traditional encryption algorithms such as data encryption standard (DES), advanced encryption standard (AES), and international data encryption algorithm (IDEA) for common data are not able to be applied to images directly to achieve good results [1, 2]. To cope with this issue, various researchers have been devoted to proposing image encryption algorithms to enhance image security in recent years.
Among the image encryption algorithms, chaosbased ones have become more and more popular in recent years because chaotic systems have some special properties for image encryption, such as pseudorandomness, ergodicity, unpredictability, and extreme sensitivity to system parameters and initial values [3–7]. Generally speaking, there are two ways to perform image encryption, i.e., permutation and diffusion. The former means changing the position of image data, while the latter means changing the values of image data. Many practical image encryption algorithms use these two approaches together. When chaotic systems are applied to image encryption, the common ways are to perform permutation and diffusion using the index and the values of chaotic sequences generated from chaotic systems, respectively. Chen et al. proposed a novel realtime secure symmetric image encryption scheme that generalized a 2D chaotic map to 3D and then used the 3D cat map and another chaotic map to conduct permutation and diffusion, respectively [3]. Zhang proposed a novel fast image cryptosystem that used the piecewise linear chaotic map and cubic Sbox to generate the sequence for image encryption [6]. Typically, lowdimensional chaotic systems have simple forms and are easy to implement, and hence some scholars applied them to image encryption [8, 9].
However, lowdimensional chaotic maps usually have only a few variables and parameters, along with simple structures and chaotic orbits, making it easy to estimate the orbits and the initial parameters, and hence the security of image is reduced [2, 10]. Therefore, higherdimensional chaotic systems have been widely applied to image encryption. Some researchers apply 3D chaotic maps to image encryption [11, 12]. In a dynamical system, the Lyapunov exponent (LE) is a quantity that characterizes the rate of separation of infinitesimally close trajectories and estimates the chaos of the system [13], and if a chaotic system has two or more positive LEs, the system is defined to be hyperchaotic [14]. Recent research has demonstrated that image encryption algorithms associated with hyperchaotic systems show greater security [15–23]. Among the approaches, 46D hyperchaotic systems are widely used to enhance image encryption. Zhu and Sun proposed an image encryption algorithm with tworound encryption operations based on a 4D hyperchaotic system [16]. Xue et al. applied a 5D hyperchaotic system with 3 positive LEs for region of interest encryption for color images [21]. Wu et al. presented a new lossless encryption algorithm that used the 2D discrete wavelet transform (DWT) and a 6D hyperchaotic system in both frequency and spatial domains for color images, and the experimental results indicated that the proposed algorithm was effective and efficient [23]. Generally speaking, the more the number of positive LEs or the higher the dimension of a hyperchaotic system is, the more secured the hyperchaotic systembased image encryption algorithms are.
When an image encryption algorithm is performed on an image, it usually processes blocklevel data (a block of pixels) [24–27], pixellevel data [28, 29], deoxyribonucleic acid (DNA) level data (2 bits) [30–33], bitlevel data [34–36], or bit planelevel data [37, 38]. For fixed processing power, the lower the processing level is, the more pixels the algorithm can handle in one time. For example, if the algorithm can process 8 bits in one time for 256level gray images, it means that it can process 1 pixel, 4 nucleic acid bases, or 8 bits, which involves 1/4/8 pixels at the most, respectively. Therefore, encryption algorithms associated with lowlevel data usually show better performance in image encryption.
Image filtering, also known as convolution, is one of the most important operations in image processing, and its typical applications include denoising, smoothing, and edge detection. Most recently, Hua and Zhou have applied this technique to image encryption for the first time, and they proposed an approach called blockbased scrambling and image filtering (ICBSIF) for image encryption. The experimental results showed that it could achieve better performance than some stateoftheart encryption schemes [26]. In this scheme, the authors use a fixed template of filter for all pixels, losing the diversity of the template and hence not maximizing the performance of the scheme. In the field of chaos, Yang et al. have found a new 7D autonomous hyperchaotic system with 5 positive LEs recently, which has very simple algebraic structure but can show complex dynamical behaviors [39]. Therefore, it has good potential for image encryption.
Motivated by the above analysis, in this paper, we aim to propose a novel image encryption scheme that combines a 7D hyperchaotic system with 5 positive LEs, dynamic filtering, and bit cuboid operation, namely, DFBC, for image encryption. The main steps of the DFBC are as follows. (1) A 7D hyperchaotic system is used to generate a pseudorandom sequence for subsequent encryption operations. (2) 1D dynamic filtering is conducted on each pixel with random filters derived from the pseudorandom sequence. (3) The 2D image of pixel plane is transformed to a 3D bit cuboid. (4) Various types of permutation, such as rearranging, symmetry, rotation, zigzag, and global bit permutation, are performed on the bit cuboid.
The rest of this paper is structured as follows. A brief description of the 7D hyperchaotic system and filtering is given in Section 2. In Section 3, the novel image encryption algorithm, DFBC, is proposed in detail. Experimental results are reported in Section 4. Finally, we conclude the paper in Section 5.
2. Preliminaries
2.1. Hyperchaotic Systems
As one of the most popular chaotic systems, the Lorenz chaotic system and its extensions are very popular in image encryption [40–44]. Most recently, Yang et al. have found a new 7D autonomous hyperchaotic system with 5 positive LEs by adding feedback controllers to the Lorenz system [39], formulated as where , , , are the constant parameters, , , , , , and are control parameters, and is the coupling parameter. When the parameters and initial values , , the attractors of the 7D hyperchaotic system are shown in Figure 1 (the first 1000 values of each component are removed to eliminate the adverse effects). Correspondingly, keeping the parameters except for unchanged, the LE spectrum of the 7D hyperchaotic system with respect to parameter is shown in Figure 2. It can be seen that, when (approximately), the system has hyperchaotic behaviors because it has two or more positive LEs. In particular, when (approximately), the 7D hyperchaotic system has five positive LEs.
(a) x1x2 plane
(b) x3x4 plane
(c) x1x3 plane
(d) x1x2x3 plane
(e) x4x5x6 plane
The advantages of this hyperchaotic system are two aspects: (1) the algebraic structure is very simple, so it is easy to implement and (2) the system exhibits complex dynamical behaviors, and hence it is suitable for image encryption. Therefore, in this paper, we use this hyperchaotic system for image encryption.
2.2. Filtering Operation
It is wellknown that image filtering by convolution is widely used in many digital image processing fields, such as adding soft blur, sharpening details, accentuating edges, or denoising. Some of filtering is linear, which involves weighted combinations of pixels in small neighborhoods. The simplest filter to implement is the moving average or box filter, which simply averages the pixel values in an window. Usually, the gradient, Laplacian, and difference of Gaussians (DoG) filters work very well for general purpose visual enhancement or edge detection. This is equivalent to convolution of the image with a mask of all ones.
Traditional image filtering cannot be reversed; that is to say, it usually cannot recover the original image with the filtered image and the filters. To overcome this shortcoming, very recently, Hua and Zhou have designed a special filter with which the original image can be recovered from the filtered image. And they have proposed a novel approach called ICBSIF for image encryption, where image filtering is applied to image encryption for the first time [26]. The experimental results demonstrated the effectiveness of the proposed ICBSIF.
2.3. BitLevel Operation
Permutation conducted on pixellevel data or higher level data (e.g., blocks of pixels) cannot change the statistical characteristics of an image [45], while permutation on bitlevel data can change such characteristics. Furthermore, for a fixed process width (bits processed in one run), the bitlevel image encryption can involve more pixels than higher level data (e.g., DNAlevel, pixellevel, or blocks of pixels), for both permutation and diffusion. Therefore, to enhance the security of image encryption and to speed up the algorithm, in this paper, we will perform bitlevel encryption. Specifically, we first transform an image into a cuboid that is very close to a cube, and then various bit plane operations are conducted on the cuboid.
3. The Proposed Image Encryption Approach
3.1. Hyperchaotic Sequence Generation
Since the 7D hyperchaotic system described in Section 2.1 has good properties for image encryption, we use it to generate the hyperchaotic sequence applied in the proposed image encryption approach. The generating process consists of three steps.
Step 1. To eliminate the adverse effects, the 7D hyperchaotic system is firstly iterated times and then the sequence generated is removed.
Step 2. The 7D hyperchaotic system continues to iterate until the generated sequences are long enough to image encryption. For the th iteration, seven state values denoted by are obtained.
Step 3. After the whole iteration, the hyperchaotic sequences can be obtained by contacting all the () as
The purposes of the generated sequence for encryption are two aspects: (1) sorting subsequence of to get the index of original data for permutation; (2) using subsequence of to change the values of images for diffusion. In our approach, we map the th point in to the integral range of 0,255] by (3) and to the real range of by (4) for the first purpose and the second purpose, respectively.where mod is the modulo operation, is the absolute value operation, and denotes flooring operation [2].
3.2. Dynamic Filtering
3.2.1. Image Filtering
Image filtering is the convolution operation between an image and a template , also known as a mask. This template is usually a 2D matrix whose size is , , , etc. Suppose the size of a 2D template is , the convolution operation of image filtering can be defined as
If the template is a onerow or onecolumn matrix, it is called 1D convolution, which can be defined as the following:where the sizes of in (6) and (7) are and , respectively.
3.2.2. 1D Dynamic Filtering
Hua and Zhou used 2D filtering to do diffusion in image encryption. They also introduced Proposition 1 and its proof to identify that image filtering operation satisfying some conditions can be reversible [26].
Proposition 1. For any given mask of size , image of size , and P’ grayscale level , the operationcan be reversible and its inverse operation isif and .
The key difference to the ordinary image filter is to set the mask center to 1; i.e., .
Here we can prove that if the center of 1D image filter is set to 1, Proposition 1 still holds. And it is rewritten as Proposition 2.
Proposition 2. For any given 1D mask of size , image of size , and P’s grayscale level , the operationis reversible and its inverse operation isif and .
For the mask with direction along with coordinate , or, in other words, 1D mask of size , 1D image filtering has the same property.
Proof. Since , (10) can be rewritten aswhere is an integer. Reshape (12); then it becomesNow (13) can be rewritten as follows because and .
By now, the proof of Proposition 2 has been completed. It has the similar formation with (9). As we can see that, for Proposition 2, even if every pixel is filtered by different template , Proposition 2 still holds and then is detailed as Proposition 3 as follows.
Proposition 3. For any given mask of size at pixel of P’s grayscale level , the operationis reversible where image size is size and its inverse operation isif and .
The logic of setting our masks is described in Figure 3.
(a)
(b)
The colored is the center of the mask of filtering which is 1 exactly. It pairs with the pixel which needs to be filtered. The other weights in the mask after the colored are set to 0. Then this mask is simplified to and the weight with respect to the pixel is the last weight in the mask. In the proposed approach, the mask is said to be a dynamic one because, for each pixel , we use different values from the hyperchaotic sequence to fill the mask as the weights.
When filtering is conducted on the edge of an image, the original image has to be expanded [26]. Since the filter is 1D, we only need to expand the image on horizontal or vertical direction. When horizontal filter is working, the most right columns are copied to the left side of the image. Similarly, when vertical filter is working, the most bottom rows are copied to the top side of the image. Of course, the number of rows or columns which need to be copied in filtering process has to change accordingly at the row or column between 1 and . This process is depicted by an example in Figure 4. The mask size in the example is set as and .
(a)
(b)
Our dynamic diffusion mask of filtering comes from the hyperchaotic sequence. And the indicator of direction of filtering mask is determined by one number in the hyperchaotic sequence too. If the number is even, a horizontal mask is applied to the image. Otherwise, an odd number means a vertical mask.
After the dynamic masks are set, the convolution begins as the normal convolution does except that the mask has to be renewed for each pixel.
3.3. Global Pixel Diffusion
Although the dynamic filtering is capable of diffusing images, to further enhance the performance of the diffusion of our approach, we conduct a simple twostep diffusion for image with pixels after dynamic filtering, following the diffusion scheme in [2]. Given an image of size , where and are the height and width, respectively, the scheme firstly transforms the image into a 1D pixel sequence , . Given an initial key and a chaotic key sequence , , the diffusion can be conducted in two steps, as formulated in the following equations, respectively:where is the XOR operation and is th pixel in the diffused image.
Besides the dynamic filtering and global pixel diffusion, we also conduct the XOR operation on the pixels of image with a random mask to change the value of the pixels directly.
3.4. Bit Cuboid Operations
3.4.1. Pixel Plane to Bit Cuboid
Given a plain grayscale image with rows (height) and columns (width), it is a typical pixel plane with pixels, each of which is one 256level value. The total bits of the image are , so it is naturally a cuboid. To perform bitlevel operations better, the cuboid should be transformed into a new one whose width, height, and depth can be as uniform as possible. To achieve this, we transform the original cuboid with size of into a new one with size of , as
Equation (19) can ensure that both and are integers. For the simplicity, in this paper, we do not consider the cases when is not integral. With this equation, the original pixel plane can be transformed into a cuboid which has as uniform a side length as possible. For example, grayscale images having sizes of and can be transformed into two cuboids with sizes of and , respectively.
3.4.2. Operations on BitPlanes
(1) Bit Plane Rearranging. Bit plane rearranging can be conducted at different directions for a bit cuboid. Since the operations at each direction are almost the same, here we use the operation at the direction of depth as an illustration for simplicity. The rearranging steps are as follows.
Step 1. Given a bit cuboid of and a random sequence , , sort in ascending order to get the index sequence , .
Step 2. According to the index sequence, rearrange the original th bit plane at the direction of depth as the th bit plane in the rearranged bit cuboid.
(2) Symmetry. The operations of symmetry include two types: horizontal symmetry and vertical symmetry. For a given bit plane , , , the horizontal symmetry is formulated as , , , and the vertical symmetry is defined as , , .
(3) Rotation. Since a bit plane may be a rectangle (not always a square), the angle of this rotation can only be 180 degrees. Therefore, For a given bit plane , , , the operation of rotation is defined as , , , .
(4) Zigzag. Zigzag can disturb the high correlation for images to enhance the security of encrypted images [46]. In this paper, we use zigzag to permutate the bitplanes in the bit cuboid one by one, as illustrated in Figure 5. In each bit plane, the zigzag confusion path starts from the upper left bit and ends at the bottom right bit. When scanning a plane is completed, the scan starts from the upper left bit of the next plane, and so on. When all the bitplanes are scanned, a bit string is obtained. Zigzag can not only permute the bits, but also diffuse corresponding pixellevel data.
(5) Global Bit Permutation. After Zigzag, the encryption scheme will obtain a bit sequence. The global bit permutation is to permute all bits in the bit sequence with a hyperchaotic sequence [2, 30]. The steps are as follows.
Step 1. Given a bit sequence of length and a hyperchaotic sequence , , sort in ascending order to get the index sequence , .
Step 2. According to the index sequence, rearrange the original th bit in the bit sequence as the th one in the permuted bit sequence.
With the operation of global bit permutation, the bit sequence can be transformed to a pixel plane as the encrypted image. It also can be transformed into a bit cuboid for further bitlevel permutation.
3.5. The DFBC: The Proposed Image Encryption Using Hyperchaotic System, Dynamic Filtering and Bit Cuboid Operation
The framework of the DFBC is shown in Figure 6. After generating the hyperchaotic sequence, the encryption procedure consists of three steps: pixellevel diffusion (dynamic filtering and global pixel diffusion), transformation of pixel plane to bit cuboid, and bitlevel permutation. The diffusion changes the gray value of every pixel while the permutation rearranges the positions of bits.
The detailed encryption procedure of the DFBC is described as follows.
Step 1. Generate the hyperchaotic sequence with initial keys by (1)(3).
Step 2. Use the dynamic masks to diffuse the image by the method in Section 3.2.1. Firstly, the first number of the hyperchaotic sequence, , is chosen to determine the direction of mask. Then, integers are chosen from the hyperchaotic sequence. Secondly, reshape these integers into masks of or , , where the direction of mask is determined by the parity of . Set the last element of the mask to one; i.e., . Thirdly, convolve each mask with its corresponding pixels to get a diffused image.
Step 3. Conduct global pixel diffusion by (17)(18) as described in Section 3.3. The operation will expand a little change in one pixel to other pixels.
Step 4. Conduct XOR operation on the image with a hyperchaotic subsequence to change the values of pixels directly.
Step 5. Transform the pixel plane to a bit cuboid as described in Section 3.4.1. The transformed bit cuboid has as uniform width, height, and depth as possible.
Step 6. Rearrange the bits in the bit cuboid based on bit plane at height, width, and depth direction as described in Section 3.4.2.(1).
Step 7. Randomly rotate each bitplain based on chaos sequence as described in Section 3.4.2.(3).
Step 8. Randomly symmetrize each bitplain based on chaos sequence as described in Section 3.4.2.(2).
Step 9. Permute the bit cuboid by zigzag as described in Section 3.4.2.(4).
Step 10. Conduct global bit permutation on the bit sequence as described in Section 3.4.2.(5).
Step 11. Transform the bit sequence to a pixel plane of the original size as the final encrypted image.
The procedure of the DFBC can be categorized into five stages: hyperchaotic sequence generation (Step 1), pixellevel diffusion (Step 24), pixel plane to bit cuboid transformation (Step 5), bitlevel permutation (Steps 6–10), and bit sequence to pixelplane transformation (Step 11). The DFBC diffuses images with dynamic filtering, global pixel diffusion, and XOR operation on pixellevel data. And it permutes the images on bitlevel data. It is worth pointing out that since the permutation on bits can change the values of pixels, the bit cuboid operations in the DFBC are capable of diffusing the images; that is to say, the bit cuboid operations have the effects of both permutation and diffusion.
The decryption process of DFBC is the inverse procedure of encryption as listed above.
4. Experimental Results
4.1. Experimental Settings
In order to evaluate the performance of the proposed DFBC, some stateoftheart schemes, such as the hyperchaotic and DNA sequencebased method (HCDNA) [30], the image encryption using encrypted diffusion in crisscross pattern (CDCP) [16], a class hyperchaosbased scheme (CHC) [17], an image encrypted using blockbased scrambling, and image filtering (ICBSIF) [26], are compared with some common statistical indexes. The parameters for the compared schemes are set as the corresponding papers. The parameters of the DFBC are set as follows. The initial values for the 7D hyperchaotic system are , , , , , , and . And the preiterating times is set to 1000. The original hyperchaotic integer sequence generated from the 7D hyperchaotic equations is adopted from the beginning, which means the start position of hyperchaotic sequence is 1. Then our diffusion masks of filtering are created from this hyperchaotic integer sequence. The first byte of the hyperchaotic sequence determines the direction of 1D filter. Now that the image size is and mask size is or , then integers of one byte are cut out from the hyperchaotic sequence to shape masks to filter every pixel iteratively. The round of 1D filtering and cuboid operation are both set to 1.
Six publicly accessed images and two images we collected, Monkey and Parking, with different sizes are used to test the proposed DFBC, as listed in Table 1.

The publicly accessed images Lena, Cameraman, Barbara, and Airfield are widely used in the field of image processing, including image encryption. The image Histogram is a graphical one which has an almost similar grayscale background and histogram which means most of its pixels are highly correlated. This image is quite different from other real photographs from cameras. The image Terrain is an image downloaded from the Internet which has a very single sharp mountain shape histogram. The image Parking is captured by the author. It has a big area of gray cloud background which has a very high correlation between pixels. The image Monkey is a real image captured from a video which is different from these wellknown images. It is to validate that our DFBC can be applied to any real images robustly and easily.
All the experiments were conducted by Matlab 8.3 (Mathworks, Natick, MA, USA) on a 64bit Windows 7 (Microsoft, Redmond, WA, USA) with 8 GB memory and 3.4 GHz I3 CPU.
4.2. Security Key Analysis
A good encryption scheme should have an enough large key space and be extremely sensitive to any small changes in its security key. Both a large key space and extreme sensitivity can resist bruteforce attacks. So key space and sensitivity to secret key are two essential points in encryption.
4.2.1. Key Space
Basically, the security keys of the proposed DFBC are composed of 7 initial values, i.e., . If the precision of each initial value is , the key space size is . From the view of cryptology, the size of the key space larger than can provide a highlevel security [1, 47]. Therefore, the key space of the DFBC is large enough to resist all kinds of bruteforce attacks from current computers. In addition, the start position of chaos sequence to form the random filter mask can also be used as a key to further enhance the key space.
4.2.2. Sensitivity to Security Key
The extreme sensitivity of an image encryption algorithm implies that even one bit changed in the keys will lead to a completely different encrypted image. In other words, if the security key changes a little, the decrypted image will be completely different from the input image.
To demonstrate the sensitivity to secret key of the DFBC, we decrypt the encrypted images twice. In the first run, we use the exact encryption keys (, , , , , , and ) to decrypt the encrypted images, while, in the second run, we attempt to decrypt the encrypted images with slightly different keys (, , , , , , and ). We conduct the experiments on the images of Lena, Cameraman, Monkey, and Parking, and the results are shown in Figure 7. As we can see, even if we only change the key extremely little such as , the decrypted images are completely different from the ones decrypted with the correct keys, validating that the proposed DFBC is highly sensitive to secret key.
4.3. Statistical Analysis
The statistical analysis is another widely used and effective way to analyze a cryptosystem. We adopt some typical statistical analysis, such as histogram analysis, information entropy, and correlation analysis, to evaluate the performance of the proposed DFBC. A cryptosystem with good performance of statistical analysis can resist all kinds of statistical attacks. The experimental analysis demonstrates that our method DFBC also can handle images especially like the graphical Histogram very well.
4.3.1. Histogram Analysis
Histogram is a popular and effective way to measure the distribution of pixel values in the plain image and the encrypted image for image encryption. The histogram of a plain image is usually unevenly distributed while that of an encrypted image by a good encryption scheme has a uniform distribution as much as possible. A uniform distribution of histogram indicates a totally randomlike image and the least probability of recovering its plain image. In other words, in terms of the performance of encryption schemes, the flatter of the histogram of the encrypted image is, the better the encryption scheme is.
The histograms of the plain images and their corresponding encrypted images are shown in Figure 8. The histograms of the plain images are shaped like some mountains or valleys while all the histograms of encrypted images are very close to a uniform distribution. These histograms of encrypted images indicate that the proposed DFBC have the ability to resist histogram attacks. The fifth image Histogram especially has a highly unusual histogram, where most of the pixels have the highest gray scale levels so that the rectangles of low gray scales are very short. And our method can encrypt the image Histogram to be an even and flat histogram like the other photographic images. It confirms that our method works very well for manmade graphical images like Histogram.
The diffused images by dynamic filtering are listed in the third column of Figure 8, and the fourth column is their corresponding histograms. It is worth noting that the diffused images by dynamic filtering have almost uniformly distributed histograms like the encrypted images. It can be seen that their histograms are just a little less even than the encrypted images. Compared with the diffusion in [26], our diffusion is as good as [26] at the same level with regard to the histogram analysis. Theoretically, our 1D image filtering is more efficient and can compute faster than 2D filtering with a fixed mask.
4.3.2. Information Entropy
Information entropy (IE) is the average rate at which information is produced by a stochastic source of data. Here it is used to reflect the complexity or orderliness of the encryption system. The intensity of an 8bit grayscale image has possible values (0, 255]). The IE is defined as where is the probability that the pixel value appears [30]. When of encrypted image has the same probability, i.e., , IE reaches maximum of 8. It matches the uniform distribution of the encrypted image perfectly.
The IEs of input images and encrypted images by different encryption methods are listed in Table 2. The third column under DF (Dynamic Filtering) is the entropies of diffusion by dynamic filtering. The fourth column under DFBC is the entropies of final encrypted images. All the entropies of diffused images except Barbara are improved after our bit cuboid operations, which indicates that this random permutation is very effective. It can be seen that the IEs of input images are far below 8, while those of encrypted images are very close to the ideal value. The IEs of DFBC are within , demonstrating that the DFBC is secure enough to resist entropy attack. Our DFBC achieves 5 out of 8 optimal values while HCDNA and ICBSIF achieve only 2 and 1 out of 8 optimal values, respectively. Although the IEs by DF are not the highest ones, they are very close to the ideal values, showing that the 1D dynamic filtering can achieve very good results of diffusion.

4.3.3. Correlation Analysis
Two neighboring pixels in a natural image usually have similar grayscale levels and thus are highly correlated. A good image encryption algorithm should result in encrypted image with extremely low correlation. Correlation coefficient is a widely used metric to measure the correlation and it can be formulated as [44]where and are grayscale levels of two neighboring pixels in an image and denotes the total number of pixels in an image that satisfies .
As listed in Table 3, we calculate the correlation coefficients for all input images and encrypted images at three different directions, i.e., horizontal , vertical , and diagonal , respectively [30]. It can be seen from this table that the correlation coefficients of all the input images are big number and close to 1 in all directions, while all the encrypted images are around 0, showing that the encryption schemes can effectively reduce the correlation of the adjacent pixels to a very low level after encryption. The DFBC outperforms the remaining schemes on 6 out of 24 correlation coefficients, whereas the CHC also achieves the optimal value 6 times and ICBSIF achieves 5 times, showing that the DFBC has good performance for correlation of the encrypted images. When we further investigate the range of , however, of DFBC is within , while those of HCDNA, CDCP, CHC, and ICBSIF are within , , , and , respectively. From the ranges of the algorithms, we can get the intervals of , i.e., 0.0081, 0.0167, 0.0102, 0.0117, and 0.0171, for DFBC, HCDNA, CDCP, CHC, and ICBSIF, respectively. It can be seen that the DFBC achieves the minimum interval, showing that the DFBC is the most stable one among the compared approaches regarding correlation.

To have a further correlation analysis, we randomly select 4000 pairs of neighboring pixels in horizontal direction from the input images and the encrypted images by the DFBC to show their neighboring pixel distribution maps in Figure 9. The correlation values of input images distribute near the diagonal of coordinate plane, indicating strong correlation of input images. The images Monkey, Histogram, and Parking especially have very obvious lines made by correlation points on the diagonal direction. However, the values of encrypted images distribute almost on the whole plane randomly, which shows very weak correlation of encrypted images. In other words, most of the correlation is removed by the DFBC.
(a) Input Lena
(b) Input Cameraman
(c) Input Barbara
(d) Input Airfield
(e) Encrypted Lena
(f) Encrypted Cameraman
(g) Encrypted Barbara
(h) Encrypted Airfield
(i) Input Histogram
(j) Input Terrain
(k) Input Parking
(l) Input Monkey
(m) Encrypted Histogram
(n) Encrypted Terrain
(o) Encrypted Parking
(p) Encrypted Monkey
4.4. Analysis of Resisting Differential Attacks
According to the theory of cryptography, an image encryption scheme should effectively resist the differential attack. Thus a good image encryption algorithm needs to be very sensitive to the plain images; that is, any trivial change (e.g., a bit or a pixel change) in a plain image can lead to a completely different encrypted image.
The number of pixels change rate (NPCR) and the unified average changing intensity (UACI) are two important metrics for differential attack analysis. The NPCR is defined as the variation ratio of two encrypted images whose plain images are slightly different, meaning the dissimilitude between two encrypted images. The UACI indicates the average intensity of the differences between the same encrypted images. In most cases, only one pixel or even one bit chosen is randomly changed to compute the NPCR and UACI. Mathematically, NPCR and UACI between two encrypted images and can be formulated as follows, respectively.where and are the height and the width of the image, respectively, and is defined as
NPCR concentrates on the absolute number of pixels which change values in differential attack, while the UACI focuses on the average difference between the corresponding encrypted images. For an image with 256 grayscale levels, the expectations of NPCR and UACI of an ideally encrypted image are 99.6094% and 33.4635%, respectively [48]. Generally speaking, the more NPCR gets close to and the bigger UACI is, the more effective it is for the encryption scheme to resist differential attacks.
We randomly change one pixel and then add 1 on gray value in the plain images to compute one value of NPCR and UACI. We repeat the process 10 times and the average scores of NPCR and UACI of the corresponding image encryption schemes are recorded in Tables 4 and 5, respectively, as the final NPCR and UACI.


In Table 4, although the NPCR scores by the DFBC are not as good as those by CDCP, they are very close to the maximum theoretical scores. DFBC apparently outperforms HCDNA in terms of NPCR, and it achieves comparable results with CHC and ICBSIF. In Table 5, DFBC obviously outperform all the other schemes in 6 out of 8 cases, whereas HCDNA still gets the poorest results in all cases. The values of NPCR and UACI indicate that the DFBC is able to resist differential attacks.
4.5. Robustness Analysis
A digital image is inevitably contaminated by noise or has data loss during storage and transmission. Image encryption should have the ability to resist both noise and data loss. The experimental results of the DFBC for robustness analysis are shown in Figure 10. We firstly add 0.5%, 1%, and 2% salt and pepper noise to the encrypted Lena, and the corresponding decrypted images are shown in Figures 10(b)–10(d), respectively. It can be seen that, for 0.5% and 1% salt and pepper noise, although the decrypted image contains noise, it can clearly recover the original image very well. However, when the noise increases to 2%, we can only see the outline of Lena. When the encrypted image has 0.4% and 1.56% data loss, the proposed DFBC can recover Lena, as shown in Figures 10(e)10(f), respectively. For 4% data loss, the decrypted image retains some information for us to recognize Lena, as shown in Figure 10(g).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
From the analysis, we can see that the proposed DFBC is robust to a certain extent. However, as pointed out by Hua and Zhou, resisting noise, rotation, and cropping attacks are current limitations for image encryption by filtering [26]. The proposed DFBC will be significantly improved when such limitations are resolved.
5. Conclusions
Image security is one of the most important branches of information security. To enhance image security, in this paper, we have proposed a novel image encryption algorithm that combines a 7D hyperchaotic system with 5 positive LEs, dynamic filtering operation, and bit cuboid operations, namely, DFBC, for image encryption. Extensive experiments have shown that the proposed DFBC can outperform some stateoftheart image encryption schemes in terms of several evaluation criteria, indicating that the DFBC is effective for image encryption. In the future, we will study construction of more complex key for the DFBC. Furthermore, since the dynamic filtering can be performed in parallel, we will also implement the algorithm on the framework of CUDA and use GPU to accelerate it.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported partly by the Fundamental Research Funds for the Central Universities (Grants no. JBK1902029, no. JBK1802073, and no. JBK170505), Sichuan Science and Technology Program (Grant no. 19ZDYF0040), the Natural Science Foundation of China (Grant no. 71473201), and the Scientific Research Fund of Sichuan Provincial Education Department (Grant no. 17ZB0433).
References
 B. Schneier, Applied Cryptography: Protocols, Algorithms and Source Code in C, John Wiley & Sons, Indianapolis, IN, USA, 2007. View at: Publisher Site  MathSciNet
 Taiyong Li, Minggao Yang, Jiang Wu, and Xin Jing, “A Novel Image Encryption Algorithm Based on a FractionalOrder Hyperchaotic System and DNA Computing,” Complexity, vol. 2017, Article ID 9010251, 13 pages, 2017. View at: Publisher Site  Google Scholar  MathSciNet
 G. Chen, Y. Mao, and C. K. Chui, “A symmetric image encryption scheme based on 3D chaotic cat maps,” Chaos, Solitons & Fractals, vol. 21, no. 3, pp. 749–761, 2004. View at: Publisher Site  Google Scholar
 Y. Wang, K.W. Wong, X. Liao, and G. Chen, “A new chaosbased fast image encryption algorithm,” Applied Soft Computing, vol. 11, no. 1, pp. 514–522, 2011. View at: Publisher Site  Google Scholar
 X. Wang, L. Teng, and X. Qin, “A novel colour image encryption algorithm based on chaos,” Signal Processing, vol. 92, no. 4, pp. 1101–1108, 2012. View at: Publisher Site  Google Scholar
 Y. Zhang, “The unified image encryption algorithm based on chaos and cubic SBox,” Information Sciences, vol. 450, pp. 361–377, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 F. Özkaynak, “Brief review on application of nonlinear dynamics in image encryption,” Nonlinear Dynamics, vol. 92, no. 2, pp. 305–313, 2018. View at: Publisher Site  Google Scholar
 N. K. Pareek, V. Patidar, and K. K. Sud, “Image encryption using chaotic logistic map,” Image and Vision Computing, vol. 24, no. 9, pp. 926–934, 2006. View at: Publisher Site  Google Scholar
 Z. Hua, F. Jin, B. Xu, and H. Huang, “2D LogisticSinecoupling map for image encryption,” Signal Processing, vol. 149, pp. 148–161, 2018. View at: Publisher Site  Google Scholar
 D. Arroyo, R. Rhouma, G. Alvarez, S. Li, and V. Fernandez, “On the security of a new image encryption scheme based on chaotic map lattices,” Chaos: An Interdisciplinary Journal of Nonlinear Science, vol. 18, no. 3, Article ID 033112, 2008. View at: Publisher Site  Google Scholar
 M. L. Sahari and I. Boukemara, “A pseudorandom numbers generator based on a novel 3D chaotic map with an application to color image encryption,” Nonlinear Dynamics, vol. 94, no. 1, pp. 723–744, 2018. View at: Publisher Site  Google Scholar
 Z. Nanrun, Y. Xingyu, L. Haoran, T. Xiangyang, and L. Guangyong, “Multiimage encryption scheme based on quantum 3d arnold transform and scaled zhongtang chaotic system,” Quantum Information Processing, vol. 17, no. 12, p. 338, Oct 2018. View at: Google Scholar
 M. T. Rosenstein, J. J. Collins, and C. J. de Luca, “A practical method for calculating largest Lyapunov exponents from small data sets,” Physica D: Nonlinear Phenomena, vol. 65, no. 12, pp. 117–134, 1993. View at: Publisher Site  Google Scholar
 A. Wolf, J. B. Swift, and H. L. a. Swinney, “Determining Lyapunov exponents from a time series,” Physica D: Nonlinear Phenomena, vol. 16, no. 3, pp. 285–317, 1985. View at: Publisher Site  Google Scholar  MathSciNet
 J. Wang and G.P. Jiang, “Cryptanalysis of a hyperchaotic image encryption algorithm and its improved version,” Acta Physica Sinica, vol. 60, no. 6, 2011. View at: Google Scholar
 C.X. Zhu, Y.P. Hu, and K.H. Sun, “New image encryption algorithm based on hyperchaotic system and ciphertext diffusion in crisscross pattern,” Journal of Electronics & Information Technology, vol. 34, no. 7, pp. 1735–1743, 2012. View at: Publisher Site  Google Scholar
 C.X. Zhu and K.H. Sun, “Cryptanalysis and improvement of a class of hyperchaos based image encryption algorithms,” Acta Physica Sinica, vol. 61, no. 12, p. 120503, 2012. View at: Google Scholar
 X.L. Chai, Z.H. Gan, Y. Lu, M.H. Zhang, and Y.R. Chen, “A novel color image encryption algorithm based on genetic recombination and the fourdimensional memristive hyperchaotic system,” Chinese Physics B, vol. 25, no. 10, 2016. View at: Google Scholar
 Q. Ran, L. Wang, J. Ma, L. Tan, and S. Yu, “A quantum color image encryption scheme based on coupled hyperchaotic Lorenz system with three impulse injections,” Quantum Information Processing, vol. 17, no. 8, Art. 188, 30 pages, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 H. Zhu, X. Zhang, H. Yu, C. Zhao, and Z. Zhu, “An image encryption algorithm based on compound homogeneous hyperchaotic system,” Nonlinear Dynamics, vol. 89, no. 1, pp. 61–79, 2017. View at: Publisher Site  Google Scholar
 H. Xue, J. Du, S. Li, and W. Ma, “Region of interest encryption for color images based on a hyperchaotic system with three positive Lyapunov exponets,” Optics & Laser Technology, vol. 106, pp. 506–516, 2018. View at: Publisher Site  Google Scholar
 X. Li, W. Chen, and Y. Wang, “Quantum Image CompressionEncryption Scheme Based on Quantum Discrete Cosine Transform,” International Journal of Theoretical Physics, vol. 57, no. 9, pp. 2904–2919, 2018. View at: Publisher Site  Google Scholar
 X. Wu, D. Wang, J. Kurths, and H. Kan, “A novel lossless color image encryption scheme using 2D DWT and 6D hyperchaotic system,” Information Sciences, vol. 349350, pp. 137–153, 2016. View at: Publisher Site  Google Scholar
 X. Chai, Z. Gan, and M. Zhang, “A fast chaosbased image encryption scheme with a novel plain imagerelated swapping block permutation and block diffusion,” Multimedia Tools and Applications, vol. 76, no. 14, pp. 15561–15585, 2017. View at: Publisher Site  Google Scholar
 L. Xu, X. Gou, Z. Li, and J. Li, “A novel chaotic image encryption algorithm using block scrambling and dynamic index based diffusion,” Optics and Lasers in Engineering, vol. 91, pp. 41–52, 2017. View at: Publisher Site  Google Scholar
 Z. Hua and Y. Zhou, “Design of image cipher using blockbased scrambling and image filtering,” Information Sciences, vol. 396, pp. 97–113, 2017. View at: Publisher Site  Google Scholar
 D. Liu, W. Zhang, H. Yu, and Z. Zhu, “An image encryption scheme using selfadaptive selective permutation and interintrablock feedback diffusion,” Signal Processing, vol. 151, pp. 130–143, 2018. View at: Publisher Site  Google Scholar
 G. Ye, C. Pan, X. Huang, and Q. Mei, “An efficient pixellevel chaotic image encryption algorithm,” Nonlinear Dynamics, vol. 94, no. 1, pp. 745–756, 2018. View at: Publisher Site  Google Scholar
 Y. Xiong, C. Quan, and C. J. Tay, “Multiple image encryption scheme based on pixel exchange operation and vector decomposition,” Optics and Lasers in Engineering, vol. 101, pp. 113–121, 2018. View at: Publisher Site  Google Scholar
 K. Zhan, D. Wei, J. Shi, and J. Yu, “Crossutilizing hyperchaotic and DNA sequences for image encryption,” Journal of Electronic Imaging, vol. 26, no. 1, Article ID 013021, 2017. View at: Publisher Site  Google Scholar
 S. Sun, “A novel hyperchaotic image encryption scheme based on DNA encoding, pixellevel scrambling and bitlevel scrambling,” IEEE Photonics Journal, vol. 10, no. 2, pp. 1–14, 2018. View at: Google Scholar
 X. Chai, Z. Gan, K. Yang, Y. Chen, and X. Liu, “An image encryption algorithm based on the memristive hyperchaotic system, cellular automata and DNA sequence operations,” Signal Processing: Image Communication, vol. 52, pp. 6–19, 2017. View at: Publisher Site  Google Scholar
 A. urRehman, X. Liao, M. A. Hahsmi, and R. Haider, “An efficient mixed interintra pixels substitution at 2bitslevel for image encryption technique using DNA and chaos,” Optik  International Journal for Light and Electron Optics, vol. 153, pp. 117–134, 2018. View at: Publisher Site  Google Scholar
 S. Cai, L. Huang, X. Chen, and X. Xiong, “A Symmetric PlaintextRelated Color Image Encryption System Based on Bit Permutation,” Entropy, vol. 20, no. 4, p. 282, 2018. View at: Publisher Site  Google Scholar
 N. Zhou, W. Chen, X. Yan, and Y. Wang, “Bitlevel quantum color image encryption scheme with quantum crossexchange operation and hyperchaotic system,” Quantum Information Processing, vol. 17, no. 6, Art. 137, 24 pages, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 L. Teng, X. Wang, and J. Meng, “A chaotic color image encryption using integrated bitlevel permutation,” Multimedia Tools and Applications, vol. 77, no. 6, pp. 6883–6896, 2018. View at: Publisher Site  Google Scholar
 Y. Dai, H. Wang, and Y. Wang, “Chaotic Medical Image Encryption Algorithm Based on BitPlane Decomposition,” International Journal of Pattern Recognition and Artificial Intelligence, vol. 30, no. 4, 2016. View at: Google Scholar
 A. Shafique and J. Shahid, “Novel image encryption cryptosystem based on binary bit planes extraction and multiple chaotic maps,” The European Physical Journal Plus, vol. 133, no. 8, 2018. View at: Publisher Site  Google Scholar
 Q. Yang, D. Zhu, and L. Yang, “A new 7D hyperchaotic system with five positive Lyapunov exponents coined,” International Journal of Bifurcation and Chaos, vol. 28, no. 5, 1850057, 20 pages, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 M. Brindha and N. Ammasai Gounden, “A chaos based image encryption and lossless compression algorithm using hash table and Chinese Remainder Theorem,” Applied Soft Computing, vol. 40, pp. 379–390, 2016. View at: Publisher Site  Google Scholar
 X. Wang, L. Yang, R. Liu, and A. Kadir, “A chaotic image encryption algorithm based on perceptron model,” Nonlinear Dynamics, vol. 62, no. 3, pp. 615–621, 2010. View at: Publisher Site  Google Scholar
 S. Sheng, X. Zhang, and G. Lu, “Finitetime outersynchronization for complex networks with Markov jump topology via hybrid control and its application to image encryption,” Journal of The Franklin Institute, vol. 355, no. 14, pp. 6493–6519, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 Q. Wang, M. Wei, X. Chen, and Z. Miao, “Joint encryption and compression of 3D images based on tensor compressive sensing with nonautonomous 3D chaotic system,” Multimedia Tools and Applications, vol. 77, no. 2, pp. 1715–1734, 2018. View at: Publisher Site  Google Scholar
 Z. Wang, X. Huang, Y.X. Li, and X.N. Song, “A new image encryption algorithm based on the fractionalorder hyperchaotic Lorenz system,” Chinese Physics B, vol. 22, no. 1, Article ID 010504, 2013. View at: Publisher Site  Google Scholar
 X. Lv, X. Liao, and B. Yang, “Bitlevel plane image encryption based on coupled map lattice with timevarying delay,” Modern Physics Letters B. Condensed Matter Physics, Statistical Physics, Applied Physics, vol. 32, no. 10, 1850124, 25 pages, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 X. Chai, X. Zheng, Z. Gan, D. Han, and Y. Chen, “An image encryption algorithm based on chaotic system and compressive sensing,” Signal Processing, vol. 148, pp. 124–144, 2018. View at: Publisher Site  Google Scholar
 D. R. Stinson, Cryptography: Theory and Practice, CRC press, 2005. View at: MathSciNet
 Y. Wu, J. P. Noonan, and S. Agaian, “NPCR and UACI randomness tests for image encryption,” Cyber Journals: Multidisciplinary Journals in Science and Technology, vol. 2, pp. 31–38, 2011. View at: Google Scholar
Copyright
Copyright © 2019 Xinsheng Li et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.