Next Article in Journal
Deep Compressive Sensing on ECG Signals with Modified Inception Block and LSTM
Next Article in Special Issue
Multi-Image Encryption Algorithm Based on Cascaded Modulation Chaotic System and Block-Scrambling-Diffusion
Previous Article in Journal
Memory and Entropy
Previous Article in Special Issue
Multi-Image Encryption Method via Computational Integral Imaging Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Security Analysis of the Image Encryption Algorithm Based on a Two-Dimensional Infinite Collapse Map

College of Automation, Guangdong University of Technology, Guangzhou 510006, China
*
Author to whom correspondence should be addressed.
Entropy 2022, 24(8), 1023; https://doi.org/10.3390/e24081023
Submission received: 13 June 2022 / Revised: 14 July 2022 / Accepted: 22 July 2022 / Published: 25 July 2022
(This article belongs to the Special Issue Computational Imaging and Image Encryption with Entropy)

Abstract

:
This paper analyzes the security of the image encryption algorithm based on a two-dimensional (2D) infinite collapse map. The encryption algorithm adopts a permutation–diffusion structure and can perform two or more rounds to achieve a higher level of security. By cryptanalysis, it is found that the original diffusion process can be split into a permutation–diffusion structure, which comes after the original permutation, so these two permutations can be merged into one. Then, some theorems about round-down operation are summarized, and the encryption and decryption equations in the diffusion process are deduced and simplified accordingly. Since the chaotic sequences used in encryption algorithm are independent of the plaintext and ciphertext, there are equivalent keys. The original encryption algorithm with single-round, two-round, and multi-round of permutation–diffusion processes is cracked, and the data complexity of the cryptanalysis attacks is analyzed. Numerical simulation is carried out by MATLAB, and the experimental results and theoretical analysis show the effectiveness of the cryptanalysis attacks. Finally, some suggestions for improvement are given to overcome the shortcomings of the original encryption algorithm.

1. Introduction

Advances in information and network technology have facilitated the rapid development of the Internet in providing the technical foundation, and the Internet is deeply integrated into all aspects of human life. Accompanying this is a variety of data forms and massive amounts of data generated every day. Since these data are closely linked with user information, their protection is particularly important. Digital image data are an important carrier of information, and has occupied a large part in the process of network transmission. Encrypting images is an important means to ensure image security.
Image data have the characteristics of strong correlation between pixels, high data redundancy, and large amount of data. The traditional text encryption algorithms such as DES and AES are not suitable for image encryption. In recent years, image encryption based on chaotic systems [1,2,3,4,5,6,7], cellular automata [8,9,10,11,12], DNA encoding [13,14,15], bit plane decomposition [16,17,18,19,20,21], and elliptic curve [22,23,24,25,26] is the mainstream of cryptography. Due to the significant properties of unpredictability, ergodicity and initial state sensitivity, the chaotic system becomes a good choice for encryption [27]. However, the chaotic sequence is transformed to a bit sequence to encrypt the plaintext in most chaotic image encryptions. The security of the encryption is thus determined by the properties of the bit sequence. Moreover, the essential reason for the chaotic cryptosystem easily existing equivalent keys is that the encryption process is independent of plaintext and/or ciphertext. In addition, elliptic curve cryptography is capable of providing high security than to other cryptosystems with the same key size because it is more complicated and requires a deeper mathematical understanding; it is more susceptible to errors which diminishes its security.
Since Matthews proposed a generalized logistic map and used it to generate pseudo-random numbers for data encryption [28], a large number of scholars have poured into using chaotic systems to design and implement novel image encryption schemes. In 1998, Fridrich [29] first proposed a chaotic image encryption scheme with multi-round of permutation–diffusion processes, which gradually became the main operation in chaotic image encryption algorithms. In 2015, Simin Yu reviewed the current situation and existing problems of the theory and application of chaotic cryptography, the literature [30] focused on the progress of high-dimensional chaotic cryptography and its application in multimedia secure communication and hardware implementation technology. In 2018, Özkaynak reported various chaotic image encryption algorithms proposed in the past 20 years. The chaotic systems, diffusion operations, and analysis methods commonly used in chaotic image encryption algorithms are classified and summarized in detail [31]. Overall, the chaotic encryption algorithm with a multi-round of permutation–diffusion processes offers cryptographic properties better than those with a single-round of permutation–diffusion processes, and it can resist against the chosen-plaintext attacks.
Cryptography and cryptanalysis are the unity of opposites, and they promote each other and develop together. Through cryptanalysis, the defects of cryptographic algorithm can be pointed out and the suggestions for improvement are given. Cryptanalysis is based on the Kerchhoff’s principle; a cryptographic system should be secure even if everything about the system, except the key, is public knowledge. The attacker can get the plaintext or even the encryption key through the obtained plaintext/ciphertext pair. In cryptology, the basic models are named after the generally defined attacks such as ciphertext-only attack, known-plaintext attack, chosen-plaintext attack, and chosen-ciphertext attack. Many analysis methods can be classified into the above four methods. In recent years, linear attack and differential attack [32] have been proposed one after another, which have a great impact on cryptanalysis. Many new analysis methods are variants of these two methods [33].
At present, there are some analytical articles on a multi-round image encryption algorithm. In 2010, Solak et al. proposed a chosen-ciphertext attack on the Fridrich’s scheme for the first time [34]. Some bases for further optimizing attack on the Fridrich’s scheme and its variants are provided in [35]. In 2015, Chen et al. analyzed an encryption algorithm with a multi-round of permutation–diffusion structure [36], and proposed a differential cryptanalysis method for two-round and multi-round [37]. However, due to the special permutation operation adopted by the original encryption algorithm, the analysis for multi-round is not universal; in 2016, they proposed a method of chosen-ciphertext attack, and verified the adaptability of this attack method by analyzing several common diffusion equations [38]. In 2021, a multi-round chaotic image encryption algorithm was analyzed in [39]. The original encryption algorithm adopts multiple permutations and one diffusion, and repeats them multiple rounds. Multiple consecutive permutations are equivalent to one permutation. Since the diffusion operation only uses XOR without ciphertext feedback, the diffusion part can be separated from the permutation part. Therefore, it can be cracked by simplifying it into one round of permutation–diffusion. In the same year, Chen et al. mathematically summarized and expressed a class of chaotic image cryptosystems based on a multi-round of permutation–diffusion structure [37,38], and proposed a chosen-ciphertext attack method for this kind of encryption algorithm [40,41]. It is noted that the cryptanalysis algorithms in the existing literature are mainly aimed at the single-round encryption and some multi-round encryptions, which also can be directly equivalent to single-round encryption after simplification.
In this paper, a security analysis of the image encryption algorithm based on a 2D infinite collapse map proposed in [42] is carried out. According to the analysis, the encryption algorithm has one permutation operation in the diffusion process. Therefore, its structure is actually a permutation–permutation–diffusion structure, and two permutation operations can be equivalent to one permutation operation. In addition, this paper deduces the rules of round-down operation, and then gives the correct diffusion decryption equation. Since the chaotic sequences used in the encryption algorithm are independent of the plaintext and ciphertext, there are equivalent keys. This paper analyzes and discusses the single-round, two-round and multi-round situations, provides the attack complexity, and gives the corresponding improvement suggestions to overcome the shortcomings of the original encryption algorithm. The main advantage of this paper is that a detailed security analysis of a more complex multi-round encryption algorithm is carried out, and the main difference between this multi-round encryption and the previous multi-round encryption methods is that the multi-round encryption cannot be directly equivalent to a single-round of encryption. Therefore, the cryptanalysis methods in the existing literature cannot be directly used to crack this multi-round encryption algorithm.
The remainder of this article is organized as follows: Some definitions and related theorems are provided in Section 2. Section 3 presents the detail of the original encryption algorithm, and gives the correct decryption equation. An analysis of the encryption algorithm is demonstrated in detail in Section 4. Section 5 mainly introduces the numerical simulation experiments carried out by MATLAB. The experimental results verify the correctness of the cryptanalysis, and at the same time, the complexity of the deciphering algorithms is given, and corresponding improvement measures are proposed to overcome the shortcomings of the original encryption algorithm. The last section concludes the article.

2. Some Definitions and Related Theorems

In order to better analyze the original encryption algorithm, it is first necessary to simplify the original algorithm. According to the formula used in the original algorithm, some preliminaries are given to aid the subsequent theoretical analysis. The definitions and properties of round-down operation · , the operation { · } for finding the fractional part of a real number, and the modulus operator are introduced, and three theorems about these operations are deduced in this section.
Definition 1
([43]). The largest integer of a real number a is recorded as a , which is the largest integer less than or equal to a, that is, a is the integer satisfying a a < a + 1 .
Definition 2
([43]). The fractional part of the real number a is recorded as { a } , which is the difference between a and a , that is, { a } = a a .
Property 1.
a = a + { a } , 0 { a } < 1 .
Property 2.
n + a = n + a , { n + a } = { a } , n Z .
Theorem 1.
For any real numbers a and b, there are
a + b = a + b 0 { a } + { b } < 1 , a + b + 1 1 { a } + { b } < 2 .
Proof. 
a + b = ( a + { a } ) + ( b + { b } ) ( Property 1 ) = a + b + ( { a } + { b } ) = a + b + { a } + { b } . ( a + b Z , Property 2 ) .
  • From Property 1, we know 0 { a } < 1 , 0 { b } < 1 , so 0 { a } + { b } < 2 .
  • When 0 { a } + { b } < 1 , { a } + { b } = 0 , then a + b = a + b .
  • When 1 { a } + { b } < 2 , { a } + { b } = 1 , then a + b = a + b + 1 .
Theorem 2.
For any real numbers a and b, there are
a b = a b 0 { a } { b } < 1 , a b 1 1 < { a } { b } < 0 .
Proof. 
a b = ( a + { a } ) ( b + { b } ) ( Property 1 ) = a b + ( { a } { b } ) = a b + { a } { b } . ( a b Z , Property 2 )
  • From Property 1, we know 0 { a } < 1 , 0 { b } < 1 , so 1 < { a } { b } < 1 .
  • When 0 { a } { b } < 1 , { a } { b } = 0 , then a b = a b .
  • When 1 < { a } + { b } < 0 , { a } { b } = 1 , then a b = a b 1 .
Definition 3
([44]). The modular operation returns the remainder after a real number is divided by a positive integer, and often abbreviated as mod :
Property 3.
( a mod 256 ) mod 256 = a mod 256 , a R .
Property 4.
( a + b ) mod 256 = ( ( a mod 256 ) + ( b mod 256 ) ) mod 256 , a , b R .
Theorem 3.
a mod 256 = a mod 256 , a R .
Proof. 
Assuming b = a mod 256 , the corresponding inverse operation is a = 256 × k + b , where a , b R , k Z and 0 b < 256 , so a mod 256 = b and
a mod 256 = 256 × k + b mod 256 = ( 256 × k + b ) mod 256 ( 256 × k Z , P r o p e r t y   2 ) = b . ( 0 b < 256 , Definition 3 )
a mod 256 = b = a mod 256 is proved. □

3. Description of the Original Encryption Algorithm

In this section, the chaotic map used in [42] is first introduced, and then the original encryption algorithm is described in detail.

3.1. Two-Dimensional Infinite Collapse Map (2D-ICM)

The chaotic system 2D-ICM used in the original encryption algorithm is a two-dimensional infinite collapse map obtained by integrating two one-dimensional infinite collapse maps with different parameters [42], and its iterative equation is
x n + 1 = sin a y n · sin b x n , y n + 1 = sin a x n · sin b y n ,
where the control parameters a and b are real numbers, a 0 , b 0 , and the initial states are recorded as x 0 , y 0 .

3.2. 2D-ICM Based Image Encryption Algorithm (ICMIE)

According to [42], it proposed a new image encryption algorithm based on 2D-ICM and named it ICMIE. The original algorithm ICMIE is described as follows:
(1)
Key parameters
There are seven key parameters in the original algorithm. The key K is expressed as a 0 , b 0 , x , y , T , C 1 , C 2 , and the first five parameters a 0 , b 0 , x , y , T are 40-bit binary representation. Assuming that the 40-bit binary is s 1 s 2 s 40 2 , the IEEE754 format
d = i = 1 40 s i 2 40 i 2 40
is adopted to convert a 0 , b 0 , x , y , T into decimal numbers in 0 , 1 , then C 1 and C 2 are positive integers represented by 20-bit binary, and they are converted into decimal numbers directly. Substitute the converted decimal a 0 , b 0 , x , y , T , C 1 , C 2 into the following equation:
a = a 0 + T × C 1 mod 5 + 16 , b = b 0 + T × C 2 mod 5 + 16 , x 0 = x + T × C 1 mod 2 1 , y 0 = y + T × C 2 mod 2 1 .
The initial conditions a , b , x 0 , y 0 of 2D-ICM can be obtained.
(2)
Encryption process
The original algorithm divides the encryption process into permutation and diffusion, and then performs two or more rounds of permutation and diffusion as a whole. In fact, the diffusion process of the original algorithm also includes a permutation operation. In order to distinguish, the first permutation operation is named permutation 1 and the second permutation operation is named permutation 2. The grayscale image P of M × N is encrypted, and the ciphertext image C of the same size is finally generated. The overall encryption process is shown in Figure 1.
The specific encryption steps are described as follows:
(1) Permutation
First, two chaotic matrices X and Y of M × N are generated by 2D-ICM. The matrix S is combined into a single matrix S = X Y by multiplying the corresponding elements of X and Y. The index matrix I is composed of the position of each element in the original matrix S after sorting S in ascending order. Then, the pixel positions of the plaintext image P are rearranged by using the index matrix I to obtain the permutation 1 image F.
(2) Diffusion
First, the index matrix χ is composed of the corresponding positions of all elements of the chaotic matrix X in its ascending order. Then, the pixel positions of the permutation 1 image F are arranged again by the index matrix χ to obtain a new permutation 2 image A. Finally, the pixel values of the diffusion image D are obtained by the following method:
d i = a i + a M × N + y i × 2 31 1 mod 256 if i = 1 , a i + d i 1 + y i × 2 31 1 mod 256 if i 2 , M × N ,
where i = 1 , 2 , , M × N , then d i , a i and y i are the pixel values of the i-th element of the diffusion image D, the permutation 2 image A and the chaotic matrix Y according to the raster scan order, respectively.
(3) Repeat steps (1) and (2) to achieve multi-round encryption.
(3)
Decryption process
Usually, the decryption process is the inverse of the image encryption process. Using the correct key to generate the chaotic matrices X and Y, the decryption process of ICMIE will alternately perform the inverse diffusion and inverse permutation in two rounds or multiple rounds, and then obtain the recovered image. The decryption equation in the diffusion process is incorrect. When i 2 , M × N , according to the encryption Equation (4),
d i = a i + d i 1 + y i × 2 31 1 mod 256 , d i = a i + d i 1 + y i × 2 31 1 mod 256 , ( Theorem 3 ) d i + 256 × k i = a i + d i 1 + y i × 2 31 1 , ( Definition 3 ) d i + 256 × k i = a i + d i 1 + y i × 2 31 1 , ( Property 2 ) a i = d i + 256 × k i d i 1 y i × 2 31 1 , a i mod 256 = d i + 256 × k i d i 1 y i × 2 31 1 ) mod 256 , a i = d i d i 1 y i × 2 31 1 mod 256 mod 256 , ( Property 4 ) a i = d i d i 1 y i × 2 31 1 mod 256 , ( Property 3 ) a i = d i d i 1 y i × 2 31 1 + 1 mod 256 , ( Theorem 2 )
where k i Z ( i = 2 , 3 , , M × N ) . Similarly, a i can be obtained when i = 1 , and the correct decryption equation is finally derived as
a i = d i d i 1 y i × 2 31 1 + 1 mod 256 if i 2 , M × N , d i a M × N y i × 2 31 1 + 1 mod 256 if i = 1 .
Then, the pixel positions of the ciphertext image will be processed by inverse permutation. The original image is completely recovered.

4. Cryptanalysis

The generation process of the chaotic sequences and the encryption process of the original algorithm are independent of the plaintext and the ciphertext, so there are equivalent keys. Firstly, the core structure of the original encryption algorithm (i.e., the permutation–permutation–diffusion structure) is generalized, then the diffusion equation is isolated, and the two permutation processes are merged into one permutation. Next, the original encryption algorithm is analyzed in terms of single-round, two-round, and multi-round.
The original encryption algorithm can be summarized as a multi-round of permutation–diffusion processes as shown in Figure 2.
In Figure 2, K P and K D represent the permutation equivalent key and the diffusion equivalent key, respectively. P represents plaintext image and C represents ciphertext image. n represents the total number of rounds of encryption, and
P ( t ) = P t = 1 , D ( t 1 ) t [ 2 , n ] ,
where P ( t ) , A ( t ) , and D ( t ) represent the plaintext image, the permutation image, and diffusion image encrypted in the t-th round, respectively. Taking the feedback apart, it can be shown in Figure 3.
In Figure 3, P ( t ) = D ( t 1 ) , that is, the diffusion image encrypted in the previous round is the plaintext image encrypted in the subsequent round. For plaintext image P and ciphertext image C, there are P ( 1 ) = P and C = D ( n ) .
For the convenience of the following discussion, some definitions are given here. P i ( t ) , A i ( t ) , D i ( t ) respectively represent the i-th plaintext image, permutation image, and diffusion image in the t-th round. The size of the images discussed in this paper are all M × N .

4.1. Simplification of ICMIE

Since the two permutations are independent of plaintext, they can be equivalent to one permutation operation. The equivalent key K P of the two permutation operations from plaintext image P to permutation image A can be obtained directly in one step. The diffusion equivalent key K D can be obtained from the permutation image A to the diffusion image D.
The original diffusion encryption Equation (4) is deduced and the following equation is obtained. When i 2 , M × N , according to Theorem 1, there is
d i = a i + d i 1 + y i × 2 31 1 mod 256 = a i + d i 1 + y i × 2 31 1 mod 256 ( Theorem 3 ) = a i + d i 1 + y i × 2 31 1 mod 256 ( Property 2 ) = a i + d i 1 + y i × 2 31 1 mod 256 mod 256 ( Property 4 ) = a i + d i 1 + y ^ i mod 256 ,
where y ^ i = y i × 2 31 1 mod 256 .
Likewise, when i = 1 ,
d 1 = a 1 + a M × N + y ^ 1 mod 256 ,
where y ^ 1 = y 1 × 2 31 1 mod 256 .
In order to facilitate the analysis, ∔ is defined to represent the modular addition that is, the two elements are added and then modulo 256. Correspondingly, ˙ represents the modular subtraction, that is, the two elements are subtracted and then modulo 256. From Equations (6) and (7),
d i = a i a M × N y ^ i if i = 1 , a i d i 1 y ^ i if i 2 , M × N ,
where y ^ i = y i × 2 31 1 mod 256 .

4.2. Security Analysis of Encryption in Single-Round

First, let P 0 be an all-zero image, then the pixel value will not be changed after permutation. Therefore, the element values of the permutation image A 0 are all 0. The image D 0 is obtained according to the encryption algorithm. According to Equation (8), one has
d i = y ^ i if i = 1 , d i 1 y ^ i if i 2 , M × N ,
and
y ^ i = d i if i = 1 , d i d i 1 + 256 k i if i 2 , M × N ,
where k i Z ( i = 2 , 3 , , M × N ) .
Because y ^ i and d i perform modulo 256 operation,
y ^ i 0 , 1 , 2 , , 255 , d i d i 1 255 , 254 , , 254 , 255 i = 2 , 3 , , M × N , so
y ^ i = d i if i = 1 , d i d i 1 + 256 if i 2 , M × N and d i d i 1 < 0 , d i d i 1 if i 2 , M × N and d i d i 1 0 .
In other words, substitute the pixel value of D 0 to obtain y ^ i by Equation (11), then make k d i = y ^ i i = 1 , 2 , , M × N to get the equivalent key K D = k d 1 k d 2 k d M × N . Next, according to Theorem 3, the diffusion decryption from Equation (5), one can further obtain
a i = d i ˙ d i 1 ˙ y i × 2 31 1 1 if i 2 , M × N , d i ˙ a M × N ˙ y i × 2 31 1 1 if i = 1 . = d i ˙ d i 1 1 ˙ y i × 2 31 1 if i 2 , M × N , d i ˙ a M × N 1 ˙ y i × 2 31 1 if i = 1 .
Because d i ˙ d i 1 1 , d i ˙ a M × N 1 Z , it means d i ˙ d i 1 1 = 0 and d i ˙ a M × N 1 = 0 , then d i ˙ d i 1 1 ˙ y i × 2 31 1 < 0 and d i ˙ a M × N 1 ˙ y i × 2 31 1 < 0 . According to Theorem 2 and Property 2,
a i = d i ˙ d i 1 1 ˙ y i × 2 31 1 ˙ 1 if i 2 , M × N , d i ˙ a M × N 1 ˙ y i × 2 31 1 ˙ 1 if i = 1 , = d i ˙ d i 1 1 ˙ y i × 2 31 1 ˙ 1 if i 2 , M × N , d i ˙ a M × N 1 ˙ y i × 2 31 1 ˙ 1 if i = 1 , = d i ˙ d i 1 ˙ y ^ i if i 2 , M × N , d i ˙ a M × N ˙ y ^ i if i = 1 ,
where y ^ i = y i × 2 31 1 mod 256 .
The permutation image A corresponding to the ciphertext image C can be cracked by substituting the equivalent key K D (i.e., y ^ i = k d i i = 1 , 2 , , M × N ) obtained from all-zero plaintext and d i i = 1 , 2 , , M × N according to Equation (13). Because the specific ciphertext C is known, then the diffusion image D = C , so d i i = 1 , 2 , , M × N is known.
Since the two permutations are independent of the plaintext, they can be equivalent to one permutation, and the permutation operation only changes the coordinate position of the pixel without changing the pixel value, so that only the coordinate position of the pixel in the permutation image A is changed. Therefore, the equivalent permutation key K P can be solved by comparing the pixel pairs of the plaintext images and the permutation images. Next, the optimal chosen-plaintext attack is used [45], and the steps are as follows:
Step 1: Construct a data matrix U with the same size as the image P, u j is the value of the j-th element of the matrix U obtained in raster scan order. The nonnegative integers 0 , 1 , , M × N 1 are successively written into the data matrix U according to the raster scan order by u j = j 1 j = 1 , 2 , 3 , , M × N .
Step 2: Calculate the number of selected plaintexts l = log 256 M × N , where · is the round-up operation. In addition, create l plaintext images P 1 , P 2 , , P l .
Step 3: Use U to write the value into P 1 , P 2 , , P l . The writing rule of the j-th element p i , j obtained from the i-th plaintext image in raster scan order is
p i , j = u j / 256 i 1 % 256 ,
where i = 1 , 2 , 3 , , l and j = 1 , 2 , 3 , , M × N .
After constructing the plaintext through the above steps, l plaintext images P 1 , P 2 , , P l are successively input into the encryptor to obtain the corresponding ciphertext images C 1 , C 2 , , C l , respectively. Then, according to the obtained equivalent diffusion key K D , inverse diffusion is carried out to obtain A 1 , A 2 , , A l , respectively, and these images are combined into a data matrix V. The consolidation rule is
V = i = 1 l A i × 256 i 1 ,
where i = 1 , 2 , 3 , , l . By comparing the position difference between the data matrix U and the data matrix V with the same pixel value, the equivalent permutation key K P used in permutation can be obtained.

4.3. Cryptanalysis of Two-Round Encryption

Two-round encryption is analyzed here by the combination of the differential attack and the chosen-plaintext attack.
Firstly, the encryption algorithm is deduced by differential analysis. According to Equation (8),
d 1 = a M × N a 1 y ^ 1 , d 2 = a M × N a 1 a 2 y ^ 1 y ^ 2 , d j = a M × N a 1 a 2 a j y ^ 1 y ^ 2 y ^ j , d M × N = a M × N a 1 a 2 a M × N y ^ 1 y ^ 2 y ^ M × N .
Now use a i , j ( t ) , d i , j ( t ) ( t = 1 , 2 , 3 , , n , i = 0 , 1 , 2 , and j = 1 , 2 , 3 , , M × N ) to represent the j-th element of the i-th permutation image and diffusion image in the raster scan order in the t-th round of encryption, respectively. Then, the j-th element in raster scan order in two different diffusion images D k ( t ) and D l ( t ) encrypted in the t-th round can be expressed as
d k , j ( t ) = a k , M × N ( t ) a k , 1 ( t ) a k , 2 ( t ) a k , j ( t ) y ^ 1 y ^ 2 y ^ j
and
d l , j ( t ) = a l , M × N ( t ) a l , 1 ( t ) a l , 2 ( t ) a l , j ( t ) y ^ 1 y ^ 2 y ^ j
Let Δ D k l ( t ) = D k ( t ) ˙ D l ( t ) , the difference Δ d k l , j ( t ) = d k , j ( t ) ˙ d l , j ( t ) of the j-th element of the t-th round of diffusion images D k ( t ) and D l ( t ) in the raster scan order can be obtained, which is
Δ d k l , j ( t ) = a k , M × N ( t ) a k , 1 ( t ) a k , 2 ( t ) a k , j ( t ) ˙ a l , M × N ( t ) a l , 1 ( t ) a l , 2 ( t ) a l , j ( t ) .
Let
Δ a k l , M × N ( t ) = a k , M × N ( t ) ˙ a l , M × N ( t ) , Δ a k l , 1 ( t ) = a k , 1 ( t ) ˙ a l , 1 ( t ) , Δ a k l , j 1 ( t ) = a k , j 1 ( t ) ˙ a l , j 1 ( t ) , Δ a k l , j ( t ) = a k , j ( t ) ˙ a l , j ( t ) ,
and there is
Δ d k l , j ( t ) = Δ a k l , M × N ( t ) Δ a k l , 1 ( t ) Δ a k l , 2 ( t ) Δ a k l , j ( t ) .
It can be seen from the previous analysis that P ( t ) = D ( t 1 ) , so there is Δ P k l ( t ) = Δ D k l ( t 1 ) and Δ A k l ( t ) = f K P Δ P k l ( t ) = f K P Δ D k l ( t 1 ) , where f K P · is the permutation operation on the matrix. Now, let a i , j ( t ) = f k p h p i , h ( t ) , where j = 1 , 2 , , M × N , h = 1 , 2 , , M × N , and then, j = k p h and h = k p j 1 are permutation pairs. a i , j ( t ) = f k p h p i , h ( t ) indicates that the j = k p h -th element a i , j ( t ) of the i-th permutation image A i ( t ) encrypted in the t-th round according to the raster scan order is replaced by the h = k p j 1 -th element p i , h ( t ) of the i-th plaintext image P i ( t ) encrypted in the t-th round according to the raster scan order. Thus, the difference of the j-th element between the permutation image A k ( t ) and A l ( t ) encrypted in the t-th round is
Δ a k l , j ( t ) = a k , j ( t ) ˙ a l , j ( t ) = f k p h p k , h ( t ) ˙ f k p h p l , h ( t ) = f k p h p k , h ( t ) ˙ p l , h ( t ) = f k p h Δ p k l , h ( t ) = f k p h Δ d k l , h ( t 1 ) ,
where Δ p k l , h ( t ) = p k , h ( t ) ˙ p l , h ( t ) .
The flow chart for cracking the two-round encryption is shown in Figure 4. The following is a detailed introduction to the two-round encryption cracking algorithm. It should be pointed out that this method is only for the case of two-round encryption with the same permutation matrix.
Step 1: Construct an all-zero plaintext image as P 0 of M × N for cracking the ciphertext image C of M × N , then construct a plaintext image set P 1 , P 2 , , P M × N , let the k-th element in P k k 1 , 2 , , M × N according to the raster scan order be 1 and the rest be 0, and this means
P 1 = 1 0 0 0 0 0 0 0 0 , P 2 = 0 1 0 0 0 0 0 0 0 , ⋯, P M × N = 0 0 0 0 0 0 0 0 1 .
Step 2: According to Equation (20), the difference relationship between the diffusion images D k ( 2 ) and D 0 ( 2 ) from their M × N -th to the first element encrypted in the second round is
Δ d k , M × N ( 2 ) = Δ a k , M × N ( 2 ) Δ a k , 1 ( 2 ) Δ a k , 2 ( 2 ) Δ a k , M × N 2 ( 2 ) Δ a k , M × N 1 ( 2 ) Δ a k , M × N ( 2 ) , Δ d k , M × N 1 ( 2 ) = Δ a k , M × N ( 2 ) Δ a k , 1 ( 2 ) Δ a k , 2 ( 2 ) Δ a k , M × N 2 ( 2 ) Δ a k , M × N 1 ( 2 ) , Δ d k , M × N 2 ( 2 ) = Δ a k , M × N ( 2 ) Δ a k , 1 ( 2 ) Δ a k , 2 ( 2 ) Δ a k , M × N 2 ( 2 ) , Δ d k , 2 ( 2 ) = Δ a k , M × N ( 2 ) Δ a k , 1 ( 2 ) Δ a k , 2 ( 2 ) , Δ d k , 1 ( 2 ) = Δ a k , M × N ( 2 ) Δ a k , 1 ( 2 ) .
Modular subtraction of each element from its next adjacent element as
Δ d k , M × N ( 2 ) ˙ Δ d k , M × N 1 ( 2 ) = Δ a k , M × N ( 2 ) , Δ d k , M × N 1 ( 2 ) ˙ Δ d k , M × N 2 ( 2 ) = Δ a k , M × N 1 ( 2 ) , Δ d k , M × N 2 ( 2 ) ˙ Δ d k , M × N 3 ( 2 ) = Δ a k , M × N 2 ( 2 ) , Δ d k , 2 ( 2 ) ˙ Δ d k , 1 ( 2 ) = Δ a k , 2 ( 2 ) , Δ d k , 1 ( 2 ) Δ d k , M × N 1 ( 2 ) ˙ Δ d k , M × N ( 2 ) = Δ a k , 1 ( 2 ) .
Input P 0 and the plaintext image set P 1 , P 2 , , P M × N into the encryption algorithm in turn, and obtain the corresponding ciphertext image C 0 and C 1 , C 2 , , C M × N after two-round encryption, where D 0 ( 2 ) = C 0 , D 1 ( 2 ) = C 1 , , D M × N ( 2 ) = C M × N . Perform modular subtraction operation on each pixel value in D 1 ( 2 ) , D 2 ( 2 ) , , D M × N ( 2 ) from each pixel value in D 0 ( 2 ) to obtain Δ D 1 ( 2 ) , Δ D 2 ( 2 ) , Δ D 3 ( 2 ) , , Δ D M × N ( 2 ) . According to Equation (23), Δ A 1 ( 2 ) , Δ A 2 ( 2 ) , Δ A 3 ( 2 ) , , Δ A M × N ( 2 ) are obtained, then the sum of all elements of the above matrices can be calculated as j = 1 M × N Δ a 1 , j ( 2 ) , j = 1 M × N Δ a 2 , j ( 2 ) , , j = 1 M × N Δ a M × N , j ( 2 ) .
Step 3: Because the permutation operation does not change the sum of the element values in the matrix, so j = 1 M × N Δ d 1 , j ( 1 ) = j = 1 M × N Δ a 1 , j ( 2 ) , j = 1 M × N Δ d 2 , j ( 1 ) = j = 1 M × N Δ a 2 , j ( 2 ) , , j = 1 M × N Δ d M × N , j ( 1 ) = j = 1 M × N Δ a M × N , j ( 2 ) .
According to Equation (20), one can obtain
Δ d k , 1 ( 1 ) = Δ a k , M × N ( 1 ) Δ a k , 1 ( 1 ) , Δ d k , 2 ( 1 ) = Δ a k , M × N ( 1 ) Δ a k , 1 ( 1 ) Δ a k , 2 ( 1 ) , Δ d k , j ( 1 ) = Δ a k , M × N ( 1 ) Δ a k , 1 ( 1 ) Δ a k , 2 ( 1 ) Δ a k , j ( 1 ) , Δ d k , M × N ( 1 ) = Δ a k , M × N ( 1 ) Δ a k , 1 ( 1 ) Δ a k , 2 ( 1 ) Δ a k , M × N 2 ( 1 ) Δ a k , M × N 1 ( 1 ) Δ a k , M × N ( 1 ) .
From Equation (21), it can be seen that Δ a k , j ( 1 ) = f k p h Δ p k , h ( 1 ) = f k p h Δ p k , h because Δ p k , h = p k , h ˙ p 0 , h = p k , h . From the properties of the plaintext image P 0 and the constructed plaintext image set P 1 , P 2 , , P M × N , one has
Δ p k , h = 1 if h = k , 0 if h k ,
where k = 1 , 2 , , M × N .
Because h and k p h are a permutation pair, when h = k , k and k p k are a permutation pair. That is, if p k , k is permuted by a k , k p k ( 1 ) , a k , k p k ( 1 ) = p k , k = 1 , then there is
Δ a k , j ( 1 ) = 1 j = k p k , 0 j k p k ,
where k p k = 1 , 2 , , M × N , which is substituted into Equation (24), one can obtain
k p k = 1 if j = 1 M × N Δ a k , j ( 2 ) = M × N , M × N if j = 1 M × N Δ a k , j ( 2 ) = M × N + 1 , M × N + 1 j = 1 M × N Δ a k , j ( 2 ) if j = 1 M × N Δ a k , j ( 2 ) M × N and j = 1 M × N Δ a k , j ( 2 ) M × N + 1 .
According to j = 1 M × N Δ a 1 , j ( 2 ) , j = 1 M × N Δ a 2 , j ( 2 ) , , j = 1 M × N Δ a M × N , j ( 2 ) obtained in the previous step, the equivalent permutation key K P used for position permutation can be obtained from the above equation.
Step 4: If the image to be cracked is C, C 0 is the ciphertext image corresponding to the all-zero plaintext. Let Δ C = C ˙ C 0 , then Δ D ( 2 ) = Δ C . According to Equation (23), the adjacent two elements are modular subtracted to obtain Δ A ( 2 ) , and the equivalent permutation key K P is used to obtain Δ D ( 1 ) . Similarly, Δ A ( 1 ) and Δ P = Δ P ( 1 ) can be obtained. Because P 0 is all-zero plaintext, so the deciphered plaintext is P = P ˙ P 0 = Δ P .

4.4. Security Analysis of Multi-Round Encryption

The chosen-ciphertext attack method was proposed in [38], which can crack the diffusion operation with ciphertext feedback and different permutation matrices in each round. The applicability of this method was summarized and demonstrated in detail in [40,41]. However, the above literature mainly gave this method for the case without feedback, and then extended it to the case with feedback directly. Through the detailed derivation of the encryption process, the steps of the attack method to crack the case with ciphertext feedback are given in this section. It is not only helpful for understanding the attack method, but also has a good inspiration for guiding the improvement of the algorithm. It should be pointed out that, if there is no special description for multi-round analysis, the symbol definitions given above are still used.
Let a i , j ( t ) = f j p i , k p j 1 ( t ) , j = 1 , 2 , , M × N ; this means that a i , j ( t ) is the j-th element of the i-th permutation image in raster scan order in the t-th round of encryption is permutated from p i , k p j 1 ( t ) which is the k p j 1 -th element of the i-th plaintext image P i ( t ) in raster scan order in the t-th round of encryption; j and k p j 1 are a permutation pair. The encryption process of the original encryption algorithm can be expressed as a general model as
d i , j ( t ) = f M × N p i , k p M × N 1 ( t ) ˙ u = 1 j f u p i , k p u 1 ( t ) ˙ u = 1 j y ^ u ( t ) , p i , j ( t ) = d i , j ( t 1 ) ,
where i = 0 , 1 , 2 , , j 1 , 2 , , M × N , t = 1 , 2 , , n , ∔ denotes modular addition operation, and . denotes summation operation of modular addition. As for u M × N , 1 , 2 , , j , u and k p u 1 are a permutation pair.
According to Equation (27), one has
p k , j ( t ) ˙ p l , j ( t ) = Δ p k l , j ( t ) = Δ d k l , j ( t 1 ) = f M × N Δ p k l , k p M × N 1 ( t 1 ) ˙ u = 1 j f u Δ p k l , k p u 1 ( t 1 ) .
According to Equations (21) and (28), Δ a k l , r ( t ) = a k , r ( t ) ˙ a l , r ( t ) is the difference between the r-th element of the permutation images A k ( t ) and A l ( t ) in t-th round of encryption. That is,
Δ a k l , r ( t ) = f r Δ p k l , k p r 1 ( t ) = f r f M × N Δ p k l , k p M × N 1 ( t 1 ) ˙ u = 1 k p r 1 f u Δ p k l , k p u 1 ( t 1 ) ,
where k = 1 , 2 , , l = 0 , 1 , 2 , , r = 1 , 2 , , M × N , t = 1 , 2 , , n . By the way, r and k p r 1 are a permutation pair. As for u M × N , 1 , 2 , , k p r 1 , u and k p u 1 are a permutation pair.
According to Equation (20), the difference from first to M × N -th element between diffusion image D k ( t ) and D 0 ( t ) (that is l = 0 ) in the t-th round of encryption is:
Δ d k , 1 ( t ) = Δ a k , M × N ( t ) Δ a k , 1 ( t ) , Δ d k , 2 ( t ) = Δ a k , M × N ( t ) Δ a k , 1 ( t ) Δ a k , 2 ( t ) , Δ d k , M × N ( t ) = Δ a k , M × N ( t ) ˙ v = 1 M × N Δ a k , v ( t ) .
From Equation (28)–(30), one can further obtain
Δ d k , 1 ( t ) = f M × N f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p M × N 1 f u Δ p k , k p u 1 ( t 1 ) f 1 f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p 1 1 f u Δ p k , k p u 1 ( t 1 ) Δ d k , 2 ( t ) = f M × N f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p M × N 1 f u Δ p k , k p u 1 ( t 1 ) f 1 f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p 1 1 f u Δ p k , k p u 1 ( t 1 ) f 2 f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p 2 1 f u Δ p k , k p u 1 ( t 1 ) Δ d k , M × N ( t ) = f M × N f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p M × N 1 f u Δ p k , k p u 1 ( t 1 ) ˙ v = 1 M × N f v f M × N Δ p k , k p M × N 1 ( t 1 ) ˙ u = 1 k p v 1 f u Δ p k , k p u 1 ( t 1 )
Since the modular addition and permutation can be processed out of order and ended up with the same result, after t = n rounds of encryption, the pixel difference result Δ d k , j ( n ) ( j = 1 , 2 , , M × N ) of diffusion images D k ( n ) , and D 0 ( n ) can be expressed as the linear combination of the difference pixel point Δ p k , j ( n 1 ) ( j = 1 , 2 , , M × N ) of n 1 -round plaintext P k ( n 1 ) and P 0 ( n 1 ) modulo 256. Δ d k , j ( n ) , j = 1 , 2 , , M × N can be recursively expressed as the linear combination of Δ p k , j ( 1 ) = Δ p k , j , j = 1 , 2 , , M × N modulo 256, which is
Δ d k , 1 ( n ) Δ d k , 2 ( n ) Δ d k , M × N ( n ) = b 11 b 11 b 1 M × N b 21 b 22 b 2 M × N b M × N , 1 b M × N , 2 b M × N , M × N × Δ p k , 1 Δ p k , 2 Δ p k , M × N Mod 256 ,
where Mod represents the modulo of each component of the vector.
For an encryption system, any plaintext image must have only one corresponding ciphertext image. At the same time, any ciphertext image can only be decrypted to one plaintext image; otherwise, the encryption algorithm will not be established. In addition, the number of pixels in the plaintext image and the ciphertext image is constant, so the coefficient matrix is a square matrix, and its rank must be M × N . Furthermore, for the n-round encryption algorithm, the coefficient matrix is represented by the symbol
B = b 11 b 11 b 1 M × N b 21 b 22 b 2 M × N b M × N , 1 b M × N , 2 b M × N , M × N .
Δ α k = Δ d k , 1 ( n ) , Δ d k , 2 ( n ) , , Δ d k , M × N ( n ) T represents the one-dimensional vector converted from the difference matrix between the ciphertext images D k ( n ) and D 0 ( n ) in the n-th round of encryption according to the raster scan order. In addition, Δ β k = Δ p k , 1 , Δ p k , 2 , , Δ p k , M × N T represents the one-dimensional vector converted from the difference matrix between the plaintext P k ( 1 ) corresponding to the ciphertext image D k ( n ) and the plaintext P 0 ( 1 ) corresponding to the ciphertext image D 0 ( n ) , in the n-th round of encryption, according to the raster scan order. Then, the above equation can be expressed as
Δ α k = B × Δ β k Mod 256 .
Consider a set of standard orthogonal bases e 1 , e 2 , , e M × N , where e 1 = 1 , 0 , , 0 T , e 2 = 0 , 1 , 0 , , 0 T , , e M × N = 0 , , 0 , 1 T . Then, any one-dimensional vector Δ α = c 1 , c 2 , , c M × N T can be expressed as
Δ α = c 1 × e 1 + c 2 × e 2 + + c M × N × e M × N Mod 256 .
According to Equation (33), e 1 , e 2 , , e M × N corresponds to Δ β 1 , Δ β 2 , , Δ β M × N , so
e 1 = B × Δ β 1 Mod 256 , e 2 = B × Δ β 2 Mod 256 , e M × N = B × Δ β M × N Mod 256 ,
which is substituted into Equation (34) to obtain
Δ α = ( c 1 × B × Δ β 1 Mod 256 + c 2 × B × Δ β 2 Mod 256 + + c M × N × B × Δ β M × N Mod 256 ) Mod 256 = c 1 × B × Δ β 1 + c 2 × B × Δ β 2 + + c M × N × B × Δ β M × N Mod 256 = B × c 1 × Δ β 1 + c 2 × Δ β 2 + + c M × N × Δ β M × N Mod 256 .
According to Equation (33), Δ β corresponding to Δ α is
Δ β = c 1 × Δ β 1 + c 2 × Δ β 2 + + c M × N × Δ β M × N Mod 256 .
The flow chart for cracking the multi-round encryption is shown in Figure 5.
The details of our cracking process consist of four steps, as given below.
Step 1: Record a ciphertext image of M × N to be cracked as
C = c 1 c 2 c N c N + 1 c N + 2 c 2 × N c M 1 × N + 1 b M 1 × N + 2 b M × N .
Firstly, an all-zero ciphertext image of M × N is denoted by C 0 , then a ciphertext image set C 1 , C 2 , , C M × N is constructed, so that the k-th element in C k according to the raster scan order is set to 1, and the rest is 0 where k 1 , 2 , , M × N , as C 1 = 1 0 0 0 0 0 0 0 0 , C 2 = 0 1 0 0 0 0 0 0 0 , ⋯, C M × N = 0 0 0 0 0 0 0 0 1 .
Perform modular subtraction operations of C 0 from C , C 1 , C 2 , , C M × N , respectively. Because C 0 is an all-zero ciphertext, the one-dimensional vector converted from Δ D ( n ) = C , Δ D 1 ( n ) = C 1 , Δ D 2 ( n ) = C 2 , , Δ D M × N ( n ) = C M × N according to the raster scan order is actually the aforementioned Δ α , e 1 , e 2 , , e M × N .
Input C 0 , C 1 , C 2 , , C M × N into the decryption machine to obtain a set of corresponding plaintext images, which are denoted as P 0 , P 1 , , P M × N .
Step 2: Perform modular subtraction operations of P 0 from P 1 , P 2 , , P M × N , respectively, and the result Δ P 1 = P 1 ˙ P 0 , Δ P 2 = P 2 ˙ P 0 , , Δ P M × N = P M × N ˙ P 0 is converted into a one-dimensional vector according to the raster scan order, which is actually the aforementioned Δ β 1 , Δ β 2 , , Δ β M × N .
Step 3: Therefore, Equation (37) can also be written as
Δ P = c 1 × Δ P 1 c 2 × Δ P 2 c M × N × Δ P M × N .
Step 4: By Δ P = Δ P ( 1 ) = P ˙ P 0 , the plaintext is finally obtained as
P = Δ P P 0 = c 1 × Δ P 1 c 2 × Δ P 2 c M × N × Δ P M × N P 0 .

5. Numerical Simulation Experiment

The experimental environment is Intel(R) Core(TM) i5-3230M processor, CPU frequency of 2.60 GHz, 8.00 GB memory, Windows 10 operating system, and MATLABR2021a. The grayscale images Lena, Cameraman, Tiffany, Pepper, Baboon and Sailboat with the size of 128 × 128 are selected for single-round, two-round, and multi-round numerical simulation experiments. The key is selected as follows:
a 0 = { 1111010010 , 0110101101 , 1110001101 , 1111110000 } , b 0 = { 0001111100 , 1011100111 , 0010010010 , 1011000000 } , x = { 1010101100 , 1101011011 , 1110001110 , 1000100000 } , y = { 1111111101 , 1110100111 , 1101011111 , 1111001010 } , T = { 1101000000 , 0001011010 , 0011001100 , 1000011011 } , C 1 = { 1011111100 , 0010000101 } , C 2 = { 1100001010 , 1111000110 } .

5.1. Experimental Results

This paper analyzes the original algorithm in the case of single-round, two-round, and multi-round of encryption. Because the first two analysis methods belong to the chosen-plaintext attack and the third one belongs to the chosen-ciphertext attack, the first two analysis methods are stronger in terms of assumptions made and data requirements; they are only applicable to themselves, but the cracking speed is faster. The multi-round analysis method mentioned in this paper is applicable to any number of encryption rounds and has universality.
This paper verifies the original encryption algorithm and the analysis results by writing MATLAB programs. According to the original encryption algorithm and the cracking algorithm, the encryption and the decryption programs and cracking programs in single-round, two-round, and multi-round are written, respectively. The related experimental results are shown in Figure 6, Figure 7, Figure 8, Figure 9, Figure 10, Figure 11 and Figure 12.
Figure 6 and Figure 7 respectively list the intermediate experimental results, cracking results and relevant metrics of 128 × 128 Lena image and Cameraman image for single-round encryption. It can be seen that, after encryption, the histogram of ciphertext is uniform and cannot reflect plaintext information. The histogram of intermediate ciphertext obtained by cracking the equivalent diffusion key is the same as that of plaintext, indicating that the diffusion step is cracked. Then, through the obtained permutation equivalent key, the deciphered image is obtained. Compared with the original plaintext image, the deciphered image is exactly the same, which shows that the cracking algorithm is correct.
Figure 8 and Figure 9 respectively list the intermediate experimental results and cracking results of the Tiffany image and Pepper image of 128 × 128 size for two-round of encryption. A set of specially constructed chosen-plaintext is input into the encryption algorithm to obtain a set of plaintext–ciphertext pairs, and according to these plaintext–ciphertext pairs, the permutation matrix is finally cracked. Then, through the differential processing and the obtained permutation matrix, the plaintext is finally cracked, and the comparison between the deciphered image and the plaintext image is exactly the same, which shows that the cracking algorithm is correct.
Figure 10 and Figure 11 list the intermediate experimental results and cracking results of 128 × 128 size Baboon image and Sailboat image for multi-round encryption (without losing generation, the multi-round part is encrypted in three rounds). It can be seen that, by inputting a group of specially constructed chosen-ciphertext into the decryption algorithm, a group of ciphertext–plaintext pairs are obtained, and then the plaintext is finally cracked through differential processing. The comparison between the recovered image and the plaintext image shows that the cracking algorithm is correct.
Theoretically, for a ciphertext image of M × N size, using multi-round of a cracking algorithm to completely recover the ciphertext image requires the construction of M × N ciphertext images and an all-zero ciphertext, a total of M × N + 1 ciphertext–plaintext pairs. Because it is difficult to obtain the permission of decryption machine in reality, it is of practical significance to reduce the number of ciphertext–plaintext pairs. Figure 12 shows the effect of constructing different number of ciphertext–plaintext pairs on the finally recovered plaintext image.
It can be seen that the plaintext can be recovered better without some ciphertext–plaintext pairs. In reality, the appropriate number of ciphertext–plaintext pairs can be obtained by constructing an appropriate number of ciphertext, which can reduce the data complexity and improve the cracking efficiency while meeting the cracking requirements.

5.2. Attack Complexity

The attack complexity of cryptanalysis generally includes time complexity and data complexity. However, the time complexity is affected by the performance of the computer and the written cracking program, so it is uncertain. For cryptanalysis, the most important thing is the data complexity, that is, the number of plaintext or ciphertext required to crack an encryption algorithm. The following will discuss the data complexity of the cracking algorithm for the case of single-round, two-round, and multi-round in case of complete cracking.
In the case of single-round, for the grayscale image of M × N , when the key is unknown, the plaintext-ciphertext pair required to decipher the equivalent diffusion key and the equivalent permutation key is 1 + log 256 M × N , so the data complexity is O log M × N .
In the case of two-round, for the grayscale image of M × N , when the key is unknown, the number of chosen-plaintexts required to decipher is 1 + M × N , so the data complexity is O M × N .
In the case of multi-round, for the grayscale image of M × N , when the key is unknown, the number of chosen-ciphertexts required to decipher is 1 + M × N , so the data complexity is O M × N .

5.3. Improvement Plan

From the analysis of this article, it can be seen that the original encryption algorithm has the following vulnerabilities and deficiencies.
(1) The decryption equation of diffusion operation is incorrect. The original decryption result is slightly different from the original encrypted image.
(2) The original encryption algorithm attempts to increase the nonlinear factors by using index matrices and adding a round-down operation to the diffusion equation, for improving the security of the algorithm. However, the analysis found that the above processes can not provide higher security. Instead, an additional permutation is added, resulting in increasing the encryption time. Through the corresponding processing and transformation, the algorithm is still linear and can not resist against the chosen-ciphertext attack.
(3) Under the differential attack, the original diffusion key is completely useless.
In view of the above shortcomings, the following improvement suggestions are put forward.
Cancel the permutation 2 operation. Add new operations in the diffusion process, such as adding S-box, to improve the security of the algorithm. As a nonlinear device, S-box can be applied to the original algorithm to solve its problem. The design of the S-box needs to satisfy cryptographic properties such as nonlinearity, strict avalanche criterion, algebraic immunity, differential uniformity, and correlation immunity [25]. The improvement is given below by taking the S-box as an example.
The permutation operation of the original encryption algorithm is retained. Cancel the permutation operation in the diffusion process of the original encryption algorithm, and complete the diffusion operation according to the original diffusion equation. Take the first 256 bits of the matrix X (if it is less than 256 bits, use the chaotic system to iterate the insufficient bits), obtain a 256-bit index matrix according to the original algorithm, and then form a matrix of 16 × 16 according to the raster scan method to obtain an S-box. Each pixel of the diffusion image is indexed into the S-box according to the first four bits and the last four bits, and the value of the original pixel is replaced with the corresponding value in the S-box. According to the above steps, the encryption algorithm is carried out for two or more rounds, and the decryption algorithm is the inverse operation of the encryption algorithm.

6. Conclusions

In this paper, the security analysis of the image encryption algorithm based on two-dimensional infinite collapse map is carried out, and the definitions and properties of the round-down operation, the fractional part operation of real numbers, and the modular operation are given. At the same time, by using these theorems, the error of the original diffusion equation is found out, and finally the original encryption algorithm is processed into a general permutation–diffusion structure, and the diffusion structure is processed into a modular addition of the ciphertext feedback and the element of diffusion matrix. On this basis, the single-round, two-round, and multi-round situations are analyzed and discussed respectively. It not only deepens the understanding of the original encryption process, but also helps to guide the improvement of the original encryption algorithm. The correctness of the analysis process is verified by experiments. Finally, the attack complexity is discussed, and suggestions for improvement are given to avoid the shortcomings of the original encryption algorithm.

Author Contributions

Methodology, G.S.; software, G.S.; validation, S.Y. and Q.W.; writing—original draft preparation, G.S.; writing—review and editing, Q.W.; supervision, S.Y. and Q.W.; project administration, S.Y.; funding acquisition, S.Y. and Q.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Guangdong Province Grant No. 2022A1515010005 and the National Natural Science Foundation of China under Grants 61901304.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Pak, C.; Huang, L. A new color image encryption using combination of the 1D chaotic map. Signal Process. 2017, 138, 129–137. [Google Scholar] [CrossRef]
  2. Oravec, J.; Ovsenik, L.; Papaj, J. An image encryption algorithm using logistic map with plaintext-related parameter values. Entropy 2021, 23, 1373. [Google Scholar] [CrossRef] [PubMed]
  3. Parvaz, R.; Zarebnia, M. A combination chaotic system and application in color image encryption. Opt. Laser Technol. 2018, 101, 30–41. [Google Scholar] [CrossRef] [Green Version]
  4. Wang, X.; Li, Z. A color image encryption algorithm based on Hopfield chaotic neural network. Opt. Lasers Eng. 2019, 115, 107–118. [Google Scholar] [CrossRef]
  5. Li, T.; Zhang, D. Hyperchaotic image encryption based on multiple bit permutation and diffusion. Entropy 2021, 23, 510. [Google Scholar] [CrossRef]
  6. Hua, Z.; Zhu, Z.; Yi, S.; Zhang, Z.; Huang, H. Cross-plane colour image encryption using a two-dimensional logistic tent modular map. Inf. Sci. 2021, 546, 1063–1083. [Google Scholar] [CrossRef]
  7. Pourasad, Y.; Ranjbarzadeh, R.; Mardani, A. A new algorithm for digital image encryption based on chaos theory. Entropy 2021, 23, 341. [Google Scholar] [CrossRef]
  8. Naskar, P.K.; Bhattacharyya, S.; Nandy, D.; Chaudhuri, A. A robust image encryption scheme using chaotic tent map and cellular automata. Nonlinear Dyn. 2020, 100, 2877–2898. [Google Scholar] [CrossRef]
  9. Roy, S.; Rawat, U.; Sareen, H.A.; Nayak, S.K. IECA: An efficient IoT friendly image encryption technique using programmable cellular automata. J. Ambient. Intell. Humaniz. Comput. 2020, 11, 5083–5102. [Google Scholar] [CrossRef]
  10. Roy, S.; Shrivastava, M.; Rawat, U.; Pandey, C.V.; Nayak, S.K. IESCA: An efficient image encryption scheme using 2D cellular automata. J. Inf. Secur. Appl. 2021, 61, 102919. [Google Scholar] [CrossRef]
  11. Wang, X.; Guan, N. Chaotic image encryption algorithm based on block theory and reversible mixed cellular automata. Opt. Laser Technol. 2020, 132, 106501. [Google Scholar] [CrossRef]
  12. Zeng, J.; Wang, C. A novel hyperchaotic image encryption system based on particle swarm optimization algorithm and cellular automata. Secur. Commun. Netw. 2021, 2021, 6675565. [Google Scholar] [CrossRef]
  13. Zhang, Y. The image encryption algorithm based on chaos and DNA computing. Multimed. Tools Appl. 2018, 77, 21589–21615. [Google Scholar] [CrossRef]
  14. Ben Farah, M.A.; Guesmi, R.; Kachouri, A.; Samet, M. A novel chaos based optical image encryption using fractional Fourier transform and DNA sequence operation. Opt. Laser Technol. 2020, 121, 105777. [Google Scholar] [CrossRef]
  15. Wu, J.; Liao, X.; Yang, B. Image encryption using 2D Hénon-Sine map and DNA approach. Signal Process. 2018, 153, 11–23. [Google Scholar] [CrossRef]
  16. Xu, J.; Zhao, B.; Wu, Z. Research on color image encryption algorithm based on bit-plane and Chen chaotic system. Entropy 2022, 24, 186. [Google Scholar] [CrossRef]
  17. Diaconu, A.-V. Circular inter-intra pixels bit-level permutation and chaos-based image encryption. Inf. Sci. 2016, 355–356, 314–327. [Google Scholar] [CrossRef]
  18. Li, Y.; Wang, C.; Chen, H. A hyper-chaos-based image encryption algorithm using pixel-level permutation and bit-level permutation. Opt. Lasers Eng. 2017, 90, 238–246. [Google Scholar] [CrossRef]
  19. Shahna, K.U.; Mohamed, A. A novel image encryption scheme using both pixel level and bit level permutation with chaotic map. Appl. Soft Comput. 2020, 90, 106162. [Google Scholar] [CrossRef]
  20. Teng, L.; Wang, X.; Meng, J. A chaotic color image encryption using integrated bit-level permutation. Multimed. Tools Appl. 2018, 77, 6883–6896. [Google Scholar] [CrossRef]
  21. Xu, L.; Li, Z.; Li, J.; Hua, W. A novel bit-level image encryption algorithm based on chaotic maps. Opt. Lasers Eng. 2016, 78, 17–25. [Google Scholar] [CrossRef]
  22. Singh, L.D.; Singh, K.M. Image encryption using elliptic curve cryptography. Procedia Comput. Sci. 2015, 54, 472–481. [Google Scholar] [CrossRef] [Green Version]
  23. Laiphrakpam, D.S.; Khumanthem, M.S. A robust image encryption scheme based on chaotic system and elliptic curve over finite field. Multimed. Tools Appl. 2018, 77, 8629–8652. [Google Scholar] [CrossRef]
  24. Azam, N.A.; Ullah, I.; Hayat, U. A fast and secure public-key image encryption scheme based on Mordell elliptic curves. Opt. Lasers Eng. 2021, 137, 106371. [Google Scholar] [CrossRef]
  25. Azam, N.A.; Hayat, U.; Ayub, M. A substitution box generator, its analysis, and applications in image encryption. Signal Process. 2021, 187, 108144. [Google Scholar] [CrossRef]
  26. Hayat, U.; Azam, N.A. A novel image encryption scheme based on an elliptic curve. Signal Process. 2019, 155, 391–402. [Google Scholar] [CrossRef]
  27. Wang, Q.; Yu, S.; Guyeux, C.; Wang, W. Constructing higher-dimensional digital chaotic systems via loop-state contraction algorithm. IEEE Trans. Circuits Syst. I Regul. Pap. 2021, 68, 3794–3807. [Google Scholar] [CrossRef]
  28. Matthews, R. On the derivation of a “chaotic” encryption algorithm. Cryptologia 1989, 13, 29–42. [Google Scholar] [CrossRef]
  29. Fridrich, J. Symmetric ciphers based on two-dimensional chaotic maps. Int. J. Bifurc. Chaos 1998, 8, 1259–1284. [Google Scholar] [CrossRef]
  30. Yu, S.; Lü, J.; Li, C. Some progresses of chaotic cipher and its applications in multimedia secure communications. J. Electron. Inf. Technol. 2016, 38, 735–752. [Google Scholar] [CrossRef]
  31. Özkaynak, F. Brief review on application of nonlinear dynamics in image encryption. Nonlinear Dyn. 2018, 92, 305–313. [Google Scholar] [CrossRef]
  32. Biham, E.; Shamir, A. Differential cryptanalysis of DES-like cryptosystems. J. Cryptol. 1991, 4, 3–72. [Google Scholar] [CrossRef]
  33. Swenson, C. Modern Cryptanalysis: Techniques for Advanced Code Breaking; John Wiley & Sons: Indianapolis, IN, USA, 2008; ISBN 978-0-470-13593-8. [Google Scholar]
  34. Solak, E.; Çokal, C.; Yildiz, O.T.; BiyikoĞlu, T. Cryptanalysis of Fridrich’s chaotic image encryption. Int. J. Bifurc. Chaos 2010, 20, 1405–1413. [Google Scholar] [CrossRef] [Green Version]
  35. Xie, E.Y.; Li, C.; Yu, S.; Lü, J. On the cryptanalysis of Fridrich’s chaotic image encryption scheme. Signal Process. 2017, 132, 150–154. [Google Scholar] [CrossRef] [Green Version]
  36. Fu, C.; Meng, W.; Zhan, Y.; Zhu, Z.; Lau, F.C.M.; Tse, C.K.; Ma, H. An efficient and secure medical image protection scheme based on chaotic maps. Comput. Biol. Med. 2013, 43, 1000–1010. [Google Scholar] [CrossRef]
  37. Chen, L.; Wang, S. Differential cryptanalysis of a medical image cryptosystem with multiple rounds. Comput. Biol. Med. 2015, 65, 69–75. [Google Scholar] [CrossRef]
  38. Chen, L.; Ma, B.; Zhao, X.; Wang, S. Differential cryptanalysis of a novel image encryption algorithm based on chaos and Line map. Nonlinear Dyn. 2016, 87, 1797–1807. [Google Scholar] [CrossRef]
  39. Hu, Y. Research on the Cryptanalysis of a Class of Image Chaotic Cipher Using Permutation–Diffusion Approach. Doctoral Dissertation, Guangdong University of Technology, Guangzhou, China, 2021. [Google Scholar]
  40. Chen, J.; Chen, L.; Zhou, Y. Cryptanalysis of image ciphers with permutation-substitution network and chaos. IEEE Trans. Circuits Syst. Video Technol. 2021, 31, 2494–2508. [Google Scholar] [CrossRef]
  41. Chen, J.; Chen, L.; Zhou, Y. Universal chosen-ciphertext attack for a family of image encryption schemes. IEEE Trans. Multimed. 2021, 23, 2372–2385. [Google Scholar] [CrossRef]
  42. Cao, W.; Mao, Y.; Zhou, Y. Designing a 2D infinite collapse map for image encryption. Signal Process. 2020, 171, 107457. [Google Scholar] [CrossRef]
  43. Rosen, K.H. Elementary Number Theory and Its Applications, 5th ed.; China Machine Press: Beijing, China, 2005; pp. 7–8. ISBN 7-111-15914-4. [Google Scholar]
  44. Johnsonbaugh, R. Discrete Mathematics, 7th ed.; Publishing House of Electronics Industry: Beijing, China, 2009; p. 120. ISBN 978-7-121-08534-5. [Google Scholar]
  45. Li, S.; Li, C.; Chen, G.; Bourbakis, N.G.; Lo, K.T. A general quantitative cryptanalysis of permutation-only multimedia ciphers against plaintext attacks. Signal Process. Image Commun. 2008, 23, 212–223. [Google Scholar] [CrossRef] [Green Version]
Figure 1. The algorithmic structure for ICMIE.
Figure 1. The algorithmic structure for ICMIE.
Entropy 24 01023 g001
Figure 2. The block diagram of n-round chaotic image encryption.
Figure 2. The block diagram of n-round chaotic image encryption.
Entropy 24 01023 g002
Figure 3. The block diagram of n-round chaotic image encryption without feedback.
Figure 3. The block diagram of n-round chaotic image encryption without feedback.
Entropy 24 01023 g003
Figure 4. The flow chart for cracking the two-round encryption.
Figure 4. The flow chart for cracking the two-round encryption.
Entropy 24 01023 g004
Figure 5. The flow chart for cracking the multi-round encryption.
Figure 5. The flow chart for cracking the multi-round encryption.
Entropy 24 01023 g005
Figure 6. The experimental results of cracking the single-round encryption of Lena, (a) plaintext image of Lena; (b) histogram of plaintext Lena; (c) ciphertext of Lena; (d) histogram of ciphertext Lena; (e) inverse diffusion image of Lena; (f) histogram of (e); (g) the recovered image.
Figure 6. The experimental results of cracking the single-round encryption of Lena, (a) plaintext image of Lena; (b) histogram of plaintext Lena; (c) ciphertext of Lena; (d) histogram of ciphertext Lena; (e) inverse diffusion image of Lena; (f) histogram of (e); (g) the recovered image.
Entropy 24 01023 g006
Figure 7. The experimental results of cracking the single-round encryption of Cameraman, (a) plaintext image of Cameraman; (b) histogram of plaintext Cameraman; (c) ciphertext of Cameraman; (d) histogram of ciphertext Cameraman; (e) inverse diffusion image of Cameraman; (f) histogram of (e); (g) the recovered image.
Figure 7. The experimental results of cracking the single-round encryption of Cameraman, (a) plaintext image of Cameraman; (b) histogram of plaintext Cameraman; (c) ciphertext of Cameraman; (d) histogram of ciphertext Cameraman; (e) inverse diffusion image of Cameraman; (f) histogram of (e); (g) the recovered image.
Entropy 24 01023 g007
Figure 8. The cracking experiment results of two-round of encryption of Tiffany, (a) plaintext image of Tiffany; (b) ciphertext of Tiffany; (c) all-zero chosen-plaintext P 0 ; (d) the corresponding ciphertext of (c); (e) calculated differential image Δ C ; (f) intermediate cracking results Δ D ( 1 ) ; (g) the recovered image.
Figure 8. The cracking experiment results of two-round of encryption of Tiffany, (a) plaintext image of Tiffany; (b) ciphertext of Tiffany; (c) all-zero chosen-plaintext P 0 ; (d) the corresponding ciphertext of (c); (e) calculated differential image Δ C ; (f) intermediate cracking results Δ D ( 1 ) ; (g) the recovered image.
Entropy 24 01023 g008
Figure 9. The cracking experiment results of two-round of encryption of Pepper, (a) plaintext image of Pepper; (b) ciphertext of Pepper; (c) all-zero chosen-plaintext P 0 ; (d) the corresponding ciphertext of (c); (e) calculated differential image Δ C ; (f) intermediate cracking results Δ D ( 1 ) ; (g) the recovered image.
Figure 9. The cracking experiment results of two-round of encryption of Pepper, (a) plaintext image of Pepper; (b) ciphertext of Pepper; (c) all-zero chosen-plaintext P 0 ; (d) the corresponding ciphertext of (c); (e) calculated differential image Δ C ; (f) intermediate cracking results Δ D ( 1 ) ; (g) the recovered image.
Entropy 24 01023 g009
Figure 10. The cracking experiment results of multi-round of encryption of Baboon, (a) plaintext image of Baboon; (b) ciphertext of Baboon; (c) all-zero chosen-ciphertext C 0 ; (d) the corresponding plaintext of (c); (e) intermediate cracking results Δ P ; (f) the recovered image.
Figure 10. The cracking experiment results of multi-round of encryption of Baboon, (a) plaintext image of Baboon; (b) ciphertext of Baboon; (c) all-zero chosen-ciphertext C 0 ; (d) the corresponding plaintext of (c); (e) intermediate cracking results Δ P ; (f) the recovered image.
Entropy 24 01023 g010
Figure 11. The cracking experiment results of multi-round of encryption of Sailboat, (a) plaintext image of Sailboat; (b) ciphertext of Sailboat; (c) all-zero chosen-ciphertext C 0 ; (d) the corresponding plaintext of (c); (e) intermediate cracking results Δ P ; (f) the recovered image.
Figure 11. The cracking experiment results of multi-round of encryption of Sailboat, (a) plaintext image of Sailboat; (b) ciphertext of Sailboat; (c) all-zero chosen-ciphertext C 0 ; (d) the corresponding plaintext of (c); (e) intermediate cracking results Δ P ; (f) the recovered image.
Entropy 24 01023 g011
Figure 12. The cracking effect of partial ciphertext–plaintext pairs on multi-round cracking algorithm, (a) plaintext image of Lena; (b) recovered image with 50% ciphertext–plaintext pairs; (c) recovered image with 80% ciphertext–plaintext pairs; (d) recovered image with 90% ciphertext–plaintext pairs; (e) recovered image with 95% ciphertext–plaintext pairs; (f) recovered image with 100% ciphertext–plaintext pairs.
Figure 12. The cracking effect of partial ciphertext–plaintext pairs on multi-round cracking algorithm, (a) plaintext image of Lena; (b) recovered image with 50% ciphertext–plaintext pairs; (c) recovered image with 80% ciphertext–plaintext pairs; (d) recovered image with 90% ciphertext–plaintext pairs; (e) recovered image with 95% ciphertext–plaintext pairs; (f) recovered image with 100% ciphertext–plaintext pairs.
Entropy 24 01023 g012
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Shi, G.; Yu, S.; Wang, Q. Security Analysis of the Image Encryption Algorithm Based on a Two-Dimensional Infinite Collapse Map. Entropy 2022, 24, 1023. https://doi.org/10.3390/e24081023

AMA Style

Shi G, Yu S, Wang Q. Security Analysis of the Image Encryption Algorithm Based on a Two-Dimensional Infinite Collapse Map. Entropy. 2022; 24(8):1023. https://doi.org/10.3390/e24081023

Chicago/Turabian Style

Shi, Guanwen, Simin Yu, and Qianxue Wang. 2022. "Security Analysis of the Image Encryption Algorithm Based on a Two-Dimensional Infinite Collapse Map" Entropy 24, no. 8: 1023. https://doi.org/10.3390/e24081023

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop