Entropy-Based Block Scrambling Image Encryption Using DES Structure and Chaotic Systems

,


Introduction
In modern society, information security issues affect almost all aspects of human production and life.e problem of information leakage is becoming increasingly serious.Developing mechanisms to effectively protect the security of information has become a hot research field.Traditional encryption algorithms such as RSA and DES have been widely used in the encryption of text information [1,2], but with the advancement of the semiconductor industry and computer science, human computing capabilities have achieved rapid progress.Traditional encryption algorithms are facing the risk of being cracked.At the same time, although the computing capabilities of computers have been greatly improved, humans still need higher encryption speeds.e size of image data is much larger than that of text data, and the correlation between adjacent pixels is very strong.erefore, there is a need to develop more efficient and secure image encryption algorithms.
ere are two methods for image encryption: scrambling encryption and pixel grayscale value encryption.Scrambling encryption refers to using algorithms to change the position of pixels.Scrambling encryption can reduce the correlation between pixels, but it cannot change the pixel values.Amnesh et al. proposed a scrambling encryption scheme based on RGB translation scrambling to achieve the encryption of colored images [3].Jolfaei and Mirghadri proposed a scrambling encryption scheme based on the Henon chaotic map [4].Alexopoulos proposed a scrambling encryption method based on the SCAN mode [5]. is scheme used different routes to scan the image to be encrypted.Pixel grayscale value encryption refers to changing the pixel grayscale values to achieve encryption.El-Zoghdy et al. used the DES algorithm to encrypt images [6].Acharya et al. proposed a scheme based on Hill matrix encryption algorithm and used an invertible matrix to encrypt images [7].With increasing research on image encryption algorithms, some scholars have proposed many hybrid encryption schemes.In 2019, we have proposed a chaos-based image encryption technique utilizing Hilbert Curves and H-Fractals [8].
Data encryption standard (DES) was established by the US Federal Government in 1977.It has been authorized and applied to governmental nonconfidential communications.
e traditional DES algorithm [9] first groups the plaintext into many blocks, and the size of each block is 64 bits.en, each block is divided into two parts, which are scrambled and diffused for 16 rounds.Finally, the encrypted blocks are rearranged.Encrypting images with the traditional DES algorithm faces many problems, such as complicated operation, poor encryption effect, and weak antiocclusion attack capability.For example, Silva-Garcia et al. noticed that when the traditional DES algorithm was applied to images that had large blocks of the same grayscale value [10], some regions with low encryption quality were generated.
us, the traditional DES algorithm is not suitable for image encryption.
As a complex nonlinear dynamic system [11][12][13][14], the chaotic system has the characteristics of high initial parameter sensitivity, unpredictable orbit, and strong state ergodicity.It is usually used as a pseudorandom number generator.Applying the chaotic system to the scrambling encryption process and pixel grayscale value, encryption process can improve the security of the encryption system and overcome the shortcomings of the traditional DES algorithm.Considering this theory, a new image encryption algorithm based on the traditional DES encryption algorithm model, chaotic systems, DNA computing, and select cipher-text output is proposed.e simulation results and security analysis verified the feasibility of this algorithm.

Chaotic System.
To increase the antiocclusion capability of this encryption scheme, the logistic map is chosen to scramble the position of pixels [15].e logistic map is defined in formula (1).In this equation, μ is the parameter; when μ is 4, the chaotic system is in the complete chaos state.
e phase diagram of the logistic map is shown in Figure 1(a). ( To reduce the correlation between adjacent pixels, the 2D-LSCM chaotic system is chosen to encrypt the pixel grayscale value [16].e 2D-LSCM chaotic system is defined as formula (2).In this equation, θ is the parameter of the chaotic system.When θ is in the interval (0, 1), the chaotic system is in the chaos state.e phase diagram of the 2D-LSCM chaotic system is shown in Figure 1(b).

DNA Coding and Nucleotide
Computing.In 1994, Adleman designed and completed the first DNA computing experiment and published his experimental results in the journal of Science [17], opening a new field, biocomputing.Many scholars have performed various studies on biocomputing.Derived from the structure of DNA, DNA computing has many excellent features, such as huge storage capacity, large parallel computing power, and ultralow power consumption.e field of biocomputing is still being explored and studied continuously.Gehani et al. proposed the first algorithm to encrypt images using DNA sequences [18].In 2012, Chang proposed a fast parallel DNA-based algorithm.is algorithm uses the RSA publickey cryptosystem, biological cryptography, and biological parallel computing to encrypt images [19].Although DNA computers have not been applied in practice, the encoding and computing methods of DNA computing enrich the means of encryption algorithms in cryptography.By simulating DNA calculations, various evaluation indexes of the encryption algorithm are improved [20,21].
2.2.1.DNA Coding.Double-stranded DNA molecules consist of four nucleotides: A (adenine), T (thymine), G (guanine), and C (cytosine).Nucleotides follow the principles of complementary pairing, namely, A and T are complementary, and G and C are complementary.In DNA coding, each nucleotide can represent a 2-bit binary string.Pixels in the grayscale images are in the interval [0, 255], so they can be represented by the four nucleotides [22][23][24].In binary numbers, 0 and 1 are complementary.erefore, 00 and 11 are complementary, and 01 and 10 are complementary.When an 8-bit binary string is represented by the four nucleotides, there are 4! � 24 encoding rules, but only 8 kinds of rules satisfy the principle of complementary pairing.
ese rules are listed in Table 1.
When converting pixels to DNA coding, we first need to determine the rule for encoding.For example, the binary string of the decimal digit 188 is 10111100, which can be represented by the nucleotide sequence CTTA under rule 1.DNA decoding is the reverse process of DNA encoding.A different digit is obtained when decoding nucleotide sequences under a different rule.For example, if we decode the nucleotide sequence CTTA under rule 2, we will obtain a binary string 01111100, where the decimal digit of this binary string is 124, which is different from 188.In the encryption process, using different rules to encode and decode is an encryption scheme, but in the decryption process, we should ensure the consistency of encoding and decoding rules.

Nucleotide Computing.
With the advances in biocomputing research, some scholars have proposed algebraic operations based on nucleotides [25], such as nucleotide addition and subtraction.Nucleotide addition and subtraction are variants of binary addition and subtraction.
ere are 8 kinds of nucleotide addition rules, and 8 kinds of nucleotide subtraction rules corresponding to 8 DNA coding rules.e nucleotide addition and subtraction rules under the first coding rule are shown in Table 2.
e nucleotide operations are adding or subtracting binary digits represented by nucleotides.Unlike binary addition or subtraction, only the last 2-bit binary digits remain for the results.For example, the nucleotide sequences TCAG and GATC are added under the first 2 International Journal of Optics coding rule, and the result is ACTT.e sequence ACTT is used to reduce the sequence of GATC under the first rule, and the result is TCAG.e operation processes are shown in Figure 2. In the addition and subtraction operation processes, the operation results corresponding to each rule are unique.

Design of the Encryption Scheme
To improve the security of the key, the encryption scheme uses the SHA-256 algorithm to operate the plaintext image and obtain a 256-bit hash sequence as an initial key, so there is a connection between the key and original image.
To improve the antiocclusion capability of the encryption system, this encryption scheme uses the logistic map to globally scramble the pixels.Finally, the encryption scheme uses block diffusion, forward diffusion, and entropy selection methods to improve the evaluation indexes of the encryption system to resist statistical attacks and enhance the pseudorandomness of the encryption system.e details of the encryption process are shown as follows.
3.1.Key Generator.SHA-256 is a type of hash algorithm [26,27] that can convert any length of data into a 256-bit binary sequence.e hash sequences generated by the SHA-256 algorithm are irreversible, so the plaintext information cannot be inversely calculated from the hash sequences.In this paper, the 256-bit binary sequence H is generated by the SHA-256 algorithm as the initial key.To calculate the initial values of the logistic map and the 2D-LSCM chaotic system, the hash sequence is divided into 32 equal-sized parts k 1 , k 2 , . .., k 32 .ey are integers in the interval [0, 255] when they are converted into decimal digits.en, the initial values are obtained through formula (3).Pseudorandom sequences are calculated through chaotic systems.
International Journal of Optics 3

Pixel Position Scramble.
Scrambling is a method of changing pixel locations [28,29].In this paper, to reduce the correlation between adjacent pixels, the logistic map is applied to scramble the position of pixels.Scrambling has three steps.e rst step is mapping the positions of the elements in the pseudorandom sequence one by one with the positions of the pixels in the pixel sequence.e second step is arranging the elements in the pseudorandom sequence in ascending order.e third step is changing the position of the elements in the pixel sequence following the position of the elements in the pseudorandom sequence.We only need to obtain the original pseudorandom sequence and the scrambled pixel sequence to complete the decryption process because the decryption process is the reverse process of the scrambling process.Details of the scrambling and decryption processes are shown in Figure 3.
To encrypt the entire image, rst, we should use the logistic map to generate two matrices A 1 and A 2 which are the same size as the original image.Second, we should use every row of matrix A 1 to scramble every row of the original image.ird, we should use every column of matrix A 2 to scramble every column of the image whose rows are scrambled.

DES Di usion.
To increase the randomness of the cipher images, we adopt a block di usion scheme similar to the DES structure.
is di usion scheme ignores the grouping operation, and it directly divides the images to be encrypted into two equal-sized matrices as left matrix L 0 and right matrix R 0 .

Forward Di usion.
e purpose of di usion is to correlate adjacent pixels [30][31][32][33].Using forward di usion to the encrypt image with the size of M × N, we rst rearrange the pixel matrix into a pixel sequence of length M × N and label the pixel points as P(1), P(2),. .., P(M × N). en, we calculate the encrypted pixels P ′ (1), P ′ (2),. .., P ′ (M × N) through formula (5).Finally, we rearrange the pixel sequence into a matrix of size M × N to obtain the encrypted image.
Using forward di usion can increase the information entropy of the image and reduce the correlation between adjacent pixels.e Lena image and forward di used Lena image are shown in Figure 4.It can be seen from the comparison that the di used image still retains some features of the original image, so the encryption algorithm cannot only use forward di usion.e forward di usion must be used in conjunction with other methods.

Encryption Scheme.
e ow chart of the encryption scheme is shown in Figure 5. e 256 × 256 Lena image is encrypted as an example.Suppose that the original image is I, and the encryption scheme is as follows: Step 1. e original image I is input into the SHA-256 algorithm to obtain a 256-bit binary hash sequence H.
Step 3. Generate two matrices, A 1 and A 2 of size 256 × 256, by iterating and reshaping the logistic map.Generate sixteen matrices, K 1 to K 16 of size 256 × 128, by iterating and reshaping the 2D-LSCM system.To make the system full divergence, abandon the previous 1000 elements of each sequence in the chaotic systems.4 International Journal of Optics Step 4. Image I 1 is obtained using the scrambling method of Section 3.2 with A 1 and A 2 .
Step 5. Image I 1 is divided into two equal parts, L 0 and R 0 , and the block diffusion operation is carried out by substituting formula (4).e ciphers L 13 and R 13 after 13 rounds of block diffusion make cipher image C 1 , the ciphers L 14 and R 14 after 14 rounds of block diffusion make cipher image C 2 , the ciphers L 15 and R 15 after 15 rounds of block diffusion make cipher image C 3 , and the ciphers L 16 and R 16 after 16 rounds of block diffusion make cipher image C 4 .
Step 6. e forward diffusion method of Section 3.3 is used to diffuse the images of C 1 , C 2 , C 3 , and C 4 , and new images C 1 ′ , C 2 ′ , C 3 ′ , and C 4 ′ are obtained.
Step 7. Choose the image with the largest information entropy in C 1 ′ , C 2 ′ , C 3 ′ , and C 4 ′ as the output of cipher image C.

Decryption Process.
e process of the encryption algorithm proposed in this paper is reversible, but because it is uncertain which round of cipher the image C is generated, the collision process needs to be added in the decryption process.e steps of the decryption process are summarized as follows: Step 1. Decrypt cipher image C by forward diffusion decryption operations as C 1 , C 2 , C 3 , and C 4 .Decrypt DES and scramble decryption operations through the International Journal of Optics reverse process of encryption process to obtain decrypted images I 1 , I 2 , I 3 , and I 4 .Because the encryption process is reversible, the decryption process will not be repeated. Step

Simulation Results and Security Analysis
Some common images were used to verify the feasibility and security of the encryption algorithm.e original images, the encrypted images, and the decrypted images are shown in Figure 6.In our simulation, the cipher images have completely lost the characteristics of the original images.
After decrypting the cipher images, each decrypted image is exactly the same as the original image, so the algorithm is lossless.

Key Space Analysis.
A good encryption scheme should have enough key space to resist a brute force attack.e keys used in this paper include the hash sequence a(1), x(1), y(1), and θ. e key space of the SHA-256 algorithm is 2 128 , and the precision of the initial value is calculated by 10 − 15 .en, the total key space of the SHA-256 algorithm is 2128 * 1015 * 1015 * 1015 * 1015 � 3.4028 * 1098.us, the algorithm has enough key space to resist a brute force attack and has strong security.

Key Sensitivity Analysis.
A good encryption scheme should be sensitive to the key.e decrypted image obtained by changing one key by 10 − 15 with the other keys unchanged is shown in Figure 7; the encryption algorithm cannot be cracked.By comparison, it can be concluded that the encryption scheme is very sensitive to the key.

Antistatistical Attack Capability Analysis.
e histogram of the image and the correlation between adjacent pixels are used to characterize the image.e feature of the original image is obvious, and the pixel values in some blocks of the image are distributed in concentration.When this phenomenon is reflected in the histogram, the elements are unevenly distributed.When this phenomenon is reflected in the correlation, the correlation between adjacent pixels is very strong.A good encryption algorithm can break the distribution characteristics of pixels in the original image, make the distribution of pixels in the cipher image more uniform, and reduce the correlation between adjacent pixels in the cipher image.us, attackers cannot attack cipher images by statistical means, and the encryption algorithm can effectively resist statistical attacks.In this paper, the histograms of original images and cipher images and the correlation between adjacent pixels are listed to show the ability of the algorithm to resist statistical attacks.At the same time, we add some comparisons with other image encryption algorithms to prove the advantages of the image encryption algorithm.

Histogram Analysis.
In Figure 8, some histograms of the original images and histograms of the corresponding encrypted images are listed.In the histograms of the plaintext images, the pixel values are not uniform; it has certain statistical characteristics and cannot resist brute force attacks.However, in the cipher images, the distributions of pixel values are very uniform, and there is no statistical rule.
e comparison between the histogram of the original image and the histogram of the encrypted image proves that the encrypted algorithm can break the statistical rule of the original images and has a good antistatistical attack ability.

Correlation Analysis.
e correlation between adjacent pixels of the plaintext image is very strong.Breaking the correlation between adjacent pixels can enhance the ability of the encryption algorithm to resist statistical attacks.We randomly selected 10000 pixels from the original Lena image and the encrypted Lena image in the horizontal, vertical, and diagonal directions and listed these pixel values and their adjacent pixel values in Figure 9. ere are strong correlations between adjacent pixels in the original Lena image, but there are almost no correlations between adjacent pixels in the encrypted Lena image.We can quantify the correlation between adjacent pixels with mathematical indicators.
e correlation coefficient between adjacent pixels is calculated using formula (6), where E(x) is the mean, D(x) is the variance, and cov(x, y) is the covariance.e correlation coefficients are shown in Table 3.By comparing the correlation coefficients of the original images and cipher images in Table 3, it can be seen that the algorithm can resist statistical attacks very well, and its ability is not weaker than those of references [34] and [35].International Journal of Optics that the information has good randomness.e information entropy of the image can be used to the degree of randomness of the image.e calculation method of information entropy is shown in formula (7), where p(i) represents the probability that each situation may occur in a model: Pixel values are distributed in the interval [0, 255], and the probability of each case is 1/256, so the information entropy of a gray image is 8 in an ideal case.If the information entropy of a grayscale image is close to 8, the image has good randomness.e information entropies of the cipher images encrypted by this algorithm and some other algorithms are shown in Table 4.
e information entropy of the cipher image of this algorithm is close to 8, and the result is not inferior to other algorithms.erefore, it can be considered that the randomness of the cipher image of this algorithm meets the encryption requirements.

Antidifferential Attack Capability Analysis.
e number of pixel change rate (NPCR) and unified average changing intensity (UACI) are two indices used to measure the correlation degree between a cipher image and an original image as well as the antidifferential attack ability of the encryption algorithm.e closer the NPCR and UACI are to the ideal values, the stronger the antidifferential attack ability of the encryption algorithm.
e calculation methods of NPCR and UACI are shown in formula (8): Sign(x) is a symbolic function, and its calculation method is shown in formula (9).P 1 (i, j) is the pixel value of the cipher image, and P 2 (i, j) is the pixel value of the ciphertext image encrypted after a slight change in the original image.
e theoretical expectations of NPCR and UACI were 100% and 33.4635%, respectively.e NPCR and UACI values of the two cipher images are shown in Table 5.By comparison, we can see that the cipher image of algorithm has a strong correlation with the original image, and it can resist the differential attack very well.

Antinoise Attack Capability Analysis.
e antinoise attack ability of an encryption system is one of the standards for measuring the robustness of the encryption system.In the process of transmission, information will inevitably be disturbed by noise, which will distort the cipher image and affect the decrypted image.e common noises are Gauss noise, Poisson noise, salt and pepper noise, etc.In this section, the antinoise attack ability of the encryption system is analyzed.Different intensities of salt and pepper noise are added to the cipher image using MATLAB software and then decrypted.
e simulation results are shown in Figure 10.e correlation of the image is used as an index to compare the decrypted image with the original image.e correlations are shown in Table 6.Based on this analysis, the encryption algorithm has a good antinoise attack ability.

Antiocclusion Attack Capability Analysis.
e antiocclusion attack ability of the encryption algorithm can reflect the scattered degree of cipher text.If the scrambling degree of the encryption algorithm is insufficient, the occlusion area in the decrypted image may completely lose its original characteristics after decryption.e occlusion attack test is to occlude the cipher image and then observe the degree of restoration of the decrypted image.e clipped cipher images are shown in Figures 11(a e results are shown in Table 7.By analyzing the correlation, we can see that when the cipher image is attacked by clipping, the algorithm can restore the original image features to some extent.erefore, the algorithm has a good antiocclusion attack ability.

Conclusions
In this paper, an image encryption algorithm based on block diffusion and the chaotic system is proposed by means of a traditional DES encryption algorithm combined with chaotic system and DNA coding technology.
is method compensates for the problems of high computational complexity and inconvenient key management when the traditional text encryption algorithm is used in the digital image encryption algorithm by using DNA coding operation, selecting cipher-text output, and key verification.
e experimental results show that the algorithm has a large key space to resist statistical attacks,    International Journal of Optics differential attacks, occlusion attacks, noise attacks, etc.It can be widely used for the secure transmission of image information.

Figure 1 :
Figure 1: Simulation figure of chaotic systems.e phase diagram of (a) logistic map and (b) 2D-LSCM system.
)-11(d).e cipher images with cutting areas of 1/64, 1/16, 1/4, and 1/2 are decrypted.e results are shown in Figures 11(e)-11(h).With the correlation of the image as an indicator, the decrypted image and the original image were compared and analyzed.

Table 1 :
8 kinds of DNA coding rules.

Table 2 :
Nucleotide computing rules under the rst coding rule.
2. e hash values H 1 , H 2 , H 3 , and H 4 of images I 1 , I 2 , I 3 , and I 4 were calculated by the SHA-256 algorithm, and the information entropies E 1 , E 2 , E 3 , and E 4 of images I 1 , I 2 , I 3 , and I 4 were calculated.Step 3. Compare H 1 , H 2 , H 3 , and H 4 with the initial key H, which is equal to H, which is that of the decrypted image.If H 1 , H 2 , H 3 , and H 4 are not equal to the initial key H, compare with entropies E 1 , E 2 , E 3 , and E 4 , and the image with the smallest information entropy is selected as the output of the decrypted image.At the same time, a hint is given that there is a deviation between the decrypted image and the original image.

Table 3 :
Correlations of original images and encrypted images.

Table 4 :
Entropy of images.

Table 6 :
Correlations of decrypted images with different intensities of noise attack.

Table 7 :
Correlations of decrypted images with different intensities of noise attack.