DNA image encryption method based on sawtooth spiral scrambling and cross bit plane
By employing a DNA-based image encryption method using zigzag spiral scrambling and cross-plane bit-level scrambling, combined with a four-dimensional hyperchaotic system and a dynamic lookup table diffusion mechanism, the problems of incomplete scrambling and uneven information distribution in existing image encryption algorithms are solved, resulting in an image encryption scheme with high security and strong resistance to attacks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV FOR SCI & TECH ZHENGZHOU
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-21
AI Technical Summary
Existing image encryption algorithms suffer from incomplete scrambling, uneven distribution of DNA-encoded information, and a single diffusion mechanism, resulting in insufficient security and an inability to effectively resist attacks.
A DNA image encryption method based on zigzag spiral scrambling, cross-plane, and four-dimensional hyperchaotic system is adopted. The global pixel positions are completely scrambled through zigzag spiral scrambling and index scrambling. Combined with cross-plane reconstruction and dynamic lookup table diffusion mechanism, the uniformity of information distribution and the randomness of diffusion process are improved.
It achieves high security and attack resistance, and enhances the ability to resist exhaustive and chosen-plaintext attacks through complex dynamic behavior and key space. It also significantly reduces the correlation between adjacent pixels and improves the resistance to shearing and statistical attacks.
Smart Images

Figure CN121908017A_ABST
Abstract
Description
Technical Field This invention relates to the field of information security technology, and in particular to a DNA image encryption method based on zigzag spiral scrambling and cross-plane bit planes. Background Technology With the advancement of information technology, image data security has become increasingly important. Traditional text encryption methods such as DES and AES are not entirely suitable due to the large volume and high redundancy of image data. Image encryption algorithms based on chaos theory and DNA encoding have become a research hotspot due to their sensitivity to initial values and strong parallel processing capabilities. However, existing encryption algorithms combining DNA and chaos still have shortcomings: traditional spiral scrambling often results in some pixels not changing their relative positions, and incomplete removal of local correlations. Traditional DNA encoding combines bit planes pairwise from high to low, with the high bit plane information accounting for a much larger proportion than the low bit plane, resulting in extremely uneven information distribution after encoding and reduced security. The key calculation of some algorithms is independent of the plaintext, making them unable to effectively resist chosen-plaintext attacks. To address these problems, this invention proposes an encryption scheme that combines sawtooth spiral scrambling, index scrambling, and dynamic lookup table diffusion. Summary of the Invention
[0001] The purpose of this invention The purpose of this invention is to provide a DNA image encryption method and system based on zigzag helical scrambling and cross-plane, which has high security and strong anti-attack capability, in order to solve the technical problems of incomplete scrambling, uneven distribution of DNA coding information and single diffusion mechanism in existing image encryption algorithms.
[0002] Technical solution To achieve the above objectives, the technical solution adopted by the present invention is as follows: A DNA image encryption method based on zigzag spiral scrambling and crossover plane, comprising the following steps performed sequentially: S1: Obtain the plaintext image, calculate the hash value of the plaintext image using a hash algorithm, and generate the initial key by combining the average value of the image; S2: Construct a non-degenerate four-dimensional hyperchaotic system, using the initial key as the initial value and control parameter of the system, and iteratively generate four interrelated chaotic sequences X, Y, Z, W: The four-dimensional hyperchaotic system has two positive Lyapunov exponents and is in a hyperchaotic state; S3: Based on the chaotic sequence X, the plaintext image is scrambled by a sawtooth spiral. The control parameters generated by the sequence X determine the starting direction of the transformation matrix. A sawtooth transformation is performed on the outer circle pixels, and a clockwise spiral transformation is performed on the inner circle pixels to obtain a scrambled image P1. S4: Based on the chaotic sequence X, the first scrambled image P1 is indexed and scrambled. The sequence X is sorted in ascending order to obtain the index sequence. The pixel positions of the image are globally permuted according to the index sequence to obtain the second scrambled image P2. S5: Decompose the scrambled image P2 into 8 bit planes, select the crossover rule based on the chaotic sequence Y, and cross-reconstruct the high bit plane and the low bit plane to obtain the reconstructed sequence P3 with uniform information distribution. S6: DNA encoding is performed on the reconstructed sequence P3 based on the chaotic sequence Y. An auxiliary chaotic sequence v is generated using the chaotic sequences X, Y, Z, and W. A lookup table diffusion process is then performed based on sequences Z, W, and V. Sequence V is used to dynamically select one of the 24 preset DNA addition and subtraction lookup table rules. Sequence W controls the cyclic shift of the DNA encoding. Sequence Z participates in the calculation to change the pixel value. Finally, the diffused DNA sequence CDNA is obtained. S7: Following the reverse process of image encryption, the DNA sequence CDNA is decoded and reshaped to obtain the final encrypted image C.
[0003] The present invention also provides an image encryption system, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-described DNA image encryption method based on zigzag helical scrambling and cross-bit plane.
[0004] Technical effect By adopting the aforementioned technical solution, the present invention has the following beneficial effects: 1. High security: The four-dimensional hyperchaotic system constructed by this invention has a larger key space and more complex dynamic behavior, and the initial key is closely related to the plaintext image features, which can effectively resist exhaustive attacks and chosen-plaintext attacks. 2. Thorough scrambling effect: A sawtooth spiral scrambling strategy is proposed, which overcomes the defect of the local pixel relative position not changing in the traditional spiral scrambling; combined with sorting-based index scrambling, the pixel position is fully scrambled, which significantly reduces the correlation between adjacent pixels and improves the algorithm's anti-shearing performance. 3. Uniform information distribution: By reconstructing the cross-bit plane, the problem of uneven information distribution caused by the excessive proportion of high-bit plane information in traditional DNA coding is broken, making the encrypted data more evenly distributed in the DNA domain and enhancing the ability to resist statistical attacks. 4. Complex diffusion mechanism: A dynamic lookup table diffusion mechanism based on an auxiliary chaotic sequence V is introduced. The diffusion rules are determined by four chaotic sequences, making the diffusion process more random and unpredictable, which greatly improves the robustness of the encryption algorithm. Attached Figure Description Figure 1 This is a flowchart illustrating the encryption and decryption process of the DNA image encryption method based on serrated spiral scrambling and crossover bit planes according to the present invention. Figure 2The phase diagram of the four-dimensional hyperchaotic system of the DNA image encryption method based on zigzag spiral scrambling and crossover bit plane of the present invention is shown. Figure 3 This is a schematic diagram of the zigzag spiral scrambling process in the DNA image encryption method based on zigzag spiral scrambling and crossover bit plane of the present invention; Figure 4 This is the DNA operation table for the DNA image encryption method based on zigzag spiral scrambling and crossover bit plane of the present invention; Figure 5 This invention provides 24 lookup table methods for the DNA image encryption method based on serrated spiral scrambling and crossover plane. Figure 6 These are test images of the DNA image encryption method based on zigzag helical scrambling and crossover bit planes according to the present invention. Figure 7 This is a test image showing the encryption effect of the DNA image encryption method based on zigzag spiral scrambling and crossover bit plane of the present invention; Figure 8 This is a decryption effect diagram of a test image of the DNA image encryption method based on zigzag spiral scrambling and crossover bit plane according to an embodiment of the present invention. Detailed Implementation
[0005] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0006] like Figure 1 and Figure 2 As shown, this invention provides a DNA image encryption method based on zigzag helix scrambling and crossover planes, which includes the following steps performed sequentially:
[0007] Step S1: Key and Chaotic Sequence Generation S11: Obtain a plaintext grayscale image P of size M×N. Calculate the average pixel value Ave of image P. S12: Perform an XOR operation on all column vectors of image P to obtain a sequence L of length M. Divide sequence L into four groups, and perform a bitwise XOR operation on the pixel values in each group to obtain four intermediate hash values h1, h2, h3, and h4. S13: Calculate the initial values x0, y0, z0, and w0 of the four-dimensional hyperchaotic system using the hash values and averages mentioned above. The specific calculation formula is as follows: This step tightly integrates plaintext image features with key generation, effectively resisting chosen-plaintext attacks.
[0008] Step S2: Chaotic Iteration S21: Substitute the initial values generated in step S1 into the four-dimensional hyperchaotic system. The mathematical model of this system is: Where x, y, z, and w are state variables, and c and e are system parameters. When c = 6 and e = 8, the system has two positive Lyapunov exponents and is in a hyperchaotic state. S22: The Runge-Kutta algorithm is used to discretize and iterate the system, with a total of NO+4MN iterations. To eliminate transient effects, the values of the first NO iterations are discarded, resulting in four chaotic sequences X, Y, Z, and W with a length of 4MN.
[0009] Step S3: Scramble the serrated spiral S31: Divide the plaintext image P into several 8×8 pixel blocks. S32: Extract the first K values of the chaotic sequence X (K is the number of pixel blocks), and calculate the direction control parameter dir: dir(k) = mod(floor(X(k) × 10) 14 ), 4) The value of dir(k) is 0, 1, 2, 3, which correspond to the starting positions of the transformation matrix as top left, top right, bottom right, and bottom left, respectively. S33: Based on the direction determined by dir(k), perform a sawtooth transformation on the outermost pixels of each pixel block and a clockwise spiral transformation on the inner pixels. After all blocks have been transformed, a scrambled image P1 is obtained. This step overcomes the defect of traditional spiral scrambling where the relative positions of local pixels remain unchanged.
[0010] Step S4: Index Scrambling To further eliminate inter-pixel correlation and improve anti-shearing performance, global index scrambling is performed on P1: S41: Extract a chaotic sequence X of length MN, sort it in ascending order, and record the sorted index sequence tx. That is, tx(i) represents the position of the i-th smallest element in the original sequence. S42: Permutate the pixel positions of image P1 using the index sequence tx: P2(i)=P1(t x (i)) Where i is the one-dimensional index position of the pixel, and P2 is the image after secondary scrambling. This step utilizes the random sorting property of chaotic sequences to achieve global random scrambling of image pixels.
[0011] Step S5: Intersection Plane Reconstruction S51: Convert each pixel of the scrambled image P2 into an 8-bit binary number. Divide the 8 bit planes into the high four bits (bits 8, 7, 6, and 5) and the low four bits (bits 4, 3, 2, and 1). S52: Generate selection parameters Sbp using the chaotic sequence Y, mapping Y to integers from 1 to 24. Select one rule from 24 preset crossover rules. S53: Following the selected rules, rearrange the high four-position plane to odd-numbered positions (positions 1, 3, 5, and 7), and interleave the low four-position plane to even-numbered positions (positions 2, 4, 6, and 8). The resulting reconstructed sequence P3 is obtained. This step solves the problem of uneven information distribution caused by the excessive proportion of high-position information in traditional DNA coding.
[0012] Step S6: DNA Encoding and Dynamic Table Lookup Diffusion S61: Generating an auxiliary chaotic sequence V: To increase the randomness of the diffusion, an auxiliary sequence V is generated using four chaotic sequences. The calculation formula is as follows: V(i)=mod(floor((X(i)+Y(i)+Z(i)+W(i)×10 7 ),24)+1 The sequence V has a value range of 1-24 and is used to dynamically select the lookup table rule. S62: DNA Encoding: Expand sequence P3 into a DNA sequence. Utilize the chaotic sequence Y to determine the DNA encoding rule (one of eight rules) for each pixel, encoding the pixel into a DNA sequence. S63: Table lookup diffusion: The sequence Z is quantized into integers from 0 to 255 and converted to quaternion, which are then used as operands for DNA operations. The sequence W is quantized into a quaternary number to control the number of cyclic right shifts of the DNA encoding. Dynamic table lookup: For the i-th DNA character, select a table from the 24 preset DNA addition and subtraction operation tables based on the value of V(i). Diffusion operation: Combining the above parameters, a "shift-lookup-XOR" diffusion operation is performed to obtain the diffused DNA sequence (cDNA). This process, through the coordinated control of multiple chaotic sequences, greatly improves the algorithm's complexity and security.
[0013] Step S7: DNA Decoding and Image Reconstruction S71: Following the reverse process of the encoding rules in step S62, the corresponding decoding rule is selected using the chaotic sequence Y. S72: Decodes the diffused DNA sequence cDNA into binary values and converts every 4 consecutive binary numbers into a decimal pixel value. S73: Reshape the obtained one-dimensional pixel sequence into an M×N two-dimensional matrix, which is the final encrypted image C.
[0014] The image decryption process is the reverse of the encryption process described above. First, the ciphertext image is encoded using DNA, then reversediffusion is performed, followed by DNA decoding, then reverse cross-plane reconstruction, and finally, reverse index scrambling and reverse zigzag scrambling are performed sequentially to recover the original plaintext image.
[0015] In summary, this embodiment constructs a highly secure and robust image encryption scheme by introducing a four-dimensional hyperchaotic system, sawtooth spiral scrambling, index scrambling, and a dynamic lookup table diffusion mechanism based on auxiliary sequence V. Experimental results show that this scheme exhibits excellent performance in terms of key space, information entropy, histogram distribution, and resistance to differential attacks. This invention effectively solves the problems of incomplete scrambling and uneven information distribution in traditional algorithms by combining sawtooth spiral scrambling and cross-plane scrambling, and has extremely high security and anti-attack capabilities.
Claims
1. A DNA image encryption method based on zigzag spiral scrambling and crossover plane, characterized in that: The steps are as follows, performed sequentially: S1: Obtain the plaintext image, calculate the average value and hash features of the plaintext image, and generate the initial values and control parameters of the four-dimensional hyperchaotic system; S2: Substitute the initial values and control parameters into the four-dimensional hyperchaotic system to iteratively generate four interrelated chaotic sequences X, Y, Z, and W; S3: Based on the chaotic sequence X, the plaintext image is scrambled using a sawtooth spiral scrambling process to obtain a first-order scrambled image P1; S4: Based on the chaotic sequence X, the first scrambled image P1 is indexed and scrambled to obtain the second scrambled image P2; S5: Decompose the scrambled image P2 into 8 bit planes, select the crossover rule based on the chaotic sequence Y, and perform crossover reconstruction on the high and low bit planes to obtain the reconstructed sequence P3; S6: DNA encoding is performed on the reconstructed sequence P3 based on the chaotic sequence Y. An auxiliary chaotic sequence V is generated using the chaotic sequences X, Y, Z, and W. A table lookup diffusion process is then performed based on sequences Z, W, and V to obtain the diffused DNA sequence cDNA. S7: Decode and reshape the DNA sequence CDNA to obtain the final encrypted image C. S8: Decrypt the encrypted image by following the reverse process of image encryption to obtain the decrypted image.
2. The method as described in claim 1, characterized in that: The mathematical model of the four-dimensional hyperchaotic system described in step S2 is as follows: Where x, y, z, and w are state variables, and c and e are system parameters. When c = 6 and e = 8, the system is in a hyperchaotic state.
3. The method as described in claim 1, characterized in that: The specific steps of the sawtooth spiral scrambling in step S3 are as follows: S31: Divide the image of size M×N into 8×8 pixel blocks; S32: Generate the control parameter dir using the chaotic sequence X. The calculation formula is as follows: dir(k)=mod(floor(X(k)×10 14 ),4) Where k is the index of the pixel block, and dir(k) takes the values 0, 1, 2, and 3, which correspond to the starting positions of the transformation matrix as the top left, top right, bottom right, and bottom left corners, respectively. S33: Based on the starting direction determined by dir(k), perform a zigzag transformation on the outermost pixels of each pixel block and a clockwise spiral transformation on the inner pixels to complete the intra-block scrambling and inter-block scrambling, and obtain the image P1 after zigzag spiral scrambling.
4. The method as described in claim 1, characterized in that: The specific steps for index scrambling in step S4 are as follows: S41: Extract a chaotic sequence X of length M×N, sort it in ascending order, and obtain the sorted index sequence tx, where tx(i) represents the position of the i-th smallest element in the original sequence. S42: Use the index sequence tx to perform a global position permutation on the scrambled image P1 using the following permutation formula: P2(i)=P1(t x (i)) Where i is the pixel position index, and P2 is the secondary scrambled image obtained after index scrambling.
5. The method as described in claim 1, characterized in that: The cross plane mentioned in step S5 is specifically: S51: Convert each pixel value of the secondary scrambled image P2 into an 8-bit binary number, divided into a high four-bit plane (bits 8, 7, 6, and 5) and a low four-bit plane (bits 4, 3, 2, and 1); S52: Use the chaotic sequence Y to generate the selection parameter Sbp, and select one from 24 preset crossover rules; S53: According to the selected rules, rearrange the high four bit planes to odd positions (1st, 3rd, 5th, 7th positions), and interleave the low four bit planes to even positions (2nd, 4th, 6th, 8th positions), and reassemble to generate the reconstructed sequence P3, so that the high and low bit information is evenly distributed. The image's eight bit planes are divided into four high-order bits (8, 7, 6, 5) and four low-order bits (4, 3, 2, 1). A selection parameter Sbp is generated using a chaotic sequence Y. A rule is selected from 24 permutations to place the high-order bit planes at positions 1, 3, 5, 7, and interleave the low-order bit planes at positions 2, 4, 6, 8, forming a new bit plane sequence.
6. The method as described in claim 1, characterized in that: The specific steps for generating the auxiliary chaotic sequence V and the table lookup diffusion described in step S6 are as follows: S61: Calculate the auxiliary chaotic sequence V using the chaotic sequences X, Y, Z, and W. The calculation formula is as follows: V(i)=mod(floor((X(i)+Y(i)+Z(i)+W(i)×10 7 ),24)+1 Where V(i) takes values from 1 to 24; S62: Quantize sequences Z and W into integer sequences of 0-255, and then convert them into quaternary numbers for DNA operation control; S63: Construct 24 DNA addition and subtraction lookup table rules. For the i-th DNA character, use V(i) to select a lookup method from the 24 rules, use W(i) to control the number of cyclic right shifts of the DNA character, and use Z(i) as the operand to perform diffusion operation to obtain the diffused DNA sequence CDNA.
7. The method as described in claim 1, characterized in that: The DNA sequence CDNA described in S7 is subjected to DNA decoding and reshaping to obtain the final encrypted image C. The specific steps are as follows: S71: Obtain a chaotic sequence Y of length 4MN and quantize it into an integer sequence with values between 1 and 8; S72: Traverse the diffused DNA sequence cDNA. For each DNA base in the sequence, select one rule from eight preset DNA decoding rules based on the integer value at the corresponding position of the chaotic sequence Y. S73: Decode the DNA bases into binary values according to the selected rules, and convert every 4 consecutive binary values into a decimal pixel value to obtain a decimal sequence of length MN. S74: Reshape the decimal sequence into a two-dimensional matrix of size M×N, which is the final encrypted image C.
8. An image encryption system, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the DNA image encryption method based on zigzag helical scrambling and cross-plane as described in any one of claims 1-6.