Image encryption method based on crossed spiral scrambling and layered region segmentation diffusion

Through an image encryption method based on cross-helical chaotic and hierarchical area segmentation diffusion, a high random chaotic sequence is generated using the NewFWHS superchaotic system, and an encryption framework of three chaotic, two diffusion and one bit plane replacement is adopted to solve the problems of insufficient complexity, limited key space, weak attack resistance and low encryption efficiency in the existing technology, achieving high security and efficient image encryption effect.

CN120358312APending Publication Date: 2025-07-22GUANGDONG OCEAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510414642.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The existing image encryption methods have problems such as insufficient complexity of chaotic systems, limited key space, weak attack resistance and low encryption efficiency, making it difficult to ensure high security while taking into account computing efficiency.

Method used

An image encryption method based on cross-helical chaotic and hierarchical area segmentation diffusion is adopted, including three-helical chaotic, two-helical and one-bit plane replacement encryption framework, and a high random chaotic sequence is generated using the NewFWHS superchaotic system, and the image security is enhanced through two-way cross-helical chaotic and hierarchical area segmentation diffusion techniques.

Benefits of technology

It improves the security and robustness of ciphertext images, enhances the randomness of pixel distribution and anti-statistical analysis capabilities, and reduces the correlation between adjacent pixels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358312A_ABST
    Figure CN120358312A_ABST
Patent Text Reader

Abstract

The invention provides an image encryption method based on crossed spiral scrambling and layered region segmentation diffusion, which utilizes NewFWHS to generate a high-randomness chaotic sequence for an encryption process, thereby improving security. Different from a traditional one-way scrambling mode, the method adopts two-way crossed spiral scrambling, multi-mode traversal is carried out on image pixels, the randomness of pixel distribution is enhanced, and the correlation between adjacent pixels is reduced; meanwhile, in combination with a bit plane decomposition and replacement technology, fine-grained disturbance is performed on image data on a bit level, so that the statistical analysis resistance is enhanced; besides, through a layered region segmentation diffusion method, internal relation between color channels is utilized, and different diffusion strategies are adopted for different channels, so that the encrypted image shows high randomness and unpredictability; according to the method, an encryption framework of three-time scrambling, two-time diffusion and one-time bit plane replacement is adopted, so that the security and robustness of the ciphertext image are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image encryption technology, and more specifically, to an image encryption method based on cross spiral scrambling and hierarchical region segmentation diffusion. Background Art

[0002] With the rapid development of digital technology and the Internet, images have become an important medium for information exchange and are widely used in key fields such as medical imaging, satellite remote sensing, military reconnaissance, and financial transactions. However, due to the openness of the network environment and the easy accessibility of information transmission, image data faces increasingly severe security threats during storage and transmission. Problems such as unauthorized access, malicious tampering, and data leakage may lead to the leakage of personal privacy and even cause significant economic losses and national security risks. Therefore, how to effectively protect the security of digital images has become an urgent problem to be solved.

[0003] Chaotic systems have become an important tool in the field of image encryption due to their extreme sensitivity to initial conditions and highly unpredictable dynamic behaviors. Chaotic systems can generate complex and random sequences, which play a key role in the encryption process, especially in scrambling and diffusion operations, significantly enhancing the security and anti-attack ability of the encrypted image. Although there are many encryption methods based on the Logistic map, Sine map, and multi-wing chaotic systems, these methods still have problems such as insufficient complexity of the chaotic system, limited key space, and weak anti-attack ability. In addition, most existing image encryption methods adopt a single and fixed scrambling and diffusion strategy, making it difficult to balance computational efficiency while ensuring high security. Summary of the Invention

[0004] In order to overcome the deficiencies of insufficient complexity of the chaotic system, limited key space, weak anti-attack ability, and low encryption efficiency in the existing image encryption technology, the present invention provides an image encryption method based on cross spiral scrambling and hierarchical region segmentation diffusion. The encryption framework of the present invention adopts three scramblings, two diffusions, and one bit-plane substitution, which not only ensures the high security of image encryption but also improves the encryption efficiency.

[0005] To solve the above technical problems, the technical solution of the present invention is as follows: An image encryption method based on cross spiral scrambling and hierarchical region segmentation diffusion, comprising the following steps: S1: Introduce a non-linear state feedback controller into a preset three-dimensional chaotic system to obtain a new four-dimensional four-wing hyperchaotic system; S2: Obtain a color plaintext image with a size of and calculate the hash value and use the hash value Group and transform according to a preset mathematical model to obtain the system parameters and initial values of the four-dimensional four-wing hyperchaotic system; substitute the system parameters and initial values into the four-dimensional four-wing hyperchaotic system for iteration to generate a random sequence , , and ; S3: Decompose the color plaintext image into three color channels of R, G, and B, and perform a two-way cross spiral scrambling operation on each color channel respectively; S4: Use , and to obtain several bit-plane replacement matrices, and use the bit-plane replacement matrices to perform bit-plane decomposition replacement operations on the three color channels of R, G, and B respectively; S5: Horizontally splice the three color channels of R, G, and B to obtain a matrix of size , and perform a two-way cross spiral scrambling operation on the matrix ; reshape the scrambled matrix into a matrix of size ; S6: Use the random sequence , , and to obtain a key matrix of size , the initial condition value of diffusion and the dividing line of each color channel, and then perform hierarchical region segmentation diffusion on the matrix to obtain a matrix ; S7: Decompose the matrix into three color channels of R, G, and B and vertically splice them to obtain a matrix of size , and perform a two-way cross spiral scrambling operation on the matrix ; reshape the scrambled matrix into a matrix of size ; S8: Use the random sequence , , and to obtain a key matrix of size , the initial condition value of diffusion and the dividing line of each color channel, and then for the matrix Perform hierarchical region segmentation and diffusion to obtain the final ciphertext image , and complete the encryption.

[0006] Preferably, in the step S1, the new four-dimensional four-wing hyperchaotic system is denoted as NewFWHS, and the mathematical model is as follows:

[0007] where , , , , , , and are the first to eighth system parameters respectively, , , and are the first to fourth system state variables respectively; , , and are the first to fourth system output variables respectively.

[0008] Preferably, the step S2 includes: S2.1: Obtain a color plaintext image with a size of and calculate the 256-bit hash value using the SHA-256 hash function ; ; S2.2: Group the hash value into groups of 8 bits, a total of 32 groups, and convert each group into a decimal number, denoted as respectively; S2.3: Perform grouped exclusive-or calculation on to obtain a total of 8 parameters , and the calculation formula is as follows:

[0009] where represents the bitwise exclusive-or operation, ; S2.4: Calculate the values of the first to eighth system parameters of NewFWHS, as well as the initial values of the system , , , and , and the calculation formula is as follows:

[0010]

[0011] S2.5: Substitute the calculated values and initial values of the first to eighth system parameters into NewFWHS for iteration times, discard the results of the first 1000 iterations to eliminate transient effects, and generate four random sequences with a length of . , , and .

[0012] Preferably, the step S3 includes: S3.1: Decompose the color plaintext image into three color channels: R, G, and B; S3.2: Determine a spiral starting point and a traversal method of a bidirectional spiral for each color channel, expressed as:

[0013] wherein, represents the first numerical value of the i-th random sequence; represents the first numerical value of the i-th random sequence; represents the third numerical value of the i-th random sequence; S3.3: Perform a bidirectional cross-spiral scrambling operation for each color channel according to the determined spiral starting point and traversal method of each color channel.

[0014] Preferably, the step S4 includes: S4.1: Process the random sequences , and according to the following formula to obtain sequences , and :

[0015] S4.2: Determine a 24-bit plane replacement matrix , and based on the sequences , ······ , and the determination rule is as follows:

[0016] wherein, represents the sequence , or the th number in; fill the 8 numbers in the sequence from low to high into the th positions of the 8-bit plane replacement matrix respectively, and each sequence with a length of can determine an 8-bit plane replacement matrix with a size of ; S4.3: Decompose each color channel into an 8-bit plane matrix, and perform bit plane replacement operations on each color channel respectively.

[0017] Preferably, the step S5 includes: S5.1: Horizontally splice the three color channels of R, G, and B to obtain a matrix with a size of ; S5.2: Determine the spiral starting point and the traversal method of the bidirectional spiral for the matrix , and the formula is as follows:

[0018] S5.3: According to the determined spiral starting point and the traversal method , perform a bidirectional cross spiral scrambling operation on the matrix , and reshape the scrambled matrix into a matrix with a size of .

[0019] Preferably, the step S6 includes: S6.1: Process the random sequences , , and according to the following formula to obtain the initial condition value of the key matrix for diffusion and the dividing lines and and of each color channel:

[0020] wherein, means combining , and into a three-dimensional matrix; S6.2: For the matrix ​​​Decompose it into three color channels of R, G, and B, and use the dividing lines of each color channel and to divide it into four regions respectively; S6.3: Starting from the R color channel, combine the key matrix with the initial condition value of diffusion to perform regional diffusion from the periphery to the center; the B color channel combines the key matrix with the last diffusion value of the R color channel to perform regional diffusion from the center to the periphery; the G color channel combines the key matrix with the last diffusion value of the B color channel to perform regional diffusion from the periphery to the center. After the diffusion is completed, the matrix is obtained.

[0021] Preferably, the step S7 includes: S7.1: Decompose the matrix into three color channels of R, G, and B and splice them vertically to obtain a matrix with a size of ; S7.2: Determine the spiral starting point and the traversal method of the bidirectional spiral , and the formula is as follows:

[0022] S7.3: According to the determined spiral starting point and the traversal method , perform a bidirectional cross-spiral scrambling operation on the matrix , and reshape the scrambled matrix into a matrix with a size of .

[0023] Preferably, the step S8 includes: S8.1: Process the random sequences , , and according to the following formula to obtain a key matrix with a size of , the initial condition value of diffusion and the dividing lines of each color channel and and ;

[0024] S8.2: Decompose the matrix into three color channels of R, G, and B, and use the dividing lines of each color channel ​​and Divide them into four regions respectively; S8.3: Starting from the R color channel, combine the key matrix with the initial condition value of diffusion to perform regional diffusion from the periphery to the center; For the B color channel, combine the key matrix with the last diffusion value of the R color channel to perform regional diffusion from the center to the periphery; For the G color channel, combine the key matrix with the last diffusion value of the B color channel to perform regional diffusion from the periphery to the center. After the diffusion is completed, the final ciphertext image is obtained, and the encryption is completed.

[0025] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are implemented.

[0026] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: The present invention provides an image encryption method based on cross-helical scrambling and hierarchical region segmentation diffusion. The NewFWHS hyperchaotic system is used to generate a highly random chaotic sequence and applied to the encryption process, thereby improving security; Different from the traditional one-way scrambling method, the present invention adopts two-way cross-helical scrambling to traverse the image pixels in multiple modes, greatly enhancing the randomness of pixel distribution and reducing the correlation between adjacent pixels; At the same time, the present invention combines the bit-plane decomposition and replacement technology to perform fine-grained perturbation on the image data at the bit level, effectively enhancing the anti-statistical analysis ability; In addition, the present invention uses the hierarchical region segmentation diffusion method, utilizes the internal relationship between color channels, and adopts different diffusion strategies for different channels, making the encrypted image exhibit high randomness and unpredictability; Generally speaking, the present invention adopts an encryption framework of three scramblings, two diffusions and one bit-plane replacement, greatly improving the security and robustness of the ciphertext image. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flowchart of an image encryption method based on cross-helical scrambling and hierarchical region segmentation diffusion provided in Embodiment 1.

[0028] Figure 2 It is a framework diagram of an image encryption method based on cross-helical scrambling and hierarchical region segmentation diffusion provided in Embodiment 2.

[0029] Figure 3 It is a schematic diagram of 4 two-way spiral traversal methods provided in Embodiment 2.

[0030] Figure 4Schematic diagram of bidirectional cross - spiral scrambling provided in Embodiment 2.

[0031] Figure 5 Schematic diagram of bit - plane decomposition and replacement provided in Embodiment 2.

[0032] Figure 6 Schematic diagram of hierarchical region segmentation and diffusion provided in Embodiment 2.

[0033] Figure 7 Schematic diagram of R - region, G - region and B - region segmentation and diffusion provided in Embodiment 2.

[0034] Figure 8 Schematic diagrams of plain - text images Boat, Pepper and Sanfrancsico provided in Embodiment 2.

[0035] Figure 9 Schematic diagrams of cipher - text images Boat, Pepper and Sanfrancsico provided in Embodiment 2.

[0036] Figure 10 Schematic diagrams of decrypted images Boat, Pepper and Sanfrancsico provided in Embodiment 2.

[0037] Figure 11 Histograms of plain - text images Boat, Pepper and Sanfrancsico provided in Embodiment 2.

[0038] Figure 12 Histograms of cipher - text images Boat, Pepper and Sanfrancsico provided in Embodiment 2. Detailed implementation manners

[0039] The accompanying drawings are only for illustrative purposes and should not be construed as limitations on this application; To better illustrate this embodiment, some components in the accompanying drawings are omitted, enlarged or reduced, which do not represent the dimensions of actual products; For those skilled in the art, it is understandable that some well - known structures and their descriptions in the accompanying drawings may be omitted.

[0040] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0041] Embodiment 1 As Figure 1 shown, this embodiment provides an image encryption method based on cross - spiral scrambling and hierarchical region segmentation and diffusion, including the following steps: S1: Introduce a non - linear state feedback controller into a preset three - dimensional chaotic system to obtain a new four - dimensional four - wing hyper - chaotic system; S2: Obtain a color plaintext image with a size of and calculate its hash value . Group the hash value and transform it according to a preset mathematical model to obtain the system parameters and initial values of the four-dimensional four-wing hyperchaotic system; Substitute the system parameters and initial values into the four-dimensional four-wing hyperchaotic system for iteration to generate a random sequence , , , and ; S3: Decompose the color plaintext image into three color channels: R, G, and B, and perform a two-way cross spiral scrambling operation on each color channel once; S4: Use , and to obtain several bit-plane replacement matrices, and use the bit-plane replacement matrices to perform bit-plane decomposition and replacement operations on the R, G, and B color channels respectively; S5: Horizontally concatenate the R, G, and B color channels to obtain a matrix with a size of . Perform a two-way cross spiral scrambling operation on the matrix ; Reshape the scrambled matrix into a matrix with a size of ; S6: Use the random sequence , , and to obtain a key matrix with a size of , the initial condition value of diffusion and the dividing lines of each color channel. Then perform hierarchical region segmentation and diffusion on the matrix to obtain a matrix ; S7: Decompose the matrix into three color channels: R, G, and B, and vertically concatenate them to obtain a matrix with a size of . Perform a two-way cross spiral scrambling operation on the matrix ; Reshape the scrambled matrix into a matrix with a size of ; S8: Use the random sequence , , and Obtain a key matrix of size , the initial condition value of diffusion and the dividing lines of each color channel. Subsequently, perform hierarchical region segmentation diffusion on the matrix to obtain the final ciphertext image , and complete the encryption.

[0042] In the specific implementation process, first introduce a non-linear state feedback controller into a preset three-dimensional chaotic system to obtain a new four-dimensional four-wing hyperchaotic system; Then obtain a color plaintext image of size and calculate the hash value . Group the hash value and transform it according to a preset mathematical model to obtain the system parameters and initial values of the four-dimensional four-wing hyperchaotic system; Substitute the system parameters and initial values into the four-dimensional four-wing hyperchaotic system for iteration to generate random sequences , , , and ; After that, decompose the color plaintext image into three color channels of R, G, and B, and perform a two-way cross spiral scrambling operation on each color channel respectively; Utilize , and to obtain a number of bit-plane replacement matrices, and use the bit-plane replacement matrices to perform bit-plane decomposition replacement operations on the three color channels of R, G, and B respectively; Horizontally concatenate the three color channels of R, G, and B to obtain a matrix of size , and perform a two-way cross spiral scrambling operation on the matrix ; Reshape the scrambled matrix into a matrix of size ; Utilize the random sequences , , and to obtain a key matrix of size , the initial condition value of diffusion and the dividing lines of each color channel. Subsequently, perform hierarchical region segmentation diffusion on the matrix to obtain a matrix ; For the matrix ​​​​Decompose it into three color channels of R, G, and B and splice them vertically to obtain a matrix with a size of ; Perform a two-way cross spiral scrambling operation on the matrix ; Reshape the scrambled matrix into a matrix with a size of ; ; Finally, use the random sequences , , , and to obtain a key matrix with a size of , the initial condition value of diffusion , and the dividing lines of each color channel. Subsequently, perform hierarchical region segmentation diffusion on the matrix to obtain the final ciphertext image , completing the encryption; This method adopts an encryption framework of three scramblings, two diffusions, and one bit-plane substitution, greatly improving the security and robustness of the ciphertext image. Example 2

[0043] This example provides an image encryption method based on cross spiral scrambling and hierarchical region segmentation diffusion, including the following steps: S1: Introduce a non-linear state feedback controller into a preset three-dimensional chaotic system to obtain a new four-dimensional four-wing hyperchaotic system; S2: Obtain a color plaintext image with a size of and calculate the hash value . Group the hash value and transform it according to a preset mathematical model to obtain the system parameters and initial values of the four-dimensional four-wing hyperchaotic system; Substitute the system parameters and initial values into the four-dimensional four-wing hyperchaotic system for iteration to generate random sequences , , , , , and ; S3: Decompose the color plaintext image into three color channels of R, G, and B, and perform a two-way cross spiral scrambling operation on each color channel respectively; S4: Use , , and to obtain a number of bit-plane substitution matrices, and use the bit-plane substitution matrices to perform bit-plane decomposition substitution operations on the three color channels of R, G, and B respectively; S5: Horizontally splice the three color channels of R, G, and B to obtain a size of The matrix , for the matrix Perform a bidirectional cross spiral scrambling operation; the scrambled matrix Reshape to size The matrix ; S6: Using random sequences , , and Get the size The key matrix , the initial condition value of diffusion and the dividing lines for each color channel, and then the matrix Perform hierarchical region segmentation diffusion and obtain the matrix ; S7: The matrix Decompose it into three color channels, R, G, and B, and concatenate them vertically to get a size of The matrix , for the matrix Perform a bidirectional cross spiral scrambling operation; the scrambled matrix Reshape to size The matrix ; S8: Using random sequences , , and Get the size The key matrix , the initial condition value of diffusion and the dividing lines for each color channel, and then the matrix Perform hierarchical region segmentation diffusion to obtain the final ciphertext image , encryption is completed.

[0044] In the specific implementation process, Figure 2 As shown, first a nonlinear state feedback controller The augmented Lü chaotic system is introduced, and the mathematical model of the augmented Lü system is as follows:

[0045] Introducing nonlinear state feedback controller Then a new four-dimensional four-wing hyperchaotic system is obtained, denoted as NewFWHS, and its mathematical model is as follows:

[0046] in, , , , , , , , are system parameters, , , , are system state variables; Then input the color image and perform the SHA-256 hash function on it to obtain a 256-bit hash value ; Group the hash value , with each 8 bits as a group, it can be divided into 32 groups, and then convert each group into decimal, denoted as ; Perform grouped exclusive-or calculation on to obtain a total of 8 parameters ; The calculation formula is as follows:

[0047] Among them, represents the bitwise exclusive-or operation, ; According to the obtained calculate the 8 parameters of the NewFWHS system , , , , , , , and the initial values of the system , , , ; The calculation formula is as follows:

[0048]

[0049] Substitute the system parameters , , , , , , , and the initial values , , , into NewFWHS for iteration times and discard the results of the first 1000 iterations to eliminate the transient effect, and 4 random sequences with a length of can be obtained , , , ; Input a color image and record its size as , and divide it into three color channels of R, G, and B; determine a spiral starting point and a traversal method of a bidirectional spiral for each of the R, G, and B channels; Figure 3 Fig. shows four traversal methods proposed in this embodiment; determine the spiral starting point and the traversal method The formulas are as follows:

[0050] According to the spiral starting point and traversal method determined for each channel, perform a bidirectional cross-spiral scrambling operation for each channel; As Figure 4 shown, Figure 4 Taking Figure 3 the traversal method (b) in and a 7×7 matrix as an example, the process of bidirectional spiral cross-scrambling is shown; first, randomly select the element 26 with coordinates (4, 5) as the spiral starting point, and then divide the matrix into upper and lower parts with the row where the element 26 is located as the dividing line. Starting from the next element 27 of the spiral starting point in the upper part of the matrix, perform a clockwise spiral traversal from the outside to the inside to obtain the sequence ; starting from the spiral starting point in the lower part of the matrix, perform a counterclockwise spiral traversal from the outside to the inside to obtain the sequence ; then, adopt the method of alternating merging, and successively take out elements from the sequence and the sequence and place them crosswise in a new sequence ; once all the elements in one of the sequences have been selected, all the remaining elements of the other sequence are directly appended to the end of the sequence ; finally, reshape the sequence into a matrix with the same size as the original matrix; After that, process the random sequence , , according to the following formula to obtain , , :

[0051] According to , , determine the 24-bit plane replacement matrix , ······ , the determination rules are as follows:

[0052] Among them, represents the -th number of the random sequence; the 8 numbers in the sequence are filled into the -th positions of 8 replacement matrices from low to high; a sequence with a length of can determine 8 replacement matrices with a size of ; Each channel is decomposed into 8 bit-plane matrices, and bit-plane replacement operations are performed on the three channels of R, G, and B respectively; As Figure 5 shown, Figure 5 a 4×4 matrix shows the process of bit-plane decomposition and replacement; the replacement operation is as follows: if the -th element of the replacement matrix is 1, it means that the -th element on the first bit plane is selected for replacement; if the -th element of the replacement matrix is 2, it means that the -th element on the second bit plane is selected for replacement, and so on; The three channels of R, G, and B are horizontally concatenated to obtain a matrix with a size of ; To determine the spiral starting point and the traversal method of the bidirectional spiral , the formula is as follows:

[0053] According to the determined spiral starting point and the traversal method , a bidirectional cross spiral scrambling operation is performed; the scrambled matrix is reshaped into a matrix with a size of ; According to the following formula, the random sequence , , , , is processed to obtain a key matrix with a size of , the initial condition value of diffusion and the dividing lines of each color channel and :

[0054] ​​Among them, means to combine , , into a three-dimensional matrix; Decompose the matrix into three channels of R, G, and B; the dividing lines of each color channel and divide it into four regions respectively. Starting from the R channel, combine the key matrix with the diffusion initial value to perform regional diffusion from the periphery to the center; the B channel combines the key matrix with the last diffusion value of the R channel to perform regional diffusion from the center to the periphery; the G channel combines the key matrix with the last diffusion value of the B channel to perform regional diffusion from the periphery to the center. After the diffusion is completed, the matrix is obtained; As Figure 6 shown, Figure 6 shows the process of hierarchical regional segmentation and diffusion; assume that the dividing lines determined by the R channel are the straight lines and the straight line ; the dividing lines determined by the G channel are the straight lines and the straight line ; the dividing lines determined by the B channel are the straight lines and the straight line ; As Figure 7 shown in (a) and (c) therein, since both the R channel and the B channel diffuse from the outside to the inside, their diffusion formulas are similar; The diffusion formulas for the regions are as follows: When it is the region, , , , , , ; When it is the region, , , , , , ;

[0055] The diffusion formulas for the regions are as follows: When it is the region, , , , , , ; When it is the area, , , , , , ;

[0056] The diffusion formula between the area is as follows: When it is the area, , , , , , ; When it is the area, , , , , , ;

[0057] The diffusion formula between the area is as follows: When it is the area, , , , , , ; When it is the area, , , , , , ;

[0058] As shown in Figure 7 (b), the G channel diffuses from the inside out; The diffusion formula for the , area is as follows (where

[0059] The diffusion formula for the region is as follows (where , ):

[0060] The diffusion formula for the region is as follows (where , ):

[0061] The diffusion formula for the region is as follows (where , ):

[0062] After that, the matrix is decomposed into three channels of R, G, and B and vertically concatenated to obtain a matrix with the size of ; To determine the spiral starting point and the traversal method of the bidirectional spiral , the formula is as follows:

[0063] According to the determined spiral starting point and the traversal method , for performing the bidirectional cross spiral scrambling operation; reshaping the scrambled matrix into a matrix with the size of ; According to the following formula, process the random sequences , , and to obtain a key matrix with the size of , the initial condition value of diffusion and the dividing lines and for each color channel;

[0064] Decompose the matrix into three color channels of R, G, and B, and use the dividing lines and of each color channel to divide it into four regions respectively; Starting from the R color channel, combine with the key matrix and the initial condition value of diffusion to perform regional diffusion from the periphery to the center; for the B color channel, combine with the key matrix and the last diffusion value of the R color channel to perform regional diffusion from the center to the periphery; for the G color channel, combine with the key matrix and the last diffusion value of the B color channel to perform regional diffusion from the periphery to the center. After the diffusion is completed, the final ciphertext image is obtained, and the encryption is completed; This embodiment also provides a simulation experiment, as Figure 8 shown for the plaintext images Boat (256×256×3), Pepper (512×512×3) and Sanfrancsico (1024×1024×3); using this method to Figure 8 encrypt the plaintext images Boat, Pepper and Sanfrancsico, and the ciphertext images as shown in Figure 9 are obtained; decrypt the Figure 9 ciphertext images, and the decrypted images as shown in Figure 10 are obtained; it can be seen that this method can achieve image encryption with high quality; This embodiment also respectively counts the Figure 8 and Figure 9 histograms, as shown in Figure 11 and Figure 12 respectively. From left to right are the histograms of Boat, Pepper and Sanfrancsico; from Figure 11 and 12 it can be seen that this method has high security and strong robustness; This method adopts an encryption framework of three scramblings, two diffusions and one bit-plane substitution, which greatly improves the security and robustness of the ciphertext image.

[0065] The same or similar reference numerals correspond to the same or similar components; The terms describing the positional relationship in the drawings are only for illustrative purposes and cannot be construed as a limitation to this application; Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not limitations to the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. An image encryption method based on cross - spiral scrambling and hierarchical region segmentation diffusion, characterized in that Including the following steps: S1: Introduce a non-linear state feedback controller into a preset three-dimensional chaotic system to obtain a new four-dimensional four-wing hyperchaotic system; S2: Obtain a color plaintext image with a size of and calculate its hash value . Group the hash value and transform it according to a preset mathematical model to obtain the system parameters and initial values of the four-dimensional four-wing hyperchaotic system; Substitute the system parameters and initial values into the four-dimensional four-wing hyperchaotic system for iteration to generate random sequences , , , and ; S3: Decompose the color plaintext image into three color channels of R, G, and B, and perform a two-way cross-helical scrambling operation on each color channel respectively; S4: Using , and to obtain a number of bit-plane replacement matrices, and performing bit-plane decomposition replacement operations on the R, G, and B color channels respectively using the bit-plane replacement matrices; S5: Horizontally splice the R, G, and B color channels to obtain a matrix with a size of ; Perform a two-way cross spiral scrambling operation on the matrix ; Reshape the scrambled matrix into a matrix with a size of ; ; S6: Utilize a random sequence , , and to obtain a key matrix of size , the initial condition value for diffusion and the dividing lines for each color channel. Subsequently, perform hierarchical region segmentation diffusion on the matrix to obtain the matrix ; S7: Decompose the matrix into three color channels R, G, and B and vertically splice them to obtain a matrix of size ; perform a two-way cross-helical scrambling operation on the matrix ; reshape the scrambled matrix into a matrix of size ; ; ; S8: Using random sequences , , and Get the size The key matrix , the initial condition value of diffusion and the dividing lines for each color channel, and then the matrix Perform hierarchical region segmentation diffusion to obtain the final ciphertext image , encryption is completed.

2. The image encryption method based on cross - spiral scrambling and hierarchical region segmentation and diffusion according to claim 1, wherein, In step S1, the new four-dimensional four-wing hyperchaotic system is denoted as NewFWHS, and the mathematical model is: Among them, , , , , , , and are the first to eighth system parameters respectively, , , and are the first to fourth system state variables respectively; , , and are the first to fourth system output variables respectively.

3. An image encryption method based on cross-helical scrambling and hierarchical region segmentation diffusion according to claim 2, characterized in that, Step S2 includes: S2.1: Obtain a color plaintext image with a size of and calculate a 256-bit hash value using the SHA-256 hash function ; ; S2.2: Take the hash value Group it in groups of 8 bits, with a total of 32 groups. Convert each group to a decimal number and denote them respectively as ; S2.3: Perform grouped exclusive OR calculation on to obtain a total of 8 parameters , and the calculation formula is as follows: Among them, represents bitwise exclusive OR operation, ; S2.4: According to the obtained calculate the values of the first to eighth system parameters of NewFWHS, as well as the initial value of the system , , and , and the calculation formulas are as follows: S2.5: Substitute the calculated values and initial values of the first to eighth system parameters into NewFWHS for iterations, discard the results of the first 1000 iterations to eliminate transient effects, and generate four random sequences with a length of , , and .​ 4. An image encryption method based on cross-helical scrambling and hierarchical region segmentation diffusion according to claim 3, characterized in that Step S3 includes: S3.1: Decompose the color plaintext image into three color channels: R, G, and B; S3.2: Determine a spiral starting point for each color channel respectively and a traversal method of a bidirectional spiral , expressed as: Among them, represents the first digit value of the i-th random sequence; represents the first digit value of the i-th random sequence; represents the third digit value of the i-th random sequence; S3.3: Helical starting points determined according to each color channel and traversal method , and perform a two-way cross-helical scrambling operation for each color channel once respectively.

5. An image encryption method based on cross - spiral scrambling and hierarchical region segmentation diffusion according to claim 4, characterized in that, Step S4 includes: S4.1: Process the random sequences , and according to the following formula to obtain sequences , and : S4.2: Determine according to the sequences , and to determine the 24-bit plane replacement matrix , ······ , and the determination rule is as follows: Among them, represents the , or th number in; fill the 8 numbers in the sequence from low to high into the th position of the 8-bit plane replacement matrix respectively. Each sequence with a length of can determine an 8-bit plane replacement matrix with a size of ; The bit plane replacement matrix of S4.3: Decompose each color channel into 8 bit-plane matrices, and perform bit-plane replacement operations on each color channel respectively.

6. A method for image encryption based on cross - spiral scrambling and hierarchical region segmentation diffusion according to claim 5, characterized in that, Step S5 includes: S5.1: Horizontally splice the R, G, and B color channels to obtain a matrix with a size of ; ; S5.2: For the matrix Determine the starting point of the helix and the traversal method of the bidirectional helix , the formula is as follows: S5.3: According to the determined spiral starting point and the traversal method , perform a two-way cross spiral scrambling operation on the matrix , and reshape the scrambled matrix into a matrix with a size of .​ 7. An image encryption method based on cross - spiral scrambling and hierarchical region segmentation diffusion according to claim 6, characterized in that, Step S6 includes: S6.1: Process the random sequences , , and according to the following formula to obtain a key matrix of size , the initial condition value of diffusion and the dividing lines and for each color channel: Among them, means combining , and into a three-dimensional matrix; S6.2: Decompose the matrix into three color channels, namely R, G, and B, and use the dividing lines of each color channel and to divide it into four regions respectively; S6.3: Starting from the R color channel, combine with the key matrix and the initial condition value of diffusion to perform regional diffusion from the periphery to the center; The B color channel combines with the key matrix and the last diffusion value of the R color channel to perform regional diffusion from the center to the periphery; The G color channel combines with the key matrix and the last diffusion value of the B color channel to perform regional diffusion from the periphery to the center. After the diffusion is completed, the matrix is obtained.

8. An image encryption method based on cross - spiral scrambling and hierarchical region segmentation diffusion according to claim 7, characterized in that, Step S7 includes: S7.1: Decompose the matrix into three color channels R, G, and B and vertically splice them to obtain a matrix of size ; ; S7.2: For determine the starting point of the helix and the traversal method of the bidirectional helix , the formula is as follows: S7.3: According to the determined spiral starting point and the traversal method , perform a two-way cross spiral scrambling operation on the matrix , and reshape the scrambled matrix into a matrix with a size of .​ 9. A method for image encryption based on cross - spiral scrambling and hierarchical region segmentation diffusion according to claim 8, characterized in that, Step S8 includes: S8.1: Process the random sequences , , and according to the following formula to obtain a key matrix of size , the initial condition value of diffusion and the dividing lines and for each color channel; S8.2: Decompose the matrix into three color channels, namely R, G, and B, and use the dividing lines of each color channel and to divide it into four regions respectively; S8.3: Starting from the R color channel, combine with the key matrix and the initial condition value of diffusion to perform regional diffusion from the four sides to the center; The B color channel combines with the key matrix and the last diffusion value of the R color channel to perform regional diffusion from the center to the four sides; The G color channel combines with the key matrix and the last diffusion value of the B color channel to perform regional diffusion from the four sides to the center. After the diffusion is completed, the final ciphertext image is obtained, and the encryption is completed.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps in the method described in any one of claims 1 to 9.