Chaotic image encryption method based on DNA encoding

By employing a DNA-based chaotic image encryption method, combined with novel two-dimensional chaotic mapping and DNA diffusion technology, images are scrambled and diffused, solving the problem of low efficiency in traditional encryption algorithms and achieving efficient and secure image encryption.

CN120881215BActive Publication Date: 2025-12-09HENAN YUZHIXING INTELLECTUAL PROPERTY OPERATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511393608.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2025-12-09
Estimated Expiration
2045-09-28

AI Technical Summary

Technical Problem

Existing traditional encryption algorithms cannot effectively meet the high-efficiency encryption requirements of two-dimensional image data, especially due to the characteristics of large data volume, high redundancy, uneven energy distribution and strong correlation between adjacent pixels, resulting in low encryption efficiency.

Method used

A DNA-encoded chaotic image encryption method is adopted, which combines a novel two-dimensional chaotic mapping 2D-CSMM, reduction operation and DNA diffusion technology to scramble and diffuse the image, including hash value generation of initial key, chaotic sequence iteration, quantization matrix operation, displacement scrambling and DNA encoding encryption.

Benefits of technology

It improves the security and encryption effectiveness of image encryption, resists various image attacks, and provides excellent security performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881215B_ABST
    Figure CN120881215B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image encryption, and particularly relates to a chaotic image encryption method based on DNA coding, S1: a hash value of a plaintext grayscale image is calculated by using a hash algorithm, and an initial secret key is generated based on the hash value, S2: the initial secret key is used as an initial value and a control parameter of an iteration variable of a two-dimensional chaotic mapping 2D-CSMM, a chaotic sequence is iterated out, the chaotic sequence is subjected to segmentation and quantization processing to obtain a quantization matrix, the quantization matrix is subjected to a reduction exclusive-OR operation respectively to obtain a bit matrix, and a plaintext grayscale image is subjected to a scrambling processing based on the quantization matrix and the bit matrix to obtain a ciphertext image, S5: the ciphertext image is subjected to a DNA diffusion processing based on the quantization matrix and the bit matrix to obtain an encrypted image, and S6: the encrypted image is decrypted according to an inverse process of image encryption to obtain a decrypted image, the encryption method provided by the present application greatly improves the security of image encryption, and has good security performance and encryption effect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image encryption, in particular to a chaotic image encryption method based on DNA coding. BACKGROUND

[0002] With the development and popularization of Internet technology, people's information transmission on the Internet is increasingly frequent. The popularization of information technology makes people's life more convenient, especially the emergence of various application software, which enables people to realize instant messaging. However, this also generates a large amount of data, causing many information security risks. According to statistics, almost every 20 seconds, an information security attack will occur in the world.

[0003] As one of the important carriers of information exchange, images have become one of the main ways of information transmission due to their intuitive and concise characteristics, and are applied in various fields. According to statistics, more than 70 percent of information is mainly derived from vision, and the application of multimedia technology makes the use of images more and more widely, but the occurrence of network security incidents is increasingly frequent, which has attracted the attention of scholars and the public to image security. In order to prevent the leakage, destruction and other security risks of images, reliable image data encryption technology is needed, and ensuring the information security of image transmission parties has become a hot research topic.

[0004] In order to protect the information of the plaintext gray image to a certain extent, the most direct method is to encrypt it. After encryption, the original intuitive plaintext data will become chaotic ciphertext data. However, traditional encryption algorithms such as DES (Data Encryption Standard) algorithm and AES (Advanced Encryption Standard) algorithm are designed for one-dimensional text encryption, and two-dimensional image data has the characteristics of large data volume, high redundancy, uneven energy distribution and strong correlation between adjacent pixels. These characteristics will lead to very low encryption efficiency of traditional encryption algorithms, which cannot meet the encryption demand, so designing new encryption algorithms to meet the demand of high encryption efficiency and good encryption effect has become a research hotspot in the cryptography community. SUMMARY

[0005] The purpose of the present application is to provide a chaotic image encryption method based on DNA coding with good security performance and encryption effect.

[0006] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0007] The chaotic image encryption method based on DNA coding comprises the following steps executed in sequence:

[0008] S1: obtaining a plaintext grayscale image, calculating a hash value of the plaintext grayscale image by using a hash algorithm, and generating an initial secret key based on the hash value;

[0009] S2: taking the initial secret key as an initial value and a control parameter of an iteration variable of a two-dimensional chaotic mapping 2D-CSMM, iterating a chaotic sequence, and performing segmentation and quantization processing on the chaotic sequence to obtain quantization matrices R1, C1 and D1, a mathematical model of the two-dimensional chaotic mapping 2D-CSMM being:

[0010] ;

[0011] wherein a and b are control parameters, and is an iteration variable;

[0012] S3: performing a reduction XOR operation on the quantization matrices R1, C1 and D1 respectively to obtain bit matrices G1, G2 and G3;

[0013] S4: performing a permutation processing on the plaintext grayscale image based on the bit number of the shift of the matrix R1 and the quantization matrix C1, and the bit matrices G1 and G2;

[0014] The specific steps of the permutation processing in step S4 are as follows:

[0015] S41: performing a row cyclic shift permutation on the plaintext grayscale image, the bit number of the shift being the element value of the corresponding row of the matrix R1, and the direction of the cycle being determined according to the element value corresponding to G1, if the value is 1, the cycle is to the left, otherwise the cycle is to the right, and the result of the permutation is stored as an intermediate encrypted image E1;

[0016] S42: performing a column cyclic shift permutation on the intermediate encrypted image E1, the bit number of the shift being the element value of the corresponding column of the matrix C1, and the direction of the cycle being determined according to the element value corresponding to G2, if the value is 1, the cycle is up, otherwise the cycle is down, and the result of the permutation is stored as E2;

[0017] S43: repeating steps S41 and S42, and obtaining a permuted matrix after two rounds of permutation;

[0018] S5: performing a DNA diffusion processing on the permuted matrix based on the quantization matrix D1 and the bit matrix G3 to obtain an encrypted image;

[0019] S6: decrypting the encrypted image according to the inverse process of image encryption to obtain a decrypted image.

[0020] Preferably, the specific steps of generating the initial secret key in step S1 are as follows:

[0021] S11: obtaining a plaintext grayscale image, the size of the plaintext grayscale image P being MxN;

[0022] S12: input the plaintext grayscale image into the SHA-256 function to generate a unique hash value hash, and convert the hash value hash into a 256-bit binary hash value, and divide it into 32 parts on average, and use to represent;

[0023] S13: based on the binary hash value , the initial value of the two-dimensional chaotic mapping is calculated by using the following formula and , and the control parameters and :

[0024] ;

[0025] wherein represents summation, represents the hash value sequence of the binary sequence between two value ranges, represents the hash value corresponding to the corresponding value in the binary sequence, represents modulo.

[0026] Preferably, the iteration process of step S2 is as follows:

[0027] S21: taking and as the initial values of the two-dimensional chaotic mapping iteration variables, and as the control parameters of the two-dimensional chaotic mapping, that is, let , ;

[0028] When the iteration reaches a preset number of times, the chaotic state is entered, and the complex chaotic mapping M+N+M×N is iterated again, and the chaotic sequence obtained by iteration is divided into three different matrices R, C and D according to the lengths M, N and M×N, wherein the size of R is 1×M, the size of C is 1×N, and the size of D is M×N.

[0029] S22: quantize the three different matrices R, C and D obtained to obtain , and , which are expressed by using the following formula:

[0030] .

[0031] An image encryption system includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the chaotic image encryption method based on DNA coding according to any one of the above.

[0032] By adopting the foregoing design scheme, the beneficial effects of the present application are: the present application constructs a new two-dimensional chaotic mapping 2D-CSMM on the basis of Logistic and Henon mappings, provides a chaotic mapping with excellent chaotic characteristics for an encryption system, and further greatly improves the security of image encryption; the new two-dimensional chaotic mapping is combined with reduction operation, and a new image encryption algorithm is proposed by using simple image shift position disorder and DNA diffusion, which can resist various image attacks and has good security performance and encryption effect. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 A flowchart of the chaotic image encryption method based on DNA coding of the present application;

[0034] Figure 2 An encryption flowchart of the chaotic image encryption method based on DNA coding of the present application;

[0035] Figure 3 A scrambling process diagram of the chaotic image encryption method based on DNA coding of the present application;

[0036] Figure 4 A DNA operation table of the chaotic image encryption method based on DNA coding of the present application;

[0037] Figure 5 A test image of the chaotic image encryption method based on DNA coding of the present application;

[0038] Figure 6 An encryption effect diagram of the test image of the chaotic image encryption method based on DNA coding of the present application;

[0039] Figure 7 A decryption effect diagram of the test image of the chaotic image encryption method based on DNA coding of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0041] As shown in Figure 1 and Figure 2 , the chaotic image encryption method based on DNA coding comprises the following steps:

[0042] S1: obtaining a plaintext grayscale image, calculating a hash value of the plaintext grayscale image by using a hash algorithm, and generating an initial secret key based on the hash value;

[0043] The specific steps of step S1 are as follows:

[0044] S11: obtaining a plaintext grayscale image P, the size of the plaintext grayscale image P being MxN;

[0045] S12: inputting the plaintext grayscale image P into an SHA-256 function to generate a unique hash value hash, converting the hash value hash into a 256-bit binary hash value, and equally dividing the 256-bit binary hash value into 32 parts, and using the following formula to represent the 32 parts:

[0046] S13: based on the binary hash value The initial values of the two-dimensional chaotic mapping are calculated by using the following formula: and , and the control parameters and are as follows:

[0047]

[0048] wherein, represents summation; represents a hash value sequence of the binary sequence between two value ranges; represents a hash value corresponding to a corresponding value in the binary sequence; represents modulo operation.

[0049] S2: taking the initial secret key as the initial values of the iteration variables and the control parameters of the two-dimensional chaotic mapping, and iterating out a chaotic sequence, in the embodiment, the mathematical model of the two-dimensional chaotic mapping (2D-CSMM, two dimensional-combine Sine and modular function chaotic map based on Logistic and Henon map) is as follows:

[0050]

[0051] wherein, a and b are control parameters, and are iteration variables. The two-dimensional chaotic mapping 2D-CSMM has hyperchaotic behavior in , .

[0052] The specific steps of step S2 are as follows:

[0053] S21: taking and ​​​The initial value of the iteration variable of the two-dimensional chaotic mapping, and The control parameter of the two-dimensional chaotic mapping, that is, let , ;

[0054] When the iteration reaches a preset number of times, after entering the chaotic state, the compound chaotic mapping M+N+MxN is iterated again, and the chaotic sequence obtained by iteration is divided into three different matrices R, C and D according to the lengths M, N and MxN, wherein the size of R is 1xM, the size of C is 1xN, and the size of D is MxN. In this embodiment, the preset number of times is 1000, which can be set according to actual application requirements.

[0055] S22: The obtained three different matrices R, C and D are quantized to obtain , and , which are expressed by the following formula:

[0056] ;

[0057] S3: The reduced exclusive-OR operation is performed on the quantized matrices , and to obtain the bit matrices , and , that is, the processed 1-bit result is stored in the bit matrices G1, G2 and G3.

[0058] The reduction operation is an operation mode in the hardware description programming language Verilog. When the reduction operation is performed, the elements in the matrix are converted into binary, and the exclusive-OR operation is performed on each bit of the converted binary number, and finally the new data 0 or 1 can be obtained, and then the data is stored in the new matrix. For example, assuming that an element in the matrix is 10, the element is converted into binary 1010, and then the binary numbers are mutually exclusive-OR, and finally the result 0 is obtained, and then 0 is stored in the new matrix.

[0059] S4: The bit number based on the shift is the matrix R1 and the quantized matrix C1, and the bit matrices G1 and G2 are used to perform scrambling processing on the plaintext grayscale image to obtain a scrambled matrix. The specific steps are as follows:

[0060] S41: The plaintext grayscale image P is circularly shifted to the left for scrambling, the number of bits of the shift is the element value corresponding to the row of the matrix R1, and the direction of the cycle is determined according to the element value corresponding to G1. If the value is 1, the cycle is to the left, otherwise the cycle is to the right. The scrambled result is stored as an intermediate encrypted image E1;

[0061] S42: The intermediate encrypted image E1 is subjected to column cyclic shift position disordering, the number of shifted positions being the number of elements in the column corresponding to the matrix C1, and the direction of the cycle being determined according to the number of elements corresponding to G2, if the number is 1, the cycle is upward, otherwise, the cycle is downward, and the result of the disordering is stored as E2; see Figure 3 .

[0062] S43: Steps S41 and S42 are repeated, and after two rounds of disordering, the matrix after the disordering processing is obtained.

[0063] S5: The matrix after the disordering is subjected to DNA diffusion processing based on the quantization matrix D1 and the bit matrix G3, and an encrypted image E3 is obtained.

[0064] In this embodiment, E3 and D1 are subjected to DNA encoding, and the elements with the same subscripts in the two matrices are subjected to DNA operation, and different operation operations are performed according to the number of elements corresponding to G3, if the number is 1, addition operation is performed, otherwise, subtraction operation is performed. After the operation, the final encrypted image P1 is obtained.

[0065] DNA operation is a technology that simulates the way of DNA base arrangement and combination to encode and encrypt. The pixel value of an image is 0 to 255, and after the pixel gray value of the image is converted into 8-bit binary number, each pixel can be encoded into 4 bases (A, T, C and G). The 4 bases are combined together to form a long sequence, and A is paired with T, and C is paired with G. In order to meet the principle of base complementarity, therefore, there are only 8 encoding ways for DNA encoding. The encoding scheme adopted in this embodiment is 00=A, 01=G, 10=C and 11=T.

[0066] When DNA addition and subtraction operations are performed, the table is executed according to Figure 4 . For example, the first element of E3 and D1 is 128 and 20 respectively, which is converted into binary as 10000000 and 00010100, and according to the DNA encoding rule, it can be converted into CAAA and AGGA, and the addition operation can obtain a new letter CGGA, which is converted into binary 10010100, and the first element of the encrypted image is obtained as 84, and so on. Finally, after the addition and subtraction operations are performed, the final encrypted image P1 is obtained.

[0067] S6: The encrypted image is decrypted according to the inverse process of image encryption, and a decrypted image is obtained.

[0068] In this embodiment, the test image is Figure 5 , and the encrypted effect diagram after encryption is shown in Figure 6 , the pixel distribution of the ciphertext image presents uniform noise characteristics, and the spatial structure and texture features in the test image are completely covered; the decryption effect diagram after the decryption of the ciphertext image is shown inFigure 7 As shown, by performing the chaotic sequence generation and DNA decoding operations in reverse, the details in the test image are completely restored.

[0069] In this embodiment, an image encryption system capable of implementing the above encryption method is also provided.

[0070] An image encryption system includes a memory and a processor, the memory stores a computer program, and the processor implements the DNA coding-based chaotic image encryption method according to any one of the above when executing the computer program.

[0071] To sum up, on the basis of Logistic and Henon mappings, a new two-dimensional chaotic mapping 2D-CSMM is constructed in the present application, which provides a chaotic mapping with excellent chaotic characteristics for the encryption system, thereby greatly improving the security of image encryption. The new two-dimensional chaotic mapping is combined with reduction operation, and simple image shift position scrambling and DNA diffusion are used, thereby a new image encryption algorithm is proposed, which can resist various image attacks and has good security performance and encryption effect.

[0072] The specific embodiments described above further illustrate the purposes, technical solutions and beneficial effects of the present application, and it should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for encrypting chaotic images based on DNA coding, characterized in that: The method comprises the following steps executed in sequence: S1: obtaining a plaintext grayscale image, calculating a hash value of the plaintext grayscale image by using a hash algorithm, and generating an initial secret key based on the hash value; S2: taking the initial secret key as an initial value and a control parameter of an iteration variable of a two-dimensional chaotic mapping 2D-CSMM, iterating out a chaotic sequence, performing segmentation and quantization processing on the chaotic sequence to obtain quantization matrices R1, C1 and D1, and a mathematical model of the two-dimensional chaotic mapping 2D-CSMM is as follows: ; wherein a and b are control parameters, and is an iteration variable; S3: performing reduction XOR operations on the quantization matrices R1, C1 and D1 respectively to obtain bit matrices G1, G2 and G3; S4: performing scrambling processing on the plaintext grayscale image based on the bit number of the shift matrix R1 and the quantization matrix C1, and the bit matrices G1 and G2; The specific steps of the scrambling processing in step S4 are as follows: S41: performing row cyclic shift scrambling on the plaintext grayscale image, the number of elements in the corresponding row of the shift matrix R1 is used as the number of bits of the shift, and the direction of the cycle is determined according to the corresponding element value of G1; if the value is 1, the cycle is to the left, otherwise the cycle is to the right; the scrambled result is stored as an intermediate encrypted image E1; S42: performing column cyclic shift scrambling on the intermediate encrypted image E1, the number of elements in the corresponding column of the shift matrix C1 is used as the number of bits of the shift, and the direction of the cycle is determined according to the corresponding element value of G2; if the value is 1, the cycle is up, otherwise the cycle is down; the scrambled result is stored as E2; S43: repeating steps S41 and S42, and obtaining a scrambled matrix after two rounds of scrambling; S5: performing DNA diffusion processing on the scrambled matrix based on the quantization matrix D1 and the bit matrix G3 to obtain an encrypted image; S6: decrypting the encrypted image according to the inverse process of image encryption to obtain a decrypted image.

2. The DNA-encoding based chaotic image encryption method of claim 1, wherein: The specific steps of generating the initial secret key in step S1 are as follows: S11: obtaining a plaintext grayscale image, the size of the plaintext grayscale image P is M×N; S12: input the plaintext gray image into the SHA-256 function to generate a unique hash value hash, and convert the hash value hash into a 256-bit binary hash value, and divide it into 32 parts evenly, and adopt indicates; S13: based on the binary hash value The initial value of the two-dimensional chaotic mapping is calculated by the following formula and and the control parameters and : ; wherein, denotes a summation, denotes a sequence of hash values of the binary sequence between two ranges of values, denotes a hash value corresponding to the respective value in the binary sequence, denotes a modulo.

3. The DNA-encoding based chaotic image encryption method of claim 2, wherein: The iteration process of step S2 is as follows: S21: the and as the initial value of the iteration variable of the two-dimensional chaotic map, and as the control parameter of the two-dimensional chaotic map, i.e. let , ; When the iteration reaches a preset number of times, the chaotic state is entered, and the complex chaotic mapping is iterated M+N+M×N times; the chaotic sequence obtained by iteration is segmented into three different matrices R, C and D according to lengths M, N and M×N, wherein the size of R is 1×M, the size of C is 1×N, and the size of D is M×N. S22: quantizing the three different matrices R, C and D obtained to obtain , and , expressed by the following formula: 。 4. An image encryption system comprising a memory and a processor, the memory having stored therein a computer program, characterized in that: The processor implements the DNA coding-based chaotic image encryption method according to any one of claims 1-3 when executing the computer program.

Citation Information

Patent Citations

  • Image encryption method based on two-dimensional Logistic chaotic system algorithm

    CN109379510A

  • Image encryption method based on chaotic sequence and DNA coding

    CN113225449A