An image encryption method based on chaotic mapping and bidirectional operation Feistel structure

By combining the hyperchaotic Lorenz system with the Feistel structure, efficient image encryption is achieved, solving the problems of insufficient scrambling-diffusion and vulnerability to plaintext attacks in existing technologies, thus enhancing the security and efficiency of image encryption.

CN113077373BActive Publication Date: 2026-05-12HARBIN INST OF TECH AT WEIHAI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH AT WEIHAI
Filing Date
2021-03-23
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing image encryption methods suffer from insufficient scrambling-diffusion, are time-consuming, and are vulnerable to plaintext attacks, thus losing their plaintext characteristics.

Method used

By employing a hyperchaotic Lorenz system combined with a Feistel structure, bidirectional bit-level scrambling, diffusion, and pixel rearrangement are performed on plaintext images. A global scrambling and diffusion module is constructed, and the SHA-256 algorithm is used to generate keys, thereby enhancing the key space and the correlation between plaintext and data.

Benefits of technology

It improves image encryption efficiency, enhances resistance to plaintext attacks, achieves sensitivity to plaintext images, improves scrambling-diffusion effects, and resists statistical and differential attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113077373B_ABST
    Figure CN113077373B_ABST
Patent Text Reader

Abstract

The present application provides an image encryption method based on chaotic mapping and bidirectional operation Feistel structure, to solve the problems of insufficient scrambling and diffusion of existing image encryption algorithm based on chaotic mapping, and the encryption process is easy to be attacked by plaintext. The present application first uses SHA-256 algorithm to generate a 256-bit hash value for the plaintext image, and calculates the correction to obtain the initial value of the chaotic system; then iterates the chaotic system to update the initial value, and iterates the chaotic system again to generate a pseudo-random sequence, and calculates the correction to obtain the round key and the modulation matrix; secondly, the bidirectional operation Feistel structure is used to perform two times of bit-level scrambling, diffusion and pixel rearrangement operation on the image; finally, the modulation matrix is used to perform global scrambling and diffusion operation on the sequence to generate the final ciphertext image. The experimental results and security analysis show that the encryption method proposed in the present application enhances the plaintext sensitivity of the algorithm, and can effectively resist attacks, and has good security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital image encryption technology, specifically relating to an image encryption method based on chaotic mapping and bidirectional operation Feistel structure. Background Technology

[0002] With the rapid development of information technologies such as the internet, multimedia has become a major means of information dissemination. Images, as carriers of information, are vivid, expressive, and contain a large amount of information, making them an indispensable part of communication in people's daily lives. In reality, protecting image data security is particularly important, and image encryption technology is an effective method for protecting the transmission of digital image information.

[0003] Due to the large data volume, high redundancy, and strong pixel correlation of images, traditional encryption algorithms are no longer applicable. Chaotic systems, on the other hand, possess characteristics such as initial value sensitivity, pseudo-randomness, and non-periodicity that align with the properties required by cryptography.

[0004] Currently, chaotic encryption technology is widely used in the field of information security, especially in image encryption.

[0005] The Feistel structure is a block cipher structure proposed by cryptographer Horst Feistel. It is a fast-implementing symmetric cryptographic algorithm with great potential for development in security technologies such as information encryption, concealment, and authentication. Summary of the Invention

[0006] To address the problems of insufficient scrambling-diffusion, high time consumption, and susceptibility to plaintext attacks caused by encryption processes being detached from plaintext in some existing image encryption methods, this invention employs a hyperchaotic Lorenz system combined with a Feistel structure to perform bidirectional bit-level scrambling, diffusion, and pixel rearrangement on the plaintext image before performing global scrambling and diffusion operations. This achieves the purpose of encrypting transmitted images. In this invention, the initial value of the chaotic system is calculated and corrected from the plaintext image information, ensuring the sensitivity of the encryption method to plaintext.

[0007] This invention relates to two main modules: the first module is bit-level scrambling, diffusion, and pixel rearrangement of the image Feistel structure; the second module is global scrambling and diffusion of the image.

[0008] 1. Bit-level scrambling, diffusion, and pixel rearrangement in image Feistel structures

[0009] 1.1 Generation of Round Key and Modulation Matrix

[0010] By applying the SHA-256 algorithm to the plaintext image information, a 256-bit hash value is generated, and the initial values ​​for the chaotic system are calculated from this hash value. , , and .

[0011] This invention employs the hyperchaotic Lorenz system, a well-known four-dimensional chaotic system with complex dynamic behavior, whose equations are as follows:

[0012]

[0013] in, , , and Let a, b, c, and r be the system's state variables, and a, b, c, and r be the system's control parameters, where a = 10, b = 8 / 3, and c = 28. At this point, the system exhibits a hyperchaotic state.

[0014] Different plaintext images will generate different 256-bit hash values ​​using the SHA-256 algorithm, represented in decimal as follows: They were divided into 4 groups, which are... , , and Calculate the initial values ​​of the hyperchaotic Lorenz system according to the following formula. , , and Given system parameter values, i.e. a=10, b=8 / 3, c=28, r=-1, after iterating the hyperchaotic Lorenz system 2000 times using the initial values, the values ​​of x, y, z and w are generated and used as the initial values ​​of the updated system.

[0015]

[0016] Continue iterating through the chaotic system using the updated initial values. Next, generate 4 pseudo-random sequences. , , and Four pseudo-random matrices, X, Y, Z, and W, are generated by calculating and correcting these four pseudo-random sequences. Further calculations and corrections are then performed on these matrices to generate the round key. , , and With size The modulation matrix Q;

[0017] The calculation correction method for the four pseudo-random matrices X, Y, Z and W is as follows:

[0018]

[0019] in , , This indicates that the largest integer less than or equal to t is returned. The number n is modulo t.

[0020] Round key , , and The calculation and correction method is as follows:

[0021]

[0022] The correction method for calculating the modulation matrix Q is as follows:

[0023]

[0024] 1.2 Construct the Feistel structure and perform bit-level scrambling, diffusion, and pixel rearrangement operations on the image row by row.

[0025] The size is The plaintext image P is unfolded into rows. Given a one-dimensional vector R, divide R into groups of 4 pixels each, resulting in a total of T = (R / 4) groups, each group being... , The last group contains 4 or fewer pixels. Different Feistel structures are constructed based on the number of pixels in the group. Then, the image is subjected to bidirectional bit-level scrambling, diffusion, and pixel rearrangement operations to generate vector C.

[0026] For a group of 4 pixels, that is... The bidirectional operation formula for bit-level scrambling and diffusion of the Feistel structure is as follows:

[0027]

[0028] After rearrangement, the pixel order within the group is as follows ;

[0029] The last group has 3 pixels, that is The bidirectional operation formula for bit-level scrambling and diffusion of the Feistel structure is as follows:

[0030]

[0031] After rearrangement, the pixel order within the group is as follows ;

[0032] The last group has 2 pixels, which is... The bidirectional operation formula for bit-level scrambling and diffusion of the Feistel structure is as follows:

[0033]

[0034] The rearranged pixel order within the group is as follows ;

[0035] The last group has 1 pixel, which is... Its value can be rewritten as (255-J);

[0036] 1.3 Construct the Feistel structure and perform bit-level scrambling, diffusion, and pixel rearrangement operations on the image column by column.

[0037] Press vector C according to The image information matrix C1 is reset in the following way, and then it is expanded into a one-dimensional vector C2 in column form. It is also grouped into groups of 4 pixels each, with the last group consisting of 4 pixels or less. The vector C2 is then subjected to bit-level scrambling, diffusion, and pixel rearrangement operations using the method in 1.2 to generate a one-dimensional vector C3.

[0038] 2. Global Scrambling and Diffusion of Images

[0039] After performing global scrambling and diffusion operations on the image information vector C3 using the modulation matrix Q, the final ciphertext image matrix C4 is generated.

[0040] The modulation matrix Q is expanded in row-matrix form as follows sequence , According to the formula Calculate the sequence ,Will Only the first occurrence of a repeated element is retained in the set. exist Add any missing values ​​to the list in ascending order. At the end, shuffle according to the following formula:

[0041]

[0042] Reset C3 to The image information matrix is ​​diffused according to the following formula to generate the final ciphertext matrix C4;

[0043]

[0044] This invention combines the hyperchaotic Lorenz system with Feistel technology to achieve image encryption. The beneficial effects of this invention are: bidirectional operation of the Feistel structure improves image encryption efficiency; the initial value of the hyperchaotic system is calculated and corrected from the 256-bit hash value generated by the SHA-256 algorithm from the plaintext image, which increases the key space of the algorithm and closely links the encryption process with the plaintext image, enhancing the algorithm's resistance to plaintext attacks; scrambling and diffusion operations are performed on the plaintext image at both the bit and pixel levels, thereby improving the scrambling-diffusion effect. Attached Figure Description

[0045] Figure 1 is a flowchart of an image encryption method based on chaotic mapping and bidirectional operation Feistel structure according to the present invention;

[0046] Figure 2 shows the Feistel structure and pixel rearrangement of the four-pixel bidirectional operation within a group in this invention.

[0047] Figure 3 shows the Feistel structure and pixel rearrangement of the three-pixel bidirectional operation within a group in this invention.

[0048] Figure 4 shows the Feistel structure and pixel rearrangement of the two-pixel bidirectional operation within a group in this invention;

[0049] Figure 5 shows the experimental results of the 256×256 Tree image in this invention;

[0050] Figure 6 is a histogram of the plaintext and ciphertext images of the Tree in this invention;

[0051] Figure 7 shows the correlation distribution of adjacent pixels in the plaintext and ciphertext images of the Tree in this invention; Detailed Implementation

[0052] To further understand the technical solution of the present invention, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0053] This invention discloses an image encryption method based on chaotic mapping and bidirectional operation Feistel structure, the process of which is as follows: Figure 1 As shown, it includes the following steps:

[0054] The first step involves using the SHA-256 algorithm on the plaintext image information to generate a 256-bit hash value, which is then used to calculate and correct the initial values ​​for generating the chaotic system. , , and Given parameter values, use the initial values ​​to iterate through the chaotic system and generate new values ​​to update the initial values ​​of the system.

[0055] The second step is to continue iterating over the chaotic system using the updated initial values. Next, four pseudo-random sequences are generated. These four pseudo-random sequences are then modified to generate four pseudo-random matrices, X, Y, Z, and W, respectively. Further modifications are made to these matrices to generate the round key and modulation matrix.

[0056] The third step is to unfold the plaintext image into a one-dimensional vector in row-wise order, and then group it into groups of 4 pixels each, resulting in a total of T = (R / 4) groups, each group being... , The last group contains 4 pixels or less. Different Feistel structures are constructed based on the number of pixels in the group, enabling bidirectional bit-level scrambling, diffusion, and pixel rearrangement operations on the image. The bidirectional Feistel structure and pixel rearrangement process for a group of 4 pixels is shown in Figure 2; the bidirectional Feistel structure and pixel rearrangement process for a group of 3 pixels is shown in Figure 3; and the bidirectional Feistel structure and pixel rearrangement process for a group of 2 pixels is shown in Figure 4. Figure 4 .

[0057] The fourth step is to expand the processed image information into a one-dimensional vector in column form, and then perform bit-level scrambling, diffusion, and pixel rearrangement operations as in the third step.

[0058] The fifth step involves using the modulation matrix to perform global scrambling and diffusion operations on the image information matrix, thereby generating the final encrypted image matrix.

[0059] To verify the effectiveness of this invention, simulation experiments are conducted below to further illustrate its effectiveness. The invention was tested on a Windows 10 platform (Intel(R) Core(TM) i5-4590, 3.30GHz, RAM 4.00GB) and Matlab 2017a. Security analysis of the encryption method of this invention was also performed from the perspective of resisting statistical and differential attacks. Figure 5 shows the experimental results for a 256×256 Tree image. In Figure 5(a), the plaintext Tree image is shown; in Figure 5(b), the ciphertext Tree image is shown; and in Figure 5(c), the decrypted Tree image is shown.

[0060] As can be seen from the image, the ciphertext image obtained through this encryption method is similar to noise. No information about the plaintext image can be obtained from the ciphertext image. The decrypted image is the same as the plaintext image, thus achieving the purpose of encrypting and decrypting the image.

[0061] 1. Key Space Analysis

[0062] The security of an encryption method is highly dependent on its key space; generally, the larger the key space, the stronger its resistance to brute-force attacks. The encryption method of this invention uses a key comprising a 256-bit hash value generated by the SHA-256 algorithm and a round key. , , , and the initial values ​​of hyperchaotic systems , , , If the calculation precision is 10⁻¹⁴, the key space of the encryption method of this invention is approximately 10¹⁵⁰. Therefore, the key space of the encryption method of this invention is relatively large and can effectively resist brute-force attacks.

[0063] 2. Histogram Analysis

[0064] A histogram represents the distribution frequency of image pixels and describes the statistical correlation of the image. Generally, the more uniform the distribution of the image pixel grayscale histogram, the more effectively it resists statistical analysis attacks. The grayscale histogram of the plaintext image is shown in Figure 6(a), and Figure 6(b) is the grayscale histogram of the ciphertext image after using the encryption method of this invention. As can be seen from Figure 6, the image encryption method of this invention has a strong ability to resist statistical analysis; attackers cannot analyze the grayscale value distribution of the original image from the ciphertext image.

[0065] 3. Pixel Correlation Analysis

[0066] Plaintext image pixels exhibit strong correlations, containing partial information about the plaintext. This information can be easily exploited by malicious actors. To resist statistical analysis, it is essential to reduce the correlation between pixels. The formula for calculating pixel correlation is as follows:

[0067]

[0068] Where N is the number of pairs of arbitrarily chosen adjacent pixels, and their grayscale values ​​are... , ,vector ,vector .

[0069] 2000 pairs of adjacent pixels were randomly selected from both the plaintext and ciphertext images, and their correlation coefficients in the horizontal, vertical, and diagonal directions were calculated. The results are shown in Table 1. The correlation diagrams of adjacent pixels in the plaintext image in the horizontal, vertical, and diagonal directions are shown in Figures 7(a), (c), and (e), while those in the ciphertext image are shown in Figures 7(b), (d), and (f). From Table 1 and Figure 7, we can see that the correlation coefficient between adjacent pixels in the plaintext image is close to 1, while the correlation coefficient between adjacent pixels in the ciphertext image is essentially 0. This indicates that the method of this invention breaks the correlation between adjacent pixels, preventing malicious actors from effectively attacking them through statistical analysis.

[0070] Table 1. Correlation Comparison of Adjacent Pixels

[0071] direction Tree plain text image Tree encrypted image Horizontal direction 0.9664 -0.0056 vertical direction 0.9362 0.0174 diagonal direction 0.9166 0.0006

[0072] 4. Information Entropy Analysis

[0073] Information entropy reflects the uncertainty of an image. Generally, the better the encryption effect of the algorithm, the closer the image's information entropy is to 8, and the greater the information content and randomness of the image. The formula for calculating information entropy is as follows:

[0074]

[0075] Where L is the gray level of the image, This represents the probability of grayscale value i appearing.

[0076] The calculated information entropy value of the plaintext image is 7.4540, and the information entropy value of the ciphertext image is 7.9917. The information entropy value of the ciphertext image is very close to its theoretical value of 8, indicating that the possibility of information leakage of the ciphertext is very small, further proving that the method of the present invention can effectively resist statistical analysis attacks.

[0077] 5. Plaintext Sensitivity Analysis

[0078] Plaintext sensitivity analysis refers to encrypting two plaintext images with slight differences using the same key and encryption method, resulting in two corresponding ciphertext images. The difference between these two ciphertext images is then compared. If the difference between the two images is significant, it indicates that the encryption method has good plaintext sensitivity. This sensitivity can be measured using pixel change rate (NPCR) and normalized average change rate (UACI), and their calculation formulas are as follows:

[0079]

[0080] Where M and N represent the number of rows and columns of the image, respectively. Indicates the position of the original ciphertext image Pixel value at that location,

[0081] This indicates the location of the slightly altered ciphertext image. The pixel value at that location. If ,but ,otherwise .

[0082] To test the sensitivity of this invention to plaintext, the pixel value at a certain location in the plaintext image was incremented by 1 before encryption. The NPCR and UACI values ​​of the ciphertext image before and after the pixel value change in the plaintext image are shown in Table 2.

[0083] Table 2. NPCR and UACI values ​​of the ciphertext image before and after plaintext image pixel changes.

[0084] index Tree image Theoretical value NPCR 99.5667% 99.6094% UACI 33.3919% 33.4635%

[0085] As can be seen from Table 2, the values ​​of NPCR and UACI are very close to their theoretical values, indicating that a slight change in the plaintext image will result in a significant change in the ciphertext image. This demonstrates that the encryption method of the present invention is quite sensitive to plaintext, which further illustrates that the encryption method of the present invention can effectively resist differential attacks.

[0086] The initial value of the chaotic system in this invention is calculated from plaintext information, which enhances the algorithm's sensitivity to plaintext. By constructing different Feistel structures and performing bidirectional encryption operations, the goal of scrambling and spreading the image at the bit level is achieved. The pseudo-random sequence generated by the iterative hyperchaotic system, after being calculated and corrected, is used to globally scramble and spread the image information, making it effectively resistant to statistical and differential attacks.

Claims

1. An image encryption method based on chaotic mapping and bidirectional operation Feistel structure, characterized in that, Includes the following steps: The first step involves using the SHA-256 algorithm on the plaintext image information to generate a 256-bit hash value, which is then used to calculate and correct the initial values ​​for the hyperchaotic Lorenz system. , , and ; Different plaintext images will generate different 256-bit hash values ​​using the SHA-256 algorithm, represented in decimal as follows: They were divided into 4 groups, which are... , , and Calculate the initial values ​​of the hyperchaotic Lorenz system according to the following formula. , , and After iterating the hyperchaotic Lorenz system 2000 times using the initial values, the values ​​of x, y, z, and w are generated and used as the initial values ​​after the system update. The second step is to continue iterating over the chaotic system using the updated initial values. Next, generate 4 pseudo-random sequences. , , and Four pseudo-random matrices, X, Y, Z, and W, are generated by calculating and correcting these four pseudo-random sequences. Further calculations and corrections are then performed on these matrices to generate the round key. , , and With size The modulation matrix Q; and the calculation and correction methods for the four pseudo-random matrices X, Y, Z and W are as follows: in , , This indicates that the largest integer less than or equal to t is returned. Represents the remainder of number n with respect to t; Round key , , and The calculation and correction method is as follows: The correction method for calculating the modulation matrix Q is as follows: The third step is to change the size to The plaintext image P is unfolded into rows. Given a one-dimensional vector R, divide R into groups of 4 pixels each, resulting in a total of T = (R / 4) groups, each group containing 4 pixels. , The last group contains 4 or fewer pixels. Different Feistel structures are constructed based on the number of pixels in the group. Then, the image is subjected to bidirectional bit-level scrambling, diffusion, and pixel rearrangement operations to generate vector C. For a group of 4 pixels, that is... The bidirectional operation formula for bit-level scrambling and diffusion of the Feistel structure is as follows: After rearrangement, the pixel order within the group is as follows ; The last group has 3 pixels, that is The bidirectional operation formula for bit-level scrambling and diffusion of the Feistel structure is as follows: After rearrangement, the pixel order within the group is as follows ; The last group has 2 pixels, which is... The bidirectional operation formula for bit-level scrambling and diffusion of the Feistel structure is as follows: The rearranged pixel order within the group is as follows ; The last group has 1 pixel, which is... Its value can be rewritten as (255-J); Fourth step, adjust vector C according to... The image information matrix C1 is reset in a certain way, and then it is expanded into a one-dimensional vector C2 in column form. It is also grouped into groups of 4 pixels, with the last group being less than or equal to 4 pixels. The vector C2 is then subjected to bit-level scrambling, diffusion, and pixel rearrangement operations using the method in the third step to generate a one-dimensional vector C3. The fifth step involves using the modulation matrix Q to perform global scrambling and diffusion operations on the image information vector C3, thereby generating the final ciphertext image matrix C4. The global scrambling process is as follows: The modulation matrix Q is expanded in row-matrix form as follows sequence , According to the formula Calculate the sequence ,Will Only the first occurrence of a repeated element is retained in the set. exist Add any missing values ​​to the list in ascending order. At the end, shuffle according to the following formula: The global diffusion process is as follows: Reset C3 to The image information matrix is ​​diffused according to the following formula to generate the final ciphertext matrix C4; 。