1. Introduction
With advances in network communications technology, data can now be shared over open public networks and stored on a variety of platforms. As a result, ensuring the security and confidentiality of data has become critical. Any unauthorized access, appropriation, or destruction of network information can not only cause financial losses for computer users but also pose a major threat to the security of whole societies or even countries. Cryptography is a well-known technique for hiding secret information. In cryptography, images and text are encrypted before being transmitted over a network. The inherent characteristics of images, such as tight correlation, high redundancy, and block data capacity between adjacent pixels, distinguish image encryption from text encryption. Encryption is the process of hiding secret information by converting it into an unrecognizable form [
1,
2,
3,
4,
5]. Therefore, network information security has become an important area of scientific research. Among all types of information in the form of data, images are the most important media for information exchange, and their security is particularly important.
Chaotic systems have been widely used in image encryption due to their excellent properties, such as ergodicity, pseudo-randomness, and sensitivity to system parameters and initial conditions. Ma et al. [
6] investigated a fast encryption algorithm based on a 5D chaotic system. Qu et al. [
7] proposed a color image-encryption method based on Hadamard single-pixel imaging and Arnold transform. Kumar et al. [
8] applied the generalized heat equation for image encryption. Patro et al. [
9,
10] used chaotic maps to design an image-encryption algorithm. Khalid et al. [
11] designed a color image-encryption algorithm based on fractional shifted Gegenbauer moments and a 2D logistic sine map. Gao et al. [
12] designed a color image-encryption algorithm using a hyperchaotic map. Arpaci et al. [
13] studied a color image-encryption algorithm based on Chua’s circuit. Yu et al. [
14] designed an image-encryption application for the multiscroll memristive Hopfield neural network. Ren et al. [
15] designed an image-encryption algorithm using a hyperchaotic map with a memristor. Laser-generated chaos can break the electronic bottleneck of traditional chaos, offering the advantages of high bandwidth, complexity, and propagation rates. These advantages have led to laser chaos systems’ widespread use in the field of image encryption and confidential communication. Wang et al. [
16] proposed a color image-encryption strategy based on a double-layer Josephus scramble and a laser chaotic system. Fractional-order calculus is an extension of integer-order calculus based on the advantages of fractional-order chaotic systems, which are closer to self-bounded theoretical properties and have more complex dynamics than integer-order chaotic systems [
17,
18,
19]. Li et al. [
20] designed an image-encryption algorithm based on a fractional-order laser hyperchaotic system. In this study, we designed image-encryption algorithms based on fractional-order laser systems due to their complex dynamics. Although some results have been achieved in the study of image encryption using chaotic systems, the security of individual image-encryption methods using only chaotic systems depends on the complexity of chaotic systems. Therefore, the combination of chaos theory with other theories should be explored to improve the security of image encryption.
The Zig-Zag transform is a simple and effective method of rearranging the pixels of an image. Essentially, this method consists of scanning the elements of a matrix in a specific order, called the Zig-Zag order, starting from the top left corner and moving toward the bottom right corner to scramble the data. The Zig-Zag transform has been widely used in the field of image and video encryption due to its simplicity and low time complexity. Guo et al. [
21] proposed an image-encryption algorithm using the reverse Zig-Zag transformation method. Gao et al. [
22] applied a dynamic Zig-Zag transform and row-scrambling method in image encryption. In addition, DNA computing has received extensive attention from domestic and foreign researchers due to its high parallelism, low energy consumption, and massive storage capacity. Digital image-encryption methods based on DNA computing entail the use of the rules of DNA coding to convert digital images into DNA sequences according to certain coding rules and then operate on them according to the rules of DNA computing [
23,
24,
25,
26]. More secure and efficient encryption algorithms can be designed by combining chaotic systems with DNA encoding techniques. Yildirim [
27] designed a method for color image encryption based on chaotic circuits and extended DNA encoding. Wang et al. [
28] presented an image-encryption method using DNA encoding and compressed sensing. Yan et al. [
29] proposed an image-encryption algorithm based on DNA coding sequences and a 1D logistic map. Wang et al. [
30] applied Fisher–Yates scrambling and a DNA subsequence operation to carry out image encryption. Zhang et al. [
31] combined DNA encoding, phase-truncated FRFT, a hyperchaotic system, and Arnold transform to apply an image-encryption method. Based on the existing references in the literature, most of the image-encryption algorithms based on DNA coding are combined with integer-order chaotic systems, which are known to have richer dynamic characteristics due to their highly nonlinear and nonlocal properties [
32,
33,
34,
35,
36].
It is worth noting that by observing the current technology, most algorithms for DNA coding are based on the four-gene model, and most encryption algorithms based on laser chaotic systems are integer-order models. However, there is not much research on encryption algorithms that combine extended DNA coding methods with a fractional-order laser system, constituting a very valuable direction of research. Therefore, the primary contribution of this paper is the design of a new Zig-Zag transform method, combined with the extension of a DNA encoding method from four bases to eight bases and a fractional-order laser system, leading to the development of a new image-encryption algorithm. The main highlights of this work are summarized as follows.
- (1)
A block Zig-Zag transform method is designed to increase the complexity of image scrambling.
- (2)
The nonlinear dynamical characteristics of FLCS are analyzed using bifurcation diagrams, Lyapunov exponents, and phase diagrams.
- (3)
Based on the sensitivity of the initial value of FLCS and the complex chaotic dynamics properties, a new color image-encryption algorithm based on block Zig-Zag transform, extended DNA coding, and FLCS is designed.
- (4)
The comprehensive performance analysis and statistical analysis results show that the proposed encryption algorithm is highly secure.
This paper is structured as follows:
Section 2 outlines the preliminary material and mathematical models used in this study.
Section 3 gives the detailed procedure of the color image-encryption algorithm based on block Zig-Zag transform and extended DNA coding combined with FLCS. The experimental simulation results are described in
Section 4.
Section 5 verifies the comprehensive performance analysis of the proposed encryption algorithm. Finally, some conclusions are given in
Section 6.
3. Image Encryption and Decryption Scheme
This section explains the 8-bit extended DNA coding and operation rules and details the process of color image encryption and decryption algorithms combined with the block Zig-Zag transform method and FLCS.
3.1. DNA Coding and Operations
The DNA sequence is made up of four bases: Adenine (A), Cytosine (C), Thymine (T), and Guanine (G). Adenine pairs with Thymine (A–T), and Cytosine pairs with Guanine (C–G). In this paper, four lowercase letters (a, t, c, and g) have been introduced to denote additional bases in addition to the original four uppercase letters. In the expanded representation, a is paired with t (a–t), and c is paired with g (c–g). To convert a color image into an extended DNA sequence for encoding and decoding, the following operations are performed. Then, a three-digit binary number in the form of a gene is used. Based on the complementary relationship between DNA bases, as the number of nucleotide bases increases from 4 to 8 bits, 384 of the 40,320 coding combinations allow complementary base pairing within the 8 bases. The coding rules for these 384 types are shown in
Table 1.
Each pixel of a color image is made up of three components, R, G, and B, each of which can be converted to 8 bits, and the three components combined to 24 bits. For example, a pixel of a color image consists of three components, C_R = 134, C_G = 120, and C_B = 38, which are combined and then coded in the 10th coding mode in
Table 1, where each component can be converted to 8 bits, and then the three components can be combined to 24 bits, C_RGB = [10000110, 01111000, 00100110]. By selecting the 10th encoding method in
Table 1, C_RGB (10) = [c, C, c, T, c, A, c, G]. With this method, the color image can be converted into an extended DNA coding form.
The calculation of DNA sequences is achieved by bitwise operations, with four methods of bitwise operations, after encoding eight bases for addition, subtraction, XOR, and XNOR operations.
Table 2,
Table 3,
Table 4 and
Table 5 show the four bitwise operations of addition, subtraction, XOR, and XNOR when [A, a, C, c, g, G, t, T] is represented by [000, 001, 010, 011, 100, 101, 110, 111], respectively.
Based on the DNA encoding, decoding, and operation strategies, when the attacker tries to find the phase that matches the DNA encoding rules in the proposed algorithm, the probability of finding the correct encoding rule is 1/384 compared to the previous research results [
28,
29,
30,
31]. Additionally, DNA encoding and decoding operation rules such as addition, subtraction, XOR, and XNOR further enhance decoding possibilities to
. Therefore, the eight-base DNA coding method can be demonstrated to increase the security of image encryption.
3.2. Encryption Algorithm
The flowchart of the color image-encryption process based on Zig-Zag transformation, extended DNA coding, and FLCS is shown in
Figure 5, and the detailed implementation steps of the encryption algorithm are as follows:
Step 1: Input the primitive plaintext image of dimension 3 and divide the image into components.
Step 2: Compute the initial value
of FLCS as follows:
Step 3: Set the initial values of FLCS as the secret key. The chaotic sequences are generated by FLCS.
Step 4: The chaotic sequences are calculated by Equation (6) to obtain
.
Step 5: The extended Zig-Zag transform is applied to the pixels in
using the three methods of chaotic sequence
representation, as shown in
Figure 3 and
Figure 4, respectively.
Step 6: Merge the 8-bit binary pixel values of into the 24-bit binary pixel values .
Step 7: The chaotic sequence
represents the 384 DNA coding methods in
Table 1. Divide
into equal blocks
and code each block separately according to
.
Step 8: The chaotic sequence is converted into equal chaotic block and coded blocks, which are equal to .
Step 9: The chaotic sequence represents the four DNA operations of addition, subtraction, XOR, and XNOR. The is calculated with according to the DNA calculation operations defined by to obtain .
Step 10: Merge matrix block into and decode according to .
Step 11: Convert 24-bit binary to 8-bit binary , and .
Step 12: Arrange
and
in descending order according to the following formula to obtain the sequence of positions
and
before the ordering of each element in the sequence.
Perform row substitution and column substitution on the matrices of , , and using the sequence values of and as the corresponding indices of the row and column exchange coordinates.
Step 13: Merge the R, G, and B components to obtain a ciphertext image.
3.3. Decryption Algorithm
Image decryption involves recovering the original image using the same key used for encryption. It is the inverse process of the image-encryption process. First, the R, G, and B components of the ciphertext image are inverted by row–column conversion, respectively, and the converted R, G, and B components are merged and divided into blocks. Second, encryption and decryption operations are performed on each piece of data using DNA operation rules that are the opposite of the encryption process. Then, the DNA-decoded data blocks are merged and divided into R, G, and B components. Each component is subjected to a Zig-Zag inverse transformation operation. Finally, the three components are merged into the initial image. The detailed flowchart of the decryption algorithm is presented in
Figure 6.
4. Experimental Simulation Results
In this paper, all the experiments are performed on a computer with an Intel Core i7-10710U 6-Core 1.10 Ghz and 32 GB of memory. The operating system is Windows 10, and the software is MATLAB R2020b. For the experiments and performance analyses, test images were selected from the web and publicly available databases such as the USC-SIPI database [
38]. This section tests the effectiveness of encryption algorithms and decryption algorithms for different sizes and types of color images.
Lena image (
Figure 7(a1), size 256 × 256), Fruits image (
Figure 7(b1), size 512 × 480), Tree image (
Figure 7(c1), size 256 × 256), and Peppers image (
Figure 7(d1), size 512 × 512) were used to test the feasibility of the proposed algorithm. The secret key was set to
. As can be seen from the experimental results, the encrypted images do not correlate with the original image, and there is no obvious difference between the reconstructed image and the original image visually, which indicates that the encryption scheme has produced good results.
5. Performance Analyses
Good encryption algorithms require good security performance. This section mainly measures the security performance of the proposed algorithm using key security analysis, histogram analysis, correlation analysis, information entropy analysis, differential attack analysis, robustness analysis, classical attack analysis, and time complexity analysis. The experimental results show that the encryption algorithm designed in this paper can withstand various types of attacks.
5.1. Key Analysis
Key analysis includes key space analysis and key sensitivity testing. The encryption algorithm designed in this paper uses four initial values and five parameters of FLCS as the secret key. Assuming that the computational accuracy of the computer is , the secret key space is . This is a huge key capacity and is sufficient to resist the exhaustive key-based approach to cracking the image.
To test the key sensitivity, the Lena image (256 × 256) is adopted, each of five control parameters of FLCS is modified by adding and only one parameter is changed at a time.
In the simulation test, the original image Lena is encrypted using both the correct and modified keys. The encrypted images are shown in
Figure 8, and the ratio of pixel changes between the encrypted images using the correct and incorrect keys are calculated and listed in
Table 6. It is obvious that these encrypted images are dissimilar to each other, and more than 99.5% of the pixels have been changed.
In addition, decryption was performed with the correct key and the slightly incorrect keys to evaluate the key sensitivity of the decryption process. The experimental results in
Figure 9 show that even with a slight change in the key, the correct plaintext image cannot be decrypted, indicating that the algorithm is highly sensitive to the key.
5.2. Histogram Analysis
The histogram of pixels reveals the distribution of all the pixels in an image. An efficient encryption algorithm can encrypt the pixels by altering the distribution of the pixels and obliterating the statistical features of the image.
Figure 10 shows the histograms of the original and encrypted images of the Lena, Fruits, Tree, and Peppers images. As can be seen from the figure, the frequency distribution of the pixel values of the ciphertext image after encryption is very different from that of the plaintext image. Additionally, the pixel values in the original plaintext image are unevenly distributed, while those in the ciphertext image appear with equal probability. These observations suggest that the encryption process can alter the distribution of the pixel information in the plaintext image, enabling it to be obscured within the ciphertext image to a greater extent.
Furthermore, we quantitatively assessed the homogeneity of the histograms using the variance and chi-square (
), respectively. The variance of the histogram is calculated as:
where
is the vector of histogram values,
and
are the gray values
and
, respectively.
Table 7 shows the variance of the plaintext and ciphertext images of the test images. According to the experimental data, it can be seen that the variance value of the image changes drastically before and after encryption; the lower the variance value, the better the consistency of the image.
The chi-square (
) of the histogram is calculated by
where
is the expected frequency of each gray value, and
is the gray value
. The chi-square (
) values of the histogram for the test images are shown in
Table 8. The data in the table are less than the critical value of A, which means that the histogram of the encrypted images is uniform.
Therefore, the encryption algorithm proposed in this paper is better able to resist histogram attacks.
5.3. Correlation Analysis
Digital images typically have a high degree of data redundancy, and there can be extremely high correlations between adjacent pixels. Image-encryption algorithms should effectively break the correlation between pixels to minimize their correlation and improve the security of image encryption. The formula for calculating the correlation coefficient is defined as:
where
and
are the neighboring pixel values, and
is the number of selected pixel pairs. In this experiment, test images were computed for 6000 pairs of randomly selected adjacent points in the horizontal, vertical, and diagonal directions.
Figure 11 shows the neighboring pixel distribution of the original and encrypted images of the Lena image. The correlation data for the test images are given in
Table 9. The results show that the correlation coefficients of the plaintext images of the four types of images are very high, indicating that the pixel values of the adjacent pixels are very different and lack pixel independence, while the correlation coefficients of the encrypted ciphertext images are almost close to zero, proving that the scrambling method and the diffusion method of the images are very good and the correlation between the pixels can be effectively broken.
5.4. Information Entropy Analysis
Information entropy is a crucial metric for measuring the randomness of encryption. It is a physical quantity that reflects the level of confusion in the pixels of a ciphertext image. The degree of order within a system is inversely proportional to its information entropy. The more ordered the system, the lower the information entropy; conversely, the higher the information entropy, the more chaotic the system. Information entropy is a measure used to quantify the level of organization in a complex system and is defined as follows:
where
is the pixel value,
is the probability of a pixel occurring. If the information entropy of an encrypted image is closer to 8, the arrangement of pixels in the ciphertext image is more random, and therefore, the encryption effect is better. By comparing the data in
Table 10, the information entropy of the encryption algorithm designed in this paper is closer to 8. Furthermore, the average result of information entropy result for the Lena image is superior to that of other algorithms [
2,
8,
13,
26]. Additionally, it can be observed that the color images encrypted using the algorithm proposed in this paper exhibit a high level of randomness.
5.5. Differential Attack Analysis
A differential attack is a type of selective plaintext attack that looks for a link between plaintext and ciphertext by tracking the effect of small changes in the plaintext on the ciphertext and using the established link to recover the ciphertext without a key. To resist differential analysis, encryption algorithms are highly sensitive to the plaintext image, and small changes in the plaintext image encrypted by the encryption algorithm will produce a completely different ciphertext image. The algorithm’s resistance to differential attacks is typically assessed using two key measures: NPCR is the ratio of pixels with different pixel values at the corresponding positions of two images to the total number of pixels, which has a theoretical value of 99.6094%, and UACI is the average of the ratios of the difference of the pixels at the corresponding positions of the two images to the ratio of 255. UACI is the average value of the ratio of the difference of all pixels at corresponding positions between two images to 255, which calculates the extent to which the pixels at the corresponding positions of two images are not the same, and its ideal value is 33.4635%. Their formulae are as follows:
where
and
represent the size of the image,
and
are two compressed and encrypted images that differ from the original image by only one pixel. As shown in
Table 11, the test results closely match the ideal values. This indicates that the ciphertext image obtained from two plaintext images with a difference of only one pixel is significantly varied. Therefore, the algorithm proposed in this paper is sensitive to plaintext changes and provides better resistance against differential attacks.
5.6. Robustness Analysis
Ciphertext images can be contaminated by different types of noise during transmission, making it difficult to correctly recover the original image. Typically, noise attacks and occlusion attacks are used to test the robustness of the system. The anti-noise capability of the encryption algorithm can be assessed by utilizing the Peak Signal-to-Noise Ratio (PSNR). PSNR is calculated mathematically using the following equations:
where
and
refer to the height and width of the image,
and
are the respective pixels located at
in the original image and the ciphertext image. Taking the color Lena image (512 × 512) as an example, the robust performance of the proposed algorithm is analyzed.
5.6.1. Noise Attack Analysis
In this subsection, the noise attacks are tested using a Salt and Pepper Noise (SPN) attack. First, SPN with different densities are added to the Lena ciphertext image. Then, the proposed encryption algorithm is applied for decryption.
Figure 12a–c shows the images after the SPN attack with noise densities of 0.01, 0.1, and 0.2, while
Figure 12d–f displays the corresponding decrypted images. As shown in the figure, with the addition of varying densities of SPN to the encrypted image, most of the information in the original image can be decrypted, although the decrypted image is affected to different degrees.
Table 12 lists the PSNR comparison results of the decrypted images with other color encryption algorithm, which show that the proposed algorithm in this paper is noise-resistant.
5.6.2. Occlusion Attack Analysis
A cropping attack is a type of covert attack. When a ciphertext image is targeted by a cropping attack, it is necessary to retain as much detailed information as possible to reduce the effect of cropping on the whole image.
Figure 13 depicts the Lena ciphertext image being cropped to
,
, and
, along with the corresponding decrypted images. As can be seen from the resultant graph, the decrypted image is slightly blurred, yet the visual content remains discernible, indicating that the algorithm can avoid the impact of some data loss and restore the original image significantly.
Table 13 exhibits the PSNR values of the original and decrypted images and the comparison with the existing color encryption algorithm. Therefore, the proposed encryption technique in this paper shows high resilience against data loss attacks.
5.7. Classical Types of Attacks Analysis
This section demonstrates the ability of encryption systems to withstand classic kinds of attacks, including chosen plaintext attacks, chosen ciphertext attacks, ciphertext-only attacks, and known plaintext attacks. Objective evidence is crucial, as attackers typically select all-black or all-white original images to expose vulnerabilities in the cryptosystem.
Figure 14 shows the corresponding encrypted images and histograms for both the all-white and all-black images, each sized 256 × 256. Experimental results show that the encryption method can resist chosen plaintext attacks and known plaintext attacks.
In addition, it is worth noting that FLCS is highly sensitive to initial values. In the encryption algorithm designed in this paper, a portion of the initial values of FLCS is generated using the original image. This generates chaotic sequences that are highly sensitive to the original image and are subsequently used for the Zig-Zag transform and extended DNA coding encoding. Therefore, during the process of image scrambling, each pixel is associated with other pixels, and small changes in the pixel values can produce an avalanche effect. The proposed algorithm can withstand ciphertext-only attacks and chosen ciphertext attacks.
5.8. Time Complexity
In the proposed encryption algorithm, the most time-consuming procedures include generating chaotic sequences via FLCS, performing Zig-Zag transformation, and conducting extended DNA computation. To encrypt an image with size M × N, the initial step involves attaining the chaotic sequences , with a time complexity of . The time complexity for the Zig-Zag transformation is also . Meanwhile, the time complexity of extended DNA computation equates to . Hence, the final time complexity of the proposed algorithm is . The encryption and decryption time for a color Lena image of size 256 × 256 is 1.911 s and 1.946 s, respectively, under this computer configuration.
6. Conclusions
In this paper, the complex dynamic characteristics of FLCS were analyzed, demonstrating its chaotic phenomena and consequent generation of chaotic sequences. The traditional Zig-Zag transform method and DNA coding rule were then extended, resulting in the creation of the block Zig-Zag transform method and 8-bit DNA coding rule for image scrambling. To enhance the security of the algorithm, the two methods were combined with the chaotic sequences produced by FLCS to create a new color image encryption algorithm. Finally, the results of experiments and security analyses indicate that the algorithm has a large secret key space and strong sensitivity to secret keys. The information entropy, NPCR, UACI, and correlation coefficients of the encrypted images are nearly equivalent to their theoretical values. Therefore, the encryption algorithm designed in this paper demonstrates a better ability to resist statistical attacks, differential attacks, and noise attacks, and can effectively safeguard the security of transmitted image information.