Image encryption method based on hyperchaos
By constructing a hyperchaotic coupling system and using diffusion and Arnold transform to process image components, the problem that existing encryption algorithms cannot effectively protect the security of digital images is solved, and image encryption with high security and a large key space is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2026-04-10
AI Technical Summary
Existing encryption algorithms cannot effectively protect the security of digital images. Single chaotic systems are vulnerable to attacks, while combined chaotic systems suffer from insufficient key length and limited application scope.
A hyperchaotic image encryption method is adopted, and a hyperchaotic coupled system is constructed. The RGB components of the image are processed by diffusion and Arnold transform, and the chaotic sequence generated by the hyperchaotic system is used for encryption, thereby enhancing the key space and resistance to attacks.
It improves the security and resistance to attacks of image encryption, enhances the key space, and can effectively resist chosen-plaintext attacks and differential attacks, exhibiting good encryption effect and robustness.
Smart Images

Figure CN121842332A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more specifically to an image encryption method based on hyperchaos. Background Technology
[0002] Images are an important form of multimedia information. In recent years, with the continuous development and maturation of multimedia technology, a large amount of image data has emerged, containing much important information. Due to the unprotected nature of the internet, these images are vulnerable to attacks from unauthorized users during transmission, who can steal important information, causing considerable damage. Therefore, protecting the security of digital images is extremely important.
[0003] Encryption algorithms, as a tool for protecting image information, can effectively prevent unauthorized users from stealing information and have become a hot research topic in the field of image security. Currently, many encryption algorithms exist, such as the traditional DES algorithm. This algorithm mainly encrypts ordinary data, but image data has characteristics such as large information size and uneven spatial distribution, making it impossible for DES to encrypt accurately, resulting in poor image encryption effects and thus unsuitable for digital image encryption. With the continuous progress in nonlinear theory research, scholars have discovered that chaotic systems possess excellent randomness; that is, different initial conditions may lead to different chaotic systems. This provides a new research tool for protecting image information and has become a major research direction in current digital image encryption. Due to the numerous connections between chaotic systems and cryptographic systems, the application of chaotic systems in image encryption is becoming increasingly widespread.
[0004] With the continuous development of digital image decryption technology, attack methods have become increasingly diversified. A single chaotic system is insufficient to guarantee the security of digital images. Therefore, some scholars have proposed image encryption algorithms based on combinatorial chaotic systems. Compared to a single chaotic system, combinatorial chaotic systems improve image security to some extent. However, combinatorial chaotic systems still have limitations, such as insufficient key length, vulnerability to attacks, and limited practical application. Therefore, a hyperchaotic image encryption method is needed. Applying hyperchaotic systems to image encryption schemes can better guarantee the security of image encryption schemes and has a wider range of applications. Summary of the Invention
[0005] In view of this, the purpose of this invention is to overcome the shortcomings of the prior art and provide an image encryption method based on hyperchaos, which has more parameters than low-dimensional hyperchaotic systems, so that the corresponding image encryption scheme has a larger key space, can better resist exhaustive attacks, and has higher security.
[0006] The image encryption method based on hyperchaos of the present invention includes the following steps:
[0007] S1. Construct a hyperchaotic coupled system; adjust the parameter values in the hyperchaotic coupled system so that the hyperchaotic coupled system is in a hyperchaotic motion state;
[0008] S2. Perform diffusion processing on the image to obtain the diffused image;
[0009] S3. Using the chaotic sequence generated by the hyperchaotic coupling system as the value of the Arnold matrix, the operation is performed on all pixels and the matrix of the diffused image to obtain the ciphertext components of the R, G, and B components in the image;
[0010] S4. Combine the ciphertext components of the R, G, and B components into the final ciphertext image.
[0011] Furthermore, a hyperchaotic coupled system is constructed based on the following formula:
[0012]
[0013] Where μ, a, ε, and m are control parameters, and x, y, z, and w are state variables. These are the reciprocals of the state variables x, y, z, and w, respectively.
[0014] Furthermore, the parameter values in the hyperchaotic coupled system are adjusted to bring the system into a hyperchaotic state of motion, specifically including:
[0015] With parameters μ = 2, a = 3, ε = 1, m = 1.5, the Lyapunov exponents of the hyperchaotic coupled system are calculated using the Wolf method as λ1 = 0.1649, λ2 = 0.0891, λ3 = 0, λ4 = -3.1931.
[0016] Furthermore, the image is subjected to diffusion processing to obtain a diffused image, specifically including:
[0017] S21. Read the R, G, and B color components of image P, convert them into one-dimensional vectors PR, PG, and PB respectively, and calculate the pixel average value of each component:
[0018]
[0019] Wherein, the size of image P is M×N; R(x,y) is the pixel value of color component R, avar is the average pixel value of color component R; G(x,y) is the pixel value of color component G, avg is the average pixel value of color component G; B(x,y) is the pixel value of color component B, avb is the average pixel value of color component B.
[0020] S22. Update the initial values x0, y0, z0, w0 of the hyperchaotic coupled system:
[0021]
[0022] Where, x 00 For the updated x0, y 00 For the updated y0, z 00 For the updated z0, w 00 For the updated w0;
[0023] S23. Iterate the hyperchaotic coupled system using the updated parameters to obtain four sequences: S = {x}, U = {y}, V = {z}, O = {w};
[0024] S24. Optimize the chaotic sequence required for encrypting the R component using sequences S, U, V, and O:
[0025]
[0026] Where mod(a,b) represents the modulo operation of a with respect to b; floor() is the floor function; S(1:M×N) is a sequence S containing M×N pixels; SR1 is a chaotic sequence generated from sequence S; U(1:M×N) is a sequence U containing M×N pixels; UR1 is a chaotic sequence generated from sequence U; V(1:M×N) is a sequence V containing M×N pixels; VR1 is a chaotic sequence generated from sequence V; O(1:M×N) is a sequence O containing M×N pixels; OR1 is a chaotic sequence generated from sequence O; pow2() is a power function with a base of 2.
[0027] The pixels in the R component are diffused using a phase-to-phase diffusion method to obtain the intermediate ciphertext CR2(i) corresponding to the R component;
[0028] S25. Follow the same logic as step S24:
[0029] The chaotic sequences required for encrypting the G and B components are optimized using sequences S, U, V, and O, respectively. Then, the pixels in the G and B components are diffused to obtain the intermediate ciphertext CG2(i) corresponding to the G component and the intermediate ciphertext CB2(i) corresponding to the B component.
[0030] Furthermore, a phase-diffusion method is used to diffuse the pixels in the R component, specifically including:
[0031] The i-th pixel in the R component is diffused using the following method:
[0032] If M×N is even:
[0033] When i=1:
[0034]
[0035] in, For XOR operation; PR(1) is the first pixel in the R component, VR1(1) is the chaotic sequence corresponding to the first pixel in sequence V, CR1(1) is the intermediate ciphertext corresponding to the first pixel in the R component; PR(M×N) is the M×Nth pixel in the R component, OR1(M×N) is the chaotic sequence corresponding to the M×Nth pixel in sequence O, CR1(M×N) is the intermediate ciphertext corresponding to the M×Nth pixel in the R component;
[0036] When 2≤i≤M×N / 2:
[0037]
[0038] Wherein, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component; CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component; VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V; PR(i) is the i-th pixel in the R component.
[0039] CR1(M×N+1-i) is the intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component.
[0040] CR1(M×N+2-i) is the intermediate ciphertext corresponding to the (M×N+2-i)th pixel of the R component.
[0041] OR1(M×N+1-i) is the chaotic sequence corresponding to the (M×N+1-i)th pixel in sequence O.
[0042] PR(M×N+1-i) is the (M×N+1-i)th pixel in the R component;
[0043] When i=M×N / 2+1:
[0044]
[0045] Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, and VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V.
[0046] CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)th pixel of the R component, and OR1(i-1) is the chaotic sequence corresponding to the (i-1)th pixel in sequence O;
[0047] When M×N / 2+2≤i≤M×N:
[0048]
[0049] Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V, and CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component.
[0050] CR2(M×N+1-i) is the new intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component.
[0051] CR2(M×N+2-i) is the new intermediate ciphertext corresponding to the (M×N+2-i)th pixel of the R component.
[0052] OR1(M×N+1-i) is the chaotic sequence corresponding to the (M×N+1-i)th pixel in sequence O.
[0053] CR1(M×N+1-i) is the intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component;
[0054] If M×N is an odd number:
[0055] When i=1:
[0056]
[0057] When 2≤i≤(M×N-1) / 2:
[0058]
[0059] When i=(M×N-1) / 2+1:
[0060]
[0061] When (M×N-1) / 2+2≤i≤M×N:
[0062]
[0063] Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V; CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, and OR1(i-1) is the chaotic sequence corresponding to the (i-1)-th pixel in sequence O.
[0064] Furthermore, step S3 specifically includes:
[0065] S31. Perform Arnold transform on the intermediate ciphertext CR2(i) to obtain the ciphertext component of the R component in the image, specifically including:
[0066] Construct the elements TR(i) of the Arnold matrix:
[0067]
[0068] Where, a(i) = SR1(i), SR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence S; b(i) = UR1(i), UR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence U; i = 1, 2, ... M × N;
[0069] Calculations are performed using the Arnold matrix and pixels:
[0070] If M×N is even:
[0071] [y(i),y(i+1)]=[x(i),x(i+1)]×TR(i)mod256,i=1,3,5...M×N-1
[0072] Where x(i) is the pixel value of the i-th pixel in the intermediate ciphertext CR2(i), y(i) is the pixel value after processing x(i), x(i+1) is the pixel value of the (i+1)-th pixel in the intermediate ciphertext CR2(i), and y(i+1) is the pixel value after processing x(i+1).
[0073] If M×N is an odd number:
[0074]
[0075] S32. Follow the same logic as step S31:
[0076] Perform Arnold transform on the intermediate ciphertext CG2(i) to obtain the ciphertext component of the G component in the image;
[0077] The intermediate ciphertext CB2(i) is processed by Arnold transform to obtain the ciphertext component of the B component in the image.
[0078] The beneficial effects of this invention are as follows: The image encryption method based on hyperchaos disclosed in this invention utilizes a hyperchaotic system to generate the required password sequence for the encryption process. This encryption algorithm encrypts the three components (RGB) of a color image separately, and uses a key related to the plaintext to solve the problem of the key being unrelated to the plaintext, thereby enhancing the algorithm's ability to resist chosen-plaintext attacks. By using the Arnold matrix to multiply the pixels and then taking the modulo operation to change the pixel values, this encryption method has better performance in terms of information entropy and resistance to differential attacks. Attached Figure Description
[0079] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0080] Figure 1 This is a schematic diagram of the encryption principle framework of the present invention;
[0081] Figure 2 (a) is a schematic diagram of the original image of the present invention;
[0082] Figure 2 (b) is the encrypted image after encrypting the original image according to the present invention;
[0083] Figure 2 (c) is the decrypted image after the encryption image is decrypted according to the present invention. Detailed Implementation
[0084] The present invention will be further described below with reference to the accompanying drawings, as shown in the figures:
[0085] The image encryption method based on hyperchaos of the present invention includes the following steps:
[0086] S1. Construct a hyperchaotic coupled system; adjust the parameter values in the hyperchaotic coupled system so that the hyperchaotic coupled system is in a hyperchaotic motion state;
[0087] S2. Perform diffusion processing on the image to obtain the diffused image;
[0088] S3. Using the chaotic sequence generated by the hyperchaotic coupling system as the value of the Arnold matrix, the operation is performed on all pixels and the matrix of the diffused image to obtain the ciphertext components of the R, G, and B components in the image;
[0089] S4. Combine the ciphertext components of the R, G, and B components into the final ciphertext image.
[0090] This invention employs a hyperchaotic system to scramble ciphertext and then uses the scrambled ciphertext image to encrypt the plaintext image, thereby effectively encrypting the image, better resisting attacks from parameter recognition technology, protecting image copyright, and exhibiting good robustness. It has broad application prospects in the field of digital image security.
[0091] In this embodiment, the chaotic system, as a nonlinear system, exhibits complex dynamic behavior. A small change in initial values can cause a significant change in the system state, satisfying the requirements of digital image encryption. Using chaotic sequences generated by the chaotic system to modify the size and position of pixels in the image achieves good encryption results. Typically, the encryption process of an image using a chaotic system includes scrambling and diffusion processes.
[0092] When designing image encryption for chaotic systems, it is necessary to clearly define the typical characteristics of chaotic systems. Based on the requirements of image encryption, the designed encryption system should pay attention to the following points:
[0093] (1) Dynamic characteristics of chaotic systems: After the chaotic system starts iterating, it takes a period of time to transition to the chaotic state. When selecting a chaotic sequence, the previous transition points should be discarded. When the system reaches the chaotic state, the required chaotic sequence should be selected. Its randomness is stronger and it has a better encryption effect as an encryption sequence.
[0094] (2) Security: Simple one-dimensional or two-dimensional chaotic systems used in encryption schemes lack sufficient dynamic complexity to resist brute-force attacks and are easily cracked. Hyperchaotic systems, on the other hand, generate chaotic sequences with stronger randomness, resulting in better encryption. Therefore, hyperchaotic systems with complex structures and higher dimensions should be chosen.
[0095] (3) Encryption Rate: In the digital age, massive amounts of images are transmitted daily, making rapid encryption a hot research topic. While complex and cumbersome encryption methods are used to improve security, resulting in good encryption effects and difficulty in cracking, the encryption time is too long, making it unsuitable for encrypting large numbers of images. A good encryption scheme should not only improve security but also consider encryption rate.
[0096] (4) Cost-effectiveness: To increase encryption security, more complex chaotic systems are usually selected. However, complex chaotic systems require more computation, more hardware facilities, and consume more computer resources, which undoubtedly increases encryption costs. When designing an encryption system, cost-effectiveness must be considered, improving encryption security while saving resources.
[0097] In step S1, a nonlinear controller is introduced based on the coupled generator system to construct a new hyperchaotic coupled generator system, that is, the hyperchaotic coupled system is constructed according to the following formula:
[0098]
[0099] Where μ, a, ε, and m are control parameters, and x, y, z, and w are state variables. These are the reciprocals of the state variables x, y, z, and w, respectively.
[0100] Adjusting the parameter values in the hyperchaotic coupled system to bring it into a hyperchaotic state includes:
[0101] With parameters μ = 2, a = 3, ε = 1, and m = 1.5, the Lyapunov exponents of the hyperchaotic coupled system were calculated using the Wolf method as λ1 = 0.1649, λ2 = 0.0891, λ3 = 0, and λ4 = -3.1931. The presence of two Lyapunov exponents greater than 0, one equal to 0, and one less than 0 indicates that the hyperchaotic coupled system (a four-dimensional hyperchaotic system) is in a hyperchaotic state under these parameters and can exhibit complex dynamic behaviors, making it suitable for image encryption.
[0102] In this embodiment, in step S2, after the image is unfolded into a one-dimensional vector, the first pixel and the last pixel begin to diffuse towards each other simultaneously, the second pixel and the second-to-last pixel diffuse towards each other simultaneously, and so on, so that each pixel diffuses into all the other pixels.
[0103] The image is diffused to obtain the diffused image, specifically including:
[0104] S21. Read the R, G, and B color components of the plaintext color image P, convert them into one-dimensional vectors PR, PG, and PB respectively, and calculate the pixel average value of each component:
[0105]
[0106] Wherein, the size of image P is M×N; R(x,y) is the pixel value of color component R, avar is the average pixel value of color component R; G(x,y) is the pixel value of color component G, avg is the average pixel value of color component G; B(x,y) is the pixel value of color component B, avb is the average pixel value of color component B.
[0107] S22. Update the initial values x0, y0, z0, w0 of the hyperchaotic coupled system:
[0108]
[0109] Where, x 00 For the updated x0, y 00 For the updated y0, z 00 For the updated z0, w 00 For the updated w0;
[0110] S23. Iterate the hyperchaotic coupled system using the updated parameters to obtain four sequences: S = {x}, U = {y}, V = {z}, O = {w}; where the hyperchaotic coupled system has a transition state in the initial state, the first 1000 points of sequences {x}, {y}, {z}, and {w} can be discarded respectively;
[0111] S24. Optimize the chaotic sequence required for encrypting the R component using sequences S, U, V, and O:
[0112]
[0113] Where mod(a,b) represents the modulo operation of a with respect to b; floor() is the floor function; S(1:M×N) is a sequence S containing M×N pixels; SR1 is a chaotic sequence generated from sequence S; U(1:M×N) is a sequence U containing M×N pixels; UR1 is a chaotic sequence generated from sequence U; V(1:M×N) is a sequence V containing M×N pixels; VR1 is a chaotic sequence generated from sequence V; O(1:M×N) is a sequence O containing M×N pixels; OR1 is a chaotic sequence generated from sequence O; pow2() is a power function with a base of 2.
[0114] The pixels in the R component are diffused using a phase-to-phase diffusion method to obtain the intermediate ciphertext CR2(i) corresponding to the R component; wherein, forward diffusion and reverse diffusion are carried out simultaneously in opposite directions.
[0115] S25. Follow the same logic as step S24:
[0116] The chaotic sequences required for encrypting the G and B components are optimized using sequences S, U, V, and O, respectively. Then, the pixels in the G and B components are diffused to obtain the intermediate ciphertext CG2(i) corresponding to the G component and the intermediate ciphertext CB2(i) corresponding to the B component.
[0117] The encryption process involves encrypting the G and B components to obtain the corresponding ciphertext. The chaotic sequences required for the encryption process are SG1, UG1, VG1, OG1 and SB1, UB1, VB1, OB1, respectively.
[0118]
[0119] Sequences VG1, OG1, VB1, and OB1 are used for the diffusion process, while sequences SG1, UG1, SB1, and UB1 are used for the Arnold transformation process.
[0120] In this embodiment, a phase-diffusion method is used to diffuse the pixels in the R component, specifically including:
[0121] The i-th pixel in the R component is diffused using the following method:
[0122] If M×N is even:
[0123] When i=1:
[0124]
[0125] in, For XOR operation; PR(1) is the first pixel in the R component, VR1(1) is the chaotic sequence corresponding to the first pixel in sequence V, CR1(1) is the intermediate ciphertext corresponding to the first pixel in the R component; PR(M×N) is the M×Nth pixel in the R component, OR1(M×N) is the chaotic sequence corresponding to the M×Nth pixel in sequence O, CR1(M×N) is the intermediate ciphertext corresponding to the M×Nth pixel in the R component;
[0126] When 2≤i≤M×N / 2:
[0127]
[0128] Wherein, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component; CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component; VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V; PR(i) is the i-th pixel in the R component.
[0129] CR1(M×N+1-i) is the intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component.
[0130] CR1(M×N+2-i) is the intermediate ciphertext corresponding to the (M×N+2-i)th pixel of the R component.
[0131] OR1(M×N+1-i) is the chaotic sequence corresponding to the (M×N+1-i)th pixel in sequence O.
[0132] PR(M×N+1-i) is the (M×N+1-i)th pixel in the R component;
[0133] When i=M×N / 2+1:
[0134]
[0135] Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, and VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V.
[0136] CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)th pixel of the R component, and OR1(i-1) is the chaotic sequence corresponding to the (i-1)th pixel in sequence O;
[0137] When M×N / 2+2≤i≤M×N:
[0138]
[0139] Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V, and CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component.
[0140] CR2(M×N+1-i) is the new intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component.
[0141] CR2(M×N+2-i) is the new intermediate ciphertext corresponding to the (M×N+2-i)th pixel of the R component.
[0142] OR1(M×N+1-i) is the chaotic sequence corresponding to the (M×N+1-i)th pixel in sequence O.
[0143] CR1(M×N+1-i) is the intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component;
[0144] If M×N is an odd number:
[0145] When i=1:
[0146]
[0147] When 2≤i≤(M×N-1) / 2:
[0148]
[0149] When i=(M×N-1) / 2+1:
[0150]
[0151] When (M×N-1) / 2+2≤i≤M×N:
[0152]
[0153] Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V; CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, and OR1(i-1) is the chaotic sequence corresponding to the (i-1)-th pixel in sequence O.
[0154] In this embodiment, step S3 specifically includes:
[0155] S31. Perform Arnold transform on the intermediate ciphertext CR2(i) to obtain the ciphertext component of the R component in the image, specifically including:
[0156] Construct the elements TR(i) of the Arnold matrix:
[0157]
[0158] Where, a(i) = SR1(i), SR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence S; b(i) = UR1(i), UR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence U; i = 1, 2, ... M × N;
[0159] Calculations are performed using the Arnold matrix and pixels:
[0160] If M×N is even:
[0161] [y(i),y(i+1)]=[x(i),x(i+1)]×TR(i)mod256,i=1,3,5...M×N-1
[0162] Where x(i) is the pixel value of the i-th pixel in the intermediate ciphertext CR2(i), y(i) is the pixel value after processing x(i), x(i+1) is the pixel value of the (i+1)-th pixel in the intermediate ciphertext CR2(i), y(i+1) is the pixel value after processing x(i+1); mod is the modulo operator;
[0163] If M×N is an odd number:
[0164]
[0165] S32. Follow the same logic as step S31:
[0166] Perform Arnold transform on the intermediate ciphertext CG2(i) to obtain the ciphertext component of the G component in the image;
[0167] The intermediate ciphertext CB2(i) is processed by Arnold transform to obtain the ciphertext component of the B component in the image.
[0168] The final ciphertext image is obtained by merging the ciphertext components of the R, G, and B components.
[0169] Of course, based on the encryption principles described above, the encrypted ciphertext image can be decrypted. The decryption process is the reverse of the encryption process. Using the same parameters and sequences as the encryption process, the ciphertext image is read, the R, G, and B components are extracted, each of the three components is decrypted separately, and finally, the decrypted image is synthesized.
[0170] Step 1: Perform the inverse Arnold matrix transformation on the ciphertext component CR. a(i) = SR1(i), b(i) = UR1(i).
[0171] (1) When M×N is even:
[0172] [x(i), x(i+1)]=[y(i), y(i+1)]×TR -1 (i)mod 256 i=1, 3, 5…M×N-1
[0173] (2) When M×N is an odd number:
[0174]
[0175] Step 2: The reverse process of diffusion. The reverse process of diffusion begins simultaneously from two directions.
[0176] (1) When M×N is even:
[0177] When 1≤i≤M×N / 2-1:
[0178]
[0179] When i=M×N / 2:
[0180]
[0181] When M×N / 2-1≤i≤M×N-1:
[0182]
[0183] When i=M×N:
[0184]
[0185] (2) When M×N is an odd number:
[0186] When 1≤i≤(M×N-1) / 2:
[0187]
[0188] When i=(M×N-1) / 2+1:
[0189]
[0190] When (M×N-1) / 2+2≤i≤M×N-1:
[0191]
[0192] When i=M×N:
[0193]
[0194] Step 3: Similarly, decrypt the G and B components, and combine the decrypted images of the three components into the final color decrypted image.
[0195] To better understand the encryption and decryption principles of this invention, a simulation analysis is now performed based on the encryption and decryption methods of this invention:
[0196] The experimental platform consisted of a 64-bit Windows 7 operating system, an Intel(R) Core(TM) i7-4790 processor with a clock speed of 3.20 GHz, and 4 GB of memory. Simulation was performed using MATLAB, with initial parameters x0, y0, z0, w0 of 1.1, 5.2, 8.3, and 4.4, respectively. A test image of size 500×100 was selected. The encryption and decryption effects are shown below. Figure 2 As shown, the encrypted image completely hides the information, making it impossible to see any of the original image information. The decrypted image clearly restores the information of the original image.
[0197] This invention proposes a color encryption image scheme based on a four-dimensional hyperchaotic system. The random sequence generated by the hyperchaotic system is used for the diffusion process and the Arnold matrix transformation process. The diffusion process adopts a counter-diffusion method, which can be completed in one cycle. This not only reduces the amount of computation but also establishes a correlation between each pixel of the plaintext and all other pixels, resulting in a more uniform diffusion effect. This encryption scheme has a large key space, making the encrypted image difficult to crack and providing good resistance to brute-force attacks and high security and reliability.
[0198] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An image encryption method based on hyperchaos, characterized in that: Includes the following steps: S1. Construct a hyperchaotic coupled system; adjust the parameter values in the hyperchaotic coupled system so that the hyperchaotic coupled system is in a hyperchaotic motion state; S2. Perform diffusion processing on the image to obtain the diffused image; S3. Using the chaotic sequence generated by the hyperchaotic coupling system as the value of the Arnold matrix, the operation is performed on all pixels and the matrix of the diffused image to obtain the ciphertext components of the R, G, and B components in the image; S4. Combine the ciphertext components of the R, G, and B components into the final ciphertext image.
2. The image encryption method based on hyperchaos according to claim 1, characterized in that: Construct a hyperchaotic coupled system according to the following formula: Where μ, a, ε, and m are control parameters, and x, y, z, and w are state variables. These are the reciprocals of the state variables x, y, z, and w, respectively.
3. The image encryption method based on hyperchaos according to claim 2, characterized in that: Adjusting the parameter values in the hyperchaotic coupled system to bring it into a hyperchaotic state includes: With parameters μ = 2, a = 3, ε = 1, m = 1.5, the Lyapunov exponents of the hyperchaotic coupled system are calculated using the Wolf method as λ1 = 0.1649, λ2 = 0.0891, λ3 = 0, λ4 = -3.1931.
4. The image encryption method based on hyperchaos according to claim 1, characterized in that: The image is diffused to obtain the diffused image, specifically including: S21. Read the R, G, and B color components of image P, convert them into one-dimensional vectors PR, PG, and PB respectively, and calculate the pixel average value of each component: Wherein, the size of image P is M×N; R(x,y) is the pixel value of color component R, avar is the average pixel value of color component R; G(x,y) is the pixel value of color component G, avg is the average pixel value of color component G; B(x,y) is the pixel value of color component B, avb is the average pixel value of color component B. S22. Update the initial values x0, y0, z0, w0 of the hyperchaotic coupled system: Where, x 00 For the updated x0, y 00 For the updated y0, z 00 For the updated z0, w 00 For the updated w0; S23. Iterate the hyperchaotic coupled system using the updated parameters to obtain four sequences: S = {x}, U = {y}, V = {z}, O = {w}; S24. Optimize the chaotic sequence required for encrypting the R component using sequences S, U, V, and O: Where mod(a,b) represents the modulo operation of a with respect to b; floor() is the floor function; S(1:M×N) is a sequence S containing M×N pixels; SR1 is a chaotic sequence generated from sequence S; U(1:M×N) is a sequence U containing M×N pixels; UR1 is a chaotic sequence generated from sequence U; V(1:M×N) is a sequence V containing M×N pixels; VR1 is a chaotic sequence generated from sequence V; O(1:M×N) is a sequence O containing M×N pixels; OR1 is a chaotic sequence generated from sequence O; pow2() is a power function with a base of 2. The pixels in the R component are diffused using a phase-to-phase diffusion method to obtain the intermediate ciphertext CR2(i) corresponding to the R component; S25. Follow the same logic as step S24: The chaotic sequences required for encrypting the G and B components are optimized using sequences S, U, V, and O, respectively. Then, the pixels in the G and B components are diffused to obtain the intermediate ciphertext CG2(i) corresponding to the G component and the intermediate ciphertext CB2(i) corresponding to the B component.
5. The image encryption method based on hyperchaos according to claim 4, characterized in that: The pixels in the R component are diffused using a phase-to-phase diffusion method, specifically including: The i-th pixel in the R component is diffused using the following method: If M×N is even: When i=1: in, For XOR operation; PR(1) is the first pixel in the R component, VR1(1) is the chaotic sequence corresponding to the first pixel in sequence V, CR1(1) is the intermediate ciphertext corresponding to the first pixel in the R component; PR(M×N) is the M×Nth pixel in the R component, OR1(M×N) is the chaotic sequence corresponding to the M×Nth pixel in sequence O, CR1(M×N) is the intermediate ciphertext corresponding to the M×Nth pixel in the R component; When 2≤i≤M×N / 2: Wherein, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component; CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component; VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V; PR(i) is the i-th pixel in the R component. CR1(M×N+1-i) is the intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component. CR1(M×N+2-i) is the intermediate ciphertext corresponding to the (M×N+2-i)th pixel of the R component. OR1(M×N+1-i) is the chaotic sequence corresponding to the (M×N+1-i)th pixel in sequence O. PR(M×N+1-i) is the (M×N+1-i)th pixel in the R component; When i=M×N / 2+1: Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, and VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V. CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)th pixel of the R component, and OR1(i-1) is the chaotic sequence corresponding to the (i-1)th pixel in sequence O; When M×N / 2+2≤i≤M×N: Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V, and CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component. CR2(M×N+1-i) is the new intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component. CR2(M×N+2-i) is the new intermediate ciphertext corresponding to the (M×N+2-i)th pixel of the R component. OR1(M×N+1-i) is the chaotic sequence corresponding to the (M×N+1-i)th pixel in sequence O. CR1(M×N+1-i) is the intermediate ciphertext corresponding to the (M×N+1-i)th pixel of the R component; If M×N is an odd number: When i=1: When 2≤i≤(M×N-1) / 2: When i=(M×N-1) / 2+1: When (M×N-1) / 2+2≤i≤M×N: Wherein, CR2(i) is the new intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i) is the intermediate ciphertext corresponding to the i-th pixel of the R component, CR1(i-1) is the intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, VR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence V; CR2(i-1) is the new intermediate ciphertext corresponding to the (i-1)-th pixel of the R component, and OR1(i-1) is the chaotic sequence corresponding to the (i-1)-th pixel in sequence O.
6. The image encryption method based on hyperchaos according to claim 5, characterized in that: Step S3 specifically includes: S31. Perform Arnold transform on the intermediate ciphertext CR2(i) to obtain the ciphertext component of the R component in the image, specifically including: Construct the elements TR(i) of the Arnold matrix: Where, a(i) = SR1(i), SR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence S; b(i) = UR1(i), UR1(i) is the chaotic sequence corresponding to the i-th pixel in sequence U; i = 1, 2, ... M × N; Calculations are performed using the Arnold matrix and pixels: If M×N is even: [y(i),y(i+1)]=[x(i),x(i+1)]×TR(i)mod256,i=1,3,5...M×N-1 Where x(i) is the pixel value of the i-th pixel in the intermediate ciphertext CR2(i), y(i) is the pixel value after processing x(i), x(i+1) is the pixel value of the (i+1)-th pixel in the intermediate ciphertext CR2(i), and y(i+1) is the pixel value after processing x(i+1). If M×N is an odd number: S32. Follow the same logic as step S31: Perform Arnold transform on the intermediate ciphertext CG2(i) to obtain the ciphertext component of the G component in the image; The intermediate ciphertext CB2(i) is processed by Arnold transform to obtain the ciphertext component of the B component in the image.