A color image encryption method based on three-dimensional space scrambling and filtering diffusion
Patent Information
- Application Number
- CN202610895418.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-09-22
AI Technical Summary
针对传统二维矩阵置乱算法存在的置乱维度单一、安全性有限等问题,研究人员提出了多种高维改进方案
[0005]本技术方案首先利用SHA-512哈希函数与明文图像深度绑定,生成2D-ISM混沌系统的初始控制参数,实现一次一密的安全机制,有效抵御差分攻击,其次,在置乱阶段,本方案引入了受混沌序列实时控制的随机层交换机制,在进行魔方矩阵旋转之后,在物理层面上对不同深度的矩阵切片进行整体交换,打破传统魔方变换内外层隔离的拓扑缺陷,实现三维全局动态置乱,提高置乱的充分性与执行效率;最后,在扩散阶段,结合中心权重锁定的局部掩码滤波与链式扩散策略,确保明文或密钥中的任意微小变动都能传递至全局,产生良好的雪崩效应,全面提升图像的密码学安全性能与抗攻击能力。
Smart Images

Figure CN122802633A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to digital image encryption technology, specifically a color image encryption method based on three-dimensional spatial scrambling and filtering diffusion. Background Technology
[0002] Digital image encryption technology is a technique that scrambles and diffuses image data based on cryptographic theory. It has significant research value and application prospects in areas such as secure multimedia transmission, medical image protection, and cloud-based privacy data storage. Chaotic systems, due to their good initial value sensitivity, ergodicity, and pseudo-random sequence generation capabilities, serve as information masking carriers, offering advantages such as fast encryption / decryption speeds and large key spaces. In recent years, with the increasing demand for high-resolution image encryption efficiency and anti-attack capabilities, image encryption technology based on chaotic systems has received widespread attention. To address the problems of single scrambling dimension and limited security in traditional two-dimensional matrix scrambling algorithms, researchers have proposed various high-dimensional improvement schemes. Among them, the scrambling algorithm based on Rubik's Cube transformation has an intuitive implementation logic, relatively low computational complexity, and a more three-dimensional pixel space rearrangement capability compared to two-dimensional algorithms. However, since the standard three-dimensional Rubik's Cube transformation mainly achieves pixel position changes by cyclically rotating matrix slices along different coordinate axes, this rotation mechanism has inherent topological defects. Regardless of how the Rubik's Cube rotates, pixel blocks can only move within their own physical depth level, preventing pixels from achieving complete global traversal in three-dimensional space. This limitation affects the sufficiency of image scrambling and the final security effect. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies by providing a color image encryption method based on three-dimensional spatial scrambling and filtering diffusion. This method overcomes the spatial hierarchy isolation defect in traditional three-dimensional cube scrambling algorithms, enabling global dynamic traversal of pixels in three-dimensional space. While ensuring encryption efficiency, it enhances the image's resistance to various cryptographic attacks, thus possessing practical value in the secure transmission and storage of digital images.
[0004] The technical solution to achieve the objective of this invention is: A color image encryption method based on three-dimensional spatial scrambling and filtering diffusion includes the following steps: 1) Constructing a 2D-ISM chaotic system: The model definition of a 2D-ISM chaotic system is shown in formula (1): (1), in, For the system's state variables, and These are the system's control parameters. Indicates modulo; 2-1) Hash value calculation and quantization: First, the plaintext image is hashed using the SHA-512 cryptographic hash function. The operation yields a hash value sequence of length 64 bytes. ,in Then, the sequence Segmentation and quantization to generate initial parameters for a 2D-ISM chaotic system. , and The quantification formulas are shown in formulas (2), (3), and (4): (2), (3), (4); 2-2) Image 3D Reconstruction and Stitching: Transforming plaintext images Separate the matrix into three channels: R, G, and B, and calculate the side length of the three-dimensional array. If the original number of pixels cannot be cubed to an integer, then pad with zeros at the end to reconstruct these three channels into a structure with a side length of [missing information]. Array of cubes And stacked along the third dimension to form a size of 3D Hybridization Matrix The set of mathematical control equations for the reconstruction and splicing of the plaintext image channel into the three-dimensional mixing matrix is shown in equation (5): (5); in, and These represent the number of rows and columns of the plaintext image, respectively. It is the floor function. These represent the row, column coordinates, and depth index in three-dimensional space, respectively. This indicates a matrix concatenation operation along the third dimension; 3) Cross-channel scrambling: In order to achieve preliminary deep fusion of color information, the initial parameters are scrambled. Substitute into the 2D-ISM mapping system, iteratively generate a length of Given a chaotic sequence, discard the first 2000 terms and keep the subsequent sequence, denoted as . For the sequence Sort in ascending order and obtain the sorted position index table. According to the index table For three-dimensional mixing matrix Perform chaotic sequence index scrambling. After scrambling, create a new matrix. Re-segmented and restored into three independent channel 3D arrays Then, in the subsequent Rubik's Cube transformation stage, the cross-channel scrambling formula is shown in formula (6): (6); in, This indicates that the sequence will be sorted in ascending order. , ; 4) The specific steps of the improved Rubik's Cube transformation are as follows: 4-1) Control sequence generation and quadruple quantization: Based on the initial values of the 2D-ISM system in step 2-1) The iterative generation length is The core control sequence is obtained by discarding the first 2000 terms of the chaotic sequence. ,Will Divided into three sections Each corresponds to one of the three channels. For any channel , Corresponding chaotic sequence It is further divided into four equal parts: Each segment is [length] In the In each iteration, a single Rubik's Cube transformation is determined by the quaternion parameters. The parameters are generated under joint control, as shown in formula (7): (7); in, Corresponding to The axis specifies the current direction of rotation. Specify the level of the current operation on the selected axis. Corresponding rotation angle , To generate the relative offset of the swap layer; 4-2) Execution layer swapping of the Rubik's Cube transformation: in the first layer... In the next iteration, the three-dimensional array Obtain its corresponding quadruple control parameters ,right Axis No. Layer rotation The angle is then calculated according to formula (8) to obtain the exchange level. After rotation Layers and coaxial The layers exchange data. Passing through After the iteration is completed, a fully scrambled three-dimensional array is obtained. ; (8), 5) The specific steps of local filtering and global mixing diffusion are as follows: 5-1) Chaotic Mask Generation: [This refers to the generation of a key / mask.] Substitute into 2D-ISM mapping for iteration Next, discarding the first 2000 terms yields a length of... sequence And quantify it, Divided into three sections, each reshaped into a size of 3D mask matrix Based on the control parameters extracted in step 1), Decide separately During diffusion along The execution order of the axes and the formula for generating the chaotic mask are shown in formula (9): (9), 5-2) Local filtering: Assuming , The diffusion order is specified as along The axes are processed sequentially, for and The first layer of the X-axis is padded with zeros around its perimeter. and Size expanded to Let them be denoted as edge filling matrices respectively. and template matrix For any pixel coordinate within the valid region Filtering and diffusion are performed, and the filtering formula is shown in formula (10): (10) in, , For Centered Local mask sub-block, setting the center weight of this sub-block to . After filtering, update the value at the corresponding position; 5-3) Chain diffusion: After local filtering is completed, the ciphertext of the previous layer is used as feedback, combined with a chaotic mask. This involves a chain-like diffusion process at subsequent levels, for the first... The state of any pixel in the layer is updated sequentially, and then a diffusion operation is performed on the Y-axis and Z-axis to obtain... The chain diffusion formula is shown in formula (11): (11), in ; 6) The three matrices are reconstructed into two-dimensional matrices, and then synthesized as red, green, and blue channels, respectively, to obtain the final ciphertext ENP. The decryption process is the strict inverse operation of the encryption process described above.
[0005] This technical solution first utilizes the SHA-512 hash function to deeply bind with the plaintext image, generating initial control parameters for a 2D-ISM chaotic system to achieve a one-time pad security mechanism, effectively resisting differential attacks. Second, in the scrambling stage, this solution introduces a random layer exchange mechanism controlled in real time by the chaotic sequence. After rotating the Rubik's Cube matrix, matrix slices of different depths are exchanged as a whole at the physical level, breaking the topological defects of the isolation between inner and outer layers in traditional Rubik's Cube transformations, achieving three-dimensional global dynamic scrambling, and improving the sufficiency and execution efficiency of scrambling. Finally, in the diffusion stage, combining local mask filtering with center weight locking and a chain diffusion strategy ensures that any tiny change in the plaintext or key can be propagated globally, generating a good avalanche effect and comprehensively improving the cryptographic security performance and anti-attack capability of the image.
[0006] This method can overcome the spatial hierarchy isolation defect in traditional 3D Rubik's Cube scrambling algorithms, realize global dynamic traversal of pixels in 3D space, and improve the image's ability to resist various cryptographic attacks while ensuring encryption execution efficiency. It has practical value in the secure transmission and storage of digital images. Attached Figure Description
[0007] Figure 1 This is a flowchart of a color image encryption method based on three-dimensional spatial scrambling and filtering diffusion; Figure 2 The image shows the encryption / decryption simulation results in the example. Detailed Implementation
[0008] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this is not intended to limit the present invention; Example: A color image encryption method based on three-dimensional spatial scrambling and filtering diffusion includes the following steps: 1) Constructing a 2D-ISM chaotic system: The model definition of a 2D-ISM chaotic system is shown in formula (1): (1), in, For the system's state variables, and These are the system's control parameters. Indicates modulo; 2-1) Hash value calculation and quantization: First, the plaintext image is hashed using the SHA-512 cryptographic hash function. The operation yields a hash value sequence of length 64 bytes. ,in Then, the sequence Segmentation and quantization to generate initial parameters for a 2D-ISM chaotic system. , and The quantization formulas are shown in formulas (2), (3), and (4): In this example, the SHA-512 cryptographic hash function is used to operate on the image Peppers to obtain a hash sequence with a length of 64 bytes. ,in Then, the sequence Segmentation and quantization are performed to generate the control parameters and initial state values required for the 2D-ISM chaotic system. , and ; (2), (3), (4); 2-2) Image 3D Reconstruction and Stitching: The plaintext image Peppers is separated into three channel matrices: R, G, and B. The side lengths of the three-dimensional arrays are then calculated. Reconstruct these three channels into a structure with a side length of... Array of cubes And stacked along the third dimension to form a size of 3D Hybridization Matrix The set of mathematical control equations for the reconstruction and splicing of the plaintext image channel into the three-dimensional mixing matrix is shown in equation (5): (5); in, and These represent the number of rows and columns of the plaintext image, respectively. It is the floor function. These represent the row, column coordinates, and depth index in three-dimensional space, respectively. This indicates a matrix concatenation operation along the third dimension; 3) Cross-channel position scrambling: In order to achieve preliminary deep fusion of color information, the key is... Substitute into the 2D-ISM mapping system, iteratively generate a length of Given a chaotic sequence, discard the first 2000 terms and keep the subsequent sequence, denoted as . For the sequence Sort in ascending order and obtain the sorted position index table. According to the index table For three-dimensional mixing matrix Perform chaotic sequence index scrambling. After scrambling, create the new matrix. Re-segmented and restored into three independent channel 3D arrays Then, in the subsequent Rubik's Cube transformation stage, the cross-channel scrambling formula is shown in formula (6): (6); in, This indicates that the sequence will be sorted in ascending order. , ; 4) The specific steps of the improved Rubik's Cube transformation are as follows: 4-1) Control sequence generation and quadruple quantization: Based on the initial values of the 2D-ISM system in step 2-1) The iterative generation length is The chaotic sequence is discarded, and the core control sequence is obtained by discarding the first 2000 terms. ,Will Divided into three sections Each corresponds to one of the three channels. For any channel , Corresponding chaotic sequence It is further divided into four equal parts: Each segment is [length] : in the In each iteration, a single Rubik's Cube transformation is determined by the quaternion parameters. The parameters are generated under joint control, as shown in formula (7): (7); in, Corresponding to The axis specifies the current direction of rotation. Specify the level of the current operation on the selected axis. Corresponding rotation angle , It is the relative offset of the generated swap layer; 4-2) Execution layer swapping of the Rubik's Cube transformation: in the first layer... In the next iteration, the three-dimensional array Obtain its corresponding quadruple control parameters ,right Axis No. Layer rotation The angle is then calculated according to formula (8) to obtain the exchange level. After rotation Layers and coaxial The layers exchange data; Passing through After the iteration is completed, a fully scrambled three-dimensional array is obtained. ; (8), 5) The specific steps of local filtering and global mixing diffusion are as follows: 5-1) Chaotic Mask Generation: [This refers to the generation of a key / mask.] Substituting into the 2D-ISM mapping and iteratively generating a length of The chaotic sequence is obtained by discarding the first 2000 terms. The sequence was then quantized, divided into three segments, and reshaped into segments of size [size missing]. 3D mask matrix Based on the control parameters extracted in step 2-1) Decide separately During diffusion along The execution order of the axes and the formula for generating the chaotic mask are shown in formula (9): (9); 5-2) Local filtering: Assuming , The diffusion order is specified as along The axes are processed sequentially, for and The first layer of the X-axis is padded with zeros around its perimeter. and Size expanded to Let them be denoted as edge filling matrices respectively. and template matrix For any pixel coordinate within the valid region Filtering and diffusion are performed, and the filtering formula is shown in formula (10): (10) in, , For Centered Local mask sub-block, setting the center weight of this sub-block to . After filtering, update the value at the corresponding position; 5-3) Chain diffusion: After local filtering is completed, the ciphertext of the previous layer is used as feedback, combined with a chaotic mask. This involves a chain-like diffusion process at subsequent levels, for the first... The state of any pixel in the layer is updated sequentially, and then a diffusion operation is performed on the Y-axis and Z-axis to obtain... The chain diffusion formula is shown in formula (11): (11), in ; 6) The three matrices are reconstructed into two-dimensional matrices, and then synthesized as red, green, and blue channels, respectively, to obtain the final ciphertext ENP. The decryption process is the strict inverse operation of the encryption process described above.
[0009] For size The experimental simulation results of encrypting and decrypting images of Lena, Baboon, Peppers, and Airplane are as follows: Figure 2 The results show that the encrypted image is displayed as white noise, and the decryption process can accurately and losslessly recover the original image.
Claims
1. A color image encryption method based on three-dimensional spatial scrambling and filtering diffusion, characterized in that, Includes the following steps: 1) Constructing a 2D-ISM chaotic system: The model definition of a 2D-ISM chaotic system is shown in formula (1): (1), in, For the system's state variables, and These are the system's control parameters. Indicates modulo; 2-1) Hash value calculation and quantization: First, the plaintext image is hashed using the SHA-512 cryptographic hash function. The operation yields a hash value sequence of length 64 bytes. ,in Then, the sequence Segmentation and quantization to generate initial parameters for a 2D-ISM chaotic system. , , The quantification formulas are shown in formulas (2), (3), and (4): (2), (3), (4); 2-2) Image 3D Reconstruction and Stitching: Transforming plaintext images Separate the matrix into three channels: R, G, and B, and calculate the side length of the three-dimensional array. If the original number of pixels cannot be cubed to an integer, then pad with zeros at the end to reconstruct these three channels into a structure with a side length of [missing information]. Array of cubes And stacked along the third dimension to form a size of 3D Hybridization Matrix The set of mathematical control equations for the reconstruction and splicing of the plaintext image channel into the three-dimensional mixing matrix is shown in equation (5): (5); in, and These represent the number of rows and columns of the plaintext image, respectively. It is the floor function. These represent the row, column coordinates, and depth index in three-dimensional space, respectively. This indicates a matrix concatenation operation along the third dimension; 3) Cross-channel scrambling: Key Substitute into the 2D-ISM mapping system, iteratively generate a length of Given a chaotic sequence, discard the first 2000 terms and keep the subsequent sequence, denoted as . For the sequence Sort in ascending order and obtain the sorted position index table. According to the index table For three-dimensional mixing matrix Perform chaotic sequence index scrambling. After scrambling, create a new matrix. Re-segmented and restored into three independent channel 3D arrays Then, in the subsequent Rubik's Cube transformation stage, the cross-channel scrambling formula is shown in formula (6): (6); in, This indicates that the sequence will be sorted in ascending order. , ; 4) The specific steps of the improved Rubik's Cube transformation are as follows: 4-1) Control Sequence Generation and Quadruple Quantization: Based on the initial parameters of the 2D-ISM system in step 2-1). The iterative generation length is The core control sequence is obtained by discarding the first 2000 terms of the chaotic sequence. ,Will Divided into three sections Each corresponds to one of the three channels. For any channel , Corresponding chaotic sequence It is further divided into four equal parts: Each segment is [length] In the In each iteration, a single Rubik's Cube transformation is determined by the quaternion parameters. The parameters are generated under joint control, as shown in formula (7): (7); in, Corresponding to The axis specifies the current direction of rotation. Specify the level of the current operation on the selected axis. Corresponding rotation angle , It is the relative offset of the generated swap layer; 4-2) Execution layer swapping of the Rubik's Cube transformation: in the first layer... In the next iteration, the three-dimensional array Obtain its corresponding quadruple control parameters ,right Axis No. Layer rotation The angle is then calculated according to formula (8) to obtain the exchange level. After rotation Layers and coaxial The layers exchange data. Passing through After the iteration is completed, a fully scrambled three-dimensional array is obtained. ; (8), 5) The specific steps for local filtering and global mixing diffusion are as follows: 5-1) Chaotic Mask Generation: [This refers to the generation of a key / mask.] Substitute into 2D-ISM mapping for iteration Next, discarding the first 2000 terms yields a length of... sequence And quantify it, Divided into three sections, each reshaped into a size of 3D mask matrix According to the control parameters in step 2-1) Decide separately During diffusion along The execution order of the axes and the formula for generating the chaotic mask are shown in formula (9): (9); 5-2) Local filtering: Assuming , The diffusion order is specified as along The axes are processed sequentially, for and The first layer of the X-axis is padded with zeros around its perimeter. and Size expanded to Let them be denoted as edge filling matrices respectively. and template matrix For any pixel coordinate within the valid region Filtering and diffusion are performed, and the filtering formula is shown in formula (10): (10), in, , For Centered Local mask sub-block, setting the center weight of this sub-block to . After filtering, update the value at the corresponding position; 5-3) Chain diffusion: After local filtering is completed, the ciphertext of the previous layer is used as feedback, combined with a chaotic mask. This involves a chain-like diffusion process at subsequent levels, for the first... The state of any pixel in the layer is updated sequentially, and then a diffusion operation is performed on the Y-axis and Z-axis to obtain... The chain diffusion formula is shown in formula (11): (11), in ; 6) The three matrices are reconstructed into two-dimensional matrices, and then synthesized as red, green, and blue channels, respectively, to obtain the final ciphertext ENP. The decryption process is the strict inverse operation of the encryption process described above.