Image encryption method based on RNA extended encoding and quantum chaos
By employing an image encryption method based on RNA extended coding and quantum chaos, plaintext images are scrambled into blocks and dynamically encoded with RNA. Combined with cross-iterative diffusion, a color ciphertext image is generated, which solves the problem of existing technologies being unable to resist chosen-plaintext attacks and achieves high-security and high-efficiency image encryption.
Patent Information
- Application Number
- CN202511093845.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-08-06
AI Technical Summary
Existing image encryption methods cannot effectively defend against chosen-plaintext attacks and cannot guarantee information security.
An image encryption method based on RNA extended coding and quantum chaos is adopted. The plaintext image is encoded to generate a key, a pseudo-random sequence is calculated using chaotic equations, the image is scrambled into blocks and dynamically encoded with RNA, and cross-iterative diffusion is performed to finally generate a color ciphertext image.
It significantly improves the randomness and dynamics of encryption, enhances the ability to resist various attacks, improves the security and efficiency of the encryption system, and increases the key space.
Smart Images

Figure CN120602598B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information encryption technology, and particularly relates to an image encryption method based on RNA extended coding and quantum chaos. Background Technology
[0002] While providing convenient services to users, internet technology has also sparked deep public concern about privacy breaches during data transmission. With the widespread adoption of the internet, the frequency of information transmission over public networks has increased significantly. Digital images, as a simple and intuitive medium carrying a large amount of visual information, are widely used. However, images are easily damaged and leaked during internet transmission, causing incalculable losses and harm to users. Therefore, the protection of digital images has become a focus of attention, especially in areas requiring high confidentiality such as personal privacy, business, and military applications. Images are characterized by large information content, strong correlation, and high redundancy, making traditional methods used for text encryption, such as AES, DES, and IDEA, unsuitable for digital image encryption. Against this backdrop, the stochastic-like behavior of chaos in deterministic nonlinear systems has attracted considerable attention. Chaotic systems are extremely sensitive to initial conditions, with trajectories drastically different under different initial conditions, thus generating unpredictable chaotic signals. This property gives chaos a natural advantage in cryptography, making it a promising new method for digital image encryption.
[0003] In recent years, the impact of chaotic systems and algorithms on the security of encryption systems has been extensively studied. Pixel-level and bit-level image encryption algorithms based on two chaotic systems have been proposed in existing technologies. Experimental simulations and performance analysis show that these encryption algorithms possess high security. Subsequently, an image encryption method based on 2D-SECM was proposed, which includes bit-level scrambling based on cross-transformation and a single round of fast diffusion processing. Simulation experiments and security assessments show that the proposed method can resist common types of attacks. In addition to the above research, the academic community has also explored the possibility of combining image encryption with bio-coding technology. An image encryption algorithm based on DNA strand exchange and diffusion has been proposed in existing technologies. Experimental results and simulation test data show that this method can effectively resist various statistical and noise attacks. Other related technologies utilize dynamic DNA coding, hyperchaotic systems, and elliptic curve cryptography for secure encryption and decryption schemes. Results and analysis show that these schemes are computationally efficient and highly robust. Another encryption scheme for an industrial IoT image security model based on chaos and DNA cryptography demonstrates that the algorithm can resist various attacks. Despite significant advancements in existing chaotic encryption methods, most current approaches are unable to defend against chosen-plaintext attacks and thus cannot effectively guarantee information security. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes an image encryption method based on RNA extended coding and quantum chaos, thereby resolving the issues present in the existing technologies.
[0005] To achieve the above objectives, this invention provides an image encryption method based on RNA extended coding and quantum chaos, comprising:
[0006] Acquire a plaintext image, encode the plaintext image to obtain initial encoding information, and generate a key based on the initial encoding information;
[0007] A pseudo-random sequence is calculated using chaotic equations based on the key. The pseudo-random sequence is then transformed to obtain the sequence required for encryption.
[0008] A three-dimensional matrix of the plaintext image is obtained. The three-dimensional matrix is decomposed into a first high-bit matrix and a first low-bit matrix. According to the encryption sequence, the first high-bit matrix is scrambled and dynamically encoded with RNA. The first low-bit matrix is XORed according to the encryption sequence. The matrix dynamically encoded with RNA and the matrix obtained by XORing are cross-iteratively diffused and synthesized to obtain a color ciphertext image.
[0009] Optionally, the pixel values in the plaintext image are calculated using the SHA-256 hash function, and the SHA-256 hash function calculation result is converted into a decimal number every 8 bits to obtain the initial encoded information.
[0010] Optionally, the key generation process includes:
[0011] ;
[0012] Where h represents the initial encoding information, and the subscript i represents the initial encoding information corresponding to the i-th pixel. Represents the XOR operation, key label , , , , and Give the key an initial value. , , , and It is the key of the quantum logistic mapping system, where, , , This represents the system state value of the corresponding quantum logistic mapping system. It is an adjustable parameter. This represents the dissipation parameter.
[0013] Optionally, the process of generating the sequence required for encryption includes:
[0014] ;
[0015] Among them, S y Let y be a pseudo-random sequence. This represents the sequence required for the y-th encryption, with sequence index y=[1,2,...,8]. This represents the floor function. This represents the modulo operation function.
[0016] Optionally, the process of decomposing a three-dimensional matrix includes:
[0017] Each pixel value in the 3D matrix is represented by an 8-bit binary number. The first 4 bits of all pixel values are extracted, and the extracted result is decomposed into a bit-level matrix to generate the first high-bit matrix. The last 4 bits of all pixel values are extracted to generate the first low-bit matrix.
[0018] Optionally, the process of scrambling the first high-bit matrix in blocks includes:
[0019] The first high-bit matrix is divided into fixed-size blocks to obtain sub-matrices. The sub-matrices are then sequentially rearranged into a row to obtain a sub-matrix sequence. The sub-matrix sequence is permuted according to a first sequence. The sub-matrix is then rearranged according to the permuted sequence to obtain a rearranged first high-bit matrix. The rearranged first high-bit matrix is then rotated according to a second sequence, wherein the information in the second sequence points to different rotation directions and a fixed number of rotation degrees to obtain a second high-bit matrix. The second high-bit matrix is then inverted according to a third sequence to obtain a third high-bit matrix, which is the block-scrambled matrix.
[0020] The first sequence, the second sequence, and the third sequence are respectively the sequence required for the first encryption, the sequence required for the second encryption, and the sequence required for the third encryption.
[0021] Optionally, the process of dynamic RNA coding includes:
[0022] For the scrambled matrix, each element is synthesized into an octal number by combining every 3 binary numbers from top to bottom. An encoding rule is selected based on the first half of the fifth sequence. Each octal number is encoded according to the selected encoding rule to obtain the fourth high-bit matrix. The encoding rule includes the correspondence between octal numbers and RNA bases under different rules. Each octal number under each rule corresponds to only one type of base, and the bases are also complementary when the octal numbers are complementary.
[0023] The sixth sequence is reassembled into a two-dimensional matrix with the same dimensions as the plaintext image. The reassembled sixth sequence is then encoded according to the selected encoding rule to obtain the third sub-matrix.
[0024] The operation method is selected according to the fourth sequence, wherein the operation method includes addition, subtraction and XOR; the fourth high-bit matrix and the third sub-matrix are iteratively diffused according to the selected operation method to obtain the fifth high-bit matrix;
[0025] In the iterative diffusion process, the first layer matrix of the fourth high-bit matrix and the third sub-matrix are operated on using a selected operation method to obtain the first layer matrix of the fifth high-bit matrix. Then, the (k-1)th layer matrix of the fifth high-bit matrix and the kth layer matrix of the fourth high-bit matrix are operated on using a selected operation method to obtain the kth layer matrix of the fifth high-bit matrix.
[0026] According to the selected encoding rule, obtain the pixel value of the last pixel in each row of the fifth high-bit matrix. Based on the pixel value of the last pixel in each row, shift the pixels in the next row. For the shifted matrix, shift the last pixel and the right pixel of each row of the fifth high-bit matrix to the leftmost side of the same row to form a regular matrix, and obtain the sixth high-bit matrix.
[0027] Based on the latter half of the fifth sequence, a new encoding rule is selected. The sixth high-bit matrix is then decoded according to the selected encoding rule. The decoded sixth high-bit matrix is then combined into a pixel value by combining every 4 bits from top to bottom to obtain the seventh high-bit matrix, which is the matrix after dynamic RNA encoding.
[0028] The fourth, fifth, and sixth sequences are respectively the sequences required for the fourth, fifth, and sixth encryption operations.
[0029] Optionally, the process of acquiring the color encrypted image includes:
[0030] The matrix after dynamic encoding of the RNA and the first low-bit matrix are recombined to obtain a high-bit recombination vector and a low-bit recombination vector. The seventh sequence is XORed with the low-bit recombination vector.
[0031] Based on the eighth sequence, the matrix obtained by XOR calculation and the high-bit recombination vector are added and moduloed respectively. The pixel values of the results of the addition and modulo operation are then combined to obtain a color ciphertext image.
[0032] Optionally, after obtaining the color encrypted image, the process may also include:
[0033] Transmit and obtain the key, segment the color ciphertext image by pixel value, perform reverse iterative diffusion on the segmented matrix, obtain the encryption sequence according to the key, and perform the reverse operation of the encryption process according to the encryption sequence to obtain the plaintext image.
[0034] On the other hand, the present invention also provides an image encryption system based on RNA extended coding and quantum chaos for performing the above-described method.
[0035] Compared with the prior art, the present invention has the following advantages and technical effects:
[0036] (1) This invention introduces a novel RNA extended coding mechanism with 384 coding rules, far exceeding the 8 rules of traditional methods, which significantly improves the randomness and dynamic characteristics of encryption and effectively enhances the algorithm's ability to resist various attacks.
[0037] (2) The present invention adopts bit plane processing based on information weight to perform differentiated encryption of the high 4 bits and low 4 bits plane, effectively balancing the security and efficiency performance of the encryption method.
[0038] (3) The encryption key is obtained by generating feature values associated with plaintext through a hash function, thereby generating the corresponding encryption sequence. Furthermore, cross-iterative diffusion is performed during the encryption process to improve the encryption system's ability to resist plaintext attacks.
[0039] (4) The quantum Logistic mapping used in this invention not only improves the non-periodicity and randomness, but also has more initial values and control parameters, and has a larger key space. Attached Figure Description
[0040] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0041] Figure 1 This is a flowchart of an image encryption method based on RNA extended coding and quantum chaos according to an embodiment of the present invention;
[0042] Figure 2 This is a schematic diagram of the block replacement process according to an embodiment of the present invention;
[0043] Figure 3 This is a schematic diagram of the block rotation process according to an embodiment of the present invention;
[0044] Figure 4 This is a flowchart illustrating the RNA extension dynamic coding encryption method in an embodiment of the present invention. Detailed Implementation
[0045] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0046] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0047] This invention proposes a novel digital color image encryption method based on RNA extended dynamic coding and quantum chaos. This method significantly improves the encryption system's resistance to cryptographic attacks by introducing more complex RNA coding rules. First, the plaintext image is decomposed into a bit-plane, resulting in two parts: a high 4-bit plane and a low 4-bit plane, weighted according to different information content. Then, the high 4-bit plane is scrambled in blocks, and RNA extended coding rules are applied to obfuscate the scrambled plane. Simultaneously, a lightweight XOR operation is used on the low 4-bit plane to improve encryption efficiency. Finally, the processed high and low 4-bit planes are cross-iteratively diffused and synthesized to obtain the final color ciphertext image. Simulation experiments and security analysis results show that the encryption algorithm has excellent numerical statistical results, and according to cryptanalysis criteria, it can effectively resist known-plaintext attacks and chosen-plaintext attacks. Therefore, the encryption algorithm proposed in this invention is a preferred digital image privacy protection technology with broad application prospects in next-generation network multimedia secure communication.
[0048] This invention proposes a digital image encryption method based on RNA extended dynamic coding. First, the color plaintext image is decomposed into bit planes according to information weights, resulting in a high 4-bit plane and a low 4-bit plane. Next, a hash function is used to generate a key associated with the plaintext image, which is then used as input to a chaotic system to obtain a chaotic sequence. This sequence is then used to scramble and dynamically encode the high 4-bit plane using RNA. Then, a lightweight XOR operation is performed on the low 4-bit plane using the chaotic sequence. Finally, the high and low 4-bit planes are cross-iteratively diffused and synthesized to obtain the color ciphertext image.
[0049] The above technical solution is described in detail:
[0050] This invention relates to quantum logistic mapping and RNA expansion coding rules and algorithms, as follows:
[0051] Quantum logistic mapping:
[0052] Chaotic systems, due to their high sensitivity and randomness, are often used in image processing. One-dimensional chaotic systems, due to their simple structure, generate trajectories that are easily predictable. The traditional Logistic chaotic mapping formula is shown below:
[0053]
[0054] Among them, control parameters System status values .
[0055] A classical Logistic chaotic system is quantified using a recoil rotor model, generating a corresponding quantum Logistic mapping. This chaotic mapping incorporates control parameters and a fixed, non-vanishing correction variable at the end, enhancing its non-periodicity and randomness. The expression for this chaotic mapping is:
[0056]
[0057] in, It is an adjustable parameter. It is a dissipation parameter. , , It is a system status value; , They are , The complex conjugate of . When the system parameter takes the value of , State value , , At that time, the system was in a chaotic state.
[0058] RNA expansion dynamic coding:
[0059] RNA is a long, chain-like molecule formed by the condensation of ribonucleotides via phosphodiester bonds. A ribonucleotide molecule consists of a phosphate group, a sugar molecule, and a base. In RNA, there are four types of bases: A (adenine), G (guanine), C (cytosine), and U (uracil), with AU and CG as complementary base pairs. To improve the randomness of encryption, four new bases—M, N, S, and W—are added to the existing bases. These new bases follow specific pairing rules: M pairs with W, and S pairs with N. Furthermore, in binary, 0 and 1 are complementary, so 000-111, 001-110, 010-101, and 011-100 are also complementary. Encoding numbers using base pairs results in a total of 384 encoding rules, as shown in Table 1, thus greatly improving the randomness of matching. The aforementioned encoding rules are formed by permuting and combining complementary base pairs and binary complementary bases. For binary numbers, there are 384 possible base permutations. Each base permutation of the binary number is assigned a rule number for subsequent RNA encoding. During image encryption and decryption, the rule number and the relationship between the corresponding binary number and the bases remain fixed and do not change. Base operations are implemented using addition, subtraction, or XOR tables, as shown in Tables 2, 3, and 4, respectively. For each of these different operation methods, a number is assigned, and the corresponding operation method is selected by choosing the corresponding number. Table 1 shows the RNA expansion encoding rules, Table 2 shows the RNA expansion addition operation, Table 3 shows the RNA expansion subtraction operation, and Table 4 shows the RNA expansion XOR operation.
[0060] Table 1
[0061] rule 1 2 3 4 5 6 7 8 …… 384 000 A A A A U A A A …… U 001 C C C G C C C C …… G 010 M M W M M S S N …… W 011 S N S S S M W M …… N 100 N S N N N W M W …… S 101 W W M W W N N S …… M 110 G G G C G G G G …… C 111 U U U U A U U U …… A
[0062] Table 2
[0063] + A C M S N W G U A U A C M S N W G C A C M S N W G U M C M S N W G U A S M S N W G U A C N S N W G U A C M W N W G U A C M S G W G U A C M S N U G U A C M S N W
[0064] Table 3
[0065] - A C M S N W G U A C M S N W G U A C A C M S N W G U M U A C M S N W G S G U A C M S N W N W G U A C M S N W N W G U A C M S G S N W G U A C M U M S N W G U A C
[0066] Table 4
[0067] ⊕ A C M S N W G U A W N U G C A S M C N W G U A C M S M U G W N S M C A S G U N W M S A C N C A S M W N U G W A C M S N W G U G S M C A U G W N U M S A C G U N W
[0068] The encryption method provided by this invention is described in detail through the following technical solution:
[0069] like Figure 1As shown, the method provided by this invention is based on the following three parts: The first part is key generation. A key associated with the plaintext is generated through a hash function. The second part is the image encryption process. The specific encryption process is divided into two modules: the first module is encryption of the high 4-bit plane after pixel value segmentation, and the second module is cross-iterative diffusion of the high 4-bit plane and the low 4-bit plane of the pixel values. The third part is the image decryption process, which is the inverse operation of the encryption process.
[0070] Part 1: Key Generation
[0071] The plaintext image is obtained and used as the information to be encrypted. The pixel values of the plaintext image are read, and the read data is used as the input to the SHA-256 hash function, which outputs a fixed 256-bit binary number. This 256-bit binary number is then converted into 32 decimal numbers, with each decimal number representing the initial encoded information. ,in The key is generated as follows:
[0072]
[0073] in, Represents the XOR operation, key label , , , , , Given an initial value, , , , , It is the key of the quantum logistic mapping system.
[0074] Part Two: Image Encryption Process
[0075] Taking a three-dimensional matrix P of an image with size M×N×3 as an example, where M represents the image length dimension, N represents the image width dimension, and 3 represents the channel dimension (RGB), the specific encryption process is described as follows.
[0076] Sequence generation and preprocessing:
[0077] key , , , , As input parameters to the chaotic equation (Equation 3), a pseudo-random sequence is generated. , , , , , , , , and then transform the pseudo - random sequence to obtain the sequence required for final encryption. , , , , , , , , and the corresponding sequence lengths are , , , , , , , . The specific operations are as follows:
[0078]
[0079] Among them, S y represents the y - th pseudo - random sequence, represents the y - th sequence required for encryption, and is subsequently characterized as the y - th sequence. Here, y is expressed as a noun in Chinese numeral writing, such as "the first sequence", representing the 1st sequence required for encryption, and the sequence index y = [1, 2,..., 8]. represents the floor function, represents the modulo operation function.
[0080] For high 4 - bit plane encryption:
[0081] Step 1, bit decomposition:
[0082] Represent each pixel value in matrix P with 8 - bit binary numbers, extract the first 4 binary numbers of all pixel values, and then perform bit - level decomposition to form a three - dimensional matrix with dimensions M×N×12, that is, the first high - bit matrix , and extract the last 4 binary numbers to form a three - dimensional matrix with dimensions , that is, the first low - bit matrix .
[0083] Among them, bit decomposition converts the pixel values of decimal numbers between [0, 255] in different channel dimensions into 8 - bit binary numbers. Among them, the first four bits, that is, the high four - bit values, occupy more information and have a higher information weight.
[0084] Step 2, block scrambling:
[0085] For the first high - bit matrix The matrix is divided into blocks, each with a size of 4×4×4. The submatrices are then rearranged in order to form a row, resulting in a sequence of submatrices. ,order Through the first sequence Pair matrix sequence Perform the replacement. The procedure is as follows:
[0086]
[0087] in These are intermediate variables. Next, the submatrix sequences are rearranged sequentially to form the matrix. Taking an 8×8×8 matrix as an example, the specific block permutation flowchart is as follows: Figure 2 As shown. In this scheme, an M×N×3 matrix can be decomposed into an M×N×12 matrix by removing the high 4 bits. Since the size of each submatrix is 4×4×4, there are M×N×12 / (4×4×4) = M×N×3 / 16 submatrices. For ease of demonstration, instead of showing an M×N×12 matrix, an 8×8×8 matrix is used for example. Figure 2 In the given matrix, the size is 8×8×8, so there are a total of 8×8×8 / (4×4×4)=8 submatrices. For example, S1'=[3,7,2,6,5,1,8,4]. When S1'(1)=3, that is, during the first permutation, the first submatrix is transformed with the third submatrix to obtain a new submatrix sequence. When S1'(2)=7, that is, during the second permutation, the second submatrix is transformed with the seventh submatrix, and so on.
[0088] Rotate the submatrix after block permutation, and then use the second sequence. Determine the number of times each submatrix is rotated 90 degrees counterclockwise around the three axes to obtain the second high-bit matrix after rotation. Taking the rotation of a 4×4×4 submatrix as an example, the top, front, and right vertices of the initial submatrix are used as the rotation centers. The specific block rotation flowchart is as follows: Figure 3 As shown.
[0089] Finally, through the third sequence For the second high bit matrix Invert the bits to obtain the inverted third high-bit matrix. The specific inversion operation is as follows:
[0090]
[0091] Among them, pixel index .
[0092] Step 3: RNA expansion dynamically encodes diffusion:
[0093] The third high bit matrix From bottom to top, every three binary digits are combined to form one octal number, according to the fifth sequence. The first half (the first 4MN bits) selects the encoding method, and then each octal number (each pixel) is encoded to obtain a matrix of size M×N×4, which is the fourth high-bit matrix. The sixth sequence is reshaped using the reshape function. Reassembled into a two-dimensional matrix of size M×N, the encoding method of the reassembled sixth sequence matrix is the same as that of the fourth high-bit matrix. The encoding method is the same for corresponding positions in the first layer, and the third sub-matrix is obtained after encoding. Using the fourth sequence Choose from three operations: addition, subtraction, and XOR, and then combine them with the third submatrix. For the fourth high-bit matrix Iterative diffusion is performed, with each octal number (each pixel) having a corresponding operation method, resulting in the fifth high-bit matrix. The specific diffusion operation is as follows:
[0094]
[0095] in, Indicates the number of layers, image length label Image width label , This represents addition, subtraction, or XOR operations; the specific operation method is determined by the fourth sequence. control.
[0096] Step 4, RNA expansion dynamic coding shift:
[0097] For the fifth high-bit matrix According to the fifth sequence The corresponding encoding rule is to right-shift the next row according to the last pixel value of the previous row, and then adjust the fifth high-bit matrix. The last pixel value and the rightmost pixel value of each row are shifted to the leftmost position to form a regular matrix, resulting in the sixth high-bit matrix after shifting. Through the fifth sequence The latter half is encoded using a specific encoding method for decoding, and the sixth high-bit matrix is decoded. From bottom to top, every 4 bits are combined to form a pixel value, resulting in a size of... The three-dimensional matrix, i.e., the seventh high-bit matrix The RNA extended coding encryption flowchart is as follows: Figure 4 As shown. The specific shift operation is as follows:
[0098]
[0099] in, Indicates the number of floors. , Indicates the first The last pixel value of the row, Indicates the first The last pixel value of the row, It is an intermediate variable.
[0100] Cross-iterative diffusion between the high 4-bit plane and the low 4-bit plane:
[0101] The seventh high-bit matrix First low-bit matrix Recombined into a high-bit recombination vector Low-bit recombination vector Using the seventh sequence Recombination vector with low bits XOR yields the vector after XOR calculation. Using the eighth sequence For two vectors (high-bit recombined vector) The vector after XOR calculation The pixel values are then added and moduloed, and finally synthesized to obtain the final encrypted matrix C. The following is the algorithm flow for pixel value cross-iterative diffusion:
[0102] Step 1: Convert the matrix and Convert to length One-dimensional sequence and ;
[0103] Step 2: and XOR results ;
[0104] Step 3: If Perform the following operations:
[0105]
[0106] if Perform the following operations:
[0107]
[0108] Step 4: If Perform the following operations:
[0109]
[0110] if Perform the following operations:
[0111]
[0112] Step 5: and Convert to size 3D matrix and ;
[0113] Step 6: Obtain the ciphertext image C using the following equation:
[0114]
[0115] Where w ranges from 1 to 3MN (the number of elements in the sequence), that is, the w-th element of the sequence is taken for operation, and q ranges from 1 to 3MN (the number of elements in the sequence), that is, the q-th element of the sequence is taken for operation.
[0116] Part Three: Image Decryption
[0117] The decryption process is the inverse operation of the encryption process. Before decrypting the image, the key must be transmitted to the decryption end through a secure channel. In the image encryption stage, the image is first segmented into pixel values, then the high 4-bit plane and the low 4-bit plane are encrypted separately, and finally, they are cross-iteratively diffused and then the pixel values are synthesized. Therefore, in the decryption stage, pixel value segmentation is required first, followed by reverse iterative diffusion of the two segmented matrices, then decryption is performed separately, and finally, the plaintext is synthesized.
[0118] This invention proposes a digital image encryption algorithm based on RNA extended dynamic coding. The algorithm decomposes a color plaintext image into bit planes and applies encryption processes of varying complexity to the high 4-bit and low 4-bit planes based on the weight differences in information content. These processes are then cross-iteratively diffused and finally synthesized to obtain the color ciphertext image. RNA extended dynamic coding is employed for the encryption of the high 4-bit plane, which not only improves encryption efficiency but also significantly enhances the encryption system's resistance to cryptographic attacks. Simultaneously, the cross-iterative diffusion of the high and low 4-bit planes further obfuscates the encrypted information, greatly increasing the difficulty for attackers to crack the encryption. Experimental results show that this encryption scheme not only possesses excellent robustness but also has a large key space sufficient to resist various brute-force attacks. Future research will further explore the application potential of this algorithm in other fields such as video and audio. Furthermore, we will deepen the security analysis of the algorithm's performance and embed the encryption system into practical applications to more comprehensively evaluate its performance in real-world scenarios.
[0119] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An image encryption method based on RNA extended coding and quantum chaos, characterized in that, include: Acquire a plaintext image, encode the plaintext image to obtain initial encoding information, and generate a key based on the initial encoding information; A pseudo-random sequence is calculated using chaotic equations based on the key. The pseudo-random sequence is then transformed to obtain the sequence required for encryption. A three-dimensional matrix of the plaintext image is obtained, and the three-dimensional matrix is decomposed into a first high-bit matrix and a first low-bit matrix. The first high-bit matrix is scrambled and dynamically encoded with RNA according to the encryption sequence. The first low-bit matrix is XORed according to the encryption sequence. The matrix dynamically encoded with RNA and the matrix obtained by XORing are cross-iteratively diffused and synthesized to obtain a color ciphertext image.
2. The method according to claim 1, characterized in that, The pixel values in the plaintext image are calculated using the SHA-256 hash function, and the SHA-256 hash function result is converted into a decimal number in 8-bit increments to obtain the initial encoded information.
3. The method according to claim 1, characterized in that, The key generation process includes: ; in, This represents the initial encoding information, where the subscript j indicates the initial encoding information corresponding to the j-th pixel. , Represents the XOR operation, key label , , , , and Give the key an initial value. , , , and It is the key of the quantum logistic mapping system, where, , , This represents the system state value of the corresponding quantum logistic mapping system. It is an adjustable parameter. This represents the dissipation parameter.
4. The method according to claim 1, characterized in that, The process of generating the sequence required for encryption includes: ; Among them, S y Let y be a pseudo-random sequence. This represents the sequence required for the y-th encryption, with sequence index y=[1,2,...,8]. This represents the floor function. This represents the modulo operation function, where M represents the image length dimension and N represents the image width dimension.
5. The method according to claim 1, characterized in that, The process of decomposing a three-dimensional matrix includes: Each pixel value in the 3D matrix is represented by an 8-bit binary number. The first 4 bits of all pixel values are extracted, and the extracted result is decomposed into a bit-level matrix to generate the first high-bit matrix. The last 4 bits of all pixel values are extracted to generate the first low-bit matrix.
6. The method according to claim 4, characterized in that, The process of scrambling the first high-bit matrix in blocks includes: The first high-bit matrix is divided into fixed-size blocks to obtain sub-matrices. The sub-matrices are then sequentially rearranged into a row to obtain a sub-matrix sequence. The sub-matrix sequence is permuted according to a first sequence. The sub-matrix is then rearranged according to the permuted sequence to obtain a rearranged first high-bit matrix. The rearranged first high-bit matrix is then rotated according to a second sequence, wherein the information in the second sequence points to different rotation directions and a fixed number of rotation degrees to obtain a second high-bit matrix. The second high-bit matrix is then inverted according to a third sequence to obtain a third high-bit matrix, which is the block-scrambled matrix. The first sequence, the second sequence, and the third sequence are respectively the sequence required for the first encryption, the sequence required for the second encryption, and the sequence required for the third encryption.
7. The method according to claim 4, characterized in that, The process of dynamic RNA coding includes: For the scrambled matrix, each element is synthesized into an octal number by combining every 3 binary numbers from top to bottom. An encoding rule is selected based on the first half of the fifth sequence. Each octal number is encoded according to the selected encoding rule to obtain the fourth high-bit matrix. The encoding rule includes the correspondence between octal numbers and RNA bases under different rules. Each octal number under each rule corresponds to only one type of base, and the bases are also complementary when the octal numbers are complementary. The sixth sequence is reassembled into a two-dimensional matrix with the same dimensions as the plaintext image. The reassembled sixth sequence is then encoded according to the selected encoding rule to obtain the third sub-matrix. The operation method is selected according to the fourth sequence, wherein the operation method includes addition, subtraction and XOR; the fourth high-bit matrix and the third sub-matrix are iteratively diffused according to the selected operation method to obtain the fifth high-bit matrix; In the iterative diffusion process, the first layer matrix of the fourth high-bit matrix and the third sub-matrix are operated on using a selected operation method to obtain the first layer matrix of the fifth high-bit matrix. Then, the (k-1)th layer matrix of the fifth high-bit matrix and the kth layer matrix of the fourth high-bit matrix are operated on using a selected operation method to obtain the kth layer matrix of the fifth high-bit matrix. According to the selected encoding rule, obtain the pixel value of the last pixel in each row of the fifth high-bit matrix. Based on the pixel value of the last pixel in each row, shift the pixels in the next row. For the shifted matrix, shift the last pixel and the rightmost pixel in each row of the fifth high-bit matrix to the leftmost side of the same row to form a regular matrix, and obtain the sixth high-bit matrix. Based on the latter half of the fifth sequence, a new encoding rule is selected. The sixth high-bit matrix is then decoded according to the selected encoding rule. The decoded sixth high-bit matrix is then combined into a pixel value by combining every 4 bits from top to bottom to obtain the seventh high-bit matrix, which is the matrix after dynamic RNA encoding. The fourth, fifth, and sixth sequences are respectively the sequences required for the fourth, fifth, and sixth encryption operations.
8. The method according to claim 4, characterized in that, The process of acquiring a color encrypted image includes: The matrix after dynamic encoding of the RNA and the first low-bit matrix are recombined to obtain a high-bit recombination vector and a low-bit recombination vector. The seventh sequence is XORed with the low-bit recombination vector, where the seventh sequence is the 7th encryption sequence. Based on the eighth sequence, the matrix obtained by XOR calculation and the high-bit recombination vector are added and moduloed respectively. The pixel values of the results of the addition and modulo operation are combined to obtain a color ciphertext image, where the eighth sequence is the 8th sequence required for encryption.
9. The method according to claim 1, characterized in that, After obtaining the color encrypted image, the following steps are also included: Transmit and obtain the key, segment the color ciphertext image by pixel value, perform reverse iterative diffusion on the segmented matrix, obtain the encryption sequence according to the key, and perform the reverse operation of the encryption process according to the encryption sequence to obtain the plaintext image.