An image encryption method based on DNA coding technology and hyperchaotic system

By combining DNA encoding technology and superchaotic systems in image encryption, dynamic DNA encoding rules and chaotic sequences are generated, and multi-stage chaos is carried out, the problems of low security and easy-to-break in the existing technology are solved, and the problem of single encoding is easily cracked is achieved. High security image encryption.

CN114362915BActive Publication Date: 2024-11-12SOUTH CHINA UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111538699.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2024-11-12
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

The existing image encryption algorithms are not very safe and are easily cracked under the risk that Poincaré's resilience of the power system and the risk that the parameters of low-dimensional chaotic systems are easily deciphered.

Method used

Using image encryption method based on DNA encoding technology and hyperchaotic system, dynamic DNA encoding rules and chaotic sequences are generated through Lorenz and Chen hyperchaotic systems, combining block scrambling and index scrambling to form multi-stage encryption, and the key is from the image to be encrypted. The hash value is calculated.

Benefits of technology

It improves the security of the encryption system, dynamic DNA encoding avoids the risk that a single encoding is easily cracked, and has a large key space, which is suitable for areas with high security requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114362915B_ABST
    Figure CN114362915B_ABST
Patent Text Reader

Abstract

The invention discloses an image encryption method based on DNA coding technology and hyperchaotic system, comprising the following steps: calculating the hash value of the image to be encrypted as a key; generating the initial parameters and block size of the Lorenz hyperchaotic system and the Chen hyperchaotic system by the key; using the Lorenz hyperchaotic system to generate DNA coding rules, DNA decoding rules and DNA operation rules; the image to be encrypted undergoes DNA coding, DNA operation and DNA decoding to obtain a diffused image; expanding the diffused image; using the Chen hyperchaotic system to generate a first chaotic sequence and a second chaotic sequence; performing block scrambling on the expanded image according to the ascending order of the element values ​​of the first chaotic sequence; performing index scrambling on the block scrambled image according to the ascending order of the element values ​​of the second chaotic sequence to obtain a final encrypted image. The invention has a large key space and high security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the fields of image processing and image encryption, and in particular to an image encryption method based on DNA encoding technology and hyperchaotic system. Background Art

[0002] With the development of Internet technology, images have become an important carrier of information in today's world. Images carry a lot of information. If they are leaked during the transmission and storage process, it will cause losses to personal privacy, corporate secrets, and even national security. Therefore, the research on secure and efficient image encryption algorithms has attracted more and more attention.

[0003] Hu et al. proposed to generate the parameters of Arnold transform from Logistic mapping, and use Arnold transform to perform index scrambling and block scrambling on the image (an image encryption algorithm based on improved Arnold mapping quadratic scrambling) to achieve encryption effect. Due to the limited size and element values ​​of the image matrix, a considerable degree of chaos can be reflected in the early stages of Arnold transform iteration. However, due to the inherent characteristics of the dynamic system, the iterative transformation has Poincare recovery. If the algorithm is leaked, the encrypted image can be restored after a certain amount of Arnold iterative transformation, so the security is not high.

[0004] Li et al. proposed using two-level Logistic chaotic mapping to diffuse and scramble images (Study on Digital Image Encryption Algorithm Based on Double Logistic Chaotic Mapping). Chaotic signals generated by deterministic and simple dynamic systems can exhibit complex pseudo-randomness and are extremely sensitive to initial parameters. These characteristics make chaotic systems suitable for the field of secure communications, but the parameters of low-dimensional chaotic systems can be identified through methods such as adaptive synchronization control, so there is still a risk of being deciphered.

[0005] Lan et al. combined chaotic systems and DNA coding technology to achieve image encryption (a new image encryption algorithm based on chaos and DNA coding). DNA coding has the advantages of low power consumption, large storage capacity, and large-scale parallelism, but the scheme uses a single DNA coding and operation rules. The singleness of the DNA coding rules makes this encryption algorithm vulnerable to cracking. Summary of the invention

[0006] The purpose of the present invention is to solve the shortcomings and defects of the prior art and provide an image encryption method based on DNA coding technology and hyperchaotic system. The method of the present invention changes the image pixel value in the diffusion stage to make the image grayscale histogram evenly distributed, effectively resisting attackers from analyzing valuable information from the grayscale histogram; the original pixel distribution of the image is disrupted in the scrambling stage, and the correlation of the grayscale values ​​of adjacent pixels is effectively eliminated by combining block scrambling and index scrambling. The present invention combines dynamic DNA coding technology and hyperchaotic system to encrypt images from two stages of pixel diffusion and scrambling, which is safer than traditional image encryption methods and can be applied to medical, military and other fields with high requirements for image security.

[0007] The present invention is achieved by at least one of the following technical solutions.

[0008] An image encryption method based on DNA coding technology and hyperchaotic system comprises the following steps:

[0009] Input the image to be encrypted;

[0010] Calculating a hash value of the image to be encrypted as a key of an encryption method;

[0011] Generate initial parameters and block sizes of Lorenz hyperchaotic system and Chen hyperchaotic system by using the key;

[0012] Generate DNA encoding rules, DNA decoding rules and DNA operation rules using the Lorenz hyperchaotic system;

[0013] The image to be encrypted undergoes DNA encoding, DNA computing and DNA decoding to obtain a diffused image;

[0014] Expanding the diffused image so that its size becomes a minimum integer multiple of the block size;

[0015] Using the Chen hyperchaotic system to generate a first chaotic sequence and a second chaotic sequence;

[0016] Block scrambling is performed on the expanded image according to the ascending order of the element values ​​of the first chaotic sequence;

[0017] The block-scrambled image is subjected to index scrambling according to the ascending order of the element values ​​of the second chaotic sequence to obtain a final encrypted image.

[0018] Furthermore, the initial parameters and block sizes of the Lorenz hyperchaotic system and the Chen hyperchaotic system are generated by the key, specifically including:

[0019] Dividing the key into 16 segments, each segment being a binary number;

[0020] K=K1K2…Kn …K 16

[0021] Among them, K is the key, K n is the nth key fragment, where n is an integer in the range [1,16];

[0022] Generate the initial parameters of the Lorenz hyperchaotic system according to the following formula;

[0023]

[0024]

[0025]

[0026]

[0027]

[0028] Wherein, bin2de(x) converts the binary number x into a decimal number; x1, y1, z1, w1 are the initial values ​​of the components of the Lorenz hyperchaotic system, ranging from [0, 1); d is the parameter of the Lorenz hyperchaotic system, ranging from [-1.2, -0.2);

[0029] Generate the initial parameters of the Chen hyperchaotic system according to the following formula;

[0030]

[0031]

[0032]

[0033]

[0034] Among them, x2, y2, z2 are the initial values ​​of the components of Chen hyperchaotic system, ranging from [0,1); g is the parameter of Chen hyperchaotic system, ranging from [25,28);

[0035] Generate the size of the block according to the following formula;

[0036]

[0037]

[0038] Where mod(x,y) represents the real number x modulo the real number y, i and j are the length and width of the block, which are integers in the range [5,9].

[0039] Furthermore, the state equations of the Lorenz hyperchaotic system are as follows:

[0040]

[0041] Among them, x, y, z, and w are the four state components of the Lorenz hyperchaotic system. They represent the partial differentials of x, y, z, and w with respect to time t, respectively. a, b, c, and d are the four parameters of the Lorenz hyperchaotic system. When a=10, When c=28, -1.52≤d≤-0.06, the system is in a hyperchaotic state. In order to avoid the critical parameters causing periodicity of the state components in the time domain, the range of d in the encryption method is [-1.2, -0.2).

[0042] Furthermore, the state equations of the Chen hyperchaotic system are as follows:

[0043]

[0044] Among them, x, y, z are the three state components of Chen hyperchaotic system, e, f, g are the three parameters of Chen hyperchaotic system, when a=35, b=3, 20≤d≤28.4, the system is in a hyperchaotic state. In order to avoid the critical parameters causing periodicity of state components in the time domain, the range of d in the encryption method is [25,28).

[0045] Furthermore, the Lorenz hyperchaotic system is used to generate DNA encoding rules, DNA decoding rules and DNA operation rules, which specifically include:

[0046] Using d as the parameter of the Lorenz hyperchaotic system, using x1, y1, z1, w1 as the initial values ​​of each state component of the Lorenz hyperchaotic system, iteratively obtains the chaotic sequences X1, Y1, Z1, W1 of each state component in the time domain, the interval between adjacent elements of the sequence in the time domain is 1, the length of X1, Y1, Z1 is mn, the length of W1 is Lmn, where m is the length of the original image, and n is the width of the original image;

[0047] Calculate the pseudo-random sequence A1 according to the following formula;

[0048] A1=mod(floor(X1(1:mn)×2 14 ),256)

[0049] Where floor(x) means rounding down the real number x, and the elements of A1 are integers in [0,255].

[0050] The DNA encoding rule and decoding rule are calculated according to the following formula;

[0051] E1=mod(floor(Y1(1:mn)×214 ),8)

[0052] E2=mod(floor(Z1(1:mn)×2 14 ),8)

[0053] D=mod(floor(W1(1:mn)×2 14 ),8)

[0054] Among them, E1 and E2 are encoding rules, D is decoding rule, their elements are integers in [0,7], and each integer represents one encoding and decoding rule;

[0055] The DNA calculation rules are calculated according to the following formula;

[0056] O=mod(floor(W1(mn+1:2mn)×2 14 ),4)

[0057] In the formula, the elements of O are integers in [0,3], and each integer represents an operation rule.

[0058] Furthermore, the image to be encrypted undergoes DNA encoding, DNA computing and DNA decoding to obtain a diffused image, which specifically includes:

[0059] The image to be encrypted P0 is encoded into a DNA sequence C1 according to the DNA encoding rule E1;

[0060] The chaotic sequence A1 is encoded into the DNA sequence C2 according to the DNA coding rules;

[0061] DNA sequences C1 and C2 are operated under DNA operation rule O to obtain DNA sequence C3;

[0062] The DNA sequence C3 is decoded into the image P1 according to the DNA decoding rule D, thereby obtaining the diffused image.

[0063] Furthermore, the image to be encrypted P0 is encoded into a DNA sequence C1 according to the DNA encoding rule E1, as follows:

[0064] Expand the pixel matrix of image P0 row by row to obtain a one-dimensional sequence;

[0065] Each element of the sequence is converted from a decimal integer of [0,255] to an 8-bit binary number to obtain a binary sequence;

[0066] The binary sequence adopts corresponding encoding rules according to the corresponding elements of E1;

[0067] DNA decoding is the reverse process of DNA encoding.

[0068] Furthermore, the DNA sequences C1 and C2 are operated under the DNA operation rule O to obtain the DNA sequence C3, which is as follows:

[0069]

[0070]

[0071] Among them, + is DNA addition operation; - is DNA subtraction operation; is the DNA XOR operation; ⊙ is the DNA XOR operation; T(i) represents the i-th element of sequence T, and C(x:y) represents the subsequence of sequence C from the x-th element to the y-th element.

[0072] Furthermore, the Chen hyperchaotic system is used to generate the first chaotic sequence and the second chaotic sequence, as follows:

[0073] Using g as the parameter of Chen hyperchaotic system, using x2, y2, z2 as the initial values ​​of each state component of Chen hyperchaotic system, the chaotic sequence X2, Y2, Z2 of each state component in the time domain is iterated, the interval between adjacent elements in the time domain is 1, and the length of X2 is The lengths of Y2 and Z2 are both M×N;

[0074] The first chaotic sequence A2 and the second chaotic sequence A3 are calculated as follows;

[0075]

[0076]

[0077] Among them, abs(x) represents the absolute value of x, [x,y] represents the concatenation of sequence x and sequence y, and floor(x) represents rounding down the real number x.

[0078] Further, the expanded image is block-scrambled according to the ascending order of the element values ​​of the first chaotic sequence, specifically including:

[0079] Sort the index values ​​of the first chaotic sequence A2 in ascending order of element values ​​to obtain an index sequence;

[0080] Expand the image by block rows, and rearrange the positions of blocks p to q according to the pth element value q of the index sequence;

[0081] Rearrange the matrix back to the matrix size of the original image to obtain the block scrambled image;

[0082] The step of index scrambling the block-scrambled image according to the ascending order of the element values ​​of the second chaotic sequence specifically includes:

[0083] Sort the index values ​​of the second chaotic sequence A3 in ascending order of element values ​​to obtain an index sequence;

[0084] Expand the image row by row, and rearrange the positions of the pth element to the qth element of the image according to the pth element value q of the index sequence;

[0085] Rearrange the one-dimensional matrix back to the matrix size of the original image to obtain the index scrambled image, that is, the final encrypted image.

[0086] Compared with the prior art, the present invention has the following beneficial effects:

[0087] 1. The key is calculated from the hash code of the image to be encrypted. Therefore, the initial value, parameters and block size of the Lorenz hyperchaotic system and the Chen hyperchaotic system are related to the image to be encrypted. One key at a time effectively improves the security of the encryption system.

[0088] 2. DNA encoding rules, DNA decoding rules, DNA operation rules and sequences involved in the operation are all calculated from the chaotic sequence generated by the Lorenz hyperchaotic system. The dynamic DNA encoding technology avoids the risk of a single DNA code being easily cracked;

[0089] 3. The present invention combines dynamic DNA coding technology and hyperchaotic system, and goes through a diffusion stage and a scrambling stage, wherein the scrambling stage includes block scrambling and index scrambling. The method has a large key space and high security. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0091] Figure 1 is a flow chart of an image encryption method based on DNA coding technology and hyperchaotic system in an embodiment;

[0092] Figure 2 Schematic diagram of the block scrambling process of an embodiment;

[0093] Figure 3 Schematic diagram of the index scrambling process of the embodiment. DETAILED DESCRIPTION

[0094] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. This specification may use the phrases "in one embodiment", "in another embodiment", "in yet another embodiment" or "in other embodiments", which may refer to one or more of the same or different embodiments according to the present disclosure.

[0095] Example 1

[0096] like Figure 1 As shown, the above-mentioned image encryption method based on DNA coding technology and hyperchaotic system in this embodiment includes the following steps:

[0097] S1, input the image to be encrypted;

[0098] S2, using the secure hash algorithm-512 (SHA-512) to calculate the hash value of the image to be encrypted as a key of the encryption method;

[0099] S3, generating initial parameters and block sizes of the Lorenz hyperchaotic system and the Chen hyperchaotic system by using the key;

[0100] S4, using the Lorenz hyperchaotic system to generate DNA encoding rules, DNA decoding rules and DNA operation rules;

[0101] S5-S9, the image to be encrypted undergoes DNA encoding, DNA computing and DNA decoding to obtain a diffused image;

[0102] S10, expanding the diffused image so that its size becomes a minimum integer multiple of the block size;

[0103] S11, S12, using the Chen hyperchaotic system to generate a first chaotic sequence and a second chaotic sequence;

[0104] S13, performing block scrambling on the expanded image according to the ascending order of the element values ​​of the first chaotic sequence;

[0105] S14, performing index scrambling on the block-scrambled image according to the ascending order of the element values ​​of the second chaotic sequence

[0106] S15. Output the final encrypted image.

[0107] Example 2

[0108] In one embodiment, the size of the image to be encrypted is m×n, and it can be a single-channel grayscale image or a three-channel RGB image.

[0109] The hash value of the image to be encrypted is calculated using SHA-512 as a key of the encryption method, and the key is a 512-bit binary number.

[0110] Example 3

[0111] As a preferred embodiment, the generating of the initial parameters and block sizes of the Lorenz hyperchaotic system and the Chen hyperchaotic system by using a key specifically includes:

[0112] S301, dividing the key into 16 segments, each segment being a binary number;

[0113] K=K1K2…K n …K 16

[0114] Among them, K is the key, K n is the nth key fragment, where n is an integer in the range [1,16];

[0115] S302, generating initial parameters of the Lorenz hyperchaotic system according to the following formula;

[0116]

[0117]

[0118]

[0119]

[0120]

[0121] Wherein, bin2de(x) converts the binary number x into a decimal number; x1, y1, z1, w1 are the initial values ​​of the components of the Lorenz hyperchaotic system, ranging from [0, 1); d is the parameter of the Lorenz hyperchaotic system, ranging from [-1.2, -0.2);

[0122] S303, generating initial parameters of the Chen hyperchaotic system according to the following formula;

[0123]

[0124]

[0125]

[0126]

[0127] Among them, x2, y2, z2 are the initial values ​​of the components of Chen hyperchaotic system, ranging from [0,1); g is the parameter of Chen hyperchaotic system, ranging from [25,28);

[0128] S304, generating the size of the blocks according to the following formula;

[0129]

[0130]

[0131] Where mod(x,y) is the modulus of x to y, i and j are the length and width of the block, which are integers in the range [5,9].

[0132] In one embodiment, the state equations of the Lorenz hyperchaotic system are as follows:

[0133]

[0134] Among them, x, y, z, and w are the four state components of the Lorenz hyperchaotic system. They represent the partial differentials of x, y, z, and w with respect to time t, respectively. a, b, c, and d are the four parameters of the Lorenz hyperchaotic system. When a=10, When c=28, -1.52≤d≤-0.06, the system is in a hyperchaotic state. In order to avoid the critical parameters causing periodicity of the state components in the time domain, the range of d in the encryption method is [-1.2, -0.2).

[0135] In one embodiment, the state equations of the Chen hyperchaotic system are as follows:

[0136]

[0137] Among them, x, y, z are the three state components of Chen hyperchaotic system, e, f, g are the three parameters of Chen hyperchaotic system, when a=35, b=3, 20≤d≤28.4, the system is in a hyperchaotic state. In order to avoid the critical parameters causing periodicity of state components in the time domain, the range of d in the encryption method is [25,28).

[0138] In one embodiment, the use of the Lorenz hyperchaotic system to generate DNA encoding rules, DNA decoding rules and DNA operation rules specifically includes:

[0139] S4, using d as the parameter of the Lorenz hyperchaotic system, using x1, y1, z1, w1 as the initial values ​​of each state component of the Lorenz hyperchaotic system, iteratively obtaining the chaotic sequences X1, Y1, Z1, W1 of each state component in the time domain, the interval between adjacent elements of the sequence in the time domain is 1, the lengths of X1, Y1, Z1 are all mn, the length of W1 is 2mn, where m is the length of the original image, and n is the width of the original image;

[0140] S501, calculate the pseudo-random sequence A1 according to the following formula;

[0141] A1=mod(floor(X1(1:mn)×2 14 ),256)

[0142] Where floor(x) means rounding down the real number x, and the elements of A1 are integers in [0,255].

[0143] S502, calculating the DNA encoding rule and decoding rule according to the following formula;

[0144] E1=mod(floor(Y1(1:mn)×2 14 ),8)

[0145] E2=mod(floor(Z1(1:mn)×2 14 ),8)

[0146] D=mod(floor(W1(1:mn)×2 14 ),8)

[0147] Among them, E1 and E2 are encoding rules, D is decoding rule, their elements are integers in [0,7], and each integer represents one encoding and decoding rule;

[0148] S503, calculating the DNA operation rule according to the following formula;

[0149] O=mod(floor(W1(mn+1:2mn)×2 14 ),4)

[0150] The elements of O are integers in [0,3], and each integer represents an operation rule.

[0151] In one embodiment, the image to be encrypted undergoes DNA encoding, DNA computing, and DNA decoding to obtain a diffused image, which specifically includes:

[0152] S6, the image to be encrypted P0 is encoded into a DNA sequence C1 according to the DNA encoding rule E1;

[0153] S7, chaotic sequence A1 is encoded into DNA sequence C2 according to DNA coding rules;

[0154] S8, DNA sequences C1 and C2 are operated under DNA operation rule O to obtain DNA sequence C3;

[0155] S9. The DNA sequence C3 is decoded into the image P1 according to the DNA decoding rule D, thereby obtaining the diffused image.

[0156] In one embodiment, the image to be encrypted P0 is encoded into a DNA sequence C1 according to the DNA encoding rule E1, as follows:

[0157] S601, expand the pixel matrix of the image P0 row by row to obtain a one-dimensional sequence;

[0158] S602, convert each element of the sequence from a decimal integer of [0, 255] to an 8-bit binary number to obtain a binary sequence;

[0159] S603, the binary sequence adopts corresponding encoding rules according to the corresponding elements of E1, as shown in Table 1;

[0160] Assuming that the gray value of the element in the rth row and cth column of the image is 39, the binary number of the rcth element of the binary sequence is 00100111. Assuming that the value of the rcth element of the DNA encoding rule E1 is 3, according to the encoding and decoding rules of Table 1, 00100111 is encoded as TGCA.

[0161] DNA decoding is the reverse process of DNA encoding, and also refers to the encoding and decoding rules in Table 1.

[0162] Table 1 DNA encoding and decoding rules

[0163]

[0164] In one embodiment, the DNA sequences C1 and C2 are operated under DNA operation rule O to obtain a DNA sequence C3, as follows:

[0165]

[0166]

[0167] Among them, + is DNA addition operation, the rules are shown in Table 2; - is DNA subtraction operation, the rules are shown in Table 3; is the DNA XOR operation, and the rules are shown in Table 4; ⊙ is the DNA XOR operation, and the rules are shown in Table 5; T(i) represents the i-th element of sequence T, and C(x:y) represents the subsequence of sequence C from the x-th element to the y-th element.

[0168] Table 2 DNA addition operation rules

[0169]

[0170] Table 3 DNA subtraction operation rules

[0171]

[0172] Table 4 DNA XOR operation rules

[0173]

[0174] Table 5 DNA XOR operation rules

[0175]

[0176] In one embodiment, the expanding the diffused image so that its size becomes a minimum integer multiple of the block size specifically includes:

[0177] S1001, expanding the size of the image from m×n to M×N, where M is the minimum multiple of the length i of the block, and N is the minimum multiple of the width j of the block;

[0178] S1002: The expansion method is to fill the right and bottom of the image matrix with zero elements.

[0179] In one embodiment, the first chaotic sequence and the second chaotic sequence are generated by using the Chen hyperchaotic system as follows:

[0180] S11. Using g as the parameter of Chen hyperchaotic system, using x2, y2, z2 as the initial values ​​of each state component of Chen hyperchaotic system, iteratively obtain the chaotic sequence X2, Y2, Z2 of each state component in the time domain. The interval between adjacent elements in the time domain is 1, and the length of X2 is The lengths of Y2 and Z2 are both M×N;

[0181] S12, calculating the first chaotic sequence A2 and the second chaotic sequence A3 according to the following formula;

[0182]

[0183]

[0184] Where abs(x) represents the absolute value of x, and [x,y] represents the concatenation of sequence x and sequence y.

[0185] In one embodiment, referring to Figure 2 The block scrambling of the expanded image according to the ascending order of the element values ​​of the first chaotic sequence specifically includes:

[0186] S1301, sorting the index values ​​of the first chaotic sequence A2 in ascending order of element values ​​to obtain an index sequence;

[0187] S1302, expand the image by block rows, and rearrange the positions of the pth block to the qth block of the image according to the pth element value q of the index sequence;

[0188] S1303: rearrange the matrix back to the matrix size of the original image to obtain a block-scrambled image.

[0189] In one embodiment, referring to Figure 3 The step of index scrambling the block-scrambled image according to the ascending order of the element values ​​of the second chaotic sequence specifically includes:

[0190] S1401, sorting the index values ​​of the second chaotic sequence A3 in ascending order of element values ​​to obtain an index sequence;

[0191] S1402, expand the image row by row, and rearrange the positions of the pth element to the qth element of the image according to the pth element value q of the index sequence;

[0192] S1403: rearrange the one-dimensional matrix back to the matrix size of the original image to obtain an image after index scrambling, that is, a final encrypted image.

[0193] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. An image encryption method based on DNA coding technology and hyperchaotic system, characterized in that: The following steps are involved: S1, input the image to be encrypted; S2, calculating the hash value of the image to be encrypted as the key of the encryption method; S3, generating initial parameters and block sizes of the Lorenz hyperchaotic system and the Chen hyperchaotic system by using the key, specifically including: S301, dividing the key into 16 segments, each segment being a binary number; K=K1K2…K n …K 16 Among them, K is the key, K n is the nth key fragment, where n is an integer in the range [1,16]; S302, generating initial parameters of the Lorenz hyperchaotic system according to the following formula; Wherein, bin2de(x) converts the binary number x into a decimal number; x1, y1, z1, w1 are the initial values ​​of the components of the Lorenz hyperchaotic system, ranging from [0, 1); d is the parameter of the Lorenz hyperchaotic system, ranging from [-1.2, -0.2); S303, generating initial parameters of the Chen hyperchaotic system according to the following formula; Among them, x2, y2, z2 are the initial values ​​of the components of Chen hyperchaotic system, ranging from [0,1); g is the parameter of Chen hyperchaotic system, ranging from [25,28); S304, generating the size of the blocks according to the following formula; Where mod(x,y) is the modulus of x to y, i and j are the length and width of the block, which are integers in the range [5,9]. S4, using the Lorenz hyperchaotic system to generate DNA encoding rules, DNA decoding rules and DNA operation rules, specifically including: Using d as the parameter of the Lorenz hyperchaotic system, x1, y1, z1, w1 as the initial values ​​of each state component of the Lorenz hyperchaotic system, iteratively obtain the chaotic sequences X1, Y1, Z1, W1 of each state component in the time domain, the interval between adjacent elements of the sequence in the time domain is 1, the lengths of X1, Y1, Z1 are all mn, and the length of W1 is 2mn, where m is the length of the original image and n is the width of the original image; S501, calculate the pseudo-random sequence A1 according to the following formula; A1=mod(floor(X1(1:mn)×2 14 ),256) Where floor(x) means rounding down the real number x, and the elements of A1 are integers in [0,255]. S502, calculating the DNA encoding rule and decoding rule according to the following formula; E1=mod(floor(Y1(1:mn)×2 14 ),8) E2=mod(floor(Z1(1:mn)×2 14 ),8) D=mod(floor(W1(1:mn)×2 14 ),8) Among them, E1 and E2 are encoding rules, D is decoding rule, their elements are integers in [0,7], and each integer represents one encoding and decoding rule; S503, calculating the DNA operation rule according to the following formula; O=mod(floor(W1(mn+1:2mn)×2 14 ),4) The elements of O are integers in [0,3], each integer represents an operation rule; The image to be encrypted undergoes DNA encoding, DNA computing and DNA decoding to obtain a diffused image; Expanding the diffused image so that its size becomes a minimum integer multiple of the block size; Using the Chen hyperchaotic system to generate a first chaotic sequence and a second chaotic sequence; The method of performing block scrambling on the expanded image according to the ascending order of the element values ​​of the first chaotic sequence specifically includes: S1301, sorting the index values ​​of the first chaotic sequence A2 in ascending order of element values ​​to obtain an index sequence; S1302, expand the image by block rows, and rearrange the positions of the pth block to the qth block of the image according to the pth element value q of the index sequence; S1303, rearranging the matrix back to the matrix size of the original image to obtain a block-scrambled image; The step of index scrambling the block-scrambled image according to the ascending order of the element values ​​of the second chaotic sequence specifically includes: S1401, sorting the index values ​​of the second chaotic sequence A3 in ascending order of element values ​​to obtain an index sequence; S1402, expand the image row by row, and rearrange the positions of the pth element to the qth element of the image according to the pth element value q of the index sequence; S1403, rearranging the one-dimensional matrix back to the matrix size of the original image to obtain an image after index scrambling, that is, a final encrypted image; The block-scrambled image is subjected to index scrambling according to the ascending order of the element values ​​of the second chaotic sequence to obtain a final encrypted image.

2. The image encryption method based on DNA coding technology and hyperchaotic system according to claim 1, characterized in that: The state equations of the Lorenz hyperchaotic system are as follows: Among them, x, y, z, and w are the four state components of the Lorenz hyperchaotic system. They represent the partial differentials of x, y, z, and w with respect to time t, respectively. a, b, c, and d are the four parameters of the Lorenz hyperchaotic system. When a=10, When c=28, -1.52≤d≤-0.06, the system is in a hyperchaotic state. In order to avoid the critical parameters causing periodicity of the state components in the time domain, the range of d in the encryption method is [-1.2, -0.2).

3. The image encryption method based on DNA coding technology and hyperchaotic system according to claim 1, characterized in that: The state equations of the Chen hyperchaotic system are as follows: Among them, x, y, z are the three state components of Chen hyperchaotic system, e, f, g are the three parameters of Chen hyperchaotic system, when a=35, b=3, 20≤d≤28.4, the system is in a hyperchaotic state. In order to avoid the critical parameters causing periodicity of state components in the time domain, the range of d in the encryption method is [25,28).

4. The image encryption method based on DNA coding technology and hyperchaotic system according to claim 1, characterized in that: The image to be encrypted undergoes DNA encoding, DNA computing and DNA decoding to obtain a diffused image, which specifically includes: The image to be encrypted P0 is encoded into a DNA sequence C1 according to the DNA encoding rule E1; The chaotic sequence A1 is encoded into the DNA sequence C2 according to the DNA coding rules; DNA sequences C1 and C2 are operated under DNA operation rule O to obtain DNA sequence C3; The DNA sequence C3 is decoded into the image P1 according to the DNA decoding rule D, thereby obtaining the diffused image.

5. The image encryption method based on DNA coding technology and hyperchaotic system according to claim 4, characterized in that: The image to be encrypted P0 is encoded into a DNA sequence C1 according to the DNA encoding rule E1, as follows: Expand the pixel matrix of image P0 row by row to obtain a one-dimensional sequence; Each element of the sequence is converted from a decimal integer of [0,255] to an 8-bit binary number to obtain a binary sequence; The binary sequence adopts corresponding encoding rules according to the corresponding elements of E1; DNA decoding is the reverse process of DNA encoding.

6. The image encryption method based on DNA coding technology and hyperchaotic system according to claim 4, characterized in that: The DNA sequences C1 and C2 are operated under the DNA operation rule O to obtain the DNA sequence C3, which is as follows: Among them, + is DNA addition operation; - is DNA subtraction operation; is the DNA XOR operation; ⊙ is the DNA XOR operation; T(i) represents the i-th element of sequence T, and C(x:y) represents the subsequence of sequence C from the x-th element to the y-th element.

7. The image encryption method based on DNA coding technology and hyperchaotic system according to claim 1, characterized in that: The first chaotic sequence and the second chaotic sequence are generated using the Chen hyperchaotic system as follows: Using g as the parameter of Chen hyperchaotic system, using x2, y2, z2 as the initial values ​​of each state component of Chen hyperchaotic system, the chaotic sequence X2, Y2, Z2 of each state component in the time domain is iterated, the interval between adjacent elements in the time domain is 1, and the length of X2 is The lengths of Y2 and Z2 are both M×N; The first chaotic sequence A2 and the second chaotic sequence A3 are calculated as follows; Among them, abs(x) represents the absolute value of x, [x,y] represents the concatenation of sequence x and sequence y, and floor(x) represents rounding down the real number x.

8. An image encryption method based on DNA coding technology and hyperchaotic system according to any one of claims 1 to 7, characterized in that: The expanded image is block-scrambled according to the ascending order of the element values ​​of the first chaotic sequence, specifically comprising: Sort the index values ​​of the first chaotic sequence A2 in ascending order of element values ​​to obtain an index sequence; Expand the image by block rows, and rearrange the positions of blocks p to q according to the pth element value q of the index sequence; Rearrange the matrix back to the matrix size of the original image to obtain the block scrambled image; The step of index scrambling the block-scrambled image according to the ascending order of the element values ​​of the second chaotic sequence specifically includes: Sort the index values ​​of the second chaotic sequence A3 in ascending order of element values ​​to obtain an index sequence; Expand the image row by row, and rearrange the positions of the pth element to the qth element of the image according to the pth element value q of the index sequence; Rearrange the one-dimensional matrix back to the matrix size of the original image to obtain the index scrambled image, that is, the final encrypted image.

Citation Information

Patent Citations

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

    CN108365947A

  • Image encryption algorithm based on quantum chaotic mapping and DNA encoding

    CN108665404A

  • Color quantum image encryption and decryption method based on multi-chaos and DNA operation

    CN113297606A