Abstract

This paper proposes a method of encrypting images with password protection for secure sharing based on deoxyribonucleic acid (DNA) sequence operations and the tangent-delay ellipse reflecting the cavity-map system (TD-ERCS). The initial values of the TD-ERCS system are generated from a user’s password, and the TD-ERCS system is used to scramble the pixel locations of the R, G, and B matrices of the original image. Next, three DNA-sequence matrices are generated by encoding the permuted color image such that it can be transformed into three matrices. Then, the TD-ERCS system is employed to generate three chaotic sequences before encoding the DNA into the three matrices. Thereafter, a DNA exclusive OR (XOR) operation is executed between the DNA sequences of the permuted image and the DNA sequences generated by the TD-ERCS system to produce three encrypted scrambled matrices. Finally, the matrices of the DNA sequences are decoded, and the R, G, and B channels are recombined to form an encrypted color image. The results of simulation and security tests reveal that the proposed algorithm offers robust encryption and demonstrates the ability to resist exhaustive, statistical, and differential attacks.

1. Introduction

With recent developments in technology and Internet-based activities, computer networks have fundamentally transformed human communication. Individuals can now join a variety of different networks to access and share various types of multimedia and data. However, online networks are not without risks, and due to the open nature of many networks, public concerns regarding the security and safety of data that is exchanged online are now higher than ever [1].

Digital images play a large role in multimedia communication, and thus, it is critical that appropriate mechanisms are in place to protect this information. Traditional block encryption approaches, such as AES, IDEA, and DES, can encrypt images effectively and ensure their safety to an extent. However, they cannot protect against transmission noise, which can be introduced to a digital image during the transmission process [2]. Therefore, research must be conducted to investigate algorithms that can provide increased protection via more comprehensive image encryption.

Developments in the field of chaos theory have created new opportunities for image-encryption techniques. Chaos-based image-encryption algorithms are fast and secure methods that offer many beneficial features, such as ergodicity, mixing, and strong sensitivity to initial conditions and system parameters [3]. Therefore, they represent promising encryption approaches that can potentially provide the protection required to enhance the security of images shared via digital networks.

Since the 1990s, scholars have observed a close correlation between cryptography and chaos [4], and chaos can potentially be employed within the permutation-diffusion architecture proposed by Mao, Guan, and Pareek et al. [57]. This architecture has attracted the interest of researchers worldwide and has led to the expansion of chaos-based encryption. Despite the fact that these procedures have demonstrated some advances, chaos-based encryption is still considered to be weak against known/chosen plaintext attacks [8]. A range of chaos-based innovations have emerged in this field, spanning various systems, including novel permutation techniques [913], new diffusion approaches [14, 15], hyperchaotic map systems [16, 17], a simultaneous image encryption-compression scheme [18, 19], and novel transform domains [20, 21].

However, many of these image-encryption schemes have been deciphered without knowing the secret keys. For instance, the chaos-based encryption in [4] is still reported to be weak against known/chosen plaintext attacks [22]. In addition, a cryptographic analysis has been introduced in [23] to break a chaotic encryption scheme that employs autoblocking and electrocardiography, which produces a sequence of random numbers using a logistic map and a 2D Arnold map. Furthermore, another chaotic image cryptanalysis scheme based on image entropy has been proposed in [24]; however, it still retains the insecurity issues of the chaotic image cryptosystem.

One area of particular interest is deoxyribonucleic acid (DNA) coding-based cryptosystem. These revolutionary approaches to encryption exploit the vast storage space, immense parallelism, and ultralow power consumption of DNA computing [25]. Given the significant potential of this area, researchers have studied a range of cryptosystem that combine chaos theory with DNA encoding [2637]. In [27, 30, 31, 33], a logistic map and its variants were employed as key stream generators, whereas hyperchaotic systems within a DNA coding collaboration are introduced in [26, 28, 29, 32, 35, 37]. The logistic map has some drawbacks for information encryptions, such as small key space, insufficient complexity, and low security, which allow easy decryption of the encryption schemes [38]. Hyperchaotic systems within a DNA coding method have proven to be insecure by proposing a chosen plaintext attack method by Feng and He [39].

To overcome this problem, this paper proposes a new image-encryption approach that employs secure image sharing based on DNA-sequence operations and tangent-delay ellipse reflecting cavity-map system (TD-ERCS) maps. The TD-ERCS system is used as chaotic map for its complexity and has proved to be immune against differential attacks [40]. The preliminary values for the TD-ERCS system are produced by calculating SHA-256 from a user’s password. The encryption approach employs diffusion and confusion. The generated TD-ERCS system is used to permute the positions of the pixels in the original image, thereby confusing it. Subsequently, the permuted image is DNA encoded before the TD-ERCS system and DNA encoding are employed to generate a mask image. Next, DNA XOR is performed between the mask image and permuted image to generate the scrambled image. Finally, DNA decoding is applied to the scrambled image to generate an encrypted image and, in doing so, achieve diffusion.

The remainder of this paper is organized as follows: Section 2 provides preliminaries, while Section 3 introduces the encryption scheme. Section 4 presents the experimental results and discussion, and Section 5 concludes the paper.

2. Preliminaries

In this section, a brief discussion of the TD-ERCS system and DNA sequences is provided.

2.1. Tangent-Delay Ellipse Reflecting Cavity-Map System

In 2004, Ke-Hui and Chuan-Bing developed a novel chaotic system named TD-ERCS [41]. TD-ERCS is a special two-dimensional map based on a physical model of an elliptical reflecting cavity. The system fulfills certain criteria, such as a maximum Lyapunov exponent greater than zero, zero correlation over the entire field, and unchangeable equiprobability [42]. The TD-ERCS can be mathematically described as follows [43]:where x0, μ, α, and j are the initial or seed parameters of the TD-ERCS. The seed parameters in the TD-ERCS are as follows: μ ∈ [0, 1], x0 ∈ [−1, 1], and α ∈ [0, π] and the tangent-delay parameters m (m = 1, 2, 3, 4, 5, 6, …). Figure 1 illustrates the iterations of continuous chaotic systems. The plots are generated by the TD-ERCS with initial parameters μ = 0.3324, x0 = 0.2456, α = 2.143, and m = 2 and with n = 2,500 iterations.

2.2. DNA-Sequence Operations
2.2.1. DNA Encoding and Decoding

DNA is a biological material present in nearly all living organisms. Parents’ DNA is transmitted to a child, thus causing the child to inherit the parents’ features. In humans, DNA is shaped like a twisted ladder and contains four nucleobases: adenine (A), cytosine (C), guanine (G), and thymine (T) [44]. Watson and Crick published an article in 1953 [45] that presented the DNA complementary rule. This rule states that adenine (A) bonds with thymine (T) and that guanine (G) bonds with cytosine (C). Figure 2 illustrates the structure of DNA.

A computer system deals with binary numbers and is composed of two numbers only: 0 and 1 that can be opposite or complementary. For instance, numbers 00 and 11 are complementary, as are 01 and 10. The four DNA bases A, C, G, and T are used to represent a binary sequence of 00, 11, 10, and 01, respectively, in the DNA sequence. Eight coding rules convert the binary sequence into DNA code, as demonstrated in Table 1 [46].

A digital image comprises pixels of intensities in the range of 0 to 255. For an image pixel to be displayed, it is first transformed into a binary sequence of length 8 and then expressed as a DNA sequence of length 4. For instance, if the image pixel value is 89 (binary sequence: 01011001), it can be encoded into a DNA sequence (AATA) according to encoding rule #3.

2.2.2. DNA Exclusive OR Operation

Due to the rapid development of DNA computing, several biological and algebraic operations have been proposed for DNA sequences, such as the XOR operation [47]. This operation is executed for a DNA sequence in the same way as a traditional XOR operation is executed in a binary sequence. Because there are eight DNA encoding rules, there are also eight DNA XOR rules. Table 2 presents the DNA XOR operations [48].

3. Proposed Algorithm

The encryption algorithm in this paper comprises two components: encryption and decryption. The algorithm has a pair of chaotic sequences (x, y) created by employing a TD-ERCS and three generated chaotic sequences: x, y, and z from a single map. In this study, x and y were used for position scrambling and x, y, and z were used for pixel scrambling via the DNA XOR method. Figure 3 illustrates the proposed encryption and decryption schemes.

3.1. Key Generation

The proposed encryption scheme employs a user's password to generate secret keys. First, SHA-256 is used to generate a message digest of 256 bits for the password. The 64 hash values of the message digest are then divided into eight hexadecimal groups: k1, k2, …, k8. Each group contains eight hexadecimal values and is converted into a floating decimal number via the following equation:where j = 1, 2, …, 8. The first set of the TD-ERCS initial values (μ, x0, α, and m) is computed by

The second set of initial values (μ, x0, α, and m) for the TD-ERCS system is calculated as

3.2. Image Encryption

The process of encryption involves the following steps:Step 1. Conversion of the original color image to three matrices: R(m, n), G(m, n), and B(m, n).Step 2. Generation of a pair of chaotic sequences, xnew = (x1, x2, …, xmn) and ynew = (y1, y2, …, ymn), via a TD-ERCS chaotic map. This uses the starting values μ, x0, α, and m, as described in Section 3.1.Step 3. Use of the method outlined below to prepare the x and y chaotic sequences:where [•, •] = sort, (•) represents the type of index function, fx represents the new series of the X sequence, lx represents the index value of fx, and ly is equal to lx.Step 4. Application of the combination (xnew, ynew) for scrambling R, G, and B positions usingStep 5. Conversion of Rnew, Gnew, and Bnew to binary matrices. DNA encoding is then employed to encode these binary matrices, as detailed in Section 2.1. This results in three remodeled coding matrices: Rdna, Gdna, and Bdna, sized (m, n × 4).Step 6. Generation of three chaotic sequences Xn = (x1, x2,…, xmn), Yn = (y1, y2, …, ymn), and Zn = (z1, z2, …, zmn) via a TD-ERCS chaotic map. This uses the starting values of the second set, μ, x0, α, and m, as detailed in Section 3.1. Then, these generated values are converted into a range from 0 to 256 according towhere k ranges from 0 to M × N. Thus, the mask image is generated.Step 7. Conversion of Xe, Ye, and Ze to binary matrices. DNA encoding is then employed to encode these matrices. This results in three remodeled coding matrices: Xdna, Ydna, and Zdna, sized (m, n ×4).Step 8. Execution of the DNA XOR operation among (Rdna and Xdna), (Gdna and Ydna), and (Bnew and Zdna). This results in three encrypted matrices: Rc, Gc, and Bc.Step 9. Generation of the final encrypted image by performing a DNA decoding operation for Rc, Gc, and Bc. This results in three new matrices with values ranging from 0 to 255: Renc, Genc, and Benc.

3.3. Image Decryption

The image decryption steps are as follows:Step 1. Conversion of encrypted color image to three matrices: R(m, n), G(m, n), and B(m, n).Step 2. Conversion of R, G, and B to binary matrices. DNA encoding is then employed to encode these binary matrices, as detailed in Section 2.1. This results in three remodeled coding matrices: Rdna, Gdna, and Bdna, sized (m, n ×4).Step 3. Generation of three chaotic sequences Xi = (x1, x2, …, xmn), Yi = (y1, y2, …, ymn), and Zi = (z1, z2, …, zmn) via a TD-ERCS chaotic map. This employs the starting values of the second set, μ, x0, α, and m, as discussed in Section 3.1. The generated values are then converted into range of 0 to 256 according towhere k ranges from 0 to M × N. Thus, the mask image is generated.Step 4. Conversion of Xe, Ye, and Ze to binary matrices. Then, DNA encoding is employed to encode these matrices. This results in three remodeled coding matrices: Xdna, Ydna, and Zdna, sized (m, n ×4).Step 5. Execution of the DNA XOR operation among (Rdna and Xdna), (Gdna and Ydna), and (Bdna and Zdna). This results in three decrypted matrices: Rd, Gd, and Bd.Step 6. Generation of a pair of chaotic sequences, xnew = (x1, x2, …, xmn) and ynew = (y1, y2, …, ymn), via a TD-ERCS chaotic map. This uses the first set of starting values, μ, x0, α, and m, as detailed in Section 3.1.Step 7. Use of the method outlined below to prepare the x and y chaotic sequences:where [•, •] = sort, (•) represents the type of index function, fx represents the new series of the X sequence, lx represents the index value of fx, and ly is equal to lx.Step 8. Application of the combination (xnew, ynew) for recovering Rd, Gd, and Bd positions using

Then, the final decrypted image is constructed by recombining these three matrices into a color image.

4. Simulation Results

Twenty color images of 512 × 512 pixels each were selected from the USC-SIPI image database (the USC-SIPI image database is available at http://sipi.usc.edu/services/database/Database.html) and UCID image database (the UCID image dataset is available at http://homepages.lboro.ac.uk/cogs/datasets/ucid/data/ucid.v2.tar.gz.) for testing. Figure 4 displays the images. The first two rows show the USC-SIPI images, and the next two rows show the UCID images. Performance analysis was performed for the proposed encryption scheme in terms of histogram analysis, correlation coefficient analysis, and differential attack resistance using the number of pixels change rate (NPCR) and the unified average changing intensity (UACI). Simulation experiments were performed on a personal computer with Intel Core i7-6500U, 3.0 GHz, 4 GB using Matlab R2017a and the Windows 10 operating system.

4.1. Key Space Analysis

For a secure cryptosystem, the key space must be large enough to withstand all kinds of brute-force attacks. Furthermore, the key space of the proposed encryption scheme is represented by the TD-ERCS seed parameters. If the precision is set to 10−15 for all the parameters, the key space size is 1090. This key space is large enough to resist brute-force attacks.

4.2. Histogram Analysis

Histograms of an image are used to represent the pixel distribution for each color intensity level. An ideal image-encryption algorithm produces a histogram of the encrypted image with a uniform distribution. The histograms of the original and encrypted image (Lena) are displayed in Figures 5(a)5(d) for the red, green, and blue components, respectively. It should be noted that the histograms of encrypted images are flat and thus differ from the original images. Therefore, the proposed encryption scheme can resist statistical attacks.

4.3. Mean-Square Errors and Peak Signal-to-Noise Ratio

The peak signal-to-noise ratio (PSNR) and mean-square error (MSE) are two error measures that are widely used for comparing image quality. The MSE refers to the cumulative square error between the original image and encrypted image. The higher the value of the MSE, the higher the probability that the encrypted images are distorted and noisy. The MSE can be calculated according towhere x(i, j) refers to the original image, y(i, j) refers to the encrypted image, and (i, j) refers to the coordinates of the image pixels of size M × N.

The PSNR represents the noise ratio between the original image and the encrypted image and is measured in decibels (dB). Low PSNR values indicate that the encryption scheme results in high degradation of the encrypted images. Equation (12) is used to calculate the PSNR:where Imax is the maximum intensity of the image. For an 8-bit image, Imax is set to 255. Table 3 displays the computed MSE and PSNR values for the test images.

These results demonstrate that the proposed encryption scheme can produce ciphered images with high degradation.

4.4. Correlation Coefficient Analysis

Correlation refers to the linear relation between two variables. For images, it is used to indicate the relation between two adjacent pixels. Normally, plain images possess a high correlation between adjacent pixels. Thus, a secure encryption scheme should reduce the correlation between adjacent encrypted image pixels to resist a statistical analysis attack. To evaluate the correlation between two adjacent pixels, 4,000 pairs of neighboring pixels in the vertical, horizontal, and diagonal directions were randomly selected from a plain image and corresponding encrypted image. The correlation coefficient was computed according towhere (rxy) is the correlation coefficient, x and y are the gray-level values of two adjacent pixels, N is the number of pairs (xi, yi), E(x) is the xi mean, and E(y) is the yi mean. Figure 6 illustrates the correlation coefficient for the original image (airplane) and the corresponding encrypted image. The correlation coefficient was computed for all test images vertically, horizontally, and diagonally; Table 4 provides the results. The results reveal that the correlation coefficient of the encrypted images is close to zero or negative. Therefore, there is no correlation between adjacent image pixels.

Along with this analysis, the proposed scheme was compared to two representative methods from other schemes [34, 35, 49, 50]; Table 5 presents the correlation coefficient results for the encrypted Lena image. The proposed scheme obtained results superior to those of the reference methods, as the encrypted image correlation coefficient values were smaller than those obtained by the reference methods.

4.5. Entropy Information

In information theory, entropy information is defined as the uncertainty of information content and can be used to measure the randomness of a data sequence. It is expressed as follows:where H is the image entropy and p(mi) refers to the probability of symbol m. For digital images with 28 pixels of, the maximum information entropy is 8. The higher the entropy value of the encrypted image, the more uniform the distribution. Table 6 presents the information entropy results. From these results, it is evident that the entropy values of the test images are very close to the ideal value. This indicates that the proposed encryption scheme is secure against an entropy attack. In addition, Table 7 presents an average entropy analysis for the five images for the proposed method and the other reference methods from [36, 37, 43, 51]. The results indicate that the proposed scheme has superior performance, as demonstrated by its higher entropy values.

4.6. Differential Attack

Usually, the p attacker introduces a minor alteration (e.g., changing one pixel) to an unaltered image and, by doing so, creates a pair of cipher images that employ an identical encryption algorithm. The attacker then breaks into the cryptosystem by following the variations of this pair of encrypted images; this is referred to as a differential attack.

To examine what happens to an encrypted image when a single pixel is altered in the original image, the NPCR was calculated, as given in (15) and (16), and the UACI was computed, as given in (13):where M represents the width of the encrypted image, N represents the height, L is the pixel number, and T is the largest allowed pixel value for the image. The cipher images are represented by C1 and C2, which differ from the matching plain images by a single pixel. It is clear that if the differential attack is to be repelled via an effective cryptosystem, the UACI and NPCR values should be sizable.

In the numerical experiment that follows, the original image was encrypted. A single pixel was then selected at random from the image, and a small modification was performed. Then, the plain image was reencrypted with modifications employing identical means. The UACI RGB and NPCR RGB values were then calculated using a pair of cipher images. Table 8 presents the relevant data for these experiments. As Table 8 demonstrates, this methodology resulted in sizable UACI and NPCR levels. Thus, the proposed algorithm could detect minuscule alterations to the plaintext and was able to repel a differential attack.

The proposed method was also compared with reference methods [36, 37, 43, 51] for the encrypted Lena image, as presented in Table 9. The NPCR and UACI values for the proposed method are superior, as they are higher than the values obtained using the reference methods.

4.7. Analysis of Noise and Data Loss Attacks

There are several different types of noise existing in public multimedia channels such as Internet and wireless communication networks. Such noise belongs to a kind of attack that has no intentions; they decrease the image quality. Common types of noise include salt-and-pepper noise and Gaussian noise; they are different kinds of image noise. A wide range of noise is present in open interactive media channels such as wireless communication and the Internet. Such noise is a sort of attack that has no goals; it just distorts the image quality. Salt-and-pepper noise and Gaussian noise are the two types of image-noise attack. The experimental results in Figures 7 and 8 show the performance of the proposed algorithm after exposure to a noise attack. The experimental effect is illustrated in Figures 7 and 8; the top row shows the encrypted images after applying salt-and-pepper noise and Gaussian noise attacks on the test images. The bottom row shows the images reconstructed from the noisy images. Notably, the reconstructed images affected by the noise attack still retain most of the plain image information. These experimental outcomes prove that the proposed algorithm has excellent performance against noise attacks. The original images can be recovered even if the communication channel is noisy.

The test against a data loss attack is shown in Figure 9. The top rows show the encrypted images after cutting parts of them in different sizes and locations, and the bottom rows show the reconstructed images after cropping. The reconstructed images after the attack obviously contain most of the original image data and can still be recognized.

5. Conclusion

In this paper, a new image-encryption algorithm is proposed using a TD-ERCS chaotic system, DNA-sequence operation, and Secure Hash SHA-256. From the above discussion, the positions of the image pixels are permuted by the TD-ERCS system, and the pixel gray values of the plain image are scrambled using DNA-sequence XOR operations. Based on the experimental results and security analysis, the efficiency of the algorithm encryption is found to be good. Furthermore, the proposed algorithm is able to resist most common attacks, such as statistical analysis, exhaustive attacks, differential attacks, and noise attacks. All these features make the algorithm efficient for secure digital image transmission.

Data Availability

The test image data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that there are no conflicts of interest.