Non-adjacent coupled chaotic image encryption method, decryption method and system based on two-stage optimization
The two-stage optimized non-adjacent coupled chaotic image encryption method solves the problems of insufficient scientific parameter setting and inadequate anti-attack capability in the existing technology, improves the complexity and parameter sensitivity of the chaotic system, and achieves high-security image encryption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
- Filing Date
- 2026-06-25
- Publication Date
- 2026-07-24
AI Technical Summary
Existing image encryption schemes based on three-dimensional non-adjacent coupled chaotic systems suffer from problems such as the lack of scientific rigor in setting system parameters based on human experience, insufficient complexity of chaotic sequences, insufficient parameter sensitivity, and insufficient resistance to attacks, making it difficult to meet high security requirements.
A two-stage optimized non-adjacent coupled chaotic image encryption method is adopted. Through a global heuristic optimization algorithm and a local adaptive fine-tuning strategy, the baseline fixed parameters and grid-level heterogeneous parameters of the chaotic system are optimized. Combined with a state-driven dynamic non-adjacent grid selection mechanism and a multi-level scrambling diffusion mechanism, a key with high complexity and attack resistance is generated.
It significantly improves the Lyapunov exponent and KS entropy of chaotic systems, enhances parameter sensitivity and key space, effectively resists differential attacks and statistical analysis, and achieves high-security image encryption.
Smart Images

Figure CN122457724A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information security and image protection technology, specifically to a non-adjacent coupled chaotic image encryption method, decryption method, and system based on two-stage optimization. Background Technology
[0002] In the digital information age, images, as core information carriers, are widely used in sensitive fields such as medicine, remote sensing, finance, and personal privacy protection, making the security of their transmission and storage a major concern. Chaotic systems, due to their inherent cryptographic properties such as strong pseudo-randomness, high sensitivity to initial conditions and parameters, and non-convergence, have become a core research direction in image encryption technology. Among them, chaotic systems based on the fusion of three-dimensional non-adjacent coupled mappings and 3D Arnold mappings exhibit superior spatiotemporal chaotic characteristics compared to low-dimensional chaotic systems and traditional coupled mapping lattices, demonstrating significant advantages in image encryption.
[0003] However, existing image encryption schemes based on this type of high-dimensional coupled chaotic system still have the following technical drawbacks:
[0004] First, the system parameters rely heavily on manual experience and lack scientific theoretical guidance. This makes it impossible to perform global optimization with the high Lyapunov exponent, high KS entropy, and high parameter sensitivity required by cryptography as the goals. As a result, the system has potential periodic windows, and the complexity of the chaotic sequence still needs to be improved. Second, all grid points in the system use homogeneous fixed parameters, which makes it impossible to achieve grid-level parameter differentiation. The spatial correlation of chaotic sequences is difficult to break completely, which poses a security risk when facing high-order statistical analysis attacks. Third, the system is not sensitive enough to parameter changes, the actual effective key space is limited, and it is difficult to resist advanced decryption methods such as differential attacks and chosen-plaintext attacks. In addition, existing parameter optimization methods have obvious limitations. Single-stage optimization cannot simultaneously take into account global parameter optimization and grid-level fine-tuning, and is prone to getting trapped in local optima, thus failing to fully explore the security potential of chaotic systems.
[0005] To address the aforementioned shortcomings, there is an urgent need for a technical solution that can achieve global optimization and grid-level heterogeneity of chaotic system parameters through a multi-objective evolutionary algorithm, thereby fundamentally improving the cryptographic properties of chaotic systems. Summary of the Invention
[0006] To address the problems existing in the background technology, this invention proposes a non-adjacent coupled chaotic image encryption method, decryption method, and system based on two-stage optimization. It solves the technical problems of existing high-dimensional coupled chaotic systems, such as the lack of scientific rigor in manually setting parameters, suboptimal chaotic characteristics, homogenization of grid parameters, and insufficient resistance to attacks. It significantly improves the chaotic complexity and resistance to attacks of the system. At the same time, the key space meets the cryptographic security threshold and can effectively resist various cryptographic attacks such as differential attacks and statistical analysis. It can be applied to image data protection in high-security scenarios.
[0007] To achieve the above objectives, the present invention adopts the following solution: The non-adjacent coupled chaotic image encryption method based on two-stage optimization includes the following steps: Step 1: Based on the three-dimensional non-adjacent coupled sinusoidal-logic mapping chaotic system, perform two-stage evolutionary parameter optimization to obtain the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix; The two-stage evolutionary parameter optimization method includes: First, a global heuristic optimization algorithm is used to optimize the global baseline parameters by maximizing the maximum Lyapunov exponent, Kolmogorov-Sinai entropy, and parameter sensitivity of the weighted combination, outputting the optimal baseline fixed parameters; Second, a local adaptive fine-tuning strategy is used, taking the optimal baseline fixed parameters output in the first stage as the baseline, to independently fine-tune the heterogeneous parameters of each grid point, outputting a grid-level heterogeneous parameter matrix. Step 2: Extract feature values from the plaintext image to be encrypted, generate an initial encryption key, and load the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix to complete the parameter initialization of the encryption system. Step 3: Based on the optimal baseline fixed parameters and heterogeneous parameter matrix, a state-driven dynamic non-adjacent grid point selection mechanism is constructed to iteratively generate multiple sets of chaotic sequences matching the plaintext image size for use in the image scrambling and diffusion process. Step 4: Generate a scrambling index based on the chaotic sequence. First, perform a first round of scrambling on the plaintext image by alternating rows and columns, and then perform a second round of scrambling on the overlapping areas of rows and columns to complete the two-level confusion of pixel positions. Step 5: Construct a diffusion index and preprocessing diffusion sequence based on the chaotic sequence. Use cyclic XOR and modulo operations with pre-ciphertext feedback to diffuse the pixel values of the scrambled image matrix obtained in Step 4 to generate the final encrypted ciphertext image.
[0008] Optionally, in step 1, the two-stage evolutionary parameter optimization includes: Step 1.1, the first stage is to perform global baseline fixed parameter optimization: Step 1.11: Define optimization variables including coupling coefficients and the first to fourth control parameters, and set the value range of each optimization variable; Step 1.12: The evolution objective is to maximize the average maximum Lyapunov exponent, average Kolmogorov-Sinai entropy, and average parameter sensitivity of the weighted combination. The weights of each item in the weighted combination are preset as the first weight coefficient, the second weight coefficient, and the third weight coefficient, respectively. Step 1.13: Using the differential evolution algorithm, set parameters including at least population size, maximum number of iterations, convergence tolerance, early stopping tolerance value, and mutation factor. Step 1.14: Iteratively optimize the objective function. After the iteration is completed, output the optimal coupling coefficient and each control parameter, and save them as a parameter configuration file. Step 1.2, the second stage performs lattice-level heterogeneous parameter matrix optimization: Step 1.21: Set multidimensional independent heterogeneous parameters for each grid point and construct a grid-level heterogeneous parameter matrix with a dimension of ten times the total number of grid points; Step 1.22: Adopting the covariance matrix adaptive evolution strategy, firstly, a global baseline search is performed using multidimensional globally shared parameters as optimization variables and the optimal baseline fixed parameters output in the first stage as initial values; then, the optimal parameters obtained from the global baseline search are copied as the initial parameters of each grid point, flattened into a multidimensional vector, and the heterogeneous parameters of each grid point are independently fine-tuned, finally outputting a grid-level heterogeneous parameter matrix.
[0009] Optionally, step 2 includes: Step 2.1: Convert the plaintext image to be encrypted into a double-precision plaintext image matrix, and input the double-precision plaintext image matrix into a general digital feature extraction algorithm to obtain a feature value sequence of a preset length; Step 2.2: Extract a portion of the feature value sequence and map it to a preset number of initial parameters to construct an initial key set; Step 2.3: Take the first two decimal values of the initial key set as the first control component and the second control component of the logical mapping to generate ten sets of basic chaotic sequences; Step 2.4: Calculate the average pixel value of the plaintext image, and combine and modulo the remaining values in the initial key set, the basic chaotic sequence, and the average pixel value to obtain the composite key sequence. Step 2.5: Use the segmented values of the composite key sequence as the initial grid state for the iteration of the high-dimensional non-adjacent coupled chaotic system, load the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix obtained in Step 1, and complete the initialization of encryption parameters.
[0010] Optionally, step 3 includes: Step 3.1: Retrieve the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix that have been initialized in Step 2, and obtain the system grid size L and the image size to be encrypted M×N; Step 3.2: Starting from the initial grid state, perform a preset number of pre-iterations to eliminate chaotic transient effects and obtain the grid state after pre-iteration. Step 3.3: Using the grid point state after pre-iteration as the initial value, iterate sequentially to generate a chaotic sequence matrix that matches the specifications of the image to be encrypted. During the iteration, three dynamic non-adjacent grid point indices are selected in each step. Each grid point index is obtained by multiplying the current target grid point number with the corresponding control parameter to obtain the basic offset, and then superimposing the product of the corresponding element in the grid-level heterogeneous parameter matrix and the state value of the previous iteration step as feedback. Finally, it is dynamically determined by rounding and modulo operations. Step 3.4, during the iteration process, the update mechanism for the state of each grid point is as follows: the state value of the target grid point in the current iteration step is composed of two components. The first part is the difference between the result of the target grid point state value in the previous iteration step after sinusoidal-logic chaotic mapping and the decoupling coefficient. The second part is the sum of the results of the state values of the three selected dynamic non-adjacent grid points in the previous iteration step after sinusoidal-logic chaotic mapping and one-third of the coupling coefficient. The expression for the sinusoidal-logic chaotic mapping is: ; In the formula, These are preset mapping control parameters; The input state variables for the chaotic mapping; This represents the chaotic state for the next iteration. Step 3.5: After the iteration is completed, five independent chaotic subsequences are sequentially split from the chaotic sequence matrix, namely the first to the fifth chaotic subsequences; among them, the first and second chaotic subsequences are used for the scrambling stage, and the third, fourth and fifth chaotic subsequences are used for the diffusion stage.
[0011] Optionally, step 4 includes: Step 4.1: Sort the chaotic sequence used for scrambling in ascending order to obtain the row scrambling index and column scrambling index; Step 4.2: Starting from the first row of the image, extract the pixel data of the current row and the next row one by one, rearrange the pixel positions according to the row scrambling index, and then fill them back into the original image to complete the first round of row scrambling. Step 4.3: On the image after row scrambling, starting from the starting column, extract the pixel data of the current column and the next column one by one. After rearranging the pixel positions according to the column scrambling index, fill them back into the original image to complete the first round of column scrambling. Step 4.4: For the overlapping areas of rows and columns formed by row scrambling and column scrambling, perform secondary scrambling in the row and column directions again using the row scrambling index and column scrambling index to obtain the scrambled image matrix.
[0012] Optionally, step 5 includes: Step 5.1: Preprocess the fifth chaotic subsequence by multiplying each value in the sequence by 10 to the power of 5, rounding down, and then taking the modulus of 256 to map the value range to the interval of 0-255, thus obtaining the preprocessed diffusion sequence. Step 5.2: Sort the third and fourth chaotic subsequences in ascending order to generate two sets of diffusion index sequences with the same length as the total number of pixels. Step 5.3: Expand the scrambled image matrix into a one-dimensional pixel sequence in row-major order; take the first element of the third chaotic subsequence and multiply it by 100 as the initial diffusion value; for each scrambled pixel, add it to the corresponding value of the preprocessed diffusion sequence rearranged according to the first group of diffusion indices and take the modulo 256 to obtain the intermediate value of the pixel. Step 5.4: Perform a bitwise XOR operation on the middle value of the first pixel with the initial diffusion value and the first value of the preprocessed diffusion sequence rearranged according to the second group of diffusion indices to generate the first ciphertext pixel value. Step 5.5: Starting from the second pixel, perform a bitwise XOR operation on the median value of the current pixel with the previous ciphertext pixel value and the corresponding value of the preprocessed diffusion sequence rearranged according to the second group of diffusion indices to generate the current ciphertext pixel value, until all pixels are encrypted. Step 5.6: Reconstruct the encrypted one-dimensional ciphertext sequence into a two-dimensional matrix with the same size as the plaintext image, and output the final encrypted ciphertext image.
[0013] Optionally, the plaintext image is a grayscale image or a color image; when it is a color image, the three color channels R, G, and B are separated, the encryption method is applied to each channel respectively, and then the three encrypted channel matrices are merged into a color encrypted ciphertext image.
[0014] The non-adjacent coupled chaotic image decryption method based on two-stage optimization includes the following steps: Step A1: Using the same parameters and sequence generation rules as encryption, based on the initial grid state, optimal baseline fixed parameters and grid-level heterogeneous parameter matrix in the key, generate multiple sets of chaotic sequences that are exactly the same as those in the encryption process, and perform the same sorting and preprocessing on the chaotic sequences as encryption to obtain scrambling index, diffusion index and diffusion sequence that are exactly the same as those in encryption. Step A2: Perform the inverse operation of the dual-sequence chaotic interleaving and diffusion during the encryption process on the ciphertext image to eliminate the confusion of pixel values and recover the scrambled image matrix; Step A3: Perform the inverse operation of double scrambling with overlapping rows and columns during the encryption process on the recovered scrambled image matrix to eliminate pixel position confusion, recover the original plaintext image matrix, and output the decrypted plaintext image.
[0015] Optionally, step A2 includes: Step A2.1: Expand the ciphertext image into a one-dimensional ciphertext sequence in row-major order, with the sequence length equal to the total number of pixels in the image; Step A2.2, process in reverse order starting from the last pixel: For non-first pixels, perform a bitwise XOR operation on the current ciphertext pixel value with the previous ciphertext pixel value and the corresponding value of the preprocessed diffusion sequence rearranged according to the second set of diffusion indices to obtain the intermediate value of the current pixel; for the first pixel, perform a bitwise XOR operation on the first ciphertext pixel value with the initial diffusion value and the first value of the preprocessed diffusion sequence rearranged according to the second set of diffusion indices to obtain the intermediate value of the first pixel; Step A2.3: Subtract the corresponding value of the preprocessed diffusion sequence rearranged according to the first group of diffusion indices from the median value of each pixel, and then take the modulus of 256 to restore the scrambled one-dimensional pixel sequence. Step A2.4: Fold the restored one-dimensional scrambled pixel sequence back into a two-dimensional matrix with the same size as the ciphertext image to obtain the scrambled image matrix; Step A3 includes: Step A3.1: Based on the row scrambling index and column scrambling index used during encryption, generate the corresponding reverse row scrambling index and reverse column scrambling index; the generation rule for the reverse scrambling index is: if the value of the m-th bit in the original scrambling index is n, then the value of the n-th bit in the reverse scrambling index is m. Step A3.2: For overlapping row and column regions, first use the reverse column scrambling index to reverse scramble the columns, and then use the reverse row scrambling index to reverse scramble the rows. Step A3.3: Starting from the last column of the image, extract the pixel data of the current column and the previous column one by one from left to right. Restore the original position of the pixels by reversing the column scrambling index and backfill them until the column reversing of all columns is completed. Step A3.4: Starting from the last row of the image, extract the pixel data of the current row and the previous row one by one, restore the original position of the pixels by reversing the row scrambling index and backfill, until all rows are reversed and scrambled to obtain the original plaintext image matrix; output the image corresponding to the matrix to complete the decryption.
[0016] A two-stage optimization-based non-adjacent coupled chaotic image encryption and decryption system includes a two-stage evolutionary parameter optimization module, an image encryption module, and an image decryption module, wherein: The two-stage evolutionary parameter optimization module is used to perform two-stage parameter optimization on a three-dimensional non-adjacent coupled sinusoidal-logistic mapping chaotic system, and outputs the optimal baseline fixed parameters and a grid-level heterogeneous parameter matrix. The two-stage evolutionary parameter optimization module includes a global optimization unit and a local optimization unit. The global optimization unit adopts a global heuristic optimization algorithm with the goal of maximizing the weighted comprehensive index and outputs the optimal baseline fixed parameters. The local optimization unit adopts a local adaptive fine-tuning strategy, using the optimal baseline fixed parameters as a baseline, and independently fine-tunes the heterogeneous parameters of each grid point, outputting a grid-level heterogeneous parameter matrix. The image encryption module is used to receive plaintext images, execute image encryption methods based on the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix, and output encrypted images. The image decryption module is used to receive the ciphertext image, call the same parameters, chaotic sequence generation rules, scrambling index and diffusion index as the image encryption module, and execute the image decryption method of claim 8 or claim 9 in the reverse order of the encryption process to output the restored plaintext image.
[0017] The beneficial effects of this invention are as follows: First, this scheme significantly improves chaotic characteristics and effectively eliminates periodic windows. Through two-stage evolutionary parameter optimization, the maximum Lyapunov exponent of the chaotic system is significantly improved compared to the original fixed-parameter system, and the KS entropy value is effectively increased. Simultaneously, this scheme can effectively suppress the occurrence of periodic windows across the entire parameter range. The chaotic sequence after parameter optimization achieves breakthrough improvements in sequence complexity, ergodicity, and unpredictability.
[0018] Moreover, this scheme achieves a dual performance upgrade in terms of both parameter sensitivity and key space for chaotic systems. The optimized system exhibits high parameter sensitivity, where even small parameter perturbations can trigger drastic changes in the chaotic sequence, significantly enhancing the system's parameter perturbation response capability. Simultaneously, this scheme integrates a highly secure key generation mechanism to construct an ultra-large effective key space, with a key capacity far exceeding the general cryptographic security benchmark threshold. This effectively resists brute-force attacks under high computing power, comprehensively improving the system's cryptographic security performance.
[0019] Furthermore, this scheme possesses comprehensively enhanced anti-attack capabilities. The information entropy of the encrypted ciphertext image approaches the ideal theoretical value; the pixel change rate and average pixel change intensity both conform to the theoretical limit standard corresponding to an eight-bit image, exhibiting extreme resistance to differential attacks. Simultaneously, the correlation coefficient between adjacent pixels in the ciphertext is effectively suppressed to a low level, significantly resisting statistical analysis attacks.
[0020] Furthermore, this solution is equipped with a complete and standardized decryption process, allowing legitimate users with the key to restore the original image without loss, thus achieving a closed loop in the encryption and decryption process. The algorithm structure is modular, and the optimized heterogeneous parameter matrix can be directly reused as a static key, achieving encryption efficiency on par with existing solutions, thus balancing high security and engineering practicality.
[0021] Finally, the optimized chaotic system has stronger anti-interference capabilities, and the encryption algorithm is more robust to ciphertext cropping attacks and salt-and-pepper noise attacks, effectively adapting to various complex scenarios that may occur in image transmission over the network. Attached Figure Description
[0022] Figure 1 This is a flowchart of the image encryption method of the present invention; Figure 2 This is a flowchart of the image decryption method of the present invention; Figure 3 This is a detailed flowchart of the two-stage parameter optimization process in an embodiment of the present invention; Figure 4 This is a flowchart illustrating the operation of double reset scrambling for overlapping rows and columns in an embodiment of the present invention. Figure 5 This is a flowchart illustrating the operation of dual-sequence chaotic interleaving diffusion in an embodiment of the present invention. Detailed Implementation
[0023] To make the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the given embodiments are merely one implementation method and do not represent all embodiments.
[0024] Example 1 Combination Figure 1 The flowchart of the image encryption method shown in this invention provides a non-adjacent coupled chaotic image encryption method based on two-stage optimization. This method aims to address the technical problems of existing high-dimensional coupled chaotic systems, such as the lack of scientific rigor in manually setting parameters, suboptimal chaotic characteristics, homogenized grid parameters, and insufficient resistance to attacks. This embodiment uses cryptographic security requirements as multiple optimization objectives, automatically finding the globally optimal baseline parameters of the chaotic system and achieving grid-level heterogeneous parameter configuration, significantly improving the complexity, randomness, and parameter sensitivity of the chaotic sequence. Simultaneously, it combines a plaintext association mechanism with a double-reset scramble-interleaved diffusion architecture to construct a highly secure and robust image encryption scheme.
[0025] This embodiment uses a 512×512 pixel 8-bit grayscale image as an example to explain in detail the non-adjacent coupled chaotic image encryption method based on two-stage optimization. The specific steps are as follows: Step 1: Perform two-stage evolutionary parameter optimization to obtain the optimal parameters, combined with... Figure 3 The detailed execution flowchart of the two-stage parameter optimization shown includes the following steps: Step 1.1, the first stage uses the differential evolution algorithm to optimize the global baseline parameters: Step 1.11, define optimization variables and their value ranges: The optimization variables include the coupling coefficient of the high-dimensional non-adjacent coupled chaotic system, as well as the first control parameter, the second control parameter, the third control parameter and the fourth control parameter; wherein, the value range of the coupling coefficient is preferably [0.01, 0.99], and the value range of the first control parameter to the fourth control parameter is preferably [0.1, 3.0].
[0026] Step 1.12: Construct the objective function for multi-objective optimization: maximizing the average maximum Lyapunov exponent, average KS entropy, and average parameter sensitivity of the weighted combination as the evolutionary objective. The specific evaluation mechanism involves multiplying the currently calculated average maximum Lyapunov exponent, average KS entropy, and average parameter sensitivity by their corresponding first, second, and third weighting coefficients, respectively, and then summing these to obtain a comprehensive evaluation index. The global heuristic optimization algorithm evolves by searching for the maximum value of this comprehensive evaluation index. The benchmark for setting each weighting coefficient is to prioritize ensuring the spatiotemporal chaotic complexity and key sensitivity of the system. In this embodiment, the first, second, and third weighting coefficients are preferably set to 1.0, 0.5, and 50.0, respectively.
[0027] The average maximum Lyapunov exponent was calculated using numerical orthogonality and Schmitt orthogonalization, with 500 iteration steps and 200 transient steps. The KS entropy was defined as the sum of all positive Lyapunov exponents; this index is used to physically characterize the unpredictability and information generation rate of sequences generated by chaotic systems. A larger KS entropy indicates higher complexity and stronger resistance to statistical analysis in the generated cryptographic sequence. Parameter sensitivity was calculated by applying a 10^10 modulus to each parameter. -5 The magnitude perturbation is used to obtain the sensitivity results of the corresponding parameters by calculating the average absolute error of the chaotic sequence before and after the perturbation. The number of random trials for the perturbation test of each set of parameters is 5. This index is used to characterize the "avalanche effect" in cryptography, that is, even a very small change in the key (parameter) will cause a drastic change in the output ciphertext. The larger the value, the stronger the ability to resist differential attacks and related key attacks.
[0028] Step 1.13: Use the differential evolution algorithm to set hyperparameters: population size is set to 20, maximum number of iterations is set to 10000, and convergence tolerance is set to 10. -4The early stopping patience value is set to 30, and the initial state of the pseudo-random number generator is fixed as a constant. The value range of the mutation factor F is [0.5, 0.9], and the crossover probability CR is 0.9. The adaptive value ranges of each core parameter are set as follows: the population size range is [10, 50], the maximum number of iterations range is [1000, 20000], and the initial search standard deviation range is [0.1, 1.0]. These values can be adaptively adjusted according to the number of grid points and the optimization dimension of the chaotic system to adapt to the optimization needs under different working conditions.
[0029] Step 1.14: After the differential evolution algorithm has completed its iterative optimization, the optimal baseline fixed parameters are output and written into the global baseline parameter configuration file.
[0030] Step 1.2, the second stage, involves optimizing lattice-level heterogeneous parameters based on an adaptive evolutionary strategy using the covariance matrix: Step 1.21, Define optimization variables: Set multidimensional independent heterogeneous parameters for each grid point. In this embodiment, the total number of grid points is set to L=5, and 10-dimensional independent heterogeneous parameters are configured for each grid point. According to the rule of multiplying the total number of grid points by ten, a grid-level heterogeneous parameter matrix W with a dimension of 5×10 is constructed. Flatten this matrix to obtain a 50-dimensional one-dimensional vector; Step 1.22, Optimize hyperparameters based on the covariance matrix adaptive evolution strategy: This embodiment adopts the covariance matrix adaptive evolution strategy, which completes parameter optimization in two stages: global baseline search and grid-point independent local fine-tuning. The specific execution is as follows: First, using 10-dimensional globally shared parameters as the core optimization variables, the optimal baseline parameters output in the first stage are fixed as the initial values for optimization in this stage. The hyperparameters for this stage are set as follows: initial search standard deviation 0.5 (range [0.3, 0.8]); population size 20 (range [10, 30]); maximum number of iterations 30 (range [20, 50]) to complete the high-chaos global baseline search.
[0031] Then, the optimal global baseline parameters obtained from the global baseline search are copied in batches as 5×10-dimensional initial parameters, and then flattened into a 50-dimensional one-dimensional vector as the starting point for local optimization in this stage. Hyperparameters for local fine-tuning are set as follows: initial search standard deviation 0.1 (range [0.05, 0.2]), population size 40 (range [20, 60]), and maximum number of iterations 50 (range [30, 100]). The 10-dimensional heterogeneous parameters of each grid point are independently fine-tuned through iterative calculations. Finally, after the iteration is completed, the optimized 50-dimensional parameters are reconstructed into a 5×10-dimensional optimal heterogeneous parameter matrix W, and written into a grid-level heterogeneous parameter matrix file.
[0032] After two-stage evolutionary optimization, the maximum Lyapunov exponent of the chaotic system is increased by more than 40% compared to the traditional fixed-parameter system, and the KS entropy is significantly improved. The occurrence of periodic windows is effectively suppressed across the entire parameter range, resulting in a qualitative improvement in the complexity, ergodicity, and unpredictability of the chaotic sequence.
[0033] Step 2: Perform the plaintext association key generation operation and complete the system parameter initialization configuration.
[0034] Step 2 includes: Step 2.1: Read the 512×512 grayscale image to be encrypted and convert it into a double-precision plaintext image matrix. The matrix has a size of 512×512 and a pixel value range of 0 to 255. Input the double-precision plaintext image matrix into a general digital feature extraction algorithm to output a 128-bit hexadecimal hash string. Step 2.2: Take the first 120 bits of the hash string, split it into groups of 4 bits, convert it to binary, calculate 12 decimal values, and store them in the initial key set; Step 2.3: Take the first two values of the initial key set as the first and second control components of the logical mapping, and iteratively generate ten sets of basic chaotic sequences; Step 2.4: Calculate the average pixel value of the plaintext image, and combine and modulo the remaining ten values in the initial key set, the basic chaotic sequence, and the average pixel value to obtain the composite key sequence. Step 2.5: Load the optimal baseline fixed parameters obtained in the first stage and the grid-level heterogeneous parameter matrix W obtained in the second stage. In this embodiment, the first five values of the composite key sequence are used as the initial grid state of the three-dimensional non-adjacent coupled sinusoidal-logic mapping chaotic system to complete the parameter initialization.
[0035] Step 3: Generate a chaotic sequence of fused optimization parameters.
[0036] Step 3 includes: Step 3.1: Obtain the initialized optimal baseline fixed parameters, the grid-level heterogeneous parameter matrix W, and obtain the system grid size L=5 and the image size to be encrypted 512×512; Step 3.2: Starting from the five initial grid point states, perform 500 pre-iteration steps to eliminate chaotic transient effects.
[0037] Step 3.3, during the pre-iteration process, the non-adjacent grid point indices p, q, and r of each step are dynamically calculated in conjunction with the heterogeneous parameter matrix W: The basic offset is obtained by multiplying the current target grid point index by the corresponding control parameter, then superimposed with the product of the corresponding element in the heterogeneous parameter matrix W and the state value of the previous iteration step. Finally, after rounding to the nearest integer and taking the modulo 5 of the total number of grid points, p, q, and r are ensured to be mutually exclusive and none of them equal to the current target grid point index i. After the pre-iteration is completed, the obtained grid point states are used as initial values for sequential iteration to generate a chaotic sequence matrix matching the image specifications.
[0038] Step 3.4, during the iteration process, the update mechanism for the state of each grid point is as follows: the state value of the target grid point in the current iteration step is composed of two components. The first part is the difference between the result of the target grid point state value in the previous iteration step after sinusoidal-logic chaotic mapping and the decoupling coefficient. The second part is the sum of the results of the state values of the three selected dynamic non-adjacent grid points in the previous iteration step after sinusoidal-logic chaotic mapping and one-third of the coupling coefficient. The expression for the sinusoidal-logic chaotic mapping is: ; In the formula, These are preset mapping control parameters; The input state variables for the chaotic mapping; This represents the chaotic state for the next iteration.
[0039] Step 3.5, after After one iteration, a chaotic matrix with 5 rows and 262,144 columns is generated. The process sequentially splits the chaotic sequence matrix into 5 independent one-dimensional chaotic subsequences, defined as the first to fifth chaotic subsequences; the first and second chaotic subsequences are used for the scrambling process, and the third, fourth, and fifth chaotic subsequences are used for the diffusion process.
[0040] Step 4, perform a double reset scrambling operation for overlapping rows and columns, combined with... Figure 4 The flowchart shown includes step 4, which includes: Step 4.1: Sort the first chaotic subsequence and the second chaotic subsequence in ascending order, obtain their original position indices, and generate row scrambling indices and column scrambling indices respectively, each index having a length of 512; set the starting row, ending row, starting column, and ending column for scrambling (for a 512×512 image, starting row = 1, ending row = 512, starting column = 1, ending column = 512); Step 4.2, First round of row scrambling: Starting from the first row of the image, extract the pixel data of the current row and the next row one by one, rearrange the pixel positions in the current row and the next row according to the row scrambling index, and fill the rearranged pixels back into the original image matrix to complete the first round of row scrambling; Step 4.3, First round of column scrambling: On the image after row scrambling, starting from the starting column, extract the pixel data of the current column and the next column one by one. According to the column scrambling index, rearrange the pixel positions in the current column and the next column, and fill the rearranged pixels back into the original image matrix to complete the first round of column scrambling. Step 4.4, Secondary alternating scrambling: For the overlapping areas of rows and columns formed by row scrambling and column scrambling, the row scrambling index and column scrambling index are used again to perform secondary scrambling in the row and column directions to obtain the scrambled image matrix.
[0041] Step 5: Perform interleaving and diffusion processing on the chaotic sequence, and output the final ciphertext. Figure 5 The flowchart shown.
[0042] Step 5 includes: Step 5.1: Preprocess the fifth chaotic subsequence by multiplying each value in the sequence by 10 to the power of 5, rounding down, and then taking the modulus of 256 to map the value range to the interval of 0-255, thus obtaining the preprocessed diffusion sequence. Step 5.2: Sort the third and fourth chaotic subsequences in ascending order to generate two sets of diffusion index sequences, each with a length of 262144. Step 5.3: Expand the scrambled image matrix into a one-dimensional pixel sequence in row-major order; take the first element of the third chaotic subsequence and multiply it by 100 as the initial diffusion value; for each scrambled pixel, add it to the corresponding value of the preprocessed diffusion sequence rearranged according to the first group of diffusion indices and take the modulo 256 to obtain the intermediate value of the pixel. Step 5.4, First pixel encryption: For the first pixel: Perform a bitwise XOR operation on the intermediate value with the initial diffusion value and the first value of the preprocessed diffusion sequence rearranged according to the second diffusion index to generate the first ciphertext pixel value; Step 5.5, Cyclic Diffusion Encryption: Starting from the second pixel, perform a bitwise XOR operation on the median value of the current pixel with the previous ciphertext pixel value and the corresponding value of the preprocessed diffusion sequence rearranged according to the second diffusion index to generate the current ciphertext pixel value. Repeat this process until all 262,144 pixels have been processed, resulting in a one-dimensional ciphertext sequence; Step 5.6: Fold the encrypted one-dimensional ciphertext sequence back into a 512×512 two-dimensional matrix, and the output is the final encrypted ciphertext image.
[0043] As another embodiment of the encryption method of the present invention, when the image to be encrypted is a color image, the color image is first separated into three color channels: R, G, and B, to obtain three independent 512×512 grayscale image matrices; the above-mentioned key generation, chaotic sequence generation, scrambling, and diffusion operations are performed independently on each channel, and then the three encrypted channel matrices are merged into a color encrypted image.
[0044] Through the encryption method described in the above embodiments, the optimized chaotic system's sensitivity to parameter changes is improved by two orders of magnitude. Even minute changes in parameters of this magnitude can cause drastic changes in chaotic sequences; combined with the SHA-512 key generation mechanism, the effective key space exceeds... far higher The cryptographic security threshold is high enough to effectively resist brute-force attacks under high computing power.
[0045] Moreover, this encryption method comprehensively enhances the anti-attack capability: the information entropy of the encrypted image can reach up to 7.99985; the pixel change rate value is stably 99.6094%, and the average change intensity is stably 33.4635%, which is highly consistent with the theoretical limit of 8-bit images and has the ultimate anti-differential attack capability; the correlation coefficient between adjacent pixels of the encrypted image is reduced to less than 0.01, which can significantly resist statistical analysis attacks.
[0046] Example 2 Combination Figure 2 The flowchart shown illustrates the decryption method. This embodiment decrypts the 512×512 grayscale ciphertext image obtained through encryption in Embodiment 1. The decryption process follows the inverse operation of encryption and uses the exact same parameters and sequences as encryption throughout. The specific steps are as follows: Step A1, before decryption, involves synchronizing and calibrating the parameters with the chaotic sequence, further including: Receive the encrypted image and the decryption key. The key includes the initial grid state (five values) used during encryption, the optimal baseline fixed parameters, and the grid-level heterogeneous parameter matrix W.
[0047] To ensure complete alignment of parameters and sequences between the decryption and encryption processes, a universal plaintext feature extraction algorithm and key generation method identical to those used in encryption are employed. The composite key sequence is reconstructed based on the feature values of the original plaintext image, ensuring that the resulting initial grid state is identical to that during encryption.
[0048] Based on this, the optimal baseline fixed parameter set and W saved during encryption are loaded, and chaotic system iteration is performed with the same initial grid state as encryption, 500 pre-iteration steps, and a total of 262,144 iteration steps, generating five sets of chaotic subsequences that are exactly the same as those in the encryption process. Subsequently, the two sets of chaotic subsequences used for scrambling are sorted in ascending order to obtain identical row scrambling indices and column scrambling indices; at the same time, the three sets of chaotic subsequences used for diffusion are subjected to completely identical preprocessing and sorting operations to generate preprocessed diffusion sequences and two sets of diffusion index sequences that are unbiased from the encryption process.
[0049] Step A2, perform the inverse operation of the diffusion process: First, the encrypted image matrix is expanded into a one-dimensional ciphertext sequence in row-major order, with a sequence length of 262144. It is confirmed that the initial diffusion value, the preprocessed diffusion sequence, and the two sets of diffusion index sequences are completely consistent with the parameters used in the encryption process.
[0050] Then, starting from the last pixel, decryption proceeds in reverse order: For pixels other than the first, the current ciphertext pixel value is sequentially XORed with the previous ciphertext pixel value and the corresponding value of the preprocessed diffusion sequence rearranged according to the second set of diffusion indices to obtain the intermediate value of the corresponding pixel; for the first pixel, the first ciphertext pixel value is sequentially XORed with the initial diffusion value and the first value of the preprocessed diffusion sequence rearranged according to the second set of diffusion indices to obtain the intermediate value of the first pixel; after obtaining all intermediate values, for the intermediate value of each pixel, the corresponding value of the preprocessed diffusion sequence rearranged according to the first set of diffusion indices is subtracted, and the result is modulo 256 to restore the original scrambled pixel value; the restored one-dimensional scrambled pixel sequence is folded back into a 512×512 two-dimensional matrix to obtain the scrambled image matrix.
[0051] Step A3: Perform the inverse operation of the scrambling process: Generate a reverse row scrambling index based on the row scrambling index during encryption. If the m-th bit in the row scrambling index is n, then the n-th bit in the reverse row scrambling index is m. Similarly, generate a reverse column scrambling index based on the column scrambling index.
[0052] First, reverse double overlap scrambling is performed on the overlapping row and column regions: first, reverse column scrambling is performed using the reverse column scrambling index, and then reverse row scrambling is performed using the reverse row scrambling index to eliminate the effect of double overlap scrambling.
[0053] Next, reverse the first round of column scrambling: starting from the last column and working leftwards, extract the pixel data of the current column and the previous column one by one, restore the original position of the pixel through the reverse column scrambling index, and fill it back into the image matrix to complete the reverse scrambling of all columns.
[0054] Finally, reverse the first-round row scrambling: starting from the last row and working upwards, extract the pixel data of the current row and the previous row, restore the original position of the pixels using the reverse row scrambling index, and fill it back into the image matrix, completing the reverse row scrambling of the entire row. The final image matrix is the original plaintext image matrix, and the decrypted image is output.
[0055] In another embodiment of the decryption method of this invention, when the image to be encrypted is a color image, the color image is first separated into three color channels: R, G, and B. The synchronization, diffusion inverse operation, and scrambling inverse operation described above are then performed independently on each channel. Finally, the three decrypted channel matrices are merged into the original color plaintext image. The entire decryption process does not introduce any additional parameters and relies entirely on the key and chaotic sequence used during encryption, ensuring lossless restoration.
[0056] Example 3 This embodiment provides a system for implementing the above-mentioned encryption and decryption methods. The system is based on a three-dimensional non-adjacent coupled sinusoidal-logic mapping chaotic system and integrates two-stage parameter optimization, encryption and decryption functions. The system includes three core modules: a two-stage evolutionary parameter optimization module, an image encryption module and an image decryption module.
[0057] The two-stage evolutionary parameter optimization module is used to perform two-stage parameter optimization on a three-dimensional non-adjacent coupled sinusoidal-logistic map chaotic system. This module includes a global optimization unit and a local optimization unit: the global optimization unit employs a differential evolution algorithm to maximize the average maximum Lyapunov exponent, average KS entropy, and average parameter sensitivity of the weighted combination, outputting the optimal baseline fixed parameter set; the local optimization unit employs a covariance matrix adaptive evolution strategy, using the baseline fixed parameters as a baseline, independently fine-tuning the heterogeneous parameters at each grid point, outputting a grid-level heterogeneous parameter matrix. The output of this module serves as the common parameter configuration for encryption and decryption.
[0058] The image encryption module receives a plaintext image and, based on the aforementioned optimal baseline fixed parameters and grid-level heterogeneous parameter matrix, sequentially performs plaintext association key generation and parameter initialization, chaotic sequence generation of fused and optimized parameters, row and column overlap double reset scrambling, and double sequence chaotic interleaving diffusion, finally outputting an encrypted ciphertext image. For the specific encryption process, please refer to the encryption method embodiment.
[0059] The image decryption module receives the ciphertext image and the corresponding key, and uses the same parameters and sequence generation rules as the encryption to sequentially perform parameter synchronization with the chaotic sequence, inverse diffusion operation, and inverse scrambling operation to recover the original plaintext image. For the specific decryption process, please refer to the decryption method embodiment.
[0060] In summary, the encryption method provided by this invention includes performing a two-stage evolutionary parameter optimization to obtain optimal parameters. The first stage uses a differential evolution algorithm to optimize global baseline parameters, and the second stage uses a covariance matrix adaptive evolution strategy to optimize grid-level heterogeneous parameters. The method also involves generating a plaintext-associated key and initializing system parameters; generating a chaotic sequence with fused optimized parameters; performing a row-column overlapping double-reset scrambling operation; and interleaving and diffusion processing on the chaotic sequence to output the final ciphertext. This method significantly improves the system's chaotic complexity and anti-attack capability. Test results show that the ciphertext information entropy can reach a maximum of 7.99985 bits, and the pixel change rate and average change intensity are close to the theoretical limit of an 8-bit grayscale image. Simultaneously, the key space meets the cryptographic security threshold, effectively resisting various cryptographic attacks such as differential attacks and statistical analysis, and can be applied to image data protection in high-security scenarios.
[0061] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A non-adjacent coupled chaotic image encryption method based on two-stage optimization, characterized in that, Includes the following steps: Step 1: Based on the three-dimensional non-adjacent coupled sinusoidal-logic mapping chaotic system, perform two-stage evolutionary parameter optimization to obtain the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix; The two-stage evolutionary parameter optimization method includes: First, a global heuristic optimization algorithm is used to optimize the global baseline parameters by maximizing the maximum Lyapunov exponent, Kolmogorov-Sinai entropy, and parameter sensitivity of the weighted combination, outputting the optimal baseline fixed parameters; Second, a local adaptive fine-tuning strategy is used, taking the optimal baseline fixed parameters output in the first stage as the baseline, to independently fine-tune the heterogeneous parameters of each grid point, outputting a grid-level heterogeneous parameter matrix. Step 2: Extract feature values from the plaintext image to be encrypted, generate an initial encryption key, and load the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix to complete the parameter initialization of the encryption system. Step 3: Based on the optimal baseline fixed parameters and heterogeneous parameter matrix, a state-driven dynamic non-adjacent grid point selection mechanism is constructed to iteratively generate multiple sets of chaotic sequences matching the plaintext image size for use in the image scrambling and diffusion process. Step 4: Generate a scrambling index based on the chaotic sequence. First, perform a first round of scrambling on the plaintext image by alternating rows and columns, and then perform a second round of scrambling on the overlapping areas of rows and columns to complete the two-level confusion of pixel positions. Step 5: Construct a diffusion index and preprocessing diffusion sequence based on the chaotic sequence. Use cyclic XOR and modulo operations with pre-ciphertext feedback to diffuse the pixel values of the scrambled image matrix obtained in Step 4 to generate the final encrypted ciphertext image.
2. The non-adjacent coupled chaotic image encryption method based on two-stage optimization according to claim 1, characterized in that: In step 1, the two-stage evolutionary parameter optimization includes: Step 1.1, the first stage is to perform global baseline fixed parameter optimization: Step 1.11: Define optimization variables including coupling coefficients and the first to fourth control parameters, and set the value range of each optimization variable; Step 1.12: The evolution objective is to maximize the average maximum Lyapunov exponent, average Kolmogorov-Sinai entropy, and average parameter sensitivity of the weighted combination. The weights of each item in the weighted combination are preset as the first weight coefficient, the second weight coefficient, and the third weight coefficient, respectively. Step 1.13: Using the differential evolution algorithm, set parameters including at least population size, maximum number of iterations, convergence tolerance, early stopping tolerance value, and mutation factor. Step 1.14: Iteratively optimize the objective function. After the iteration is completed, output the optimal coupling coefficient and each control parameter, and save them as a parameter configuration file. Step 1.2, the second stage performs lattice-level heterogeneous parameter matrix optimization: Step 1.21: Set multidimensional independent heterogeneous parameters for each grid point and construct a grid-level heterogeneous parameter matrix with a dimension of ten times the total number of grid points; Step 1.22: Adopting the covariance matrix adaptive evolution strategy, firstly, a global baseline search is performed using multidimensional globally shared parameters as optimization variables and the optimal baseline fixed parameters output in the first stage as initial values; then, the optimal parameters obtained from the global baseline search are copied as the initial parameters of each grid point, flattened into a multidimensional vector, and the heterogeneous parameters of each grid point are independently fine-tuned, finally outputting a grid-level heterogeneous parameter matrix.
3. The non-adjacent coupled chaotic image encryption method based on two-stage optimization according to claim 1, characterized in that, Step 2 includes: Step 2.1: Convert the plaintext image to be encrypted into a double-precision plaintext image matrix, and input the double-precision plaintext image matrix into a general digital feature extraction algorithm to obtain a feature value sequence of a preset length; Step 2.2: Extract a portion of the feature value sequence and map it to a preset number of initial parameters to construct an initial key set; Step 2.3: Take the first two decimal values of the initial key set as the first control component and the second control component of the logical mapping to generate ten sets of basic chaotic sequences; Step 2.4: Calculate the average pixel value of the plaintext image, and combine and modulo the remaining values in the initial key set, the basic chaotic sequence, and the average pixel value to obtain the composite key sequence. Step 2.5: Use the segmented values of the composite key sequence as the initial grid state for the iteration of the high-dimensional non-adjacent coupled chaotic system, load the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix obtained in Step 1, and complete the initialization of encryption parameters.
4. The non-adjacent coupled chaotic image encryption method based on two-stage optimization according to claim 3, characterized in that, Step 3 includes: Step 3.1: Retrieve the optimal baseline fixed parameters and grid-level heterogeneous parameter matrix that have been initialized in Step 2, and obtain the system grid size L and the image size to be encrypted M×N; Step 3.2: Starting from the initial grid state, perform a preset number of pre-iterations to eliminate chaotic transient effects and obtain the grid state after pre-iteration. Step 3.3: Iterate sequentially with the grid point state after pre-iteration as the initial value to generate a chaotic sequence matrix that matches the specifications of the image to be encrypted; During the iteration, three dynamic non-adjacent grid point indices are selected in each step. Each grid point index is obtained by multiplying the current target grid point number with the corresponding control parameter to obtain the basic offset, and then superimposed with the product of the corresponding element in the grid-level heterogeneous parameter matrix and the state value of the previous iteration step. Finally, it is dynamically determined by rounding and modulo operation. Step 3.4, during the iteration process, the update mechanism for the state of each grid point is as follows: the state value of the target grid point in the current iteration step is composed of two components. The first part is the difference between the result of the target grid point state value in the previous iteration step after sinusoidal-logic chaotic mapping and the decoupling coefficient. The second part is the sum of the results of the state values of the three selected dynamic non-adjacent grid points in the previous iteration step after sinusoidal-logic chaotic mapping and one-third of the coupling coefficient. The expression for the sinusoidal-logic chaotic mapping is: ; In the formula, These are preset mapping control parameters; The input state variables for the chaotic mapping; This represents the chaotic state for the next iteration. Step 3.5: After the iteration is completed, five independent chaotic subsequences are sequentially split from the chaotic sequence matrix, namely the first to the fifth chaotic subsequences; among them, the first and second chaotic subsequences are used for the scrambling stage, and the third, fourth and fifth chaotic subsequences are used for the diffusion stage.
5. The non-adjacent coupled chaotic image encryption method based on two-stage optimization according to claim 1, characterized in that: Step 4 includes: Step 4.1: Sort the chaotic sequence used for scrambling in ascending order to obtain the row scrambling index and column scrambling index; Step 4.2: Starting from the first row of the image, extract the pixel data of the current row and the next row one by one, rearrange the pixel positions according to the row scrambling index, and then fill them back into the original image to complete the first round of row scrambling. Step 4.3: On the image after row scrambling, starting from the starting column, extract the pixel data of the current column and the next column one by one. After rearranging the pixel positions according to the column scrambling index, fill them back into the original image to complete the first round of column scrambling. Step 4.4: For the overlapping areas of rows and columns formed by row scrambling and column scrambling, perform secondary scrambling in the row and column directions again using the row scrambling index and column scrambling index to obtain the scrambled image matrix.
6. The non-adjacent coupled chaotic image encryption method based on two-stage optimization according to claim 3, characterized in that, Step 5 includes: Step 5.1: Preprocess the fifth chaotic subsequence by multiplying each value in the sequence by 10 to the power of 5, rounding down, and then taking the modulus of 256 to map the value range to the interval of 0-255, thus obtaining the preprocessed diffusion sequence. Step 5.2: Sort the third and fourth chaotic subsequences in ascending order to generate two sets of diffusion index sequences with the same length as the total number of pixels. Step 5.3: Expand the scrambled image matrix into a one-dimensional pixel sequence in row-major order; take the first element of the third chaotic subsequence and multiply it by 100 as the initial diffusion value; for each scrambled pixel, add it to the corresponding value of the preprocessed diffusion sequence rearranged according to the first group of diffusion indices and take the modulo 256 to obtain the intermediate value of the pixel. Step 5.4: Perform a bitwise XOR operation on the middle value of the first pixel with the initial diffusion value and the first value of the preprocessed diffusion sequence rearranged according to the second group of diffusion indices to generate the first ciphertext pixel value. Step 5.5: Starting from the second pixel, perform a bitwise XOR operation on the median value of the current pixel with the previous ciphertext pixel value and the corresponding value of the preprocessed diffusion sequence rearranged according to the second group of diffusion indices to generate the current ciphertext pixel value, until all pixels are encrypted. Step 5.6: Reconstruct the encrypted one-dimensional ciphertext sequence into a two-dimensional matrix with the same size as the plaintext image, and output the final encrypted ciphertext image.
7. The non-adjacent coupled chaotic image encryption method based on two-stage optimization according to any one of claims 1-6, characterized in that: The plaintext image is either a grayscale image or a color image; when it is a color image, the three color channels R, G, and B are separated, the encryption method is applied to each channel, and then the three encrypted channel matrices are merged into a color encrypted ciphertext image.
8. A non-adjacent coupled chaotic image decryption method based on two-stage optimization, used to decrypt ciphertext images obtained by any one of the encryption methods described in claims 1 to 7, characterized in that, Includes the following steps: Step A1: Using the same parameters and sequence generation rules as encryption, based on the initial grid state, optimal baseline fixed parameters and grid-level heterogeneous parameter matrix in the key, generate multiple sets of chaotic sequences that are exactly the same as those in the encryption process, and perform the same sorting and preprocessing on the chaotic sequences as encryption to obtain scrambling index, diffusion index and diffusion sequence that are exactly the same as those in encryption. Step A2: Perform the inverse operation of the dual-sequence chaotic interleaving and diffusion during the encryption process on the ciphertext image to eliminate the confusion of pixel values and recover the scrambled image matrix; Step A3: Perform the inverse operation of double scrambling with overlapping rows and columns during the encryption process on the recovered scrambled image matrix to eliminate pixel position confusion, recover the original plaintext image matrix, and output the decrypted plaintext image.
9. The non-adjacent coupled chaotic image decryption method based on two-stage optimization according to claim 8, characterized in that, Step A2 includes: Step A2.1: Expand the ciphertext image into a one-dimensional ciphertext sequence in row-major order, with the sequence length equal to the total number of pixels in the image; Step A2.2, process in reverse order starting from the last pixel: For non-first pixels, perform a bitwise XOR operation on the current ciphertext pixel value with the previous ciphertext pixel value and the corresponding value of the preprocessed diffusion sequence rearranged according to the second set of diffusion indices to obtain the intermediate value of the current pixel; for the first pixel, perform a bitwise XOR operation on the first ciphertext pixel value with the initial diffusion value and the first value of the preprocessed diffusion sequence rearranged according to the second set of diffusion indices to obtain the intermediate value of the first pixel; Step A2.3: Subtract the corresponding value of the preprocessed diffusion sequence rearranged according to the first group of diffusion indices from the median value of each pixel, and then take the modulus of 256 to restore the scrambled one-dimensional pixel sequence. Step A2.4: Fold the restored one-dimensional scrambled pixel sequence back into a two-dimensional matrix with the same size as the ciphertext image to obtain the scrambled image matrix; Step A3 includes: Step A3.1: Based on the row scrambling index and column scrambling index used during encryption, generate the corresponding reverse row scrambling index and reverse column scrambling index; the generation rule for the reverse scrambling index is: if the value of the m-th bit in the original scrambling index is n, then the value of the n-th bit in the reverse scrambling index is m. Step A3.2: For overlapping row and column regions, first use the reverse column scrambling index to reverse scramble the columns, and then use the reverse row scrambling index to reverse scramble the rows. Step A3.3: Starting from the last column of the image, extract the pixel data of the current column and the previous column one by one from left to right. Restore the original position of the pixels by reversing the column scrambling index and backfill them until the column reversing of all columns is completed. Step A3.4: Starting from the last row of the image, extract the pixel data of the current row and the previous row one by one, restore the original position of the pixels by reversing the row scrambling index and backfill, until all rows are reversed and scrambled to obtain the original plaintext image matrix; output the image corresponding to the matrix to complete the decryption.
10. A non-adjacent coupled chaotic image encryption and decryption system based on two-stage optimization, characterized in that, It includes a two-stage evolutionary parameter optimization module, an image encryption module, and an image decryption module, wherein: The two-stage evolutionary parameter optimization module is used to perform two-stage parameter optimization on a three-dimensional non-adjacent coupled sinusoidal-logistic mapping chaotic system, and outputs the optimal baseline fixed parameters and a grid-level heterogeneous parameter matrix. The two-stage evolutionary parameter optimization module includes a global optimization unit and a local optimization unit. The global optimization unit adopts a global heuristic optimization algorithm with the goal of maximizing the weighted comprehensive index and outputs the optimal baseline fixed parameters. The local optimization unit adopts a local adaptive fine-tuning strategy, using the optimal baseline fixed parameters as a baseline, and independently fine-tunes the heterogeneous parameters of each grid point, outputting a grid-level heterogeneous parameter matrix. The image encryption module is used to receive a plaintext image, and based on the optimal baseline fixed parameters and the grid-level heterogeneous parameter matrix, execute the image encryption method according to any one of claims 1 to 7 to output a ciphertext image. The image decryption module is used to receive the ciphertext image, call the same parameters, chaotic sequence generation rules, scrambling index and diffusion index as the image encryption module, and execute the image decryption method of claim 8 or claim 9 in the reverse order of the encryption process to output the restored plaintext image.