Image encryption algorithm based on multiple chaotic systems and DNA coding

By adopting multi-chaotic system and DNA encoding methods in image encryption, the shortcomings of traditional encryption technology in key space and attack resistance are solved, and a more efficient and secure image encryption effect is achieved.

CN119602930APending Publication Date: 2025-03-11GUILIN UNIV OF ELECTRONIC TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411681533.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art is difficult to achieve a large enough key space in image encryption to resist exhaustive attacks and other attack methods. At the same time, the traditional two-dimensional and three-dimensional chaotic encryption algorithms are insufficient in terms of effect.

Method used

The method of multi-chaos system and DNA encoding is adopted. The specific steps include using the SHA256 algorithm to generate the initial key, generating chaotic sequences through the three-dimensional Chen chaos system and the one-dimensional Logistic chaotic system for blocking and bit messing, and finally using DNA encoding to further improve the security of the image.

Benefits of technology

Through the combination of multi-chaotic system and DNA encoding, the security of image encryption is significantly improved, the key space is increased, and the exhaustive attack, differential attack and crop attack are effectively resisted, while improving the encryption effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119602930A_ABST
    Figure CN119602930A_ABST
Patent Text Reader

Abstract

The invention discloses an image encryption method based on multiple chaotic systems and DNA coding. A three-dimensional Chen chaotic system is adopted to generate a chaotic sequence to carry out block scrambling and spiral scrambling on an image, a chaotic sequence generated by Logisitc mapping is adopted to realize bit scrambling on the image, and in order to further improve encryption safety, DNA coding is carried out on an image matrix after scrambling operation is completed according to the chaotic sequence generated by the Chen chaotic system. And then diffusion operation is carried out to obtain a DNA sequence, and the chaos sequence is used to decode the DNA sequence to finally obtain an encrypted image. The method has a key space which is large enough to resist exhaustive attacks, can effectively resist differential attacks, cutting attacks and the like, has higher security compared with a traditional chaotic system encryption algorithm, and is a safe and effective image encryption algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of image encryption, and adopts a multi-chaotic system and a DNA encoding method. Background Art

[0002] Information security plays a vital role in today's society. As the forms of information are becoming increasingly diverse, images, as an important information carrier, are increasingly being used. Image data not only contains rich information in many fields such as education, advertising, video surveillance and photography, but also becomes an indispensable part of information transmission with its intuitive expression. A large amount of image data information is generated on the Internet all the time, so the importance of security is particularly reflected in the process of information transmission.

[0003] In traditional cryptographic research, image information is usually not regarded as a unique type of plaintext, so its unique cryptographic properties are often not studied independently. The inherent properties of image data, such as high redundancy of data, non-uniform distribution of energy, and its two-dimensional spatial layout, limit the applicability of traditional encryption technologies such as RSA, DES, and AES in image encryption. In other words, the needs and characteristics of image encryption go beyond the design scope of traditional encryption methods. More and more scholars studying image security have continuously proposed new image encryption algorithms based on different theories, and common theories include chaos and compressed sensing. In particular, among these common theories, chaotic systems make image encryption algorithms more efficient due to their inherent characteristics, and their emergence has pushed the study of classical mechanics into a new era, which is the most important scientific theoretical discovery in the 20th century.

[0004] In order to ensure the security of image information, the present invention proposes an image encryption algorithm based on multiple chaotic systems and DNA coding. Summary of the invention

[0005] The technical problem to be solved by the present invention is how to have a sufficiently large key space to resist exhaustive attacks, and effectively resist differential attacks, clipping attacks, etc., and make the encryption effect better than traditional three-dimensional and two-dimensional chaotic encryption algorithms.

[0006] In order to solve the above technical problems, the technical solution adopted by this algorithm is: the SHA256 algorithm is used to generate the initial key as the initial value of the three-dimensional Chen chaotic system, and then the three-dimensional Chen chaotic system is used to generate the sequence and the one-dimensional chaotic system Logistic map is used to generate the chaotic sequence for spiral scrambling and bit scrambling respectively, and finally DNA coding is used to further improve the image security, which specifically includes the following steps:

[0007] S1: Use the SHA-256 algorithm to process the input image as the initial parameter of the three-dimensional chaotic system to generate different chaotic sequences;

[0008] S2: Using the chaotic sequence generated by the three-dimensional chaotic system to scramble the image matrix in blocks;

[0009] S3: Logistic chaotic mapping then performs bit scrambling on the block-scrambled image;

[0010] S4: DNA encoding the scrambled image to further confuse the pixels and obtain an encrypted image;

[0011] By adopting the above technical solution, by using the chaotic sequence generated by the three-dimensional Chen chaotic system for block scrambling and the chaotic sequence generated by the two-dimensional chaotic system for bit scrambling, and by using two different scrambling operations and different chaotic systems, the encryption operation of the image can be effectively realized, and each chaotic system can generate a unique random sequence, making the encrypted image more difficult to crack. In addition, DNA coding is used to further realize pixel confusion, which further improves security while being able to resist more types of attacks, and increases the key space, enhancing the robustness of the system.

[0012] Preferably, the specific steps of step S1 are:

[0013] S11: converting the image into an image matrix;

[0014] S12: The SHA-256 algorithm processes the input image matrix to obtain a hash value K of a 256-bit binary number, and the key K is divided into 32 groups, each group is an 8-bit binary number, named K = {K1, K2, ... K32};

[0015] S13: Substitute K={K1, K2, ... K32} into the following formula to obtain intermediate variables a, b, c, d, e, f;

[0016]

[0017]

[0018]

[0019]

[0020]

[0021]

[0022] S14: Substitute the intermediate variables a, b, c, d, e, and f into the following formula to obtain u, v, w, x, y, and z;

[0023]

[0024]

[0025]

[0026]

[0027]

[0028]

[0029] S15: Where u1, v1, w1, x1, y1, z1 are constants, u, v, w, x, y, z are initial values, {u, v, w} and {x, y, z} are brought into the three-dimensional Chen system (the formula is as follows), and the two sets of parameters are brought into the three-dimensional chaotic system and iterated M×N+1500 times respectively, discarding the first 1500 chaotic values, where M×N is the size of the image matrix to be encrypted, to obtain 2 groups of 6 chaotic sequences with a length of M×N: SeqU, SeqV, SeqW, SeqX, SeqY, SeqZ.

[0030]

[0031] Preferably, after the chaotic sequence generation is completed, the pixel values ​​of the image are then scrambled. First, the image is scrambled in blocks, and then each sub-block is spirally scrambled. The specific steps of step S2 are:

[0032] S21: Divide the image into m = M × N sub-blocks of the same size n × n, and fill the missing parts with 0 pixels. Defined as D = {D1, D2, ... Dm}, D1 = {p1, p2, ... pn × n}, D2 = {p1, p2, ... pn × n} ... Dm = {p1, p2, ... pn × n};

[0033] S22: extract a chaotic sequence with a length of m from the chaotic sequence SeqU as U1, and perform fast scrambling on the image;

[0034] S23: A chaotic sequence with a length of m is intercepted from the chaotic sequence Seq V as V1, and the upper left, upper right, lower left, and lower right of each sub-block are respectively recorded as 0, 1, 2, and 3, and the following formula is used as the scanning starting point of the sub-block;

[0035] V1′(i)=V1(i)mod4, i=1, 2, 3,...m

[0036] S24: A chaotic sequence with a length of m is intercepted from the chaotic sequence Seq W as W3, 0 and 1 are set to clockwise rotation and counterclockwise rotation respectively, and then the direction of rotation is determined by the following formula;

[0037] W1′(i)=W1(i)mod2, i=1, 2, 3,...m

[0038] S25: Combine the two formulas S23 and S24 to find the initial pixel point, then loop through each pixel value according to the rotation direction, rearrange and combine them, and complete the above operation for each sub-block to complete the rotation scrambling of the image.

[0039] Preferably, after block scrambling and spiral scrambling, the correlation between adjacent pixels has been greatly reduced, and then the bits are scrambled to further improve security. The specific steps of S3 are as follows:

[0040] S31: First, convert each binary pixel value after step S2 into an eight-bit decimal value;

[0041] S32: Using two-dimensional Logistic chaotic map (x n+1 =μx n (1-x n )) Iterate M×N+1000 times, discard the first 1000 chaotic values, and finally get the chaotic sequence Seq K;

[0042] S33: through the formula K1′(i)=W1(i) / 2, i=1, 2, 3...m×n, each pixel value and the corresponding chaotic sequence completes the above formula and then performs a circular right shift operation.

[0043] Preferably, after spiral scrambling and bit scrambling are achieved, the correlation of the image is greatly reduced. In order to further improve the security of the algorithm, DNA coding is used to further confuse the image pixels. In the DNA coding process, the image information is converted into a string of symbols composed of four bases: adenine (A), guanine (G), thymine (T) and cytosine (C), which correspond to binary 00, 01, 10, 11 respectively. The binary information can be converted into a DNA sequence. The step S4 mainly includes:

[0044] S41: first convert the chaotic sequence Seq X into binary, so as to facilitate the subsequent use of the binary chaotic sequence to encode the image;

[0045] S42: Then, the base group is set for two adjacent bits of the image binary sequence using the following formula S;

[0046]

[0047] S43: Encode the pixel by using the chaotic sequence Seq X as a control bit;

[0048] S44: selecting a corresponding DNA encoding rule according to the value of the sequence Seq X;

[0049] S45: After pixel-level position scrambling and bit-level data obfuscation, most of the pixel arrangement and color values ​​of the image have changed. Then, through the diffusion process, the small changes in the image will be extended to the entire encrypted image. The chaotic sequence Seq Y is used to obtain the chaotic sequence DY through DNA encoding, and then the diffusion operation is performed through the following formula;

[0050]

[0051] S46: Formulate a DNA decoding rule H according to the chaotic sequence SeqZ by combining the encoding rule with the following formula;

[0052] H=mod(Seq Z(i),8)+1,i=1,2,3,m×n

[0053] S47: After DNA decoding, the final encrypted image is obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 Schematic diagram of the process framework for image encryption based on multi-chaotic system and DNA coding encryption algorithm;

[0055] Figure 2 Example diagrams of block scrambling and spiral scrambling;

[0056] Figure 3 Bit scrambling example diagram;

[0057] Figure 4 DNA coding rules;

[0058] Figure 5 DNA coding;

[0059] Figure 6 The image to be encrypted;

[0060] Figure 7 Encrypted images; DETAILED DESCRIPTION

[0061] The embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention.

[0062] Example: Figure 1 As shown, the image encryption method specifically includes the following steps:

[0063] S11: converting the image into an image matrix;

[0064] S12: The SHA-256 algorithm processes the input image matrix to obtain a hash value K of a 256-bit binary number, and the key K is divided into 32 groups, each group is an 8-bit binary number, named K = {K1, K2, ... K32};

[0065] S13: Substitute K={K1, K2, ... K32} into the following formula to obtain intermediate variables a, b, c, d, e, f;

[0066]

[0067]

[0068]

[0069]

[0070]

[0071]

[0072] S14: Substitute the intermediate variables a, b, c, d, e, and f into the following formula to obtain u, v, w, x, y, and z;

[0073]

[0074]

[0075]

[0076]

[0077]

[0078]

[0079] S15: Where u1, v1, w1, x1, y1, z1 are constants, u, v, w, x, y, z are initial values, {u, v, w} and {x, y, z} are brought into the three-dimensional Chen system (the formula is as follows), and the two sets of parameters are brought into the three-dimensional chaotic system and iterated M×N+1500 times respectively, discarding the first 1500 chaotic values, where M×N is the size of the image matrix to be encrypted, to obtain 2 groups of 6 chaotic sequences with a length of M×N: SeqU, SeqV, SeqW, SeqX, SeqY, SeqZ.

[0080]

[0081] Preferably, after the chaotic sequence generation is completed, the pixel values ​​of the image are then scrambled. First, the image is scrambled in blocks, and then each sub-block is spirally scrambled. The specific steps of step S2 are:

[0082] S21: Divide the image into m = M × N sub-blocks of the same size n × n, and fill the missing parts with 0 pixels. Defined as D = {D1, D2, ... Dm}, D1 = {p1, p2, ... pn × n}, D2 = {p1, p2, ... pn × n} ... Dm = {p1, p2, ... pn × n};

[0083] S22: Extract a chaotic sequence with a length of m from the chaotic sequence SeqU as U1, and scramble the image. Figure 2 As shown, before spiral scrambling, block scrambling is performed first;

[0084] S23: A chaotic sequence with a length of m is intercepted from the chaotic sequence Seq V as V1, and the upper left, upper right, lower left, and lower right of each sub-block are respectively recorded as 0, 1, 2, and 3, and the following formula is used as the scanning starting point of the sub-block;

[0085] V1′(i)=V1(i)mod4, i=1, 2, 3,...m

[0086] S24: A chaotic sequence with a length of m is intercepted from the chaotic sequence Seq W as W3, 0 and 1 are set to clockwise rotation and counterclockwise rotation respectively, and then the direction of rotation is determined by the following formula;

[0087] W1′(i)=W1(i)mod2, i=1, 2, 3,...m

[0088] S25: Combine the two formulas S23 and S24 to find the initial pixel point, then loop through each pixel value according to the rotation direction, rearrange and combine them, and complete the above operation for each sub-block to complete the rotation scrambling of the image. Figure 2 As shown, after the block scrambling is completed, the chaotic sequence {7, 8, 3, 6} is used as the starting point of the three-second point of the spiral scrambling through the formula in S23, and then the chaotic sequence {4, 6, 5, 8} is used to determine whether to rotate clockwise or counterclockwise through the formula in step S24, until the pixel values ​​of each block are traversed, the spiral scrambling of the image is achieved.

[0089] Preferably, after completing the block scrambling and spiral scrambling, bit scrambling is performed to further reduce the correlation of the image, and the specific step S3 is:

[0090] S31: First, convert each binary pixel value after step S2 into an eight-bit decimal value, such as Figure 4 As shown, the pixel values ​​36, 129, 78, 230 are converted into binary 00100100, 10000001, 01001110, 11100110;

[0091] S32: Using two-dimensional Logistic chaotic map (x n+1 =μx n (1-x n )) Iterate M×N+1000 times, discard the first 1000 chaotic values, and finally get the chaotic sequence Seq K;

[0092] S33: By using the formula K1′(i)=W1(i) / 2, i=1, 2, 3, ...m×n, each pixel value and the corresponding chaotic sequence completes the above formula and performs a circular right shift operation. Figure 4 As shown, the chaotic sequence {5, 2, 3, 9} is used to shift the bits to the right by 2, 1, 1, and 4 bits respectively using the formula of S33. After shifting each pixel value, the binary value is converted into a decimal pixel value, and then the image matrix after bit scrambling is obtained.

[0093] Preferably, after spiral scrambling and bit scrambling are achieved, the correlation of the image is greatly reduced. In order to further improve the security of the algorithm, DNA coding is used to further confuse the image pixels. In the DNA coding process, the image information is converted into a string of symbols composed of four bases: adenine (A), guanine (G), thymine (T) and cytosine (C), which correspond to binary 00, 01, 10, 11 respectively. The binary information can be converted into a DNA sequence. The step S4 mainly includes:

[0094] S41: first convert the chaotic sequence Seq X into binary, so as to facilitate the subsequent use of the binary chaotic sequence to encode the image;

[0095] S42: Then, the base group is set for two adjacent bits of the image binary sequence using the following formula S;

[0096]

[0097] S43: Encode the pixel by using the chaotic sequence Seq X as the control bit. Figure 5 As shown, the eight bits of each pixel are divided into four groups in pairs, and the first bit of each group is recorded as a, and S is the value of the two bits of each group, as shown in the above S42 formula. Figure 4 The encoding rules determine the final base symbol, such as Figure 5As shown, for the bit position 00, S=0, a=0, the corresponding binary sequence is 0, and 00 is converted into adenine (A) according to the encoding rule to encode each pixel value;

[0098] S44: After pixel-level position scrambling, bit-level data obfuscation and DNA encoding, most of the pixel arrangement and color values ​​of the image have changed. Then, through the diffusion process, the small changes in the image will be extended to the entire encrypted image. The chaotic sequence Seq Y is used to obtain the chaotic sequence DY through DNA encoding, and then the diffusion operation is performed through the following formula;

[0099]

[0100] S45: Formulate a DNA decoding rule H according to the chaotic sequence SeqZ by combining the encoding rule with the following formula;

[0101] H=mod(Seq Z(i),8)+1,i=1,2,3,m×n

[0102] S46: After DNA decoding, the final encrypted image is obtained, such as Figure 7 shown.

Claims

1. An image encryption method based on multi-chaotic system and DNA coding specifically comprises the following steps: S1: Use the SHA-256 algorithm to process the input image as the initial parameter of the three-dimensional chaotic system to generate different chaotic sequences; S2: Using the chaotic sequence generated by the three-dimensional Chen chaotic system to perform block scrambling and pixel scrambling on the image matrix; S3: Logistic chaotic mapping then performs bit scrambling on the block-scrambled image; S4: DNA encoding is performed on the scrambled image to further confuse the pixels and obtain an encrypted image.

2. According to the image encryption method of claim 1, the specific steps of step S1 are: S11: converting the image into an image matrix; S12: The SHA-256 algorithm processes the input image matrix to obtain a hash value K of a 256-bit binary number, and the key K is divided into 32 groups, each group is an 8-bit binary number, named K = {K1, K2, ... K32}; S13: Substitute K={K1, K2, ... K32} into the following formula to obtain intermediate variables a, b, c, d, e, f; S14: Substitute the intermediate variables a, b, c, d, e, and f into the following formula to obtain u, v, w, x, y, and z; S15: Where u1, v1, w1, x1, y1, z1 are constants, u, v, w, x, y, z are initial values, {u, v, w} and {x, y, z} are brought into the three-dimensional Chen system (the formula is as follows), and the two sets of parameters are brought into the three-dimensional chaotic system and iterated M×N+1500 times respectively, discarding the first 1500 chaotic values, where M×N is the size of the image matrix to be encrypted, to obtain 2 groups of 6 chaotic sequences with a length of M×N: SeqU, SeqV, SeqW, SeqX, SeqY, SeqZ.

3. After the chaotic sequence is generated according to claim 2, the specific steps of step S2 are: S21: Divide the image into m = M × N sub-blocks of the same size n × n, and fill the missing parts with 0 pixels. Defined as D = {D1, D2, ... Dm}, D1 = {p1, p2, ... pn × n}, D2 = {p1, p2, ... pn × n} ... Dm = {p1, p2, ... pn × n}; S22: extract a chaotic sequence with a length of m from the chaotic sequence SeqU as U1, and perform fast scrambling on the image; S23: A chaotic sequence with a length of m is intercepted from the chaotic sequence Seq V as V1, and the upper left, upper right, lower left, and lower right of each sub-block are respectively recorded as 0, 1, 2, and 3, and the following formula is used as the scanning starting point of the sub-block; V1′(i)=V1(i)mod4,i=1,2,3,…m S24: A chaotic sequence with a length of m is intercepted from the chaotic sequence Seq W as W3, 0 and 1 are set to clockwise rotation and counterclockwise rotation respectively, and then the direction of rotation is determined by the following formula; W1′(i)=W1(i)mod2,i=1,2,3,…m S25: Combine the two formulas S23 and S24 to find the initial pixel point, then loop through each pixel value according to the rotation direction, rearrange and combine them, and complete the above operation for each sub-block to complete the rotation scrambling of the image.

4. After performing block scrambling and spiral scrambling according to claim 3, the specific steps of step S3 are: S31: First, convert each binary pixel value after step S2 into an eight-bit decimal value; S32: Using two-dimensional Logistic chaotic map (x n+1 =μx n (1-x n )) Iterate M×N+1000 times, discard the first 1000 chaotic values, and finally get the chaotic sequence Seq K; S33: Through the formula K1′(i)=W1(i) / 2, i=1,2,3,…m×n, each pixel value and the corresponding chaotic sequence completes the above formula and then performs a cyclic right shift operation.

5. After bit scrambling according to claim 4, the specific steps of step S4 are: S41: first convert the chaotic sequence Seq X into binary, so as to facilitate the subsequent use of the binary chaotic sequence to encode the image; S42: Then, the base group is set for two adjacent bits of the image binary sequence using the following formula S; S43: Encode the pixel by using the chaotic sequence Seq X as a control bit; S44: selecting a corresponding DNA encoding rule according to the value of the sequence Seq X; S45: After pixel-level position scrambling and bit-level data obfuscation, most of the pixel arrangement and color values ​​of the image have changed. Then, through the diffusion process, the small changes in the image will be extended to the entire encrypted image. The chaotic sequence Seq Y is used to obtain the chaotic sequence DY through DNA encoding, and then the diffusion operation is performed through the following formula; S46: Formulate a DNA decoding rule H according to the chaotic sequence SeqZ by combining the encoding rule with the following formula; H=mod(Seq Z(i),8)+1,i=1,2,3,m×n S47: After DNA decoding, the final encrypted image is obtained.