Image encryption system based on chaos algorithm and SM4 algorithm
By combining chaotic algorithms and SM4 algorithms in the image encryption system, the image is chaotic and encrypted, which solves the problem that the existing technology is difficult to take into account both high efficiency and high security, and achieves an efficient and secure image encryption effect.
Patent Information
- Application Number
- CN202411821160.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-25
AI Technical Summary
Existing image encryption technology is difficult to take into account both high efficiency and high security, and it is unscrupulous when facing complex attack methods.
The image encryption system based on chaos algorithm and SM4 algorithm is adopted. By chaotic processing of images, the randomness and security of image encryption are significantly improved.
It significantly improves the randomness and security of image encryption, enhances resistance to statistical analysis and differential attacks, while showing high efficiency when processing large-capacity and high-resolution images.
Smart Images

Figure CN119696756A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of image processing and information security, and in particular to an image encryption system based on a chaos algorithm and an SM4 algorithm, which is used for improving the security of image transmission and storage. Background Art
[0002] With the rapid development of computer networks and multimedia technology, the dissemination of digital information has become more and more convenient, but it also brings major challenges to information security. Especially in the transmission and storage of image data, how to effectively protect the image content has become an urgent problem to be solved. The wide application of image data in medical, military, commercial and other fields makes its security particularly important. Existing image encryption technologies are mainly divided into two categories: encryption technology based on position scrambling and encryption technology based on grayscale transformation. Position scrambling technology hides image information by changing the position of image pixels, while grayscale transformation technology achieves encryption by adjusting the grayscale value of image pixels. Although these technologies have improved the security of images to a certain extent, they usually find it difficult to balance efficiency and high security at the same time, and they often seem powerless when dealing with complex attack methods.
[0003] Existing image encryption algorithms such as DES, chaotic encryption system, AES and commercial encryption algorithm SMS4 have their own advantages and disadvantages. DES (Data Encryption Standard) and its improved versions such as 3DES are vulnerable to brute force cracking due to the key length limitation during the encryption process, and the computational complexity is relatively high. Chaotic encryption systems use the unpredictability of chaotic sequences to encrypt images, such as encryption methods based on oblique tent diagrams and fractional Fourier transforms. Although they have high security, they have high computational complexity and are prone to distortion during image reconstruction. AES (Advanced Encryption Standard) is a widely used symmetric encryption algorithm with high encryption strength and efficiency, but it may face certain specific types of attacks when used alone, such as differential attacks. Summary of the invention
[0004] The purpose of the present invention is to provide an image encryption system based on a chaos algorithm and an SM4 algorithm, which is used to improve the security of image transmission and storage. The system performs chaos processing on the image and then uses the SM4 algorithm to encrypt it, thereby significantly improving the randomness and security of image encryption.
[0005] To achieve the above object, the technical solution adopted by the present invention is: an image encryption system based on chaos algorithm and SM4 algorithm, comprising the following steps:
[0006] Image preprocessing: First, decompose the original plaintext image into three components: RGB. Read the original image as a three-dimensional array, and extract each color component separately for processing;
[0007] Chaos processing: For each RGB component, use Logistic Map to convert the normal image into a scrambled image. The specific steps are as follows:
[0008] Logistic Map is applied to generate random streams; the generated streams are used to evenly distribute and diffuse the image pixel positions to generate a scrambled image;
[0009] Image encryption: Encrypt the scrambled image using the SM4 algorithm;
[0010] Image decryption: At the receiving end, the reverse operation is performed, using the SM4 algorithm to decrypt and reconstruct the scrambled image;
[0011] Inverse transformation of chaotic processing: After obtaining the scrambled image, inverse diffusion and inverse confusion operations are performed to restore the original image.
[0012] Further chaos processing is as follows:
[0013] The obfuscation algorithm is used to shuffle the positions of image pixels, thereby reducing the correlation between adjacent pixels. The steps of image obfuscation are as follows:
[0014] 2D to 1D: Convert a 2D image I[n, m] to a 1D array I[n×m].
[0015] Calculate the initial chaotic value: set the Logistic Map parameters α and x0, calculate the first chaotic value α×x0×(1-x0) and save the position.
[0016] Generate a chaotic sequence: calculate all chaotic values α×x[i-1]×(1-x[i-1]) from 1 to n×m, and save the value and position of each element.
[0017] Sorting: Sort the chaotic values generated in the previous step in ascending order and return the position array position[n×m].
[0018] Pixel replacement: Replace the pixels in the original image I[n, m] according to the position array position[n×m] to generate the replaced image C[n×m].
[0019] One-dimensional to two-dimensional: Convert the permuted image C[n×m] back to a two-dimensional array C[n, m].
[0020] The diffusion algorithm is used to change the arranged pixel values so that the histogram of the encrypted image becomes uniform. The steps of the diffusion process are as follows:
[0021] Convert 2D to 1D: Convert the obfuscated image C[n, m] to a one-dimensional array C[n×m].
[0022] Calculate the initial diffusion key: Calculate the diffusion value D[0] of the first pixel:
[0023]
[0024] c0 is a constant used to initialize the diffusion process. r is the initial diffusion key used to mask and change the value of the first pixel.
[0025] Calculate the diffusion key r:
[0026] r=(x[T-1]×2 15 )mod 256
[0027]
[0028] Wherein, the initial value x[0] = (c0 + a) / (255 + a + b) and α = (C[0] + a) / (n × m + a + b). T is the number of iterations of the chaotic sequence, which is used to generate the chaotic value. b is the diffusion adjustment parameter.
[0029] Dynamically calculate the diffusion key: Calculate the diffusion value D[i] pixel by pixel:
[0030]
[0031] The diffusion key r is dynamically calculated based on a chaotic sequence, which uses the parameter set x[0]=(D[i-1]+a) / (255+a+b) and α=(C[i]+a) / (n×m+a+b).
[0032] Generate diffusion image: Return the encrypted image D[n×m] and convert it back to a two-dimensional array D[n,m].
[0033] Furthermore, the SM4 encryption algorithm is used to encrypt the scrambled image data. The algorithm uses a 32-round nonlinear iterative structure and generates round keys through the master key for encryption. The detailed steps of the encryption process are as follows:
[0034] Initialize the key:
[0035] Use the master key (MK) to perform key expansion and generate 32 round keys (RK). The key expansion process is as follows:
[0036] Initial key MK = (MK0, MK1, MK2, MK3)
[0037] Generate initial values using system parameters FK and constant parameters CK:
[0038]
[0039] Generate 32 round keys RK through the following transformations i :
[0040]
[0041] The composite transformation T includes a nonlinear transformation τ and a linear transformation L.
[0042] Data input:
[0043] Take the image data to be encrypted as input, represented as four 32-bit blocks (X0, X1, X2, X3)
[0044] Iterative encryption:
[0045] Perform 32 rounds of iterative encryption, using a round key (RK0, RK1, ..., RK 31 ).
[0046] The operation of the round function F is defined as follows:
[0047] X i+4 =F(X i , X i+1 , X i+2 , X i+3 , R.K. i )
[0048] The round function F consists of the following nonlinear transformations and linear transformations:
[0049]
[0050] The composite transformation T includes a nonlinear transformation τ and a linear transformation L:
[0051] T(B)=L(τ(B))
[0052] Among them, the nonlinear transformation τ is replaced by a fixed S-box, and the linear transformation L performs the following operations:
[0053]
[0054] Data output:
[0055] After completing 32 rounds of iterative encryption, the ciphertext data (Y0, Y1, Y2, Y3) is output. These four 32-bit blocks represent the encrypted image data.
[0056] Data processing: Convert the encrypted image data into the format required for transmission.
[0057] Furthermore, the steps of the decryption process are as follows:
[0058] Initialize the key:
[0059] The same master key (MK) as used in the encryption process is used for key expansion to generate 32 round keys (RK). In the decryption process, the order of using the round keys is opposite to that of encryption.
[0060] Data input:
[0061] The encrypted image data (ciphertext) is taken as input, represented as four 32-bit blocks (Y0, Y1, Y2, Y3).
[0062] Iterative decryption:
[0063] Perform 32 rounds of iterative decryption, using a round key in each round, applying the round keys (RK 31 , R.K. 30 , ..., RK0)
[0064] The inverse operation of the round function F is defined as follows:
[0065] X i+4 =F -1 (X i , X i+1 , X i+2 , X i+3 , R.K. 31-i )
[0066] The round function F consists of the following nonlinear transformations and linear transformations:
[0067]
[0068] The composite transformation T includes a nonlinear transformation τ and a linear transformation L:
[0069] T(B)=L(τ(B))
[0070] Among them, the nonlinear transformation τ is replaced by a fixed S-box, and the linear transformation L performs the following operations:
[0071]
[0072] Data output:
[0073] After completing 32 rounds of iterative decryption, the plaintext data (X0, X1, X2, X3) is output. These four 32-bit blocks represent the data of the scrambled image.
[0074] Data restoration:
[0075] The decrypted scrambled image data is converted into the original image data format, and subsequent inverse chaos processing is performed to finally restore the original image.
[0076] Furthermore, the inverse transformation of the chaotic processing is performed by performing inverse diffusion and inverse confusion operations to restore the original image.
[0077] Inverse diffusion is used to restore the original values of image pixels. The specific steps are as follows:
[0078] Initialize diffusion parameters:
[0079] Use the same initial diffusion key r and constant c0 as in the diffusion stage.
[0080] Calculate the initial inverse diffusion key:
[0081] Calculate the inverse diffusion value C[0] of the first pixel:
[0082]
[0083] Calculate the inverse diffusion key r:
[0084] r=(x[T-1]×2 15 )mod 256
[0085]
[0086] Where T is the number of iterations or threshold used to generate chaotic sequences in the diffusion algorithm. The initial value x[0] = (c0 + a) / (255 + a + b) and α = (D[0] + a) / (n ×
[0087] m+a+b).
[0088] Dynamically calculate the inverse diffusion key: Calculate the inverse diffusion value C[i] pixel by pixel:
[0089]
[0090] The inverse diffusion key r is dynamically calculated based on a chaotic sequence, which uses a parameter set x[0]=(D[i-1]+a) / (255+a+b) and α=(C[i]+a) / (n×m+a+b).
[0091] Generate the restored image:
[0092] Returns the inverse diffused image C[n×m] and converts it back to a two-dimensional array C[n,m].
[0093] De-aliasing is used to restore the original positions of image pixels. The specific steps are as follows:
[0094] Initialization parameters:
[0095] Use the same Logistic mapping parameters a and initial value x0 as in the obfuscation stage.
[0096] Convert the two-dimensional image C[n,m] to a one-dimensional array C[n×m].
[0097] Generate the reverse sequence:
[0098] Calculate the initial chaotic value a×x0×(1-x0) and save the position.
[0099] Generate all chaotic values α×x[i-1]×(1-x[i-1]) from 1 to n×m and save the value and position of each element.
[0100] Sort the generated chaotic values to get the reverse sequence position array.
[0101] Pixel position restoration:
[0102] According to the reverse sequence position array, the pixels of the one-dimensional array C[n×m] are rearranged,
[0103] Restore the pixel position I[n×m] of the original image.
[0104] Convert one dimension to two dimensions:
[0105] Convert the restored image I[n×m] back to a two-dimensional array I[n,m].
[0106] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:
[0107] 1. The present invention utilizes the SM4 algorithm in the encryption process. The algorithm has a 32-round nonlinear iterative structure and a 128-bit key, which can provide strong security and efficient encryption performance. Compared with the traditional AES algorithm, SM4 exhibits higher efficiency and lower resource consumption when processing large-capacity and high-resolution images, and is suitable for application scenarios with high real-time requirements. 2. The Logistic mapping function is introduced in the chaotic processing stage to achieve the obfuscation of the image pixel position and the diffusion processing of the pixel value, effectively reducing the high correlation between adjacent pixels of the image. The high randomness and unpredictability of the chaotic algorithm significantly improve the security of the encrypted image and enhance the resistance to statistical analysis and differential attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] Figure 1 It is the overall flow chart of the system of the present invention;
[0109] Figure 2 This is the image encryption flow chart of the present invention. DETAILED DESCRIPTION
[0110] The present invention relates to an image encryption system based on a chaos algorithm and an SM4 algorithm, which is used to improve the security of image transmission and storage. The system includes five main steps: image preprocessing, chaos processing, image encryption, image decryption, and inverse transformation of chaos processing.
[0111] An image encryption system based on a chaos algorithm and an SM4 algorithm in an embodiment of the present application includes the following steps:
[0112] 1. Image preprocessing
[0113] Decompose the original plaintext image into three components, RGB. Read the original image as a three-dimensional array, and extract each color component separately for processing. The specific steps are as follows:
[0114] (1) Read the original image and obtain its three-dimensional array representation.
[0115] (2) Decompose the image into three separate two-dimensional arrays of R, G, and B.
[0116] 2. Chaos processing
[0117] For each RGB component, use Logistic Map to convert the normal image into a scrambled image. The specific steps are as follows:
[0118] (1) Apply Logistic Map to generate random stream.
[0119] (2) Use the generated random stream to evenly spread and diffuse the image pixel positions to generate a scrambled image.
[0120] 2.1 Obfuscation Algorithm
[0121] Convert a two-dimensional image I[n,m] to a one-dimensional array I[n×m].
[0122] Set the Logistic Map parameters α and x0, calculate the first chaotic value α×x0×(1-x0) and save the position.
[0123] Calculate all chaotic values α×x[i-1]×(1-x[i-1]) from 1 to n×m, and save the value and position of each element.
[0124] Sort the generated chaotic values in ascending order and return the position array position[n×m].
[0125] The pixels in the original image I[n, m] are permuted according to the position array to generate a permuted image C[n×m].
[0126] Convert the permuted image C[n×m] back to a two-dimensional array C[n,m].
[0127] 2.2 Diffusion Algorithm
[0128] Convert the obfuscated image C[n,m] into a one-dimensional array C[n×m].
[0129] Calculate the initial diffusion key r and constant c0.
[0130] Calculate the diffusion value D[0] of the first pixel:
[0131]
[0132] Dynamically calculate the diffusion key r, the formula is as follows:
[0133] r=(x[T-1]×2 15 )mod 256
[0134]
[0135] The diffusion value D[i] is calculated pixel by pixel, and the formula is as follows:
[0136]
[0137] Returns the encrypted image D[n×m] and converts it back to a two-dimensional array D[n,m].
[0138] 3. Image encryption
[0139] The scrambled image is encrypted using the SM4 algorithm. The specific steps are as follows:
[0140] 3.1 Initialize the key: Use the master key (MK) to expand the key and generate 32 round keys (RK).
[0141] The initial key MK = (MK0, MK1, MK2, MK3).
[0142] Generate initial values using system parameters FK and constant parameters CK:
[0143]
[0144] Generate 32 round keys RK through the following transformations i
[0145]
[0146] The composite transformation T includes a nonlinear transformation τ and a linear transformation L:
[0147] T(B)=L(τ(B))
[0148] 3.2 Data input: The image data to be encrypted is represented as four 32-bit blocks (X0, X1, X2, X3).
[0149] 3.3 Iterative encryption: Perform 32 rounds of iterative encryption, using a round key (RK0, RK1, ..., RK 31 ).
[0150] The operation of the round function F is defined as follows:
[0151] X i+4 =F(X i , X i+1 , X i+2 , X i+3 , R.K. i )
[0152] The round function F consists of the following nonlinear transformations and linear transformations:
[0153]
[0154] Among them, the nonlinear transformation τ is replaced by a fixed S-box, and the linear transformation L performs the following operations:
[0155]
[0156] 3.4 Data output: After completing 32 rounds of iterative encryption, the ciphertext data (Y0, Y1, Y2, Y3) is output. These four 32-bit blocks represent the encrypted image data.
[0157] 4. Image Decryption
[0158] At the receiving end, the SM4 algorithm is used to decrypt and reconstruct the scrambled image. The specific steps are as follows:
[0159] 4.1 Initialize the key: Use the same master key (MK) as in the encryption process to expand the key and generate 32 round keys (RK). In the decryption process, the order of using the round keys is opposite to that of encryption.
[0160] Initial key MK = (MK0, MK1, MK2, MK3)
[0161] Generate initial values using system parameters FK and constant parameters CK:
[0162]
[0163] Generate 32 round keys RK through the following transformations i :
[0164]
[0165] 4.2 Data input: The encrypted image data is represented as four 32-bit blocks (Y0, Y1, Y2, Y3).
[0166] 4.3 Iterative decryption: Perform 32 rounds of iterative decryption, using a round key in each round, and apply the round keys (RK 31 , R.K. 30 , ..., RK0).
[0167] The inverse operation of the round function F is defined as follows:
[0168] X i+4 =F -1 (X i , X i+1 , X i+2 , X i+3 , R.K. 31-i )
[0169] The round function F consists of the following nonlinear transformations and linear transformations:
[0170]
[0171] The composite transformation T includes a nonlinear transformation τ and a linear transformation L:
[0172] T(B)=L(τ(B))
[0173] Among them, the nonlinear transformation τ is replaced by a fixed S-box, and the linear transformation L performs the following operations:
[0174]
[0175] 4.4 Data output: After completing 32 rounds of iterative decryption, the plaintext data (X0, X1, X2, X3) is output. These four 32-bit blocks represent the data of the scrambled image.
[0176] 5. Inverse transformation of chaos processing
[0177] After obtaining the scrambled image, inverse diffusion and inverse obfuscation operations are performed to restore the original image.
[0178] 5.1 Reverse diffusion
[0179] Initialize diffusion parameters: Use the same initial diffusion key r and constant c0 as in the diffusion stage.
[0180] Calculate the initial inverse diffusion key: Calculate the inverse diffusion value C[0] of the first pixel:
[0181]
[0182] Calculate the inverse diffusion key r:
[0183] r=(x[T-1]×2 15 )mod 256
[0184]
[0185] Where T is the number of iterations or threshold used to generate chaotic sequences in the diffusion algorithm. Initial values x[0] = (c0 + a) / (255 + a + b) and α = (D[0] + a) / (n × m + a + b).
[0186] Dynamically calculate the inverse diffusion key: Calculate the inverse diffusion value C[i] pixel by pixel:
[0187]
[0188] The inverse diffusion key r is dynamically calculated based on a chaotic sequence, which uses a parameter set x[0]=(D[i-1]+a) / (255+a+b) and α=(C[i]+a) / (n×m+a+b).
[0189] Generate a restored image: Return the inverse diffused image C[n×m] and convert it back to a two-dimensional array C[n,m].
[0190] 5.2 Deobfuscation
[0191] Initialization parameters: Use the same LogiStic mapping parameter α and initial value x0 as the obfuscation stage.
[0192] Convert the two-dimensional image C[n,m] to a one-dimensional array C[n×m].
[0193] Generate inverse sequence: calculate the initial chaotic value a×x0×(1-x0) and save the position.
[0194] Generate all chaotic values α×x[i-1]×(1-x[i-1]) from 1 to n×m and save the value and position of each element.
[0195] Sort the generated chaotic values to get the reverse sequence position array.
[0196] Pixel position restoration: According to the reverse sequence position array, the pixels of the one-dimensional array C[n×m] are rearranged to restore the pixel position I[n×m] of the original image.
[0197] One-dimensional to two-dimensional: Convert the restored image I[n×m] back to a two-dimensional array I[n, m].
Claims
1. An image encryption system based on chaos algorithm and SM4 algorithm, characterized in that: The system comprises: an image preprocessing step, in which an original plaintext image is decomposed into three components of RGB, read as a three-dimensional array, and each color component is extracted separately for processing; a chaotic processing step, in which a common image is converted into a scrambled image using a Logistic Map for each RGB component; an image encryption step, in which the scrambled image is encrypted using an SM4 algorithm; an image decryption step, in which the SM4 algorithm is used to decrypt the image at the receiving end to reconstruct the scrambled image; and an inverse transformation step of chaotic processing, in which an inverse diffusion and inverse confusion operation is performed on the decrypted image to restore the original image.
2. The image encryption system according to claim 1, characterized in that: The image preprocessing step includes: reading the original image as a three-dimensional array; decomposing the image into three separate two-dimensional arrays of R, G, and B.
3. The image encryption system according to claim 1, characterized in that: The chaos processing step comprises the following steps: Convert the two-dimensional image I[n,m] to a one-dimensional array I[n×m]; Set the Logistic Map parameters α and x0, calculate the first chaotic value α×x0×(1-x0) and save the position; Calculate all chaotic values α×x[i-1]×(1-x[i-1]) from 1 to n×m, and save the value and position of each element; Sort the generated chaotic values in ascending order and return the position array position[n×m]; Permute the pixels in the original image I[n,m] according to the position array to generate a permuted image C[n×m]; Convert the permuted image C[n×m] back to a two-dimensional array C[n,m].
4. The image encryption system according to claim 3, characterized in that: The diffusion algorithm comprises the following steps: Convert the obfuscated image C[n,m] into a one-dimensional array C[n×m]; Calculate the initial diffusion key r and constant c0; Calculate the diffusion value D[0] of the first pixel: Where D[0] represents the diffusion value of the first pixel, r represents the diffusion key, C[0] represents the first pixel value, c0 and a are constants; Dynamically calculate the diffusion key r, the formula is as follows: r = (x[T-1] × 215) mod 256. Among them, r represents the diffusion key, x[T-1] represents the last value of the chaotic sequence, and T represents the number of iterations of the chaotic sequence; The diffusion value D[i] is calculated pixel by pixel, and the formula is as follows: in, D[i] represents the diffusion value of the i-th pixel, r represents the diffusion key, C[i] represents the i-th pixel value, D[i-1] represents the diffusion value of the i-1-th pixel, and a is a constant; Returns the encrypted image D[n×m] and converts it back to a two-dimensional array D[n,m].
5. The image encryption system according to claim 1, characterized in that: The image encryption step includes the following process: Initialize the key: use the master key (Master Key, MK) to perform key expansion and generate 32 round keys (RoundKeys, RK), including the following steps: Initial key MK=(MK0,MK1,MK2,MK3) Generate initial values using system parameters FK and constant parameters CK: Among them, K i Indicates the initial value, MK i Indicates the master key, FK i Indicates system parameters; Generate 32 round keys RK through the following transformations i : Among them, RK i represents the i-th round key, K i-4 ,K i-3 ,K i-2 ,K i-1 Respectively represent the first four initial values, CK i represents a constant parameter, and T represents a composite transformation; Data input: The image data to be encrypted is represented as four 32-bit blocks (X0, X1, X2, X3); Iterative encryption: 32 rounds of iterative encryption are performed, each round using a round key (RK0, RK1, …, RK 31 ), the specific steps are as follows: The operation of the round function F is defined as follows: X i+4 =F(X i ,X i+1 ,X i+2 ,X i+3 ,RK i ). Among them, X i+4 represents the i+4th block, F represents the round function, X i ,X i+1 ,X i+2 ,X i+3 Represent the first four blocks respectively; The round function F consists of the following nonlinear transformations and linear transformations: Where T represents a composite transformation, and RK represents a round key; The nonlinear transformation τ uses a fixed S-box for replacement, and the linear transformation L performs the following operations: Among them, B represents input data, and < represents left shift operation; data output: after completing 32 rounds of iterative encryption, the ciphertext data (Y0, Y1, Y2, Y3) is output.
6. The image encryption system according to claim 1, characterized in that: The image decryption step includes the following processes: initializing the key: using the same master key (MK) as in the encryption process to expand the key and generate 32 round keys (RK). In the decryption process, the order of using the round keys is opposite to that of encryption; Initial key MK=(MK0,MK1,MK2,MK3) Generate initial values using system parameters FK and constant parameters CK: Among them, K i Indicates the initial value, MK i Indicates the master key, FK i Indicates system parameters; Generate 32 round keys RK through the following transformations i : Among them, RK i represents the i-th round key, K i-4 ,K i-3 ,K i-2 ,K i-1 Respectively represent the first four initial values, CK i represents a constant parameter, and T represents a composite transformation; Data input: The encrypted image data is represented as four 32-bit blocks (Y0, Y1, Y2, Y3); Iterative decryption: Perform 32 rounds of iterative decryption, using a round key in each round, applying the round keys (RK0, RK1, …, RK 31 ), the specific steps are as follows: The inverse operation of the round function F is defined as follows: X i+4 =F -1 (X i ,X i+1 ,X i+2 ,X i+3 ,RK 31-i ). Among them, X i+4 represents the i+4th block, F -1 Represents the inverse operation of the round function, RK 31-i represents the 31-ith round key, X i ,X i+1 ,X i+2 ,X i+3 Represent the first four blocks respectively; The round function F consists of the following nonlinear transformations and linear transformations: Where T represents a composite transformation, and RK represents a round key; The nonlinear transformation τ uses a fixed S-box for replacement, and the linear transformation L performs the following operations: Among them, B represents input data, and < represents left shift operation; Data output: After completing 32 rounds of iterative decryption, the plaintext data (X0, X1, X2, X3) is output.
7. The image encryption system according to claim 1, characterized in that: The inverse transformation of the chaotic process includes an inverse diffusion step and an inverse confusion step.
8. The image encryption system according to claim 7, characterized in that: The reverse diffusion step comprises: Initialize diffusion parameters: use the same initial diffusion key r and constant c0 as in the diffusion stage; Calculate the initial inverse diffusion key: Calculate the inverse diffusion value C[0] of the first pixel: Wherein, C[0] represents the inverse diffusion value of the first pixel, r represents the inverse diffusion key, D[0] represents the first pixel value, c0 and a are constants; Calculate the reverse diffusion key r: r = (x[T-1] × 2 15 ) mod 256. Where r represents the inverse diffusion key, x[T-1] represents the last value of the chaotic sequence, and T represents the number of iterations of the chaotic sequence; Dynamically calculate the inverse diffusion key: Calculate the inverse diffusion value C[i] pixel by pixel: Wherein, C[i] represents the inverse diffusion value of the i-th pixel, r represents the inverse diffusion key, D[i] represents the i-th pixel value, D[i-1] represents the inverse diffusion value of the i-1-th pixel, and a is a constant; Returns the inverse diffused image C[n×m] and converts it back to a two-dimensional array C[n,m].
9. The image encryption system according to claim 7, characterized in that: The deobfuscation step comprises: Initialization parameters: Use the same Logistic mapping parameter α and initial value x0 as in the confusion stage; Convert the two-dimensional image C[n,m] to a one-dimensional array C[n×m]; Generate inverse sequence: calculate the initial chaotic value a×x0×(1-x0) and save the position; Generate all chaotic values α×x[i-1]×(1-x[i-1]) from 1 to n×m and save the value and position of each element; Sort the generated chaotic values to obtain the reverse sequence position array; Pixel position restoration: According to the reverse sequence position array, the pixels of the one-dimensional array C[n×m] are rearranged to restore the pixel position I[n×m] of the original image; Convert the restored image I[n×m] back to a two-dimensional array I[n,m].