1. Introduction
In recent years, various image encryption schemes based on diverse theories and technologies have been developed to enhance the security of digital images during transmission and storage. Notable among these are methods based on chaos [
1,
2,
3,
4], DNA coding [
5,
6,
7,
8], coupled mapping [
9,
10], S_box [
11], and compressed sensing [
12].
Recently, DNA technology has been commonly used in digital image encryption because of its advantages of large-scale parallelism, high information density, low power consumption, and no rounding error in image encryption based on DNA operation. In [
13,
14], an image encryption algorithm was developed by combining logistic chaotic mapping and DNA computing. In [
15,
16], image encryption schemes based on the DNA theory and double random phase coding (DRPE) technology were designed using different chaotic systems. In [
17], an image encryption scheme based on a nested chaotic map and DNA was proposed. In [
18], based on the traditional binary XOR operation, an advanced DNA sequence XOR operation was defined and combined with a one-way coupling mapping lattice (OCML) to develop an innovative, robust, and lossless color image encryption algorithm. The DNA coding and DNA operations denote the core of the aforementioned algorithms, which mainly include two parts: (1) employ the DNA coding theory to encode plaintext images and keys into DNA symbol sequences; and (2) subject two DNA symbol sequences to different operations (e.g., +, −, and XOR operations) to obtain a ciphertext image. The encryption algorithms based on DNA operations belong to stream ciphers, and there is a one-to-one relationship between the plaintext and ciphertext images. However, attackers can use this relationship to attack the encryption system [
19,
20,
21]. Liu et al. [
22] used only part of the known plaintext or ciphertext to reconstruct an equivalent key and cracked an encryption system using DNA technology. Hermassi et al. [
21] pointed out that the image encryption algorithm based on DNA coding and two chaotic maps proposed in [
23] has serious defects; that is, this encryption method is irreversible and cannot resist known plaintext attacks. In ref. [
24], an image fusion encryption scheme based on the Chen hyperchaos and DNA sequences was proposed. However, because the keystream was generated independently of plaintext, it was deciphered by the selected plaintext attack in [
19,
25].
In ref. [
20], the authors studied the security problem in symmetric encryption algorithms based on DNA coding, and it was concluded that the encryption algorithm based on the DNA encoding–decoding model had only eight equivalent key pairs. In addition, due to the small key space, it was difficult for this type of algorithm to resist brute force attacks and known plaintext attacks. The encryption algorithms based on a stream cipher model have a one-to-one correspondence between the plaintext and ciphertext, which makes it difficult to resist selected plaintext attacks. However, the combination of DNA technology and chaos theory can effectively enhance security. In ref. [
26], it was pointed out that if a fixed DNA encoding rule is employed for encryption, the distribution of plaintext bits cannot change. This phenomenon is even more obvious when processing medical images. When attackers use special image attacks, the anti-attack ability is relatively weak, especially for monochrome images and all-black or all-white images. Therefore, some encryption schemes adopt dynamic selection of DNA coding rules in the DNA encoding and decoding processes [
27,
28,
29]. In ref. [
30], a DNA-like coding scheme that uses a 4-bit binary sequence to represent 16 characters was proposed; the number of effective coding rules was expanded to 1024, but the encoding–decoding model was still used in the DNA-like diffusion process of this scheme. In ref. [
29], the authors pointed out that image encryption algorithms based on DNA encoding usually have security defects, which can be summarized as follows: (1) an equivalent key can be obtained through a pair of plaintext images and the corresponding ciphertext images; (2) the encryption process is not sensitive to changes in plaintext images or keys; and (3) the employed rules of DNA encoding and decoding in the encryption process are fixed.
Aiming to overcome the above shortcomings of the encryption method based on DNA, this paper proposes a dynamic image encryption algorithm based on the DNAS-box and hyperchaos. The main features of the proposed algorithm are as follows. First, DNA coding and DNA-like coding are used to construct a DNAS_box, which can realize the conversion of 2-bit DNA symbols to 4-bit DNA-like symbols during the encryption process. Second, in the DNAS_box, the encoding and decoding rules in the encryption process are effectively separated, and the number of encoding and decoding rules is increased. Third, to improve the plaintext sensitivity of the proposed algorithm, the keys are closely related to the SHA-256 hash values of a plaintext image. Finally, in the encryption process, the encoding and decoding of DNA and DNA-like and the DNAS_box construction are dynamically controlled by chaotic sequences.
The rest of this paper is organized as follows. In
Section 2, DNA coding, DNA-like coding, and the DNAS_box are described. In
Section 3 and
Section 4, the hyperchaos system used in this study and its initial value and parameter generation process are described. The detailed process of the proposed encryption algorithm is introduced in
Section 5. The results of simulation experiments and security analyses are presented in
Section 6 and
Section 7. Finally, the main conclusions of this paper are presented in
Section 8.
5. Encryption and Decryption Processes
The proposed encryption scheme is given in
Figure 4. The Chen hyperchaos system is used to generate random sequences, and DNA encoding and DNAS_box construction are dynamically controlled, as shown in steps 1–20. Decryption represents the reverse operation of encryption, and the decryption process of the proposed algorithm mainly includes three parts: DNA-like decoding and reverse operation, DNAS_box reverse operation, and DNA decoding and reverse operation. The proposed decryption scheme is shown in
Figure 5. The encryption system employs a symmetric cryptographic scheme, where the message digest and the initial key needs to be transmitted to the receiver via a secure channel.
Step 1: Input a plaintext image P with an image size of ;
Step 2: The message digests of image P are extracted by SHA-256, and a 64-bit hexa decimal number sequence H is obtained; then, H is subjected to the XOR operation with the external input key INK, and the parameters and initial values of chaotic system (1) during iteration are determined by Equations (2) and (3);
Step 3: Chaotic system (1) is iterated () times. In addition, to eliminate the transient effect of the chaotic system, the first terms are discarded, and four chaotic sequences x, y, z and w, with a length of , are obtained;
Step 4: Plaintext image P is converted into a one-dimensional row vector P1;
Step 5: Four subsequences x
1, x
2, x
3 and x
4 of chaotic sequence x, having the length of
, are obtained by using Equation (4);
Step 6: Chaotic sequence x
1 is sorted from small to large, forming a position sequence s
1. The pixel position of
P1 is scrambled using Equation (5), and a one-dimensional vector
P2 is obtained;
Step 7: Vector P2 is decomposed into a binary 0–1 symbol sequence P3, and the chaotic sequence x is sorted in ascending order to obtain a position sequence s2; P3, is subjected to the position scrambling operation using the method in Step 6 to obtain a binary sequence;
Step 8: By using Equation (6), the integer composed of 9–12 digits after the decimal point of x
2 is extracted, and the modulo operation is performed on 256 to obtain a 0–255 integer sequence kx
2. Then, kx
2 is decomposed into a binary sequence kx
21.
where
is the largest integer less than
, and
is the remainder of
divided by
;
Step 9: Two subsequences of a chaotic sequence y, denoted by y
1 and y
2, are obtained using Equation (7), and they both have a length of
; ky
1 and ky
2 are two 1–8 random number sequences obtained using Equation (8) from y
1 and y
2, respectively; ky
1 and ky
2 are used to dynamically select the encoding rules from
Table 1, when the binary sequences
and kx
21 are used to perform DNA encoding, respectively;
Step 10: After performing dynamic DNA encoding on
and kx
21, two DNA symbol sequences
and kx
22 are obtained. The XOR operation is carried out on
and kx
22 following the rules in
Table 3, and the DNA symbol sequence
is obtained;
Step 11: A position sequence s3 is obtained by sorting y1 in ascending order, and a DNA symbol sequence is obtained by scrambling using the method of Step 6;
Step 12: A subsequence z
1 is extracted from a chaotic sequence z using Equation (9); it has a length of 16 and is sorted in ascending order to obtain a position sequence s
4. According to the method of Step 6, the position of the DNA-like coding symbol {ABCDEFGHIJKLMNOP} is scrambled and transformed into a
matrix. In this way, the DNAS_ box is obtained, as shown in
Table 5;
Step 13:
is divided into two subsequences
and
, with a length of
;
and
are used as row and coordinates, respectively. The corresponding DNA-like coding symbols are presented in
Table 5, and a DNA-like coding symbol sequence,
is composed;
Step 14: By using the method of Step 8, an integer composed of 9–12 digits after the decimal point of x3 is extracted; also, the modular operation is performed on 256, and a 0–255 integer sequence kx3 is obtained, which is then decomposed into a binary sequence kx31;
Step 15: A chaotic sequence y is sorted in ascending order, and a position sequence s5 is obtained. The position of kx31 is adjusted using the method of Step 6, and a new binary sequence kx32 is obtained;
Step 16: Two sequences kz
1 and kz
2 are extracted from a chaotic sequence z using Equation (10), and they both have a length of
. The two sequences are converted into 1–8 random number sequences kz
1 and kz
2 using Equation (11); then, kz
1 is used to dynamically select the coding rules from
Table 3, kx
32 is encoded into a DNA-like sequence, and kz
2 is used to dynamically select the decoding rules from
Table 3 when the DNA-like sequences are decoded in Step 18;
Step 17: Afterward, kx
32 is dynamically encoded by DNA-like coding, and a DNA-like coding symbol sequence kx
33 is obtained. Further, the DNA-like XOR operation is performed on
and kx
33 following the rules in
Table 4, and a sequence
is obtained;
Step 18: Sequence
is decoded following the DNA-like decoding rules dynamically selected from
Table 3 based on kz
2, and a binary sequence
is obtained;
Step 19: A chaotic sequence w is sorted in ascending order, and a position sequence s6 is obtained. According to the method of Step 6, the position of is scrambled, and a binary sequence is obtained;
Step 20: Next, the binary sequence is transformed into an 8-bit decimal sequence ; chaotic sequence x4 is sorted in ascending order to obtain a position sequence s7. Using the method of Step 6, is scrambled to obtain a decimal sequence , which is then transformed into a two-dimensional image matrix, with a size of . Then, the final ciphertext image is obtained.