DNA sequence direct encryption method and system based on automaton cryptography
By performing base diffusion and rotation operations on DNA sequences using DS-mealy machines and DS-cellular automata based on automata cryptography, the applicability and security issues of existing DNA storage encryption methods are solved, achieving efficient and secure DNA storage encryption for various data types.
Patent Information
- Application Number
- CN202511518179.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-01-09
AI Technical Summary
Existing DNA storage encryption methods have poor applicability at the bit-level encryption level, insufficient security at the sequence-level encryption level, low performance, low information density, and difficulty in meeting the storage encryption needs of various data types.
An automata-based cryptographic approach is employed, using DS-mealy and DS-cellular automata to perform base diffusion and rotation operations on DNA sequences, combined with biological constraint checks, to generate encrypted DNA sequences that meet the constraint conditions.
It improves the security and practicality of DNA storage, enhances the key space, reduces resource consumption and error rate, and is suitable for various data types with arbitrary coding models.
Smart Images

Figure CN121308951A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of DNA storage security, and particularly relates to a DNA sequence direct encryption method and system based on automata cryptography. BACKGROUND
[0002] At present, the amount of data is growing explosively. DNA storage has become a potential solution to massive data storage due to its high physical storage density, low energy consumption and long-term stable storage characteristics. However, the data transmission security problem of the DNA storage system cannot be ignored. Luis Ceze team of Washington University carried out information security evaluation on DNA synthesis and sequencing process, and found that the information carried by malicious DNA sequence would cause data leakage and data destruction. Grass team of Swiss Federal Institute of Technology proposed a scheme of using 128-bit key AES to encrypt the bit stream of DNA storage. Teng Yue et al. generated pseudo-random bit stream by using BAMNN, and performed XOR operation with the bit stream of target data to realize smaller key storage space and faster decryption speed. Chu Ling et al. proposed non-interactive encryption for DNA storage, which protects the security of DNA storage data by confusing true and false information. The IM-Codec encoding and decoding system proposed by Dai Junbiao team of Institute of Agricultural Genomics, Chinese Academy of Agricultural Sciences first introduced non-natural base pair DNA sequence for encryption, breaking through the limitation of DNA coding density.
[0003] Although the existing technologies have made many attempts in the encryption of DNA storage, there are still obvious defects. Among them, the bit-level encryption method is only suitable for the "bit-base" encoding model, which is easy to damage the data format, has poor applicability to special types of data such as medical data, and has weak scalability. The sequence-level encryption method is theoretically suitable for any encoding model, but the existing schemes have problems such as insufficient security (e.g. using simple XOR operation, poor randomness of keys), low performance (e.g. relying on sorting algorithm, complex biological operation), and low information density (e.g. the need to store large key files). SUMMARY
[0004] The present application aims to provide a DNA sequence direct encryption method and system based on automata cryptography, which realizes efficient and secure encryption of DNA sequences and improves the security and practicality of DNA storage.
[0005] According to a first aspect of the embodiments of the present application, a DNA sequence direct encryption method based on automata cryptography is provided, which comprises the following steps: hashing a data file to obtain a hash value, and encoding the hash value into a key DNA sequence by using a DNA encoding method, and simultaneously encoding the data file into an information DNA sequence containing an address by using the same encoding method; The information DNA sequence is input into a preset encryption DS-mealy machine, and a base in the sequence is diffused by the encryption DS-mealy machine to generate a diffusion DNA sequence; The key DNA sequence is input into a preset DS-cellular automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence; the state DNA sequence is rotated with the diffusion DNA sequence to generate a rotated DNA sequence; biological constraint checking is performed on the rotated DNA sequence, and if the constraint condition is met, a ciphertext DNA sequence is output; if not, the state DNA sequence is regenerated and the rotation and checking processes are repeated until a ciphertext DNA sequence meeting the constraint condition is obtained; the number of rotations is recorded and encoded as a context DNA sequence for a decryption process. The ciphertext DNA sequence is synthesized into a DNA chain and spliced with a primer to form a ciphertext DNA chain; the key DNA sequence and the context DNA sequence are synthesized into a corresponding key DNA chain and a context DNA chain.
[0006] In one embodiment, the encryption DS-mealy machine is defined as a six-tuple (S, I, O, δ, γ, s0), wherein: S is a state set, S = {A, T, C, G}; I is an input set, I = {A, T, C, G}; O is an output set, O = {A, T, C, G}; δ is a state transition function, which realizes the mapping of the current state and the input base to the next state based on a preset state table; γ is an output function, which realizes the mapping of the current state and the input base to the output base based on a preset output table; s0 is an initial state, randomly selected from the S set.
[0007] In one embodiment, the DS-cellular automaton is a one-dimensional mixed rule cellular automaton, which evolves based on the DNA base set {A, T, C, G} and adopts a three-neighbor structure, and cells evolve alternately in accordance with rules 90 and 150; wherein the logical expression of rule 90 is: s_i(t+1)=s_{i-1}(t)⊕s_{i+1}(t); the logical expression of rule 150 is: s_i(t+1)=s_{i-1}(t)⊕s_i(t)⊕s_{i+1}(t); wherein ⊕ represents a base XOR operation based on a preset XOR table; s_i(t) represents the state of the i-th cell at time t; s_{i-1}(t) represents the state of the i-1-th cell at time t; s_{i+1}(t) represents the state of the i+1-th cell at time t.
[0008] In one of the embodiments, in the rotation operation, the encryption stage adopts rightward shift, and the decryption stage adopts leftward shift; the shift amount is defined as: A→1, T→2, C→3, G→4; the base rotation of the input sequence and the state sequence is realized through the shift amount of base pairing.
[0009] In one of the embodiments, the biological constraint check includes GC content check and homopolymer length check; wherein the GC content needs to be within the range of 40%-60%, and the homopolymer length is less than or equal to 4.
[0010] In one of the embodiments, the decryption process includes: sequencing the key DNA chain and the context DNA chain to obtain the key DNA sequence and the rotation number; inputting the key DNA sequence into a preset DS-cell automaton to evolve to generate a state DNA sequence; based on the rotation number, performing reverse rotation operation on the state DNA sequence and the address part in the ciphertext DNA sequence to obtain an original address; matching and extracting the corresponding ciphertext DNA sequence through the original address, inputting the ciphertext DNA sequence after reverse rotation with the state DNA sequence into a preset decryption DS-mealy machine, and restoring to obtain the original data; the decryption DS-mealy machine implements the inverse process of the encryption DS-mealy machine.
[0011] According to a second aspect of the embodiments of the present disclosure, a DNA sequence direct encryption system based on automata cryptography is provided, including: a key and information sequence generation module, which performs hash processing on a data file to obtain a hash value, encodes the hash value into a key DNA sequence by using a DNA encoding method, and encodes the data file into an information DNA sequence containing an address by using the same encoding method; a base diffusion processing module, which inputs the information DNA sequence into a preset encryption DS-mealy machine, performs diffusion processing on the bases in the sequence by using the encryption DS-mealy machine, and generates a diffusion DNA sequence; a rotation encryption and constraint check module, which inputs the key DNA sequence into a preset DS-cell automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence, performs rotation operation on the state DNA sequence and the diffusion DNA sequence to generate a rotation DNA sequence, and performs biological constraint check on the rotation DNA sequence; if the constraint condition is met, the ciphertext DNA sequence is output; if the constraint condition is not met, the state DNA sequence is regenerated, and the rotation and check process is repeated until the ciphertext DNA sequence meeting the constraint condition is obtained; the rotation number is recorded and encoded into a context DNA sequence, which is used for the decryption process; The encryption chain synthesis module synthesizes the ciphertext DNA sequence into a DNA chain and splices the DNA chain with a primer to form a ciphertext DNA chain; and synthesizes the key DNA sequence and the context DNA sequence into a corresponding key DNA chain and context DNA chain.
[0012] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, which comprises a memory, a processor and a computer program stored in the memory and run on the memory, and the processor implements the DNA sequence direct encryption method based on automata cryptography when executing the program.
[0013] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the DNA sequence direct encryption method based on automata cryptography.
[0014] The above technical solutions adopted by the present application have the following advantages compared with the prior art: 1. With the help of base diffusion of the DS-mealy machine and rotation operation of the DS-cellular automaton, the key space can reach 4 n +4 3 ᵐ (where n is the sequence length and m is the sequence number), the information entropy is close to 2, the base change rate is 75%, and the base change intensity is 42%, which can effectively resist brute force attacks, statistical attacks and differential attacks.
[0015] 2. Compared with the existing method (such as IM-Codec), the space resource consumption of encryption and decryption is reduced by 10 4 times and 2 times respectively, and the speed is increased by 1795 times and 153 times respectively.
[0016] 3. Suitable for any DNA encoding model, compatible with storage and encryption of various types of data such as text, image and medical data.
[0017] 4. Through constraint checking, it can ensure that the GC content and homopolymer length of the ciphertext DNA sequence meet the requirements, thereby improving the stability of synthesis and sequencing and reducing the error rate. BRIEF DESCRIPTION OF DRAWINGS
[0018] The drawings accompanying the specification of the present application are used to provide further understanding of the present application, the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute improper limitation of the present application.
[0019] Figure 1 Flow chart of the DNA sequence direct encryption method based on automata cryptography; Figure 2 Comparison chart of base change rate and base change intensity of DNA-AC and representative work; Figure 3 Figure 6 is a graph showing the encryption and decryption performance of DNA-AC and representative works. DETAILED DESCRIPTION
[0020] The present disclosure will be further described with reference to the drawings and examples.
[0021] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0022] It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising", when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.
[0023] It should be noted that the flowchart and block diagrams in the drawings show the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of the present disclosure. It should also be noted that each block in the flowchart and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions (s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the flowchart and / or block diagrams and combinations of blocks in the flowchart and / or block diagrams can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0024] Embodiment One: As shown in FIG. 1, the present embodiment provides a DNA sequence direct encryption method based on automata cryptography, comprising the following steps: Figure 1 S1. Hash processing a data file to obtain a hash value, and encoding the hash value into a key DNA sequence using a DNA encoding method, and simultaneously encoding the data file into an information DNA sequence containing an address using the same encoding method; S1. Hash processing a data file to obtain a hash value, and encoding the hash value into a key DNA sequence using a DNA encoding method, and simultaneously encoding the data file into an information DNA sequence containing an address using the same encoding method; Specifically, first, a 40KB brain medical image is subjected to SHA-512 hash to obtain a 512-bit hash value, and pixel mapping coding is performed to obtain a 256 nt key DNA sequence (example first 20 nt: ATCGTACGGCTAATGCTCGG, GC content 49.8%, maximum homopolymer 3); then the image pixel matrix (gray value 0-255) is split into gray values, and pixel mapping coding is performed to obtain 1000 pieces of 100 nt information DNA sequence. Taking the Nth piece (the address is determined by a fixed number of bases) as an example, the address segment is AATATCGGTA, the load segment is CGTATGGCCATCGTGAAG..., and the complete sequence is AATATCGGTACGTATGGCCATCGTGAAG... (GC content 48.2%, maximum homopolymer 3).
[0025] Table 1 DS-mealy machine state transition and output rule S2. The information DNA sequence is input into a preset encrypted DS-Mealy machine, and the bases in the sequence are subjected to diffusion processing by the encrypted DS-mealy machine to generate a diffusion DNA sequence; Specifically, the information DNA sequence is input into the DS-Mealy machine, and state transition and output mapping are performed according to the preset state transition table and output table. Taking the first 10 nt (AATATCGGTA) of the information DNA sequence_1 as an example, in the initial state T, input A outputs T and transfers to C, input A outputs A and transfers to G, and after processing in turn, the diffusion DNA sequence (diffusion information DNA sequence_1, example first 10 nt: TATCGATCAG, complete sequence GC content 49.5%) is obtained.
[0026] S3. The key DNA sequence is input into a preset DS-cellular automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence; the state DNA sequence and the diffusion DNA sequence are subjected to rotation operation to generate a rotated DNA sequence; the rotated DNA sequence is subjected to biological constraint check, and if the constraint condition is met, the output is a ciphertext DNA sequence; if not, the state DNA sequence is regenerated and the rotation and check process is repeated until a ciphertext DNA sequence satisfying the constraint condition is obtained; the number of rotations is recorded and coded as a context DNA sequence, which is used in the decryption process; Specifically, the key DNA sequence is input into the DS-cellular automaton, and the state DNA sequence of 100 nt is generated by alternately evolving rules 90 and 150 (state DNA sequence_1, the first 10 nt of the example: CGATTACGTA), and the diffusion information DNA sequence and the state DNA sequence are right-rotated according to the offset of A→1, T→2, C→3, and G→4. Taking the first 5 nt of the diffusion information DNA sequence_1 (TATCG) and the first 5 nt of the state DNA sequence_1 (CGATT) as an example, the rotation DNA sequence_1 AACAT... is obtained after rotation, and the GC content is 49.9% and the longest homopolymer is 3, which meets the constraints, and the ciphertext DNA sequence (ciphertext DNA sequence_1) is output, and the rotation number (1 time, encoded as AAT) is recorded and stored in the context DNA chain.
[0027] Table 2 Base rotation operation (right shift) S4. Synthesize the ciphertext DNA sequence into a DNA chain, and splice it with a primer to form a ciphertext DNA chain; synthesize the key DNA sequence and the context DNA sequence into a corresponding key DNA chain and a context DNA chain.
[0028] Specifically, the ciphertext DNA sequence is spliced with the primer (5'-GCGT-3') to form the final ciphertext DNA chain (such as ciphertext DNA chain_1: 5'-GCGTAACATGCTAG...-3', 104 nt), and 1000 pieces of information DNA sequence are processed to obtain 1000 pieces of ciphertext DNA chain and 1 piece of 3000 nt context DNA chain.
[0029] Preferably, the decryption process comprises: Step 1. Sequencing the key DNA chain and the context DNA chain to obtain the key DNA sequence and the rotation number; Specifically, the key DNA sequence is obtained by sequencing the key DNA chain (consistent with the encryption stage), and the rotation number is obtained by sequencing the context DNA chain (the first one is AAT, corresponding to 1 time).
[0030] Step 2. Input the key DNA sequence into the preset DS-cellular automaton to evolve a state DNA sequence; Specifically, the key DNA sequence is input into the DS-cellular automaton, and the state DNA sequence_1 is evolved according to the rules of the encryption stage (completely consistent with the encryption stage).
[0031] Step 3. Based on the rotation number, the state DNA sequence and the address part in the ciphertext DNA sequence are reversely rotated to obtain the original address; Specifically, the ciphertext DNA sequence and the state DNA sequence are left shifted and inversely rotated according to the number of rotations. Taking the first 5 nt (AACAT) of the ciphertext DNA sequence_1 and the first 5 nt (CGATT) of the state DNA sequence_1 as an example, the left shift restores the first 5 nt (TATCG) of the diffusion DNA sequence_1, and the complete processing obtains the diffusion DNA sequence_1.
[0032] Table 3 Base rotation operation (left shift) Step 4. The corresponding ciphertext DNA sequence is extracted by matching the original address, and after the ciphertext DNA sequence and the state DNA sequence are inversely rotated, they are input into a preset decryption DS-mealy machine to restore the original data; the decryption DS-mealy machine implements the inverse process of the encryption DS-mealy machine.
[0033] Specifically, the diffusion DNA sequence is input into the decryption DS-Mealy machine (inverse process of the encryption machine), and is processed according to the inverse state transition table and the inverse output table. Taking the first 10 nt (TATCGATCAG) of the diffusion DNA sequence_1 as an example, under the initial state T, input T outputs A and transfers to T, input A outputs A and transfers to C, and after processing in turn, the first 10 nt (AATATCGGTA) of the information DNA sequence_1 is restored, the complete processing obtains the information DNA sequence_1, the payload segment is decoded into a gray value, the gray values of 1000 information DNA sequences are spliced according to the address sorting, and the original brain medical image is restored (PSNR=29.14, SSIM=0.944).
[0034] As shown in Figure 2 and Figure 3 DNA-AC represents the experimental results of the application, and the method results of the embodiment are better than the experimental results of other algorithms.
[0035] Example Two The embodiment provides a DNA sequence direct encryption system based on automata cryptography, which comprises: A key and information sequence generation module, which performs hash processing on a data file to obtain a hash value, encodes the hash value into a key DNA sequence by using a DNA encoding method, and encodes the data file into an information DNA sequence containing an address by using the same encoding method; A base diffusion processing module, which inputs the information DNA sequence into a preset encryption DS-mealy machine, and performs diffusion processing on the bases in the sequence by using the encryption DS-mealy machine to generate a diffusion DNA sequence; The rotation encryption and constraint checking module inputs the key DNA sequence into a preset DS-cell automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence; performs rotation operation on the state DNA sequence and the diffusion DNA sequence to generate a rotation DNA sequence; performs biological constraint checking on the rotation DNA sequence, and if the constraint condition is met, outputs a ciphertext DNA sequence; if not, re-generates the state DNA sequence and repeats the rotation and checking process until a ciphertext DNA sequence meeting the constraint condition is obtained; records the rotation number and encodes it into a context DNA sequence for the decryption process. The encryption chain synthesis module synthesizes the ciphertext DNA sequence into a DNA chain and splices it with a primer to form a ciphertext DNA chain; and synthesizes the key DNA sequence and the context DNA sequence into corresponding key DNA chains and context DNA chains.
[0036] Embodiment three An electronic device comprising a memory, a processor and a computer program stored on the memory, wherein the processor implements the above-mentioned DNA sequence direct encryption method based on automata cryptography when executing the program, comprising: Hash processing a data file to obtain a hash value, and encoding the hash value into a key DNA sequence using a DNA encoding method, and encoding the data file into an information DNA sequence containing an address using the same encoding method; Inputting the information DNA sequence into a preset encryption DS-mealy machine to perform diffusion processing on the bases in the sequence through the encryption DS-mealy machine to generate a diffusion DNA sequence; Inputting the key DNA sequence into a preset DS-cell automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence; performing rotation operation on the state DNA sequence and the diffusion DNA sequence to generate a rotation DNA sequence; performing biological constraint checking on the rotation DNA sequence, and if the constraint condition is met, outputting a ciphertext DNA sequence; if not, re-generating the state DNA sequence and repeating the rotation and checking process until a ciphertext DNA sequence meeting the constraint condition is obtained; recording the rotation number and encoding it into a context DNA sequence for the decryption process; Synthesizing the ciphertext DNA sequence into a DNA chain and splicing it with a primer to form a ciphertext DNA chain; and synthesizing the key DNA sequence and the context DNA sequence into corresponding key DNA chains and context DNA chains.
[0037] Embodiment four A computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the above-mentioned DNA sequence direct encryption method based on automata cryptography, comprising: Hashing the data file to obtain a hash value, encoding the hash value into a key DNA sequence by using a DNA encoding method, and encoding the data file into an information DNA sequence containing an address by using the same encoding method; Inputting the information DNA sequence into a preset encryption DS-mealy machine, performing diffusion processing on the bases in the sequence by the encryption DS-mealy machine to generate a diffusion DNA sequence; Inputting the key DNA sequence into a preset DS-cellular automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence, performing rotation operation on the state DNA sequence and the diffusion DNA sequence to generate a rotated DNA sequence, performing biological constraint checking on the rotated DNA sequence, and outputting a ciphertext DNA sequence if the constraint condition is met, otherwise, re-generating the state DNA sequence and repeating the rotation and checking processes until a ciphertext DNA sequence meeting the constraint condition is obtained, recording the number of rotations and encoding the number of rotations into a context DNA sequence for decryption process; Synthesizing the ciphertext DNA sequence into a DNA chain and splicing the DNA chain with a primer to form a ciphertext DNA chain, and synthesizing the key DNA sequence and the context DNA sequence into a corresponding key DNA chain and context DNA chain.
[0038] Those skilled in the art should understand that the modules or steps of the present disclosure described above can be realized by a general computer device, and alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device and executed by a computing device, or they can be respectively manufactured into individual integrated circuit modules, or a plurality of modules or steps thereof can be manufactured into a single integrated circuit module. The present disclosure is not limited to any specific combination of hardware and software.
[0039] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various changes and modifications to 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.
[0040] The above describes the specific embodiments of the present disclosure in conjunction with the accompanying drawings, but is not intended to limit the protection scope of the present disclosure. Those skilled in the art should understand that various modifications or changes made to the technical solutions of the present disclosure without creative labor are still within the protection scope of the present disclosure.
Claims
1. A method for direct encryption of DNA sequences based on automata cryptography, characterized in that, The method comprises the following steps: hashing a data file to obtain a hash value, encoding the hash value into a key DNA sequence by using a DNA encoding method, and encoding the data file into an information DNA sequence containing an address by using the same encoding method; inputting the information DNA sequence into a preset encryption DS-mealy machine, performing diffusion processing on the bases in the sequence by the encryption DS-mealy machine to generate a diffusion DNA sequence; inputting the key DNA sequence into a preset DS-cellular automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence, performing rotation operation on the state DNA sequence and the diffusion DNA sequence to generate a rotated DNA sequence, and performing biological constraint checking on the rotated DNA sequence, wherein if the constraint condition is met, a ciphertext DNA sequence is output; if the constraint condition is not met, the state DNA sequence is regenerated and the rotation and checking processes are repeated until a ciphertext DNA sequence meeting the constraint condition is obtained; the number of rotations is recorded and encoded into a context DNA sequence, which is used in a decryption process; synthesizing the ciphertext DNA sequence into a DNA chain and splicing the DNA chain with a primer to form a ciphertext DNA chain; synthesizing the key DNA sequence and the context DNA sequence into corresponding key DNA chains and context DNA chains.
2. The method for direct encryption of DNA sequence based on automata cryptography according to claim 1, characterized in that, The encryption DS-mealy machine is defined as a six-tuple (S, I, O, δ, γ, s0), wherein S is a state set, S={A, T, C, G}; I is an input set, I={A, T, C, G}; O is an output set, O={A, T, C, G}; δ is a state transition function, which realizes the mapping from the current state and the input base to the next state based on a preset state table; γ is an output function, which realizes the mapping from the current state and the input base to the output base based on a preset output table; and s0 is an initial state, which is randomly selected from the S set.
3. The method for direct encryption of DNA sequence based on automata cryptography according to claim 1, characterized in that, The DS-cellular automaton is a one-dimensional mixed rule cellular automaton, which evolves based on the DNA base set {A, T, C, G}, adopts a three-neighbor structure, and evolves by alternately following rules 90 and 150; wherein the logical expression of rule 90 is s_i(t+1)=s_{i-1}(t)⊕s_{i+1}(t); the logical expression of rule 150 is s_i(t+1)=s_{i-1}(t)⊕s_i(t)⊕s_{i+1}(t); wherein ⊕ represents base XOR operation based on a preset XOR table; s_i(t) represents the state of the i th cell at time t; s_{i-1}(t) represents the state of the i-1 th cell at time t; s_{i+1}(t) represents the state of the i+1 th cell at time t.
4. The method for direct encryption of DNA sequence based on automata cryptography according to claim 1, characterized in that, In the rotation operation, rightward offset is adopted in the encryption stage, and leftward offset is adopted in the decryption stage; the offset amount is defined as A→1, T→2, C→3, and G→4; the base rotation of the input sequence and the state sequence is realized by the offset amount of base pairing.
5. The method for direct encryption of DNA sequence based on automata cryptography according to claim 1, wherein, The biological constraint check includes GC content check and homopolymer length check; wherein the GC content is within the range of 40%-60%, and the homopolymer length is less than or equal to 4.
6. The method for direct encryption of DNA sequence based on automata cryptography according to claim 1, wherein, The decryption process comprises: sequencing the key DNA chain and the context DNA chain to obtain the key DNA sequence and the number of rotations; inputting the key DNA sequence into a preset DS-cell automaton to evolve a state DNA sequence; based on the number of rotations, performing reverse rotation operation on the state DNA sequence and the address part in the ciphertext DNA sequence to obtain an original address; matching and extracting the corresponding ciphertext DNA sequence through the original address, inputting the ciphertext DNA sequence and the state DNA sequence after reverse rotation into a preset decryption DS-mealy machine, and restoring the original data; the decryption DS-mealy machine implements the inverse process of the encryption DS-mealy machine.
7. A DNA sequence direct encryption system based on automata cryptography, characterized in that, comprise: a key and information sequence generation module, which performs hash processing on a data file to obtain a hash value, encodes the hash value into a key DNA sequence by using a DNA encoding method, and encodes the data file into an information DNA sequence containing an address by using the same encoding method; a base diffusion processing module, which inputs the information DNA sequence into a preset encryption DS-mealy machine, performs diffusion processing on the bases in the sequence by using the encryption DS-mealy machine, and generates a diffusion DNA sequence; a rotation encryption and constraint check module, which inputs the key DNA sequence into a preset DS-cell automaton to generate a state DNA sequence with the same length as the diffusion DNA sequence, performs rotation operation on the state DNA sequence and the diffusion DNA sequence to generate a rotation DNA sequence, and performs biological constraint check on the rotation DNA sequence; if the constraint condition is met, the ciphertext DNA sequence is output; if the constraint condition is not met, the state DNA sequence is regenerated, and the rotation and check process is repeated until the ciphertext DNA sequence meeting the constraint condition is obtained; the number of rotations is recorded and encoded into a context DNA sequence, which is used in the decryption process; an encryption chain synthesis module, which synthesizes the ciphertext DNA sequence into a DNA chain, and splices the DNA chain with a primer to form a ciphertext DNA chain; the key DNA sequence and the context DNA sequence are synthesized into a corresponding key DNA chain and context DNA chain.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory to run on the processor, characterized in that, The processor executes the program to implement the DNA sequence direct encryption method based on automata cryptography according to any one of claims 1-7.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the DNA sequence direct encryption method based on automata cryptography according to any one of claims 1-7.
