Color image encryption method based on hyperchaotic system and go rule

Based on the color image encryption method based on the four -dimensional super -chaos system and Go rules, the problem of insufficient color image encryption in the existing technologies has been solved, and the effective destruction of pixels in different channels and the same channel in the same channel in the existing technology is solved. Cryptive security.

CN119383278APending Publication Date: 2025-01-28ZHENGZHOU UNIVERSITY OF LIGHT INDUSTRY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411711531.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When processing color images, existing color image encryption schemes fail to fully destroy the pixel point correlation between different channels and within the same channel, resulting in insufficient encryption security.

Method used

It proposes a color image encryption method based on the four -dimensional ultra -chaos system and Go rules. By generating a four -dimensional super chaos sequence with a single attraction, combined with Go rules and three -dimensional glyph extraction methods to achieve the disruption and diffusion of the image.

Benefits of technology

Effectively destroy the correlation between the pixels between different channels of color images and the same channel, improve the security of color image encryption, and can resist violent attacks, statistical analysis attacks and differential attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383278A_ABST
    Figure CN119383278A_ABST
Patent Text Reader

Abstract

The invention provides a color image encryption method based on a hyper-chaotic system and a go rule, which comprises the following steps of: obtaining an initial value by a plaintext image and four external keys, and combining the external keys to obtain four chaotic sequences; a chaos sequence is combined with a go rule to obtain position coordinates, and pixel points of three image channels of the plaintext image are rearranged according to the position coordinates to obtain an image matrix P1; the image channel sequence of the image matrix P1 is determined according to the three chaotic sequences, the zigzag extraction starting point of each image channel and the zigzag extraction sequence of the two-dimensional plane selected by the external secret key are reconstructed today by day, and an image matrix P2 is obtained; performing three-dimensional zigzag extraction to obtain an image sequence; bidirectional diffusion of the image sequence is realized by three chaotic sequences; and re-putting according to a three-dimensional zigzag extraction sequence to obtain a ciphertext image. The color image encryption method can effectively resist violent attacks, statistical analysis attacks and differential attacks, has good robustness, and is suitable for color image encryption with high security requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of color image encryption, and in particular to a color image encryption method based on a hyperchaotic system. Background Art

[0002] With the rapid development of communication technology, images have gradually become the main way for people to exchange information in their daily lives. However, the development of science and technology is a double-edged sword, which brings convenience and progress, but also negative impacts and challenges. In particular, as the convenience of communication technology increases, the risk of privacy leakage also increases. For example, the leakage of military facility images will threaten national security; the leakage of smart grid images will cause economic losses to enterprises and threaten the normal operation of social order; the leakage of personal privacy images may threaten personal life and property. Therefore, image encryption research has become an important topic in the current field of information security.

[0003] Image information is different from text information. There is a high degree of redundancy and correlation between its pixels, which makes traditional text encryption methods cannot be directly applied to image encryption. Chaotic systems have attracted much attention in the field of image encryption due to their complexity, sensitivity to initial values, and pseudo-randomness. Fridrich first proposed a cryptographic structure based on a chaotic system, which consists of two parts: scrambling and diffusion. Scrambling disrupts the correlation between image pixels, and diffusion changes pixel values ​​and enhances their connections, successfully eliminating the redundancy and correlation between plaintext image pixels, thereby achieving a good encryption effect. Therefore, obtaining a chaotic system with good chaotic characteristics and a safe and reliable scrambling and diffusion method has become the main content of the research on image encryption schemes based on chaotic systems.

[0004] Although low-dimensional chaotic systems are computationally simple, they are relatively complex and easy to be reconstructed, which reduces the security of image encryption schemes. In order to obtain chaotic systems with more complex chaotic characteristics, high-dimensional chaotic systems have been widely studied. Gong proposed a four-dimensional chaotic system with hidden attractors and self-excited attractors and applied it to image encryption, but its chaotic complexity is still relatively weak. In contrast, Zhang proposed a four-dimensional hyperchaotic system with infinite coexisting attractors, which has higher complexity.

[0005] Scrambling the image matrix with a pseudo-random sequence can effectively break the correlation between pixels. Hyperchaotic systems can generate good pseudo-random sequences, so they have attracted much attention. However, when the pseudo-random sequence generated by the chaotic sequence is illegally obtained, the security of the image is challenged. To solve this problem, Teng proposed an image encryption method that performs scrambling and diffusion at the same time, but its scrambling process essentially still relies entirely on the chaotic sequence. To further improve the security of encryption, Hua increased the complexity of the scrambling by increasing the mapping relationship between pixels and chaotic sequences, but it is still not sensitive enough to the changes in the elements of the chaotic sequence.

[0006] In recent years, researchers have conducted extensive research on the encryption of various image types, including grayscale image encryption, color image encryption, and multi-image encryption. However, some color image encryption schemes are too simple, simply repeating the grayscale image encryption method on the three RGB channels. This simplification ignores the association between different channels of color images and reduces the security of color image encryption schemes. To solve this problem, Zhang proposed a new three-dimensional orthogonal Latin cube to enhance the association between different channels of color images. Chai realizes the association between different channels of color images by introducing DNA crossover operations between channels. Three-dimensional zigzag extraction is a method that can quickly realize the association between pixels in different channels of color images, but the existing three-dimensional zigzag extraction methods do not fully destroy the correlation of pixels within the channel. Tang proposed an encryption scheme based on three-dimensional zigzag extraction, but failed to effectively establish the association between different channels. Zhang realized three-dimensional zigzag extraction by re-extracting the sequences obtained by two-dimensional zigzag extraction on different planes according to the order of the planes. Although it establishes associations between different image planes, it does not fully destroy the correlation between pixels within the planes. Summary of the invention

[0007] In response to the technical problem, the present invention proposes a color image encryption method based on a hyperchaotic system and Go rules, proposes a four-dimensional hyperchaotic system with a single attractor, and combines Go rules and a three-dimensional zigzag extraction method to achieve safe and reliable color image encryption, thereby improving the security of color image encryption.

[0008] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a color image encryption method based on a hyperchaotic system and go rules, the steps of which are as follows:

[0009] Step 1: Obtain the initial value of the hyperchaotic system from the plaintext image P and four external keys, and substitute the initial value into the four-dimensional hyperchaotic system and combine it with the external keys to obtain four chaotic sequences CSA, CSB, CSC and CSD;

[0010] Step 2: The chaotic sequence CSA is combined with the Go rules to obtain the scrambled position coordinates of each pixel in the plaintext image P, and the three image channels of the plaintext image P are rearranged according to the position coordinates to obtain the scrambled image matrix P1;

[0011] Step 3: Implement bidirectional diffusion based on three-dimensional zigzag extraction: Determine the image channel order of the image matrix P1, the zigzag extraction starting point of each image channel, and the zigzag extraction order of the two-dimensional plane selected by the external key according to the chaotic sequences CSB, CSC and CSD, and reconstruct the image matrix P1 to obtain the image matrix P2; implement three-dimensional zigzag extraction of the image matrix P2 to obtain the image sequence S; use the pseudo-random sequence PS obtained by the chaotic sequences CSB, CSC and CSD as a mask to implement bidirectional diffusion of the image sequence S to obtain the sequence S1;

[0012] Step 4: Put sequence S1 back into the three-dimensional image matrix according to the order of three-dimensional zigzag extraction to obtain the ciphertext image C, and complete the image encryption.

[0013] Preferably, the method for obtaining the initial value of the hyperchaotic system is:

[0014] The SHA-256 algorithm is used to calculate the plaintext image P to generate a hash value, and the hash value is divided into groups of 8 bits to obtain the internal key K = {k1, k2, ..., k 32}; Use the external key {e1, e2, e3, e4} to scramble the internal key K and obtain the initial value {x0, y0, z0, w0} of the hyperchaotic system, and:

[0015]

[0016] in, Represents XOR operation; the value range of the external key {e1,e2,e3,e4} is (0,1).

[0017] Preferably, the method of substituting the initial value into the four-dimensional hyperchaotic system and combining it with the external key to obtain four chaotic sequences CSA, CSB, CSC and CSD is: substituting the initial value {x0, y0, z0, w0} into the four-dimensional hyperchaotic system, and calculating (e5+M×N) iteration results, discarding the first e5 iteration results, and obtaining four chaotic sequences CSA, CSB, CSC and CSD with a length of M×N; wherein the value range of the external key {e5} is {1000, 1001,…, 5000}, and M and N are the length and width of the plaintext image P, respectively.

[0018] Preferably, the four-dimensional hyperchaotic system is a four-dimensional hyperchaotic system with a single attractor, and the mathematical expression of the four-dimensional hyperchaotic system is

[0019]

[0020] Among them, x, y, z and w are state parameters, and are the derivatives of the state parameters x, y, z and w respectively, and a and b are the control parameters;

[0021] When the control parameters a=176 and b=15, the four-dimensional hyperchaotic system is in a chaotic state.

[0022] Preferably, the Go rules include four basic rules and three supplementary rules. The chess pieces are divided into black and white, and are stored in black chess boxes and white chess boxes respectively. The basic rules include:

[0023] Basic rule 1: The black player goes first, and the black and white players take turns to take out the pieces from the chess box and place them on the intersections. Only one piece can be placed at a time.

[0024] Basic Rule 2: The number of empty intersections in the horizontal and vertical directions adjacent to the chess piece determines the chess piece's Qi;

[0025] Basic rule 3: If there are your own pieces at adjacent intersections in the horizontal and vertical directions, these pieces are considered as a whole and have the same Qi number;

[0026] Basic Rule 4: When the Qi of a chess piece reaches 0, the chess piece needs to be lifted;

[0027] Supplementary rules include:

[0028] Supplementary Rule 1: The size of the Go board is the same as the size of the encrypted image;

[0029] Supplementary Rule 2: Black and white pieces are stored in the black and white chess boxes respectively according to the data structure of the linear list: the top of the chess box is the head of the linear list, and the bottom of the chess box is the tail of the linear list;

[0030] Supplementary Rule 3: When a chess piece is lifted, if there is only one chess piece lifted, place it at the top of the chess box of the corresponding color; if there are more than one chess piece lifted, lift them one by one from top to bottom and from left to right and place them at the bottom of the chess box of the corresponding color.

[0031] Preferably, the method of scrambling a two-dimensional image by combining a chaotic sequence CSA with Go rules is as follows: mapping the spatial distribution of pixels of the two-dimensional image to the distribution of intersections of a Go board, mapping the pixels of the two-dimensional image to Go pieces, numbering the pixels of the two-dimensional image and the Go pieces in order from top to bottom and from left to right, and obtaining corresponding position numbers of the two-dimensional space of the two-dimensional image and the intersections of the board; the spatial positions of the scrambled image pixels are regarded as the spatial positions of the pieces on the Go board; using the chaotic sequence CSA to determine the positions of the pieces, and after the game is over, filling the remaining pieces in the chess box into the blank spaces of the chess board in order to complete the scrambling of the two-dimensional image.

[0032] Preferably, the method of obtaining the scrambled position coordinates of each pixel in the plaintext image P by combining the chaotic sequence CSA with the Go rules is as follows: for each image channel in the plaintext image P, the image matrix O is:

[0033] Step 1, initialize the chess box: traverse the image matrix O in sequence according to the position sequence relationship between the two-dimensional image and the Go chessboard, extract the pixel points of the image matrix O in order from small to large, and put the pixel points with odd extracted sequence numbers into the black chess box BS in sequence as black chess pieces, and put the pixel points with even extracted sequence numbers into the white chess box WS in sequence as white chess pieces;

[0034] Step 2, obtain chess piece positions: sort the chaotic sequence CSA to obtain the index sequence IS;

[0035] Step 3: Move the chess piece: Starting from the black chess box BS, take the chess pieces from the top of the black chess box BS and the white chess box WS alternately, and determine the position of the chess piece according to the header element taken from the index sequence IS;

[0036] Step 4: Pick up the pieces: Determine whether the opponent's or your own pieces are picked up according to the basic rules of Go, and put the picked up pieces into the corresponding chess boxes according to the supplementary rules;

[0037] Step 5, complete the chess game: repeat steps 3 and 4 until all elements in the index sequence IS have been used to determine the spatial position of the chess piece;

[0038] Step 6, fill the chessboard: fill the empty spaces on the chessboard from top to bottom and from left to right with the remaining chess pieces in the black chess box BS and the white chess box WS in the order of black chess priority;

[0039] Step 7, obtaining a scrambled two-dimensional image matrix: rearrange the pixel points of the image matrix O according to the spatial positions of the chess pieces on the Go board to generate a scrambled image matrix O1;

[0040] According to the element values ​​in the image matrix O1, the pixels of the three image channels of the plaintext image P are rearranged to obtain the scrambled image matrix P1.

[0041] Preferably, in the process of picking up a chess piece in step 4, basic rule 4 is used to determine whether an opponent's or one's own chess piece is picked up, and the picked up chess piece is placed in a corresponding chess box according to supplementary rule 3;

[0042] In step 2, the chaotic sequence CSA is arranged in ascending order, and the positions of the chess pieces are:

[0043]

[0044] Among them, IS(i) is the element value of the i-th element of the index sequence IS, mod() is the modulo function, M is the number of rows of the image matrix P, row(i) and col(i) are the row coordinates and column coordinates of the chess piece's placement position, respectively. Indicates rounding up, i=1,2,…,M×N.

[0045] Preferably, the three RGB channels of the image matrix P1 are regarded as a three-dimensional cube composed of three image planes, and the three-dimensional zigzag extraction starts from the first image plane, and pixel points are extracted across the planes in sequence according to the two-dimensional zigzag extraction order; after completing one round of two-dimensional zigzag extraction across planes, pixel points are extracted across planes in the same way starting from the next image plane until three rounds of extraction are completed, thereby realizing the three-dimensional zigzag extraction of the three channels of the color image;

[0046] The method for determining the image channel sequence of the image matrix P1 is as follows: the first elements of the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD are arranged in ascending order to obtain an index sequence containing three elements, and the three image channels R, G, and B of the image matrix P1 are arranged according to the index sequence to determine the image channel sequence;

[0047] The method for determining the zigzag extraction starting point of each image channel of the image matrix P1 is as follows: according to processing the second and third elements of the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD as integers, the processed second element and the third element form a set of coordinates; the three sets of coordinates represent the starting points of the zigzag extraction in the three image channels of R, G, and B respectively;

[0048] The method for obtaining the image matrix P2 is as follows: a zigzag extraction method is selected according to an external secret key e6, and the three image channel matrices of the image matrix P1 are reconstructed in combination with a determined zigzag extraction starting point, and the reconstructed image channels are arranged in a determined image channel order to obtain the image matrix P2; the image matrix P2 is extracted using a three-dimensional zigzag extraction method to obtain an image sequence S containing all pixel value components.

[0049] Preferably, the set of coordinates is

[0050]

[0051] Where, j = 1, 2, 3, CS1, CS2, CS3 represent the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD respectively. is the coordinate of the zigzag starting point, M and N are the number of rows and columns of the image channel respectively;

[0052] The two-dimensional zigzag extraction method is as follows: by reconstructing the image matrix, the starting point of the zigzag extraction is extended to any position in the matrix, and the selected starting point is reconstructed to any corner point, the pixel points after the starting point in the original image are arranged in sequence, and the pixel points before the starting point are arranged in sequence starting from the first pixel point, so as to obtain a reconstructed image matrix;

[0053] The method obtained from the chaotic sequences CSB, CSC and CSD is:

[0054]

[0055] Wherein, i=1,2,3…,M×N; CSB(i), CSC(i), CSD(i), PSB(i), PSC(i), PSD(i) are the i-th element values ​​of the chaotic sequence CSB, the chaotic sequence CSC, the chaotic sequence CSD, the processed chaotic sequence PSB, the chaotic sequence PSC, and the chaotic sequence PSD respectively; Indicates a round-down operation; the hth element value of the pseudo-random sequence PS:

[0056]

[0057] The bidirectional diffusion method is: forward diffusion is performed on the image sequence S to obtain a sequence S1:

[0058]

[0059] Perform reverse diffusion on sequence S1 to obtain the diffused sequence S2:

[0060]

[0061] in, Represents the XOR operation, h=1,2,3…,M×N×3.

[0062] Beneficial effects of the invention: The invention proposes a four-dimensional hyperchaotic system with a single attractor and applies it to image encryption; the four-dimensional hyperchaotic system not only has a wide range of hyperchaotic characteristics, but also exhibits stable hyperchaotic behavior when parameters change. The complex chaotic behavior of the four-dimensional hyperchaotic system is verified by dynamic analysis, sensitivity analysis and randomness test, which can provide a sufficiently sensitive and random pseudo-random sequence, and its Kaplan-Yorke dimension can reach 3.7591. Based on the four-dimensional hyperchaotic system, a color image encryption method combining Go rule scrambling and three-dimensional zigzag diffusion is proposed. The Go rules are introduced to enhance the sensitivity to the changes in the chaotic sequence and reduce the risk of the encryption method being cracked due to the reconstruction of the hyperchaotic system; the proposed three-dimensional zigzag extraction method is used to enhance the correlation between different channels of the color image while effectively destroying the correlation between pixels in the same channel. Experimental results show that the encryption method of the present invention can effectively resist brute force attacks, statistical analysis attacks and differential attacks, and has good robustness, and is suitable for color image encryption with high security requirements. The main contributions of the invention are:

[0063] (1) A new four-dimensional hyperchaotic system is proposed, which has good chaotic complexity and a wide range of parameter variations. The hyperchaotic system has only one chaotic attractor, which ensures good chaotic complexity while making the calculation relatively simple. Through dynamic analysis and randomness test, it is proved that the sequence generated by the hyperchaotic system exhibits good randomness and is very suitable for image encryption.

[0064] (2) A scrambling method based on the rules of Go is proposed, which can fully destroy the correlation of pixels and has high sensitivity to chaotic sequences. The introduction of the rules of Go makes the scrambling process varied. Even if only a few elements of the chaotic sequence are changed, the scrambling results will be quite different, which effectively reduces the risk of ciphertext images being cracked due to the reconstruction of the chaotic system.

[0065] (3) A three-dimensional zigzag extraction method is proposed, which can not only establish the association between different image planes, but also fully destroy the correlation between pixels in the same plane. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 It is a flow chart of the present invention.

[0068] Figure 2 It is a schematic diagram of the Qi of the Go piece of the present invention.

[0069] Figure 3 Schematic diagram of different zigzag extraction methods of the present invention.

[0070] Figure 4 This is a schematic diagram of the image matrix reconstructed according to the present invention.

[0071] Figure 5 It is the phase diagram of the four-dimensional hyperchaotic system of the present invention, wherein (a) is the xzw space phase diagram, (b) is the zw plane phase diagram, (c) is the xyw space phase diagram, (d) is the xw plane phase diagram, (e) is the xz plane phase diagram, and (f) is the xy plane phase diagram.

[0072] Figure 6 Graphs of Lyapunov exponents under different parameters of the four-dimensional hyperchaotic system of the present invention, wherein (a) is a=176, b=15, (b) is a∈[130,180], b=15, (c) is a=176, b∈[-25,25], and (d) is a∈[1000,1500], b=15.

[0073] Figure 7 Graphs of the maximum Lyapunov exponent of the four-dimensional hyperchaotic system of the present invention, wherein (a) is a two-dimensional contour graph and (b) is a three-dimensional grid graph.

[0074] Figure 8 It is a sensitivity curve diagram of the initial value of the four-dimensional hyperchaotic system of the present invention, wherein (a) is the sensitivity test result of the x sequence with respect to the initial state parameter x0, (b) is the sensitivity test result of the y sequence with respect to the initial state parameter y0, (c) is the sensitivity test result of the z sequence with respect to the initial state parameter z0, (d) is the sensitivity test result of the w sequence with respect to the initial state parameter w0, (e) is the sensitivity test result of the z sequence with respect to the control parameter a, and (f) is the sensitivity test result of the w sequence with respect to the control parameter b.

[0075] Fig. 9 This is an example diagram of the mapping and position number relationship between the image matrix and Go of the present invention.

[0076] Fig.10 This is a process diagram of an example of scrambling based on Go rules of the present invention.

[0077] Fig.11 This is an example diagram of the three-dimensional zigzag extraction of the present invention.

[0078] Fig.12 Process diagram for an example of 3D zigzag extraction for a 3×4 image matrix.

[0079] Fig.13 These are the encryption results and decryption results of the present invention, wherein (a) is the plaintext image of image 4.1.05, (b) is the ciphertext image of image 4.1.05, (c) is the decrypted image of image 4.1.05, (d) is the plaintext image of image 4.1.06, (e) is the ciphertext image of image 4.1.06, (f) is the decrypted image of image 4.1.06, (g) is the plaintext image of image 4.1.08, (h) is the ciphertext image of image 4.1.08, and (i) is the decrypted image of image 4.1.08.

[0080] Fig.14 This is an example diagram of the key sensitivity test of the present invention, where (a) is the correct key and (b) is the external key e1+10 -15 perturbation, (c) is the external key e2+10 -15 Perturbation, (d) is the external key e3+10 -15 Perturbation, (e) is the external key e4+10 -15 Disturbance.

[0081] Fig.15 is the histogram comparison of the present invention, wherein (a) is the plaintext image of image 4.1.05, (b) is the R channel histogram of the plaintext image 4.1.05, (c) is the G channel histogram of the plaintext image 4.1.05, (d) is the B channel histogram of the plaintext image 4.1.05, (e) is the ciphertext image of image 4.1.05, (f) is the R channel histogram of the ciphertext image 4.1.05, (g) is the G channel histogram of the ciphertext image 4.1.05, (h) is the B channel histogram of the ciphertext image 4.1.05, (i) is the plaintext image of image 4.1.06, (j) is the R channel histogram of the plaintext image 4.1.06, (k) is the G channel histogram of the plaintext image 4.1.06, and (l) is the plaintext image of 4.1.06. B channel histogram, (m) is the ciphertext image of image 4.1.06, (n) is the R channel histogram of the ciphertext image 4.1.06, (o) is the G channel histogram of the ciphertext image 4.1.06, (p) is the B channel histogram of the ciphertext image 4.1.06, (q) is the plaintext image of image 4.1.08, (r) is the R channel histogram of the plaintext image 4.1.08, (s) is the G channel histogram of the plaintext image 4.1.08, (t) is the B channel histogram of the plaintext image 4.1.08, (u) is the ciphertext image of image 4.1.08, (v) is the R channel histogram of the ciphertext image 4.1.08, (w) is the G channel histogram of the ciphertext image 4.1.08, (x) is the B channel histogram of the ciphertext image 4.1.08.

[0082] Fig.16Correlation comparison diagram of adjacent pixel points, among which, (a) is the horizontal correlation of 4.1.05 plaintext image, (b) is the vertical correlation of 4.1.05 plaintext image, (c) is the diagonal correlation of 4.1.05 plaintext image, (d) is the horizontal correlation of 4.1.05 ciphertext image, (e) is the vertical correlation of 4.1.05 ciphertext image, (f) is the diagonal correlation of 4.1.05 ciphertext image, (g) is the horizontal correlation of 4.1.06 plaintext image, (h) is the vertical correlation of 4.1.06 plaintext image, (i) is the diagonal correlation of 4.1.06 plaintext image, (j) is the horizontal correlation of 4.1.06 ciphertext image, (k) is the vertical correlation of 4.1.06 ciphertext image, and (l) is the diagonal correlation of 4.1.06 ciphertext image.

[0083] Fig.17 Image 4.1.05 and the original image and encrypted image after changing one pixel value, where (a) is the original image of image 4.1.05, (b) is the encrypted image of (a), (c) is the image after changing image 4.10.5, and (d) is the encrypted image of (c).

[0084] Fig.18 The images after noise interference and the decrypted images, where (a) is the salt and pepper noise with an intensity of 0.01, (b) is the salt and pepper noise with an intensity of 0.05, (c) is the salt and pepper noise with an intensity of 0.1, (d) is the decrypted image of (a), (e) is the decrypted image of (b), and (f) is the decrypted image of (c).

[0085] Fig.19 Figure 3 shows the shearing attacks and their decrypted images, where (a) is 1 / 16 shearing, (b) is 1 / 8 shearing, (c) is 1 / 4 shearing, (d) is 1 / 2 shearing, (e) is the decrypted image of (a), (f) is the decrypted image of (b), (g) is the decrypted image of (c), and (h) is the decrypted image of (d). DETAILED DESCRIPTION

[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0087] like Figure 1As shown in the figure, a color image encryption method based on a single attractor hyperchaotic system and Go rules is presented, including key design and chaotic sequence generation, a scrambling method based on Go rules, and a diffusion method based on three-dimensional zigzag extraction. The color plaintext image P of size M×N×3 and the external key E={e1,e2,e3,e4,e5,e6} are input, and the ciphertext image C is output. The complete encryption process is as follows:

[0088] Step 1: Obtain chaotic sequence: Obtain the scrambled initial value {x0, y0, z0, w0} from the plaintext image P and the external key {e1, e2, e3, e4}, and substitute the scrambled initial value {x0, y0, z0, w0} into the hyperchaotic system and combine it with the external key {e5} to obtain four chaotic sequences CSA, CSB, CSC and CSD.

[0089] The key of image encryption plays a vital role in the entire encryption process. For the plaintext image P, the SHA-256 algorithm is used to generate a hash value, and the hash value is divided into groups of 8 bits to obtain the internal key K = {k1, k2, ..., k 32}. This internal key is combined with the external key E = {e1, e2, e3, e4, e5, e6} agreed upon in advance by the encryption and decryption parties to form the final encryption key. The value range of the external key {e1, e2, e3, e4} is (0, 1), the value range of the external key {e5} is {1000, 1001, …, 5000}, and the value range of the external key {e6} is {1, 2, …, 8}.

[0090] According to formula (1), for the internal key K = {k1, k2, ..., k 32} and scramble it with the external key {e1, e2, e3, e4} to obtain the initial value of the hyperchaotic system {x0, y0, z0, w0}. This process ensures the security of the key and the randomness of the generated chaotic sequence, providing the necessary basis for the subsequent encryption process.

[0091]

[0092] in, Represents the exclusive-or operation.

[0093] Substitute the initial values ​​{x0, y0, z0, w0} into the proposed hyperchaotic system and calculate the (e5+M×N) iteration results. To avoid transient errors, the first e5 iteration results are discarded. Finally, four chaotic sequences of length M×N are obtained, which are denoted as CSA, CSB, CSC and CSD.

[0094] The hyperchaotic system is a proposed four-dimensional hyperchaotic system with a single attractor, and is analyzed through phase diagrams, Lyapunov exponents, Kaplan-Yorke dimensions, dissipativeness and equilibrium points, initial value sensitivity, and NIST tests.

[0095] The mathematical expression of the proposed four-dimensional hyperchaotic system with a single attractor is shown in equation (2). When the control parameters a = 176 and b = 15, the partial phase diagram of the hyperchaotic system is shown in Figure 5 shown.

[0096]

[0097] Among them, x, y, z and w are state parameters, and are the derivatives of the state parameters x, y, z and w respectively, and a and b are the control parameters.

[0098] The Lyapunov exponent (LE) represents the average separation or contraction rate of adjacent orbits in phase space and is usually used to quantitatively judge the dynamic characteristics of a system. When the maximum LE is a positive number, the system is considered to be a chaotic system; when the system has at least two positive LEs, the system is considered to be a hyperchaotic system.

[0099] Wolf's LE calculation method is used to conduct LE analysis experiments on the proposed four-dimensional hyperchaotic system, and the initial state parameters are set to (x0, y0, z0, w0) = (2, 2, 2, 2). Figure 6 As shown in (a), when the control parameters a = 176, b = 15, the calculated Lyapunov exponent values ​​are LE1 = 3.1583, LE2 = 0.1336, LE3 = -0.1379, LE4 = -4.1547. There are two positive LEs, indicating that the system is in a hyperchaotic state. Figure 6 As shown in (b), within the range of control parameters a∈[130,180], b=15, the four-dimensional hyperchaotic system always has two positive LEs, indicating that the system is in a hyperchaotic state. Figure 6 (d) shows that when the control parameter a>0, the four-dimensional hyperchaotic system maintains a hyperchaotic state within a larger parameter range, and as the control parameter a increases, the positive LE gradually increases, showing a more complex chaotic behavior. Figure 6 As shown in (c), within the range of control parameters a=176, b∈[-25,25], the LE of the four-dimensional hyperchaotic system changes relatively smoothly except for a significant change when b=0, and the system is always in a hyperchaotic state during the change of parameter b.

[0100] In order to more comprehensively observe the influence of the changes of control parameters a and b on the chaotic state of the system, the dual-parameter two-dimensional contour map and three-dimensional grid map of the system's maximum Lyapunov exponent were used for analysis. The results are shown in Figure 7 As shown. It can be seen that within the range of control parameters a∈[130,180], b∈[-25,25], the four-dimensional hyperchaotic system always has a positive maximum Lyapunov exponent, indicating that the system is always in a chaotic state.

[0101] The Kaplan-Yorke dimension is used to measure the complexity of a four-dimensional hyperchaotic system. The closer the result is to the dimension of the system, the stronger the fractal nature of the chaotic attractor. The calculation formula is shown in formula (3).

[0102]

[0103] Among them, k is satisfied The maximum value of LE k+1 Represents the k+1th Lyapunov exponent value.

[0104] When the control parameters a = 176, b = 15, the Lyapunov exponents of the four-dimensional hyperchaotic system are LE1 = 3.1583, LE2 = 0.1336, LE3 = -0.1379, LE4 = -4.1547, which are substituted into formula (3), we can get

[0105] Table 1 shows the comparison of the Lyapunov exponent and Kaplan-Yorke dimension of the proposed four-dimensional hyperchaotic system with other four-dimensional chaotic systems. Ref. [1] comes from the literature [S. Yan, L. Li, W. Zhao, & B. Gu (2023). Design of a new four-dimensional chaotic system and its application to color image encryption. Nonlinear Dynamics, 111 (18), 17519-17545.], Ref. [2] comes from the literature [Y. Yang, L. Wang, S. Duan, & L. Luo (2021). Dynamical analysis and image encryption application of a novel memristive hyperchaotic system. Optics & Laser Technology, 133, 106553.], Ref. [3] comes from the literature [L H Gong, H X Luo, R Q Wu, & N. R. Zhou (2022). New 4D chaotic system with hidden attractors and self-excited attractors and its application in image encryption based on RNG.Physica A:Statistical Mechanics and its Applications,591,126793.]. The results show that the proposed four-dimensional hyperchaotic system has more obvious hyperchaotic characteristics and significant Kaplan-Yorke dimension. The above analysis shows that the four-dimensional hyperchaotic system is in a hyperchaotic state within a fairly large range of parameter changes, and the chaotic characteristics of the four-dimensional hyperchaotic system change relatively smoothly under different parameter selections. Therefore, the four-dimensional hyperchaotic system can not only provide complex chaotic sequences, but also has a fairly large parameter selection interval, which is very suitable for image encryption.

[0106] Table 1 Comparison of Lyapunov index and Kaplan-Yorke dimension

[0107]

[0108] The chaotic attractor is the result of the combined effect of global stability and local instability. The global stability is manifested as dissipation, while the local instability is manifested as an unstable equilibrium point. Substituting the proposed four-dimensional hyperchaotic system into equation (4) to calculate the dissipation, we get It can be seen that the system is always dissipative.

[0109]

[0110] When the control parameters a = 176, b = 15, solving equation (5) yields the unique equilibrium point of the four-dimensional hyperchaotic system as E = (0, 0, 0, 0).

[0111]

[0112] When the control parameters a=176, b=15 are calculated, the Jacobian matrix of the four-dimensional hyperchaotic system is shown in formula (6).

[0113]

[0114] Substituting the equilibrium point E into equation (6), we can obtain its eigenvalue vector λ = (-1, -1, 0.5-13.2571i, 0.5 + 13.2571i). Since the real part of the eigenvalue vector λ is positive, the equilibrium point E is an unstable equilibrium point. Under the combined effect of the overall stability and the local instability caused by the equilibrium point E, the proposed four-dimensional hyperchaotic system generates a single chaotic attractor at the equilibrium point E, making the system present a chaotic state.

[0115] In order to visualize the initial value sensitivity of the chaotic system, the system parameters are slightly perturbed and the chaotic sequences obtained before and after the perturbation are compared. First, the control parameters of the chaotic system are set to a = 176, b = 15, and the initial state parameters (x0, y0, z0, w0) = (2, 2, 2, 2) are substituted to obtain the initial chaotic sequence. Then, 10 -15 or a disturbance of 10 on one of the control parameters. -13 The new chaotic sequence is obtained by resolving the perturbation. Figure 8 As shown, it can be seen that the initial chaotic sequence and the chaotic sequence after the disturbance are separated rapidly, indicating that the proposed four-dimensional hyperchaotic system has excellent initial value sensitivity and is suitable for image encryption.

[0116] In order to verify the randomness of the sequence generated by the proposed four-dimensional hyperchaotic system for image encryption, the randomness test suite NIST-SP800-22r1a is used to test the chaotic sequence. The test suite includes fifteen sub-tests. When the result of each sub-test is greater than 0.01, it can be considered that the chaotic sequence has passed the randomness test.

[0117] Since the input sequence of the randomness test suite NIST-SP800-22r1a is a 0-1 sequence, equation (7) is used to process the generated chaotic sequence.

[0118]

[0119] Where s is the unprocessed chaotic sequence, l is the processed chaotic sequence, and mod() is the modulus function.

[0120] By solving the four-dimensional hyperchaotic system and processing the generated chaotic sequence with equation (7), we obtain a sequence l containing 30 subsequences, each with a length of 1000000. As shown in Table 2, the test results of inputting the chaotic sequence l into the NIST-SP800-22r1a test suite show that the chaotic sequence l passes all subtests. Therefore, the proposed four-dimensional chaotic system has sufficient randomness and can be applied to image encryption.

[0121] Table 2 NIST-SP800-22r1a test

[0122]

[0123] Step 2: Implement scrambling based on Go rules: The chaotic sequence CSA is combined with the Go rules to obtain the position coordinates of each pixel in the plaintext image P after scrambling, and the three image channels of the plaintext image P are rearranged according to the position coordinates to obtain the scrambled image matrix P1.

[0124] Go is one of the oldest board games in the world. Its board is made up of 19 horizontal lines and 19 vertical lines, with a total of 361 intersections. The chess pieces are divided into black and white, and are stored in the black chess box and the white chess box respectively. The basic rules of Go are as follows:

[0125] Basic rule 1: The black player moves first. The black and white players take turns taking pieces from the box and placing them at the intersections. Only one piece can be placed at a time.

[0126] Basic Rule 2: The number of empty intersections in the horizontal and vertical directions adjacent to a piece determines the "liberty" of the piece.

[0127] Basic Rule 3: If there are your own pieces at adjacent intersections in the horizontal and vertical directions, these pieces are considered as a whole and have the same destiny.

[0128] Basic Rule 4: When a piece's Qi reaches 0, it needs to be lifted.

[0129] Figure 2The chi of black pieces of varying numbers and positions is shown, with one black piece being completely surrounded by white pieces, causing its chi to drop to 0, before being lifted up and placed back into the black chess box.

[0130] In order to more effectively apply the Go rules to image encryption, the present invention adds the following three rules:

[0131] Supplementary Rule 1: The size of the Go board varies with the size of the image to be encrypted. For example, when an image of size 256×256 needs to be encrypted, the corresponding Go board is a grid structure formed by the intersection of 256 horizontal lines and 256 vertical lines, with a total of 65536 intersections.

[0132] Supplementary Rule 2: Black and white pieces are stored in the black and white chess boxes respectively according to the data structure of the linear list. The top of the chess box is the head of the linear list, and the bottom is the tail of the linear list.

[0133] Supplementary Rule 3: When a chess piece is lifted, if there is only one chess piece lifted, it will be placed at the top of the chess box of the corresponding color; if there are more than one chess piece lifted, they will be lifted in order from top to bottom and from left to right and placed at the bottom of the chess box of the corresponding color.

[0134] Through the above basic rules and supplementary rules, the complexity and flexibility of Go are introduced into the image encryption process, further enhancing the security and anti-attack capabilities of encryption.

[0135] The rules of Go are introduced into the scrambling part of image encryption, and the diversity of Go changes is used to overcome the limitations of scrambling based on chaotic sequences. By mapping Go and images to each other, and combining the basic rules and supplementary rules of Go, image scrambling is achieved. Fig. 9 As shown in Figure 1, the spatial distribution of pixels in a two-dimensional image can be mapped to the distribution of intersections on a Go board, and the pixels of the image can be mapped to Go pieces. The pixels (Go pieces) of the image are numbered in order from top to bottom and from left to right, and the position numbers of the two-dimensional space of the image (the intersections of the board) are obtained accordingly.

[0136] The spatial position of the scrambled image pixels can be regarded as the spatial position of the chess pieces on the Go board. The chaotic sequence is used to determine the placement of the chess pieces. After the game is over, the remaining chess pieces in the chess box are filled into the blank spaces on the chessboard in order to complete the scrambling of the image.

[0137] For an image matrix O of size M×N, the specific steps are as follows:

[0138] Step 1: Initialize the chess box: Press Fig. 9The spatial distribution of the pixels of the two-dimensional image shown in the figure has a positional serial relationship with the distribution of the intersection points of the Go board. The pixel points of the image matrix O are extracted from small to large, and the odd-numbered pixels are placed in the black chess box BS in sequence as black chess pieces, and the even-numbered pixels are placed in the white chess box WS in sequence as white chess pieces.

[0139] Step 2: Get the chess piece position. According to formula (8), the chaotic sequence CSA is sorted to obtain the index sequence IS = {IS (1), IS (2), ..., IS (M × N)} of the chaotic sequence CSA. According to the element value of the index sequence IS (corresponding to Fig. 9 The position number relationship of the chess piece is used to determine the position of the chess piece, that is, the row and column position of the image matrix shown in formula (9).

[0140] IS=sort(CSA), (8)

[0141]

[0142] Among them, sort() is a function that returns an index sequence in ascending order, mod() is a modulo function, M is the number of rows of the image matrix O, row and col are the row and column coordinates of the matrix corresponding to the index sequence IS, respectively, and i=1,2,…,M×N.

[0143] Step 3: Move the chess piece. Starting from the black chess box BS, alternately take out chess pieces from the top of the black chess box BS and the white chess box WS. Determine the position of the chess piece based on the header element taken from the index sequence IS at this time.

[0144] Step 4: Pick up the pieces. According to the basic rule 4 of Go, determine whether the opponent's or your own pieces have been picked up, and put them into the corresponding box according to the supplementary rule 3.

[0145] Step 5: Complete the chess game. Repeat steps 3 and 4 until all elements in the index sequence IS have been used to determine the spatial position of the chess piece.

[0146] Step 6: Fill the board. Use the remaining pieces in the black chess box BS and the white chess box WS to fill the empty spaces on the board from top to bottom and from left to right, in the order of black chess first.

[0147] Step 7: Obtain the scrambled image matrix. Arrange the pixels of the original image matrix O according to the spatial positions of the chess pieces on the final chessboard to generate the scrambled image matrix O1.

[0148] For ease of understanding, the scrambling process is described in detail using a 4×4 image matrix as an example. Fig.10 As shown, in the example, according to the mapping relationship, it is assumed that the Go pieces fall inside the board grid rather than on the intersection.

[0149] exist Fig.10In the figure, the gray pixels represent black pieces, the white pixels represent white pieces, and the yellow grid represents no pieces. The initial black chess box BS (1, 3, 5, 7, 9, 11, 13, 15) and the white chess box WS (2, 4, 6, 8, 10, 12, 14, 16) are extracted from the original image matrix O, and the index sequence IS (8, 7, 15, 9, 5, 12, 13, 14, 2, 16, 11, 1, 4, 10, 3, 6) is obtained from the chaotic sequence CSA. First, the black piece '1' is taken out from the top of the black chess box, and according to the header element '8' taken out of the index sequence IS, the black piece '1' is placed at the position with the chessboard index of 8. Then, the white piece '2' is taken out from the top of the white chess box, and its position is determined according to the header element '7' of the index sequence IS at this time. The black and white sides alternately place their pieces, and after each placement, it is necessary to determine whether the opponent's or their own pieces are lifted. For example Fig.10 As shown in the matrix M1 in , when the white chess piece '8' falls, the black chess piece '7' has a Qi of 0, and the black chess piece '7' is lifted and placed at the head of the black chess box BS, obtaining the matrix M2. The black and white sides continue to alternately place their pieces until the black chess piece '9' falls, and the white chess pieces '6' and '10' have a Qi of 0, as shown in the matrix M3. The white chess pieces '6' and '10' are lifted up and placed at the end of the white chess box WS in turn to obtain the matrix M4. Then, as shown in the matrix M5, when the white chess piece '12' is placed at the position with the serial number 1 on the chessboard, it is lifted up and placed at the head of the WS because its own Qi is 0, obtaining the matrix M6. As shown in the matrix M7, when all the index elements in the index sequence IS are used up, there are still 4 vacancies on the chessboard, there is still one chess piece in the black chess box BS, and there are still three chess pieces in the white chess box WS. According to the order of black chess priority, fill in the empty positions on the chessboard from top to bottom and from left to right in turn, and obtain the final scrambled image matrix O1.

[0150] The scrambling method based on Go rules is fully sensitive to chaotic sequences. When part of the chaotic sequence changes, the corresponding chess piece's position will also change, and this change in the position of individual chess pieces will affect the final position of all chess pieces, thereby reducing the risk of the encryption scheme being cracked due to the reconstruction of the chaotic system.

[0151] Step 3: Implement bidirectional diffusion based on three-dimensional zigzag extraction: Determine the image channel order of the image matrix P1, the zigzag extraction starting point of each image channel, and the zigzag extraction order of the two-dimensional plane selected by the external key {e6} according to the chaotic sequences CSB, CSC and CSD to reconstruct the image matrix P1, and obtain the image matrix P2; implement three-dimensional zigzag extraction of the image matrix P2 to obtain the image sequence I. The pseudo-random sequence PS obtained by the chaotic sequences CSB, CSC and CSD is used as a mask to implement bidirectional diffusion of the image sequence I to obtain the sequence I1.

[0152] Zigzag transformation is a commonly used image encryption scrambling technique that confuses the image by changing the spatial position of pixels. Zigzag extraction is the key step in this transformation process. It extracts pixels from a two-dimensional plane image in a "Z"-shaped order to obtain a scrambled pixel sequence. Zigzag extraction can start from any corner point of the image rectangle, and each corner point has two possible starting directions. Figure 3 As shown, for an image matrix, there are a total of 8 different zigzag extraction methods.

[0153] Zhang proposed an improved two-dimensional zigzag transformation, which can extend the starting point of zigzag extraction to any position in the matrix by reconstructing the image matrix. The present invention further expands on this basis, so that the selected starting point can be reconstructed to any corner point, thereby supporting 8 different zigzag extraction methods. Figure 4 This is an example of reconstructing an arbitrarily selected starting point to the upper right corner point, where the arbitrarily selected starting point is marked in blue, the pixels after the starting point of the original image are arranged in sequence, and the pixels before the starting point are arranged in sequence starting from the first pixel to obtain the reconstructed image matrix.

[0154] The classic 2D zigzag extraction method cannot effectively destroy the correlation between adjacent pixels and is limited to a single image channel, which cannot correlate different channels of color images. Although the existing 3D zigzag extraction method can correlate pixel value components between different channels, it fails to fully destroy the correlation of pixels within the same channel, which may make the ciphertext image vulnerable to statistical analysis attacks.

[0155] The present invention proposes a new three-dimensional zigzag extraction method, which can not only fully correlate the pixel value components between different channels, but also increase the complexity of the correlation of pixels in the same channel. By applying this method to pixel value diffusion, it is possible to achieve full diffusion of pixel value components between different channels of a color image.

[0156] like Fig.11 As shown, Figure 3 Taking the two-dimensional zigzag extraction method in (a) as an example, a schematic diagram of the three-dimensional zigzag extraction method is given. Without loss of generality, the three RGB channels of the color image can be regarded as a three-dimensional cube composed of three image planes. The three-dimensional zigzag extraction starts from the first image plane and extracts pixels across planes in sequence according to the two-dimensional zigzag extraction order. After completing one round of cross-plane two-dimensional zigzag extraction, start from the next image plane and extract pixels across planes in the same way until three rounds of extraction are completed, thereby realizing the three-dimensional zigzag extraction of the color RGB image.

[0157] For a better understanding, Fig.12As shown in the figure, a 3×4 image matrix is ​​used as an example to illustrate the 3D zigzag extraction process. Figure 3 The 2D zigzag extraction method in (a) is used for 3D zigzag. First, starting from the first image plane (red channel), the red component of pixel '1' is extracted. Secondly, according to Figure 3 According to the extraction order of (a), pixel '2' needs to be extracted. Since each extraction must cross the plane in sequence, the green component of pixel '2' can be extracted in the end. Extract in sequence in the above manner until the blue component of pixel '12' is extracted, and the pixel value component of the last pixel in the two-dimensional zigzag extraction order is extracted. Then, starting from the second image plane (green channel), extract according to the same rules until the red component of pixel '12' is extracted. Finally, starting from the third image plane (blue channel), extract according to the same rules until the green component of pixel '12' is extracted, completing the three-dimensional zigzag extraction and obtaining the corresponding pixel value component sequence.

[0158] For an image matrix P1 of size M×N×3, the specific steps are as follows:

[0159] Step 1): Determine the order of image channels: Arrange the first elements of the chaotic sequences CSB, CSC, and CSD in ascending order to obtain an index sequence containing three elements. Arrange the three image channels R, G, and B of the image matrix P1 according to the index sequence to determine the order of image channels during diffusion.

[0160] Step 2): Determine the starting point of zigzag extraction: According to formula (10), the second and third elements of the chaotic sequences CSB, CSC, and CSD are processed to obtain three sets of coordinates. These three sets of coordinates represent the starting points of zigzag extraction in the three image channels of R, G, and B, respectively.

[0161]

[0162] Where, j = 1, 2, 3, CS1, CS2, CS3 represent the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD respectively. is the coordinate of the zigzag starting point, M and N are the number of rows and columns of the original image respectively.

[0163] Step 3): 3D zigzag extraction: select according to external key e6 Figure 3 The zigzag extraction method shown is combined with the zigzag extraction starting point determined in step 2) to reconstruct the three image channel matrices of the image matrix P1. The reconstructed image channels are arranged in the order determined in step 1) to obtain the image matrix O''; the image matrix O'' is extracted using a three-dimensional zigzag extraction method to obtain a one-dimensional sequence S containing all pixel value components.

[0164] Step 4): Bidirectional diffusion: According to equations (11) and (12), the chaotic sequences CSB, CSC, and CSD are processed to obtain the pseudo-random sequence PS for bidirectional diffusion. Bidirectional diffusion first uses equation (13) to perform forward diffusion on the one-dimensional sequence S to obtain sequence S1. Then, according to equation (14), sequence S1 is reversely diffused to obtain the diffused sequence S2, i.e., sequence I1.

[0165]

[0166] Among them, i=1,2,3…,M×N.

[0167]

[0168] Among them, i=1,2,3…,M×N×3.

[0169] Step 4: Put the sequence I1 back into the three-dimensional image matrix according to the extraction order of the three-dimensional zigzag to obtain the ciphertext image C, and complete the image encryption.

[0170] After the bidirectional diffusion is completed, the diffused image matrix O2 is obtained. Sequence S2 is put back into the three-dimensional image matrix according to the three-dimensional zigzag extraction order determined in step 3) to obtain the image matrix O2, i.e., the ciphertext image C, and the whole diffusion process is completed.

[0171] The proposed encryption method is simulated using Matlab2022a, and the results are compared and analyzed. The experiment selects three 256×256 color images from the University of Southern California image database, 4.1.05, 4.1.06, and 4.1.08, respectively. Fig.13 (a), (d), (g) in the experiment. The setting value of the external key E = {e1, e2, e3, e4, e5, e6} is E = {0.0001, 0.001, 0.0001, 0.01, 1000, 2}. Fig.13 As shown in the figure, the ciphertext image loses its visual meaning and the image information cannot be directly obtained. At the same time, the decrypted image can completely restore the plaintext image information, showing a good encryption and decryption effect.

[0172] To effectively resist brute force attacks, Alvarez suggested that the key space κ>2 100 ≈10 30 The internal key K of the present invention is K={k1, k2, ..., k 32}Generated by SHA-256 algorithm, key space size is 2 256 The value range of the external key {e1, e2, e3, e4} is (0, 1). Under the premise of ensuring the accuracy of computer calculation, the key space size is 10 60The value ranges of the external key {e5,e6} are {1000,1001,…,5000} and {1,2,…,8} respectively, so the key space size of the external key E = {e1,e2,e3,e4,e5,e6} is 10 60 +5008. In summary, the key space size of the encryption scheme is κ=2 256 +10 60 +5008>2 100 , which can effectively resist brute force attacks.

[0173] To test the sensitivity of the key, Fig.14 As shown in the figure, the correct key is used and 10 is imposed on the external key {e1, e2, e3, e4}. -15 Decryption results of the wrong key after perturbation. The results show that the key structure has good sensitivity and the image cannot be successfully decrypted even if the wrong key differs slightly from the correct key.

[0174] Fig.15 The pixel value distribution of different channels of the plaintext image and the ciphertext image is shown in Figure 2. It can be seen that the pixel value distribution of the plaintext image is uneven, while the pixel value distribution of the ciphertext image is even. Even pixel value distribution helps to hide the information in the image and reduce the risk of being cracked.

[0175] In order to quantitatively analyze the distribution of different pixel values ​​in the ciphertext image, the χ 2 The ciphertext image is analyzed by the test. Formula (15) is 2 The smaller the calculation result, the more uniform the pixel value distribution. When the calculation result is less than the critical value 284.3359 under the condition of significance level α = 0.1, the image can be considered to have passed the χ 2 As shown in Table 3, each channel of the experimental image has passed the χ 2 The inspection shows that the pixel values ​​of the ciphertext image are evenly distributed and have good security.

[0176]

[0177] Among them, O i is the number of times pixel value i appears in the image, E i =(M×N) / 256 is the expected number of times pixel value i appears.

[0178] Table 3x 2 test

[0179]

[0180] Correlation analysis of adjacent pixels is an important indicator for evaluating the performance of image encryption schemes. Taking images 4.1.05 and 4.1.06 as examples, 10,000 pairs of adjacent pixels were randomly selected in the horizontal, vertical and diagonal directions of the plaintext image and the ciphertext image, and the correlation between them was analyzed. The experimental results are shown in Figure 2. Fig.16 As shown, it can be seen that the ciphertext image effectively eliminates the strong correlation between adjacent pixels on each image channel.

[0181] In order to quantify the experimental results, the correlation coefficients of adjacent pixels are calculated using formula (16), and the results are shown in Table 4. The correlation coefficients of each channel of the ciphertext image are close to 0, which effectively reduces the risk of being cracked due to redundant information.

[0182]

[0183] Among them, x and y are the pixel values ​​of adjacent pixels, and D(x) and D(y) are the variances of x and y, respectively.

[0184] Shannon entropy is an effective method to measure the randomness and uncertainty of information, and its definition is shown in formula (17). For an image channel with 8-bit pixel values, the ideal value of Shannon entropy is 8. The calculation results of Shannon entropy of each channel of the experimental image are shown in Table 5, which shows that the Shannon entropy of the ciphertext image is close to the ideal value of 8, effectively hiding the information contained in the image.

[0185]

[0186] Where L is the number of pixel values, p(x i ) is the frequency of occurrence of different pixel values, satisfying

[0187] Table 4 Correlation coefficients of adjacent pixels

[0188]

[0189] Table 5 Shannon entropy

[0190]

[0191]

[0192] like Fig.17 As shown in Figure 1, in order to analyze the ability of the proposed encryption scheme to resist differential attacks, taking image 4.1.05 as an example, the pixel value at the coordinate (50,50) in its G channel is changed from 200 to 100 to obtain the changed image 4.1.05. The original image and the modified image are encrypted respectively to obtain the corresponding ciphertext image. Fig.17It can be seen that even if only the pixel value of one channel in a pixel point is changed, the ciphertext image will change significantly.

[0193] In order to quantitatively analyze the difference between the two ciphertext images, the pixel change rate (NPCR) and the unified average change intensity (UACI) are used to evaluate the experimental results. The calculation formulas are shown in equations (18)-(20). At the significance level α = 0.05, when the NPCR is greater than 99.5693% and the UACI is in the interval (33.2824, 33.6447), the encryption scheme is considered to have passed the NPCR and UACI tests and can resist differential attacks. Tables 6 and 7 show the NPCR and UACI test results of the ciphertext images after changing one pixel value in one channel of the experimental image. It can be seen that even if only one pixel value in one channel is changed, all channels of the experimental image pass the test and can effectively resist differential attacks.

[0194]

[0195] Where C1(i,j) and C2(i,j) represent the pixel values ​​at coordinates (i,j) in images C1 and C2 respectively.

[0196] Table 6 NPCR test

[0197]

[0198] Table 7 UACI test

[0199]

[0200] The ciphertext image may be interfered by noise during transmission, resulting in some pixel errors. Taking image 4.1.05 as an example, salt and pepper noise with intensities of 0.01, 0.05, and 0.1 were applied to its ciphertext image, and its decrypted image was obtained. Fig.18 As shown in Figure 2, even if the ciphertext image is interfered by noise with an intensity of 0.1, the main information can still be obtained from the decrypted image.

[0201] The ciphertext image may also be clipped during the transmission process, resulting in missing pixels in the ciphertext image. Fig.19 As shown in the figure, taking image 4.1.05 as an example, the ciphertext image is cut by 1 / 16, 1 / 8, 1 / 4 and 1 / 2 respectively, and then decrypted. It can be seen that the shearing at different positions and degrees of the ciphertext image does not cause the corresponding decrypted image to be missing blocks, and has a good visual effect.

[0202] Taking image 4.1.05 as an example, the proposed encryption scheme is compared with other encryption schemes. Among them, Ref.[4] is the literature [G.Kaur, R.Agarwal, & V.Patidar (2022). Color image encryption system using combination of robust chaos and chaotic order fractional Hartleytransformation. Journal of King Saud University-Computer and InformationSciences, 34(8),5883-5897.], Ref.[5] is the literature [D.Zhang, L.Chen, & T.Li(2024).Hyper-chaotic color image encryption based on 3D orthogonal Latin cubes and RNAdiffusion.Multimedia Tools and Applications, 83(2), 3473-3496.], Ref.[6] is the literature [X.Chai, encryption.SignalProcessing,183,108041.]. The results are shown in Table 8. It can be seen that the proposed encryption scheme has good competitiveness.

[0203] Table 8 Comparison of experimental results

[0204]

[0205] Through Lyapunov index analysis and Kaplan-Yorke dimension calculation, it is verified that the four-dimensional hyperchaotic system proposed in the present invention has a high degree of complexity and can maintain hyperchaotic characteristics within a considerable range of control parameter changes. Compared with other four-dimensional chaotic systems, the hyperchaotic system proposed in the present invention exhibits higher complexity. Initial value sensitivity analysis and NIST test further confirm that the chaotic sequence generated by the chaotic system is highly sensitive and random, and is suitable for image encryption. By introducing the Go rules into the scrambling process of image encryption, the sensitivity to the chaotic sequence is enhanced, so that slight changes in some elements of the chaotic sequence have a significant impact on the scrambling results. Correlation analysis and robustness analysis show that the scrambling method based on the Go rules effectively destroys the correlation between pixels. Histogram analysis, χ 2 The test, Shannon entropy analysis and differential attack resistance analysis show that the diffusion method of three-dimensional zigzag extraction makes the image pixel value distribution more uniform and effectively enhances the association between different channels of the color image. The experimental results and key space analysis fully verify the effectiveness and reliability of the proposed method. Therefore, this scheme is suitable for image encryption fields with high security requirements such as military and power grid.

[0206] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A color image encryption method based on hyperchaotic system and Go rules, characterized in that: The steps are as follows: Step 1: Obtain the initial value of the hyperchaotic system from the plaintext image P and four external keys, and substitute the initial value into the four-dimensional hyperchaotic system and combine it with the external keys to obtain four chaotic sequences CSA, CSB, CSC and CSD; Step 2: The chaotic sequence CSA is combined with the Go rules to obtain the scrambled position coordinates of each pixel in the plaintext image P, and the three image channels of the plaintext image P are rearranged according to the position coordinates to obtain the scrambled image matrix P1; Step 3: Implement bidirectional diffusion based on three-dimensional zigzag extraction: Determine the image channel order of the image matrix P1, the zigzag extraction starting point of each image channel, and the zigzag extraction order of the two-dimensional plane selected by the external key according to the chaotic sequences CSB, CSC and CSD, and reconstruct the image matrix P1 to obtain the image matrix P2; implement three-dimensional zigzag extraction of the image matrix P2 to obtain the image sequence S; use the pseudo-random sequence PS obtained by the chaotic sequences CSB, CSC and CSD as a mask to implement bidirectional diffusion of the image sequence S to obtain the sequence S1; Step 4: Put sequence S1 back into the three-dimensional image matrix according to the order of three-dimensional zigzag extraction to obtain the ciphertext image C, and complete the image encryption.

2. The color image encryption method based on hyperchaotic system and Go rules according to claim 1, characterized in that: The method for obtaining the initial value of the hyperchaotic system is: The SHA-256 algorithm is used to calculate the plaintext image P to generate a hash value, and the hash value is divided into groups of 8 bits to obtain the internal key K = {k1, k2, ..., k 32 }; Use the external key {e1, e2, e3, e4} to scramble the internal key K and obtain the initial value {x0, y0, z0, w0} of the hyperchaotic system, and: in, Represents XOR operation; the value range of the external key {e1,e2,e3,e4} is (0,1).

3. The color image encryption method based on hyperchaotic system and Go rules according to claim 2, characterized in that: The method of substituting the initial value into the four-dimensional hyperchaotic system and combining it with the external key to obtain four chaotic sequences CSA, CSB, CSC and CSD is as follows: substituting the initial value {x0, y0, z0, w0} into the four-dimensional hyperchaotic system, and calculating (e5+M×N) iteration results, discarding the first e5 iteration results, and obtaining four chaotic sequences CSA, CSB, CSC and CSD with a length of M×N; wherein the value range of the external key {e5} is {1000, 1001, …, 5000}, and M and N are the length and width of the plaintext image P respectively.

4. The color image encryption method based on hyperchaotic system and Go rules according to claim 3 is characterized in that: The four-dimensional hyperchaotic system is a four-dimensional hyperchaotic system with a single attractor, and the mathematical expression of the four-dimensional hyperchaotic system is Among them, x, y, z and w are state parameters, and are the derivatives of the state parameters x, y, z and w respectively, and a and b are the control parameters; When the control parameters a=176 and b=15, the four-dimensional hyperchaotic system is in a chaotic state.

5. The color image encryption method based on a single attractor hyperchaotic system and Go rules according to any one of claims 1 to 4, characterized in that: The Go rules include four basic rules and three supplementary rules. The chess pieces are divided into black and white, and are stored in black chess boxes and white chess boxes respectively; The basic rules include: Basic rule 1: The black player goes first, and the black and white players take turns to take out the pieces from the chess box and place them on the intersections. Only one piece can be placed at a time. Basic Rule 2: The number of empty intersections in the horizontal and vertical directions adjacent to the chess piece determines the chess piece's Qi; Basic rule 3: If there are your own pieces at adjacent intersections in the horizontal and vertical directions, these pieces are considered as a whole and have the same Qi number; Basic Rule 4: When the Qi of a chess piece reaches 0, the chess piece needs to be lifted; Supplementary rules include: Supplementary Rule 1: The size of the Go board is the same as the size of the encrypted image; Supplementary Rule 2: Black and white pieces are stored in the black and white chess boxes respectively according to the data structure of the linear list: the top of the chess box is the head of the linear list, and the bottom of the chess box is the tail of the linear list; Supplementary Rule 3: When a chess piece is lifted, if there is only one chess piece lifted, place it at the top of the chess box of the corresponding color; if there are more than one chess piece lifted, lift them one by one from top to bottom and from left to right and place them at the bottom of the chess box of the corresponding color.

6. The color image encryption method based on hyperchaotic system and Go rules according to claim 5, characterized in that: The method of scrambling a two-dimensional image by combining the chaotic sequence CSA with the Go rules is as follows: the spatial distribution of the pixels of the two-dimensional image is mapped to the distribution of the intersections of the Go board, and the pixels of the two-dimensional image are mapped to the Go pieces. The pixels of the two-dimensional image and the Go pieces are numbered in order from top to bottom and from left to right, and the position serial numbers of the two-dimensional space of the two-dimensional image and the intersections of the board are obtained accordingly; the spatial positions of the scrambled image pixels are regarded as the spatial positions of the pieces on the Go board; the chaotic sequence CSA is used to determine the positions of the pieces, and after the game is over, the remaining pieces in the chess box are filled into the blank spaces of the chess board in order to complete the scrambling of the two-dimensional image.

7. The color image encryption method based on hyperchaotic system and Go rules according to claim 6, characterized in that: The method of obtaining the scrambled position coordinates of each pixel in the plaintext image P by combining the chaotic sequence CSA with the Go rules is as follows: for each image channel in the plaintext image P, the image matrix O is: Step 1, initialize the chess box: traverse the image matrix O in sequence according to the position sequence relationship between the two-dimensional image and the Go chessboard, extract the pixel points of the image matrix O in order from small to large, and put the pixel points with odd extracted sequence numbers into the black chess box BS in sequence as black chess pieces, and put the pixel points with even extracted sequence numbers into the white chess box WS in sequence as white chess pieces; Step 2, obtain chess piece positions: sort the chaotic sequence CSA to obtain the index sequence IS; Step 3: Move the chess piece: Starting from the black chess box BS, take the chess pieces from the top of the black chess box BS and the white chess box WS alternately, and determine the position of the chess piece according to the header element taken from the index sequence IS; Step 4: Pick up the pieces: Determine whether the opponent's or your own pieces are picked up according to the basic rules of Go, and put the picked up pieces into the corresponding chess boxes according to the supplementary rules; Step 5, complete the chess game: repeat steps 3 and 4 until all elements in the index sequence IS have been used to determine the spatial position of the chess piece; Step 6, fill the chessboard: fill the empty spaces on the chessboard from top to bottom and from left to right with the remaining chess pieces in the black chess box BS and the white chess box WS in the order of black chess priority; Step 7, obtaining a scrambled two-dimensional image matrix: rearrange the pixel points of the image matrix O according to the spatial positions of the chess pieces on the Go board to generate a scrambled image matrix O1; According to the element values ​​in the image matrix O1, the pixels of the three image channels of the plaintext image P are rearranged to obtain the scrambled image matrix P1.

8. The color image encryption method based on hyperchaotic system and Go rules according to claim 7, characterized in that: In the process of picking up a chess piece in step 4, basic rule 4 is used to determine whether an opponent's or one's own chess piece is picked up, and the picked up chess piece is placed in the corresponding chess box according to supplementary rule 3; In step 2, the chaotic sequence CSA is arranged in ascending order, and the positions of the chess pieces are: Among them, IS(i) is the element value of the i-th element of the index sequence IS, mod() is the modulo function, M is the number of rows of the image matrix P, row(i) and col(i) are the row coordinates and column coordinates of the chess piece's placement position, respectively. Indicates rounding up, i=1,2,…,M×N.

9. The color image encryption method based on a hyperchaotic system and Go rules according to any one of claims 6 to 8, characterized in that: The RGB channels of the image matrix P1 are regarded as a three-dimensional cube composed of three image planes. The three-dimensional zigzag extraction starts from the first image plane, and the pixel points are extracted across the planes in sequence according to the two-dimensional zigzag extraction order. After completing one round of two-dimensional zigzag extraction across the planes, the pixel points are extracted across the planes in the same way starting from the next image plane until three rounds of extraction are completed, thereby realizing the three-dimensional zigzag extraction of the three channels of the color image. The method for determining the image channel sequence of the image matrix P1 is as follows: the first elements of the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD are arranged in ascending order to obtain an index sequence containing three elements, and the three image channels R, G, and B of the image matrix P1 are arranged according to the index sequence to determine the image channel sequence; The method for determining the zigzag extraction starting point of each image channel of the image matrix P1 is as follows: according to processing the second and third elements of the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD as integers, the processed second element and the third element form a set of coordinates; the three sets of coordinates represent the starting points of the zigzag extraction in the three image channels of R, G, and B respectively; The method for obtaining the image matrix P2 is as follows: a zigzag extraction method is selected according to an external secret key e6, and the three image channel matrices of the image matrix P1 are reconstructed in combination with a determined zigzag extraction starting point, and the reconstructed image channels are arranged in a determined image channel order to obtain the image matrix P2; the image matrix P2 is extracted using a three-dimensional zigzag extraction method to obtain an image sequence S containing all pixel value components.

10. The color image encryption method based on hyperchaotic system and Go rules according to claim 9, characterized in that: The set of coordinates is Where, j = 1, 2, 3, CS1, CS2, CS3 represent the chaotic sequence CSB, the chaotic sequence CSC, and the chaotic sequence CSD respectively. is the coordinate of the zigzag starting point, M and N are the number of rows and columns of the image channel respectively; The two-dimensional zigzag extraction method is as follows: by reconstructing the image matrix, the starting point of the zigzag extraction is extended to any position in the matrix, and the selected starting point is reconstructed to any corner point, the pixel points after the starting point in the original image are arranged in sequence, and the pixel points before the starting point are arranged in sequence starting from the first pixel point, so as to obtain a reconstructed image matrix; The method obtained from the chaotic sequences CSB, CSC and CSD is: Wherein, i=1,2,3…,M×N; CSB(i), CSC(i), CSD(i), PSB(i), PSC(i), PSD(i) are the i-th element values ​​of the chaotic sequence CSB, the chaotic sequence CSC, the chaotic sequence CSD, the processed chaotic sequence PSB, the chaotic sequence PSC, and the chaotic sequence PSD respectively; Indicates a round-down operation; the hth element value of the pseudo-random sequence PS: The bidirectional diffusion method is: forward diffusion is performed on the image sequence S to obtain a sequence S1: Perform reverse diffusion on sequence S1 to obtain the diffused sequence S2: in, Represents the XOR operation, h=1,2,3…,M×N×3.

Citation Information

Cited By

  • Phase image coding method and system based on random vector optical complex coherence degree measurement

    CN120747258A