Color image encryption method based on memristor and DNA encoding
By combining memristors and DNA encoding, a truly random bit sequence and hash-driven key are generated. By utilizing chaotic system iteration and DNA encoding rules, a two-layer encryption structure is constructed, which solves the problems of insufficient key randomness and insufficient anti-attack capability in existing technologies, and realizes secure image transmission and storage that can adapt to multiple devices and multiple scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI PROFESSIONAL COLLEGE OF SCI & TECH
- Filing Date
- 2026-01-23
- Publication Date
- 2026-06-09
AI Technical Summary
Existing image encryption technologies lack sufficient key randomness and resistance to attacks, failing to meet the needs of secure image transmission and storage across multiple devices and scenarios.
A memristor is used to generate a truly random bit sequence, which is combined with a hash operation to generate a driving key. An encryption sequence is generated iteratively through a chaotic system, and a DNA encoding rule is used for deep diffusion to construct a two-layer encryption structure of pixel scrambling and DNA encoding.
It improves the randomness and anti-attack capabilities of the key, adapts to color images of different resolutions and sizes, and features a lightweight and reversible encryption process, making it suitable for secure image transmission and storage across multiple devices and scenarios.
Smart Images

Figure CN122179516A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image encryption and information security technology, and in particular to a color image encryption method based on memristors and DNA encoding. Background Technology
[0002] With the rapid development of digital technology, color images, as an important carrier of information, are increasingly widely used in key fields such as military, medical, and financial sectors, making the need for information security protection increasingly urgent. Image encryption technology, by scrambling and spreading the original image, achieves information confidentiality and is a core means of ensuring the secure transmission and storage of image data.
[0003] Currently, existing image encryption technologies mainly fall into three categories: First, encryption technologies based on chaotic systems utilize the initial value sensitivity, nonlinearity, and long-term unpredictability of chaotic systems to scramble pixels. However, traditional chaotic systems suffer from fixed parameters and easily predictable pseudo-random sequences, leading to a decrease in security strength over long-term use. Second, encryption technologies based on DNA encoding leverage the complementary base pairing characteristics and rich encoding rules of DNA to construct a multi-dimensional encryption space. However, when used alone, they are vulnerable to encoding rule breaking and statistical analysis attacks, resulting in insufficient encryption depth. Third, hybrid encryption technologies combining chaotic systems and DNA encoding, while improving security to some extent, still fail to address the core issue of insufficient key randomness. Therefore, improving key randomness and attack resistance during encryption to meet the needs of secure image transmission and storage across multiple devices and scenarios has become an urgent technical challenge. Summary of the Invention
[0004] This application provides a color image encryption method based on memristors and DNA encoding, which solves the technical problems of insufficient key randomness and weak anti-attack capability in existing technologies, and cannot meet the needs of secure image transmission and storage in multiple devices and scenarios.
[0005] To achieve the above objectives, this application adopts the following technical solution: A color image encryption method based on memristor and DNA encoding is provided, comprising: obtaining a truly random bit sequence generated by a memristor; obtaining the original pixel data of a plaintext image, and converting the original pixel data into hash values through hash calculation; performing encryption operations on the truly random bit sequence and the hash values to obtain a driving key; and converting the driving key into numerical values in segments, and mapping them to the initial parameters and control parameters of a chaotic system.
[0006] The initial parameters and control parameters are iterated through a chaotic system to generate a first chaotic sequence and a second chaotic sequence. Based on the first chaotic sequence, the original pixel data is subjected to a first encryption transformation to obtain an intermediate encrypted data sequence. The second chaotic sequence is subjected to a second encryption transformation to obtain a numerical key, and a DNA encoding rule is dynamically selected according to the second chaotic sequence. Based on the numerical key and the selected DNA encoding rule, DNA encoding operation is performed on the intermediate encrypted data sequence to obtain ciphertext image data.
[0007] Based on the above technical solution, in the color image encryption method based on memristors and DNA encoding provided in this application, relying on the physical characteristics of memristors, a truly random bit sequence is generated by simulating the random formation and breakage process of conductive filaments. This completely eliminates the periodicity and predictability defects of traditional pseudo-random number generators, providing an immutable and unpredictable core random foundation for the encryption system, and resisting prediction attacks on the key from the source.
[0008] A two-layer encryption structure of pixel scrambling and DNA encoding is constructed. First, chaotic sequences are used to efficiently scramble pixel values, breaking the pixel correlation of plaintext images. Then, dynamic DNA encoding rules are used to achieve deep data diffusion. The two layers of encryption complement each other, effectively resisting mainstream attack methods such as brute-force attacks, statistical analysis, and differential attacks. Through designs such as chaotic sequence segmentation, key segmentation, and sequence cyclic reuse, it can flexibly adapt to color images of different resolutions and sizes without adjusting the core algorithm logic according to image specifications. It is suitable for the secure transmission and storage needs of images in multiple devices and scenarios, including IoT terminals, medical devices, and military communications.
[0009] In one possible implementation, the method for obtaining a truly random bit sequence includes the following steps: applying a RESET pulse to the memristor to reset it to a high-resistance state; applying a SET pulse to the memristor to activate the ion random migration model; applying a voltage to the memristor and reading the current value, and determining whether the current value is greater than a preset current threshold; if yes, then the resistance state is determined to be a low-resistance state and marked as the original random bit; otherwise, it is marked as a high-resistance state and marked as the original random bit; repeating the acquisition of the original random bits multiple times to form a truly random bit sequence S_seed.
[0010] A memristor is a circuit device that represents the relationship between magnetic flux and electric charge. While a memristor has the dimension of resistance, unlike a resistor, its resistance is determined by the charge flowing through it. Therefore, by measuring the resistance of a memristor, the amount of charge flowing through it can be determined, thus enabling it to "remember" charge.
[0011] By utilizing the physical properties of the random formation and breakage of conductive filaments in memristors, a truly random bit sequence is generated. The RESET pulse ensures that the initial state is consistent with each generation, and the ion random migration model activated by the SET pulse guarantees physical randomness. Lossless reading avoids damage to the device state, and repeated acquisition can generate a stable random sequence of sufficient length. This solves the problem of traditional pseudo-random numbers being easily predictable and provides a highly secure random seed for encryption algorithms.
[0012] In one possible implementation, the first chaotic sequence and the second chaotic sequence are generated by sequentially collecting data during the iterative process of the chaotic system. Value and Value; the formula for calculating the iteration of the chaotic system is:
[0013]
[0014] in, These are the initial parameters of the chaotic system.
[0015] A chaotic system refers to a seemingly random but irregular motion within a deterministic system. Its behavior is characterized by uncertainty, non-repeatability, and unpredictability—this is the phenomenon of chaos. Chaos is an inherent characteristic of nonlinear dynamical systems and a ubiquitous phenomenon in nonlinear systems. This method employs a 2D-ETCS chaotic system optimized from a two-dimensional chaotic system. In color image encryption, a single pixel modification can simultaneously affect all three RGB channels, achieving an NPCR of 99.6096% and a UACI of 33.4650%, effectively resisting ciphertext attacks. Compared to traditional Logistic mapping or two-dimensional chaotic systems, 2D-ETCS has advantages in key sensitivity and noise resistance.
[0016] A chaotic system employing a specific iterative formula, through sequential acquisition of data during the iterative process... Value and The system generates a dual-chaotic sequence. The nonlinear iterative nature of chaotic systems makes the sequence sensitive to initial conditions and unpredictable in the long term. The dual-sequence design can support pixel scrambling and DNA coding rule selection respectively, further enhancing the encryption dimensionality.
[0017] In one possible implementation, the intermediate encrypted data sequence is obtained by: processing the original pixel data of the plaintext image. K Divided into i Each component is labeled as a raw pixel data component. The first chaotic sequence is divided into... p The first chaotic subsequence is denoted as one of the following subsequences. ; to the original pixel data components Each of the first encryption transformations is performed on the corresponding first chaotic subsequence to obtain the intermediate encrypted data sequence. ;in, i The number of original pixel data components. i =1,...,p.
[0018] Both the original pixel data and the first chaotic sequence are processed in blocks to achieve component-level encryption. Each pixel data component is transformed with an independent first chaotic subsequence, making the encryption process more refined and avoiding security vulnerabilities caused by overall encryption. The block-based design adapts to the processing needs of images with different resolutions, flexibly matching the amount of pixel data with the length of the chaotic sequence. At the same time, the XOR operation has the characteristics of high efficiency and low resource consumption, ensuring that the encryption process does not affect the image processing speed.
[0019] In one possible implementation, the method of obtaining the DNA encoding rules includes: dividing the second chaotic sequence into... p The first subsequence is denoted as the second chaotic subsequence. ; the second chaotic subsequence Rule selection parameters are generated by rounding and modulo operations respectively; the corresponding DNA coding rule is selected from the rule selection parameters under multiple preset DNA coding rules.
[0020] By dynamically generating rule selection parameters based on the second chaotic subsequence, randomized selection of DNA encoding rules is achieved. This breaks the limitations of fixed encoding rules, making it impossible for attackers to reverse engineer the code using known encoding rules. The rule selection is strongly correlated with the chaotic sequence, which in turn depends on the driving key, forming a chain of key-chaotic sequence-encoding rule association. This greatly enhances the encryption strength of the DNA encoding layer, while the design of multiple preset encoding rules provides rich variation space for encryption.
[0021] In one possible implementation, the method for obtaining the driving key includes: performing an XOR operation on the hash value K_SHA of the original pixel data K of the plaintext image and the true random bit sequence S_seed to obtain the driving key K_drive; the formula for calculating the driving key K_drive is: K_drive=S_seed K_SHA in, This is a bitwise XOR operation.
[0022] A driving key is generated by XORing a truly random bit sequence with the hash value of a plaintext image, achieving a strong correlation between the key and the plaintext. The uniqueness of the hash value ensures that different plaintexts correspond to different driving keys; even a slight change in the plaintext will lead to a significant change in the key, effectively resisting chosen-plaintext attacks. The XOR operation has the advantages of simple computation and strong real-time performance. Without adding extra computational burden, it combines the true randomness of the key with the correlation of the plaintext, improving the randomness and specificity of the key.
[0023] In one possible implementation, the initial parameters and control parameters of the chaotic system are obtained by converting the multi-segment driving key K_drive into corresponding multiple numerical values. The parameter mapping function maps multiple corresponding values to the initial and control parameters of the chaotic system; the formula for the parameter mapping function is:
[0024]
[0025]
[0026] in, These are the initial parameters of the chaotic system. , For the control parameters of the chaotic system, The corresponding value after conversion. h =1,...,p.
[0027] The method maps the values converted from the driving key to chaotic system parameters through a parameter mapping function, achieving a strong binding between the parameters and the key. The parameters are dynamically generated by the driving key, preventing attackers from breaking the chaotic sequence with fixed parameters, thus further enhancing the method's resistance to attacks.
[0028] In one possible implementation, the formula for the first encryption transformation is:
[0029] in, Intermediate encrypted data sequence, This is the first chaotic subsequence.
[0030] XOR operation, as a reversible transformation, ensures encryption effectiveness while providing convenience for subsequent decryption. The operation process does not require complex logic, balancing encryption security and processing efficiency, making it suitable for the rapid encryption of large amounts of color images.
[0031] In one possible implementation, the numerical key is obtained by: using the second chaotic subsequence The numerical key is obtained by performing a second encryption transformation on each of them. The formula for the second encryption transformation is: = mod256.
[0032] A numerical key is generated by amplifying, rounding, and moduloing the second chaotic subsequence, ensuring a controllable key value range and perfectly adapting to the requirements of DNA encoding operations. The numerical key is strongly correlated with the second chaotic sequence, inheriting the randomness and unpredictability of the chaotic sequence, providing secure key support for DNA encoding addition operations. The operation logic maintains consistency with the first encryption transformation, reducing the complexity of the algorithm implementation, while avoiding encryption anomalies caused by key value overflow, thus improving algorithm stability.
[0033] In one possible implementation, the method for obtaining the hash value includes: serializing the original pixel data into a one-dimensional byte stream in a predetermined order; performing a hash calculation on the one-dimensional byte stream to obtain the hash value K_SHA.
[0034] The original pixel data is serialized and then hashed to ensure a unique correspondence between the hash value and the plaintext image. Serialization ensures the integrity of the pixel data and prevents hash value distortion due to disordered data order. The one-way nature of hash calculation prevents attackers from deducing the plaintext data from the hash value. At the same time, the sensitivity of the hash value ensures that even a small tampering with the plaintext will cause a drastic change in the hash value, thereby changing the driving key. This gives the encryption algorithm strong resistance to tampering and improves the robustness of the overall encryption architecture.
[0035] This application provides a color image encryption method and apparatus based on memristors and DNA encoding. It generates a driving key by XORing the hash value of a plaintext image with a truly random bit sequence. The uniqueness and sensitivity of the hash value ensure that different plaintexts correspond to completely different keys. Even slight differences in the plaintext will lead to drastic key changes, effectively resisting chosen-plaintext attacks and known-plaintext attacks, and solving the security vulnerability of key-plaintext separation in traditional encryption. The core encryption operations of this method are all lightweight logical operations, without complex matrix operations or iterative overhead, enabling rapid processing of color images.
[0036] By integrating the physical randomness of memristors, the plaintext correlation of hashes, the nonlinearity of chaotic systems, and the multidimensional transformation of DNA encoding, a full-link security architecture is formed, consisting of the physical layer, key layer, scrambling layer, and encoding layer. Attacks on a single link cannot affect the overall encryption effect, significantly improving the algorithm's adaptability to complex attack environments. This meets the real-time encryption needs of large data volume scenarios such as medical images and military reconnaissance images, balancing security and processing efficiency.
[0037] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0038] Figure 1 A schematic flowchart illustrating a color image encryption method based on memristors and DNA encoding, provided in an embodiment of this application; Figure 2 A schematic flowchart of another color image encryption method based on memristors and DNA encoding provided in this application embodiment; Figure 3 A schematic flowchart of another color image encryption method based on memristors and DNA encoding provided in this application embodiment; Figure 4 A plaintext image of Lena, an example of a color image encryption method based on memristors and DNA encoding provided in this application embodiment; Figure 5 The image provided in this application is an example of a color image encryption method based on memristors and DNA encoding, and the encrypted image is a plaintext image of Lena. Detailed Implementation
[0039] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0040] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0041] To address the technical problems of insufficient key randomness and inadequate anti-attack capabilities in existing technologies, which fail to meet the requirements for secure image transmission and storage across multiple devices and scenarios, this application provides a color image encryption method based on memristors and DNA encoding. The method includes: obtaining a truly random bit sequence generated by a memristor; obtaining the original pixel data of a plaintext image and converting the original pixel data into hash values through hash calculation; performing encryption operations on the truly random bit sequence and the hash values to obtain a driving key; and converting the driving key into numerical segments and mapping them to initial and control parameters of a chaotic system.
[0042] The initial parameters and control parameters are iterated through a chaotic system to generate a first chaotic sequence and a second chaotic sequence. Based on the first chaotic sequence, the original pixel data is subjected to a first encryption transformation to obtain an intermediate encrypted data sequence. The second chaotic sequence is subjected to a second encryption transformation to obtain a numerical key, and a DNA encoding rule is dynamically selected according to the second chaotic sequence. Based on the numerical key and the selected DNA encoding rule, DNA encoding operation is performed on the intermediate encrypted data sequence to obtain ciphertext image data.
[0043] like Figure 1 As shown in the embodiments of this application, the color image encryption method based on memristors and DNA encoding includes: S101. Obtain the true random bit sequence generated by the memristor.
[0044] The true random bit sequence is generated based on the physical characteristics of the random formation and breakage of the memristor conductive filaments.
[0045] In some implementations, the high-resistance / low-resistance state difference of the memristor is collected by sequentially performing a reset (RESET), activation (SET), and read (READ) operation, and then mapped to the corresponding 1 / 0 bit value.
[0046] It should be noted that when repeatedly acquiring the original random bits, the applied RESET pulse, SET pulse, and voltage values are the same.
[0047] It should also be noted that the true random bit sequence is a 256-bit raw bit sequence generated by repeatedly performing a RESET, SET, and READ loop operation on the memristor 256 times.
[0048] S102. Obtain the original pixel data of the plaintext image, and convert the original pixel data into a hash value through hash calculation.
[0049] The plaintext image is the image that needs to be encrypted; the hash calculation is the SHA-256 Secure Hash Algorithm 256-bit.
[0050] In some implementations, based on the original pixel data being RGB three-channel component data of a color image, the pixels of each channel need to be serialized and concatenated into a one-dimensional data sequence in row-major order. Then, the SHA-256 hash algorithm is used to perform a one-way hash operation on the one-dimensional data sequence to obtain a hash value K_SHA with a fixed length of 256 bits. The hash value will serve as the core input for generating the driving key, realizing a strong association between the key and the plaintext image.
[0051] It should be noted that if the image resolution is not fixed, the one-dimensional sequence can be standardized to a preset length by padding with zeros before performing hash calculation.
[0052] It should also be noted that the SHA-256 hash algorithm used in this step must comply with the FIPS PUB 180-4 standard. Its one-way nature can prevent attackers from reverse-engineering the original pixel data through the hash value, while the avalanche effect can ensure that even a small tampering with the original pixel will cause the hash value to change completely, thereby invalidating the subsequent driving key and effectively resisting chosen-plaintext attacks and tampering attacks. Among them, a small tampering with the original pixel is such as a change in the value of a single pixel.
[0053] For example, assuming the resolution of the plaintext image is M×N, the M×N pixel values of its R channel, the M×N pixel values of its G channel, and the M×N pixel values of its B channel are concatenated in sequence to form a one-dimensional integer sequence of length 3×M×N. This sequence is then converted into a byte stream and input into the SHA-256 hash function.
[0054] S103. Perform encryption operations on the true random bit sequence and the hash value to obtain the driving key.
[0055] The encryption operation is a bitwise XOR operation, which directly performs a bitwise XOR operation between a 256-bit true random bit sequence and a 256-bit hash value.
[0056] In some implementations, the method for obtaining the driving key includes: performing an XOR operation on the hash value K_SHA of the original pixel data K of the plaintext image and the true random bit sequence S_seed to obtain the driving key K_drive; the formula for calculating the driving key K_drive is: K_drive=S_seed⊕K_SHA Here, ⊕ represents the bitwise XOR operation.
[0057] It should be noted that since the true random bit sequence itself is 256 bits, this step does not require truncating the true random bit sequence, thus avoiding redundant logic caused by truncating operations; at the same time, the reversibility of the bitwise XOR operation can ensure that the parameters are restored by reverse XORing the driving key and the corresponding data during the decryption stage, thus balancing security and decryptability.
[0058] It should also be noted that the execution logic of the XOR operation is as follows: the result is 1 when the corresponding bit values are different, and the result is 0 when the bit values are the same.
[0059] For example, by performing 256 RESET-SET-READ loop operations on the W / Ta2O5 / Ag memristor, a 256-bit truly random bit sequence is generated. This sequence is then XORed bit-by-bit with the 256-bit hash value corresponding to the plaintext image to obtain a 256-bit driving key. This key will be directly used to generate the initial and control parameters of the subsequent chaotic system. Part of the XOR operation in the example is as follows: The first 8 bits of the first segment of the truly random bit sequence S_seed are: 1, 0, 1, 0, 0, 1, 1, 0; The first 8 bits of the K_SHA hash value are: 0, 1, 1, 1, 0, 0, 1, 1; The XOR result of the bitwise comparison is: 1, 1, 0, 1, 0, 1, 0, 1.
[0060] S104. After the driving key is segmented and converted into numerical values, it is mapped to the initial parameters and control parameters of the chaotic system.
[0061] The chaotic system is an optimized 2D-ETCS chaotic system.
[0062] In some implementations, the initial parameters and control parameters of the chaotic system are obtained by converting the multi-segment driving key K_drive into corresponding multiple numerical values. The parameter mapping function maps multiple corresponding values to the initial and control parameters of the chaotic system; the formula for the parameter mapping function is:
[0063]
[0064]
[0065] in, These are the initial parameters of the chaotic system. , For the control parameters of the chaotic system; The corresponding value after conversion. h =1,...,p.
[0066] It should be noted that the above The main function of this operation is to obtain a decimal number with a value range of [0,1) and retain 4 significant digits. The mapping formula is constrained to the interval [0.1, 0.9) through linear transformation. This interval is the key parameter interval for the optimized 2D-ETCS chaotic system to maintain its hyperchaotic characteristics. The number of values for h needs to match the number of parameters to be determined in the chaotic system. , , There are 3 parameters in total, so h = 1, 2, 3. The corresponding driver key needs to be split into 3 segments. , , ;in , [0,1).
[0067] For example, the 256-bit driver key K_drive is divided into three segments: bits 1-80 are the first segment, bits 81-160 are the second segment, and bits 161-256 are the third segment; then, these three segments are converted into three decimal numbers respectively. Assume... =12345678、 =87654321、 =19283746, substituting the example value into the formula for calculation, we get: =0.4654、 =0.5432、 =0.8375; verified [0.1, 0.9) , [0,1).
[0068] S105. The initial parameters and control parameters are iterated through a chaotic system to generate a first chaotic sequence and a second chaotic sequence.
[0069] In some implementations, the first chaotic sequence and the second chaotic sequence are generated by sequentially collecting data during the iterative process of the chaotic system. Value and Value; the formula for calculating the iteration of the chaotic system is:
[0070]
[0071] in, These are the initial parameters of the chaotic system.
[0072] It should be noted that, in order to avoid the transient fluctuations in the initial iteration stage of the chaotic system reducing the randomness of the sequence, the results obtained from the first 4000 iterations should be discarded. The value is only collected from the 4001st iteration onwards; the "mod1" operation can constrain the iteration results to the interval [0,1) to ensure that the system remains in a stable hyperchaotic state; the lengths of the first and second chaotic sequences must be completely matched with the total number of pixels in the RGB three channels of the plaintext image to ensure that subsequent encryption operations can cover all pixel data; for example, a 512×512 color image corresponds to 3×512×512=786432 pixels.
[0073] For example, suppose =0.1494, initial control parameters =0.2847、 =0.0375, perform iterative calculation, and get:
[0074] =0.2563;
[0075] =0.0024; Repeat the above iteration logic up to the 4000th iteration, discarding the results from the first 4000 iterations. , Results: Starting from the 4001st iteration, data was continuously collected. The values form the first chaotic sequence. The values form a second chaotic sequence until 786,432 values are generated. This length is consistent with the total number of pixels in the RGB three channels of a 512×512 color image, and can be directly used for subsequent pixel encryption.
[0076] S106. Based on the first chaotic sequence, perform a first encryption transformation on the original pixel data to obtain an intermediate encrypted data sequence.
[0077] Among them, the original pixel data K It has three components: RGB, and the three grayscale images are denoted as follows: , , The pixel value of each component is within [0, 255].
[0078] In some implementations, the formula for the first encryption transformation is:
[0079] in, Intermediate encrypted data sequence, This is the first chaotic subsequence.
[0080] It should be pointed out that, The goal is to ensure that the value of x in the chaotic system is greater than 256 as much as possible. This indicates rounding down. The purpose is to round the values of a chaotic sequence within the range [0,1). The values are magnified and rounded to obtain a wide range of integer values, then constrained to the integer range [0, 255] using a "mod 256" operation, thereby generating a random key stream consistent with the range of image pixel values. This key stream is then used in conjunction with the original pixel components. Performing a bitwise XOR operation achieves initial diffusion and obfuscation of pixel values, resulting in an intermediate encrypted data sequence. .
[0081] In some implementations, the method for obtaining the intermediate encrypted data sequence includes: obtaining the original pixel data of the plaintext image. K Divided into i Each component is labeled as a raw pixel data component. The first chaotic sequence is divided into... p The first chaotic subsequence is denoted as one of the following subsequences. ; to the original pixel data components Each of the first encryption transformations is performed on the corresponding first chaotic subsequence to obtain the intermediate encrypted data sequence. ;in, i The number of original pixel data components. i =1,...,p.
[0082] It should be noted that because the image size is random, the XOR operation will affect the image size. , , They all XOR each pixel in a row-first, column-second order. The values of the sequence are also used in order, and are reused after use, until all pixels have been traversed.
[0083] It should also be noted that the number of components here... i and the number of subsequences p They are numerically equal and typically correspond to the number of channels in a color image, such as i =p =3, corresponding to the R, G, and B color channels respectively. This design achieves channel parallelism and key independence in the encryption process, allowing each color channel's pixel data to be encrypted using a dedicated keystream generated from different chaotic subsequences. This not only significantly improves encryption efficiency, but more importantly, it completely destroys the inherent correlation between the color channels of the original image, greatly enhancing the algorithm's resistance to statistical analysis-based attacks.
[0084] For example, an RGB color image has three components. , , The first chaotic sequence of length M Divide evenly into 3 subsequences , , Each subsequence has a length of approximately M / 3. During encryption, the red component... All pixel data are used sequentially in a cyclical manner from subsequences. The value in the first encryption transformation is performed; similarly, correspond , correspond For example, for The j-th pixel value [j]=186, take its corresponding value. The value in If [k] = 0.8123456789, then the transformation process is as follows: =175, where
[0085] Step 1: Generate a random key: =21; The second step involves performing a bitwise XOR encryption operation: converting both the key and the pixel value into 8-bit binary numbers. , Perform an XOR operation:
[0086] ; The third step is to convert the encryption result to decimal, obtaining the intermediate encrypted data:
[0087] ; Upon verification, the random key value 21 and the output intermediate encrypted data 175 are both within the range of [0, 255], which is compatible with 8-bit pixel data.
[0088] S107. Perform a second encryption transformation on the second chaotic sequence to obtain a numerical key, and dynamically select a DNA encoding rule based on the second chaotic sequence.
[0089] The second chaotic sequence is also divided into p equal subsequences, denoted as the second chaotic subsequence. .
[0090] In some implementations, the method of obtaining the numerical key includes: using the second chaotic subsequence The numerical key is obtained by performing a second encryption transformation on each of them. The formula for the second encryption transformation is: = mod256.
[0091] It should be noted that in the formula It is the second chaotic subsequence Amplification of the [0,1) interval values Rounding down after doubling preserves the randomness of chaotic values while converting continuous values into discrete integers; mod256 constrains the result to the interval [0,255], thus ensuring that the numerical range is controllable.
[0092] It should also be noted that in practical applications, it is necessary to... Further performing a mod8 operation yields the 0-7 index values corresponding to the eight DNA encoding rules. This achieves the goal of dynamically selecting encoding rules, avoiding security vulnerabilities of fixed patterns, and significantly improving the obfuscation complexity and resistance to chosen-plaintext attacks of the encryption system.
[0093] For example, suppose the second chaotic subsequence used for the red component... Take a value from =0.6543210987; then substituting it into the formula for the second encryption transformation, we get: = mod256 = 107. Therefore, the numerical key used for the DNA addition operation at this pixel is... =107.
[0094] S108. Based on the numerical key and the selected DNA encoding rule, perform DNA encoding operation on the intermediate encrypted data sequence to obtain ciphertext image data.
[0095] The purpose of DNA encoding operations is to map these 2-bit binary segments to A / T / C / G bases using the DNA encoding rules corresponding to the numerical key, thereby achieving secondary obfuscation of the intermediate encrypted data.
[0096] In some implementations, the DNA encoding operation includes the following steps: First, splitting the 8-bit binary value of each pixel in the intermediate encrypted data sequence into four consecutive 2-bit binary segments, such as 8-bit binary... Split into The second step is to convert each 2-bit binary segment into the corresponding base according to the DNA encoding rules of the numerical key mapping in S107. The third step is to combine the 4 bases into a DNA sequence according to the segment order. The DNA sequences of all pixels are then summarized to obtain the encrypted image data.
[0097] It should be noted that the DNA addition rules are shown in Table 1. Each base appears only once in each row or column, meaning that the result of DNA addition is exactly one.
[0098] Table 1 DNA Addition Operations
[0099] It should also be noted that the encrypting party transmits the key through a dedicated channel. The key includes: a truly random bit sequence S_seed and the original pixel data of the plaintext image. K The hash value K_SHA. The decryption method can also obtain the sequence in the order of encryption. and Simply perform the inverse transformation (subtraction) of the DNA encoding on the encrypted image to obtain the encrypted image with permuted pixel values. Then, compare this encrypted image with the sequence. Performing an XOR operation yields the plaintext image; for example... = mod256⊕ .
[0100] For example, if The sequence has 2000 values, which are also processed sequentially using DNA encoding. The sequence is reused until all pixels have been traversed in row-first, column-second order. Similarly, and Perform DNA encoding operations. and DNA encoding operations are performed to obtain the encrypted image.
[0101] Encryption effect analysis: The experiment used the classic color image Lena, with an image size of 512. 512, such as Figure 4 As shown. Encryption is performed according to the aforementioned steps to obtain the ciphertext, as follows: Figure 5 As shown, the encryption effect has been achieved.
[0102] Adjacent pixel correlation analysis: The correlation coefficient is an indicator that measures the degree of linear correlation between two random variables. Its value lies in the interval [-1, 1], and the absolute value of the correlation coefficient represents the strength of the correlation between the variables. Correlation analysis was performed in the horizontal, vertical, and diagonal directions, as shown in Table 2. It can be seen that the original image has a high correlation, while the encrypted image has almost no correlation.
[0103] Table 2 Correlation coefficients of Lena's images
[0104] NPCR (Number Pixels Change Rate) analysis: NPCR represents the pixel change rate, indicating the percentage of encrypted image pixels whose values change when the text image is changed by one pixel. The closer the NPCR value is to 1, the better the security of the algorithm. Multiple tests yielded ideal results. As shown in Table 3, which lists the data from three tests, the NPCR values are consistently close to 1.
[0105] Table 3 NPCR pixel change rate
[0106] Based on the above technical solutions, the color image encryption method based on memristors and DNA encoding provided in this application uses a memristor to cyclically generate a 256-bit truly random key, avoiding the periodic vulnerability of software pseudo-random numbers; it generates a highly random sequence based on an optimized 2D-ETCS hyperchaotic system, combined with discarding transient iteration results, to enhance the confusion between pixels and encrypted data; and it dynamically selects eight DNA encoding rules through a second chaotic sequence to effectively resist attacks such as differential and chosen-plaintext attacks. The encryption transformation uses lightweight operations such as amplification, rounding, modulo operation, and XOR, achieving a single-pixel latency of less than or equal to 2μs, adapting to real-time image encryption; the process is compatible with RGB images of any resolution and supports hardware implementation in low-computing-power embedded devices. All encryption steps in this method are reversible, completely restoring the original image; the chaotic parameters are mapped and constrained to the hyperchaotic region to avoid sequence degradation and ensure the consistency and stability of the encryption effect.
[0107] In one possible implementation of the embodiments of this application, combined with Figure 1 ,like Figure 2 As shown, the above S101 can be specifically implemented through the following S201, S202, S203 and S204, which are explained in detail below: S201. Apply a RESET pulse to the memristor to reset the memristor to a high-resistance state.
[0108] Wherein, the memristor is Memristors simulate the underlying mechanism of the random formation and breakage of conductive filaments to generate truly random bit sequences.
[0109] In some implementations, for A RESET pulse with a positive voltage applied to the memristor has an amplitude of 2V to 5V and a pulse width of 200ns to 500ns. Specifically, the deterministic RESET pulse defined in this invention is: a positive voltage is applied to the bottom W electrode, and the top Ag electrode is grounded, with a voltage amplitude of 4V and a width of 300ns. A positive voltage is output from a pulse generator to the two ends of the memristor electrodes, driving ion re-aggregation and breaking the conductive wire, thus completing the high-resistivity reset.
[0110] It should be noted that if the RESET pulse is omitted or the parameters are mismatched, the memristor will retain the previous resistance state, causing a decrease in the randomness of the resistance state generated by subsequent SET operations, thus destroying the true randomness of the key; the high resistance state value after reset needs to be stable at... Above Ω, to ensure the consistency of the initial state and the magnitude of the resistance change in subsequent SET operations.
[0111] For example, for After applying a RESET pulse with an amplitude of 3V and a pulse width of 500ns to the memristor, its resistive state resistance was measured to be 2.1× Ω using an impedance analyzer. Ω meets the criteria for a high-resistivity state, and the reset is successfully completed, laying the initial conditions for generating a random resistance state in subsequent SET operations.
[0112] S202. Apply a SET pulse to the memristor to activate the ion random migration model.
[0113] Among them, the ion random migration model is the Monte Carlo ion transport model.
[0114] In some implementations, the specific parameters of the SET pulse are as follows: a positive voltage is applied to the top electrode of the memristor, such as the Ag electrode; the bottom electrode is grounded, such as the W electrode; the voltage amplitude is 1V to 3V, and the pulse width is 50ns to 200ns. Simultaneously with applying this pulse, a Monte Carlo ion transport model is activated in a simulation platform to simulate the random diffusion behavior of ions; wherein, the simulation platform is, for example, Synopsys Sentaurus TCAD.
[0115] It should be noted that, unlike the deterministic nature of the RESET operation, the SET operation is probabilistic. Even when the exact same electrical pulse is applied, due to the microscopic randomness of ion movement, a low-resistivity state may sometimes be successfully formed, while a high-resistivity state may remain unsuccessful. This is the physical basis for extracting truly random bits. In simulations, this random process is typically accurately simulated by setting key parameters such as the ion diffusion coefficient and ambient temperature; where the ion diffusion coefficient, for example, is 1 × 10⁻⁶ for Ag ions. - ¹ 4 m² / s; the ambient temperature, such as 300K.
[0116] For example, immediately after completing the aforementioned RESET operation, a SET pulse is applied to the same W / Ta₂O₅ / Ag memristor: a 2V voltage is applied to the Ag top electrode, the W bottom electrode is grounded, and the pulse width is 100ns. In the TCAD simulation, the Monte Carlo model is enabled simultaneously, with parameters set as follows: Ag ion diffusion coefficient 1×10⁻⁶. - ¹ 4 m² / s, temperature 300K, iteration step size 1fs. This operation simulates the random migration of Ag ions driven by an electric field, and the results are random: it is possible to successfully form ions with a resistivity of less than 10. 4 The conductive filament of Ω corresponds to logic 1; however, insufficient migration may prevent the formation of an effective path, and the device may remain above 10. 6 The high impedance state of Ω corresponds to logic 0.
[0117] S203. Apply voltage to the memristor and read the current value, and determine whether the current value is greater than a preset current threshold; if yes, determine the resistance state as low resistance state and mark the resistance state as the original random bit; otherwise, mark it as high resistance state and mark it as the original random bit.
[0118] In some implementations, a read voltage of 0.1V is applied immediately after the SET pulse ends, and the read current is extracted at a high sampling frequency. The preset current threshold is set to 1μA. If the read current is greater than 1μA, the memristor is determined to be in a low-resistance state, and its resistance drops below 10. 4 Ω, marked as bit 1; if the read current is less than or equal to 1μA, it is determined to be a high impedance state and marked as bit 0.
[0119] It should be noted that the read operation must be lossless. The reason for using a 0.1V read voltage is that its amplitude is much lower than the SET pulse voltage, so the resulting electric field strength is extremely low and insufficient to induce significant ion migration or change the structure of the conductive filament, thereby ensuring that the established random resistance state after the SET operation is not disturbed.
[0120] It should also be noted that the current threshold of 1μA is set based on the typical resistance range of the high and low resistance states, and the applied read voltage of 0.1V is a calculated empirical value, designed to clearly distinguish between the two states and ensure the reliability of bit generation; wherein, the typical resistance range is: less than 10 μA in the low resistance state. 4 Ω, high resistance state greater than 10 6 Ω; the empirical value, such as for a current of 1μA, the corresponding resistance is 0.1V / 1μA=100kΩ, which is exactly between the typical high and low resistance values.
[0121] For example, after applying a SET pulse set to 2V and 100ns, a read voltage of 0.1V is immediately applied to the memristor, and the instantaneous current value is sampled by the analog-to-digital converter (ADC) to obtain 3.5μA. This value is compared with a preset threshold of 1μA. Since 3.5μA is greater than 1μA, the memristor is determined to be in a low-resistance state, and an initial random bit 1 is generated.
[0122] S204. Repeat the process of obtaining the original random bits multiple times to form a true random bit sequence S_seed.
[0123] In some implementations, the number of repetitions is determined by the length of the desired truly random bit sequence. For example, to generate a 256-bit truly random bit sequence, the RESET, SET, and read loops need to be executed completely 256 times to obtain 256 raw random bits, which are then arranged in the order of generation to form a 256-bit truly random bit sequence S_seed.
[0124] It should be noted that the number of iterations must be determined by balancing security strength with generation efficiency. A 256-bit length provides a key space far exceeding the current computational capabilities required to crack the code. Furthermore, each iteration is based on an independent physical random process, ensuring the independence and unbiasedness of each bit in the sequence, thus guaranteeing the unpredictability and non-repeatability of the key from the source.
[0125] For example, the control system will repeat the above loop 256 times. The first loop produces a bit 1, the second produces a bit 0, the third produces a bit 1, and so on, until the 256th loop produces a bit 1. Finally, these 256 sequentially generated bits are concatenated to obtain a complete 256-bit truly random bit sequence, for example: S_seed=101...011 (256 bits in total). This sequence will serve as the source for subsequent key-driven operations.
[0126] Based on the above technical solution, the method achieves a stable and reliable conversion from random migration of microscopic ions to macroscopic random digital sequences by cyclically exciting and reading the random physical process of the memristor. The true random bit sequence S_seed possesses physical true randomness, non-cloning properties, and uniqueness related to process deviations, fundamentally improving the security level of the key.
[0127] In one possible implementation, combining Figure 1 ,like Figure 3 As shown, after S107, the color image encryption method based on memristors and DNA encoding provided in this application embodiment further includes the following S301-S303: S301. Divide the second chaotic sequence into p subsequences, denoted as the second chaotic subsequence. .
[0128] In some implementations, the number of subsequences p is related to the number of original pixel data components. i Maintain consistency.
[0129] It should be noted that this one-channel-one-sequence design ensures that the chaotic source used in the encryption process of each color channel is independent and sufficiently random, effectively destroying the statistical correlation between the channels of the image and preventing the leakage of periodicity or pattern that may be introduced by reusing chaotic sequences, thereby improving the security strength of the overall encryption scheme.
[0130] For example, suppose the chaotic system iteratively generates a second chaotic sequence B={ of length 6000}. ,..., }, divide this sequence into three equal sequences, that is }、 }、 }
[0131] S302, the second chaotic subsequence The selection parameters are generated by rounding and modulo operations respectively.
[0132] In some implementations, the formula for generating the rule selection parameters is: = mod8+1. First, through... Enlarge and round up, make full use of The fractional part of the information is used to generate a large integer, which is then mapped to the integer range of 0 to 7 through modulo 8 operation. Finally, 1 is added to obtain the final index value in the range of 1 to 8.
[0133] It should be noted that the modulo-8 operation directly corresponds to eight preset DNA coding rules. This operation ensures that each chaotic value... Each rule can be definitively and uniquely pointed to one of the eight rules.
[0134] For example, suppose a value is used in the second chaotic subsequence for the red channel. Substituting [k]=0.321456789 into the formula, we get: = mod8+1=3. Therefore, the rule selection parameter generated for this pixel is 3, which will be used to select the third DNA encoding rule.
[0135] S303. Select the corresponding DNA coding rule from the rule selection parameters among multiple preset DNA coding rules.
[0136] The DNA sequence is composed of four deoxyribonucleotides: adenine (A), thymine (T), guanine (G), and cytosine (C). A pairs with T, and G pairs with C. Since the complementary pairing principle allows each of the four deoxyribonucleotides to be represented by a two-bit binary number, there are eight possible combinations that satisfy the complementary base pairing principle.
[0137] In some implementations, the multiple preset DNA encoding rules are stored in the form of a lookup table, as shown in Table 4. The selection process is a lookup operation: the rule selection parameters are... As a row index of the table, it retrieves the complete mapping relationship defined for that row, namely the bases A, T, C, and G corresponding to the four binary combinations 00, 01, 10, and 11, respectively.
[0138] Table 4 DNA Encoding Rules
[0139] It should be noted that all eight encoding rules are reversible bijective rules, ensuring the correctness of the encryption and decryption process. The dynamic selection mechanism means that even for two pixels with identical values, as long as their corresponding chaotic values... Different DNA encoding rules are likely to be used for processing, resulting in different ciphertexts.
[0140] For example, the binary representation of a pixel grayscale value is "10011100", which is encoded as "GCTA" using the first encoding method.
[0141] Based on the above technical solution, by mapping the second chaotic sequence to the selection index of DNA encoding rules in real time and dynamically, the encryption rules are dynamically changed at the pixel level, one pixel, one key. This method extends the randomness of the encryption system from the traditional keystream level to the more fundamental level of the encoding rules themselves. Attackers not only need to crack the numerical key used for DNA addition, but also need to deduce the encoding rule used by each pixel, which changes with time and space. This greatly increases the complexity and uncertainty of cryptanalysis and significantly improves the algorithm's ability to resist known-plaintext attacks and chosen-plaintext attacks.
[0142] In implementation, each step of the method provided in this embodiment can be completed by integrated logic circuits in the processor or by instructions in software form. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0143] The processor in this application may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., which are various computing devices that run software. Each computing device may include one or more cores for executing software instructions to perform calculations or processing. The processor may be a separate semiconductor chip or integrated with other circuits into a single semiconductor chip. For example, it may be integrated with other circuits (such as encoding / decoding circuits, hardware acceleration circuits, or various bus and interface circuits) to form a SoC (System-on-a-Chip), or it may be integrated as a built-in processor within an ASIC. The ASIC with the integrated processor may be packaged separately or together with other circuits. In addition to the cores for executing software instructions to perform calculations or processing, the processor may further include necessary hardware accelerators, such as field-programmable gate arrays (FPGAs), PLDs (programmable logic devices), or logic circuits that implement dedicated logic operations.
[0144] The memory in the embodiments of this application may include at least one of the following types: read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; or electrically erasable programmable-only memory (EEPROM). In some scenarios, the memory may also be a compact disc read-only memory (CD-ROM) 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 code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0145] This application also provides a computer-readable storage medium including instructions that, when run on a computer, cause the computer to perform any of the methods described above.
[0146] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the methods described above.
[0147] This application also provides a chip including a processor and an interface circuit. The interface circuit is coupled to the processor. The processor is used to run computer programs or instructions to implement the above-described method. The interface circuit is used to communicate with other modules outside the chip.
[0148] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).
[0149] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0150] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A color image encryption method based on memristors and DNA encoding, characterized in that, include: Obtain the truly random bit sequence generated by the memristor; Obtain the raw pixel data of the plaintext image, and convert the raw pixel data into hash values through hash calculation; The driving key is obtained by performing an encryption operation on the true random bit sequence and the hash value; After the driving key is segmented and converted into numerical values, it is mapped to the initial parameters and control parameters of the chaotic system. The initial parameters and control parameters are iterated through a chaotic system to generate a first chaotic sequence and a second chaotic sequence. Based on the first chaotic sequence, the original pixel data is subjected to a first encryption transformation to obtain an intermediate encrypted data sequence; The second chaotic sequence is subjected to a second encryption transformation to obtain a numerical key, and the DNA encoding rule is dynamically selected according to the second chaotic sequence. Based on the numerical key and the selected DNA encoding rule, DNA encoding operations are performed on the intermediate encrypted data sequence to obtain ciphertext image data.
2. The method according to claim 1, characterized in that, The method for obtaining the truly random bit sequence includes the following steps: A RESET pulse is applied to the memristor to reset it to a high-resistance state; A SET pulse is applied to the memristor to activate the ion random migration model; A voltage is applied to the memristor and the current value is read. It is then determined whether the current value is greater than a preset current threshold. If yes, the resistance state is determined to be low resistance and the resistance state is marked as the original random bit. Otherwise, it is marked as high resistance and marked as the original random bit. The original random bits are repeatedly obtained to form a true random bit sequence S_seed.
3. The method according to claim 1, characterized in that, The first and second chaotic sequences were generated during the iterative process of sequentially acquiring chaotic system data. Value and Value; the formula for calculating the iteration of the chaotic system is: in, These are the initial parameters of the chaotic system.
4. The method according to claim 1, characterized in that, The methods for obtaining the intermediate encrypted data sequence include: The original pixel data of the plaintext image K Divided into i Each component is labeled as a raw pixel data component. ; Divide the first chaotic sequence into p The first chaotic subsequence is denoted as one of the following subsequences. ; The original pixel data components Each of the first encryption transformations is performed on the corresponding first chaotic subsequence to obtain the intermediate encrypted data sequence. ;in, i The number of original pixel data components. i =1,...,p.
5. The method according to claim 1, characterized in that, The methods for obtaining the DNA encoding rules include: Divide the second chaotic sequence into p The first subsequence is denoted as the second chaotic subsequence. ; The second chaotic subsequence Rule selection parameters are generated using both integer and modulo operations; Select the corresponding DNA encoding rule from the rule selection parameters among multiple preset DNA encoding rules.
6. The method according to claim 1, characterized in that, The methods for obtaining the driver key include: The original pixel data of the plaintext image K The hash value K_SHA is XORed with the true random bit sequence S_seed to obtain the driving key K_drive; the formula for calculating the driving key K_drive is as follows: K_drive=S_seed K_SHA in, This is a bitwise XOR operation.
7. The method according to claim 1, characterized in that, The methods for obtaining the initial parameters and control parameters of the chaotic system include: Convert the multi-segment drive key K_drive into corresponding numerical values. ; Multiple corresponding numerical values are mapped to the initial and control parameters of the chaotic system through a parameter mapping function; the formula of the parameter mapping function is: in, These are the initial parameters of the chaotic system. , For the control parameters of the chaotic system, The corresponding value after conversion. h =1,...,p.
8. The method according to claim 4, characterized in that, The formula for the first encryption transformation is: in, Intermediate encrypted data sequence, This is the first chaotic subsequence.
9. The method according to claim 5, characterized in that, The methods for obtaining the numerical key include: The second chaotic subsequence The numerical key is obtained by performing a second encryption transformation on each of them. The formula for the second encryption transformation is: = mod256.
10. The method according to claim 1, characterized in that, The methods for obtaining the hash value include: The original pixel data is serialized into a one-dimensional byte stream in a predetermined order; The hash value K_SHA is obtained by performing a hash calculation on the one-dimensional byte stream.