A color image encryption method based on hyperchaotic system and multi-stage scrambling and diffusion at eight-base DNA level

Through a five-dimensional continuous superchaotic system and a multi-stage mess and diffusion color image encryption method with eight-base DNA-level multi-stage chaos and diffusion, the problem of insufficient security of color image encryption in the prior art is solved, and high security encryption of color images is achieved.

CN119728874BActive Publication Date: 2025-04-29SOUTHWESTERN UNIV OF FINANCE & ECONOMICS +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510206580.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-04-29
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

Existing image encryption algorithms are difficult to effectively resist multiple types of data attacks, especially the encryption security of color images, and traditional methods are poor in the face of multiple attacks.

Method used

The color image encryption method based on five-dimensional continuous superchaotic system and eight-base DNA-level multi-stage chaos and diffusion is adopted. By generating superchaotic sequences, the complexity and security of encryption operations are enhanced by combining dynamic eight-base DNA encoding and decoding.

Benefits of technology

Improves the encryption security of color images, enhances resistance to various types of data attacks, and ensures high security and robustness of ciphertext images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728874B_ABST
    Figure CN119728874B_ABST
Patent Text Reader

Abstract

The present invention discloses a color image encryption method based on a hyperchaotic system and multi-stage scrambling and diffusion at the octabase DNA level, belonging to the technical field of digital image encryption. The method generates a hyperchaotic sequence through a hyperchaotic system, extracts a subsequence and adjusts the numerical range; converts the plaintext color image from the pixel level to the bit level, and then converts it to the octabase DNA level according to the hyperchaotic subsequence and dynamic octabase DNA encoding; performs a global scrambling of the row and column levels on the octabase DNA level data through the sorting index of the hyperchaotic subsequence; based on multiple different hyperchaotic subsequences, uses octabase DNA algebraic operations and cyclic shifts to perform row diffusion, column scrambling, column diffusion and row scrambling in sequence; then uses dynamic octabase DNA decoding to convert back to the bit level, and then converts to the pixel level to obtain the ciphertext image. The present invention improves the security of encrypting color images through octabase DNA calculation and multi-stage scrambling and diffusion operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image encryption, and in particular to a color image encryption method based on a hyperchaotic system and eight-base DNA-level multi-stage scrambling and diffusion. Background Art

[0002] As an important information carrier, images are at risk of being illegally accessed during their continuous generation, storage and transmission. Therefore, protecting image security has always been a hot topic in the field of information security. Image encryption is an effective way to directly protect the security of image content, resist various attacks and avoid data leakage. By encrypting the image, the corresponding ciphertext image presents a noise-like form and does not contain any useful information. Only authorized users with the correct key can decrypt the original image. However, due to the characteristics of large data volume, high redundancy and strong correlation of images, some typical encryption algorithms such as the Data Encryption Standard (DES), the Advanced Encryption Standard (AES) and the International Data Encryption Algorithm (IDEA) are not suitable for image encryption.

[0003] Among them, the inherent randomness, long-term unpredictability, ergodicity and extreme sensitivity to initial values ​​and control parameters of chaotic systems are conducive to image encryption. Therefore, image encryption technology based on chaotic systems has become a focus at this stage, and a large number of research results have been produced. A common indicator for measuring chaotic characteristics of chaotic systems is the Lyapunov index (LE). Each dimension of a chaotic system has a Lyapunov index. When the number of positive Lyapunov exponents is not less than 2, the chaotic system exhibits stronger hyperchaotic characteristics and is called a hyperchaotic system. Scrambling and diffusion are the main operations of image encryption. The former disturbs the pixel position of the image, and the latter modifies the grayscale value of the pixel, and both can also be applied to other data levels. In addition, in addition to being performed at the pixel level, the scrambling and diffusion operations of image encryption can usually be constructed at the bit level and DNA level at lower data levels, converting pixels into 8-bit binary numbers and then splitting them into bit units, or further encoding every two bits into a DNA base. DNA-level encryption operations are based on DNA computing. DNA sequences not only have multiple combinations, but also have super information storage capabilities, ultra-low power consumption, and ultra-high parallelism. Traditional DNA computing only involves 4 bases, and there are only 8 encoding rules that conform to the principle of complementary pairing. Generally, dynamic encoding can only be used to increase the complexity of DNA computing. However, the above methods are difficult to guarantee the security of image encryption, and their robustness is poor when facing various types of data attacks. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention proposes a color image encryption method based on a hyperchaotic system and multi-stage scrambling and diffusion at the octa-base DNA level. By combining a five-dimensional continuous hyperchaotic system and using octa-base DNA with 384 encoding rules for calculation, the security of color image encryption is improved, thereby being able to effectively resist various types of data attacks.

[0005] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

[0006] A color image encryption method based on a hyperchaotic system and multi-stage scrambling and diffusion at the octabase DNA level comprises the following steps:

[0007] S100: for a plaintext color image P, using a five-dimensional continuous hyperchaotic system to perform iterations greater than a preset first length threshold, generating five groups of hyperchaotic sequences, discarding the initial value and the values ​​generated by the first t iterations, merging the remaining parts of the five groups of hyperchaotic sequences to obtain a hyperchaotic sequence S of length L, and then mapping the value range of the hyperchaotic sequence S to [0, 1), wherein the plaintext color image P is an RGB color image with a height of H, a width of W, and a shape of H×W×3;

[0008] S200: Convert the pixels of each color component in the plaintext color image P into bits, adjust them into a one-dimensional sequence B, extract a subsequence K greater than a preset second length threshold from the hyperchaotic sequence S, map its value to an integer within [1, 384], and then use a subsequence K of length H×W×8 of the subsequence K to obtain a one-dimensional sequence B. e , converting the one-dimensional sequence B to the eight-base DNA level through dynamic eight-base DNA encoding, and obtaining an eight-base DNA level image D of size H×W×8;

[0009] S300: extracting multiple subsets from the hyperchaotic sequence S, and globally scrambling the rows and columns of the eight-base DNA-level image D using a sorting index;

[0010] S400: Diffusion is started from the first row of the first plane in the eight-base DNA-level image D, followed by the first row of the second plane, and so on. When the diffusion of the first row of the eighth plane is completed, the diffusion is performed on the second row of the first plane, and the diffusion is continued in this manner until all rows are traversed; wherein, each diffusion has a subset extracted and converted from the subsequence K to participate in the eight-base DNA algebraic operation, and starting from the second diffusion, each diffusion will be affected by the result of the previous diffusion, and then each column plane is diffused in turn in units of planes, and the diffusion result of the previous column plane will affect the diffusion of the next column plane;

[0011] S500: extracting a subsequence from the hyperchaotic sequence S and converting it into a matrix Q of shape W×8 c , for the matrix Q c Sort the columns to get the sorted index matrix M c , and then each time the columns are shuffled, they are sorted according to the index matrix M c Select a column in each plane of the eight-base DNA-level image D, then map the eight chaotic elements in the hyperchaotic sequence S to integers within [1, H-1], perform cyclic shift on the selected columns, splice the selected columns according to the order in the sorting index of another subsequence with a length of 8 in the hyperchaotic sequence S, then map a chaotic element in the hyperchaotic sequence S to an integer within [1, 8H-1] to perform cyclic shift on the spliced ​​columns, and finally re-divide the scrambled spliced ​​columns back to the corresponding planes;

[0012] S600: performing eight-base DNA-level diffusion on all columns of the eight-base DNA-level image D according to the method of S400;

[0013] S700: extracting a subsequence from the hyperchaotic sequence S and converting it into a matrix Q of shape 8×H r , for the matrix Q r Sort the rows to get the sorted index matrix M r , and then scramble all rows in the eight-base DNA-level image D with reference to the column scrambling operation of S500;

[0014] S800: Using a subsequence K of length H×W×8 in the subsequence K d , the eight-base DNA-level image D is converted into bit-level data through dynamic eight-base DNA decoding, that is, each base is converted into three bits, and then the bit-level data is converted back into pixels to obtain the ciphertext image C.

[0015] Furthermore, the step S100 specifically includes:

[0016] Step S101: When five groups of hyperchaotic sequences are generated using a five-dimensional continuous hyperchaotic system, the equation of the five-dimensional continuous hyperchaotic system is:

[0017] Where a, b, c and d are control parameters, X 1 , X 2 , X 3 , X 4 and X 5 is a state variable, is a state variable The rate of change over time t; when a=30, b=35, c=16, d=14 and the initial value , , , , When , the five Lyapunov exponents of the five-dimensional continuous hyperchaotic system in formula (1) are: , , , , , the system exhibits hyperchaotic behavior;

[0018] Given the initial value of the state variable and , five groups of chaotic sequences are generated through iteration, and the initial value and the values ​​generated by the first t iterations are discarded, and then the remaining state variable values ​​are combined according to formula (2) to obtain a hyperchaotic sequence S with a length of L;

[0019]

[0020] In formula (2), N represents the number of remaining iterations after removing the first t iterations, ;

[0021] Step S102: adjusting the value range of the hyperchaotic sequence S to within [0, 1) according to formula (3);

[0022]

[0023] In the formula, To find the absolute value, To round down.

[0024] Furthermore, the step S200 specifically includes:

[0025] S201: Convert all pixel values ​​of each color component of the plain text color image P into 8-bit binary

[0026] Binary numbers are split into bits and adjusted into a one-dimensional sequence B;

[0027] S202: extracting a subsequence K greater than a preset second length threshold from the hyperchaotic sequence S, and adjusting its value to an integer within [1, 384] according to formula (4);

[0028]

[0029] S203: Extract a subset K of length H×W×8 from the subsequence K e, use the values ​​therein to determine the rules for eight-base DNA encoding of every three bits in the one-dimensional sequence B, and dynamically use different rules to encode the one-dimensional sequence B into an eight-base DNA-level image D of size H×W×8; wherein the eight-base DNA encoding uses every three bits as a unit, and encodes 000, 001, 010, 011, 100, 101, 110, 111 into bases A, C, P, S, B, Z, G or T according to the rules. There are a total of 384 encoding rules that satisfy the complementary pairing principle.

[0030] Furthermore, the step S300 specifically includes the following steps:

[0031] S301: Divide the eight-base DNA-level image D into 8 H×W planes, and then

[0032] Extract 8 subsequences from column S in turn and resize them into matrices of size H×W. Then sort the rows and columns of each matrix to obtain 16 sorting index matrices.

[0033] S302: Starting from the first column of each plane of the eight-base DNA-level image D, the internal elements of the current column in the eight-base DNA-level image D are scrambled using the values ​​of the corresponding columns in the respective column sorting matrices, and then a short sequence of length 8 is selected from the hyperchaotic sequence S, and the columns are scrambled to corresponding positions on different planes using its sorting index, and so on to complete the global scrambling of the columns;

[0034] S303: Starting from the first row of each plane of the eight-base DNA-level image D, the internal elements of the current row in the eight-base DNA-level image D are scrambled using the values ​​of the corresponding rows in the respective row sorting matrices, and then a short sequence of length 8 is selected from the hyperchaotic sequence S, and these rows are scrambled to the corresponding positions of different planes using its sorting index, and so on to complete the global scrambling of the rows.

[0035] Furthermore, in step S400 and step S600, the algebraic operation of the eight-base DNA-level image D includes addition, subtraction and XOR operations, and each diffusion of rows or columns is as shown in formula (5):

[0036] In the formula, represents the i-th row or i-th column of the j-th plane in D, G and A are subsets of K

[0037] The elements of are converted to bit level by dividing by 8 and then encoded into auxiliary variables with the same shape as D at the octabase DNA level. and The i-th row or i-th column of the j-th plane in G and A respectively, and the algebraic operation rules of the eight-base DNA in each diffusion are determined by the elements in K;

[0038] After completing the diffusion of all rows or columns, each diffusion of the column plane or row plane is as shown in formula (6):

[0039]

[0040] Where D k represents the kth column plane or row plane, N D Indicates their number, the value is W or H.

[0041] Furthermore, the step S500 is performed by sorting the index matrix M c and step S700 by sorting the index matrix M r To obtain the columns or rows selected from the eight planes of the eight-base DNA-level image D each time the columns or rows are scrambled, eight chaotic elements are selected from the hyperchaotic sequence S to form a sequence R, which is mapped to an integer within [1, H-1] or [1, W-1] through equation (7), and the selected columns or rows are cyclically shifted with this as the shift step number;

[0042]

[0043] Where, L D Indicates the number of elements in a column or row, the value is H or W;

[0044] Extract a subsequence of length 8 from the hyperchaotic sequence S and sort it, use its sorting index to scramble the order of columns or rows, and then splice them into a sequence in sequence, select an element r from the hyperchaotic sequence S, map it to an integer within [1, 8H-1] or [1, 8W-1] through formula (8), and use this as the shift step to cyclically shift the sequence composed of columns or rows;

[0045]

[0046] The sequence after each cyclic shift is re-divided into 8 columns or 8 rows of the same length, and stored in the corresponding positions of each plane in sequence.

[0047] Furthermore, the step S800 specifically includes:

[0048] S801: Extract a subset K of length H×W×8 from the subsequence K d , using the elements thereof to determine the rule for eight-base DNA decoding of each base in the eight-base DNA-level image D, and dynamically using different rules to decode the eight-base DNA-level image D into a bit-level sequence B', in which each base is converted into three bits;

[0049] S802: Take every 8 bits in the bit-level sequence B' as a unit, convert it to the pixel level as an 8-bit binary number, and adjust the shape to obtain a ciphertext image C with a shape of H×W×3.

[0050] The beneficial effects of the present invention are:

[0051] The present invention uses a five-dimensional continuous hyperchaotic system to iterate, generates five groups of hyperchaotic sequences, then merges the remaining parts of the five groups of hyperchaotic sequences to obtain a hyperchaotic sequence, extracts a subsequence from the hyperchaotic sequence, converts it to an eight-base DNA level through dynamic eight-base DNA encoding to obtain an eight-base DNA level image, then uses a sorting index to globally scramble the rows and columns of the eight-base DNA level image, then performs eight-base DNA level diffusion on all columns of the eight-base DNA level image, and finally converts the eight-base DNA level image D into bit-level data through dynamic eight-base DNA decoding to obtain a ciphertext image. The present invention enhances the complexity of encryption operations, provides richer diversity for color image encryption, effectively improves the encryption effect of color images, and improves the security of encrypting color images. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A flowchart of a color image encryption method provided by an embodiment of the present invention;

[0053] Figure 2 For application Figure 1 The chaotic attractor phase diagram of the five-dimensional continuous hyperchaotic system in the figure: (a) Attractor phase diagram, (b) is Attractor phase diagram, (c) is The attractor phase diagram, (d) is The attractor phase diagram, (e) is The attractor phase diagram, (f) is Attractor phase diagram;

[0054] Figure 3 The experimental results of the 512×512×3 pepper image in the embodiment of the present invention are shown in the figure: (a) is the original image, (b) is the ciphertext image, and (c) is the decrypted image;

[0055] Figure 4 is the key sensitivity test result in the embodiment of the present invention;

[0056] Figure 5 is the histogram test result in the embodiment of the present invention;

[0057] Figure 6: is a correlation distribution diagram of horizontally adjacent pixels of a plaintext image and a ciphertext image in an embodiment of the present invention, wherein: (a), (b), (c), (d), (e), (f) are correlation distribution diagrams of horizontally adjacent pixels of a plaintext image, and (g), (h), (i), (j), (k), (l) are correlation distribution diagrams of horizontally adjacent pixels of a ciphertext image;

[0058] Figure 7 The noise attack experiment result of the pepper image in the embodiment of the present invention is shown;

[0059] Figure 8 Result of cropping attack experiment on pepper image in the embodiment of the present invention. DETAILED DESCRIPTION

[0060] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0061] Example

[0062] refer to Figure 1 As shown, the present invention provides a color image encryption method based on a hyperchaotic system and multi-stage scrambling and diffusion at the octabase DNA level, which mainly includes the following steps:

[0063] Step S100: For the plaintext color image P, use a five-dimensional continuous hyperchaotic system to perform iterations greater than a preset first length threshold to generate five groups of hyperchaotic sequences, discard the initial value and the values ​​generated by the first t iterations, merge the remaining parts of the five groups of hyperchaotic sequences to obtain a hyperchaotic sequence S with a length of L, and then map the value range of the hyperchaotic sequence S to [0, 1).

[0064] The plaintext color image P is an RGB color image with a height of H, a width of W, and a shape of H×W×3.

[0065] In one implementation, the step S100 specifically includes:

[0066] Step S101: When generating five sets of hyperchaotic sequences using a five-dimensional continuous hyperchaotic system, refer to Figure 2 As shown, the equation of the five-dimensional continuous hyperchaotic system is:

[0067] Where a, b, c and d are control parameters, X 1 , X 2 , X3 , X 4 and X 5 is a state variable, is a state variable The rate of change over time t; when a=30, b=35, c=16, d=14 and the initial value , , , , When , the five Lyapunov exponents of the five-dimensional continuous hyperchaotic system in formula (1) are: , , , , , the system exhibits hyperchaotic behavior;

[0068] Given the initial value of the state variable , , , and , five groups of chaotic sequences are generated through iteration, and the initial value and the values ​​generated by the first t iterations are discarded, and then the remaining state variable values ​​are combined according to formula (2) to obtain a hyperchaotic sequence S with a length of L;

[0069] In formula (2), N represents the number of remaining iterations after removing the first t iterations, ;

[0070] Step S102: adjusting the value range of the hyperchaotic sequence S to within [0, 1) according to formula (3);

[0071]

[0072] In the formula, To find the absolute value, To round down.

[0073] Step S200: Convert the pixels of each color component in the plaintext color image P into bits, adjust them into a one-dimensional sequence B, extract a subsequence K greater than a preset second length threshold from the hyperchaotic sequence S, map its value to an integer within [1, 384], and then use a subsequence K of length H×W×8 of the subsequence K to obtain a one-dimensional sequence B. e , the one-dimensional sequence B is converted to the eight-base DNA level through dynamic eight-base DNA encoding, and an eight-base DNA level image D with a size of H×W×8 is obtained.

[0074] Specifically, step S200 may include:

[0075] S201: Convert all pixel values ​​of each color component of the plain text color image P into 8-bit binary

[0076] Binary numbers are split into bits and adjusted into a one-dimensional sequence B;

[0077] S202: extracting a subsequence K greater than a preset second length threshold from the hyperchaotic sequence S, and adjusting its value to an integer within [1, 384] according to formula (4);

[0078]

[0079] S203: Extract a subset K of length H×W×8 from the subsequence K e , the numerical values ​​are used to determine the rule for eight-base DNA encoding of every three bits in the one-dimensional sequence B, and different rules are dynamically used to encode the one-dimensional sequence B into an eight-base DNA-level image D of size H×W×8.

[0080] Among them, the eight-base DNA code uses three bits as a unit, and according to the rules, 000, 001, 010, 011, 100, 101, 110, 111 are encoded as bases A, C, P, S, B, Z, G or T. There are a total of 384 encoding rules that meet the complementary pairing principle.

[0081] In one implementation, some encoding rules are shown in Table 1: Table 1

[0082] Each pixel value of the image is represented by an 8-bit binary number, and the eight-base DNA encoding requires converting three bits into one base, which is applicable to data level conversion of all RGB color images.

[0083] Step S300: extract multiple subsets from the hyperchaotic sequence S, and globally scramble the rows and columns of the eight-base DNA-level image D using a sorting index.

[0084] Specifically, step S300 may include:

[0085] S301: Divide the eight-base DNA-level image D into 8 H×W planes, and then

[0086] Eight subsequences are extracted from column S in turn and all are resized into matrices of size H×W. Then, the rows and columns of each matrix are sorted respectively to obtain 16 sorting index matrices.

[0087] S302: Starting from the first column of each plane of the eight-base DNA-level image D, the internal elements of the current column in the eight-base DNA-level image D are scrambled using the values ​​of the corresponding columns in the respective column sorting matrices, and then a short sequence of length 8 is selected from the hyperchaotic sequence S, and its sorting index is used to scramble the column to the corresponding position of different planes, and so on to complete the global scrambling of the column.

[0088] S303: Starting from the first row of each plane of the eight-base DNA-level image D, the internal elements of the current row in the eight-base DNA-level image D are scrambled using the values ​​of the corresponding rows in the respective row sorting matrices, and then a short sequence of length 8 is selected from the hyperchaotic sequence S, and these rows are scrambled to the corresponding positions of different planes using its sorting index, and so on to complete the global scrambling of the rows.

[0089] Step S400: Diffusion is started from the first row of the first plane in the eight-base DNA-level image D, followed by the first row of the second plane, and so on. When the first row of the eighth plane is diffused, the second row of the first plane is diffused, and diffusion is continued in this way until all rows are traversed. In each diffusion, a subset extracted and converted from the subsequence K participates in the eight-base DNA algebraic operation, and starting from the second diffusion, each diffusion will be affected by the result of the previous diffusion, and then each column plane is diffused in turn in units of planes, and the diffusion result of the previous column plane will affect the diffusion of the next column plane.

[0090] In practice, eight-base DNA level diffusion requires eight-base DNA algebraic operations, involving eight-base DNA addition, subtraction and XOR operations, and is executed according to the corresponding rules. Taking encoding rule 1 as an example, eight-base DNA addition is shown in Table 2:

[0091] Table 2

[0092] Taking encoding rule 1 as an example, the eight-base DNA subtraction is shown in Table 3:

[0093] Table 3

[0094] Taking encoding rule 1 as an example, the eight-base DNA XOR is shown in Table 4:

[0095] Table 4

[0096] Step S500: extracting a subsequence from the hyperchaotic sequence S and converting it into a matrix Q of shape W×8 c , for the matrix Q cSort the columns to get the sorted index matrix M c , and then each time the columns are shuffled, they are sorted according to the index matrix M c A column is selected in each plane of the eight-base DNA-level image D according to the corresponding value in , and then the 8 chaotic elements in the hyperchaotic sequence S are mapped to integers within [1, H-1], the selected columns are cyclically shifted, and the selected columns are spliced ​​according to the order in the sorting index of another subsequence with a length of 8 in the hyperchaotic sequence S, and then a chaotic element in the hyperchaotic sequence S is mapped to an integer within [1, 8H-1] to cyclically shift the spliced ​​columns, and finally the scrambled spliced ​​columns are re-divided back into the corresponding plane.

[0097] Step S600: performing eight-base DNA-level diffusion on all columns of the eight-base DNA-level image D according to the method of S400.

[0098] When eight-base DNA-level diffusion is performed on rows or columns according to the above traversal method, each diffusion is as shown in formula (5):

[0099] In the formula, represents the i-th row or i-th column of the j-th plane in D, G and A are subsets of K

[0100] The elements of are converted to bit level by dividing by 8 and then encoded into auxiliary variables with the same shape as D at the octabase DNA level. and The i-th row or i-th column of the j-th plane in G and A respectively, and the algebraic operation rules of the eight-base DNA in each diffusion are determined by the elements in K;

[0101] After completing the diffusion of all rows or columns, each diffusion of the column plane or row plane is as shown in formula (6):

[0102] Where D k represents the kth column plane or row plane, N D Indicates their number, the value is W or H.

[0103] Step S700: extract a subsequence from the hyperchaotic sequence S and convert it into a matrix Q of shape 8×H r , for the matrix Q r Sort the rows to get the sorted index matrix M r Then, all rows in the eight-base DNA-level image D are scrambled with reference to the column scrambling operation of step S500.

[0104] In one embodiment, step S500 is performed by sorting the index matrix M c and step S700 by sorting the index matrix M r To obtain the columns or rows selected from the eight planes of the eight-base DNA-level image D each time the columns or rows are scrambled, eight chaotic elements are selected from the hyperchaotic sequence S to form a sequence R, which is mapped to an integer within [1, H-1] or [1, W-1] through equation (7), and the selected columns or rows are cyclically shifted with this as the shift step number;

[0105]

[0106] Where, L D Indicates the number of elements in a column or row, the value is H or W;

[0107] Extract a subsequence of length 8 from the hyperchaotic sequence S and sort it, use its sorting index to scramble the order of columns or rows, and then splice them into a sequence in sequence, select an element r from the hyperchaotic sequence S, map it to an integer within [1, 8H-1] or [1, 8W-1] through formula (8), and use this as the shift step to cyclically shift the sequence composed of columns or rows;

[0108]

[0109] The sequence after each cyclic shift is re-divided into 8 columns or 8 rows of the same length, and stored in the corresponding positions of each plane in sequence.

[0110] Step S800: Using a subsequence K of length H×W×8 in the subsequence K d , the eight-base DNA-level image D is converted into bit-level data through dynamic eight-base DNA decoding, that is, each base is converted into three bits, and then the bit-level data is converted back into pixels to obtain the ciphertext image C.

[0111] In one implementation, the step S800 specifically includes:

[0112] S801: Extract a subset K of length H×W×8 from the subsequence K d , use the elements therein to determine the rules for eight-base DNA decoding of each base in the eight-base DNA-level image D, and dynamically use different rules to decode the eight-base DNA-level image D into a bit-level sequence B', where each base is converted into three bits; S802: take each 8 bits in the bit-level sequence B' as a unit, convert it to the pixel level as an 8-bit binary number, and adjust the shape to obtain a ciphertext image C with a shape of H×W×3.

[0113] So far, this is the encryption process of an RGB plaintext color image, and the decryption process is the inverse process of the encryption process.

[0114] In order to further verify the effectiveness of the color image encryption method provided by the embodiment of the present invention, a simulation experiment is then performed for analysis.

[0115] The simulation experiment selected 6 public color images commonly used in the field of image encryption, named airplane, baboon, Rena, pepper, sailboat, and splash, with a size of 512×512×3; the experimental environment was set on a 64-bit Windows 11 operating system, with a CPU of R7-5800H, a frequency of 3.20 GHZ, and a memory of 16 GB, and was tested by Matlab R2021b; the control parameters of the five-dimensional continuous hyperchaotic system used were a=30, b=35, c=16, d=14, and the initial value of the state variable was , , , , discard the initial value and the first 1200 iteration results.

[0116] Taking the color image of pepper as an example, the encryption and subsequent decryption results are as follows: Figure 3 As shown, it can be seen that the present invention can effectively encrypt the plaintext image and convert it into a noise-like ciphertext image without any useful information, thereby protecting the image content, and can also correctly decrypt and restore the original image with the corresponding key.

[0117] The effectiveness analysis of image encryption algorithms involves multiple indicators, and an excellent image encryption method should have a large enough key space and sufficient key sensitivity, a uniform and flat histogram, high information entropy and low correlation in statistical characteristics, and be able to resist differential attacks and have sufficient robustness against noise attacks and cropping attacks.

[0118] An effective image encryption method should have a large key space to resist brute force attacks. Generally, the key space size is not less than 2 100 That is, the color image encryption method of the present invention uses the initial value of the state variable of the five-dimensional continuous hyperchaotic system as the key. According to the IEEE 754 standard, the effective precision of the 64-bit floating point number is , so the key space size is , much larger than 2 100 , fully meeting the conditions for resisting exhaustive brute force attacks.

[0119] A qualified image encryption method needs to be highly sensitive to the key. Even if the key is only slightly changed, the recovered decrypted image must be completely different from the correct plaintext image. The key sensitivity experiment of the present invention sets up an additional set of keys. Compared with the original key, only the initial value is changed. Plus , then from Figure 4 It can be seen that the results of decrypting each ciphertext image using the original key and the additional key are completely different from each other, so it has excellent key sensitivity.

[0120] The histogram reflects the number of times each pixel appears in the image, representing the frequency distribution of the pixel. The pixel distribution of natural images is mostly rugged and uneven, but the ciphertext image needs to break this irregular shape to make its histogram flat and uniform. Figure 5 The histograms of each color component of the plaintext color image and its ciphertext image are displayed. It can be seen that the histograms of the plaintext images are very different and very irregular, while the histograms of the ciphertext images are very uniform and flat, indicating that the pixel distribution is very uniform and has high security.

[0121] Information entropy can describe the probability of discrete random events and measure uncertainty and randomness. For a grayscale image or a color component of a color image, its information entropy is calculated according to formula (9).

[0122]

[0123] In formula (9), IE represents information entropy, It represents the probability of occurrence of pixel gray value i. If there is only one pixel gray value, then IE reaches the minimum value of 0. If all different pixel gray values ​​appear with the same probability of 1 / 256, then IE reaches the maximum value of 8, and the pixel distribution is completely random.

[0124] The information entropy of each color component of the plain text color image and the cipher text image of the present invention is calculated respectively, and the results are shown in Table 5: Table 5

[0125] It can be seen from the table that the information entropy of each color component of the plaintext color image is much lower than the information entropy of the corresponding color component of the ciphertext image, and all the information entropy results of the ciphertext image are very close to the maximum value of 8, indicating that the pixel distribution of the ciphertext image is very uniform and has high security.

[0126] Natural images usually show rich visual information, which is mainly because there is a close correlation between adjacent pixels and the local features are continuously integrated into a complete image. These highly correlated pixels may also be very similar or even the same. The correlation is generally measured by the correlation coefficient, which is calculated according to formula (10).

[0127]

[0128] In formula (10), represents the correlation coefficient, n represents the number of pixels, x and y are the grayscale values ​​of two adjacent pixels, E(x), D(x) and cov(x,y) represent the expectation of x, the variance of x and the covariance of x and y respectively; natural images usually show high correlation between adjacent pixels, making the correlation coefficient close to 1, and an excellent image encryption method should significantly reduce the correlation between adjacent pixels of the ciphertext image, making the correlation coefficient extremely close to 0.

[0129] The correlation coefficients of the plaintext color image and the ciphertext image of the present invention are calculated respectively on each color component, and the results are as follows:

[0130] The correlation coefficients of different directions of each color component of the plaintext color image are shown in Table 6:

[0131] Table 6

[0132] The correlation coefficients of different directions of each color component of the ciphertext image are shown in Table 7:

[0133] Table 7

[0134] From the table, we can see that the correlation coefficients of plaintext images are very close to 1, while the correlation coefficients of ciphertext images are both positive and negative, showing positive and negative correlations, but their absolute values ​​are extremely close to 0, indicating that the correlation between adjacent pixels in the ciphertext image is extremely low; Figure 6 The correlation distribution diagram of 2000 adjacent pixel pairs randomly selected in the horizontal direction of each color component of the plaintext image and the ciphertext image is shown. It can be seen that the grayscale values ​​of the adjacent pixel pairs of the plaintext image are concentrated around the main diagonal and have high correlation, while the pixels of the ciphertext image are evenly distributed in the entire phase diagram with extremely low correlation, further proving that the color image encryption method of the present invention has high security.

[0135] A qualified image encryption method needs to ensure that it can fully resist differential attacks, that is, a small change in the plaintext image must inevitably lead to a completely different ciphertext image. The pixel change rate (NPCR) and the unified average change intensity (UACI) are two main indicators to measure the ability of image encryption methods to resist differential attacks, and are calculated according to formula (11).

[0136]

[0137] In formula (11), C 1 and C 2 It is a ciphertext image obtained by encrypting two plaintext images with only slight differences using the same key. and Represents C 1 and C 2 The grayscale value of the i-th row and j-th column of a color image with a shape of 512×512×3 is taken as the grayscale value. For a color component of a color image with a shape of 512×512×3, when the significance level is 0.05, if the NPCR value is greater than 99.5893% and the UACI value is within (33.3730%, 33.5541%), it indicates that the differential detection can be passed and the ability to resist differential attacks is sufficient.

[0138] The grayscale value of a randomly selected pixel in a color component of the plaintext color image is added or subtracted by 1 to obtain a new image with only a slight change. The new image is then encrypted with the original image, and the NPCR and UACI of the two ciphertext images corresponding to the color component are calculated. The same is true for other color components. Ten differential attack experiments are performed on each color component of each image to obtain the average values ​​of these NPCR and UACI results. The results are shown in Table 8:

[0139] Table 8

[0140] It can be seen from the table that all color components of the color images involved in the test meet the standards in NPCR and UACI, indicating that even if the original plaintext image has only undergone a slight change, the resulting new ciphertext image will be completely different from the original ciphertext image, further illustrating that the color image encryption method of the present invention performs well in resisting differential attacks.

[0141] In real-life scenarios, images are often inevitably subject to noise pollution or data loss during transmission, which causes the encrypted ciphertext image to be damaged during transmission to the receiver, making it impossible to perfectly restore the correct original plaintext image after decryption. A superior image encryption method should also be robust against these damages. The robustness of an image encryption method is generally measured by the degree of recovery of the decrypted image obtained after decrypting the damaged ciphertext image.

[0142] The embodiment of the present invention simulates noise pollution by adding different degrees of salt and pepper noise to the ciphertext image of the plaintext color image of pepper, with the noise ratios being 1%, 2.5%, 5% and 10% respectively, and then decrypting these damaged ciphertext images respectively. Figure 7 It can be seen that as the noise ratio added to the ciphertext image increases, the degree of recovery of the decrypted image becomes worse and worse, but the main visual information can be restored, indicating that the image encryption method of the present invention has sufficient robustness against noise attacks.

[0143] The embodiment of the present invention simulates data loss by cropping pixels of different ratios at the center of the ciphertext image of the plaintext color image of pepper, with the cropping ratios being 1%, 3%, 6% and 12% respectively, and then decrypting these damaged ciphertext images respectively. Figure 8 It can be seen that the ciphertext image can restore the main visual information of the plaintext image before the central pixel loss ratio does not exceed 12%, indicating that the image encryption method of the present invention has basic robustness against cropping attacks.

[0144] In summary, the embodiment of the present invention uses a five-dimensional continuous hyperchaotic system to iterate, generates five groups of hyperchaotic sequences, then merges the remaining parts of the five groups of hyperchaotic sequences to obtain a hyperchaotic sequence, extracts a subsequence from the hyperchaotic sequence, converts it to the eight-base DNA level through dynamic eight-base DNA encoding to obtain an eight-base DNA level image, then uses a sorting index to globally scramble the rows and columns of the eight-base DNA level image, then traverses all columns of the eight-base DNA level image to perform eight-base DNA level diffusion, and finally converts the eight-base DNA level image D into bit-level data through dynamic eight-base DNA decoding to obtain a ciphertext image. The present invention enhances the complexity of encryption operations, provides richer diversity for color image encryption, effectively improves the encryption effect of color images, and improves the security of encrypting color images.

[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A color image encryption method based on hyperchaotic system and multi-stage scrambling and diffusion at eight-base DNA level, characterized in that: The following steps are involved: S100: for a plaintext color image P, using a five-dimensional continuous hyperchaotic system to perform iterations greater than a preset first length threshold, generating five groups of hyperchaotic sequences, discarding the initial value and the values ​​generated by the first t iterations, merging the remaining parts of the five groups of hyperchaotic sequences to obtain a hyperchaotic sequence S of length L, and then mapping the value range of the hyperchaotic sequence S to [0, 1), wherein the plaintext color image P is an RGB color image with a height of H, a width of W, and a shape of H×W×3; S200: Convert the pixels of each color component in the plaintext color image P into bits, adjust them into a one-dimensional sequence B, extract a subsequence K greater than a preset second length threshold from the hyperchaotic sequence S, map its value to an integer within [1, 384], and then use a subsequence K of length H×W×8 of the subsequence K to obtain a one-dimensional sequence B. e , converting the one-dimensional sequence B to the eight-base DNA level through dynamic eight-base DNA encoding, and obtaining an eight-base DNA level image D of size H×W×8; S300: extracting multiple subsets from the hyperchaotic sequence S, and globally scrambling the rows and columns of the eight-base DNA-level image D using a sorting index; S400: Diffusion is started from the first row of the first plane in the eight-base DNA-level image D, followed by the first row of the second plane, and so on. When the diffusion of the first row of the eighth plane is completed, the diffusion is performed on the second row of the first plane, and the diffusion is continued in this manner until all rows are traversed; wherein, each diffusion has a subset extracted and converted from the subsequence K to participate in the eight-base DNA algebraic operation, and starting from the second diffusion, each diffusion will be affected by the result of the previous diffusion, and then each column plane is diffused in turn in units of planes, and the diffusion result of the previous column plane will affect the diffusion of the next column plane; S500: extracting a subsequence from the hyperchaotic sequence S and converting it into a matrix Q of shape W×8 c , for the matrix Q c Sort the columns to get the sorted index matrix M c , and then each time the columns are shuffled, they are sorted according to the index matrix M c Select a column in each plane of the eight-base DNA-level image D, then map the eight chaotic elements in the hyperchaotic sequence S to integers within [1, H-1], perform cyclic shift on the selected columns, splice the selected columns according to the order in the sorting index of another subsequence with a length of 8 in the hyperchaotic sequence S, then map a chaotic element in the hyperchaotic sequence S to an integer within [1, 8H-1] to perform cyclic shift on the spliced ​​columns, and finally re-divide the scrambled spliced ​​columns back to the corresponding planes; S600: performing eight-base DNA-level diffusion on all columns of the eight-base DNA-level image D according to the method of S400; S700: extracting a subsequence from the hyperchaotic sequence S and converting it into a matrix Q of shape 8×H r , for the matrix Q r Sort the rows to get the sorted index matrix M r , and then scramble all rows in the eight-base DNA-level image D with reference to the column scrambling operation of S500; S800: Using a subsequence K of length H×W×8 in the subsequence K d , the eight-base DNA-level image D is converted into bit-level data through dynamic eight-base DNA decoding, that is, each base is converted into three bits, and then the bit-level data is converted back into pixels to obtain the ciphertext image C.

2. The color image encryption method based on hyperchaotic system and eight-base DNA level multi-stage scrambling and diffusion according to claim 1 is characterized in that: The step S100 specifically includes: Step S101: When five groups of hyperchaotic sequences are generated using a five-dimensional continuous hyperchaotic system, the equation of the five-dimensional continuous hyperchaotic system is: Where a, b, c and d are control parameters, X1, X2, X3, X4 and X5 are state variables, is the state variable X i The rate of change over time t; when a=30, b=35, c=16, d=14 and the initial value , , , , When , the five Lyapunov exponents of the five-dimensional continuous hyperchaotic system in formula (1) are: , , , , , the system exhibits hyperchaotic behavior; Given the initial value of the state variable and , five groups of chaotic sequences are generated through iteration, and the initial value and the values ​​generated by the first t iterations are discarded, and then the remaining state variable values ​​are combined according to formula (2) to obtain a hyperchaotic sequence S with a length of L; In formula (2), N represents the number of remaining iterations after removing the first t iterations, ; Step S102: adjusting the value range of the hyperchaotic sequence S to within [0, 1) according to formula (3); In the formula, To find the absolute value, To round down.

3. The color image encryption method based on hyperchaotic system and eight-base DNA level multi-stage scrambling and diffusion according to claim 1 is characterized in that: The step S200 specifically includes: S201: Convert all pixel values ​​of each color component of the plain text color image P into 8-bit binary Binary numbers are split into bits and adjusted into a one-dimensional sequence B; S202: extracting a subsequence K greater than a preset second length threshold from the hyperchaotic sequence S, and adjusting its value to an integer within [1, 384] according to formula (4); S203: Extract a subset K of length H×W×8 from the subsequence K e , use the values ​​therein to determine the rules for eight-base DNA encoding of every three bits in the one-dimensional sequence B, and dynamically use different rules to encode the one-dimensional sequence B into an eight-base DNA-level image D of size H×W×8; wherein the eight-base DNA encoding uses every three bits as a unit, and encodes 000, 001, 010, 011, 100, 101, 110, 111 into bases A, C, P, S, B, Z, G or T according to the rules. There are a total of 384 encoding rules that satisfy the complementary pairing principle.

4. The color image encryption method based on hyperchaotic system and eight-base DNA level multi-stage scrambling and diffusion according to claim 1 is characterized in that: The step S300 specifically includes the following steps: S301: Divide the eight-base DNA-level image D into 8 H×W planes, and then Extract 8 subsequences from column S in turn and resize them into matrices of size H×W. Then sort the rows and columns of each matrix to obtain 16 sorting index matrices. S302: Starting from the first column of each plane of the eight-base DNA-level image D, the internal elements of the current column in the eight-base DNA-level image D are scrambled using the values ​​of the corresponding columns in the respective column sorting matrices, and then a short sequence of length 8 is selected from the hyperchaotic sequence S, and the columns are scrambled to corresponding positions on different planes using its sorting index, and so on to complete the global scrambling of the columns; S303: Starting from the first row of each plane of the eight-base DNA-level image D, the internal elements of the current row in the eight-base DNA-level image D are scrambled using the values ​​of the corresponding rows in the respective row sorting matrices, and then a short sequence of length 8 is selected from the hyperchaotic sequence S, and these rows are scrambled to the corresponding positions of different planes using its sorting index, and so on to complete the global scrambling of the rows.

5. The color image encryption method based on hyperchaotic system and eight-base DNA level multi-stage scrambling and diffusion according to claim 1 is characterized in that: In step S400 and step S600, the algebraic operation of the eight-base DNA-level image D includes addition, subtraction and XOR operations, and each diffusion of rows or columns is shown in formula (5): In the formula, represents the i-th row or i-th column of the j-th plane in D, G and A are subsets of K The elements of are converted to bit level by dividing by 8 and then encoded into auxiliary variables with the same shape as D at the octabase DNA level. and The i-th row or i-th column of the j-th plane in G and A respectively, and the algebraic operation rules of the eight-base DNA in each diffusion are determined by the elements in K; After completing the diffusion of all rows or columns, each diffusion of the column plane or row plane is as shown in formula (6): Where D k represents the kth column plane or row plane, N D Indicates their number, the value is W or H.

6. A color image encryption method based on hyperchaotic system and eight-base DNA level multi-stage scrambling and diffusion according to claim 1, characterized in that: The step S500 is performed by sorting the index matrix M c and step S700 by sorting the index matrix M r To obtain the columns or rows selected from the eight planes of the eight-base DNA-level image D each time the columns or rows are scrambled, eight chaotic elements are selected from the hyperchaotic sequence S to form a sequence R, which is mapped to an integer within [1, H-1] or [1, W-1] through equation (7), and the selected columns or rows are cyclically shifted with this as the shift step number; Where, L D Indicates the number of elements in a column or row, the value is H or W; Extract a subsequence of length 8 from the hyperchaotic sequence S and sort it, use its sorting index to scramble the order of columns or rows, and then splice them into a sequence in sequence, select an element r from the hyperchaotic sequence S, map it to an integer within [1, 8H-1] or [1, 8W-1] through formula (8), and use this as the shift step to cyclically shift the sequence composed of columns or rows; The sequence after each cyclic shift is re-divided into 8 columns or 8 rows of the same length, and stored in the corresponding positions of each plane in sequence.

7. A color image encryption method based on hyperchaotic system and eight-base DNA level multi-stage scrambling and diffusion according to claim 1, characterized in that: The step S800 specifically includes: S801: Extract a subset K of length H×W×8 from the subsequence K d , using the elements thereof to determine the rule for eight-base DNA decoding of each base in the eight-base DNA-level image D, and dynamically using different rules to decode the eight-base DNA-level image D into a bit-level sequence B', in which each base is converted into three bits; S802: Take every 8 bits in the bit-level sequence B' as a unit, convert it to the pixel level as an 8-bit binary number, and adjust the shape to obtain a ciphertext image C with a shape of H×W×3.

Citation Information

Patent Citations

  • A symmetric encryption scheme for color light field image

    AU2019100036A4

  • Image encryption method based on Feistel network and dynamic DNA encoding

    CN108365947A