Encryption coding method and device in DNA storage, electronic equipment and storage medium

By combining a hyperchaotic pseudo-random sequence generator and DNA Raptor encoding, data encryption and encoding fusion were achieved during DNA storage, solving the problems of data security and sequence errors, and improving the security and information density of DNA storage.

CN117955629BActive Publication Date: 2026-06-02SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
Filing Date
2023-12-15
Publication Date
2026-06-02

Smart Images

  • Figure CN117955629B_ABST
    Figure CN117955629B_ABST
Patent Text Reader

Abstract

The application provides an encryption coding method and device in DNA storage, electronic equipment and storage medium, and relates to the technical field of DNA storage. The encryption coding method comprises the following steps: obtaining to-be-stored data, a first random number sequence and a second random number sequence generated by a hyperchaotic pseudo-random sequence generator; encrypting the to-be-stored data by using the first random number sequence to obtain source data; performing DNA Raptor coding on the source data, and introducing the second random number sequence into the DNA Raptor coding process as a random number seed to obtain at least one coded data; and converting each coded data into a corresponding DNA sequence based on a DNA base mapping rule, and generating a target DNA sequence from the DNA sequences corresponding to the coded data. The application solves the problem that data security is not considered in the DNA storage process in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of DNA storage technology, and more specifically, to an encryption encoding method, apparatus, electronic device, and storage medium for DNA storage. Background Technology

[0002] DNA is a promising storage medium, possessing advantages over traditional storage media such as high density, long durability, and low maintenance costs. Theoretically, all information in human history could be stored in a space roughly the size of a double garage. These characteristics make DNA an ideal choice for information storage and hold promise for large-scale practical applications in the future. Therefore, research on DNA data storage has become a hot topic in the interdisciplinary field of computer science and biology. The general process of DNA storage consists of six steps: encoding, synthesis, storage, retrieval, sequencing, and decoding. To meet the requirements of DNA storage, numerous encoding methods have been proposed, considering factors such as cost and related biochemical technologies. Mainstream encoding methods can be divided into two categories: the first is based on fixed-rule mapping encoding, such as DNA cryptography; the second is based on screening operations, such as DNA fountain codes.

[0003] However, both of these mainstream encoding methods have significant limitations: for example, DNA fountain codes are suitable for DNA storage technology but do not consider data security; the data is completely transparent during encoding and decoding, making it easy to leak privacy. Theoretically, data can only be encrypted using conventional encryption methods before encoding, making the encoding process more complex, and security relies entirely on the conventional encryption algorithm itself, making it easier to crack. DNA cryptography, in terms of encryption methods, only studies encryption using DNA base calculation rules and mapping rules, and cannot directly generate DNA sequences that meet the high information density and specific constraints required for DNA storage.

[0004] This shows that ensuring data security during DNA storage remains a challenge. Summary of the Invention

[0005] To address the aforementioned technical problems, embodiments of this application provide an encryption encoding method, apparatus, electronic device, and storage medium for DNA storage. The technical solutions are as follows:

[0006] According to one aspect of this application, an encryption encoding method for DNA storage is provided, the method comprising: acquiring data to be stored, and a first random number sequence and a second random number sequence generated by a hyperchaotic pseudo-random sequence generator; encrypting the data to be stored using the first random number sequence to obtain source data; performing DNARaptor encoding on the source data, and introducing the second random number sequence into the DNARaptor encoding process as a random number seed to obtain at least one encoded data; and converting each encoded data into a corresponding DNA sequence based on DNA base mapping rules, and generating a target DNA sequence from the DNA sequences corresponding to each encoded data.

[0007] According to one aspect of this application, an encryption encoding device for DNA storage is provided, the device comprising: a data acquisition module for acquiring data to be stored, and a first random number sequence and a second random number sequence generated by a hyperchaotic pseudo-random sequence generator; a data encryption module for encrypting the data to be stored using the first random number sequence to obtain source data; a DNA encoding module for performing DNA Raptor encoding on the source data, and introducing the second random number sequence into the DNA Raptor encoding process as a random number seed to obtain at least one encoded data; and a DNA mapping module for converting each encoded data into a corresponding DNA sequence based on DNA base mapping rules, and generating a target DNA sequence from the DNA sequences corresponding to each encoded data.

[0008] According to one aspect of this application, an electronic device includes at least one processor and at least one memory, wherein computer-readable instructions are stored on the memory; the computer-readable instructions are executed by one or more of the processors to cause the electronic device to implement the encryption encoding method in DNA storage as described above.

[0009] According to one aspect of this application, a storage medium has computer-readable instructions stored thereon, which are executed by one or more processors to implement the cryptographic encoding method in DNA storage as described above.

[0010] According to one aspect of this application, a computer program product includes computer-readable instructions stored in a storage medium, wherein one or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, causing the electronic device to implement the encryption encoding method in DNA storage as described above.

[0011] The beneficial effects of the technical solution provided in this application are:

[0012] In the above technical solution, firstly, a hyperchaotic pseudo-random sequence generator generates a first random number sequence and a second random number sequence. Then, on the one hand, the first random number sequence is used to encrypt the data to be stored to obtain the source data. On the other hand, DNA Raptor encoding, which introduces the second random number sequence as a random number seed, is used to encode the source data to obtain at least one encoded data. Finally, the target DNA sequence is generated from the DNA sequences obtained by converting each encoded data according to the DNA base mapping rules. Thus, considering the encoding and encryption requirements in DNA storage, the DNA encryption encoding scheme proposes to combine the hyperchaotic pseudo-random sequence generator in the chaotic system and the DNA Raptor encoding in the DNA fountain code to integrate the data encryption process into the DNA encoding process, thereby fully ensuring data security in the DNA storage process. This effectively solves the problem that related technologies do not consider data security in the DNA storage process. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a hardware structure diagram of an electronic device according to an exemplary embodiment;

[0015] Figure 2 This is a flowchart illustrating an encryption encoding method in DNA storage according to an exemplary embodiment;

[0016] Figure 3 This is a schematic diagram illustrating a pseudo-random sequence generation process according to an exemplary embodiment;

[0017] Figure 4 This is a schematic diagram illustrating encryption using a first random number sequence according to an exemplary embodiment;

[0018] Figure 5a This is a schematic diagram of a constraint matrix according to an exemplary embodiment;

[0019] Figure 5b This is a schematic diagram illustrating DNA Raptor encoding according to an exemplary embodiment;

[0020] Figure 6 This is a schematic diagram illustrating DNA mapping and screening according to an exemplary embodiment;

[0021] Figure 7This is a schematic diagram illustrating the specific implementation of an encryption encoding method in DNA storage within an application scenario.

[0022] Figure 7a yes Figure 7 The diagram illustrates the data to be stored in the application scenario shown.

[0023] Figure 7b yes Figure 7 A schematic diagram illustrating the target DNA sequences involved in the application scenarios shown;

[0024] Figure 8 This is a structural block diagram illustrating an encryption encoding device in DNA storage according to an exemplary embodiment;

[0025] Figure 9 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0026] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0027] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this disclosure means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0028] The following is an introduction and explanation of several terms used in this application:

[0029] DNA storage: DNA storage is a data storage method that uses DNA (deoxyribonucleic acid) molecules as a medium to store digital data. DNA is the molecule in living organisms that stores genetic information. It possesses excellent information density and long-term stability, thus being considered a potentially efficient, high-capacity, and durable data storage medium. The basic idea of ​​DNA storage is to encode digital data into DNA sequences, then synthesize these DNA sequences using synthetic chemistry methods and store them in test tubes or other containers. When data needs to be retrieved, DNA sequencing technology can be used to read the DNA sequences and decode them back into digital data.

[0030] DNA cryptography: DNA cryptography refers to the field of encrypting and storing information using the properties and molecular structure of DNA. Related research uses biochemical techniques and methods such as DNA encoding / decoding and base calculation rules to encrypt data physically or logically, ultimately synthesizing specific DNA sequences.

[0031] Chaotic systems: Chaotic systems are dynamic systems that exhibit determinism, aperiodicity, and extreme sensitivity to initial conditions. These systems display seemingly disordered, complex, and unpredictable behavior, even though their motion can be described by simple nonlinear equations or rules. In practical applications, chaotic systems are used for data encryption, random number generation, and information hiding, and chaotic cryptography, based on chaotic systems, has become a new branch of cryptography.

[0032] Fountain codes: Fountain codes are an error-correcting coding technique originating from research in the field of communications. They aim to generate an unlimited number of coded symbols at the transmitting end to meet the information requirements of the receiving end, without needing to know the length of the transmitted data in advance. They are characterized by three features: no fixed length requirement, randomness, and efficient error correction capability.

[0033] Current research in the field of DNA storage coding focuses on achieving high information density (number of bits of binary data represented by each nucleotide) coding methods under specified constraints (based on biochemical technologies such as DNA synthesis, storage, and sequencing), while paying less attention to information security in the DNA storage process. At the same time, traditional DNA cryptography does not take measures to deal with sequence errors generated during the DNA storage process (i.e., errors in the stored data), which may lead to incomplete or incorrect decrypted data.

[0034] Therefore, the encryption encoding method for DNA storage provided in this application can effectively improve the data security of DNA storage. Accordingly, the encryption encoding method for DNA storage is applicable to the encryption encoding device for DNA storage, which can be deployed on an electronic device. The electronic device can be a computer device configured with a von Neumann architecture, such as a desktop computer, a laptop computer, a server, etc.

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0036] Figure 1 A schematic diagram of the structure of an electronic device according to an exemplary embodiment is shown.

[0037] It should be noted that this electronic device is merely an example adapted to this application and should not be construed as providing any limitation on the scope of use of this application. Furthermore, this electronic device should not be interpreted as requiring or depending on any specific feature. Figure 1 One or more components of the exemplary electronic device 200 shown.

[0038] The hardware structure of electronic device 200 can vary significantly due to differences in configuration or performance, such as... Figure 1 As shown, the electronic device 200 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.

[0039] Specifically, power supply 210 is used to provide operating voltage for various hardware devices on electronic device 200.

[0040] Interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Of course, in other examples adapted in this application, interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, etc. Figure 1 As shown, this does not constitute a specific limitation.

[0041] The memory 250 serves as a carrier for resource storage and can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include the operating system 251, application programs 253, and data 255, etc., and the storage method can be temporary storage or permanent storage.

[0042] The operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 200, so as to enable the central processing unit 270 to perform calculations and processing on the massive data 255 in the memory 250. It can be Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0043] Application 253 is a computer-readable instruction based on operating system 251 that performs at least one specific task, and may include at least one module ( Figure 1(Not shown), each module may contain computer-readable instructions for electronic device 200. For example, the encryption encoding device in DNA storage can be considered as application 253 deployed on electronic device 200.

[0044] Data 255 can be photos, images, etc. stored on a disk, or it can be target files, DNA sequences, etc., stored in memory 250.

[0045] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via at least one communication bus to read computer-readable instructions stored in the memory 250, thereby performing operations and processing on massive amounts of data 255 stored in the memory 250. For example, the encryption encoding method in DNA storage can be implemented by the central processing unit 270 reading a series of computer-readable instructions stored in the memory 250.

[0046] Furthermore, this application can also be implemented through hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of this application is not limited to any specific hardware circuit, software, or combination thereof.

[0047] Please see Figure 2 This application provides an encryption encoding method for DNA storage, applicable to electronic devices, the hardware structure of which is as follows: Figure 1 As shown.

[0048] In the following method embodiments, for ease of description, the execution subject of each step of the method is an electronic device, but this does not constitute a specific limitation.

[0049] like Figure 2 As shown, the method may include the following steps:

[0050] Step 310: Obtain the data to be stored, as well as the first random number sequence and the second random number sequence generated by the hyperchaotic pseudo-random sequence generator.

[0051] The data to be stored can be of any type, such as text, images, audio, video, etc., without any limitation.

[0052] The first random number sequence is used for encryption of the data to be stored, and the second random number sequence is used for encoding the data to be stored. In some embodiments, the first and second random number sequences are generated by a hyperchaotic pseudo-random sequence generator.

[0053] In some embodiments, the hyperchaotic pseudo-random sequence generator is obtained using the computation of a five-dimensional hyperchaotic system and accompanying perturbations, floating-point rounding, large number processing, variable XOR, and other additional operations. The calculation formula for this five-dimensional hyperchaotic system is as follows:

[0054] .

[0055] Among them, a, b, c, d, e, h, r, m, k, p, and q are constant parameters, while x, y, z, w, and u are state variables.

[0056] Figure 3 A schematic diagram illustrating one embodiment of constructing a hyperchaotic pseudo-random sequence generator using a five-dimensional hyperchaotic system is shown. Figure 3 In this process, the input of the hyperchaotic pseudo-random sequence generator includes: state variables x, y, z, w, u, and the sequence length n of the first random number sequence / second random number sequence. The output includes: the first random number sequence / second random number sequence, which contains n keys.

[0057] like Figure 3 As shown, the process of generating a first random number sequence / second random number sequence by a hyperchaotic pseudo-random sequence generator can include the following steps: First, initialize the initial parameters a, b, c, d, e, h, r, m, k, p, and q configured for the hyperchaotic pseudo-random sequence generator; Second, input the first key and the second key into the hyperchaotic pseudo-random sequence generator respectively to perform pseudo-random sequence generation operations, obtaining the corresponding first random number sequence and second random number sequence. Specifically, the second step includes: when the sequence length of the first random number sequence and the second random number sequence has not reached n, perturb at fixed intervals, calculate a specified number of times according to the calculation formula of the hyperchaotic system, and select at least one set of specified number of state variables to generate key values ​​to be added to the first random number sequence and the second random number sequence, until the sequence length of the first random number sequence and the second random number sequence reaches n. Further, the process of generating key values ​​for each set of specified number of state variables specifically includes: converting real numbers into a fixed-length integer sequence, XORing the five integer parts to obtain a key value, and adding this key value to the first random number sequence and the second random number sequence.

[0058] Step 330: Encrypt the data to be stored using the first random number sequence to obtain the source data.

[0059] In some embodiments, the encryption process may include the following steps: obtaining the global hash value of the data to be stored, and using the global hash value to preprocess the data to be stored to obtain multiple coded blocks; performing logical operations on the first random data sequence and each coded block to obtain the source data.

[0060] Figure 4 A schematic diagram illustrating encryption using a first random number sequence is shown. Figure 4In this process, on one hand, the SHA256 algorithm is used to perform a hash operation on the data to be stored (e.g., the target file) to obtain a global hash value, which is then stored in the first encoded block. The identifier of this first encoded block is 0, i.e., the first encoded block is encoded block 0. On the other hand, the data to be stored is divided into blocks to obtain multiple encoded blocks, each identified as 1 to n, i.e., encoded block 1, encoded block 2, ..., encoded block n. After obtaining the above n+1 encoded blocks, an encrypted traversal process is performed on these n+1 encoded blocks. The encrypted traversal process includes: performing a logical operation between encoded block 0 and encoded block 1, and storing the result in encoded block 1; performing a logical operation between encoded block 1 and encoded block 2, and storing the result in encoded block 2; and so on, performing a logical operation between encoded block n-1 and encoded block n, and storing the result in encoded block n; until the nth encoded block (i.e., encoded block n) is traversed, resulting in n+1 encoded blocks. Based on these n+1 coded blocks and the first random number sequence, the source data can be obtained through logical operations, thus achieving encryption of the data to be stored.

[0061] It should be noted that the logical operation in this embodiment refers to XOR. Of course, in other embodiments, the logical operation may also include, but is not limited to, AND, OR, NOT, XNOR, etc. This embodiment does not constitute a specific limitation on this.

[0062] Step 350: DNA Raptor encoding is performed on the source data, and a second random number sequence is introduced into the DNA Raptor encoding process as reference table data to obtain at least one encoded data.

[0063] In some embodiments, DNA Raptor encoding includes constraint matrix-based precoding and LT encoding. Precoding uses the constraint matrix to encode source data into multiple intermediate symbols; LT encoding is then used to encode the multiple intermediate symbols into multiple encoded data.

[0064] Specifically, the DNA Raptor encoding process may include the following steps: expanding the source data and pre-encoding the expanded source data using a constraint matrix to obtain multiple intermediate symbols; performing LT encoding on each intermediate symbol to obtain multiple encoded data; and ensuring a one-to-one correspondence between each encoded data and each intermediate symbol. It should be noted that the expansion here refers to dividing the source data into multiple source symbols, using K source symbols as a source block, and adding (S+H) zero elements before the K source symbols in each source block to form expanded source symbols. Finally, the expanded source data is obtained from multiple expanded source symbols.

[0065] Figure 5a A schematic diagram of the constraint matrix in one embodiment is shown. Figure 5a In this context, the constraint matrix is ​​G.LDPC G Half I S I H Z, G LT Composition. Among them, G LDPC G is the S×K dimensional generating matrix of LDPC symbols; Half It is the H×(K+S) dimensional generator matrix of Half symbols (Gray code); I S It is an S×S dimensional identity matrix; I H Z is an H×H dimensional identity matrix; Z is an S×H dimensional zero matrix; G LT It is a K×L dimensional generator matrix for LT-coded symbols. In some embodiments, G in the constraint matrix LT The matrix, as well as the degree value and random number in the LT encoding process, are all generated using a random number generator that uses the second random number sequence as the reference table data.

[0066] Figure 5b A schematic diagram of the DNA Raptor encoding process in one embodiment is shown, as follows. Figure 5b As shown, firstly, the expanded source data D is pre-encoded using the constraint matrix A, that is, the expanded source data D is multiplied by the inverse of the constraint matrix A to obtain L intermediate symbols C. Then, these L intermediate symbols are LT encoded to finally obtain n encoded data. Specifically, this includes: First, using the degree distribution function as the degree value of LT encoding, an integer value d is randomly selected from the range of 1 to n; Second, d random numbers from the range of 1 to n are generated, the intermediate symbol corresponding to the random number is selected from the n intermediate symbols, and an XOR operation is performed on the selected intermediate symbol to generate one encoded data; Third, the first and second steps are repeated until n encoded data are generated. In the above DNA Raptor encoding process, a random generator (i.e., a random function R(x)) is introduced, and the random basis tables V0 and V1 of this random generator are composed of the second random number sequence generated by the hyperchaotic pseudo-random sequence generator input by the key Key1.

[0067] Step 370: Based on the DNA base mapping rules, each coding data is converted into a corresponding DNA sequence, and the target DNA sequence is generated from the DNA sequence corresponding to each coding data.

[0068] After obtaining multiple encoded data, each encoded data can be mapped to its corresponding DNA sequence according to a given mapping rule.

[0069] In some embodiments, a given mapping rule includes a DNA base mapping rule, which substantially reflects the correspondence between different binary data and different DNA bases.

[0070] Specifically, such as Figure 6 As shown, the mapping process based on DNA base mapping rules can include the following steps: For n encoded data, determine the DNA base mapping rule corresponding to each encoded data, and generate the corresponding DNA sequence from each encoded data according to the determined DNA base mapping rule; use the identifier of the encoded data as a random number seed, and obtain the error correction code generated for the encoded data; according to the determined DNA base mapping rule, convert the random number seed and the error correction code into corresponding DNA bases respectively, and add the converted DNA bases to the DNA sequence corresponding to the encoded data respectively. It should be noted that the DNA bases corresponding to the random number seed can be added before the DNA sequence, while the DNA bases corresponding to the error correction code can be added after the DNA sequence; no limitation is imposed here.

[0071] In this approach, the data error correction capability is enhanced by increasing the length of the DNA sequence. This gives the DNA sequence a certain degree of redundancy, which in turn provides a certain error correction capability. The stored information can be restored to the original file under a certain error rate.

[0072] After obtaining the DNA sequences corresponding to each encoded data, these DNA sequences will be screened according to given constraints to obtain the final stored target DNA sequences.

[0073] In some embodiments, the given constraints include biological constraints, which include, but are not limited to, homopolymers, GC content, palindromic sequences, etc.

[0074] Specifically, please refer to Figure 6 As shown, the screening process based on biological constraints may include the following steps: performing biological constraint detection on the DNA sequences corresponding to each coding data; regenerating the coding data corresponding to the DNA sequences that do not conform to the biological constraints through LT coding in the DNA Raptor coding until the DNA sequences corresponding to the regenerated coding data conform to the biological constraints; generating the target DNA sequence from all n DNA sequences that conform to the biological constraints.

[0075] Through the above process, considering the encoding and encryption requirements in DNA storage, a DNA encryption encoding scheme is proposed that combines the hyperchaotic pseudo-random sequence generator in chaotic systems with DNA Raptor encoding in DNA fountain codes. This integrates the data encryption process into the DNA encoding process, thereby fully ensuring data security during DNA storage and effectively solving the problem that related technologies have not considered data security during DNA storage.

[0076] In addition, while ensuring high information density in DNA storage, it also meets various custom constraints and solves the problem of a small number of sequence errors that occur during DNA storage.

[0077] Figure 7 This is a schematic diagram illustrating a specific implementation of an encryption encoding method in DNA storage within an application scenario. This application scenario includes, but is not limited to, semiconductor applications and biological applications.

[0078] In this application scenario, the encryption and encoding process in DNA storage consists of four parts: hyperchaotic pseudo-random sequence generation, file preprocessing, DNA Raptor encoding, and mapping screening. The specific steps are as follows:

[0079] The first step, generating a hyperchaotic pseudo-random sequence, involves the following steps:

[0080] (1) Determine the initial parameters of the hyperchaotic system based on the key Key1 (a set of state variables), perform the first hyperchaotic pseudo-random sequence generation operation, and obtain 512 4-byte unsigned integers, which are used as reference tables V0 and V1 (each with 256 4-byte unsigned integers) of the random number generator Rand[X, i, m] in the Raptor code. Rand[X, i, m] is used to generate random numbers in the LT encoding process, and its definition is as follows:

[0081] .

[0082] Here, X represents the input value, i is an index variable, and m is the modulus applied to the result. The values ​​of V0 and V1 are combined using a bitwise XOR operation, and then the modulo operation is applied to obtain the final result, which is an integer between 0 and m-1.

[0083] Based on the key Key2, a random number sequence for subsequent encryption is generated using the same pseudo-random sequence generator.

[0084] The second step is file preprocessing, which involves the following steps:

[0085] The target file is divided into blocks, each 30 bytes in size, denoted as a single encoded block. Each block is numbered and assigned a unique 4-byte ID (the last 2 bytes record the ID number). The ID number is not used in encryption. Simultaneously, a global hash value is calculated for the entire file using SHA256, and its 30-byte value is used as the initial hash key, stored in the first encoded block. Block generation for the target file begins from the second encoded block. The maximum number of blocks in a single block generation is 20,000. The block generation count is recorded in the first 2 bytes of the ID number. The ID is composed of the block generation count and the block number.

[0086] Encryption. For each encoded block, XOR it with the hash key, and use the result as the new hash key. 20 random numbers are generated using a constructed hyperchaotic pseudo-random sequence generator. These random numbers are then XORed with the hash-XORed encoded block data to complete the encryption.

[0087] The third step, DNA Raptor encoding, involves the following steps:

[0088] (1) Precoding to generate intermediate symbols. The number of blocks K is counted, and all coded blocks form the source data matrix D. Intermediate symbols C are generated through matrix A, as shown in Figure 2. Its G... LT Part of the data is generated using the random number generator Rand[X, i, m]. Taking 10KB of data as an example, we get K=342, and by looking up the table, we get the corresponding S=31, H=10, so L=383 (the parameters corresponding to different K values ​​are recorded in a specific table). 383 intermediate symbols are finally generated using formula (1.2).

[0089] (2) LT Encoding. Intermediate symbols are encoded using LT encoding. The degree value and random number of the LT encoding are generated by the random number generator Rand[X, i, m], and each intermediate symbol corresponds to one line of encoded data. LT encoding requires generating more encoded symbols than the number of source symbols (i.e., the number of blocks K), so the minimum redundancy is selected, and 350 lines of encoded data are generated in the end. By setting redundancy, an additional number of encoded data can be generated.

[0090] The fourth step is mapping and filtering, and the steps are as follows:

[0091] (1) Mapping. Based on the result of modulo 8 for each encoded data ID, the mapping rule from 1 byte of binary data to DNA bases is determined, resulting in a 4 nt DNA sequence. The DNA mapping rule is shown in Table 1. Each row of encoded data generates a 120 nt DNA sequence. In addition, a 4-byte random number seed (i.e., block ID) is added before the sequence, and a 2-byte RS error correction code generated from a 30-byte encoded block is added after the sequence. These 6 bytes of data are then converted to DNA bases according to the mapping rule. Finally, a 144 nt DNA sequence is obtained.

[0092] Table 1 DNA Mapping Rules

[0093]

[0094] (2) Screening. Each DNA sequence is subjected to biological constraint testing, namely homopolymer and GC content testing. Based on the test results, the DNA sequences that pass the test are retained, and the DNA sequences that do not meet the constraints are removed. The above steps are repeated from the LT coding until all coding data are converted into qualified DNA sequences.

[0095] It is worth mentioning that DNA decryption and decoding refers to restoring the DNA sequence into the target file. Its overall process corresponds one-to-one with the encryption and encoding process. That is, the DNA sequence is transformed into the original target file through three steps: reverse mapping screening, DNA Raptor decoding, and file recovery. Each step is reversible. The random numbers used are generated by the same key through a hyperchaotic pseudo-random sequence generator, and are therefore equivalent, ensuring that the data obtained from decryption and decoding is correct and complete.

[0096] Based on the above process, the encryption and encoding method for DNA storage proposed in this application can encrypt and encode any type of data, and finally convert it into a DNA sequence for DNA storage. The redundancy of the DNA sequence (the number of extra DNA strands to meet the 100% decoding condition) and the constraint rules are customizable. The simulation experiment analysis is based on 20% redundancy and meets two commonly used biological constraints (GC content 40%-60%, homopolymer length less than 4).

[0097] like Figure 7a As shown, taking 10KB of text as the data to be stored as an example, the encryption encoding method of this application is used in DNA storage, and the target DNA sequence obtained after encryption encoding is as follows: Figure 7b As shown, 10KB of data to be stored corresponds to 342 blocks, theoretically corresponding to 342 DNA strands, each 144nt in length. Raptor codes require slightly more than 342 DNA strands for successful decoding. Therefore, the initial encoding result is set to 350 DNA strands. This means generating an infinite number of DNA strands for selection until successful decoding is achieved and the number of DNA strands reaches 350. Using these 350 DNA strands as the initial result achieves a redundancy of 0.26 and an information capacity of 1.59 bits / nt (the theoretical upper limit is 2 bits / nt). Furthermore, the data error correction capability can be improved by increasing the number of DNA strands. Therefore, 20% redundancy is selected, generating an additional 20% of DNA strands, ultimately generating 411 DNA strands, achieving a redundancy of 0.512 and an information capacity of 1.32 bits / nt.

[0098] In this application scenario, the encryption effect was analyzed using conventional encryption algorithms, including key space analysis, key sensitivity analysis, correlation analysis, information entropy analysis, ciphertext change rate analysis, and randomness analysis. This demonstrated that the encryption effect of this invention ensures data security. Regarding error correction performance, the decoding success rate under different redundancies and error rates (based on sequence loss and base error) was tested, demonstrating good error correction performance.

[0099] The following are embodiments of the apparatus described in this application, which can be used to execute the encryption encoding method for DNA storage involved in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of the encryption encoding method for DNA storage involved in this application.

[0100] Please see Figure 8 This application provides an encryption encoding device 900 for DNA storage, including but not limited to: a data acquisition module 910, a data encryption module 930, a DNA mapping module 950, and a DNA encoding module 970.

[0101] The data acquisition module 910 is used to acquire the data to be stored, as well as the first random number sequence and the second random number sequence generated by the hyperchaotic pseudo-random sequence generator.

[0102] The data encryption module 930 is used to encrypt the data to be stored using a first random number sequence to obtain the source data.

[0103] DNA encoding module 970 is used to encode the source data using DNA Raptor and to introduce a second random number sequence into the DNA Raptor encoding process as reference table data to obtain at least one encoded data.

[0104] DNA mapping module 950 is used to convert each encoded data into a corresponding DNA sequence based on DNA base mapping rules, and to generate a target DNA sequence from the DNA sequences corresponding to each encoded data.

[0105] In one exemplary embodiment, the apparatus 900 further includes a random number sequence generation module.

[0106] The random number sequence generation module is used to determine the initial parameters configured for the hyperchaotic pseudo-random sequence generator; initialize the hyperchaotic pseudo-random sequence generator; and input the first key and the second key into the hyperchaotic pseudo-random sequence generator to perform pseudo-random sequence generation operations to obtain the corresponding first random number sequence and second random number sequence.

[0107] In an exemplary embodiment, the data encryption module 930 is further configured to obtain the global hash value of the data to be stored, and use the global hash value to preprocess the data to be stored to obtain multiple coded blocks; and perform logical operations on the first random data sequence and each coded block to obtain the source data.

[0108] In an exemplary embodiment, the data encryption module 930 is further configured to perform a hash operation on the data to be stored using the SHA256 algorithm to obtain a global hash value, and store the global hash value in the first encoded block; the identifier of the first encoded block is 0; divide the data to be stored into blocks to obtain multiple encoded blocks; the identifiers of each encoded block are 1 to n; perform encryption traversal processing on the n+1 encoded blocks, the encryption traversal processing including: performing a logical operation between the previous encoded block and the current encoded block, and storing the logical operation result in the current encoded block; until the nth encoded block is traversed, n+1 encoded blocks are obtained.

[0109] In an exemplary embodiment, the DNA encoding module 970 is further configured to expand the source data and pre-encode the expanded source data using a constraint matrix to obtain multiple intermediate symbols; perform LT encoding on each intermediate symbol to obtain multiple encoded data; each encoded data corresponds one-to-one with each intermediate symbol; wherein, G in the constraint matrix LT The matrix, as well as the degree value and random number in the LT encoding process, are all generated using a random number generator that uses the second random number sequence as the reference table data.

[0110] In an exemplary embodiment, the DNA mapping module 950 is further configured to: determine the DNA base mapping rule corresponding to each encoded data; generate a corresponding DNA sequence from the encoded data according to the determined DNA base mapping rule; use the identifier of the encoded data as a random number seed and obtain the error correction code generated for the encoded data; convert the random number seed and the error correction code into corresponding DNA bases according to the determined DNA base mapping rule, and add the converted DNA bases to the DNA sequence corresponding to the encoded data.

[0111] In an exemplary embodiment, the DNA encoding module 970 is further configured to perform biological constraint detection on the DNA sequences corresponding to each encoded data; regenerate the encoded data corresponding to the DNA sequences that do not conform to the biological constraints through DNA Raptor encoding until the DNA sequences corresponding to the regenerated encoded data conform to the biological constraints; and generate a target DNA sequence from all DNA sequences that conform to the biological constraints.

[0112] It should be noted that the encryption encoding device for DNA storage provided in the above embodiments is only illustrated by the division of the above functional modules when performing encryption encoding in DNA storage. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the encryption encoding device for DNA storage will be divided into different functional modules to complete all or part of the functions described above.

[0113] Furthermore, the encryption encoding device for DNA storage and the encryption encoding method for DNA storage provided in the above embodiments belong to the same concept, and the specific way in which each module performs its operation has been described in detail in the method embodiments, and will not be repeated here.

[0114] Please see Figure 9 This application provides an electronic device 4000, which may include: a desktop computer, a laptop computer, a server, etc.

[0115] exist Figure 9 In this context, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.

[0116] The data interaction between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. This communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0117] Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0118] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0119] The memory 4003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program instructions or code in the form of instructions or data structures and accessible by the electronic device 400, but not limited thereto.

[0120] The memory 4003 stores computer-readable instructions, and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002.

[0121] The computer-readable instructions are executed by one or more processors 4001 to implement the encryption encoding method in DNA storage in the above embodiments.

[0122] Furthermore, this application provides a storage medium storing computer-readable instructions that are executed by one or more processors to implement the encryption encoding method in DNA storage as described above.

[0123] This application provides a computer program product including computer-readable instructions stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, causing the electronic device to implement the encryption encoding method in DNA storage as described above.

[0124] Compared to existing fountain code encoding techniques in DNA storage, this application, while ensuring the encoding results meet DNA storage requirements, incorporates encryption operations into the encoding process to provide data encryption effects, improve data security, and retain its advantages in the field of DNA storage encoding. Simultaneously, a novel hyperchaotic pseudo-random sequence generator is constructed. A new hyper-five-dimensional chaotic system with good chaotic properties is built, and a series of data processing operations are added to it to form a corresponding hyperchaotic pseudo-random sequence generator, generating random numbers with strong randomness.

[0125] Furthermore, compared to encryption methods in DNA cryptography, this application is not limited to image encryption, does not require consideration of the data type or size to be stored, and allows for the selection of the generated DNA sequence length, customizable constraints, and customizable redundancy. It has a wider range of applications, can be adapted to any current DNA storage system, generates DNA sequences of arbitrary length and redundancy, satisfies arbitrary constraints, and achieves near-perfect encryption. Compared to existing encryption methods, the DNA sequence generated in this application has a higher information density and can satisfy a greater number of constraints.

[0126] Finally, in response to data errors caused by current technology in the DNA storage process, this application has a certain error correction capability and can restore the stored information to the original file under a certain error rate.

[0127] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0128] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for encryption encoding in DNA storage, characterized in that, The method includes: Acquire the data to be stored, as well as the first and second random number sequences generated by the hyperchaotic pseudo-random sequence generator; The data to be stored is encrypted using the first random number sequence to obtain the source data; The source data is extended, and the extended source data is precoded by using a constraint matrix to obtain a plurality of intermediate symbols; wherein G LT The degree value and the random number in the LT encoding process are generated by using a random number generator taking the second random number sequence as reference table data. Each intermediate symbol is LT encoded to obtain multiple encoded data; each encoded data corresponds one-to-one with each intermediate symbol. For each piece of encoded data, a DNA base mapping rule corresponding to the encoded data is determined, and a corresponding DNA sequence is generated from the encoded data according to the determined DNA base mapping rule; The identifier of the encoded data is used as a random number seed, and the error correction code generated for the encoded data is obtained; According to the determined DNA base mapping rules, the random number seed and the error correction code are converted into corresponding DNA bases, and the converted DNA bases are added to the DNA sequence corresponding to the encoded data. The target DNA sequence is then generated from the DNA sequence corresponding to each encoded data.

2. The method as described in claim 1, characterized in that, Before obtaining the first and second random number sequences generated by the hyperchaotic pseudo-random sequence generator, the method further includes: Initialize the parameters configured for the hyperchaotic pseudo-random sequence generator; The first key and the second key are respectively input into the hyperchaotic pseudo-random sequence generator to perform pseudo-random sequence generation operations, thereby obtaining the corresponding first random number sequence and the second random number sequence.

3. The method as described in claim 1, characterized in that, The step of encrypting the data to be stored using the first random number sequence to obtain the source data includes: Obtain the global hash value of the data to be stored, and use the global hash value to preprocess the data to be stored to obtain multiple coded blocks; The first random number sequence is logically operated on with each of the coded blocks to obtain the source data.

4. The method as described in claim 3, characterized in that, The process involves obtaining the global hash value of the data to be stored and using the global hash value to preprocess the data to be stored to obtain multiple encoded blocks, including: The data to be stored is hashed using the SHA256 algorithm to obtain the global hash value, and the global hash value is stored in the first encoded block; the identifier of the first encoded block is 0; The data to be stored is divided into blocks to obtain multiple encoded blocks; the identifiers of each encoded block are 1 to n. Encryption traversal processing is performed on n+1 of the encoded blocks. The encryption traversal processing includes: performing a logical operation between the previous encoded block and the current encoded block, and storing the result of the logical operation in the current encoded block. The process continues until the nth coded block is traversed, resulting in n+1 coded blocks.

5. The method according to any one of claims 1 to 4, characterized in that, The generation of the target DNA sequence from the DNA sequences corresponding to each of the encoded data includes: Biological constraint detection was performed on the DNA sequences corresponding to each of the coded data. The coding data corresponding to DNA sequences that do not conform to biological constraints are regenerated using DNA Raptor encoding until the DNA sequence corresponding to the regenerated coding data conforms to biological constraints. The target DNA sequence is generated from all DNA sequences that conform to biological constraints.

6. An encryption encoding device for DNA storage, characterized in that, The device includes: The data acquisition module is used to acquire the data to be stored, as well as the first random number sequence and the second random number sequence generated by the hyperchaotic pseudo-random sequence generator; A data encryption module is used to encrypt the data to be stored using the first random number sequence to obtain the source data; The DNA encoding module is used to expand the source data and pre-encode the expanded source data using a constraint matrix to obtain multiple intermediate symbols; wherein, G in the constraint matrix... LT The matrix, as well as the degree value and random number in the LT encoding process, are all generated using a random number generator that uses the second random number sequence as reference table data; LT encoding is performed on each of the intermediate symbols to obtain multiple encoded data; each encoded data corresponds one-to-one with each of the intermediate symbols; The DNA mapping module determines the DNA base mapping rule corresponding to each encoded data, and generates the corresponding DNA sequence from the encoded data according to the determined DNA base mapping rule. The identifier of the encoded data is used as a random number seed, and the error correction code generated for the encoded data is obtained; According to the determined DNA base mapping rules, the random number seed and the error correction code are converted into corresponding DNA bases, and the converted DNA bases are added to the DNA sequence corresponding to the encoded data. The target DNA sequence is then generated from the DNA sequence corresponding to each encoded data.

7. An electronic device, characterized in that, include: At least one processor and at least one memory, wherein, The memory stores computer-readable instructions; The computer-readable instructions are executed by one or more of the processors, causing the electronic device to implement the encryption encoding method in DNA storage as described in any one of claims 1 to 5.

8. A storage medium having computer-readable instructions stored thereon, characterized in that, The computer-readable instructions are executed by one or more processors to implement the encryption encoding method in DNA storage as described in any one of claims 1 to 5.