Image encryption method based on V-shaped transformation and modular inversion matrix

Through the image encryption method based on V -type transformation and modulus matrix, the image encryption is weak, low -efficiency or security in existing technologies, and achieves high -efficiency and secure image encryption effects.

CN119383274APending Publication Date: 2025-01-28GUILIN TOURISM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411408615.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing image encryption methods have problems such as weak robustness, low encryption efficiency or weak security, making it difficult to effectively protect the security of images during network transmission and storage.

Method used

Adopting image encryption methods based on V -type transformation and modulus matrix, by the steps such as generating key, chaotic sequence integer, local diffusion operations, global diffusion operations, matrix remodeling, and image disruption, the image is achieved efficiently encrypted.

Benefits of technology

Improve the efficiency and security of encryption, realize the security of image content in network transmission and storage procedures, and the encryption effect is good, which can effectively resist hackers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383274A_ABST
    Figure CN119383274A_ABST
Patent Text Reader

Abstract

As an important visual information carrier in the big data era, images are continuously spread and widely applied in the fields of business, medicine, education, military and the like. In order to ensure the security of image contents, the invention provides an image encryption method based on V-shaped transformation and a modular inverse matrix. Firstly, in combination with Logistic mapping and Infinite Collapse Map (ICM), a new two-dimensional hyper-chaotic mapping (2-dimensional Logistic and Infinite Collapse Map, 2D-LICM) is proposed, and the performance of the new two-dimensional hyper-chaotic mapping is superior to that of a seed mapping in the index aspects of a bifurcation diagram, a phase diagram, a Lyapunov index, a sample entropy and the like; secondly, in a diffusion stage, performing block processing on the original image, and performing matrix multiplication on each block matrix and the constructed chaotic matrix with modular inverse matrix characteristics; thirdly, forward XOR diffusion and backward XOR diffusion are carried out to change pixel values in the image; and finally, in a scrambling stage, disorganizing pixel positions in the image by using V-type transformation to generate an encrypted image. Experimental results and method analysis show that the method is good in encryption effect, high in security and efficient, and can be used for protecting the security of image content transmission and storage under a network platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an information encryption technology, in particular to an image encryption method. Background Art

[0002] With the rapid development and widespread application of multimedia technology and the Internet, more and more people can store and transmit information through the Internet and computers. Digital images are one of the common ways to express information in daily life. More and more people upload digital images to the Internet for sharing and storage. However, while people enjoy the convenience of the Internet, they also face a series of network information security issues. Encrypting images before transmitting or storing them is an important means to ensure the security of image transmission and storage. Therefore, image encryption has become a hot issue in academia and industry.

[0003] Digital images are intuitive, vivid, vivid, informative, highly correlated, and highly redundant. With the dramatic increase in image data, the improvement in computer performance and hacker attack capabilities, a variety of image encryption methods have been proposed. However, current image encryption methods often have problems such as weak robustness, low encryption efficiency, or weak security.

[0004] In order to protect the security of image network transmission and storage, based on the V-type scanning method, with the help of matrix multiplication and modular inverse operation, an image encryption method based on V-type transformation and modular inverse matrix is ​​proposed. This method improves the encryption efficiency and enhances the security of the method. Summary of the invention

[0005] The purpose of the present invention is to improve encryption efficiency and security, and to propose an image encryption method based on V-type and modular inverse matrices.

[0006] Technical solution of the present invention: To achieve the above-mentioned purpose of the invention, the technical solution adopted is an image encryption method based on V-type transformation and modular inverse matrix, and the encryption steps are described in detail as follows: Step 1: Generate a key: Let the original image P , whose size is m×n ,Require m and n are all even numbers; using the hash function SHA-256 P Perform calculations to obtain hash values h ;Will h Divide every 8 bits into equal parts, and we get k 1 , k 2,..., k 16 ; Using formulas (1)-(6), calculate: x 0. y 0 、a and b ; h=hash ( P , SHA-256), (1) k s =hex 2 dec ( h (4( s -1)+1:4 s )) , s =1, 2, ..., 16, (2) x 0= sum ( k 1, k 2, k 3, k 4) / 10 6 , (3) y 0= sum ( k 5, k 6, k 7, k 8) / 10 6 , (4) a =50+ sum ( k 9, k 10 , k 11 , k 12 ) / 10 6 , (5) b =100+ sum ( k 13 , k 14 , k 15 , k 16 ) / 10 6 , (6) in, hash (•) is a hash function, hex 2 dec (•) is the function to convert hexadecimal number to decimal number and sum ( • ) is the summation function; Step 2: Generate chaotic sequence: Use the 2D-LICM (2-dimensional Logistic and Infinite Collapse Map) and x 0, y 0 and a , b Iteration t 0+ 5mn / 4 times and discard the previous t 0 sequence values, both lengths are 5mn / 4 Chaos Sequence X,Y ; x t+1 = cos [4( a +2) x t (1- x t )+( b +2)(1- x t )(1- y t 2 ))], (7) y t+1 = sin [( b +2) sin (9 / y t )+( a +2) x t y t ]; (8) Step 3: Integerization of chaotic sequence: Use formulas (9)-(12) to X , Y After integer processing, we get two lengths of mn / 4Sequence A and B , and both lengths are mn sequence X 1, Y 1, A = floor ( X (1: mn / 4)×10 4 ), (9) B = floor ( Y (1: mn / 4)×10 4 ), (10) X 1 =mod ( floor ( X ( mn / 4+1: mn / 4 +mn)× 10 4 ),256), (11) Y 1 =mod ( floor ( Y(mn / 4+1: mn / 4 +mn )×10 4 ),256); (12) Step 4: Local diffusion operation: Construct the chaotic diffusion matrix as: , (13) in, k= 1, 2, ..., mn / 4; A ( k )'s determinant | A ( k )| = 2 k -1 and | A ( k )|and the greatest common divisor of 256 gcd (| A ( k )| , 256) = 1 , in gcd (•) is the greatest common divisor function; P Divide mn / 4 A set of image patches of size 2×2 { P k}, use formula (14) to transform each image block P k and A k Multiplying them, we get the matrix B k ; In order from top to bottom and from left to right, the matrix set { B k}Combined into images B ; B k = mod ( Pk * A k ,256), (14) in, k= 1, 2, ... , mn / 4, * is the matrix multiplication operator; Step 5: Global diffusion operation: Using formulas (15) and (16), B Perform forward XOR diffusion and backward XOR diffusion, C ( i ) =C ( i-1 )⊕ X 1( i )⊕ B ( i ), (15) D ( j ) =D ( j+1 )⊕ Y 1( j )⊕ C ( j ), (16) in, i =1, 2, ..., mn ; j=mn, mn -1, ... , 1 ; C (0)=0, D (mn) = Y 1(mn)⊕ C (mn); Step 6: Matrix reshaping: Using formula (17), reshape the vector D Reconstructed to size m×n matrix E , E=reshape ( D,m,n ), (17) in, reshape (•) is to reshape the vector into a matrix; Step 7: Image scrambling: Use V-type transformation to achieve E The encrypted image can be obtained by scrambling R .

[0007] The method according to claim 1 is characterized in that: in step 7, the V-type transformation refers to: a transformation of changing the pixel position according to a V-type scanning method, specifically: E In the V-shaped scanning matrix arrangement mode, first, from the middle position of the first row (1,n / 2) to traverse and take elements; secondly, move one position to the left, from (1, n / 2-1), and then follow the "V" shape to take (1, n / 2-1)→(2, n / 2)→(1, n / 2+1) until the matrix boundary is reached; finally, from the next V-shaped position (1, n / 2-2) to start traversal, and follow the "V" shape to take (1, n / 2-2)→(2, n / 2-1)→(3, n / 2)→(2, n / 2+1)→(1, n / 2+2) until the matrix boundary is reached; repeat the above steps until all elements of the matrix are traversed, and ( n -1) / 2+ m vectors, connect the first and last elements of these vectors in sequence, and arrange them together to transform them into a vector with a length of mn Vector Q ;Will Q Convert to a size of m×n of R , which is the scrambled image.

[0008] During the decryption process, the same chaotic sequence is used to encrypt the image. R Perform decryption to restore the original image P , the decryption process is the reverse process of encryption.

[0009] Beneficial effects: In order to improve encryption efficiency and security, an image encryption method based on V-type transformation and modular inverse matrix is ​​proposed. The main contributions are: (1) A new two-dimensional hyperchaotic map (2-dimensional Logistic and Infinite Collapse Map, 2D-LICM) is designed. The model consists of Logistic map and ICM map, which can show more complex dynamic behavior; (2) An image encryption algorithm based on V-type transformation and modular inverse matrix is ​​proposed; (3) Experimental results and method analysis show that the new method has good encryption effect, strong security and high efficiency, and can achieve network transmission and storage security of image content. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 :Image encryption flow chart based on V-type transformation and modular inverse matrix; Figure 2 : original image; Figure 3 : Schematic diagram of V-type transformation with a matrix size of 4×5; Figure 4 : Encrypted image. DETAILED DESCRIPTION

[0011] Figure 1 : Image encryption flow chart based on V-type transformation and modular inverse matrix.

[0012] The programming software used is Matlab R 2023 a , select Figure 2 The Boat.512 grayscale image of size 512×512 is shown as the original image P The proposed image encryption method based on V-type transformation and modular inverse matrix is ​​adopted, and its encryption process is described in detail as follows.

[0013] Step 1: Generate key: Use hash function SHA-256 and formula (1)-(6) to get x 0=0.1058 , y 0 = 0.1477 and a =50.1006 , b =100.1404.

[0014] Step 2: Generate chaotic sequence: Use the 2D-LICM (2-dimensional Logistic and Infinite Collapse Map) and x 0, y 0 and a , b Iterate 1000+65536+512×512 times and discard the first 1000 sequence values ​​to obtain two chaotic sequences with lengths of 65536+512×512. X,Y .

[0015] Step 3: Integerization of chaotic sequence: Use formulas (9)-(12) to X,Y Perform integer processing to obtain two sequences with a length of 65536 A and B , and two sequences of length 262144 X 1, Y 1.

[0016] Step 4: Local diffusion operation: Use formula (13) to construct the chaotic diffusion matrix A k , k =1, 2, ...,65536. P Divide it into 65536 image blocks of size 2×2, and use formula (14) to convert each image blockP k and A k Multiply to get the matrix B k , from top to bottom, from left to right, the matrix set { B k}Combined into images B。

[0017] Step 5: Global diffusion operation: Using formulas (15) and (16), B Perform forward XOR diffusion and backward XOR diffusion.

[0018] Step 6: Matrix reshaping: Use formula (17) to transform the vector D Reshape into a matrix of size 512×512 E。

[0019] Step 7: Image scrambling: Using the established V-type transformation, such as Figure 3 As shown; to achieve E The encrypted image matrix can be obtained by scrambling R ,like Figure 4 shown.

[0020] In the decryption process, the same chaotic sequence is used to decrypt the encrypted image to obtain the original image. Figure 2 The decryption process is the reverse process of encryption.

Claims

1. An image encryption method based on V-type transformation and modular inverse matrix, characterized in that: The encryption process includes the following steps: Step 1: Generate a key: Let the original image P , whose size is m×n ,Require m and n are all even numbers; using the hash function SHA-256 P Perform calculations to obtain hash values h ; Will h Divide every 8 bits into equal parts, and we get k 1 , k 2,..., k 16 ; Using formulas (1)-(6), calculate: x 0. y 0 、 a and b ; h=hash ( P ,SHA-256), (1) k s =hex 2 dec ( h (4( s -1)+1:4 s )) , s =1, 2 , ..., 16, (2) x 0= sum ( k 1, k 2, k 3, k 4) / 10 6 , (3) y 0= sum ( k 5, k 6, k 7, k 8) / 10 6 , (4) a =50+ sum ( k 9, k 10 , k 11 , k 12 ) / 10 6 , (5) b =100+ sum ( k 13 , k 14 , k 15 , k 16 ) / 10 6 , (6) in, hash (•) is a hash function, hex 2 dec (•) is the function to convert hexadecimal number to decimal number and sum ( • ) is the summation function; Step 2: Generate chaotic sequence: Use the 2D-LICM (2-dimensional Logistic and Infinite Collapse Map) and x 0, y 0 and a , b Iteration t 0+ 5mn / 4 times and discard the previous t 0 sequence values, both lengths are 5mn / 4 Chaos Sequence X,Y ; x t+1 = cos [4( a +2) x t (1- x t )+( b +2)(1- x t )(1- y t 2 ))], (7) y t+1 = sin [( b +2) sin (9 / y t )+( a +2) x t y t ]; (8) Step 3: Integerization of chaotic sequence: Use formulas (9)-(12) to X , Y After integer processing, we get two lengths of mn / 4Sequence A and B , and both lengths are mn sequence X 1, Y 1, A = floor ( X (1: mn / 4)×10 4 ), (9) B = floor ( Y (1: mn / 4)×10 4 ), (10) X 1 =mod ( floor ( X ( mn / 4+1: mn / 4 +mn)× 10 4 ),256), (11) Y 1 =mod ( floor ( Y(mn / 4+1: mn / 4 +mn )×10 4 ),256); (12) Step 4: Local diffusion operation: Construct the chaotic diffusion matrix as: , (13) in, k= 1, 2, ..., mn / 4; A ( k )'s determinant | A ( k )| = 2 k -1 and | A ( k )|and the greatest common divisor of 256 gcd (| A ( k )| , 256) = 1 , in gcd (•) is the greatest common divisor function; P Divide mn / 4 image blocks of size 2×2 { P k }, use formula (14) to transform each image block P k and A k Multiplying them, we get the matrix B k ; In order from top to bottom and from left to right, the matrix set { B k }Combined into images B ; B k = mod ( P k * A k ,256), (14) in, k= 1, 2, ... , mn / 4, * is the matrix multiplication operator; Step 5: Global diffusion operation: Using formulas (15) and (16), B Perform forward XOR diffusion and backward XOR diffusion, C ( i ) =C ( i-1 )⊕ X 1( i )⊕ B ( i ), (15) D ( j ) =D ( j+1 )⊕ Y 1( j )⊕ C ( j ), (16) in, i =1, 2, ..., mn ; j=mn, mn -1, ... , 1 ; C (0)=0, D (mn) = Y 1(mn)⊕ C (mn); Step 6: Matrix reshaping: Using formula (17), reshape the vector D Reconstructed to size m×n matrix E , E=reshape ( D,m,n ), (17) in, reshape (•) is to reshape the vector into a matrix; Step 7: Image scrambling: Use V-type transformation to achieve E The encrypted image can be obtained by scrambling R .

2. The method according to claim 1, characterized in that: In step 7, the V-type transformation refers to a transformation of changing the pixel position according to a V-type scanning method, specifically: E In the V-shaped scanning matrix arrangement mode, first, from the middle position of the first row (1, n / 2) Start traversing and taking elements; Next, shift one position to the left, from (1, n / 2-1), press "V" shape to take (1, n / 2-1)→(2, n / 2)→(1, n / 2+1) until the matrix boundary is reached; finally, from the next V-shaped position (1, n / 2-2) to start traversal, press "V" shape to take (1, n / 2-2)→(2, n / 2-1)→(3, n / 2)→(2, n / 2+1)→ (1, n / 2+2) until the matrix boundary is reached; repeat the above steps until all elements of the matrix are traversed, and ( n -1) / 2+ m vectors, connect the first and last elements of these vectors in sequence, and arrange them together to transform them into a vector with a length of mn Vector Q ; Will Q Convert to a size of m×n of R , which is the scrambled image.