Image Encryption Method and System Based on the Coupling of DNA Dynamic Encoding and Biological Hyperchaos

Through the image encryption method coupled with biological hyperchaos, the Logistic chaotic system and the adaptive fruit fly-parasibee four-dimensional hyperchaos system generate multiple sets of chaotic sequences, dynamically select DNA encoding rules and operation rules, and combined with chaotic operations, the problem of insufficient security and adaptability of existing image encryption methods is solved, and efficient and secure image encryption is achieved.

CN120017769BActive Publication Date: 2025-07-08JIANGXI NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510474046.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-08
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

The existing image encryption methods have shortcomings in terms of security, attack resistance, dynamic adaptability and computing efficiency, and it is difficult to meet the needs of high-security image protection.

Method used

The image encryption method based on the coupling of DNA dynamic encoding and biological hyperchaos is adopted, and multiple sets of chaotic sequences are generated using the Logistic chaotic system and the four-dimensional hyperchaos system of adaptive fruit fly-parasitic bees, DNA encoding rules and operation rules are dynamically selected, and combined with chaotic operations are combined to achieve efficient encryption of images.

Benefits of technology

It improves the security and attack resistance of the encryption system, enhances the adaptability to different images, reduces the computational complexity, and meets the needs of high-security image protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017769B_ABST
    Figure CN120017769B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image information security, and discloses an image encryption method and system based on the coupling of DNA dynamic coding and biological hyperchaos. The method first performs preprocessing of block division and zero padding on the original image; then, a chaotic sequence with high complexity and randomness is generated by coupling the Logistic chaotic system and the adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system; next, the generated chaotic sequence is used to dynamically select DNA coding rules and DNA operation rules to perform dynamic DNA coding and operations on the image data and the matrix generated by another chaotic sequence; afterwards, the encrypted data is subjected to row and column scrambling using the chaotic sequence to enhance the anti-cropping ability; finally, the encrypted image is output. The present invention generates a highly random sequence by coupling biological hyperchaotic systems, and combines dynamically switched DNA coding and operation rules to achieve the encryption effect of "one image, one key", significantly improving the security of encryption and the adaptability to different images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image information security, and in particular, to an image encryption method and system based on the coupling of DNA dynamic coding and biological hyperchaos. Background Art

[0002] As an important carrier for information transmission, images are increasingly widely used in fields such as medical treatment and finance. However, image data faces serious security threats during the process of transmission and storage, such as data leakage, tampering, and illegal access. Therefore, image encryption technology has become one of the key means to ensure image information security.

[0003] Existing image encryption methods mainly rely on traditional symmetric encryption algorithms (such as AES, DES) or chaotic systems (such as Logistic mapping, Henon mapping). Although these methods provide a certain degree of protection, they have obvious deficiencies: 1) The traditional encryption algorithms have limited hiding effects on the inherent statistical characteristics of images (such as strong correlation between pixels, non-uniform histogram distribution), and are vulnerable to statistical analysis attacks; 2) Encryption methods based on mathematical transformation have high computational complexity when dealing with high-resolution and large-volume images, and it is difficult to meet the requirements of real-time applications; 3) The dynamic behaviors of some low-dimensional chaotic systems are relatively simple, and the key space is limited, and they may be cracked or predicted by brute force.

[0004] In recent years, DNA (deoxyribonucleic acid) coding technology has been introduced into the field of image encryption due to its huge information storage density and potential parallel computing ability. By mapping pixel values to DNA base sequences (A, T, C, G) and combining the randomness of chaotic systems, more complex encryption schemes can be designed. At the same time, hyperchaotic systems, such as systems with multiple positive Lyapunov exponents (such as the adaptive Drosophila-parasitoid model), are considered to be able to further enhance the security of encryption algorithms due to their more complex dynamic behaviors, higher sensitivity, and larger key space.

[0005] However, current image encryption methods based on DNA coding and chaotic / hyperchaotic systems still have some problems: 1. Many methods adopt fixed DNA coding rules and operation rules, lacking dynamics. Once the rules are leaked, the security will be greatly reduced; 2. Some algorithms still need to strengthen their resistance to advanced cryptographic analysis attacks, such as differential attacks and known plaintext attacks; 3. Existing methods often adopt a unified encryption process and fail to make adaptive adjustments according to the characteristics of different images, which limits their universality and optimal performance.

[0006] Therefore, there is an urgent need to develop a new image encryption method that can overcome the limitations of the existing technology, provide higher security, stronger anti-attack ability, better dynamic adaptability, and take into account the computational efficiency to meet the growing demand for high-security image protection. Summary of the Invention

[0007] Aiming at the deficiencies of the existing technology, the main object of the present invention is to provide an image encryption method and system based on the coupling of DNA dynamic coding and biological hyperchaos, aiming to achieve efficient, secure and strongly adaptable image encryption.

[0008] To achieve the above object, the present invention proposes a technical solution, and its core idea lies in:

[0009] In the first aspect, an image encryption method based on the coupling of DNA dynamic coding and biological hyperchaos is provided, and the method includes:

[0010] Obtain the original color image for preprocessing, and the preprocessing includes block division and zero-padding operations;

[0011] Generate multiple groups of chaotic sequences by using a first chaotic system and a second chaotic system, wherein the second chaotic system is an adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system;

[0012] Based on at least a part of the multiple groups of chaotic sequences, dynamically select DNA coding rules, DNA operation rules, and DNA decoding rules; the DNA coding rules include multiple preset rules for mapping pixel values or intermediate data into DNA base sequences; the DNA operation rules include multiple preset operation logics based on DNA bases;

[0013] According to the DNA coding rules, perform DNA coding on the preprocessed original color image to obtain a first DNA sequence matrix;

[0014] According to the DNA coding rules, perform DNA coding on the chaotic matrix generated by at least another part of the multiple groups of chaotic sequences to obtain a second DNA sequence matrix;

[0015] According to the DNA operation rules, perform element-by-element operations on the first DNA sequence matrix and the second DNA sequence matrix to obtain an operation result DNA sequence matrix;

[0016] According to the DNA decoding rules, perform DNA decoding on the operation result DNA sequence matrix to obtain preliminary encrypted data;

[0017] Based on at least another part of the multiple groups of chaotic sequences, perform a scrambling operation on the preliminary encrypted data to obtain the final encrypted image.

[0018] As an alternative implementation of the first aspect, the first chaotic system is a Logistic chaotic system for generating a pseudo-random matrix; the second chaotic system is an adaptive fruit fly-parasitoid four-dimensional hyperchaotic system for generating at least a four-dimensional hyperchaotic sequence.

[0019] As an alternative implementation of the first aspect, the adaptive fruit fly-parasitoid four-dimensional hyperchaotic system is defined by the following state equations:

[0020] Fruit fly:

[0021] Larval parasitoid:

[0022] Pupal parasitoid:

[0023] Host defense trait:

[0024] Where, and respectively represent at time and the fruit fly at time represents the larval parasitoid at time represents the pupal parasitoid at time and respectively represent at time and the host defense trait at time ; , and the growth rate r has a trade-off with the host defense trait θ , that is, ; , represents y the parasitism of x on , that is, , represents z the parasitism of x on ; Model parameters: 、 represent the growth-defense trade-off coefficient, represents the shape parameter, 、 represent the aggregation degree of the parasitoid attack behavior, 、 represent the parasitoid search rate, 、 represent the fruit fly reproduction rate, Indicates intraspecific competition in Drosophila Indicates the defense mutation rate.

[0025] As an optional implementation of the first aspect, in the preprocessing step, the block size is a preset size, and zero-padding operations are performed to supplement pixel values at the image edges, so that both the number of rows and columns of the image are integer multiples of the block size.

[0026] As an optional implementation of the first aspect, the DNA coding rule includes at least 8 different mapping rules for mapping 8-bit pixel values or data into DNA base sequences composed of A, T, C, and G; the DNA operation rule includes at least 4 different operation logics, and the operation logics include DNA addition, DNA subtraction, DNA exclusive OR, and DNA equivalence.

[0027] As an optional implementation of the first aspect, the steps of dynamically selecting DNA coding rules, DNA operation rules, and DNA decoding rules based on at least a part of the multiple groups of chaotic sequences include: using the first hyperchaotic sequence to determine the rule for DNA coding of image data, using the second hyperchaotic sequence to determine the rule for DNA coding of the chaotic matrix, using the third hyperchaotic sequence to determine the DNA operation rule, and using the fourth hyperchaotic sequence to determine the DNA decoding rule.

[0028] As an optional implementation of the first aspect, the scrambling operation is row-column scrambling, including: generating a row scrambling index sequence and a column scrambling index sequence based on at least a part of the multiple groups of chaotic sequences; reordering the rows of the preliminary encrypted data according to the row scrambling index sequence; and reordering the columns of the data after row reordering according to the column scrambling index sequence.

[0029] The second aspect of the present application provides an image encryption system based on the coupling of DNA dynamic coding and biological hyperchaos, and the system includes:

[0030] An image preprocessing module for obtaining a raw color image for preprocessing, and the preprocessing includes block division and zero-padding operations;

[0031] A chaotic sequence generation module for generating multiple groups of chaotic sequences by using a first chaotic system and a second chaotic system, where the second chaotic system is an adaptive Drosophila - parasitoid four-dimensional hyperchaotic system;

[0032] The DNA dynamic encoding, decoding and operation module is used to dynamically select DNA encoding rules, DNA operation rules and DNA decoding rules based on at least a part of the multiple groups of chaotic sequences; the DNA encoding rules include multiple preset rules for mapping pixel values or intermediate data into DNA base sequences; the DNA operation rules include multiple preset operation logics based on DNA bases; according to the DNA encoding rules, perform DNA encoding on the preprocessed original color image to obtain a first DNA sequence matrix; according to the DNA encoding rules, perform DNA encoding on the chaotic matrix generated by at least another part of the multiple groups of chaotic sequences to obtain a second DNA sequence matrix; according to the DNA operation rules, perform element-by-element operation on the first DNA sequence matrix and the second DNA sequence matrix to obtain an operation result DNA sequence matrix; according to the DNA decoding rules, perform DNA decoding on the operation result DNA sequence matrix to obtain preliminary encrypted data;

[0033] The scrambling module is used to perform a scrambling operation on the preliminary encrypted data based on at least another part of the multiple groups of chaotic sequences to obtain a final encrypted image;

[0034] The output module is used to output the final encrypted image.

[0035] The third aspect of the present application provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the executable instructions to implement the steps of the above-mentioned image encryption method based on DNA dynamic encoding and biological hyperchaos coupling.

[0036] The fourth aspect of the present application provides a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, enabling the electronic device to execute the steps of the above-mentioned image encryption method based on DNA dynamic encoding and biological hyperchaos coupling.

[0037] Compared with the prior art, the present application provides an image encryption method based on DNA dynamic encoding and biological hyperchaos coupling, which has the following remarkable advantages:

[0038] 1. High security: The biological hyperchaos system is coupled and used, and its complex dynamic behavior and large key space significantly enhance the anti-predictability and anti-brute-force cracking ability of the encryption system. Lyapunov exponent analysis verifies its hyperchaotic characteristics.

[0039] 2. Dynamic adaptability (one Figure 1Encryption): DNA coding rules and operation rules are dynamically selected by chaotic sequences, making the encryption process highly sensitive to the initial key and the plaintext image content. Even if the same key is used to encrypt different images, or to encrypt different parts of the same image, the actual encryption transformations performed are different, effectively resisting known plaintext attacks and chosen plaintext attacks.

[0040] 3. Strong resistance to statistical analysis: Combining the diffusion (DNA operation) and obfuscation (scrambling) processes, the encrypted image pixel value distribution tends to be uniform, and the correlation between adjacent pixels is greatly reduced (close to 0), effectively resisting attacks based on image statistical characteristics. Performance tests (such as information entropy close to the theoretical maximum value of 8, and extremely low correlation coefficient) prove this.

[0041] 4. Anti-cropping robustness: The row and column scrambling step scrambles the pixel positions, so that even if part of the ciphertext data is lost or tampered with (cropping attack), the impact on the overall quality of the decrypted image is dispersed, thereby improving fault tolerance.

[0042] 5. Rule diversity: It provides up to 8 encoding rules and 4 operation rules, which increases the complexity and randomness of encryption transformation.

[0043] Additional aspects and advantages of the present application will be given in part in the following description, and in part will become apparent from the following description, or will be understood through the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flowchart of an image encryption method based on DNA dynamic coding and biological hyperchaos coupling proposed in the first embodiment of the present application;

[0045] Figure 2 This is a time series diagram of four state variables based on the biological hyperchaotic coupling system in the first embodiment of the present application;

[0046] Figure 3 This is a Lyapunov index diagram based on the biological hyperchaotic coupling system under specific parameter conditions in the first embodiment of the present application;

[0047] Figure 4 This is a comparison diagram of the original image and the encrypted image in the first embodiment of the present application;

[0048] Figure 5 The R channel histogram of the original image and the R channel histogram of the encrypted image in the first embodiment of the present application;

[0049] Figure 6 In the first embodiment of the present application, a vertical element correlation dot diagram of the original image B channel and a vertical element correlation dot diagram of the encrypted image B channel;

[0050] Figure 7Schematic diagram of an image encryption system based on the coupling of DNA dynamic encoding and biological hyperchaos proposed in the second embodiment of this application.

[0051] The following specific embodiments will further illustrate this application in conjunction with the above-mentioned drawings. Specific embodiments

[0052] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0053] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0054] To facilitate the understanding of the technical solutions of this application, the terms related to this application are explained as follows:

[0055] Coupled chaotic system: The Logistic chaotic system and the adaptive Fruit Fly-Parasitoid Wasp four-dimensional hyperchaotic system (hereinafter referred to as HPP for short) are combined. The Logistic map provides basic randomness, while the biological hyperchaotic system, due to its more complex dynamic characteristics (proven by Lyapunov exponents) and high sensitivity to initial values / parameters, can generate more difficult-to-predict and better-random sequences, serving as the key driving force in the encryption process.

[0056] DNA dynamic encoding and operation: Multiple sets (e.g., 8 kinds) of DNA encoding rules and multiple sets (e.g., 4 kinds) of DNA operation rules (such as addition, subtraction, exclusive OR, equivalence) are designed. During the encryption process, the sequences generated by the adaptive Fruit Fly-Parasitoid Wasp four-dimensional hyperchaotic system are used to dynamically select the currently used encoding rules and operation rules block by block or pixel by pixel. This dynamic switching mechanism makes the encryption process closely related to the plaintext and the key, achieving "one Figure 1 encryption", greatly enhancing the ability to resist known plaintext attacks and chosen plaintext attacks.

[0057] Anti-cropping scrambling: After DNA-encoded operations, the encrypted data is further scrambled by rows and columns using a chaotic sequence. The scrambling process is also controlled by the chaotic sequence, and the generation of this chaotic sequence can be associated with the statistical characteristics of the image itself (such as the average gray value of the channels), increasing the complexity of the key and the correlation with the plaintext. Row-column scrambling can effectively disrupt the spatial positions of pixels and enhance the robustness against data loss or local damage (such as cropping attacks).

[0058] To illustrate the technical solution described in this application, the following will be described through specific embodiments.

[0059] Embodiment 1

[0060] Please refer to Figure 1 , which is a flowchart of an image encryption method based on the coupling of DNA dynamic encoding and biohyperchaos proposed in the first embodiment of this application. The proposed method includes S01 to S08, which are specifically as follows.

[0061] S01. Obtain the original color image and perform preprocessing, which includes block division and zero-padding operations.

[0062] Exemplarily, input the original color image and read the image file named "flower.jpg". Obtain its size information, assuming it is M orig ×N orig pixels. Separate the original color image into three independent color channels of R, G, and B (this step is not required for grayscale images). The subsequent encryption process is usually performed independently for each channel, but some chaotic sequences or keys can be shared. This embodiment will be described by taking the processing of a single channel (for example, the R channel) as an example, and the G and B channels are processed similarly. Let the image matrix of the currently processed channel be I, with a size of M×N (initial M = M orig , N = N orig ).

[0063] Furthermore, perform block division and zero-padding on the image. Set the block size t, for example, t = 4, and use the mod function to remove the remainder and pad zeros for the R, G, and B channels respectively to obtain a new . Among them, the detailed zero-padding operation is to divide the row and column values M and N by the block size t = 4 respectively to obtain the remainders . If is not 0 in the row direction, then

[0064]

[0065]

[0066] Among them represents the image channel (RGB). Similarly, the zero-padding operation in the column direction is

[0067]

[0068]

[0069] Among them, represents the size of the image pixel at the th row and th column on the channel. represents the row position index of the pixel in the block matrix, and represents the column position index of the pixel in the block matrix; if the indexed pixel is located within the th row and th column, the pixel does not need to be changed. If the indexed pixel exceeds the th row range, a zero matrix of rows is padded in the row direction. If the indexed pixel exceeds the th column range, a zero matrix of rows and columns is padded in the column direction.

[0070] Thus, the zero-padded row and column values , are obtained, and the total number of pixels SUM is calculated. That is, in this embodiment, the row and column values of , become .

[0071] S02. Generate multiple groups of chaotic sequences using the first chaotic system and the second chaotic system, where the second chaotic system is an adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system.

[0072] For the first chaotic system:

[0073] Select the Logistic mapping equation to generate the sequence . That is, set the parameter μ (for example, , at this time the system is in a chaotic state) and the initial value (for example, ); pre-allocate an array long enough (for example, with a length of SUM + 1000) to store the sequence; perform SUM + 999 iterations to generate the sequence to ; to eliminate the initial value effect and obtain better randomness, discard the first 1000 points, and take to as the effective one-dimensional chaotic sequence , with a length of SUM.

[0074] Furthermore, using the function to transform the one-dimensional sequence into a two-dimensional matrix with the same size M×N as the zero-padded image . Optionally, first multiply each element in the sequence by 10000, round the product result to the nearest integer, take the modulus 256 of each rounded number, and the result is between 0 and 255. Rearrange the resulting sequence into a row column matrix, fill it in column-major order, and finally transpose it to obtain the two-dimensional matrix .

[0075] For the second chaotic system:

[0076] Adopt the adaptive fruit fly - parasitoid wasp four-dimensional hyperchaotic system ( ), and its state equations are defined as:

[0077] Fruit fly:

[0078] Larval parasitoid wasp:

[0079] Pupal parasitoid wasp:

[0080] Host defense trait:

[0081] Among them, and respectively represent the fruit fly at time , represents the larval parasitoid wasp at time represents the pupal parasitoid wasp at time and respectively represent the host defense trait at time , ; , and the growth rate r has a trade-off with the host defense trait θ , that is ; , represents y the parasitism effect of x on , that is , representsz The x parasitic effect, namely . Set the model parameters as shown in Table 1.

[0082] Table 1 Meanings and values of system parameters

[0083]

[0084] As Figure 2 shown, it is the time series diagram of four state variables. represents Drosophila, represents larval parasitoid, represents pupal parasitoid, represents the host's defense against larval parasitoid. Simulate this system on the Matlab software platform, and set the initial conditions: , , , . Let V = 0.1, = 2, set the simulation time interval as [18000, 20000]. The partial time period is selected in the window to exclude the transient process of the system and intercept the typical evolution stage entering the steady-state attractor. All variables show irregular periodic fluctuations. The fluctuation amplitudes of X and Z reach 80% of the range, while is only 10%, reflecting the difference in variable sensitivity. There is a time shift between the peak value of X and the trough value of Z (the correlation coefficient approaches -0.32).

[0085] As Figure 3 shown, it is the Lyapunov exponent diagram of the biological hyperchaotic coupling system under specific parameter conditions. To judge whether there is hyperchaotic dynamics in the system, simulate this system on the Matlab software platform. Set the initial values of the system as: , , , , let V = 0.1, = 2, set the simulation time interval as [0, 20000]. The results show that the Lyapunov exponents (LE for short) are: = 0.0252, = 0.0014, = -0.0475, = -0.0745, where: = 0.0252, = 0.0014, which conforms to the standard characteristics of a hyperchaotic system. This indicates that the adaptive Drosophila - parasitoid community is a hyperchaotic system, with stronger randomness and unpredictability, and it can better disrupt the pixel values of images and enhance the encryption effect.

[0086] Based on the initial value, solve the hyperchaotic system in the output function of to obtain four chaotic sequences :

[0087]

[0088]

[0089]

[0090]

[0091]

[0092]

[0093]

[0094]

[0095]

[0096] ;

[0097] Among them, represents the sequence length, ensuring a one-to-one mapping between the chaotic sequence and the block, represents the number of blocks.

[0098] S03. Dynamically select DNA coding rules, DNA operation rules, and DNA decoding rules based on at least a part of multiple groups of chaotic sequences; the DNA coding rules include multiple preset rules for mapping pixel values or intermediate data to DNA base sequences; the DNA operation rules include multiple preset operation logics based on DNA bases;

[0099] It should be noted that using the HPP hyperchaotic system to dynamically select DNA coding rules makes the coding rules independent of the image content and is only controlled by the key. X and Y respectively determine the DNA coding rules of I and R. As shown in Table 2 below, there are 8 kinds, that is, integers in [1, 8]; after X and Y are processed, their value ranges become respectively used to determine the DNA coding methods of the original image I and the matrix R. Z determines the DNA operation rules, there are 4 kinds, that is, integers in [0, 3], which are used to determine what kind of operation to perform between the blocks after DNA coding. 0 represents addition, 1 represents subtraction, 2 represents exclusive OR, and 3 represents equivalence; represents the DNA decoding method, there are 8 kinds, that is, integers in [1, 8], which are used to determine the final DNA decoding rule.

[0100] Table 2 DNA Dynamic Encoding Rules

[0101]

[0102] Index of Dynamic Rules for Hyperchaotic Sequence Generation:

[0103]

[0104]

[0105]

[0106]

[0107] Among them, represents the modulo operation, which discretizes continuous chaotic values into finite options. For example, mapping the chaotic value X to the interval [1, 8]. represents rounding to the nearest integer; X, Y, is expanded 10,000 times, then divided by 8, and the remainder is added by 1 to obtain an integer value ranging from 1 to 8. is expanded 10,000 times, then divided by 4, and the remainder is obtained to get an integer value ranging from 0 to 3.

[0108] Furthermore, it is necessary to divide the image into blocks, extract the target blocks, perform DNA encoding on a per-block basis, and use the block division function to divide the number of columns according to the block side length t = 4 to obtain the number of column blocks after division , and obtain the row and column positions of the th block, and intercept the target block according to the row and column positions.

[0109] The block division function is a custom function, specifically to obtain the number of columns of the image , calculate to obtain the number of blocks in the column direction of the image. Calculate to obtain the row number where the block is located, and calculate to obtain the number of blocks in the column direction of the image. Handle the boundary case. When the block number is an integer multiple of the number of column blocks, the row number is decremented by 1, and the column number , and finally search for the row range to t x , and the column range to t y in the image I, and successfully obtain the th submatrix with a size of t × t.

[0110] Denote the obtained th submatrix with a size of t × t as an array array, operate in the DNA encoding function, where the DNA encoding function decomposes each element of the input t×t matrix into four two-bit segments. The specific operations are as follows. There are four lines to extract different bit segments through bitwise AND operations and division:

[0111] 192 is 11000000 in binary. So here, the high two bits (bits 7-6) of each element are extracted, and then divided by 64 (i.e., 2 6 ) to get 0, 1, 2, or 3.

[0112] 48 is 00110000. Extract the middle bits 5-4, and divide by 16 to get 0-3.

[0113] 12 is 00001100. Extract bits 3-2, and divide by 4 to get 0-3.

[0114] 3 is 00000011. Extract the last two bits to directly get 0-3.

[0115] Then, these four extracted parts ( to ) are combined into a matrix , with a shape of t rows and 4t columns. Since each element is decomposed into four 2-bit segments, each segment corresponds to a position. They are concatenated in order into a t×4t matrix A. Then, the number of the first element Y(1) of the Y sequence maps each two-bit segment (0-3) to a base, generating a character matrix fv of t×4t. Each element in fv gets the corresponding base according to the DNA dynamic encoding and decoding rule table.

[0116] The above is the preliminary work of DNA encoding. Subsequently, the R, G, and B channels are encoded separately.

[0117] S04. According to the DNA encoding rule, perform DNA encoding on the preprocessed original color image to obtain the first DNA sequence matrix;

[0118] As can be seen from the above step S01, in this embodiment, after the original color image is preprocessed, a new .

[0119] Exemplarily, in the R channel, is divided into blocks, and for the i th block, it is mapped according to X(i) to generate the corresponding base, denoted as Q1_R; in the G channel, is divided into blocks, and for the i th block, it is mapped according to X(i) to generate the corresponding base, denoted as Q1_G; in the B channel, Chunk the i th chunk and X(i) generate corresponding bases by mapping, denoted as Q1_B.

[0120] It can be understood that in this step, the generated first DNA sequence matrix includes Q1_R, Q1_G, and Q1_B.

[0121] S05. According to the DNA coding rule, perform DNA coding on at least another part of the generated chaotic matrices in multiple groups of chaotic sequences to obtain a second DNA sequence matrix;

[0122] Exemplarily, for the R chunk, chunk the i th chunk and Y(i) generate corresponding bases by mapping, denoted as Q2; i Start looping from the integer 1 to the number of chunks . It can be understood that in this step, the generated second DNA sequence matrix includes Q2.

[0123] S06. According to the DNA operation rule, perform element-by-element operations on the first DNA sequence matrix and the second DNA sequence matrix to obtain an operation result DNA sequence matrix;

[0124] Taking the R channel as an example, perform DNA operations on Q1_R and Q2 according to Z(i) , denoted as Q3_R; perform DNA operations on Q3_R and the previous chunk according to Z(i) , denoted as Q4_R; assign Q4_R to Q_last_R for operations with new chunks in the next round of loop to achieve pixel diffusion. For example, if the first element of Q1_R is A and the first element of Q2 is A, referring to the following Tables 3 to 7, perform addition operation to get A. Among them arr is array abbreviation of ,arr1 , arr2 represent two different array variables.

[0125] Table 3 Operation Types and Descriptions

[0126]

[0127] Table 4 Addition Rules Based on Complementary Pairing Relationship ( ) Mapping

[0128]

[0129] Table 5 Subtraction Rules Based on Additive Inverse Operation ( ) Mapping

[0130]

[0131] Table 6 Exclusive OR rule based on base complementary differences ( ) mapping

[0132]

[0133] Table 7 Exclusive NOR rule based on the opposite of the exclusive OR result ( ) mapping

[0134]

[0135] Similarly, perform operations on the G and B channels to obtain Q4_R, Q4_G, and Q4_B. i Start cycling from the integer 1 to the number of blocks .

[0136] S07. According to the dynamically selected DNA decoding rule, perform DNA decoding on the operation result DNA sequence matrix to obtain the preliminary encrypted data.

[0137] Specifically, determine the position of the current block in the encrypted image matrix I according to the method of position indexing in step S03, and according to the corresponding DNA decoding rule, merge each block into a complete image, and finally process it into the unit8 data type.

[0138] S08. Based on at least a part of the multiple groups of chaotic sequences, perform a scrambling operation on the preliminary encrypted data to obtain the final encrypted image.

[0139] Exemplarily, calculate the average gray value of the G channel and the B channel as the initial value of the chaotic system and , generate a row permutation chaotic sequence in the one-dimensional Logistic equation, and finally retain the stable random sequence and , with lengths equal to the number of rows and the number of columns of the image respectively. Sort the chaotic sequences in descending order to obtain the indexes (for row and column permutation) Ux and Uy , swap the i th row and the Ux(i) th row (operate on the RGB three channels simultaneously), swap the i th column and the Uy(i) th column (operate on the RGB three channels simultaneously), and perform global scrambling on the pixel positions through the row and column indexes generated by the chaotic sequences.

[0140] The specific operation is to calculate the average gray value of the G channel through for simplified testing , and through Calculate the average grayscale value of the B channel for simplified testing . Pre-allocate memory for the row chaotic sequence , pre-allocate memory for the column chaotic sequence , and assign and to the one-dimensional Logistic equation, remove the first 1000 transient values, and retain stable random sequences with lengths of and respectively and .

[0141] Then, sort the chaotic sequences and in descending order to obtain the indices. For example, if = [0.2, 0.5, 0.1], after sorting in descending order, the index Ux = [2, 1, 3]. For each row i , i from 1 to , swap the i -th row of Q_R, Q_G, and Q_B with the Ux(i) -th row; for each column i , i from 1 to , swap the i -th column of Q_R, Q_G, and Q_B with the Uy(i) -th column. Implement double permutation of rows and columns. Through the row and column indices generated by the chaotic sequences, globally scramble the pixel positions. Even if the image is cropped (partial regions are lost), due to the highly randomized pixel positions, it is difficult for attackers to recover the original image from the cropped fragments.

[0142] Further, save the encrypted image, merge the encrypted RGB channels into the encrypted flower.jpg, as Figure 4 shown. According to Figure 5 histogram comparison, the histogram of the R channel of the original image is concentrated, while the distribution after encryption is uniform. According to Figure 6 scatter plot comparison, the scatter plot of the B channel of the original image is concentrated, with an obvious correlation (the correlation coefficient is about 0.95), while the distribution of the encrypted image is uniform and the correlation coefficient approaches 0.

[0143] From Table 8, the encryption enhancement is obvious. The entropy value of the R channel increases by 13.3% (7.0585 → 7.9975), the entropy value of the G channel increases by 5.66% (7.5685 → 7.9971), and the entropy value of the B channel increases by 8.03% (7.4025 → 7.9973). The entropy values of all channels reach more than 99.96% (the maximum entropy value of 8 bits = 8), meeting the encryption requirement of >7.9 in the NIST SP 800-90B standard. After encryption, the absolute value of the correlation coefficient in each direction is <0.02, which is better than the typical value range of 0.05 - 0.1 for AES-encrypted images, meeting the defense requirement for statistical attacks in the Kerckhoffs' principle. After encryption, the entropy value >7.99 makes the success rate of the ciphertext-only attack based on probability distribution lower than the order of 10-5 (based on the Shannon entropy attack model). This quantitative analysis shows that the encryption algorithm used meets the industrial-level security standard in terms of information randomization and spatial decorrelation, and is applicable to high-security scenarios such as medical image encryption and satellite remote sensing data protection.

[0144] Table 8 Encryption Performance Results of the Image Encryption Method Based on the Coupling of DNA Dynamic Encoding and Biohyperchaos

[0145]

[0146] Example 2

[0147] Please refer to Figure 7 , which shows a schematic structural diagram of an image encryption system based on the coupling of DNA dynamic encoding and biohyperchaos proposed in the second embodiment of the present application. The system includes:

[0148] An image preprocessing module 100, configured to obtain an original digital image and perform preprocessing, where the preprocessing includes block division and zero-padding operations;

[0149] A chaotic sequence generation module 200, configured to generate multiple groups of chaotic sequences by using a first chaotic system and a second chaotic system, where the second chaotic system is an adaptive fruit fly - parasitoid four-dimensional hyperchaotic system;

[0150] The DNA dynamic encoding, decoding and operation module 300 is used to dynamically select DNA encoding rules, DNA operation rules and DNA decoding rules based on at least a part of the multiple groups of chaotic sequences; the DNA encoding rules include multiple preset rules for mapping pixel values or intermediate data into DNA base sequences; the DNA operation rules include multiple preset operation logics based on DNA bases; according to the dynamically selected DNA encoding rules, DNA encoding is performed on the preprocessed image data or its derived data to obtain a first DNA sequence matrix; according to the dynamically selected DNA encoding rules, DNA encoding is performed on the chaotic matrix generated by at least another part of the multiple groups of chaotic sequences to obtain a second DNA sequence matrix; according to the dynamically selected DNA operation rules, element-by-element operations are performed on the first DNA sequence matrix and the second DNA sequence matrix to obtain an operation result DNA sequence matrix; according to the dynamically selected DNA decoding rules, DNA decoding is performed on the operation result DNA sequence matrix to obtain preliminary encrypted data;

[0151] The scrambling module 400 is used to perform a scrambling operation on the preliminary encrypted data based on at least another part of the multiple groups of chaotic sequences to obtain a final encrypted image;

[0152] The output module 500 is used to output the final encrypted image.

[0153] On the other hand, this application also proposes an electronic device, including: a processor; a memory for storing executable instructions that can be executed by the processor; wherein, the processor is configured to execute the executable instructions to implement the above-mentioned image encryption method based on DNA dynamic encoding and biological hyperchaotic coupling.

[0154] On the other hand, this application also proposes a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the above-mentioned image encryption method based on DNA dynamic encoding and biological hyperchaotic coupling.

[0155] It should be noted that in this text, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0156] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present application.

[0157] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. An image encryption method based on the coupling of DNA dynamic encoding and biological hyperchaos, characterized in that The method includes: Obtain an original color image and perform preprocessing, where the preprocessing includes block division and zero-padding operations; Generate multiple groups of chaotic sequences using a first chaotic system and a second chaotic system, where the second chaotic system is an adaptive fruit fly - parasitoid wasp four-dimensional hyperchaotic system, and the adaptive fruit fly - parasitoid wasp four-dimensional hyperchaotic system is defined by the following state equations: Fruit fly: Larval parasitoid wasps: Pupal parasitoid wasp: Host defense traits: wherein, and respectively represent time and a Drosophila at time, represents a larval parasitoid at time, represents a pupal parasitoid at time, and respectively represent time and a host defense trait at time, ; , and the growth rate r has a trade-off with the host defense trait θ , that is ; , represents y the parasitism on x , that is ; , represents z the parasitism on x , that is ; Model parameters: , represent the growth-defense trade-off coefficient, represents the shape parameter, , represent the aggregation degree of the parasitoid attack behavior, , represent the searching rate of the parasitoid, , represent the reproduction rate of the Drosophila, represents the intraspecific competition of the Drosophila, represents the defense mutation rate; Based on at least a part of the multiple groups of chaotic sequences, dynamically select DNA encoding rules, DNA operation rules, and DNA decoding rules; the DNA encoding rules include multiple preset rules for mapping pixel values or intermediate data into DNA base sequences; the DNA operation rules include multiple preset operation logics based on DNA bases; According to the DNA encoding rules, perform DNA encoding on the preprocessed original color image to obtain a first DNA sequence matrix; According to the DNA encoding rules, perform DNA encoding on the chaotic matrix generated from at least another part of the multiple groups of chaotic sequences to obtain a second DNA sequence matrix; According to the DNA operation rules, perform element-wise operations on the first DNA sequence matrix and the second DNA sequence matrix to obtain an operation result DNA sequence matrix; According to the DNA decoding rules, perform DNA decoding on the operation result DNA sequence matrix to obtain preliminary encrypted data; Based on at least another part of the multiple groups of chaotic sequences, perform a scrambling operation on the preliminary encrypted data to obtain a final encrypted image.

2. The method according to claim 1, characterized in that, The first chaotic system is a Logistic chaotic system, which is used to generate a pseudo-random matrix; the second chaotic system is an adaptive fruit fly - parasitoid wasp four-dimensional hyperchaotic system, which is used to generate at least four-dimensional hyperchaotic sequences.

3. The method according to claim 1, wherein In the preprocessing step, the block size is a preset size, and the zero-padding operation supplements pixel values at the image edges, so that both the number of rows and columns of the image are integer multiples of the block size.

4. The method according to claim 1, wherein The DNA encoding rules include at least 8 different mapping rules for mapping 8-bit pixel values or data into DNA base sequences composed of A, T, C, and G; the DNA operation rules include at least 4 different operation logics, and the operation logics include DNA addition, DNA subtraction, DNA exclusive OR, and DNA equivalence OR.

5. The method according to claim 1 or 4, characterized in that, The step of dynamically selecting DNA encoding rules, DNA operation rules, and DNA decoding rules based on at least a part of the multiple groups of chaotic sequences includes: Use the first hyperchaotic sequence to determine the rules for DNA encoding of image data, use the second hyperchaotic sequence to determine the rules for DNA encoding of the chaotic matrix, use the third hyperchaotic sequence to determine the DNA operation rules, and use the fourth hyperchaotic sequence to determine the DNA decoding rules.

6. The method according to claim 1, wherein The scrambling operation is row-column scrambling, and includes: Generate a row scrambling index sequence and a column scrambling index sequence based on at least another part of the multiple groups of chaotic sequences; Reorder the rows of the preliminary encrypted data according to the row scrambling index sequence; Reorder the columns of the data after row reordering according to the column scrambling index sequence.

7. An image encryption system based on the coupling of DNA dynamic encoding and biological hyperchaos, characterized in that, The system includes: An image preprocessing module for obtaining an original color image for preprocessing, where the preprocessing includes block division and zero-padding operations; A chaotic sequence generation module for generating multiple groups of chaotic sequences using a first chaotic system and a second chaotic system, where the second chaotic system is an adaptive fruit fly - parasitoid wasp four-dimensional hyperchaotic system, and the adaptive fruit fly - parasitoid wasp four-dimensional hyperchaotic system is defined by the following state equations: Drosophila melanogaster: Larval parasitoid wasps: Pupal parasitoid wasps: Host defense traits: Among them, and respectively represent time point and the Drosophila at the time point, represents the larval parasitoid at the time point, represents the pupal parasitoid at the time point, and respectively represent time point and the host defense trait at the time point, ; , and the growth rate r has a trade-off with the host defense trait θ , that is, ; , represents y the parasitism on x , that is, ; , represents z the parasitism on x , that is, ; Model parameters: , represent the growth-defense trade-off coefficient, represents the shape parameter, , represent the aggregation degree of the parasitoid's attack behavior, , represent the searching rate of the parasitoid, , represent the reproduction rate of the Drosophila, represents the intraspecific competition of the Drosophila, represents the defense mutation rate; A DNA dynamic encoding, decoding and operation module for dynamically selecting DNA encoding rules, DNA operation rules and DNA decoding rules based on at least a part of the multiple groups of chaotic sequences; the DNA encoding rules include multiple preset rules for mapping pixel values or intermediate data into DNA base sequences; the DNA operation rules include multiple preset operation logics based on DNA bases; according to the DNA encoding rules, perform DNA encoding on the preprocessed original color image to obtain a first DNA sequence matrix; according to the DNA encoding rules, perform DNA encoding on the chaotic matrix generated from at least another part of the multiple groups of chaotic sequences to obtain a second DNA sequence matrix; according to the DNA operation rules, perform element-by-element operations on the first DNA sequence matrix and the second DNA sequence matrix to obtain an operation - after DNA sequence matrix; according to the DNA decoding rules, perform DNA decoding on the operation - after DNA sequence matrix to obtain preliminary encrypted data; A scrambling module for performing a scrambling operation on the preliminary encrypted data based on at least another part of the multiple groups of chaotic sequences to obtain a final encrypted image; An output module for outputting the final encrypted image.

8. An electronic device, characterized in that, Including: A processor; A memory for storing executable instructions executable by the processor; Wherein, the processor is configured to execute the executable instructions to implement the steps of an image encryption method based on DNA dynamic encoding and biological hyperchaos coupling as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, When the instructions in the computer - readable storage medium are executed by the processor of the electronic device, the electronic device can execute the steps of an image encryption method based on DNA dynamic encoding and biological hyperchaos coupling as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image encryption algorithm based on multi-chaotic system and cyclic DNA operation and electronic equipment

    CN117440101A