Image encryption algorithm based on four-dimensional conservative chaotic system
Through the combination of a four-dimensional conservative chaotic system and the rules of life game, the existing image encryption algorithms are solved in terms of security and efficiency, achieving higher security and encryption efficiency, and being able to effectively resist cropping and noise attacks.
Patent Information
- Application Number
- CN202410989869.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-12-17
AI Technical Summary
The existing image encryption algorithms have shortcomings in terms of security and efficiency, especially low-dimensional chaotic systems are easily cracked, and traditional chaos methods cannot effectively reduce the high correlation of adjacent pixels, increasing time overhead.
The image encryption method based on the four-dimensional conservative chaotic system is adopted, and the hash value is generated as the initial value through the SHA-256 algorithm to generate a four-dimensional chaotic sequence, and the cross-row index chaotic and forward diffusion are combined with the rules of the life game to generate a chaotic matrix and The diffusion result enables the encryption of the image.
The security and efficiency of image encryption algorithms are improved, the correlation of adjacent pixels is reduced, the ability to fight against clipping and noise attacks is enhanced, and the encryption efficiency is significantly improved.
Smart Images

Figure CN119155009A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to an image encryption and decryption algorithm combining chaos theory and life game rules. Background Art
[0002] With the advancement of digital technology and Internet communications, all kinds of data can be quickly transmitted on the Internet. The intelligence of information technology is gradually penetrating into every aspect of our lives, and the accompanying information security challenges are becoming more and more serious. The data sharing process may be subject to the risk of hacker attacks or data theft. Once personal information is leaked on the Internet, it may infringe on personal privacy. Once state secrets or sensitive corporate information is illegally obtained, it may cause significant losses.
[0003] Images play a key role in the fields of medicine, finance, scientific research, commerce, military and politics, and contain a large amount of sensitive information. During network transmission and storage, this information faces great security risks. Therefore, it is increasingly important to ensure the secure transmission and storage of images. Related fields such as fake face detection and image tampering detection have become research hotspots and have attracted the attention of many scholars at home and abroad. Image encryption is an effective means of digital image protection. Its core principle is to convert the original image into an unrecognizable random noise image. Without the key, this noise information cannot be identified. Even if an unauthorized user obtains the encrypted image by some means, it cannot be restored to the original plaintext image.
[0004] With the rapid progress of computer technology, some traditional image encryption methods may gradually be eliminated. This requires us to continuously develop and design new image encryption algorithms to ensure the security of image information. It is crucial to explore image encryption methods with higher performance and security. The encryption algorithm based on chaotic system is not only highly secure, but also simple and easy to implement, with fast encryption speed, and can achieve a good balance between security and encryption efficiency. This type of algorithm is particularly suitable for processing large amounts of image data and can meet the growing demand for real-time and secure transmission of image data. Therefore, research on image encryption technology based on chaos theory is of great importance and value both in theoretical research and practical application. In recent years, image encryption algorithms based on chaos theory have attracted the attention of many scholars and have also promoted the progress of chaos theory and image encryption technology.
[0005] In recent years, algorithms that apply chaos theory to image encryption have emerged one after another. The main method is to generate a random sequence through a chaotic system, and then apply the sequence to scrambling and diffusion to achieve encryption. The scrambling process involves changing the pixel position in the two-dimensional matrix of the image, making it difficult to identify the original content. The diffusion process ensures that any tiny pixel change in the image will have a wide impact on the entire image.
[0006] The evaluation indicators of image encryption algorithms are used to evaluate the performance of encryption algorithms. Plain text images transmitted in the network are vulnerable to attacks by attackers to crack the encryption method and find the key. The evaluation indicators of image encryption algorithms include: information entropy, histogram, correlation between adjacent pixels, resistance to clipping attacks, resistance to noise attacks, key sensitivity, etc.
[0007] In the prior art, image information encryption usually uses a low-dimensional chaotic system, which is not complex enough and is easy to be cracked. In addition, the scrambling of image encryption is often achieved by traversing the entire row and column, which not only fails to reduce the high correlation between adjacent pixels, but also greatly increases the time cost of scrambling. Summary of the invention
[0008] The invention proposes an image encryption method based on a four-dimensional conservative chaotic system.
[0009] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0010] An image encryption method based on a four-dimensional conservative chaotic system comprises the following steps:
[0011] Step 1: Generate image data information summary based on SHA-256:
[0012] Calculate the decimal pixel sum of the plaintext image matrix and use the decimal sum as the input of the SHA-256 algorithm to obtain the 256-bit binary hash value of the image data .
[0013] Step 2: Generate a four-dimensional conservative chaotic system sequence:
[0014] (2a) Calculate the hash value obtained in step 1 and calculate the initial value of the four-dimensional conservative chaotic system;
[0015] (2b) Iterate the chaotic system and discard the first 1000 iterations to obtain a four-dimensional chaotic sequence. These four-dimensional sequences are named X, Y, Z, and W. The sizes of the four sequences are ;
[0016] Step 3, generate the scrambled matrix:
[0017] (3a) Recombining the chaotic sequences X and Y to obtain a binary matrix S containing only 0-1, which is used as the initial cell matrix for the iteration of the Game of Life rules;
[0018] (3b) Using the rules of the Game of Life, the initial cell matrix matrix is iterated N times to obtain the scrambled matrix SM;
[0019] Step 4: Scramble the plaintext image:
[0020] (4a) Using the scrambling matrix SM obtained in step 3, the plaintext image is scrambled using the coordinate index rows and columns to obtain the scrambling result Perm_img;
[0021] Step 5: Diffusion of the scrambling results:
[0022] (5a) Use the chaotic sequences Z and W to diffuse the scrambled result obtained in step 4.
[0023] In step (2a), the hash value The system is divided into two parts according to different division methods. The first part generates the system initial state variables with 25 bits, and the second part generates the system control parameters with 52 bits. The initial value and state variables of the four-dimensional chaotic system are obtained by performing the following operations on the hash value in step 1:
[0024]
[0025]
[0026] in, is the initial value of the four-dimensional conservative chaotic system, a, b, c are state variables, It is a hash value. The initial value takes a 25-bit hash value for calculation, and the state variable takes a 52-bit hash value for calculation.
[0027] In the step (2b), the system equation of the four-dimensional conservative chaotic system is:
[0028]
[0029] Among them, a, b, c are system parameters, and their value range is a ∈ [ 1 , 4 ], b ∈ [ − 2 , 8 ], c ∈ [ 1 , 8 ] , x, y, z, w are system state variables, and their value range is x , y , z , w ∈ [ − 3 , 3 ] , within the range of values, the system is chaotic.
[0030] In the step (3a), the recombination method of the two chaotic sequences X and Y is:
[0031]
[0032] The method for generating the cell matrix is
[0033]
[0034] Taking 0.5 as the threshold, the reorganized matrix K is converted into a binary matrix S.
[0035] In step (3b), the rules of the Game of Life are:
[0036] The image is represented by a two-dimensional rectangular grid, where each grid square represents a cell, and each cell has two life states: dead or alive. It is represented by binary value: 1 means cell death, and 0 means cell survival. The life state of a cell is determined by the local spatial state of the cell. The rules of interaction between cells are as follows:
[0037] (1) When there are fewer than two living cells around a cell, any living cell will die.
[0038] (2) Any living cell is alive when there are two or three living cells around it.
[0039] (3) When there are exactly three living cells around a cell, any dead cell will become a living cell.
[0040] (4) When there are three or more living cells around a cell, any living cell may die.
[0041] In the step (3b), after the iteration matrix is generated using the rules of the Game of Life, the accumulation method is:
[0042]
[0043] in, To iterate the matrix, accumulate the sum of each iteration of position (i, j) to get the value at (i, j) in the scrambled matrix.
[0044] In the step (4a), the chaotic sequences X and Y are applied to the image scrambling, specifically:
[0045] Sort the matrix SM by columns to obtain the index matrix O; sort it by rows to obtain the index matrix V;
[0046] Scramble the plaintext image as follows
[0047]
[0048] Among them, C is the scrambled result and P is the plaintext image.
[0049] The specific algorithm is as follows
[0050]
[0051] In step (5a), the chaotic sequences Z and W are applied to image diffusion, specifically:
[0052] The chaotic sequence W is arranged in ascending order to obtain an index matrix, and the scrambled result is rearranged using the index matrix, and then XORed with the chaotic sequence Z.
[0053] E i = { C MN − 2 ⊕ C MN − 1 ⊕ Z i , if i = 1 C MN − 1 ⊕ C 1 ⊕ Z i , if i = 2 C MN − 2 ⊕ C MN − 1 ⊕ Z i , if i ∈ [ 3 , MN ]
[0054] Among them, C is the image to be diffused, and E is the diffusion result, which is also the ciphertext image.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention proposes an image encryption method based on a four-dimensional conservative chaotic system. Specifically, the present invention proposes a new four-dimensional chaotic system. By performing a dynamic analysis on the system, it is proved that the system has good chaotic characteristics and can meet the requirements of the encryption algorithm. In addition, the present invention designs an initial value generation scheme associated with the plaintext for the four-dimensional conservative chaotic system, and the initial value of the chaotic system is related to the hash value of the plaintext image. At the same time, the present invention applies the four chaotic sequences of the four-dimensional chaotic system to cross-row and column index scrambling and forward diffusion based on the Game of Life. Compared with the previous image information encryption algorithm based on the chaotic system, the method proposed by the present invention has better security and effectively improves the system encryption efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a flow chart of the image encryption method based on a four-dimensional conservative chaotic system of Example 1.
[0057] Figure 2 The Lipuyanov index spectrum of the four-dimensional chaos in Example 1
[0058] Figure 3 This is the bifurcation diagram of the four-dimensional chaos in Example 1.
[0059] Figure 4 This is the encryption and decryption result of the image encryption scheme in Example 1.
[0060] Figure 5 This is a histogram analysis result diagram of the image encryption scheme of Example 1.
[0061] FIG6 is a diagram showing the correlation analysis results of the image encryption scheme of Example 1.
[0062] Figure 7 This is a diagram showing the results of the noise attack resistance analysis of the image encryption scheme of Example 1.
[0063] Figure 8 This is a diagram showing the results of the analysis of the image encryption scheme against cropping attacks in Example 1. DETAILED DESCRIPTION
[0064] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0065] Take Goldhill as input plaintext, refer to Figure 1 The implementation steps of the present invention are described in further detail.
[0066] Step 1: Generate image data information summary based on SHA-256:
[0067] Calculate the decimal pixel sum of the plaintext image matrix and use the decimal sum as the input of the SHA-256 algorithm to obtain the 64-bit hexadecimal string of the image data as '7B3DCE6B923C3BF562FE1F1B60F046897C786EACB2A72ECF
[0068] DE12F448C87C9986', converted to a 256-bit binary hash value .
[0069] Step 2: Generate a four-dimensional conservative chaotic system sequence:
[0070] (2a) It is divided into two parts according to different division methods. The first part generates the system initial state variables with 25-bit combination, and the second part generates the system control parameters with 52-bit combination. According to the mapping range of the system parameters and the initial values of the new four-dimensional conservative chaotic system, the initial value generation formula is given:
[0071]
[0072] The system parameter generation formula is given:
[0073]
[0074] in, is the initial value of the four-dimensional conservative chaotic system, a, b, c are state variables, It is a hash value. The initial value takes a 25-bit hash value for calculation, and the state variable takes a 52-bit hash value for calculation.
[0075] This example ,
[0076] All of them are within the range of chaotic systems.
[0077] (2b) Iterate the chaotic system and discard the first 1000 iterations to obtain a four-dimensional chaotic sequence. These four-dimensional sequences are named X, Y, Z, and W. The sizes of the four sequences are , the mathematical expression of the chaotic system is:
[0078]
[0079] Among them, a, b, c are system parameters, and their value range is a ∈ [ 1 , 4 ], b ∈ [ − 2 , 8 ], c ∈ [ 1 , 8 ] , x, y, z, w are system state variables, and their value range is x , y , z , w ∈ [ − 3 , 3 ] , within the range of values, the system is chaotic.
[0080] Figure 2 The Lipuyanov index spectrum of the chaotic system designed for the present invention shows that the system has two or more positive Lipuyanov exponents and the four LE curves in the exponential spectrum are almost symmetrical about the zero axis, so the system is determined to be a conservative chaotic system.
[0081] Figure 3 The bifurcation diagram of the chaotic system designed for the present invention shows that, as the parameters change, there are countless output values falling at different positions, so it is determined that the system is chaotic within the corresponding value range.
[0082] Table 1 is the NIST test table of the chaotic system designed by the present invention. It can be seen from the table that each index of the four random sequences is greater than 0.01 and has passed the chaos test.
[0083] Table 1 NIST test
[0084]
[0085] In summary, it can be determined that the system is chaotic within the specified range of system parameter values, has good chaotic performance, and can be applied to image encryption.
[0086] Step 3, generate the scrambled matrix:
[0087] (3a) The chaotic sequences X and Y are recombined to obtain a binary matrix S containing only 0-1, which is used as the initial cell matrix for the iteration of the rules of the Game of Life. The construction process is:
[0088]
[0089] Set 0.5 as the threshold, and the initial cell matrix generation process is:
[0090]
[0091] when This means that the cell is dead. It means that the cell is alive.
[0092] (3b) Using the rules of the Game of Life, the initial cell matrix is iterated N times, and the scrambled matrix SM is generated using the binary to decimal conversion method. The specific process is:
[0093]
[0094] Step 4: Scramble the plaintext image:
[0095] (4a) Sort the matrix SM by columns to obtain an index matrix O; sort the matrix SM by rows to obtain an index matrix V;
[0096] (4b) Scramble the plaintext image as follows
[0097]
[0098] Among them, C is the scrambled result and P is the plaintext image.
[0099] Step 5: Diffusion of the scrambling results:
[0100] (5a) Use the chaotic sequences Z and W to diffuse the scrambled result obtained in step 4.
[0101] E i = { C MN − 2 ⊕ C MN − 1 ⊕ Z i , if i = 1 C MN − 1 ⊕ C 1 ⊕ Z i , if i = 2 C MN − 2 ⊕ C MN − 1 ⊕ Z i , if i ∈ [ 3 , MN ]
[0102] The decryption process is to perform an inverse transformation on the encrypted image. The encryption algorithm proposed in the present invention is a symmetric encryption algorithm. The encryption key and the decryption key are completely consistent. After the inverse transformation, the correct decrypted image is obtained. By calculating the PSNR of the decrypted image and the plaintext, it can be found that there is no data missing between the decrypted image and the original image.
[0103] In order to verify that the method has better encryption performance, the algorithm of the present invention is specifically implemented using matlab, and the algorithm is analyzed by histogram and correlation, and it is found that the encryption scheme proposed by the present invention has better encryption effect. The present invention has sufficient key space, is highly sensitive to the encrypted image and the initial key, can resist a variety of known attacks, and has high security.
[0104] Figure 4 This is the encryption and decryption effect diagram. It can be seen from the figure that it is impossible to obtain any information about the original image from the ciphertext image with the naked eye. It can be seen that the decrypted image is highly consistent with the original image.
[0105] Figure 5 To perform histogram analysis on the plaintext image and the ciphertext image, it can be seen intuitively from the histogram that the pixel value distribution of the ciphertext image is almost uniform, indicating that the algorithm can effectively resist statistical attacks.
[0106] Figure 6 shows the correlation analysis of adjacent pixels of the plaintext image and the ciphertext image. It can be seen from the figure that the pixels of the plaintext image in three directions are concentrated near the diagonal, which indicates that the correlation between adjacent pixels is high. The pixels of the encrypted image in three directions are randomly distributed in the entire area, showing a disordered state, which indicates that the correlation between adjacent pixels is very low.
[0107] Figure 7In order to successfully decrypt most of the information of the image and restore the overall content of the image when the image is attacked by noise, the Goldhill image is taken as an example to interfere with the ciphertext by adding 0.05%, 0.5% and 5% salt and pepper noise respectively. Although noise-like conditions will appear in the decryption result, the overall reading is not affected, indicating that the algorithm in this paper has strong robustness.
[0108] Figure 8 In order to successfully decrypt most of the image information and restore the overall content of the image when the image is subjected to cropping attacks, the Goldhill image is taken as an example, and the ciphertext is cropped by 1 / 16, 1 / 4 and 1 / 2 respectively. Although noise-like conditions will appear in the decrypted result, the overall reading is not affected, indicating that the algorithm in this paper has strong robustness.
[0109] The above description is only a specific embodiment of the present invention and is not intended to limit the implementation methods of the present invention. However, professionals in this field should not make any modifications, equivalent substitutions, improvements, etc. that violate the spirit and principles of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An image encryption algorithm based on a four-dimensional conservative chaotic system, characterized by , including the following steps: Step 1: Generate image data information summary based on SHA-256: Calculate the decimal pixel sum of the plaintext image matrix and use the decimal sum as the input of the SHA-256 algorithm to obtain the 256-bit binary hash value of the image data ; Step 2: Generate a four-dimensional conservative chaotic system sequence: (2a) Calculate the hash value obtained in step 1 and calculate the initial value of the four-dimensional conservative chaotic system; (2b) Iterate the chaotic system and discard the first 1000 iterations to obtain a four-dimensional chaotic sequence. These four-dimensional sequences are named X, Y, Z, and W. The sizes of the four sequences are ; Step 3, generate the scrambled matrix: (3a) Recombining the chaotic sequences X and Y to obtain a binary matrix S containing only 0-1, which is used as the initial cell matrix for the iteration of the Game of Life rules; (3b) Iterating the initial cell matrix matrix N times to obtain the scrambled matrix SM; Step 4: Scramble the plaintext image: (4a) Using the scrambling matrix SM obtained in step 3, the plaintext image is scrambled using the coordinate index rows and columns to obtain the scrambling result Perm_img; Step 5: Diffusion of the scrambling results: (5a) Use the chaotic sequences Z and W to diffuse the scrambled result obtained in step 4.
2. According to claim 1, the image encryption method based on a four-dimensional conservative chaotic system is characterized in that: In step (2a), the hash value The system is divided into two parts according to different division methods. The first part generates the system initial state variables with 25-bit combination, and the second part generates the system control parameters with 52-bit combination. The initial value and state variables of the four-dimensional chaotic system are obtained by performing the following operations on the hash value in step 1: , ,in, is the initial value of the four-dimensional conservative chaotic system, a, b, c are state variables, It is a hash value. The initial value takes a 25-bit hash value for calculation, and the state variable takes a 52-bit hash value for calculation.
3. The image encryption method based on a four-dimensional conservative chaotic system according to claim 1, characterized in that: In the step (2b), the system equation of the four-dimensional conservative chaotic system is: ,in are all real number parameters, are all state variables.
4. The image encryption method based on a four-dimensional conservative chaotic system according to claim 1 is characterized in that: In the step (3a), the recombination method of the two chaotic sequences X and Y is: , The method to generate the cell-matrix matrix is: .
5. The image encryption method based on a four-dimensional conservative chaotic system according to claim 1, characterized in that: In the step (4a), the chaotic sequences X and Y are applied to the image scrambling, specifically: Sort the matrix SM by columns to obtain the index matrix O; sort it by rows to obtain the index matrix V; Scramble the plaintext image as follows: , where C is the scrambled result and P is the plaintext image.
6. The image encryption method based on a four-dimensional conservative chaotic system according to claim 1, characterized in that: In step (5a), the chaotic sequences Z and W are applied to image diffusion, specifically: Arrange the chaotic sequence W in ascending order to obtain an index matrix, use the index matrix to rearrange the scrambled result, and then perform XOR with the chaotic sequence Z; , where C is the image to be diffused, and E is the diffusion result, which is also the ciphertext image.
Citation Information
Cited By
Image encryption algorithm based on enhanced chaotic system
CN121486507A
