Parallel RGB color image encryption method based on DNA and CA fusion diffusion

The parallel RGB color image encryption method based on DNA and CA fusion diffusion solves the problems of low encryption efficiency and insufficient security in existing technologies, and achieves efficient and secure RGB color image encryption that can resist various attacks and adapt to complex application scenarios.

CN121924218APending Publication Date: 2026-04-24SHIHEZI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHIHEZI UNIVERSITY
Filing Date
2026-01-26
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing RGB color image encryption methods are insufficient in terms of encryption efficiency and security, making it difficult to meet the real-time processing requirements of high-resolution images and vulnerable to attacks. Traditional DNA encoding lacks a spatial diffusion mechanism, and cellular automata are prone to forming fixed diffusion patterns that can be cracked.

Method used

A parallel RGB color image encryption method based on DNA and CA fusion diffusion is adopted. Through multi-layer encryption architecture and collaborative design, random sequences are generated by two-dimensional chaotic system and 1D-JSMPM chaotic system. Combined with Fibonacci permutation and DNA encoding, multi-channel parallel encryption and DNA-CA fusion diffusion are performed.

Benefits of technology

It significantly improves encryption strength and efficiency, can resist various attacks such as exhaustive, statistical, and differential attacks, adapts to complex application scenarios, and can still effectively decrypt and recover when the ciphertext is lost or interfered with by noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121924218A_ABST
    Figure CN121924218A_ABST
Patent Text Reader

Abstract

The invention specifically discloses a parallel RGB color image encryption method based on DNA and CA fusion diffusion, and relates to the technical field of image information security. The method comprises the following steps: acquiring a hash value of an original image through a secure hash algorithm; generating an initial value and a parameter value of the chaotic system according to the hash value; carrying out overall replacement on the original image based on a random sequence generated by the two-dimensional chaotic system; separating each channel of the overall replacement image, generating a random sequence of the 1D-JSMPM chaotic system according to a hash value, and dividing the random sequence obtained by each channel; generating an initial matrix and a DNA coding matrix; carrying out Fibonacci replacement and DNA-CA fusion diffusion; carrying out dynamic DNA operation; zigzag scanning is carried out. And performing DNA decoding operation and merging to obtain a final encrypted image. According to the method, various attacks can be efficiently resisted, and reliable safety guarantee is provided for the RGB color image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image information security technology, and in particular to a parallel RGB color image encryption method based on DNA and CA fusion diffusion. Background Technology

[0002] With the rapid development and widespread application of digital imaging technology, RGB color images have become core data support for key fields such as film and television media, medical diagnosis, security monitoring, virtual reality, and intelligent transportation, and their information value and application significance are becoming increasingly prominent. However, RGB color images are highly susceptible to security risks such as illegal theft, tampering, and leakage during the acquisition, transmission, storage, and sharing processes. Privacy protection and data security issues are becoming increasingly serious, urgently requiring efficient and reliable encryption technologies to build a security protection barrier.

[0003] Various image encryption schemes have emerged in the existing technology, but traditional methods generally have two major pain points when adapting to RGB color images: first, the encryption efficiency is low, which makes it difficult to meet the real-time processing requirements of high-resolution RGB color images; second, the security performance is insufficient, making it difficult to resist increasingly complex attack methods.

[0004] DNA coding and cellular automata (CA), as key technologies in the field of encryption, each have their unique advantages, but their individual applications have significant limitations. Traditional encryption schemes based on DNA coding concentrate their operations on a single pixel dimension, lacking an effective spatial diffusion mechanism, making it difficult to break the correlation between pixels, resulting in limited encryption strength. While cellular automata possess excellent spatial diffusion characteristics, their evolution rules are relatively fixed. Without optimization in conjunction with other technologies, they can easily form fixed diffusion patterns that can be cracked, leading to insufficient security redundancy.

[0005] To address the aforementioned technical bottlenecks, this invention innovatively proposes a parallel RGB color image encryption method based on DNA and CA fusion diffusion. Through a multi-layer encryption architecture and collaborative design, it significantly improves encryption strength while ensuring encryption efficiency, achieving a dual breakthrough in security and efficiency, and providing more reliable technical protection for RGB color image information security. Summary of the Invention

[0006] The purpose of this invention is to propose a parallel RGB color image encryption method based on DNA and CA fusion diffusion, in order to solve the problems of slow speed and insufficient security of traditional image encryption methods when encrypting RGB color images, and to achieve resistance to exhaustive attacks, statistical attacks, differential attacks, noise attacks, cropping attacks and chosen plaintext attacks.

[0007] To achieve the above objectives, this invention proposes a parallel RGB color image encryption method based on DNA and CA fusion diffusion, the specific steps of which are as follows: Step S1: Obtain the sum of pixel values ​​of the original RGB color image, and input the sum of pixel values ​​into the secure hash algorithm SHA-512 to obtain a 512-bit hash value. ; Step S2: Based on the hash value Generate initial and parameter values ​​for the two-dimensional chaotic system Hénon-Sine and the 1D-JSMPM chaotic system; Step S3: Random sequences generated based on the two-dimensional chaotic system Hénon-Sine. and For the original RGB color image Perform global displacement to obtain the global displacement image. ; Step S4: Replace the entire image The channels were separated to obtain According to the hash value Generate a random sequence for the 1D-JSMPM chaotic system, and assign each channel The obtained random sequence is divided into , , ;in For the i-th channel, , , It is a random sequence; Step S5: Connect each channel Parallel generation of initial matrix CA and DNA coding matrix and ;in, Let be the intermediate quantity matrix formed by the i-th channel in the second encryption step. This is the intermediate matrix formed by the decimal matrix of the i-th channel in the second encryption step; Step S6: Connect each channel Parallel Fibonacci permutations were performed to obtain Each channel DNA-CA fusion diffusion was performed to obtain ;in, Let be the intermediate quantity matrix formed by the i-th channel in the third encryption step. This is the intermediate matrix formed by the decimal matrix of the i-th channel in the third encryption step; Step S7: Connect each channel and Dynamic DNA computation was performed to obtain ;in, This is the intermediate matrix formed by the i-th channel in the fourth encryption step; Step S8: Connect each channel Perform Zigzag scan transformation to obtain Specifically: for each sub-block Zigzag permutation was performed to obtain and sub-blocks ;in, This is the intermediate matrix formed by the i-th channel in the fifth encryption step; Step S9: Connect each channel DNA decoding operation is performed to obtain Then each channel The final encrypted image is obtained by merging the two images. ;in, This is the intermediate matrix formed by the i-th channel in the sixth encryption step.

[0008] Preferably, in step S1, the size is obtained as follows: Original RGB color image For the original RGB color image The pixel values ​​of each color channel are summed one by one; where, For the number of channels, The length of the image. The height of the image.

[0009] Preferably, in step S2, based on the hash value The initial values ​​and parameter values ​​for the two-dimensional chaotic system Hénon-Sine and the 1D-JSMPM chaotic system are generated through the following steps: hash value The first 6 characters and the last 6 characters are removed, leaving a 500-character hash value. Divide into 10 equal parts of 50 digits each; Will Convert to a set with 10 decimal elements. ; Will Each element in the array is normalized to the range of 0-1 to generate initial parameters. , , , , , , , , and ;in, , The initial values ​​for the Henon-sine two-dimensional chaotic system are... , For the parameters of the Henon-sine two-dimensional chaotic system, , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the first channel. , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the second channel, respectively. , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the third channel, respectively.

[0010] Preferably, in step S3, the random sequence of the two-dimensional chaotic system Hénon-Sine is used. and For the original RGB color image Perform a global displacement to obtain the global displacement image. The specific steps are as follows: Initial value and system parameters The input is given to the Hénon-Sine two-dimensional chaotic system and iterated. Secondly, in order to eliminate transient effects, random sequences and The first 1000 elements in the sequence will be discarded; then, the resulting random sequence will be... and Normalization is performed to obtain and and perform original RGB color image processing. The formulas for pixel position permutation and channel permutation are as follows: ; ; in, For sorting functions, The original image without scrambling. This is the second step of pixel pair scrambling, following the first step of overall scrambling of the image's pixel pair arrangement. The image E is after two-step scrambling.

[0011] Preferably, in step S4, the specific steps are as follows: Step S41: The image after replacement Perform 3-channel separation, separating each channel initial value and Input into 1D-JSMPM, Iteration Next; to eliminate transient effects, the first 1000 elements in the generated random sequence are discarded; where suit_num represents the image of each channel. The padding values, where num_block represents the image for each channel. The number of sub-blocks; Step S42: Divide the random sequence obtained from each channel into 3 sequences. , , The sizes are respectively , and ; Step S43: The random sequence Each element is normalized to a decimal integer between 0 and 255, and the random sequence is... Each element is normalized to a decimal integer between 0 and 1, and the random sequence is... Each element is normalized to a decimal integer between 0 and 8.

[0012] Preferably, in step S5, the specific steps are as follows: Step S51: From the random sequence of each channel Winning ,Will The dimensions are padded to multiples of 16; Step S52: From the random sequence of each channel Winning , convert to Decimal matrices of the same size ;in, Let be the decimal matrix of the i-th channel; Step S53: Connect each channel and Each pixel value is converted from a decimal integer to an 8-bit binary number, and then divided into groups of two bits to obtain a binary matrix. and ; Step S54: Use random sequences from each channel The front of the middle Come to and Perform dynamic DNA encoding to generate a size of DNA coding matrix and .

[0013] Preferably, in step S6, each channel Parallel Fibonacci permutations were performed to obtain Each channel DNA-CA fusion diffusion was performed to obtain The specific steps are as follows: Step S61, will Obtained by performing Fibonacci permutation ; Step S62, will Each sub-block The DNA-CA fusion diffusion is performed in parallel. The diffusion rule of the cellular automata is determined by the sum of the elements in each sub-block. The diffusion rule formula is as follows: ; in, for The Numbering of the cellular automaton diffusion rules for each sub-block for The sum of all mapped DNA codes in the dataset; bin() is a binary function. Let k be a variable with a state of 0 or 1, where k is an integer; Step S63: Using random sequences from each channel Taken from To judge The methods of fusion and diffusion are as follows: if The equation equals 0, and the fusion diffusion formula is as follows: ; if Not equal to 0, the fusion diffusion formula is as follows: ; in, The fusion diffusion formula determination value for the i-th sub-block. It is a unit At time step state, For XOR operation; Step S64: Using random sequences from each channel Taken from To judge The DNA coding rules used during the update Each sub-block After diffusion is complete, the following is obtained: and .

[0014] Preferably, in step S7, each channel and Dynamic DNA computation was performed to obtain The specific steps are as follows: Step S71: From the random sequence of each channel Winning The length is used to select the DNA operation type for each pair of pixel values; if... An equality of 0 indicates that a DNA XOR operation was performed on the pixel value. A value not equal to 0 indicates that a DNA addition operation is being performed on the pixel value. Step S72: Obtain the random sequence for each channel. In The length is used to select the DNA operation rules for each pair of pixel values; Step S73, will and DNA operations are performed in parallel on each pair of pixel values. After the operations on each pair of pixel values ​​are completed, the result is obtained. .

[0015] Preferably, in step S9, each channel DNA decoding operation is performed to obtain Then each channel The final encrypted image is obtained by merging the two images. The specific steps are as follows: Step S91, take In Length DNA decoding rule selection for each pixel; Step S92: For each channel Each pixel is DNA-decoded, and after decoding, the result will be... Each channel The final encrypted image is obtained by merging the two images. .

[0016] Preferably, the image encryption method is symmetric. The hash value is used as a seed for one-time pad encryption and transmitted to the receiver through a secure channel. With the correct decryption key, which is the same as the encryption key, the decryption process is performed in reverse order to obtain the plaintext image. The specific steps are as follows: Step S101: Separate the ciphertext image to obtain the corresponding three channels; Step S102: Each channel sequentially performs inverse DNA decoding, inverse Zigzag permutation, inverse pixel-level DNA operation, inverse Fibonacci permutation, inverse DNA encoding, and image size restoration according to its own chaotic sequence. Then, the channels are merged and inverse Hénon-Sine transform is performed to obtain the original plaintext image.

[0017] Therefore, this invention proposes a parallel RGB color image encryption method based on DNA and CA fusion diffusion, which has the following advantages: (1) By taking advantage of parallel processing, the present invention divides each channel of the image into multiple sub-blocks and performs encryption operations synchronously, which greatly shortens the encryption time and can efficiently adapt to the real-time processing requirements of high-resolution RGB color images.

[0018] (2) This invention integrates DNA coding with two-dimensional cellular automata (CA) and combines the dynamic generation of operation rules and diffusion patterns of chaotic systems, which significantly enhances the encryption nonlinearity and randomness and can effectively resist various attacks such as exhaustive search, statistics, difference, and pruning.

[0019] (3) The present invention adopts a symmetric encryption architecture. The key is dynamically generated based on the hash value of the plaintext image. It supports stable encryption of different types of RGB color images. Even when the ciphertext is lost or interfered with by noise, it can still achieve effective decryption and recovery, and is suitable for complex application scenarios.

[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0021] Figure 1 A flowchart illustrating a parallel RGB color image encryption method based on DNA and CA fusion diffusion provided by the present invention; Figure 2 This is a schematic diagram of a two-dimensional cellular automaton neighborhood classification provided by the present invention; wherein, (a) is the von Neumann neighborhood and (b) is the Moore neighborhood; Figure 3 A schematic diagram of Zigzag permutation provided by the present invention; Figure 4 A schematic diagram of an original RGB color image provided by the present invention; Figure 5 This is a schematic diagram of an original RGB color image encryption and decryption provided by the present invention; wherein, (a) is the encrypted image and (b) is the decrypted image; Figure 6 The present invention provides a histogram of an original RGB color image and an encrypted RGB color image; wherein, (a) is the histogram of the original RGB color image and (b) is the histogram of the encrypted RGB color image; Figure 7 This invention provides a schematic diagram of pixel correlation analysis between a raw RGB color image and an encrypted RGB color image; wherein, (a) is a schematic diagram of correlation analysis of the raw RGB color image, and (b) is a schematic diagram of correlation analysis of the encrypted RGB color image; Figure 8This invention provides a schematic diagram of an encrypted RGB color image with added cropping ratio and a decrypted RGB color image; wherein, (a) is a schematic diagram of the original RGB color image with added cropping ratio, and (b) is a schematic diagram of the encrypted RGB color image with added cropping ratio; Figure 9 This invention provides a schematic diagram of encrypting an original pure white RGB image and a pure black RGB image; wherein, (a) is an original pure black RGB image, (b) is a schematic diagram of encrypting a pure black RGB image, (c) is an original pure white RGB image, and (d) is a schematic diagram of encrypting a pure white RGB image. Detailed Implementation

[0022] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0023] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0024] Example like Figure 1 As shown, this invention provides a parallel RGB color image encryption method based on DNA and CA fusion diffusion, the specific steps of which are as follows: Step S1: Obtain the original RGB color image The sum of pixel values ​​is then input into the Secure Hash Algorithm SHA-512 to obtain a 512-bit hash value. Specifically: obtain the size as Original RGB color image For the original RGB color image The pixel values ​​of each color channel are summed one by one; where, For the number of channels, The length of the image. The height of the image; Step S2: Based on the hash value The initial values ​​and parameter values ​​for the two-dimensional chaotic system Hénon-Sine and the 1D-JSMPM chaotic system are generated through the following steps: hash value The first 6 characters and the last 6 characters are removed, leaving a 500-character hash value. Divide into 10 equal parts of 50 digits each; Will Convert to a set with 10 decimal elements. ; Will Each element in the array is normalized to the range of 0-1 to generate initial parameters. , , , , , , , , and ;in, , The initial values ​​for the Henon-sine two-dimensional chaotic system are... , For the parameters of the Henon-sine two-dimensional chaotic system, , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the first channel. , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the second channel, respectively. , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the third channel, respectively.

[0025] Step S3: Random sequences generated based on the two-dimensional chaotic system Hénon-Sine. and For the original RGB color image Perform global displacement to obtain the global displacement image. The specific steps are as follows: Initial value and system parameters Input into a Hénon-Sine two-dimensional chaotic system, iterate Secondly, in order to eliminate transient effects, random sequences and The first 1000 elements in the sequence will be discarded; then, the resulting random sequence will be... and Normalization is performed to obtain and and perform original RGB color image processing. The formulas for pixel position permutation and channel permutation are as follows: ; ; in, For sorting functions, The original image without scrambling. This is the second step of pixel pair scrambling, following the first step of overall scrambling of the image's pixel pair arrangement. The image E is after two-step scrambling.

[0026] The formula for the two-dimensional chaotic system Hénon-Sine is as follows: ; in, , For the iterative first step of a two-dimensional chaotic system n The value generated next, e, These are the parameters representing the behavior and state of a two-dimensional chaotic system, respectively.

[0027] Step S4: Replace the entire image The channels were separated to obtain According to the hash value Generate a random sequence for the 1D-JSMPM chaotic system, and assign each channel The obtained random sequence is divided into , , The specific steps are as follows: Step S41: The image after replacement Perform 3-channel separation, separating each channel initial value and Input into 1D-JSMPM, Iteration Next; to eliminate transient effects, the first 1000 elements in the generated random sequence are discarded; where suit_num represents the image of each channel. The padding values, where num_block represents the image for each channel. The number of sub-blocks; The formula for 1D-JSMPM is as follows: ; in, These are system parameters. Within the range of 0.502 to 2000, the 1D-JSMPM system will exhibit good chaotic behavior; xi is the initial value of the 1D-JSMPM chaotic system.

[0028] Step S42: Divide the random sequence obtained from each channel into 3 sequences. , , The sizes are respectively , and ; Step S43: The random sequence Each element is normalized to a decimal integer between 0 and 255, and the random sequence is... Each element is normalized to a decimal integer between 0 and 1, and the random sequence is... Each element is normalized to a decimal integer between 0 and 8.

[0029] Step S5: Connect each channel Parallel generation of initial matrix CA and DNA coding matrix and The specific steps are as follows: Step S51: From the random sequence of each channel Winning ,Will The dimensions are padded to multiples of 16; Step S52: From the random sequence of each channel Winning , convert to Decimal matrices of the same size ; Step S53: Connect each channel and Each pixel value is converted from a decimal integer to an 8-bit binary number, and then divided into groups of two bits to obtain a binary matrix. and ; Step S54: Use random sequences from each channel The front of the middle Come to and Perform dynamic DNA encoding to generate a size of DNA coding matrix and ; A DNA sequence contains four nucleic acid bases: adenine (A), cytosine (C), guanine (G), and thymine (T). A and T, and C and G, are complementary. In the binary system, 0 and 1 are complementary; similarly, binary numbers 00 and 11 are complementary, and 01 and 10 are also complementary. Using the four bases A, C, G, and T to represent the binary numbers 00, 01, 10, and 11, there are 24 possible DNA coding schemes. However, only 8 of these schemes satisfy the complementary base pairing rule, as shown in Table 1.

[0030] Table 1. DNA Encoding Rules

[0031] In this embodiment, DNA sequences are used to encrypt digital images. Each 8-bit pixel value of the image can be encoded into a 4-bit DNA sequence using A, C, T, and G to represent the binary values ​​00, 01, 10, and 11. Furthermore, to further expand the operational rules of DNA encoding, DNA XOR and DNA addition rules are introduced. Taking rule 1 in Table 1 as an example, the DNA XOR and DNA addition rules are shown in Tables 2 and 3.

[0032] Table 2. DNA XOR Rules for Rule 1

[0033] Table 3. DNA Addition Rules of Rule 1

[0034] Step S6: Connect each channel Parallel Fibonacci permutations were performed to obtain Each channel DNA-CA fusion diffusion was performed to obtain The specific steps are as follows: Step S61, will Obtained by performing Fibonacci permutation ; The Fibonacci permutation is a matrix-based permutation algorithm for a matrix of size . The Fibonacci permutation of the image is defined as: ; in, and These are the pixel positions in the original image and its replacement image, respectively.

[0035] Step S62, will Each sub-block The DNA-CA fusion diffusion is performed in parallel. The diffusion rule of the cellular automata is determined by the sum of the elements in each sub-block. The diffusion rule formula is as follows: ; in, for The Numbering of the cellular automaton diffusion rules for each sub-block for The sum of all mapped DNA codes in the dataset; bin() is a binary function. Let k be a variable with a state of 0 or 1, where k is an integer; like Figure 2As shown, the two most common neighborhood types are von Neumann neighborhood and Moore neighborhood. In this embodiment, the cellular automaton uses Moore neighborhood, where each cell has two states, 0 or 1, and the local rule for a neighborhood radius of 1 is as follows: ; in, f It is a Boolean function. It is a unit At time step The state.

[0036] Step S63: Using random sequences from each channel Taken from To judge The methods of fusion and diffusion are as follows: if The equation equals 0, and the fusion diffusion formula is as follows: ; if Not equal to 0, the fusion diffusion formula is as follows: ; in, For the first i The fusion diffusion formula judgment value of each sub-block, It is a unit At time step state, For XOR operation; Step S64: Using random sequences from each channel Taken from To judge The DNA coding rules used during the update Each sub-block After diffusion is complete, the following is obtained: and .

[0037] Step S7: Connect each channel and Dynamic DNA computation was performed to obtain ; Each channel and Dynamic DNA computation was performed to obtain The specific steps are as follows: Step S71: From the random sequence of each channel Winning The length is used to select the DNA operation type for each pair of pixel values; if... An equality of 0 indicates that a DNA XOR operation was performed on the pixel value. A value not equal to 0 indicates that a DNA addition operation is being performed on the pixel value. Step S72: Obtain the random sequence for each channel. In The length is used to select the DNA operation rules for each pair of pixel values; Step S73, will and DNA operations are performed in parallel on each pair of pixel values. After the operations on each pair of pixel values ​​are completed, the result is obtained. .

[0038] Step S8: Connect each channel Perform Zigzag scan transformation to obtain Specifically: for each sub-block Zigzag permutation was performed to obtain and sub-blocks ; The Zigzag replacement process is as follows: Figure 3 As shown, the zigzag scan starts from the top left corner and traverses the matrix elements in a zigzag pattern. The scanned elements are stored as vectors in order, and these vectors are then converted into matrices. Through this process, the positions of the matrix elements are rearranged.

[0039] Step S9: Connect each channel DNA decoding operation is performed to obtain Then each channel The final encrypted image is obtained by merging the two images. .

[0040] Each channel DNA decoding operation is performed to obtain Then each channel The final encrypted image is obtained by merging the two images. The specific steps are as follows: Step S91, take In Length DNA decoding rule selection for each pixel; Step S92: For each channel Each pixel is DNA-decoded, and after decoding, the result will be... Each channel The final encrypted image is obtained by merging the two images. .

[0041] Finally, the image encryption method is symmetric. The hash value is used as a seed for the one-time pad and transmitted to the receiver through a secure channel. With the correct decryption key, which is the same as the encryption key, the operations are performed in reverse order of the encryption process to obtain the plaintext image. The specific steps are as follows: Step S101: Separate the ciphertext image to obtain the corresponding three channels; Step S102: Each channel sequentially performs inverse DNA decoding, inverse Zigzag permutation, inverse pixel-level DNA operation, inverse Fibonacci permutation, inverse DNA encoding, and image size restoration according to its own chaotic sequence. Then, the channels are merged and inverse Hénon-Sine transform is performed to obtain the original plaintext image.

[0042] The invention will be further illustrated below through specific implementation examples.

[0043] S1. Obtain the original RGB color image of a certain region. The sum of the pixel values ​​is 434636624. This sum is then input into a SHA-512 hash to obtain a 128-bit hexadecimal hash value. In this example, the 128-bit hexadecimal hash value is: '694ec077a6f43d4db84edd9f1a166e64ef425bb27e8277d7f5427f2bb4f3ec79 d637393578c0cb3f1a0e4445de48084329ef42511d16e863c1ba899da78b8b9b'; S2. Convert the 128-bit hexadecimal hash value to a 512-bit binary hash value. The first 6 characters and the last 6 characters are deleted respectively, leaving a hash value of 500 characters. Divided into 10 equal parts of 50 digits each: ; Next, It is converted into the following set with 10 decimal elements.

[0044] ; in, This function converts binary numbers to their corresponding decimal numbers. Then, it converts these decimal numbers to an appropriate range of values, generating initial parameters. , , , , , , , , and .

[0045] by For example, the formula is as follows: ; Among them, the index and constant Each parameter can be adjusted according to its appropriate value range. In this example... , , and of Set to 18 uniformly. The values ​​were set to 0.26591, 0.69523, 37.85733, and 17.34626. , , , , of Set to 16 uniformly. , and of Set the value to 0.

[0046] S3, will , , and Substitute into the Hénon-Sine two-dimensional chaotic system and iterate. Next, to eliminate transient effects, the first 1000 elements in the random sequence are discarded. Then, the resulting random sequence... and Normalization is performed to obtain and The original RGB color images are processed according to the following formulas respectively. Pixel position permutation and channel permutation: ; ; in, The length is , will sequence Sort by size, and use the sorted index as the index. Each group of pixel values ​​generates a new order, and the output is obtained. . It is a two-dimensional array with size . , Array the pixel values ​​of each channel into a sequence Arrange the images internally according to their size order, and output the overall permutation image. .

[0047] S4. Replace the entire image. The channels were separated to obtain ,Bundle The data is transmitted to the GPU for subsequent parallel encryption processing, and the initial value is... and Input into 1D-JSMPM ( ), iteration Next. Among them, due to It is a multiple of 16, so in this example... =0. To eliminate transient effects, the first 1000 elements in the random sequence will be discarded.

[0048] The random sequence obtained from each channel is divided into 3 sequences. , , The sizes are respectively , and ; random sequence Each element is normalized to a decimal integer between 0 and 255, and the random sequence is... Each element is normalized to a decimal integer between 0 and 1, and the random sequence is... Each element is normalized to a decimal integer between 0 and 8.

[0049] S5, Connect each channel Parallel generation of CA initial matrix and DNA coding matrix and The steps include: From the random sequence of each channel Pick Come on The dimensions are padded to multiples of 16, as in this example... =0, so this step can be skipped; Random sequences of each channel Pick Convert to Decimal matrices of the same size ; Each channel and Each pixel value is converted from a decimal integer to an 8-bit binary number, and then divided into groups of two bits to obtain a binary matrix. and ; Use random sequences from each channel The front of the middle Come to and Perform dynamic DNA encoding in pairs of 2 bits to generate a size of DNA coding matrix and ; In this embodiment, to facilitate calculations in subsequent steps, DNA codes are mapped to corresponding integers: A is mapped to 0, C to 1, G to 2, and T to 3.

[0050] S6, Connect each channel Parallel Fibonacci permutations were performed to obtain Each channel DNA-CA fusion diffusion was performed to obtain The steps include: Will Obtained by performing Fibonacci permutation : ; in, and They are Before and after the substitution The pixel position in the image.

[0051] Will according to Size division of sub-blocks ( ), each sub-block The DNA-CA fusion diffusion is performed in parallel. The diffusion rule of the cellular automata is determined by the sum of the elements in each sub-block. The diffusion rule formula is as follows: ; in, yes The The rule number for sub-block transformation. express The sum of all mapped DNA codes. Then, Convert to binary form to obtain These values ​​determine which cells contribute to the state update of the center cell.

[0052] For example Converting this to binary gives 1110110011, therefore: ; in The adjacent pixels in a direction contribute to updating the pixel value of the current pixel. This means that the value of the current pixel is used in another calculation to increase non-linearity.

[0053] Random sequences from each channel Winning This value is used to determine The choice between formula (1) and formula (2) for DNA-CA fusion diffusion is determined. Each value corresponds to a sub-block's calculation formula selection. If the current value is 0, formula (1) is used; otherwise, formula (2) is used. (1); (2); in, It is a unit At time step The state, that is, the state in the sub-block The DNA-encoded pixel value at the current step. That is, in the sub-block The DNA-encoded pixel value is updated after the location is calculated using a formula.

[0054] S7, will and DNA operations are performed in parallel on each pair of pixel values. From a random binary sequence... Winning The length selects one of two DNA operation types for each pair of pixel values: 0 indicates a DNA XOR operation, and the other indicates a DNA addition operation. In The length is used to select from eight DNA operation rules for each pair of pixel values. After the operation of each pair of pixel values ​​is completed, the result is... .

[0055] S8, Connect each channel Perform Zigzag scan transformation to obtain .

[0056] S9, Take In Length values Each pixel in the image is processed using one of eight DNA decoding rules. After decoding, a result of size [size missing] will be obtained. binary matrix , each channel matrix Convert to a decimal matrix, merge the results, and send them back to the CPU to obtain the final encrypted image. .

[0057] The image encryption method is symmetric. The hash value is used as a seed for the one-time pad and transmitted to the receiver through a secure channel. With the correct decryption key (the same as the encryption key), the decryption process is performed in reverse order to obtain the plaintext image. The specific steps are as follows: S201. Obtain the same initial parameters using the same hash value. , , , , , , , , and , set the initial value and Input into 1D-JSMPM ( ), iteration Next; among them, due to It is a multiple of 16, so in this embodiment =0. To eliminate transient effects, the first 1000 elements in the random sequence will be discarded; The random sequence obtained from each channel is divided into 3 sequences. , , The sizes are respectively , and ; random sequence Each element is normalized to a decimal integer between 0 and 255, and the random sequence is... Each element is normalized to a decimal integer between 0 and 1, and the random sequence is... Each element is normalized to a decimal integer between 0 and 8; S202, random sequence of each channel Pick Generate a decimal matrix ; to each channel Each pixel value is converted from a decimal integer to an 8-bit binary number, and then divided into groups of two bits to obtain a binary matrix. ; Use random sequences from each channel In Come to Perform dynamic DNA encoding in pairs of 2 bits to generate a size of DNA coding matrix ; In this embodiment, DNA encoding is mapped to corresponding integers: A is mapped to 0, C to 1, G to 2, and T to 3. S203, will according to Size division of sub-blocks ( ), each sub-block Parallel DNA-CA fusion diffusion was performed to obtain Random sequences from each channel Winning This value is used to determine The DNA-CA fusion diffusion is performed using either formula (1) or formula (2). Each value corresponds to the selection of the calculation formula for a sub-block. If the current value is equal to 0, formula (1) is used for calculation; otherwise, formula (2) is used.

[0058] S204, the size is Encrypted images The channels are separated to obtain a size of The decimal matrices for each channel are converted to binary values ​​to obtain a matrix of size . binary matrix .

[0059] S205, Take The last one The length value serves as the inverse DNA decoding rule for... Each pair of binary numbers is reverse-DNA decoded, and Become the size Inverse DNA decoding matrix .

[0060] S206, Connect each channel Perform inverse Zigzag scan transform to obtain .

[0061] S207, will and Each pair of pixel values ​​undergoes inverse DNA computation in parallel. This is derived from a random binary sequence. Winning The length selects one of two DNA operation types for each pair of pixel values: 0 indicates a DNA XOR operation, and the other indicates a DNA addition operation. In The length is used to select from eight DNA operation rules for each pair of pixel values. After the operation of each pair of pixel values ​​is completed, the result is... .

[0062] S208, Connect each channel Parallel inverse Fibonacci permutation is obtained : ; in, and They are Before and after the substitution The pixel position.

[0063] S209, Use random sequences from each channel In Come to Perform dynamic reverse DNA encoding to generate a size of binary matrix ; S210, from the random sequences of each channel Pick ,from Subtract from the value to make the size a multiple of 16. get Because in this embodiment =0, so this step can be skipped; S211, Connect each channel Merging yields the overall permutation image. ,Will , , and Substitute into the Hénon-Sine two-dimensional chaotic system and iterate. Next, to eliminate transient effects, the first 1000 elements in the random sequence are discarded. Then, the resulting random sequence... and Normalization is performed to obtain and The images are replaced using the following formulas respectively. Inverse pixel position permutation and inverse channel permutation: ; ; in, The length is , will sequence Sort by size, and use the sorted index as the index. Each group of pixel values ​​generates a new order, and the output is obtained. . It is a two-dimensional array with size . , Array the pixel values ​​of each channel into a sequence Arrange the images internally according to their size order, and output the overall permutation image. ,Will Perform the inverse Hénon-Sine substitution: ; ; in, What I got was The reverse sequence of numbers, What I got was The reverse sequence of numbers will be used to divide each channel. After performing a global inverse Hénon-Sine permutation, channel merging is performed to obtain the final decrypted image. .

[0064] The encryption results of this embodiment will now be verified.

[0065] 1. Analysis of encryption results.

[0066] like Figures 4-5 As shown, no meaningful information can be discerned from the encrypted image, making it difficult for potential attackers to identify or exploit the encrypted image, thus mitigating the risk of private information being leaked. Therefore, the image encryption and decryption method proposed in this invention is feasible and effective.

[0067] 2. Key space analysis.

[0068] The sensitivity of each key was examined, and the test results are presented in Table 4. As can be seen from Table 4, the scheme exhibits high key sensitivity; unless an attacker possesses the exact same key, even minor key deviations make it difficult to successfully decrypt the encrypted image. The key space of the image encryption / decryption method proposed in this invention reaches approximately... greatly exceeded The minimum limitations. Therefore, the image encryption and decryption method proposed in this invention has significant advantages and can resist direct attacks.

[0069] Table 4. Key sensitivity and key space of the algorithm proposed in this invention.

[0070] 3. Histogram analysis.

[0071] The algorithm in this invention uses multiple rounds of scrambling and diffusion operations to ensure a uniform distribution of pixel values ​​between 0 and 255. For example... Figure 6 As shown, although the histogram distribution of the original test image is highly uneven, the histogram of its associated ciphertext image is flat and uniform. Experimental results demonstrate that the image encryption / decryption method proposed in this invention can effectively resist common statistical attacks.

[0072] 4. Pixel correlation analysis.

[0073] To verify whether the image encryption / decryption method proposed in this invention has the ability to weaken the correlation coefficient between adjacent pixels, this application randomly sampled 3000 pairs of adjacent image pixels along the horizontal, vertical, and diagonal directions from the plaintext and ciphertext images, respectively, and the correlation coefficients were... It can be represented as: ; in, , .

[0074] like Figure 7 As shown in Table 5, the image encryption and decryption method proposed in this invention effectively weakens the correlation coefficient between adjacent image pixels through multiple rounds of scrambling and diffusion operations. The correlation coefficient between adjacent pixels in the ciphertext image is reduced by two orders of magnitude. Therefore, it is very difficult for eavesdroppers to extract any valuable information from the ciphertext image generated by the proposed image encryption and decryption scheme through statistical attacks.

[0075] Table 5. Correlation analysis of adjacent pixels in the test encrypted image

[0076] 5. Information entropy analysis.

[0077] Table 6 provides the information entropy values ​​of the ciphertext images obtained using the image encryption / decryption method proposed in this invention, which are very close to the theoretical value of 8 bits. Therefore, as can be seen from Table 6, the image encryption / decryption method proposed in this invention can significantly enhance the randomness of the ciphertext image, serving as a method to resist information entropy analysis attacks.

[0078] Table 6 Information Entropy Values ​​(bits)

[0079] 6. Differential attack analysis.

[0080] Differential attacks involve introducing small changes into a normal image, then comparing the encrypted image before and after the modification, and finally calculating the key through data analysis. The two most commonly used metrics to evaluate the resistance of image encryption algorithms to differential attacks are the pixel change rate (NPCR) and uniform average change intensity (UACI) values.

[0081] The NPCR / UACI values ​​of the plaintext images selected for testing in this invention are recorded in Table 7. They are close to their respective ideal values, namely 99.6094% and 33.4635%, indicating that the encrypted images are highly sensitive to pixel changes in the plaintext. Therefore, the image encryption and decryption method proposed in this invention can largely resist powerful differential attacks.

[0082] Table 7. NPCR / UACI values ​​of encrypted images

[0083] 7. Pruning attack.

[0084] To evaluate the algorithm's performance when some data is lost, the image encryption / decryption algorithm proposed in this invention simulates a cutting attack by partially zeroing out the ciphertext image. Figure 8 The image shows the decryption results after some data was removed. Figure 8 It is known that the quality of the decrypted image is directly proportional to the amount of remaining data; the key is that even if a large amount of data is lost in the ciphertext, the decryption process will not completely fail; on the contrary, it successfully recovers the image from the complete data portion, which shows the strong resilience of the image encryption and decryption algorithm proposed in this invention against occlusion or data cropping attacks.

[0085] 8. Choose plaintext attack.

[0086] like Figure 9 As shown, both specific images can be successfully protected, and the noise in the associated ciphertext is random. Therefore, the image encryption / decryption algorithm proposed in this invention has good robustness against chosen-plaintext attacks.

[0087] 9. Encryption time test.

[0088] The hardware environment used for image encryption speed testing in this paper was a 2.3GHz CPU, 8GB of RAM, and a GTX 1050ti graphics card. Table 8 shows the encryption time of the proposed image encryption algorithm for the test images. As can be seen from Table 8, the proposed image encryption algorithm consumes relatively little time for encryption. Therefore, the proposed image encryption algorithm possesses excellent encryption speed.

[0089] Table 8. Test Image Encryption Time

[0090] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.

[0091] Therefore, this invention provides a parallel RGB color image encryption method based on DNA and CA fusion diffusion. By fusing DNA encoding with two-dimensional CA and combining it with dynamic rules of chaotic systems, the encryption security is enhanced. At the same time, it has excellent adaptability and robustness, and can effectively resist various attacks, providing reliable security for RGB color images in fields such as intelligent transportation.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A parallel RGB color image encryption method based on DNA and CA fusion diffusion, characterized in that, The specific steps are as follows: Step S1: Obtain the sum of pixel values ​​of the original RGB color image, and input the sum of pixel values ​​into the secure hash algorithm SHA-512 to obtain a 512-bit hash value. ; Step S2: Based on the hash value Generate initial and parameter values ​​for the two-dimensional chaotic system Hénon-Sine and the 1D-JSMPM chaotic system; Step S3: Random sequences generated based on the two-dimensional chaotic system Hénon-Sine. and For the original RGB color image Perform a global displacement to obtain a global displacement image. ; Step S4: Replace the entire image The channels were separated to obtain According to the hash value Generate a random sequence for the 1D-JSMPM chaotic system, and assign each channel The obtained random sequence is divided into , , ;in For the first i One channel, , , It is a random sequence; Step S5: Connect each channel Parallel generation of initial matrix CA and DNA coding matrix and ;in, Let be the intermediate quantity matrix formed by the i-th channel in the second encryption step. This is the intermediate matrix formed by the decimal matrix of the i-th channel in the second encryption step; Step S6: Connect each channel Parallel Fibonacci permutations were performed to obtain Each channel DNA-CA fusion diffusion was performed to obtain ;in, Let be the intermediate quantity matrix formed by the i-th channel in the third encryption step. This is the intermediate matrix formed by the decimal matrix of the i-th channel in the third encryption step; Step S7: Connect each channel and Dynamic DNA computation was performed to obtain ;in, This is the intermediate matrix formed by the i-th channel in the fourth encryption step; Step S8: Connect each channel Perform Zigzag scan transformation to obtain Specifically: for each sub-block Zigzag permutation was performed to obtain and sub-blocks ;in, This is the intermediate matrix formed by the i-th channel in the fifth encryption step; Step S9: Connect each channel DNA decoding operation is performed to obtain Then each channel The final encrypted image is obtained by merging the two images. ;in, This is the intermediate matrix formed by the i-th channel in the sixth encryption step.

2. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 1, characterized in that, In step S1, the size is obtained as follows: Original RGB color image For the original RGB color image The pixel values ​​of each color channel are summed one by one; where, For the number of channels, The length of the image. The height of the image.

3. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 2, characterized in that, In step S2, based on the hash value The specific steps for generating the initial and parameter values ​​of the two-dimensional chaotic system Hénon-Sine and the 1D-JSMPM chaotic system are as follows: hash value The first 6 characters and the last 6 characters are removed, leaving a 500-character hash value. Divide into 10 equal parts of 50 digits each; Will Convert to a set with 10 decimal elements. ; Will Each element in the array is normalized to the range of 0-1 to generate initial parameters. , , , , , , , , and ;in, , The initial values ​​for the Henon-sine two-dimensional chaotic system are... , For the parameters of the Henon-sine two-dimensional chaotic system, , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the first channel. , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the second channel, respectively. , These are the initial values ​​and parameters of the 1D-JSMPM chaotic system in the third channel, respectively.

4. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 3, characterized in that, In step S3, based on the random sequence of the two-dimensional chaotic system Hénon-Sine... and For the original RGB color image Perform a global displacement to obtain the global displacement image. The specific steps are as follows: Initial value and system parameters The input is given to the Hénon-Sine two-dimensional chaotic system and iterated. Secondly, in order to eliminate transient effects, random sequences and The first 1000 elements in the sequence will be discarded; then, the resulting random sequence will be... and Normalization is performed to obtain and and perform original RGB color image processing. The formulas for pixel position permutation and channel permutation are as follows: ; ; in, For sorting functions, The original image without scrambling. This is the second step of pixel pair scrambling, following the first step of overall scrambling of the image's pixel pair arrangement. The image E is after two-step scrambling.

5. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 4, characterized in that, In step S4, the specific steps are as follows: Step S41: The image after replacement Perform 3-channel separation, separating each channel initial value and Input into 1D-JSMPM, Iteration Next; to eliminate transient effects, the first 1000 elements in the generated random sequence are discarded; where suit_num represents the image of each channel. The padding values, where num_block represents the image for each channel. The number of sub-blocks; Step S42: Divide the random sequence obtained from each channel into 3 sequences. , , The sizes are respectively , and ; Step S43: The random sequence Each element is normalized to a decimal integer between 0 and 255, and the random sequence is... Each element is normalized to a decimal integer between 0 and 1, and the random sequence is... Each element is normalized to a decimal integer between 0 and 8.

6. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 5, characterized in that, In step S5, the specific steps are as follows: Step S51: From the random sequence of each channel Winning ,Will The dimensions are padded to multiples of 16; Step S52: From the random sequence of each channel Winning , convert to Decimal matrices of the same size ;in, Let be the decimal matrix of the i-th channel; Step S53: Connect each channel and Each pixel value is converted from a decimal integer to an 8-bit binary number, and then divided into groups of two bits to obtain a binary matrix. and ; Step S54: Use random sequences from each channel The front of the middle Come to and Perform dynamic DNA encoding to generate a size of DNA coding matrix and .

7. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 6, characterized in that, In step S6, each channel Parallel Fibonacci permutations were performed to obtain Each channel DNA-CA fusion diffusion was performed to obtain The specific steps are as follows: Step S61, will Obtained by performing Fibonacci permutation ; Step S62, will Each sub-block The DNA-CA fusion diffusion is performed in parallel. The diffusion rule of the cellular automata is determined by the sum of the elements in each sub-block. The diffusion rule formula is as follows: ; in, for The Numbering of the cellular automaton diffusion rules for each sub-block for The sum of all mapped DNA codes in the dataset; bin() is a binary function. Let k be a variable with a state of 0 or 1, where k is an integer; Step S63: Using random sequences from each channel Taken from To judge The methods of fusion and diffusion are as follows: if The equation equals 0, and the fusion diffusion formula is as follows: ; if Not equal to 0, the fusion diffusion formula is as follows: ; in, The fusion diffusion formula determination value for the i-th sub-block. It is a unit At time step state, For XOR operation; Step S64: Using random sequences from each channel Taken from To judge The DNA encoding rules used during the update Each sub-block After diffusion is complete, the following is obtained: and .

8. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 7, characterized in that, In step S7, each channel and Dynamic DNA computation was performed to obtain The specific steps are as follows: Step S71: From the random sequence of each channel Winning The length is used to select the DNA operation type for each pair of pixel values; if... An equality of 0 indicates that a DNA XOR operation was performed on the pixel value. A value not equal to 0 indicates that a DNA addition operation is being performed on the pixel value. Step S72: Obtain the random sequence for each channel. In The length is used to select the DNA operation rules for each pair of pixel values; Step S73, will and DNA operations are performed in parallel on each pair of pixel values. After the operations on each pair of pixel values ​​are completed, the result is obtained. .

9. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 8, characterized in that, In step S9, each channel DNA decoding operation is performed to obtain Then each channel The final encrypted image is obtained by merging the two images. The specific steps are as follows: Step S91, take In Length DNA decoding rule selection for each pixel; Step S92: For each channel Each pixel is DNA-decoded, and after decoding, the result will be... Each channel The final encrypted image is obtained by merging the two images. .

10. The parallel RGB color image encryption method based on DNA and CA fusion diffusion according to claim 1, characterized in that, The image encryption method is symmetric. The hash value is used as a seed for one-time pad encryption and transmitted to the receiver through a secure channel. With the correct decryption key, which is the same as the encryption key, the decryption process is performed in reverse order to obtain the plaintext image. The specific steps are as follows: Step S101: Separate the ciphertext image to obtain the corresponding three channels; Step S102: Each channel sequentially performs inverse DNA decoding, inverse Zigzag permutation, inverse pixel-level DNA operation, inverse Fibonacci permutation, inverse DNA encoding, and image size restoration according to its own chaotic sequence. Then, the channels are merged and inverse Hénon-Sine transform is performed to obtain the original plaintext image.