Multi-image encryption method based on multi-directional scanning model and DNA mask operation
Through the multi-image encryption method based on multi-directional scanning model and DNA mask operation, the problem that traditional encryption algorithms cannot effectively encrypt digital images is solved, and the efficiency and security of encrypting multiple images at one time is achieved. The flexibility of DNA mask operation enhances the reliability of encryption.
Patent Information
- Application Number
- CN202210777848.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-07-04
AI Technical Summary
Traditional data encryption algorithms cannot effectively encrypt digital images, and after the network information transmission capability is improved in the big data era, the efficiency and security requirements of encryption algorithms are further improved.
Multi-image encryption method based on multi-directional scanning model and DNA mask operation is adopted to achieve efficient and secure encryption of multiple images at one time by building large images, generating key streams, generating chaotic sequences, building image cubes, calculating scanning orders, establishing multi-directional scanning models, generating mask matrix and regular matrix, dynamic DNA encoding and DNA mask operation.
This method breaks through the encryption capacity limitation and can encrypt multiple digital images at one time, improving the security and efficiency of the encryption process. The DNA mask operation is dynamically performed at the pixel level, enhancing the flexibility of DNA operation. The experimental results show that the method has extremely high security and reliability.
Smart Images

Figure CN114938266B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an information encryption technology, in particular to a multi-image encryption method. Background Art
[0002] In recent years, people have paid more and more attention to the security issues of networks and information systems. Images have become an important information carrier in people's daily lives. They can convey a large amount of information intuitively and vividly, and are widely used in communications, military and medical fields. However, due to the openness of the Internet, information is easily intercepted or leaked during network transmission. Data hiding and image encryption are common methods to keep images secure, but the former is subject to some limitations due to insufficient embedding capabilities. In contrast, image encryption can effectively protect images. Therefore, how to encrypt images effectively and securely becomes very important.
[0003] Because images have large data capacity and high correlation between pixels and data redundancy, traditional data encryption algorithms cannot encrypt digital images. In recent years, various encryption algorithms based on chaos have been proposed, such as chaos-based image encryption, compressed sensing-based image encryption, and genetic algorithm-based image encryption. With the advent of the big data era, network information transmission capabilities have also been improved, and the requirements for the efficiency and security of encryption algorithms have also been further improved.
[0004] In order to protect image information from being stolen and improve the security and efficiency of encryption during network transmission, a multi-image encryption method based on multi-directional scanning model and DNA mask operation is proposed. This method can encrypt multiple images at one time, improving the security and efficiency of the encryption process. Summary of the invention
[0005] The purpose of the present invention is to protect image information from being stolen and to improve the security and efficiency of encryption during network transmission. A multi-image encryption method based on a multi-directional scanning model and DNA mask operation is proposed.
[0006] Technical solution of the present invention: To achieve the above-mentioned purpose of the invention, the technical solution adopted is a multi-image encryption method based on a multi-directional scanning model and DNA mask operation. The encryption steps are described in detail as follows:
[0007] Step 1: Build a large image: According to certain rules, k The size is m × n The plaintext image I 1 , I 2 , …, I k Building into a large image I b;
[0008] Step 2: Generate key stream: Calculate using SHA-256 I b 256-bit hash value of H ;Will H Divided by 8 bits, H = k 1 , k 2 , …, k 32 ; Randomly select external input parameters c 1 , c 2 , c 3 , c 4 , using formulas (2)-(4) to calculate the two sets of initial values and control parameters of the two-dimensional Logistic-Adjusted-Chebyshev mapping shown in formula (1), that is, the initial value x 0 1 , y 0 1 , control parameter γ 1 and initial value x 0 2 , y 0 2 , control parameter γ 2 ,
[0009] , (1)
[0010] , (2)
[0011] , (3)
[0012] , (4)
[0013] Among them, arccos(•) represents the inverse cosine function, mod(•) represents the modulo operation, hex 2 dec (•) means converting a hexadecimal number to a decimal number;
[0014] Step 3: Generate chaotic sequence: Using initial value x 0 1 , y 01 and the control parameter γ 1 , and perform the following on formula (1): mn Iterations, we can get two lengths of mn Chaotic sequence X ={ x i}, Y { y i}; Using the initial value x 0 2 , y 0 2 and the control parameter γ 2 , and perform the following on formula (1): k Iterations, we can get two lengths of k Chaotic sequence U ={ u i}, V { v i};
[0015] Step 4: Construct the image cube: According to certain rules, I 1 , I 2 , …, I k Convert to a size of m × n × k Image Cube P 1 ;
[0016] Step 5: Calculate the scan order: Calculate P 1 The axis scanning order of s ,
[0017] s =mod( floor (( p 1 + p 2 + p 3 + p 4 ) / 4)×10 14 , 6)+1, (5)
[0018] in, floor (•) represents the floor function; the scanning order rule is:
[0019]
[0020] in, x , y , z They are P 1 The coordinate axes of the three-dimensional coordinate system;
[0021] Step 6: Build a multi-directional scanning model: Calculation x , y , z The scanning starting position and scanning direction in the coordinate axis direction;
[0022] x Coordinate axis direction:
[0023] , (6)
[0024] in,( r y x , r z x )for x In the direction of the coordinate axis P 1 of k The starting position of the layer image scan, r s x is the scanning direction rule;
[0025] y Coordinate axis direction:
[0026] , (7)
[0027] in,( r x y , r z y )for y In the direction of the coordinate axis P 1 of m The starting position of the layer image scan, r s y is the scanning direction rule;
[0028] z Coordinate axis direction:
[0029] , (8)
[0030] in,( r xz , r y z )for z In the direction of the coordinate axis P 1 of n The starting position of the layer image scan, r s z is the scanning direction rule; the scanning direction rule is defined as:
[0031]
[0032] use( r y x , r z x , r s x ),( r x y , r z y , r s y ),( r x z , r y z , r s z ) respectively P 1 conduct x , y , z By scanning in multiple directions along the coordinate axis, we can obtain a m × n × k The scrambled cube P 2 ;
[0033] Step 7: Generate mask matrix and rule matrix: Calculate,
[0034] m i 1 =mod( floor ( x i ×10 14 ), 256), (9)
[0035] gi 1 =mod( floor ( y i ×10 14 ), 4)+1, (10)
[0036] in, i =1, 2, …, mn , x i ∈ X , y i ∈ Y , m i 1 ∈ M 1 , g i 1 ∈ G 1 ;Will M 1 and G 1 Convert to size m × n The mask matrix M 2 and the rule matrix G 2 ; The DNA mask operation rules are:
[0037]
[0038] Step 8: Dynamic DNA encoding: The DNA encoding rules are:
[0039]
[0040] right x In the direction of the coordinate axis P 2 of k Layer image is dynamically encoded in DNA, where the first j Layer image, using DNA coding rules f j DNA coding,
[0041] f j =mod( floor ( u j ×10 14 ), 8)+1, (11)
[0042] in, j=1, 2, …, k , u j ∈ U , f j ∈ F ;Will k After all the layer images are encoded with DNA, we can get a m ×4 n × k DNA-encoded cube P 3 ; Using DNA coding rules 1 pair M 2 DNA encoding can be obtained with a size of m ×4 n DNA mask matrix M 3 ;
[0043] Step 9: DNA mask calculation: According to G 2 right P 3 and M 3 Performing DNA calculations, we can obtain a m ×4 n × k The diffusion cube P 4 ;
[0044] Step 10: Dynamic DNA Decoding: x In the direction of the coordinate axis P 4 of k Layer DNA matrix for dynamic DNA decoding, where the first j Layer image, using DNA coding rules q j Decoding DNA,
[0045] q j =mod( floor ( v j ×10 14 ), 8)+1, (12)
[0046] in, j =1, 2, …, k , v j ∈ V , q j ∈ Q ; we can get a size ofm × n × k Image Cube P 5 ,Will x In the direction of the coordinate axis P 5 of k The layer image is split into k The size is m × n Encrypted image of E 1 , E 2 , …, E k .
[0047] In the decryption process, the encrypted image is decrypted using the same chaotic sequence to restore the original image. The decryption process is the inverse process of encryption.
[0048] Beneficial effects: In order to protect image information from being stolen and to improve the security and efficiency of encryption during network transmission, a multi-image encryption method based on a multi-directional scanning model and DNA mask operation is proposed. The main contributions are as follows: (1) It breaks through the encryption capacity limitation and can encrypt multiple digital images at one time; (2) The entire encryption process is scrambled and diffused at the stereoscopic image level, and the multi-image encryption effect is significant; (3) The DNA mask operation is performed dynamically at the pixel level, which enhances the flexibility of the DNA operation; (4) Experimental results and comparative analysis show that this method has extremely high security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 : Encryption flow chart;
[0050] Figure 2 : original image set;
[0051] Figure 3 : Encrypted image set. DETAILED DESCRIPTION
[0052] The implementation process of the present invention is further described in detail below with reference to specific drawings and examples.
[0053] Figure 1 It is the encryption flow chart of this method.
[0054] The programming software used is Matlab R2016a, Figure 2 The four grayscale images shown, all with a size of 512×512, are used as experimental objects.
[0055] Step 1: Construct a large image: According to certain rules, four plaintext images of size 512×512 are constructed into a large image. I b .
[0056] Step 2: Generate key stream: Calculate using SHA-256 I b 256-bit hash value of H ;Will H Divided by 8 bits, H = k 1 , k 2 , …, k 32 ; Randomly select external input parameters c 1 , c 2 , c 3 , c 4 , using formulas (2)-(4) to calculate the two sets of initial values and control parameters of the two-dimensional Logistic-Adjusted-Chebyshev mapping shown in formula (1), that is, the initial value x 0 1 , y 0 1 , control parameter γ 1 and initial value x 0 2 , y 0 2 , control parameter γ 2 .
[0057] Step 3: Generate chaotic sequence: Using initial value x 0 1 , y 0 1 and the control parameter γ 1 , iterating formula (1) 262144 times, we can get two chaotic sequences with lengths of 262144. X ={ x i}, Y { y i}; Using the initial value x 0 2 , y0 2 and the control parameter γ 2 , iterating formula (1) 4 times, we can get two chaotic sequences with length 4 U ={ u i}, V { v i}.
[0058] Step 4: Construct an image cube: According to certain rules, convert the four original images into an image cube of size 512×512×4 P 1 .
[0059] Step 5: Calculate the scanning order: Use formula (5) to calculate P 1 The axis scanning order of s .
[0060] Step 6: Establish a multi-directional scanning model: Use formulas (6)-(8) to calculate x , y , z The scanning starting position and scanning direction of the coordinate axis direction; using ( r y x , r z x , r s x ),( r x y , r z y , r s y ),( r x z , r y z , r s z ) respectively P 1 conduct x , y , z By scanning in multiple directions along the coordinate axis, we can get a scrambled cube of size 512×512×4 P 2 .
[0061] Step 7: Generate mask matrix and rule matrix: Generate the mask matrix using formulas (9) and (10) M 2 and the rule matrix G 2 .
[0062] Step 8: Dynamic DNA Encoding: x In the direction of the coordinate axis P 2 The four-layer image is dynamically encoded with DNA, j Layer image, using DNA coding rules f j After DNA encoding, all four layers of images are DNA encoded, and a DNA encoding cube with a size of 512×1024×4 is obtained. P 3 ; Using DNA coding rules 1 pair M 2 DNA encoding can be performed to obtain a DNA mask matrix of size 512×1024 M 3 .
[0063] Step 9: DNA mask calculation: According to G 2 right P 3 and M 3 Performing DNA calculations, we can obtain a diffusion cube of size 512×1024×4 P 4 .
[0064] Step 10: Dynamic DNA Decoding: x In the direction of the coordinate axis P 4 The 4-layer DNA matrix performs dynamic DNA decoding, where the j Layer image, using DNA coding rules q j DNA decoding can be performed to obtain an image cube of size 512×512×4 P 5 ,Will x In the direction of the coordinate axis P 5 By splitting the four layers of images, we can get four encrypted images of size 512×512, as shown in Figure 3 shown.
[0065] In the decryption process, the encrypted image is decrypted using the same chaotic sequence to restore the original image. The decryption process is the inverse process of encryption.
Claims
1. Multi-image encryption method based on multi-directional scanning model and DNA mask operation, It is characterized in that The encryption process includes the following steps: Step 1: Construct a large image: According to certain rules, k plaintext images I of size m×n are constructed. 1 ,I 2 ,…,I k Constructing a large image I b ; Step 2: Generate key stream: Use SHA-256 to calculate I b 256-bit hash value H; divide H into 8 bits, then H = k 1 ,k 2 ,…,k 32 ; Randomly select external input parameter c 1 ,c 2 ,c 3 ,c 4 , using formulas (2)-(4) to calculate the two sets of initial values and control parameters of the two-dimensional Logistic-Adjusted-Chebyshev mapping shown in formula (1), that is, the initial value x 0 1 ,y 0 1 , control parameter γ 1 and the initial value x 0 2 ,y 0 2 , control parameter γ 2 , Among them, arccos(·) represents the arccosine function, mod(·) represents the modulo operation, and hex2dec(·) represents the conversion of a hexadecimal number to a decimal number; Step 3: Generate chaotic sequence: Use the initial value x 0 1 ,y 0 1 and the control parameter γ 1 , iterate formula (1) mn times, and we can get two chaotic sequences X={x i },Y{y i }; Using the initial value x 0 2 ,y 0 2 and the control parameter γ 2 , iterate formula (1) k times, and we can get two chaotic sequences U={u i },V{v i }; Step 4: Construct the image cube: According to certain rules, 1 ,I 2 ,…,I k Transformed into an image cube P of size m×n×k 1 ; Step 5: Calculate the scanning order: Calculate P 1 The coordinate axis scanning order s, s=mod(floor((p 1 +p 2 +p 3 +p 4 ) / 4)×10 14 ,6)+1,(5) Among them, floor(·) represents the floor function; the scanning order rule is: Among them, x, y, z are P 1 The coordinate axes of the three-dimensional coordinate system; Step 6: Establish a multi-directional scanning model: calculate the scanning starting position and scanning direction in the x, y, and z coordinate axis directions; x-axis direction: Among them, (r y x ,r z x ) is P in the x-axis direction 1 The k-layer image scanning starting position, r s x is the scanning direction rule; Y-axis direction: Among them, (r x y ,r z y ) is P in the y-axis direction 1 The starting position of the m-layer image scan, r s y is the scanning direction rule; z-axis direction: Among them, (r x z ,r y z ) is P in the z-axis direction 1 The starting position of the n-layer image scan, r s z is the scanning direction rule; the scanning direction rule is defined as: Utilize (r y x ,r z x ,r s x ), (r x y ,r z y ,r s y ), (r x z ,r y z ,r s z ) respectively for P 1 Perform multi-directional scanning in the x, y, and z coordinate axes to obtain a scrambled cube P of size m×n×k 2 ; Step 7: Generate mask matrix and rule matrix: Calculate, m i 1 =mod(floor(x i ×10 14 ),256),(9) g i 1 =mod(floor(y i ×10 14 ),4)+1,(10) Where i = 1, 2, ..., mn, x i ∈X,y i ∈Y,m i 1 ∈M 1 , g i 1 ∈G 1 ; M 1 and G 1 Converted into a mask matrix M of size m×n respectively 2 and the rule matrix G 2 ; The DNA mask operation rules are: Step 8: Dynamic DNA encoding: The DNA encoding rules are: P in the x-axis direction 2 The k-layer images are dynamically encoded by DNA, where the j-th layer image adopts the DNA encoding rule f j DNA coding, f j =mod(floor(u j ×10 14 ),8)+1,(11) Where j = 1, 2, ..., k, u j ∈U,f j ∈F; After DNA encoding all k-layer images, we can get a DNA encoding cube P with a size of m×4n×k 3 ; Using DNA coding rules 1 to M 2 DNA encoding is performed to obtain a DNA mask matrix M of size m×4n 3 ; Step 9: DNA mask operation: According to G 2 P 3 With M 3 Performing DNA calculations, we can obtain a diffusion cube P of size m×4n×k 4 ; Step 10: Dynamic DNA decoding: P in the x-axis direction 4 The k-layer DNA matrix is used for dynamic DNA decoding, where the j-th layer image uses the DNA encoding rule q j Decoding DNA, q j =mod(floor(v j ×10 14 ),8)+1,(12) Where j = 1, 2, ..., k, v j ∈V,q j ∈Q; we can get an image cube P of size m×n×k 5 , change P in the x-axis direction 5 By splitting the k-layer image, we can get k encrypted images E with the size of m×n. 1 ,E 2 ,…,E k .
Citation Information
Patent Citations
Image encryption method based on hyperchaotic system and multi-level scrambling
CN108366181A
Image encryption method based on center rule and three-dimensional bit plane
CN114362918A