Image encryption method

By designing a five-dimensional hidden dual memristor hyperchaotic system and a block cellular automaton, and combining various scrambling and diffusion methods, the problems of insufficient key space and weak anti-attack capability in existing medical image encryption methods are solved, achieving high security and noise-resistant image encryption effects.

CN121000830AActive Publication Date: 2025-11-21HUBEI UNIV FOR NATITIES +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511195544.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-21
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

Existing medical image encryption methods suffer from problems such as limited key space, insufficient resistance to brute-force attacks, weak resistance to statistical and differential attacks, and insufficient resistance to noise interference and cropping attacks.

Method used

A five-dimensional hidden dual-memristor hyperchaotic system based on hashing is adopted. It combines global scrambling, block cat mapping scrambling, DNA diffusion, block affine transformation and finite field diffusion methods to encrypt the pixel position and pixel value of the image. Block cellular automata design is used to improve the anti-cropping ability, and hash function is used to generate initial values ​​of the chaotic system to enhance the key space and the anti-differential attack ability.

Benefits of technology

It improves the security of image encryption, enhances the key space, and improves the resistance to differential attacks and cropping, ensuring the integrity and security of image data in the event of noise interference and data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121000830A_ABST
    Figure CN121000830A_ABST
Patent Text Reader

Abstract

The invention relates to an image encryption method. The method comprises the steps of obtaining three groups of encryption keys based on a Hash method and superposition of preset real number key parameters; dividing the plaintext image into P11, P12 and P13; enabling the five-dimensional dual-memristor chaotic system to generate a sequence through the first group of encryption keys, and carrying out the global scrambling of P11, P12 and P13, thereby obtaining P21, P22 and P23; performing cat mapping scrambling on the P21, the P22 and the P23 to obtain P31, P32 and P33; performing block DNA operation on the P31, the P32 and the P33 through the second group of encryption key generation sequences; performing block cell automaton operation on the block DNA operation result to obtain P41, P42 and P43; performing block affine transformation scrambling on the P41, the P42 and the P43 to obtain P51, P52 and P53; and carrying out finite field diffusion on P51, P52 and P53 through the third group of encryption key generation sequences, and then merging layers to obtain a ciphertext image. According to the method, the differential attack resistance of the system can be improved, the key space of the system is improved, and the security of image data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, in particular to an image encryption method. BACKGROUND

[0002] With the development of remote medical and intelligent medical systems, the secure transmission and storage of medical images become crucial. Currently, medical image encryption mainly uses traditional encryption methods such as AES, DES, etc., but these methods have the following problems:

[0003] 1. Limited key space, insufficient resistance to brute force attacks;

[0004] 2. The change in image statistical properties is not obvious, and it is vulnerable to statistical attacks;

[0005] 3. Weak resistance to differential attacks;

[0006] 4. Unable to effectively resist noise interference and cropping attacks.

[0007] Currently, low-dimensional chaotic systems have been applied in image encryption, but their dynamic behavior is relatively simple and the key space is limited. At the same time, existing cellular automaton encryption techniques have insufficient resistance to cropping attacks, and their application in medical image encryption is not mature. SUMMARY

[0008] The present application provides an image encryption method to solve at least one of the above technical problems.

[0009] The technical solution of the present application to solve the above technical problems is as follows: an image encryption method, comprising:

[0010] S1, based on a hash method and superimposed with a preset real number key parameter, the three color channels of the plaintext image are encrypted and calculated, and three groups of encryption keys are obtained, which are the first group of encryption keys, the second group of encryption keys and the third group of encryption keys;

[0011] S2, the original plaintext image is divided into three pixel matrices P 11 , P 12 , P 13 , the block size of pixel matrix P 11 , P 12 , P 13 is t x t, if M / t or N / t is not an integer, the original plaintext image is zero-padded, and the image size of the zero-padded pixel matrix P 11 , P 12 , P 13 is M1 x N1;

[0012] S3, using the first set of encryption keys, the pre-constructed five-dimensional dual-memristor chaotic system generates a sequence X of length M1×N1. 11 X 12 X 13 X 14 X 15 and for sequence X 11 X 12 X 13 X 14 The sequence Y is obtained through processing. 11 Y 12 Y 13 And respectively for sequence Y 11 Y 12 Y 13 Perform ascending order processing to obtain the index sequences sy1, sy2, and sy3, and then perform sorting the pixel matrix P based on the index sequences sy1, sy2, and sy3. 11 P 12 P 13 Perform a global scrambling operation to obtain the corresponding pixel matrix P. 21 P 22 P 23 ;

[0013] S4, respectively, the pixel matrix P 21 P 22 P 23 Divide the data into (M1×N1) / (t×t) sub-blocks, and perform a cat mapping scrambling operation on each sub-block to obtain the corresponding pixel matrix P. 31 P 32 P 33 ;

[0014] S5, using the second set of encryption keys, the five-dimensional dual-memristor chaotic system generates a sequence X of length (M1×N1) / (t×t). 21 X 22 X 23 X 24 X 25 Using sequence X 21 X 22 X 24 X 14 For the pixel matrix P respectively 31 P 32 P 33 Performing a segmented DNA operation yields three corresponding DNA segment operation results;

[0015] S6, based on sequence X 11 X 12 X 13 X 14 X15 The results of the three segmented DNA operations were processed using a segmented cellular automaton to obtain the corresponding pixel matrix P. 41 P 42 P 43 ;

[0016] S7, respectively for pixel matrix P 41 P 42 P 43 Performing a block-based affine transformation scrambling operation yields the corresponding pixel matrix P. 51 P 52 P 53 ;

[0017] S8, using the third set of encryption keys, the five-dimensional dual-memristor chaotic system generates a sequence X of length 2×M1×N1. 31 X 32 X 33 X 34 X 35 Using sequence X 33 For pixel matrix P 51 P 52 P 53 After performing forward and reverse finite-domain diffusion, the layers are merged to obtain the encrypted image.

[0018] The beneficial effects of this invention are as follows: The image encryption method of this invention employs a five-dimensional hidden dual-memristor hyperchaotic system. This system has two positive Lyapunov exponents, and its system parameters and initial values ​​are highly sensitive. Dynamic analysis shows that the system maintains a chaotic state under a wide range of initial value changes, making it suitable for image encryption. This invention uses a hash function to generate the initial value of the chaotic system and can also add preset values ​​to the initial value generated by the hash function. This design can improve the system's resistance to differential attacks while increasing the system's key space. This invention employs a block-based cellular automaton design, which can improve the system's resistance to cropping. When a single pixel is lost, traditional cellular automata can cause error propagation, thus affecting the recovery of the entire image data. However, the block-based cellular automaton design of this invention divides the image into several independent sub-blocks, each running independent cellular automaton rules, thus limiting the impact to the damaged block. This invention also uses global scrambling, block-based cat mapping scrambling, DNA diffusion, block-based affine transformation, and finite field diffusion methods to change the pixel position and pixel value of the image, further improving the security of the image data. Attached Figure Description

[0019] Figure 1 This is a flowchart of an image encryption method according to the present invention;

[0020] Figure 2A schematic diagram of the principle of an image encryption method of the present application;

[0021] Figure 3 A bifurcation diagram and Lyapunov exponent spectrum of the five-dimensional double-scroll chaotic system with initial value transformation;

[0022] Figure 4 A bifurcation diagram and Lyapunov exponent spectrum of the five-dimensional double-scroll chaotic system with initial value transformation;

[0023] Figure 5 A schematic diagram of the sensitivity analysis of the five-dimensional double-scroll chaotic system;

[0024] Figure 6 A schematic diagram of the process of block DNA operation;

[0025] Figure 7 A schematic diagram of converting the pixel values of the sub-blocks into 8-bit binary form and rearranging them into a matrix;

[0026] Figure 8 A schematic diagram of converting the pixel values of the sub-blocks into 8-bit binary form and rearranging them into a matrix; A schematic diagram of filling the pad i with the pixel values of the sub-blocks;

[0027] Figure 9 A schematic diagram of the diffusion of the block cellular automaton from the top-left to the bottom-right;

[0028] Figure 10 A schematic diagram of the diffusion of the block cellular automaton from the bottom-right to the top-left;

[0029] Figure 11 A schematic diagram of the test results of image encryption and decryption;

[0030] Figure 12 A schematic diagram of an exemplary image histogram;

[0031] Figure 13 A schematic diagram of a correlation analysis;

[0032] Figure 14 A schematic diagram of key sensitivity;

[0033] Figure 15 A schematic diagram of the anti-clipping and anti-noise performance. DETAILED DESCRIPTION

[0034] The principles and features of the present application are described below in conjunction with the accompanying drawings, which are presented only for the purpose of explanation and are not intended to limit the scope of the present application.

[0035] As shown in Figure 1 and Figure 2 , an image encryption method comprises:

[0036] S1, performing encryption calculation on three color channels of the plaintext image based on a hash method and superimposing a preset real number key parameter, to obtain three groups of encryption keys, respectively a first group of encryption keys, a second group of encryption keys and a third group of encryption keys;

[0037] S2, dividing the original plaintext image into three pixel matrices P 11 , P 12 , and P 13 of size MxN, wherein the pixel matrix P 11 , P 12 , and P 13 is divided into blocks of size t x t, and if M / t or N / t is not an integer, the original plaintext image is zero-padded, and the pixel matrix P 11 , P 12 , and P 13 after zero-padding has a size of M1xN1;

[0038] S3, generating a sequence X 11 , X 12 , X 13 , X 14 , and X 15 of size M1xN1 by using the first group of encryption keys to make a pre-constructed five-dimensional double-memory-block chaotic system, and processing the sequence X 11 , X 12 , X 13 , and X 14 to obtain a sequence Y 11 , Y 12 , and Y 13 , performing ascending order processing on the sequence Y 11 , Y 12 , and Y 13 , respectively, to obtain index sequences sy1, sy2, and sy3, and performing a global scrambling operation on the pixel matrix P 11 , P 12 , and P 13 according to the index sequences sy1, sy2, and sy3, respectively, to obtain the pixel matrix P 21 , P 22 , and P 23 ;

[0039] S4, dividing the pixel matrix P 21 , P 22 , and P 23 into (M1xN1) / (t x t) sub-blocks, respectively, and performing a cat mapping scrambling operation on each sub-block, to obtain the pixel matrix P 31 , P 32 , and P 33 ;

[0040] S5, using the second set of encryption keys, the five-dimensional dual-memristor chaotic system generates a sequence X of length (M1×N1) / (t×t). 21 X 22 X 23 X 24 X 25 Using sequence X 21 X 22 X 24 X 14 For the pixel matrix P respectively 31 P 32 P 33 Performing a segmented DNA operation yields three corresponding DNA segment operation results;

[0041] S6, based on sequence X 11 X 12 X 13 X 14 X 15 The results of the three segmented DNA operations were processed using a segmented cellular automaton to obtain the corresponding pixel matrix P. 41 P 42 P 43 ;

[0042] S7, respectively for pixel matrix P 41 P 42 P 43 Performing a block-based affine transformation scrambling operation yields the corresponding pixel matrix P. 51 P 52 P 53 ;

[0043] S8, using the third set of encryption keys, the five-dimensional dual-memristor chaotic system generates a sequence X of length 2×M1×N1. 31 X 32 X 33 X 34 X 35 Using sequence X 33 For pixel matrix P 51 P 52 P 53 After performing forward and reverse finite-domain diffusion, the layers are merged to obtain the encrypted image.

[0044] In an image encryption method of the present invention:

[0045] 1. This invention employs a five-dimensional hidden dual memristor hyperchaotic system, which has two positive Lyapunov exponents and is highly sensitive to both system parameters and initial values. Dynamic analysis shows that the system maintains a chaotic state under a wide range of initial value changes, making it suitable for image encryption.

[0046] 2. This invention uses a hash function to generate initial values ​​for a chaotic system, and can also add preset values ​​to the initial values ​​generated by the hash function; this design can improve the system's resistance to differential attacks while increasing the system's key space.

[0047] 3. The present invention adopts a block cellular automaton design, which can improve the system's resistance to cropping. When a single pixel is lost, traditional cellular automata will cause error propagation, thereby affecting the recovery of the entire image data. However, the block cellular automaton design of the present invention divides the image into several independent sub-blocks, and each block runs independent cellular automaton rules, thus limiting the impact to the damaged block.

[0048] 4. This invention also employs global scrambling, block cat mapping scrambling, DNA diffusion, block affine transformation, and finite field diffusion methods to change the pixel position and pixel value of the image, further improving the security of image data.

[0049] The five-dimensional dual memristor chaotic system of this invention will be described below.

[0050] Reference 1 proposes a magnetically controlled memristor, which is represented as follows:

[0051] ; (1)

[0052] In the formula, It is a function of memory derivative. , and These represent the current flowing through the memristor, the voltage applied across the memristor, and the internal magnetic flux of the memristor, respectively.

[0053] Reference 2 proposes a classic Chen chaotic system. Based on this, a magnetically controlled memristor as shown in equation (1) is introduced to obtain a new five-dimensional dual-memristor chaotic system:

[0054] ; (2)

[0055] Where x, y, z, w, and u represent state variables, and a, b, c, k1, and k2 represent system parameters.

[0056] Let the system parameters be respectively , , , , The initial values ​​of the state variables are set to (0.1, 0.1, 0.1, 0.1, 0.1). Equation (2) is shown in the phase diagram of different planes as follows: Figure 3As shown, (a) is the xy plane, (b) is the xz plane, (c) is the yxu plane, and (d) is the yzw plane. The corresponding Lyapunov exponents are (1.8517, 0.0274, 0, –0.0128, –21.8945), with two positive Lyapunov exponents, indicating that the system is a hyperchaotic system. The calculations yield... Fractional dimension is This further verifies the chaotic characteristics of the system. Setting the right side of equation (2) to zero, we can obtain the equilibrium point of the system as follows: ,in Let be any real number. Since this system has infinitely many equilibrium points, it belongs to the category of hidden chaotic systems.

[0057] Fixed parameters , , , , The initial values ​​of the state variables are (0.1, 0.1, 0.1, ...). , 0.1). Select To control variables, bifurcation diagram and The index spectrum is as follows: Figure 4 As shown in (a) and (b) in the figure. Figure 4 (b) It is evident that the first and second articles The exponent spectrum remains constant and greater than 0, indicating that the system exhibits a constant Lyapunov exponent phenomenon and displays continuous hyperchaotic characteristics. Figure 4 The bifurcation diagram shown in (a) and The exponential spectrum phenomenon is consistent.

[0058] Chaotic systems exhibit high initial value sensitivity, which can improve the key sensitivity and key space of encryption methods when applied to image encryption. To investigate the sensitivity of this system to parameters and initial values, three sets of parameters and initial values ​​are set as follows:

[0059] ;

[0060] ;

[0061] ;

[0062] Choose the values ​​from the 501st to the 550th iteration for each group of variables, and their differences are as follows: Figure 5 As shown, (a) to (c) illustrate the system's sensitivity to initial values, while (d) to (e) demonstrate the system's sensitivity to parameters. It can be observed that after 500 iterations, the system generates different trajectories, indicating its extremely sensitive performance. This provides a guarantee for the key space and key sensitivity of the encryption method.

[0063] The following section provides a detailed description of each step in the image encryption method of the present invention.

[0064] In some embodiments, S1 specifically refers to:

[0065] S11, the three color channels of the plaintext image are converted into 256-bit binary sequences respectively using the SHA-256 hash method;

[0066] S12, divide the three binary sequences into five groups, convert them into floating-point values, and then superimpose them with a corresponding set of preset real-number key parameters to obtain three encryption keys, which are represented as follows:

[0067] ; (3)

[0068] In the formula, i = 1, 2, 3, {kx i ky i 、kz i ,kw i , ku i} represents the i-th encryption key, K i This represents the 256-bit binary sequence converted from the i-th color channel of the plaintext image using the SHA-256 hash method. `change` represents the function that converts the binary sequence into a floating-point number. {Kx i Ky i Kz i Kw i Ku i} represents the i-th group of preset real key parameters.

[0069] Specifically, in S1, the plaintext image is first converted into a 64-bit hexadecimal character sequence using the SHA-256 hash method. Then, each hexadecimal character is converted into a 4-bit binary representation, resulting in a 256-bit binary sequence. Based on this sequence, the binary sequence is divided into several groups according to the grouping rules defined in equation (3), and each group is converted into a corresponding floating-point value. To further enhance the randomness of the key, a set of preset real-valued key parameters are superimposed on the generated floating-point value. Finally, the value obtained after the above processing will be used as the initial condition of the chaotic system, i.e., as the encryption key of the method of this invention. In addition, since the control parameters of the five-dimensional dual-memristor chaotic system are highly sensitive, preset values ​​are used for the parameters of the five-dimensional dual-memristor chaotic system to improve the key space and enhance system security.

[0070] In some embodiments, in step S2, the formula for padding the original plaintext image with zeros is:

[0071] P1i (M1, N1) = 0; (4)

[0072] where i = 1, 2, 3, M1 = M + t - mod(M, t), N1 = N + t - mod(N, t).

[0073] Specifically, in the present application, the image is divided into several regular sub-blocks for the operation of block scrambling and the like. Considering the diversity of the size of the input image in practical applications, in order to ensure the feasibility of the block operation, when the length or width of the image matrix cannot meet the requirement of the integer division of the block size, a zero padding operation needs to be performed. This preprocessing step aims to ensure the smooth execution of the subsequent encryption process.

[0074] In some embodiments, in the S3, the sequence X 11 , X 12 , X 13 , X 14 is processed according to the formula:

[0075] ; (5)

[0076] where abs represents the absolute value operation function, floor represents the floor operation function, and mod represents the modulo operation function; i = 1, 2, 3, 4, j = 1, 2,..., M1 x N1, X 1i (j) represents the jth sequence value in the sequence X 1i ;

[0077] The formula for performing a global scrambling operation on the pixel matrix P 11 , P 12 , P 13 is:

[0078] ; (6)

[0079] where i = 1, 2, 3, j = 1, 2,..., M1 x N1, P 2i (j) represents the jth pixel value in the pixel matrix P 2i , sy i (j) represents the jth index sequence value in the index sequence sy i .

[0080] In some embodiments, in the S4, the formula for performing a cat mapping scrambling operation on the sub-block is:

[0081] ; (7)

[0082] where (x 11 , y 11) represents the position of the pixel in the sub-block before the cat map scrambling, (x 12 , y 12 ) represents the position of the pixel in the sub-block after the cat map scrambling; d, e, count are cat map scrambling coefficients, and d = 2, e = 3, count = 6; mod represents the remainder operation function.

[0083] In some embodiments, the S5 is specifically:

[0084] S51, the five-dimensional double memory block chaotic system generates sequences X 21 , X 22 , X 23 , X 24 , X 25 with the length of (M1×N1) / (t×t) through the 2nd group of encryption keys, and sequences X 21 , X 22 , X 24 are selected for processing to obtain sequences Y 21 , Y 22 , Y 24 ; wherein the formula for processing X 21 , X 22 , X 24 is:

[0085] ; (8)

[0086] In the formula, i = 1, 2, 4, j = 1, 2, …, (M1×N1) / (t×t), Y 2i (j) represents the jth sequence value in the sequence Y 2i , X 2i (j) represents the jth sequence value in the sequence X 2i ; mod represents the remainder operation function, round represents the rounding function; Y 21 corresponds to 8 encoding modes, Y 22 corresponds to 4 operation modes, and Y 24 corresponds to 8 decoding modes.

[0087] S52, the sequence X 14 is processed to obtain the sequence Y 14 and the matrix T; wherein the formula for processing the sequence X 14 is:

[0088] ; (9)

[0089] In the formula, abs represents the absolute value operation function, mod represents the remainder operation function, and reshape represents the function of rearranging the sequence into a matrix;

[0090] S53, respectively, the pixel matrix P 31 , P 32 , P 33 is divided into (M1xN1) / (txt) sub-blocks of size txt, and each sub-block is encoded according to the corresponding DNA encoding mode selected according to the value of the sequence Y 21 , and the corresponding DNA encoding mode is selected according to the value of the sequence Y 21 (1) the matrix T is encoded according to the corresponding encoding mode;

[0091] S54, according to the value of the sequence Y 22 , the corresponding operation mode is selected, and the pixel matrix P 31 , P 32 , P 33 is respectively DNA operated with the matrix T of the first sub-block of each pixel matrix, and three operation results are obtained, and thereafter, each encoded sub-block in the pixel matrix P 31 , P 32 , P 33 is respectively DNA operated with the corresponding operation result of the previous time, and three final operation results are obtained;

[0092] S55, according to the value of the sequence Y 22 , the corresponding decoding mode is selected, and the three final operation results are decoded to obtain three block DNA operation results.

[0093] Specifically, taking the first two sub-blocks of the sequence P 31 as an example, Figure 6 the process of DNA encoding, operation and decoding in the process of block DNA operation is shown.

[0094] In some embodiments, the S6 is specifically:

[0095] S61, processing the sequences X 11 , X 12 , X 13 , X 14 , X 15 to obtain the sequences Y 15 , Y 16 , Y 17 ; wherein the formula for processing the sequences X 11 , X 12 , X 13 , X 14 , X 15 is:

[0096] ; (10)

[0097] In the formula, floor represents the down rounding function, and mod represents the remainder operation function;

[0098] S62, (2t+4)(4t+2) sequence values are selected from sequences Y 15 , Y 16 , Y 17 , and the selected sequence values are arranged into a matrix pad i of size (2t+4) x (4t+2); wherein the formula for arranging the selected sequence values into the matrix pad i of size (2t+4) x (4t+2) is:

[0099] ; (11)

[0100] In the formula, i = 5, 6, 7; reshape represents a function of rearranging sequences into matrices;

[0101] S63, each decoded sub-block pixel value in the three sub-block DNA operation results is converted into an 8-bit binary form, and rearranged into a matrix block i of size 2t x 4t; wherein the formula for rearranging each decoded sub-block pixel value in the 8-bit binary form into the matrix block i of size 2t x 4t is:

[0102] ; (12)

[0103] In the formula, i = 1, 2, 3, j = 1, 2,..., (M1 x N1) / (t x t), represents a binary sequence converted from the jth decoded sub-block in the ith sub-block DNA operation result, represents the jth element in the matrix block i ;

[0104] Specifically, an example of rearranging each decoded sub-block pixel value in the 8-bit binary form into the matrix block i of size 2t x 4t is shown in Figure 7 ;

[0105] S64, fills into pad i ; wherein the formula for filling into pad i is:

[0106] ; (13)

[0107] Specifically, an example of filling into pad i is shown in Figure 8 ;

[0108] S65, for filling to In For each pixel value, the sum of its six neighboring pixels (from top left to bottom right) is calculated, and the remainder is taken. Then, according to cell evolution rules, the current cell value is XORed with the remainder to obtain the initially updated cell value, thus completing the process. The initial update of all pixel values;

[0109] Specifically, for cells During the forward update phase, its neighborhood structure consists of the following 6 cells: ;

[0110] The evolutionary rules are: .

[0111] An example of a segmented cellular automaton spreading from the top left to the bottom right is shown below. Figure 9 As shown.

[0112] S66, for filling to In For each initial pixel value update, following the order from bottom right to top left, the cell value is updated by calculating the sum of the values ​​of its six neighboring pixels, taking the remainder, and then, according to cell evolution rules, XORing the cell's current value with the remainder to obtain the updated cell value, thus completing the process. The entire pixel is updated again, thus obtaining the filling update matrix;

[0113] Specifically, an example of the segmented cellular automata spreading from the bottom right to the top left is as follows: Figure 10 As shown;

[0114] S67, extract the central region (3:2t+2, 2:4t+1) from the filling update matrix as a new sub-block;

[0115] S68 rearranges the new sub-blocks into 8 columns (each group of 8 bits represents a pixel) and converts each 8-bit binary value back to a decimal pixel value to form a one-dimensional pixel vector.

[0116] S69, reorganize the one-dimensional pixel vector into t×t decimal sub-blocks, and combine all the decimal sub-blocks to obtain the corresponding pixel matrix P. 41 P 42 P 43 .

[0117] In some embodiments, S7 specifically involves: processing the pixel matrix P respectively. 41 P 42 P 43The image is divided into blocks, and multiple affine transformations are performed on each sub-block to obtain the corresponding pixel matrix P. 51 P 52 P 53 The formula for performing multiple rounds of affine transformation on each sub-block is as follows:

[0118] ;(14)

[0119] ; (15)

[0120] In the formula, i = 1, 2, 3, This indicates the position of the pixel before the affine transformation operation. The pixel matrix P represents the position of the pixel after the affine transformation operation, and r represents the number of rounds of the affine transformation operation. When r is the number of the last round of the affine transformation operation, the pixel matrix P... 4i (r) For pixel matrix P 5i In this embodiment, the number of rounds of the affine transformation operation is set to 5, that is, 5 rounds of affine transformation operation are performed on each sub-block, P 4i (5) =P 5i .

[0121] In some embodiments, S8 specifically refers to:

[0122] S81, using the third set of encryption keys, the five-dimensional dual-memristor chaotic system generates a sequence X of length 2×M1×N1. 31 X 32 X 33 X 34 X 35 And select sequence X 33 The processing yields sequences S1 and S2; among them, for column X... 33 The formula for processing is:

[0123] ; (16)

[0124] In the formula, mod represents the modulo operation function;

[0125] S82, construct the multiplication table TB; where the multiplication table TB is represented as:

[0126] ; (17)

[0127] S83, based on sequences S1, S2 and multiplication table TB, calculate the pixel matrix P. 51 P 52 P 53 After performing forward and reverse finite-field diffusion, the layers are merged to obtain the encrypted image; where, for the pixel matrix P51 P 52 P 53 The formulas for forward and reverse finite field diffusion are:

[0128] ; (18)

[0129] ; (19)

[0130] In the formula, i = 1, 2, 3, j = 1, 2, ..., M1 × N1, This represents the j-th sequence value in sequence S1. Represents sequence P 5i The j-th sequence value in the sequence, Indicates diffusion sequence The j-th sequence value in the sequence, Indicates diffusion sequence The j-th sequence value in the sequence.

[0131] Finally, a performance analysis of the image encryption method of the present invention is performed.

[0132] Encryption and decryption:

[0133] The experiment used 512×512 medical images and Lena images for encryption and decryption tests, and the results are as follows: Figure 11 As shown, (a)~(d) are plaintext images, (e)~(h) are ciphertext images, and (i)~(l) are decrypted images. From... Figure 11 It can be observed that the encrypted image contains random noise and the original information cannot be identified, indicating that the method of the present invention can effectively prevent information leakage; while the decrypted image is completely consistent with the plaintext image, verifying the accuracy and effectiveness of the method of the present invention.

[0134] Histograms and chi-squares:

[0135] Histograms reflect the frequency distribution of pixel values. Figure 12 Given Figure 11 The histograms of the plaintext and ciphertext images are shown, where (a)~(d) are the plaintext image histograms, and (e)~(h) are the ciphertext image histograms. From Figure 12 As can be seen, the pixels of the ciphertext image are evenly distributed, making it difficult for attackers to obtain statistical information about the plaintext image.

[0136] The Chi-Square Test is a statistical method that can also be used to evaluate the uniformity of a histogram of a ciphertext image. It determines whether the ciphertext image approximates a random distribution by comparing the difference between the actual pixel value frequencies and the theoretical uniform distribution. The formula is as follows:

[0137] (20)

[0138] In the formula, O f represents the frequency of the actual observed gray value f. And E f represents the theoretically expected frequency.

[0139] When the confidence level is set to 0.05, the chi-square critical value for judging the uniformity of the histogram is 293.24784. The lower the value, the smaller the deviation of the actual distribution from the ideal uniform distribution, and the stronger the uniformity. Table 1 gives the results of the chi-square test of different ciphertext images. As can be seen from Table 1, the ciphertext images of all test images meet the requirements of the chi-square test, indicating that the pixel gray value distribution is close to a random uniform distribution, and the statistical features of the plaintext can be effectively hidden.

[0140] Table 1: Chi-square test table

[0141]

[0142] Information entropy:

[0143] Information entropy is an important indicator for evaluating the randomness of ciphertext images. The closer the value is to 8, the higher the degree of chaos of pixel distribution, and the stronger the ability to resist statistical attacks. The formula for calculating information entropy is as follows:

[0144] (21)

[0145] In the formula, , represents the probability of occurrence.

[0146] Table 2 provides the information entropy of the ciphertext images of different test images. As can be seen from Table 2, the information entropy of all ciphertext images is close to 8. Therefore, the method of the present application has good ability to resist statistical attacks.

[0147] Table 2: Information entropy

[0148]

[0149] Correlation analysis:

[0150] There is a strong correlation between the pixels of the plaintext image, so the correlation should be reduced after image encryption. The correlation is usually represented by the correlation coefficient

[0151] (22)

[0152] In the formula, is the total number of adjacent pixel pairs; and are the values of adjacent pixels, ; ​a correlation coefficient of adjacent pixels; a covariance of adjacent pixels; and a standard deviation of adjacent pixels, respectively.

[0153] To verify the performance of the encryption method of the present application, 10000 pairs of adjacent pixels are randomly selected from the plaintext image and the ciphertext image, respectively, and the correlation coefficients thereof are calculated by using formula (22), and the experimental results are shown in Table 3. As can be seen from Table 3, the correlation coefficients of the ciphertext image in the horizontal, vertical and diagonal directions are close to 0, which indicates that there is almost no correlation between the adjacent pixels of the ciphertext image. Figure 13 The correlation diagrams of the Lena test image before and after encryption are shown, wherein (a)-(c) are the correlation diagrams of the plaintext image; and (d)-(f) are the correlation diagrams of the ciphertext image.

[0154] Table 3: Correlation coefficients

[0155]

[0156] Key space:

[0157] In the present application, the key of the five-dimensional double-memristive chaotic system is 5 preset system parameters, a 256-bit hash value and 5 preset real number key parameters. If the precision of each parameter is 10 -15 , then the key space of the system is . Since it is much larger than , the method of the present application can effectively resist brute force attack.

[0158] Key sensitivity:

[0159] Key sensitivity is divided into encryption key sensitivity and decryption key sensitivity. Encryption key sensitivity refers to the difference degree of ciphertext generated by different encryption keys; decryption key sensitivity refers to the ability that the plaintext cannot be restored when a non-correct decryption key is used. In order to detect the encryption sensitivity of the encryption method of the present application, the key is perturbed (10 -15 ). The NPCR and UACI of the ciphertext image before and after perturbation are 99.612% and 33.475%, respectively. It can be seen that after the key is perturbed, the ciphertext image changes greatly. In order to test the decryption sensitivity of the encryption method of the present application, the correct key and the perturbed key are used to decrypt the image +10 -15 , and the decrypted images are shown as (a) and (b) in Figure 14 , respectively. It can be seen that the perturbed key cannot be used for decryption, and the method of the present application has good decryption sensitivity.

[0160] Resistance to differential attack:

[0161] The differential attack resistance capability is a key indicator for evaluating the security of an encryption method, mainly reflected in the sensitivity of the method to slight changes in the plaintext. The stronger the sensitivity, the higher the security of the method. This capability is usually quantified by two indicators, NPCR and UACI:

[0162] ; (23)

[0163] In the formula, U and V are the image size; O1 and O2 are the ciphertext images, respectively.

[0164] Table 4 provides the NPCR and UACI of the ciphertext images of different test images. It can be observed from Table 4 that the NPCR and UACI of different ciphertext images are close to the ideal value. Therefore, the encryption method of the present application has good anti-differential attack capability.

[0165] Table 4: NPCR and UACI

[0166]

[0167] Anti-clipping and anti-noise analysis:

[0168] In the transmission and storage of medical image data, data loss and noise interference problems may be difficult to avoid. Therefore, the encryption method needs to have the ability to resist data loss and noise interference, so as to ensure that even if the ciphertext image is partially damaged or contaminated by noise, the decrypted image can still retain the key diagnostic information of the original medical image. To evaluate the anti-clipping attack and anti-noise performance of the encryption method of the present application, different specifications of the ciphertext image were tested for clipping and adding Gaussian noise, and the experimental results are shown in Figure 15 , where (a) is the ciphertext with 0.01% noise, (b) is the ciphertext with 0.1% noise, (c) is the ciphertext with 1 / 32 clipping, (d) is the ciphertext with 1 / 2 clipping, (e) is the plaintext with 0.01% noise, (f) is the plaintext with 0.1% noise, (g) is the plaintext with 1 / 32 clipping, and (h) is the plaintext with 1 / 2 clipping. From Figure 15 It can be observed that even if the ciphertext image is partially damaged or contaminated by noise, the decrypted image can still clearly present the key information of the plaintext image. It can be seen that the encryption method proposed in the present application has good security.

[0169] Data comparison:

[0170] To verify the security of the encryption method of the present application, a comprehensive comparison was made with existing mainstream encryption methods. For literature data, the average value was directly adopted. The comparison results of the data are shown in Table 5 and Table 6. The results show that the encryption method of the present application has reached the optimal level in all security indicators, especially in resisting statistical attacks and differential attacks, thereby ensuring the security of the system. The performance score of the encryption method proposed by the present application is comparable to that of the existing most advanced encryption methods. This confirms the ability of the encryption method of the present application to resist statistical and differential attacks.

[0171] Table 5: Comparison of chi-square test, correlation coefficient and information entropy

[0172]

[0173] Table 6: Comparison of differential attack resistance

[0174]

[0175] Literature 1: Wu Y, Zhang L, Berretti S, et al. Medical image encryption by content-aware DNA computing for secure healthcare[J]. IEEE Transactions on Industrial Informatics, 2022, 19(2): 2089-2098.

[0176] Literature 2: Wei D, Jiang M, Deng Y. A secure image encryption algorithm based on hyper-chaotic and bit-level permutation[J]. Expert Systems with Applications, 2023, 213: 119074.

[0177] Literature 3: Rahul B, Kuppusamy K, Senthilrajan A. Dynamic DNA cryptography-based image encryption scheme using multiple chaotic maps and SHA-256 hash function[J]. Optik, 2023, 289: 171253.

[0178] Document 4: Yousif S F, Abboud A J, Alhumaima R S. A new image encryption based on bit replacing, chaos and DNA coding techniques[J]. Multimedia Tools and Applications, 2022, 81(19): 27453-27493.

[0179] Document 5: Zhou W, Wang X, Wang M, et al. A new combination chaotic system and its application in a new bit-level image encryption scheme[J]. Optics and Lasers in Engineering, 2022, 149: 106782.

[0180] Document 6: Wu H, Ye G, Yap W-S, et al. Reversible blind image hiding algorithm based on compressive sensing and fusion mechanism[J]. Optics and Laser Technology, 2023, 167: 109755.

[0181] Document 7: Niu Y, Zhou Z, Zhang X. An image encryption approach based on chaotic maps and genetic operations[J]. Multimedia Tools and Applications, 2020, 79(35): 25613-25633.

[0182] Document 8: Gao M, Li J, Di X, et al. A blind signature scheme for IoV based on 2D-SCML image encryption and lattice cipher[J]. Expert Systems with Applications, 2024, 246: 123215.

[0183] Document 9: Lai Q, Hua H. Secure medical image encryption scheme for Healthcare IoT using novel hyperchaotic map and DNA cubes [J]. Expert Systems with Applications, 2025, 264: 125854.

[0184] The above description is merely that of the preferred embodiments of the application, and is not intended to limit the application. Any modification, equivalent replacements, improvements, and the like made within the spirit and principle of the application shall be included in the protection scope of the application.

Claims

1. An image encryption method characterized by, Comprise: S1, based on the hash method and superimposed on the preset real key parameters of the three color channels of the plaintext image encryption calculation, corresponding to obtain three groups of encryption keys, and respectively the first group of encryption keys, the second group of encryption keys and the third group of encryption keys; S2, dividing the original plaintext image into three pixel matrices P 11 , 12 , 13 , assuming that the block size of the pixel matrix P 11 , 12 , 13 is t x t, if M / t or N / t is not an integer, performing zero padding on the original plaintext image, and assuming that the image size of the zero-padded pixel matrix P 11 , 12 , 13 is M1 x N1; S3, the pre-constructed five-dimensional double-memorized block chaotic system generates a sequence X with a length of M1xN1 by the first group of encryption keys 11 , X 12 , X 13 , X 14 , X 15 , and processes the sequence X 11 , X 12 , X 13 , X 14 to obtain a sequence Y 11 , Y 12 , Y 13 , respectively processes the sequence Y 11 , Y 12 , Y 13 in ascending order, and correspondingly obtains index sequences sy1, sy2 and sy3, and performs a global scrambling operation on the pixel matrix P 11 , P 12 , P 13 according to the index sequences sy1, sy2 and sy3, and correspondingly obtains the pixel matrix P 21 , P 22 , P 23 ; S4, respectively, divide the pixel matrix P 21 , 22 , 23 P into (M1xN1) / (txt) sub-blocks, and perform the cat mapping scrambling operation on each sub-block, to obtain the pixel matrix P 31 , 32 , 33 P correspondingly; S5, generating a sequence X with length of (M1×N1) / (t×t) by the fifth-dimensional double-memorized-block chaotic system through the second group of encryption keys 21 , X 22 , X 23 , X 24 , X 25 , using the sequence X 21 , X 22 , X 24 , X 14 respectively to perform the block DNA operation on the pixel matrix P 31 , P 32 , P 33 , and correspondingly obtaining three block DNA operation results S6, according to sequence X 11 , X 12 , X 13 , X 14 , X 15 Respectively, the three block DNA operation results are operated by block cellular automata, and the pixel matrix P 41 , P 42 , P 43 ; S7, respectively, the pixel matrix P 41 , P 42 , P 43 block affine transformation scrambling operation, corresponding to get the pixel matrix P 51 , P 52 , P 53 ; S8, generating a sequence X with length of 2*M1*N1 by the fifth-dimensional double-memory-block chaotic system with the third group of encryption keys 31 , X 32 , X 33 , X 34 , X 35 , using the sequence X 33 to perform forward and reverse finite field diffusion on the pixel matrix P 51 , P 52 , P 53 , and then merging the layers to obtain a ciphertext image.

2. The image encryption method of claim 1, wherein, The S1 is specifically: S11, the three color channels of the plaintext image are converted into 256-bit binary sequences by SHA-256 hash method respectively; S12, three binary sequences are divided into five groups respectively, then converted into floating point values and superimposed on the corresponding preset real key parameters to obtain three groups of encryption keys, and the three groups of encryption keys are represented as: ; where i = 1, 2, 3, {kx i , ky i , kz i , kw i , ku i} represents the i-th group of encryption keys, K i represents a 256-bit binary sequence converted from the i-th color channel of the three color channels of the plaintext image processed by the SHA-256 hashing method, change represents an operation function for converting the binary sequence into a floating-point number, and {Kx i , Ky i , Kz i , Kw i , Ku i} represents the i-th group of preset real number key parameters.

3. The image encryption method of claim 1, wherein, In the S2, the formula for zero padding the original plaintext image is: P 1i (M1, N1) = 0; In the formula, i=1, 2, 3, M1=M+t-mod(M,t), N1=N+t-mod(N,t).

4. The image encryption method of claim 1, wherein, In the S3, the sequence X 11 , X 12 , X 13 , X 14 is processed by the formula: ; In the formula, abs represents an absolute value operation function, floor represents a down-round operation function, and mod represents a remainder operation function; i = 1, 2, 3, 4, j = 1, 2,..., M1xN1, X 1i (j) represents the jth sequence value in the sequence X 1i . The pixel matrix P 11 , P 12 , P 13 The formula for performing a global scrambling operation is: ; where i = 1, 2, 3, j = 1, 2,..., M1xN1, P 2i (j) denotes the jth pixel value in the pixel matrix P 2i (j) denotes the jth pixel value in the pixel matrix P i (j) denotes the jth index sequence value in the index sequence sy i (j) denotes the jth index sequence value in the index sequence sy 5. The image encryption method of claim 1, wherein, In the S4, the formula for the cat mapping scrambling operation of the sub-block is: ; wherein (x 11 , y 11 ) represents the position of the pixel in the sub-block before the cat map scrambling, (x 12 , y 12 ) represents the position of the pixel in the sub-block after the cat map scrambling; d, e, count are cat map scrambling coefficients, and d = 2, e = 3, count = 6; mod represents the remainder operation function.

6. The image encryption method of claim 1, wherein, The S5 is specifically: S51, generating a sequence X with length of (M1×N1) / (t×t) by the fifth-dimensional double-memorized-block chaotic system through the second group of encryption keys 21 , X 22 , X 23 , X 24 , X 25 , and selecting the sequence X 21 , X 22 , X 24 to process, and obtaining a sequence Y 21 , Y 22 , Y 24 ; wherein the formula for processing X 21 , X 22 , X 24 is ; where i = 1, 2, 4, j = 1, 2,..., (M1 x N1) / (t x t), Y 2i (j) denotes the jth sequence value in the sequence Y 2i (j) denotes the jth sequence value in the sequence X 2i (j) denotes the jth sequence value in the sequence Y 2i (j) denotes the jth sequence value in the sequence X; mod denotes the modulo operation function, and round denotes the rounding function. S52, process sequence X 14 to obtain sequence Y 14 and matrix T; wherein sequence X 14 is processed according to the formula: ; In the formula, abs represents the absolute value operation function, mod represents the remainder operation function, and reshape represents the function of rearranging the sequence into a matrix; S53, respectively divide the pixel matrix P 31 , P 32 , P 33 into (M1 x N1) / (t x t) sub-blocks of size t x t, and encode each sub-block according to a corresponding DNA encoding mode selected according to the value of the sequence Y 21 , and encode the matrix T by the sequence Y 21 (1) corresponding encoding mode; S54, selecting the corresponding operation mode according to the value of sequence Y 22 , respectively, and performing DNA operation on each of the first sub-blocks of the pixel matrix P 31 , P 32 , P 33 and the matrix T to obtain three operation results, and then performing DNA operation on each of the encoded sub-blocks of the pixel matrix P 31 , P 32 , P 33 and the corresponding operation result of the previous time to obtain three final operation results; S55, according to the sequence Y 22 of values to select the corresponding decoding mode, and decode the three final operation results respectively to obtain the three block DNA operation results.

7. The image encryption method according to claim 6, characterized in that, The S6 is specifically: S61, processing sequence X 11 , X 12 , X 13 , X 14 , X 15 to obtain sequence Y 15 , Y 16 , Y 17 ; wherein the formula for processing sequence X 11 , X 12 , X 13 , X 14 , X 15 is: ; In the formula, floor represents the floor operation function, and mod represents the remainder operation function; S62, (2t+4)(4t+2) sequence values are selected from sequences Y 15 , Y 16 , Y 17 , and the selected sequence values are arranged into a matrix pad i of size (2t+4)×(4t+2); wherein the formula for arranging the selected sequence values into the matrix pad i of size (2t+4)×(4t+2) is: ; In the formula, i=5, 6, 7; reshape represents the function of rearranging the sequence into a matrix; S63, convert each decoded sub-block pixel value in the three sub-block DNA operation results into 8-bit binary form respectively, and rearrange as a 2t x 4t matrix block i ; wherein each decoded sub-block pixel value in 8-bit binary form is rearranged as a 2t x 4t matrix block i The formula is: ; where i = 1, 2, 3, j = 1, 2,..., (M1 x N1) / (t x t), represents a binary sequence obtained by converting the jth decoded sub-block in the ith partial-block DNA operation result, represents the jth element in the matrix block i . S64, fill to pad i ; wherein the formula for filling to pad i is: ; S65, for filling to In For each pixel value, the sum of its six neighboring pixels (from top left to bottom right) is calculated, and the remainder is taken. Then, according to cell evolution rules, the current cell value is XORed with the remainder to obtain the initially updated cell value, thus completing the process. The initial update of all pixel values; S66, for each initial update pixel value filled into , in the order from right bottom to left top, update the cell value by calculating the sum of six pixel values of its neighbor structure, take the remainder, and XOR the current cell value with the remainder according to the cell evolution rule to obtain the second update cell value, thereby completing the second update of all pixels in , and further obtaining the filled update matrix. ​ S67, extracting the center region (3:2t+2, 2:4t+1) from the padding update matrix as a new sub-block; S68, rearranging the new sub-block into 8 columns, and converting each 8-bit binary back to decimal pixel value to form a one-dimensional pixel vector; S69, reorganize the one-dimensional pixel vector into t x t decimal sub-blocks, combine all the decimal sub-blocks, and correspondingly obtain a pixel matrix P 41 , P 42 , P 43 .

8. The image encryption method of claim 1, wherein, The S7 is specifically: respectively block P 41 , P 42 , P 43 , and perform multi-round affine transformation operation on each sub-block to correspondingly obtain pixel matrix P 51 , P 52 , P 53 ; wherein the formula for performing multi-round affine transformation operation on each sub-block is: ; ; where i = 1, 2, 3, represents the position of a pixel before the affine transformation operation, represents the position of a pixel after the affine transformation operation, and r represents the round number of the affine transformation operation; when r is the last round number of the affine transformation operation, the pixel matrix P 4i (r) is the pixel matrix P 5i .

9. The image encryption method of claim 1, wherein, The S8 is specifically: S81, generating a sequence X of length 2xM1xN1 by the fifth-dimensional double-memory-block chaotic system with the third group of encryption keys 31 , X 32 , X 33 , X 34 , X 35 , and selecting a sequence X 33 to obtain sequences S1 and S2 by processing; wherein the formula for processing the sequence X 33 is: ; In the formula, mod represents the remainder operation function; S82, construct multiplication table TB; wherein, multiplication table TB is represented as: ; S83, merging the layers after forward and reverse finite field diffusion according to the sequences S1, S2 and the multiplication table TB to obtain a ciphertext image; wherein the formula for performing forward and reverse finite field diffusion on the pixel matrix P 51 , P 52 , P 53 forward and reverse finite field diffusion is as follows: 51 , P 52 , P 53 forward and reverse finite field diffusion is as follows: ; ; where i = 1, 2, 3, j = 1, 2,..., M1xN1, denotes the jth sequence value in the sequence S1, denotes the jth sequence value in the sequence P 5i denotes the jth sequence value in the sequence P denotes the jth sequence value in the spread sequence denotes the jth sequence value in the spread sequence denotes the jth sequence value in the spread sequence denotes the jth sequence value in the spread sequence 10. The image encryption method of claim 1, wherein, The five-dimensional double memory resistance chaotic system is represented as: ; Wherein, x, y, z, w, u all represent state variables, a, b, c, k1, k2 all represent system parameters.

Citation Information

Patent Citations

  • 4-neighborhood exclusive or image encryption method based on hyper-chaos Lorenz system

    CN103491279A

  • Color image compression encryption method based on two-dimensional compressed sensing and memristor chaotic system

    CN111614455A

  • Image encryption method and device, image decryption method and device, electronic equipment and medium

    CN113793245A

  • Image encryption method and device, terminal and storage medium

    CN117527182A

  • KR20250069356A