Image encryption method and system based on DNA dynamic coding and biological hyperchaos coupling

By introducing DNA dynamic encoding and biological hyperchaotic systems into the image encryption method, encoding rules and calculation rules are dynamically selected, and combined with chaotic operations, the problems of high computational complexity and insufficient attack resistance in the prior art are solved, and efficient, secure and adaptable image encryption is achieved.

CN120017769AActive Publication Date: 2025-05-16JIANGXI NORMAL UNIV

Patent Information

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

AI Technical Summary

Technical Problem

Existing image encryption methods have high computational complexity when processing high-resolution and large-data images, which is difficult to meet the needs of real-time applications, and are insufficient to resist advanced password analysis attacks. Some methods have limited key space and are prone to brute-force cracking or prediction.

Method used

An image encryption method based on the coupling of DNA dynamic encoding and biological hyperchaos is adopted. By acquiring the original color image for preprocessing, DNA encoding rules, operation rules and decoding rules are dynamically selected using multiple sets of chaotic sequences, and combined with chaotic operations, the final encrypted image is generated.

Benefits of technology

It realizes efficient, secure and highly adaptable image encryption, significantly enhances anti-predictive and brute-force cracking capabilities, resists advanced password analysis attacks, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017769A_ABST
    Figure CN120017769A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image information security, and discloses an image encryption method and system based on DNA dynamic coding and biological hyperchaos coupling, and the method comprises the steps: firstly carrying out the blocking and zero padding preprocessing of an original image; a Logistic chaotic system and the adaptive fruit fly-parasitic wasp four-dimensional hyper-chaotic system are coupled to generate a chaotic sequence with high complexity and randomness; thirdly, dynamically selecting a DNA coding rule and a DNA operation rule by utilizing the generated chaotic sequence, and carrying out dynamic DNA coding and operation on the image data and a matrix generated by another chaotic sequence; then, performing row and column scrambling on the encrypted data by using a chaos sequence to enhance the anti-cutting capability; and finally, outputting the encrypted image. According to the method, the highly random sequence is generated by coupling the biological hyperchaotic system, and the encryption effect of one image and one secret is realized by combining the dynamically switched DNA coding and operation rules, so that the encryption security and the adaptability to different images are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

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

[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 shortcomings: 1) Traditional encryption algorithms have limited hiding effects on the inherent statistical characteristics of images (such as strong correlation between pixels and non-uniform histogram distribution) and are vulnerable to statistical analysis attacks; 2) Encryption methods based on mathematical transformations have high computational complexity when processing high-resolution and large-volume images, making it difficult to meet the needs of real-time applications; 3) The dynamic behavior of some low-dimensional chaotic systems is relatively simple, and the key space is limited, which 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 capabilities. By mapping pixel values ​​to DNA base sequences (A, T, C, G) and combining them with 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 fruit fly-parasitic wasp model), are believed to be able to further improve the security of encryption algorithms due to their more complex dynamic behavior, higher sensitivity, and larger key space.

[0005] However, the current image encryption methods based on DNA coding and chaotic / hyperchaotic systems still have some problems: 1. Many methods use fixed DNA coding rules and operation rules, which lack dynamics. Once the rules are leaked, the security will be greatly reduced; 2. The resistance of some algorithms to advanced cryptanalysis attacks, such as differential attacks and known plaintext attacks, still needs to be strengthened; 3. Existing methods often use 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 should be able to overcome the limitations of existing technologies, provide higher security, stronger anti-attack capabilities, better dynamic adaptability, and take into account computational efficiency to meet the growing demand for high-security image protection. Summary of the invention

[0007] In view of the deficiencies in the prior art, the main purpose of the present invention is to provide an image encryption method and system based on DNA dynamic coding and biological hyperchaos coupling, aiming to achieve efficient, secure and highly adaptable image encryption.

[0008] To achieve the above object, the present invention proposes a technical solution, the core idea of ​​which is: The first aspect provides an image encryption method based on DNA dynamic coding and biological hyperchaos coupling, the method comprising: Acquire the original color image for preprocessing, wherein 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, wherein the second chaotic system is an adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system; Based on at least a portion of the multiple chaotic sequences, dynamically select DNA encoding rules, DNA operation rules and DNA decoding rules; the DNA encoding rules include a plurality of preset rules for mapping pixel values ​​or intermediate data into DNA base sequences; the DNA operation rules include a plurality of preset operation logics based on DNA bases; According to the DNA encoding rule, DNA encoding is performed on the preprocessed original color image to obtain a first DNA sequence matrix; According to the DNA encoding rule, 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 DNA operation rule, performing element-by-element operation on the first DNA sequence matrix and the second DNA sequence matrix to obtain a DNA sequence matrix after operation; According to the DNA decoding rule, DNA decoding is performed on the calculated DNA sequence matrix to obtain preliminary encrypted data; Based on at least another part of the multiple groups of chaotic sequences, a scrambling operation is performed on the preliminary encrypted data to obtain a final encrypted image.

[0009] As an optional implementation of the first aspect, 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-parasitic wasp four-dimensional hyperchaotic system, which is used to generate at least a four-dimensional hyperchaotic sequence.

[0010] As an optional implementation manner of the first aspect, the adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system is defined by the following state equation: Fruit flies: Larval parasitoids: Pupal parasitoids: Host defense traits: in, and Respectively Moment and The fruit flies of the moment, express Larval parasitic wasps of the moment, express The pupal parasitic wasp of the moment, and Respectively Moment and Host defense traits at all times, ; , and the growth rate r Host defense traits θ There is a trade-off, namely ; , express y right x The parasitic effect of ; , express z right x The parasitic effect of ; Model parameters: , represents the growth-defense trade-off coefficient, represents the shape parameter, , represents the aggregation degree of the parasite's attack behavior, , represents the parasitic wasp search rate, , represents the fruit fly reproduction rate, represents intraspecific competition in Drosophila. represents the defense mutation rate.

[0011] As an optional implementation of the first aspect, in the preprocessing step, the block size is a preset size, and the zero padding operation supplements pixel values ​​at the edge of the image so that the number of rows and columns of the image are both integer multiples of the block size.

[0012] As an optional implementation of the first aspect, the DNA encoding rules include at least 8 different mapping rules, mapping 8-bit pixel values ​​or data into a DNA base sequence 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 XOR, and DNA XOR.

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

[0014] 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 another 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 the rows are reordered according to the column scrambling index sequence.

[0015] The second aspect of the present application provides an image encryption system based on DNA dynamic coding and biological hyperchaos coupling, the system comprising: An image preprocessing module, used to obtain the original color image for preprocessing, wherein the preprocessing includes block division and zero padding operations; A chaotic sequence generation module, used for generating 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; A DNA dynamic encoding and 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 chaotic sequences; the DNA encoding rules include a plurality of preset rules for mapping pixel values ​​or intermediate data into DNA base sequences; the DNA operation rules include a plurality of preset operation logics based on DNA bases; according to the DNA encoding rules, DNA encoding is performed on the pre-processed original color image to obtain a first DNA sequence matrix; according to the DNA encoding rules, DNA encoding is performed on the chaotic matrix generated by at least another part of the multiple chaotic sequences to obtain a second DNA sequence matrix; according to the DNA operation rules, element-by-element operations are performed on the first DNA sequence matrix and the second DNA sequence matrix to obtain a DNA sequence matrix after operation; according to the DNA decoding rules, DNA decoding is performed on the DNA sequence matrix after operation to obtain preliminary encrypted data; A scrambling module, configured to perform a scrambling operation on the preliminary encrypted data based on at least one more part of the multiple groups of chaotic sequences to obtain a final encrypted image; Output module, used to output the final encrypted image.

[0016] The third aspect of the present application provides an electronic device, comprising: 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 coding and biological hyperchaos coupling.

[0017] 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 a processor of an electronic device, the electronic device is enabled to perform the steps of the above-mentioned image encryption method based on DNA dynamic coding and biological hyperchaos coupling.

[0018] Compared with the prior art, this application provides an image encryption method based on DNA dynamic coding and biological hyperchaos coupling, which has the following significant advantages: 1. High security: The coupling uses a biological hyperchaotic system, whose complex dynamic behavior and large key space significantly enhance the anti-prediction and anti-brute force cracking capabilities of the encryption system. Lyapunov exponent analysis verifies its hyperchaotic characteristics.

[0019] 2. Dynamic adaptability (a Figure 1 Encryption): 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.

[0020] 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.

[0021] 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.

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

[0023] 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

[0024] 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; 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; 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; Figure 4 A comparison diagram of the original image and the encrypted image in the first embodiment of the present application; 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; Figure 6 In the first embodiment of the present application, the original image B channel vertical element correlation point diagram and the encrypted image B channel vertical element correlation point diagram; Figure 7 A schematic diagram of the structure of an image encryption system based on DNA dynamic coding and biological hyperchaos coupling proposed in the second embodiment of the present application.

[0025] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

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

[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here. In addition, the "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.

[0028] In order to facilitate understanding of the technical solution of this application, the terms involved in this application are explained as follows: Coupled chaotic system: Combining the Logistic chaotic system and the adaptive fruit fly-parasitoid wasp (Fruit Fly-Parasitoid Wasp) four-dimensional hyperchaotic system, hereinafter referred to as HPP. The Logistic mapping provides basic randomness, while the biological hyperchaotic system, due to its more complex dynamic characteristics (proven by the Lyapunov exponent) and high sensitivity to initial values / parameters, can generate sequences that are more difficult to predict and more random, serving as the key driving force of the encryption process.

[0029] DNA dynamic coding and operation: Multiple sets (e.g. 8) of DNA coding rules and multiple sets (e.g. 4) of DNA operation rules (such as addition, subtraction, XOR, XOR). In the encryption process, the sequence generated by the adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system is used to dynamically select the current coding rules and operation rules on a block-by-block or pixel-by-pixel basis. This dynamic switching mechanism makes the encryption process closely related to the plaintext and key, realizing the "one Figure 1 The ability to resist known plaintext attacks and chosen plaintext attacks is greatly enhanced.

[0030] Anti-cropping scrambling: After the DNA encoding operation, the encrypted data is further scrambled using a chaotic sequence. The scrambling process is also controlled by a chaotic sequence, and the generation of the chaotic sequence can be associated with the statistical characteristics of the image itself (such as the average gray value of the channel), which increases the complexity of the key and the correlation with the plaintext. Row and column scrambling can effectively disrupt the spatial position of pixels and enhance the robustness against data loss or local damage (such as cropping attacks).

[0031] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0032] Example 1 See also Figure 1 , which is a flow chart of an image encryption method based on DNA dynamic coding and biological hyperchaos coupling proposed in the first embodiment of the present application. The proposed method includes S01 to S08, as follows.

[0033] S01. Obtain an original color image for preprocessing, wherein the preprocessing includes block division and zero padding operations.

[0034] For example, input the original color image and read the image file named "flower.jpg". Get its size information, assuming it is M orig ×N origPixels. Separate the original color image into three independent color channels, 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 takes the processing of a single channel (such as the R channel) as an example for explanation, and the G and B channels are processed similarly. Assume that the image matrix of the current processing channel is I, and the size is M×N (initial M=M orig ,N=N orig ).

[0035] Furthermore, the image is divided into blocks and padded with zeros. Set the block size t, for example t=4, and use mod The function removes the remainder and fills zeros on the R, G, and B channels respectively to obtain the new The detailed operation of zero filling is to divide the row and column values ​​M and N by the block size t=4 respectively to get the remainder. , in the row direction if If not 0, in Represents the image channel (RGB). Similarly, the column-wise zero-filling operation is in, Indicates that the image is Channel No. Line The pixel size of the image in columns, Represents the row position index of the pixel in the block matrix, Indicates the column position index of the pixel in the block matrix; if the indexed pixel is located at OK If the index pixel exceeds If the range is row, fill in the row direction. OK Column zero matrix, if the index pixel is out of range Column range, column direction fill OK Column zero matrix.

[0036] Thus, we get the row and column values ​​after zero padding. , , and calculate the total number of pixels SUM. That is, in this embodiment, The row and column values ​​become , , calculate the total number of pixels .

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

[0038] For the first chaotic system: Select the Logistic mapping equation , generating the sequence That is, setting the parameter μ (e.g. , the system is in a chaotic state) and the initial value (For example ); Pre-allocate an array long enough (for example, the length is SUM+1000) to store the sequence; perform SUM+999 iterations to generate the sequence arrive ; To eliminate the initial value effect and obtain better randomness, discard the first 1000 points and take arrive As an effective chaotic one-dimensional sequence , with length SUM.

[0039] Further, using The function converts a one-dimensional sequence Transformed into a two-dimensional matrix with the same size M×N as the zero-padded image Optionally, first convert the sequence Multiply each element in by 10000, round the product to the nearest integer, take each rounded number modulo 256, and the result is between 0 and 255. Rearrange the result sequence into a OK The matrix of columns is filled in column-major order and then transposed to get The two-dimensional matrix .

[0040] For the second chaotic system: Adaptive Drosophila-parasitic wasp four-dimensional hyperchaotic system ( ), whose state equation is defined as: Fruit flies: Larval parasitoids: Pupal parasitoids: Host defense traits: in, and Respectively Moment and The fruit flies of the moment, express Larval parasitic wasps of the moment, express The pupal parasitic wasp of the moment, and Respectively Moment and Host defense traits at all times, ; , and the growth rate r Host defense traits θ There is a trade-off, namely ; , express y right x The parasitic effect of ; , express z right x The parasitic effect of The model parameters are set as shown in Table 1.

[0041] Table 1 System parameter meanings and values like Figure 2 As shown, it is the time series diagram of four state variables. represents fruit flies, indicates larval parasitoid wasps, means pupal parasitic wasp, Represents the host's defense against larval parasitic wasps. The system was simulated on the Matlab software platform, and the initial conditions were set: , , , . Let V = 0.1, =2, set the simulation time interval to [18000,20000], and select part of the window period to exclude the transient process of the system and intercept the typical evolution stage of entering the steady-state attractor. All variables show irregular periodic fluctuations, and the fluctuation amplitude of X and Z reaches 80% of the range, while Only 10% reflects the difference in variable sensitivity, and there is a time offset between the peak value of X and the valley value of Z (the correlation coefficient approaches -0.32).

[0042] like Figure 3 The figure shows the Lyapunov index of the biological hyperchaotic coupling system under specific parameter conditions. In order to determine whether the system has hyperchaotic dynamics, the system is simulated on the Matlab software platform. The initial value of the system is set as: , , , , let V = 0.1, =2, set the simulation time interval to [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 meets the standard characteristics of a hyperchaotic system. This indicates that the adaptive fruit fly-parasitic wasp colony is a hyperchaotic system with stronger randomness and unpredictability, which can better disrupt the pixel values ​​of the image and enhance the encryption effect.

[0043] According to the initial value, The output function of ) to solve the hyperchaotic system and obtain four chaotic sequences : ; in, Indicates the sequence length, ensuring a one-to-one mapping between chaotic sequences and blocks. Indicates the number of blocks.

[0044] S03, based on at least a part of the multiple chaotic sequences, dynamically selecting DNA encoding rules, DNA operation rules and DNA decoding rules; the DNA encoding rules include a plurality of preset rules for mapping pixel values ​​or intermediate data into DNA base sequences; the DNA operation rules include a plurality of preset operation logics based on DNA bases; It should be noted that the DNA encoding rules are dynamically selected using the HPP hyperchaotic system, so that the encoding rules are independent of the image content and are only controlled by the key. X and Y determine the DNA encoding rules of I and R respectively, as shown in Table 2 below. There are 8 types, that is, integers of [1,8]. After X and Y are processed, their value ranges become the DNA encoding methods used to determine the original image I and matrix R respectively. Z determines the DNA operation rules, which have 4 types, that is, integers of [0,3], which are used to determine what kind of operation is performed between the blocks after DNA encoding. 0 means addition, 1 means subtraction, 2 means XOR, and 3 means XOR. Represents the DNA decoding method, which has 8 types, namely an integer of [1,8], and is used to determine the final DNA decoding rule.

[0045] Table 2 DNA dynamic encoding rules Hyperchaotic sequence generation dynamic rule index: in, represents the modulo operation, which discretizes the continuous chaotic value into finite options, such as mapping the chaotic value X to the interval [1,8]. Indicates rounding to the nearest integer; X, Y, Expand it 10,000 times, divide it by 8, take the remainder and add 1 to get an integer between 1 and 8. Expand it by 10,000 times, divide it by 4 and take the remainder to get an integer between 0 and 3.

[0046] Furthermore, it is necessary to divide the image into blocks, extract the target block, perform DNA encoding by block, and use the block function to divide the number of columns according to the block side length t=4 , get the number of columns and blocks after segmentation , get the The row and column positions of the block, and the target block is intercepted according to the row and column positions.

[0047] The block function is a custom function, specifically to obtain the number of image columns ,calculate Get the number of blocks in the image column direction. Calculate Get the row number where the block is located and calculate Get the number of blocks in the column direction of the image. To handle the edge case, when the block number is an integer multiple of the number of column blocks, the row number Minus 1, column number , and finally search for the row range in image I tox , column range to y , successfully obtained The block size is a sub-matrix of t×t.

[0048] The obtained The submatrix with block size t×t is recorded as array array , which is operated 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 operation is as follows. There are four lines that extract different bit segments through bitwise AND operations and division: 192 is 11000000 in binary, so here we extract the upper two bits (bits 7-6) of each element and divide by 64 (i.e. 2 6 ) results in 0, 1, 2, or 3.

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

[0050] 12 is 00001100, extract bits 3-2, divide by 4 to get 0-3.

[0051] 3 is 00000011. Extract the last two digits and you get 0-3 directly.

[0052] Then, these four extracted parts ( arrive ) are combined into the matrix , with a shape of t rows and 4t columns, because each element is decomposed into four 2-bit segments, each corresponding to one position. They are sequentially concatenated into a t×4t matrix A, and 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 t×4t character matrix fv. Each element in fv gets the corresponding base according to the DNA dynamic encoding and decoding rule table.

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

[0054] S04, performing DNA encoding on the preprocessed original color image according to DNA encoding rules to obtain a first DNA sequence matrix; As can be seen from the above step S01, in this embodiment, the original color image is preprocessed to obtain a new .

[0055] For example, in the R channel, Block, i Block by X(i) The mapping generates the corresponding base, which is recorded as Q1_R; in the G channel, Block, i Block by X(i) The mapping generates the corresponding base, which is recorded as Q1_G; in the B channel, Block, i Block by X(i) The mapping generates the corresponding base, which is recorded as Q1_B.

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

[0057] S05, performing DNA encoding on the chaotic matrix generated by at least another part of the multiple chaotic sequences according to the DNA encoding rule to obtain a second DNA sequence matrix; For example, for R blocks, i Block by Y(i) The mapping generates the corresponding base, which is denoted as Q2; i Loop from integer 1 to the number of blocks It can be understood that in this step, the generated second DNA sequence matrix includes Q2.

[0058] S06. 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 a DNA sequence matrix after operation; Taking the R channel as an example, Q1_R and Q2 are Z(i) Perform DNA operation, recorded as Q3_R; Q3_R and the previous block according to Z(i) Perform DNA operation, record it as Q4_R; assign Q4_R to Q_last_R for operation with new blocks in the next cycle to achieve pixel diffusion. If the first element of Q1_R is A, and the first element of Q2 is A, refer to the following Tables 3 to 7, according to Addition operation, we get A. arr yes array Abbreviation ,arr1 , arr2 Represents two different array variables.

[0059] Table 3 Operation types and descriptions Table 4 Addition rules based on complementary pairing relationships ( ) Mapping Table 5 Subtraction rules based on inverse operation of addition ( ) Mapping Table 6 XOR rules based on base complementary differences ( ) Mapping Table 7 Based on the opposite of XOR result, the same or rule ( ) Mapping Similarly, operate on the G and B channels to obtain Q4_R, Q4_G, and Q4_B. i Loop from integer 1 to the number of blocks .

[0060] S07. According to the dynamically selected DNA decoding rules, DNA decoding is performed on the calculated DNA sequence matrix to obtain preliminary encrypted data.

[0061] Specifically, the position of the current block in the encrypted image matrix I is determined by the position index method in step S03. The corresponding DNA decoding rules merge each block into a complete image and finally process it into unit8 data type.

[0062] S08. 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.

[0063] For example, the average grayscale value of the G channel and the B channel is calculated as the initial value of the chaotic system. and , a row permutation chaotic sequence is generated by the one-dimensional logistic equation, and a stable random sequence is retained and , whose lengths are equal to the number of rows in the image and number of columns . Sort the chaotic sequence in descending order and obtain the index (for row and column permutation) Ux and Uy , exchange i Row and Ux(i) row (operate on the three channels of RGB at the same time), swap the i Column and Uy(i) Column (simultaneously operate on the three RGB channels), and globally scramble the pixel positions through the row and column indexes generated by the chaotic sequence.

[0064] The specific operation is to Calculate the average gray value of the G channel to simplify the test ,pass Calculate the average gray value of the B channel to simplify the test . Pre-allocate row chaotic sequence memory , pre-allocate chaotic sequence memory ,Will , Assign to the one-dimensional Logistic equation, remove the first 1000 transient values, and retain the lengths respectively and Stable random sequence and .

[0065] Then, for the chaotic sequence and Sort in descending order and get the index. 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 , and the first i Row and Ux(i) Row swap; for each column i , i From 1 to , and the first i Column and Uy(i) Column swap. Double permutation of rows and columns is achieved. The pixel positions are globally scrambled through the row and column indexes generated by the chaotic sequence. Even if the image is cropped (part of the area is lost), it is difficult for an attacker to recover the original image from the cropped fragment due to the highly randomized pixel positions.

[0066] Further, save the encrypted image and merge the encrypted RGB channels into the encrypted flower.jpg, such as Figure 4 As shown. Figure 5 Histogram comparison: the original image is listed in the R channel histogram, and the encrypted image is evenly distributed. Figure 6 Comparing the scatter plots, the scatter plots of the B channel of the original image are concentrated and have obvious correlation (the correlation coefficient is about 0.95), while the encrypted image is evenly distributed and the correlation coefficient is close to 0.

[0067] From Table 8, the encryption enhancement is obvious. The entropy value of the R channel is increased by 13.3% (7.0585→7.9975), the entropy value of the G channel is increased by 5.66% (7.5685→7.9971), and the entropy value of the B channel is increased by 8.03% (7.4025→7.9973). All channels are above 99.96% (8bit maximum entropy value = 8), meeting the encryption requirement of >7.9 in the NIST SP 800-90B standard. The absolute value of the correlation coefficient in each direction after encryption is <0.02, which is better than the typical value of 0.05-0.1 of the AES encrypted image, and meets the defense requirements for statistical attacks in the Kerckhoffs criterion. The entropy value after encryption is >7.99, which 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). The quantitative analysis shows that the encryption algorithm used meets industrial-grade security standards in terms of information randomization and spatial decorrelation, and is suitable for high-security scenarios such as medical image encryption and satellite remote sensing data protection.

[0068] Table 8 Encryption performance results of the image encryption method based on DNA dynamic coding and biological hyperchaos coupling Example 2 See also Figure 7 , which is a schematic diagram of the structure of an image encryption system based on DNA dynamic coding and biological hyperchaos coupling proposed in the second embodiment of the present application, the system comprises: The image preprocessing module 100 is used to obtain the original digital image and perform preprocessing, wherein the preprocessing includes block division and zero padding operations; A chaotic sequence generation module 200 is used to generate multiple groups of chaotic sequences 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; The DNA dynamic encoding and 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 chaotic sequences; the DNA encoding rules include a plurality of preset rules for mapping pixel values ​​or intermediate data into DNA base sequences; the DNA operation rules include a plurality of 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 derivative 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 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 a DNA sequence matrix after operation; according to the dynamically selected DNA decoding rules, DNA decoding is performed on the DNA sequence matrix after operation to obtain preliminary encrypted data; A scrambling module 400, configured to perform a scrambling operation on the preliminary encrypted data based on at least one more part of the multiple groups of chaotic sequences to obtain a final encrypted image; The output module 500 is used to output the final encrypted image.

[0069] On the other hand, the present application also proposes an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to implement the above-mentioned image encryption method based on DNA dynamic coding and biological hyperchaos coupling.

[0070] On the other hand, the present application also proposes a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to execute the above-mentioned image encryption method based on DNA dynamic coding and biological hyperchaos coupling.

[0071] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the 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 reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

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

[0073] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image encryption method based on DNA dynamic coding and biological hyperchaos coupling, characterized in that: The method comprises: Acquire the original color image for preprocessing, wherein 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, wherein the second chaotic system is an adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system; Based on at least a portion of the multiple chaotic sequences, dynamically select DNA encoding rules, DNA operation rules and DNA decoding rules; the DNA encoding rules include a plurality of preset rules for mapping pixel values ​​or intermediate data into DNA base sequences; the DNA operation rules include a plurality of preset operation logics based on DNA bases; According to the DNA encoding rule, DNA encoding is performed on the preprocessed original color image to obtain a first DNA sequence matrix; According to the DNA encoding rule, 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 DNA operation rule, performing element-by-element operation on the first DNA sequence matrix and the second DNA sequence matrix to obtain a DNA sequence matrix after operation; According to the DNA decoding rule, DNA decoding is performed on the calculated DNA sequence matrix to obtain preliminary encrypted data; Based on at least another part of the multiple groups of chaotic sequences, a scrambling operation is performed 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-parasitic wasp four-dimensional hyperchaotic system, which is used to generate at least four-dimensional hyperchaotic sequences.

3. The method according to claim 2, characterized in that The adaptive fruit fly-parasitic wasp four-dimensional hyperchaotic system is defined by the following state equation: Fruit flies: Larval parasitoids: Pupal parasitoid wasp: Host defense traits: in, and Respectively Moment and The fruit flies of the moment, express Larval parasitic wasps of the moment, express The pupal parasitic wasp of the moment, and Respectively Moment and Host defense traits at all times, ; , and the growth rate r Host defense traits θ There is a trade-off, namely ; , express y right x The parasitic effect of ; , express z right x The parasitic effect of ; Model parameters: , represents the growth-defense trade-off coefficient, represents the shape parameter, , represents the aggregation degree of the parasite's attack behavior, , represents the parasitic wasp search rate, , represents the fruit fly reproduction rate, represents intraspecific competition in Drosophila. represents the defense mutation rate.

4. The method according to claim 1, characterized in that: In the preprocessing step, the block size is a preset size, and the zero padding operation supplements the pixel values ​​at the edge of the image so that the number of rows and columns of the image are both integer multiples of the block size.

5. The method according to claim 1, characterized in that The DNA encoding rules include at least 8 different mapping rules, which map 8-bit pixel values ​​or data into a DNA base sequence composed of A, T, C, and G; the DNA operation rules include at least 4 different operation logics, which include DNA addition, DNA subtraction, DNA XOR, and DNA XOR.

6. The method according to claim 1 or 5, characterized in that: Based on at least a portion of the plurality of chaotic sequences, the step of dynamically selecting DNA encoding rules, DNA operation rules and DNA decoding rules comprises: The first hyperchaotic sequence is used to determine the rules for DNA encoding of image data, the second hyperchaotic sequence is used to determine the rules for DNA encoding of chaotic matrices, the third hyperchaotic sequence is used to determine the DNA operation rules, and the fourth hyperchaotic sequence is used to determine the DNA decoding rules.

7. The method according to claim 1, characterized in that The scrambling operation is row-column scrambling, including: Generate a row scrambled index sequence and a column scrambled index sequence based on at least another part of the multiple groups of chaotic sequences; reordering the rows of the preliminary encrypted data according to the row scrambling index sequence; The columns of the data after the row reordering are reordered according to the column scrambling index sequence.

8. An image encryption system based on DNA dynamic coding and biological hyperchaos coupling, characterized in that: The system comprises: An image preprocessing module, used to obtain the original color image for preprocessing, wherein the preprocessing includes block division and zero padding operations; A chaotic sequence generation module, used for generating 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; A DNA dynamic encoding and 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 chaotic sequences; the DNA encoding rules include a plurality of preset rules for mapping pixel values ​​or intermediate data into DNA base sequences; the DNA operation rules include a plurality of preset operation logics based on DNA bases; according to the DNA encoding rules, DNA encoding is performed on the pre-processed original color image to obtain a first DNA sequence matrix; according to the DNA encoding rules, DNA encoding is performed on the chaotic matrix generated by at least another part of the multiple chaotic sequences to obtain a second DNA sequence matrix; according to the DNA operation rules, element-by-element operations are performed on the first DNA sequence matrix and the second DNA sequence matrix to obtain a DNA sequence matrix after operation; according to the DNA decoding rules, DNA decoding is performed on the DNA sequence matrix after operation to obtain preliminary encrypted data; A scrambling module, configured to perform a scrambling operation on the preliminary encrypted data based on at least one more part of the multiple groups of chaotic sequences to obtain a final encrypted image; Output module, used to output the final encrypted image.

9. An electronic device, characterized in that: include: processor; a memory for storing 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 coding and biological hyperchaos coupling as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the steps of an image encryption method based on DNA dynamic coding and biological hyperchaos coupling as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Optimal variational mode decomposition method fusing composite chaotic mapping and fruit fly optimization

    CN113902086A

  • Image encryption method and device based on hyperchaotic system and DNA operation

    CN114362913A

  • Image processing method based on discrete hyper-chaotic system and dynamic DNA coding with diffusivity

    CN114820268A

  • Chaos-based image encryption system and method

    CN117376490A

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

    CN117440101A

Cited By

  • Image encryption method, system and decryption method based on DNA coding and Arnold transformation

    CN120281853A