CN110838908B - Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion - Google Patents
Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion Download PDFInfo
- Publication number
- CN110838908B CN110838908B CN201911097159.9A CN201911097159A CN110838908B CN 110838908 B CN110838908 B CN 110838908B CN 201911097159 A CN201911097159 A CN 201911097159A CN 110838908 B CN110838908 B CN 110838908B
- Authority
- CN
- China
- Prior art keywords
- matrix
- random
- formula
- image
- transformation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 272
- 238000000034 method Methods 0.000 title claims abstract description 92
- 230000009466 transformation Effects 0.000 title claims abstract description 89
- 230000004927 fusion Effects 0.000 title claims abstract description 26
- 238000013507 mapping Methods 0.000 claims abstract description 14
- 238000003491 array Methods 0.000 claims description 15
- 238000004364 calculation method Methods 0.000 claims description 10
- 230000008030 elimination Effects 0.000 claims description 6
- 238000003379 elimination reaction Methods 0.000 claims description 6
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 claims description 4
- 125000003275 alpha amino acid group Chemical group 0.000 claims description 3
- 150000001875 compounds Chemical class 0.000 claims description 3
- 238000011084 recovery Methods 0.000 abstract description 14
- 230000008569 process Effects 0.000 abstract description 6
- 230000000739 chaotic effect Effects 0.000 abstract 1
- 230000007547 defect Effects 0.000 abstract 1
- 238000004422 calculation algorithm Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 230000007704 transition Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Processing (AREA)
Abstract
The invention provides an image encryption and decryption method combining GF domain matrix transformation and random layering fusion, which combines plaintext attribute of an image to be encrypted and a user key, adopts a multi-round iteration method, randomly generates a current round random layering matrix and a scrambling transformation matrix which are equal to the image to be encrypted through chaotic mapping, then carries out difference operation on the image to be encrypted and the random layering matrix, carries out matrix transformation on the difference matrix, then carries out fusion encryption on the difference matrix and the layering matrix, and generates an encrypted image through multi-round iteration. Compared with the prior art, the method expands the equal-scale matrix scrambling method to GF domain and gives out a corresponding recovery method, and introduces the plaintext attribute value of the image to be encrypted, so that the encryption process is closely related to the plaintext attribute; the defect that the magic cube scrambling can only shift pixels or bits of an image according to fixed rows and columns is avoided through random layering of the image to be encrypted.
Description
Technical Field
The invention belongs to the field of image information security and digital image signal processing intersection, relates to an image encryption and decryption method, and in particular relates to an image encryption and decryption method with GF matrix transformation and random hierarchical fusion.
Background
In the field of digital image encryption, the most extensive and flexible image encryption method is a recoding technology of images, namely an image scrambling technology, in the same space. Compared with image encryption, digital image scrambling focuses on the recoding technology of images in the same space of the images, and the operation of a single image encryption link is completed with the smallest cost as possible so as to reduce the processing cost of the whole image encryption algorithm. Digital image scrambling is also a key preprocessing technology in the current technologies of steganography, digital watermarking, information splitting and visual cryptography. Is widely paid attention to domestic and foreign scholars and obtains a great research result.
In connection with digital image scrambling, various digital image scrambling methods have been proposed, such as magic square conversion, hilbert conversion, gray conversion, arnold conversion, and the like. Among them, the image scrambling method based on matrix transformation represented by Arnold transformation is widely used.
The traditional image scrambling method based on matrix transformation can be summarized as X '=AX mod N, wherein A is an n×n dimension transformation matrix, X, X' ∈N n Is an N-dimensional vector before and after scrambling, and satisfies determinant |A|modulo N mutual quality of a transformation matrix. When n=2, for a 2-dimensional transformation, X' represents the coordinate vector of pixel values; when n=3, for a 3-dimensional transform, X' represents the RGB color components of the pixel; when n is >3, X' represents the color component of a row or column of pixels for high-dimensional matrix transformation. Since X' =ax mod N is a one-to-one mapping when determinant |a|modulo N is reciprocal, i.e. constitutes a finite number of element rearrangements within a certain defined space, there is a recoverable period T such that i=a T mod N, where I is the unit transform array.
Therefore, in the conventional image scrambling method based on matrix transformation, the periodic scrambling of the images plays an important role. Sun Wei, 1999 (periodicity concerning Arnold transition [ J)]University of North Industrial university, 1999, 1:29-32) explores the periodicity of Arnold transitions and gives the recoverable period T of Arnold transitions at different modes N; qi D X,2000 (A new class of scrambling transformation and its application in the image information covering [ J]Science in China,2000,43 (3): 304-312.) gives the full requirements that the matrix transformation periodically exists, discusses Arnold transformation and Fibonacci-Q transformation, and constructs the image scrambling method of the 3-dimensional color space and the n-dimensional vector space; wang Zehui, 2006 (period of two-dimensional random matrix scrambling transformation and application in image information concealment [ J)]Computer science report, 2006,29 (12): 2218-2225.) and Wang Zehui, 2008 (three-dimensional random) Period of matrix scrambling transformation and application thereof [ J ]]University of Zhongshan university report, 2008,47 (1): 21-25.) discusses the expression and upper bound estimation of the period T under arbitrary modulus N for 2-and 3-dimensional random integer matrices, respectively; on this basis Wang Zehui, 2010 (period of a kind of high-dimensional random matrix scrambling transformation [ J ]]University of Zhongshan university report (Nature science edition), 2010,49 (4): 38-42.) further discusses a class of high-dimensional random integer transform arrays at prime powers n=p m And under the modulus, the precise expression of the period T and the upper bound estimation are carried out. However, the recovery of the scrambled image is performed periodically, which is simple but time-consuming, and the recoverable period T for the n-dimensional matrix transformation is theoretically approaching +..
Aiming at the problem of high computation cost of periodic recovery, some scholars discuss a method for recovering a scrambled image by using a modulo inverse matrix, namely, computing an inverse matrix of A on a modulo NThen press +.>Recovery is performed. For example: kong Tao, 2004 (a new algorithm of Arnold inverse transformation [ J)]Software journal 2004,15 (10): 1558-1564.) and Huang Wai, 2008 (image inverse scrambling algorithm based on Arnold transformation [ J ]]University application math journal A edit, 2008,23 (01): 99-104) reduces the inverse problem of Arnold transformation to a linear equation set solution problem under inequality constraint; weigang, 2007 (digital image scrambling technique based on inverse three-dimensional Arnold transform and periodicity [ J ] ]University of Jiangxi university report 2007,28 (6): 36-38.) gives an inverse of the 3-dimensional and n-dimensional Arnold transforms and applies the 3-dimensional Arnold transforms to image scrambling recovery; lijiang, 2010 (a new n-dimensional generalized Arnold matrix construction method and application thereof in image scrambling [ J ]]The university of Beijing science and technology report 2010,32 (12): 1630-1636.) uses an arithmetic array with an input key to construct a special class of Arnold transform arrays and gives forward and inverse transform solutions.
Kong Tao, 2004, huang Wai, 2008, weigang, 2007, li YongThe river 2010 only focuses on the inversion of a special transformation array, and the application range of the river is narrow. To solve the inversion problem of arbitrary modular N-transform array values and N-dimensional transform arrays, shao Liping, 2008 (matrix transform-based image scrambling inversion problem solution [ J ]]Electronic journal, 2008 (07): 1355-1363.) by constructing special mapping rules, the real number domain accompanies matrix inversion, du Lite mol and claort matrix decomposition inversion, and gaussian-jordan method inversion is generalized to the remainder of the collection Z N The matrix inversion problem of any transformation matrix under the mode N is solved, and the quick recovery of the scrambled image is facilitated. Shao Liping, 2019 (Multi-version backup and restrictive double authentication master Key (t, s, k, n) image splitting [ J) ]The matrix inversion under modulo N is further used for split restoration by the electronics journal, 2019,47 (02): 390-403), giving multi-version backup and restricted double authentication master keys (t, s, k, N) split.
The matrix-based image scrambling method given above is defined in the remaining class set Z N In the above, namely, the matrix transformation with the modulus value of integer N, the determinant |A|mode N mutual quality of the transformation matrix A needs to be satisfied when the transformation matrix is constructed, and the constraint on the A of the transformation matrix is more strict and has no universality.
In addition to the scrambling method based on matrix transformation, another more classical scrambling method is the image scrambling method based on magic square transformation. The position dependence of a pixel or pixel bit is changed by a cyclic shift of a specified row, column of the image. Bao Guanjun, 2002 (magic cube transform and its application in digital image encryption [ J ], computer application, 2002,11 (22): 23-25.) uses chaotic mapping to cyclically shift the image row by row and column by column a specified number of times; liu Xiaoyi, 2008 (a digital image scrambling algorithm based on chaos and magic cube [ J ], chinese safety science journal 2008,07 (18): 111-115 ]) determines the order and number of image rows, columns and diagonal cyclic movements by secret keys; dong Husheng, 2014 (image encryption algorithm based on Henon mapping and magic cube transformation [ J ], computer application and software, 2014,05 (31): 291-294.) scrambling an image by performing a cyclic shift operation on data in each division plane in the 3-dimensional space of the image using magic cube transformation in the 3-dimensional space; ma Cong, 2017 (magic cube principle based image encryption algorithm research [ J ], vinca engineering college of academy of sciences, 2017,04 (18): 108-111.) the image rows and columns are subjected to a cyclic shift a prescribed number of times to obtain a secret image.
Bao Guanjun, 2002, liu Xiaoyi, 2008, dong Husheng, 2014 and Ma Cong, 2017 all use magic square transforms for image scrambling, but only perform cyclic shift operations on specific rows and columns or some fixed image division plane in units of pixels or pixel bits, lacking the flexibility of scrambling processing.
Disclosure of Invention
The image encryption and decryption method based on GF matrix transformation and random hierarchical fusion provided by the invention considers GF (2) P ) The domain addition, subtraction, multiplication and division operations all have closure, and GF (2 P ) The domain arbitrary nonzero polynomial integers have multiplication inverse elements and the inverse elements are not equal under different primitive polynomials; the cyclic shift operation of a specific row and column or a certain fixed image dividing plane by taking pixels or pixel bits as units can be avoided by random hierarchical fusion; therefore, the problems of the conventional image scrambling method based on matrix transformation and magic cube mapping can be solved, and on the basis, the flexibility and the safety of an encryption algorithm can be further improved by introducing plaintext properties and multiple rounds of iteration of the image.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the invention provides an image encryption method by GF matrix transformation and random hierarchical fusion, which comprises the following steps:
Step 1: a P-order grayscale image a= (a) with an input resolution of mxn i,j ) m×n ,a i,j ∈{0,1,…,2 P -1, generating a round random number sequence ks= (K) of length Q from the plaintext attribute of a and the user key and the number of round iterations Q 0 ,K 1 ,…,K Q-1 ) Input GF (2) P ) Primitive polynomials of a domainInitializing encryption wheel parameters qc=0;
step 2: from the QC random number K in ks QC Generating a random layered matrix s= (S) i,j ) m×n ,s i,j ∈{0,1,…,2 P -1, left random transform arrayAnd right random transformation matrix->And C L And C R At GF (2) P ) Determinant of Domain->And->Mould->Non-zero;
step 3: performing a difference operation on A and S to obtain a difference matrix D= (D) i,j ) m×n ;
Step 4: matrix d= (D) i,j ) m×n And left random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D '= (D' i,j ) m×n ;
Step 5: let D '= (D' i,j ) m×n And right random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D "= (D") i,j ) m×n
Step 6: carrying out fusion encryption on the D 'and the S to serve as an image A' after encryption of a QC round;
step 7: updating qc=qc+1, if qc=q, outputting a' as the final encrypted image, otherwise executing steps 2 to 6.
Further, the plaintext attribute selected in step 1 is MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 );
In step 1, a round random number sequence ks= (K) with the length of Q is generated by plaintext attribute, user key and round iteration number Q 0 ,K 1 ,…,K Q-1 ) The specific method of (a) is as follows:
inputting a user key kk epsilon (0, 1), and taking kk epsilon (0, 1) as an initial value x 0 Mapping to 1 10 decimal G ε (0, 1) according to formula (1); then G is taken as a system parameter alpha of the formula (2), and x is taken as 0 Substituting formula (2), driving formula (2) generates a random number sequence ks= (K) in the (0, 1) range of length Q 0 ,K 1 ,…,K Q-1 );
Wherein ms is i Is to S MD5 And S is SHA-1 A 16-system element sequence ms= (ms) obtained by concatenating elements in the sequence i ) 72 I-th element of (a) in the list.
Further, the specific method of the step 2 is as follows:
will K QC As x 0 Generating G according to the formula (1), taking G as a system parameter alpha and x of the formula (2) 0 Substituting formula (2), driving formula (2) to generate (0, 1) range random number sequence k= (k) 0 ,k 1 ,k 2 ,k 3 ,k 4 );
Will k 0 As x 0 Generating G according to the formula (1), and taking G as a system parameter alphaThe driving type (2) generates a random matrix X= (X) with the range of (0, 1) and A equal large i,j ) m×n Then quantize X to a random integer matrix s= (S) as equation (3) i,j ) m×n ;
From k 1 And k 2 Generating left random transform arraysAnd C L At GF (2) P ) Determinant of domainsMould->The specific method is as follows:
step 1, K is taken up 1 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate triangle random matrix under m x m dimension in (0, 1) rangeThen LM is carried out 1 Quantizing the random integer matrix according to (4)>
Step 3, K is taken up 2 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range m×m dimension upper triangle random matrixUM is then processed 1 Quantizing the random integer matrix according to (5)>
From k 3 And k 4 Generating right random transform arraysAnd C R At GF (2) P ) Determinant of Domain->Mould->The specific method is as follows:
step 1, K is taken up 3 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n-dimensional lower triangular random matrixThen LM is carried out 2 Quantizing the random integer matrix according to (7)>
Step 3, K is taken up 4 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n dimension upper triangle random matrixUM is then processed 2 Quantizing the random integer matrix according to (8)>
Further, in step 3, a difference matrix d= (D) is obtained by performing a difference operation between a and S i,j ) m×n The specific method is represented by formula (10):
in the formula (10), a= (a) i,j ) m×n ,S=(s i,j ) m×n ,D=(d i,j ) m×n ;
In step 4, the difference matrix d= (D i,j ) m×n And left random transformation matrix GF (2) P ) Domain modelMatrix transformation results in transformed matrix D '= (D' i,j ) m×n The specific method of (a) is formula (11):
in step 5, D '= (D' i,j ) m×n And right random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D "= (D") i,j ) m×n The specific method is represented by formula (12):
in step 6, the specific method for performing fusion encryption on D' and S is as shown in formula (13):
an image decryption method by GF matrix transformation and random hierarchical fusion comprises the following steps:
step 1: an image a ' = (a ' to be decrypted of P-gradation of m×n in input resolution ' ij ) m×n ,a′ i,j ∈{0,1,…,2 P -1, a random number sequence ks= (K) of length Q is generated from the plaintext attribute of the decrypted image a, the user key and the number of round iterations Q 0 ,K 1 ,…,K Q-1 ) Input GF (2) P ) Primitive polynomials of a domainInitializing a decryption wheel parameter qc=q-1;
step 2: from the QC random number K in ks QC Generating a random layered matrix s= (S) i,j ) m×n ,s i,j ∈{0,1,…,2 P -1, left random transform arrayAnd right random transformation matrix->And C L And C R At GF (2) P ) Determinant of Domain->And->Mould->Non-zero;
step 3: performing difference operation on the image A 'to be decrypted and the random hierarchical matrix S to obtain a difference matrix D';
Step 5: the difference matrix D' is passed through GF (2 P ) Domain modelInverse matrix->Restoring to the difference matrix D ' = (D ' before transformation ' i,j ) m×n ;
Step 6: the difference matrix D' before transformation is passed through GF (2 P ) Domain modelInverse matrix->Restoring to original difference matrix D= (D) i,j ) m×n ;
Step 7: the original difference matrix D and the random layered matrix S are fused and decrypted to obtain a round of decrypted image A= (a) i,j ) m×n ;
Step 8: updating qc=qc-1, if QC is less than 0, outputting a as the final decrypted image, otherwise executing steps 2-7.
Further, the plaintext attribute selected in step 1 is MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 );
In step 1, a round random number sequence ks= (K) of (0, 1) range of length Q is generated from plaintext attribute and user key and round iteration number Q 0 ,K 1 ,…,K Q-1 ) The specific method of (a) is as follows:
inputting a user key kk epsilon (0, 1), and taking kk epsilon (0, 1) as an initial value x 0 Mapping to 1 10 decimal G ε (0, 1) according to formula (1); then G is taken as a system parameter alpha of the formula (2), and x is taken as 0 Substituting formula (2), driving formula (2) generates a random number sequence ks= (K) in the (0, 1) range of length Q 0 ,K 1 ,…,K Q-1 );
Wherein ms is i Is to S MD5 And S is SHA-1 A 16-system element sequence ms= (ms) obtained by concatenating elements in the sequence i ) 72 I-th element of (a) in the list.
Further, the specific method of the step 2 is as follows:
will K QC As x 0 Generating G according to formula (1), using G as system parameter mu of formula (2), and x 0 Substituting formula (2), driving (0, 1) -range random number sequence k= (k) generated by formula (2) 0 ,k 1 ,k 2 ,k 3 ,k 4 )。
Will k 0 As x 0 Generating G according to formula (1), and using G as system parameter alpha, driving formula (2) to generate random matrix X= (X) with the range of (0, 1) and A' equal large i,j ) m×n Then quantize X to a random integer matrix s= (S) as equation (3) i,j ) m×n ;
From k 1 And k 2 Generating left random transform arraysAnd C L At GF (2) P ) Determinant of Domain->Mould->The specific method is as follows:
step 1: will k 1 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate triangle random matrix under m x m dimension in (0, 1) rangeThen LM is carried out 1 Quantizing the random integer matrix according to (4)>
Step 3: will k 2 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range m×m dimension upper triangle random matrixUM is then processed 1 Quantizing the random integer matrix according to (5)>
From k 3 And k 4 Generating right random transform arraysAnd C R At GF (2) P ) Determinant of Domain->Mould->The specific method is as follows:
step 1: will k 3 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n-dimensional lower triangular random matrix Then LM is carried out 2 Quantizing the random integer matrix according to (7)>
Step 3: will k 4 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n dimension upper triangle random matrixUM is then processed 2 Quantizing the random integer matrix according to (8)>
Further, in step 3, performing a difference operation on the image to be decrypted a' and the random layered matrix S to obtain a difference matrix d″, where the specific method is formula (14);
in the formula (14), a '= (a' i,j ) m×n ,S=(s i,j ) m×n ,D″=(d′ i,j );
In step 5, the difference matrix D' is passed through GF (2 P ) Domain modelInverse matrix->Restoring to the difference matrix D ' = (D ' before transformation ' i,j ) m×n The specific method of (a) is formula (15):
in step 6, the difference matrix D' before transformation is passed through GF (2 P ) Domain modelInverse matrix->Restoring to original difference matrix D= (D) i,j ) m×n The specific method of (a) is formula (16):
in step 7, the original difference matrix D and the random layered matrix S are fused and decrypted to obtain the round of decrypted image a= (a) i,j ) m×n The specific method of (a) is formula (17):
in formula (17), d=(d i,j ) m×n ,S=(s i,j ) m×n 。
Further, in step 4, calculateAnd->In mould->GF (2) P ) Domain inverse matrix->And->The specific method of (a) is as follows:
in the formula (19), the amino acid sequence of the compound,is a mould->A polynomial identity matrix;
Further, in step 4, calculateAnd->In mould->GF (2) P ) Domain inverse matrix->And->Is carried out by GF (2) P ) Domain gaussian elimination.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides an image encryption method of GF matrix transformation and random hierarchical fusion, which generates a round random number sequence through a user key, plaintext attribute of an image to be encrypted, such as MD5 value, SHA-1 value and round iteration parameter; then, random numbers in the round random number sequence are used for respectively generating a random layering matrix and a scrambling transformation matrix to participate in the encryption and decryption processes of the images, then, the random layering matrix is used for carrying out modular difference operation with the images to be encrypted, and the obtained difference images are subjected to matrix transformation in GF (field of view) domain so as to achieve the global scrambling effect; and finally, carrying out fusion encryption on the scrambled difference image and the random layered matrix, and obtaining a final encrypted image through multiple rounds of iteration.
The GF domain matrix transformation provided by the invention is different from the traditional definition in the residual class set Z N And (3) performing modulo-N matrix transformation. Relative to the conventional mode N moment Matrix transformation defined at GF (2 P ) Domain, GF (2) P ) The closure of the addition, subtraction, multiplication and division operations of the polynomial integers of the field, and GF (2 P ) The field arbitrary nonzero polynomial integer has the inverse element of multiplication and the inverse element is not equivalent to the inverse element designed under different primitive polynomials, compared with the traditional modulo-N matrix transformation, the method avoids the mutual prime condition of the matrix-N matrix transformation of the transformation matrix and strictly depends on GF (2) P ) Primitive polynomials of a domain.
Further the invention provides two GF (2) P ) Two methods of domain polynomial integer triangular matrix inversion and Gaussian approximate elimination inversion are used to increase GF (2) P ) Recovery efficiency of the domain matrix transformation.
Furthermore, all encryption links and corresponding encryption strategies are closely related to the generated round random sequence, and the random layering matrix carries out random layering on the image to be encrypted and carries out difference operation with the image to be encrypted to obtain a difference matrix; and generating a scrambling transformation matrix and performing left-right scrambling transformation on the difference matrix.
Furthermore, the random number sequences generated in the encryption link are closely related to the user key and the plaintext attribute of the image to be encrypted, such as the MD5 value, the SHA-1 value and the iteration times of the encryption wheel, the double hash values to be encrypted are adopted to generate the random sequence, the given encryption algorithm is strongly related to the plaintext, and compared with the traditional plaintext image weak correlation or plaintext image single hash encryption algorithm, the encryption algorithm has better security, and meanwhile, the parameters used in the encryption process, which are experienced by different encrypted images, are different, so that the resistance to malicious attack by using a special template is improved. In addition, if the number of round iterations is not correct after the encryption is performed for a plurality of rounds, even if the MD5 value and SHA-1 value are correct, the decryption cannot be correct.
Furthermore, the invention performs fusion encryption by introducing a random layering matrix which is equal to the image to be encrypted in size, and the random layering matrix has the following functions: 1) Randomly layering the image to be encrypted; 2) Performing modular difference operation on the round of encrypted image and the image to be encrypted to obtain a difference image 3), performing high-dimensional matrix transformation on the difference image in a GF domain, and performing fusion encryption on the difference image and a random layering matrix to obtain the round of encrypted image, wherein the random layering matrix also enables scrambling and confusion links in the encryption process to be tightly coupled.
Drawings
FIG. 1 is an encryption flow chart;
FIG. 2 is a decryption flow chart;
FIG. 3 shows an embodiment of an 8-bit grayscale image Lena with a resolution of 256×256, with MD5 and SHA-1 values of 0×11a53b2A5A7d2cfb894bc, 0×db8cbb496572dce 72a15c 72e 022e3dfcc7 efff, respectively;
fig. 4 is an embodiment, in which the image to be encrypted, the 8-bit gray-scale image Face with a resolution of 256×256, the MD5 value and SHA-1 value of the image to be encrypted are respectively 0 xd2966c 4b53df82bf37a3 aeeb346b2, 0 xd2312bf 664029 ccd53e17 ebaef49184 a6cbf8;
FIG. 5 is an example of an 8-bit grayscale image Man of 256×256 resolution, with MD5 and SHA-1 values of 0×45baa9dac85 cecf9f4b 1d7527ab6e4,0×35fbedc1ec 27560f567fb5352e7d 8454 c, respectively;
Fig. 6 is an embodiment of the encrypted image corresponding to fig. 3, with a resolution of 256×256 8-bit grayscale image, a user key kk= 0.600003, and a round iteration number q=2;
fig. 7 is an embodiment, corresponding to the encrypted image of fig. 4, with a resolution of 256×256 8-bit grayscale image, a user key kk= 0.600003, and a round iteration number q=2;
fig. 8 is an embodiment of the encrypted image corresponding to fig. 5, with a resolution of 256×256 8-bit grayscale image, a user key kk= 0.600003, and a round iteration number q=2;
fig. 9 is an embodiment, corresponding to the decrypted image of fig. 6, of an 8-bit gray scale image with a resolution of 256×256, and psnr= infinity with respect to mse=0 of fig. 3, wherein the parameters are set as: the value of the decrypted image MD5 and the value of SHA-1 are respectively set to be 0x11a53b2af5105e27c170a7d2cfb894bc,0x db8 cbbb49d 6572dce72a15c725e022e3 dffc7 efff, a user key kk= 0.600003, and the number of round iteration times Q=2, and the secret map is completely recovered;
fig. 10 is an embodiment, corresponding to the decrypted image of fig. 7, of an 8-bit gray scale image with a resolution of 256×256, and psnr= infinity with respect to mse=0 of fig. 4, wherein the parameters are set as: the decrypted image MD5 value and SHA-1 value are respectively 0 xd2966c4b53df82bf37a3aeeb346b2, 0 xd2312bf664029 ccd53e17ebaf491efb84a6cbf8, the user key kk= 0.600003, the round iteration number q=2, and the secret map is completely recovered;
Fig. 11 is an embodiment, corresponding to the decrypted image of fig. 8, of an 8-bit gray scale image with a resolution of 256×256, and psnr= infinity with respect to mse=0 of fig. 5, wherein the parameters are set as: the value of the decrypted image MD5 and the value of SHA-1 are respectively 0x45baa9 dac85cecfcfaf 9f4b1d7527ab6e4,0x35fbedc1ec1d 27560f567fb5352e7d 8454 c, the user key kk= 0.600003, the round iteration number Q=2, and the secret map is completely recovered;
FIG. 12 is the gray level histogram of FIG. 6, with gray level distribution equalization of each level;
FIG. 13 is the gray level histogram of FIG. 7, with gray level distribution equalization of each level;
FIG. 14 is the gray level histogram of FIG. 8, with gray level distribution equalization of each level;
fig. 15 is an embodiment, in which the parameter MD5 value is modified from 0x11a53b2af5105e27c170a7d2cfb894bc to 0x11a43b2af5105e27c170a7d2cfb894bc, and SHA-1 value 0xdb cbb49d6572dce a15c725e022e3dfcc7ef, initial key kk= 0.600003 and number of round iterations q=2 are unchanged, for the recovery result of fig. 6, fig. 15 is relative to mse=8.246277, psnr= 8.413811, the secret map cannot be recovered;
fig. 16 is an example, in which the parameter SHA-1 is modified from 0xdb cbb49d6572dce a15c725e022e3dfcc7 eff to 0xdb8cbb49d6572dce a15c725e022e3dfcc7efed, and the MD5 value 0x11a53b2af5105e27c170a7d2cfb894bc, the initial key kk= 0.600003 and the number of round iterations q=2 are unchanged, and for the recovery result of fig. 6, fig. 16 is not recovered with respect to mse=8.237651, psnr= 8.407840 of fig. 3;
Fig. 17 is an embodiment, in which the initial key is modified from kk= 0.600003 to kk= 0.6000032, and the MD5 value 0x11a53b2af5105e27c170a7d2cfb894bc and SHA-1 value 0xdb8cbb49d6572dce a15c725e022e3dfcc7 eff and the number of round iterations q=2 are unchanged, for the recovery result of fig. 6, fig. 17 is relative to the mse=8.236152, psnr= 8.422561, and the secret map cannot be recovered;
fig. 18 shows an embodiment in which the number of round iterations is modified from q=2 to q=1, and the MD5 values 0x11a53b2af5105e27c170a7d2cfb894bc and SHA-1 values 0xdb cbb49d6572dce a15c725e022e3dfcc7 eff and the initial key kk= 0.600003 are unchanged, and the secret map cannot be recovered in fig. 18 with respect to the recovery result of fig. 6, in which mse=8.232598, psnr= 8.448841.
Detailed Description
Since the present invention relates to GF (2 P ) The operational properties of addition, subtraction, multiplication and division of polynomial integers of a domain are given first, and embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Definition 1 (polynomial integer): any one integer x epsilon [0,2 ] P ) Can all pass through binary number x= (a) P-1 a P-2 …a 1 a 0 ) 2 To represent as a 2-valued polynomial of the order P-1Where t.epsilon.0, 1 is a 2-element variable, therefore will +.>A polynomial integer called x.
Definition 2 (GF (2) P ) Domain addition operation): note the P-1 order polynomial integerAndthen->The addition rule is shown in formula (21), wherein +.>Is an exclusive or operation.
As known from definition 2: if it isThen->GF (2) P ) The addition operation of the domain has a closure.
Definition 3 (GF (2) P ) Domain subtraction operation): note the p-1 order polynomial integerAnd the operation definition is shown in the formula (22):
from formula (22):
Definition 4 (GF (2) P ) Domain multiplication operation): p-1 order polynomial integerAndthen->The operation definition is shown in the formula (23):
in the formula (23)For GF (2) P ) The domain primitive polynomial corresponds to a P-order polynomial integer.
For example: primitive polynomial when p=7 is takenAnd have->And->There is->Due to->Therefore, there are:
In addition, in particular, GF (2 P ) The primitive polynomials of a domain are not unique, for example: GF (2) 8 ) The primitive polynomials of the domain haveAnd->Etc., whereas the conventional modulo-N domain has only a unique modulo-N.
Definition 5 (GF (2) P ) Domain inversion element): p-order non-zero polynomial integer And-> For GF (2) P ) Primitive polynomials in the domain, if there are +.>Then call->Is->In mould->The inverse of the lower energizer is marked by->
GF(2 P ) The primitive polynomials of the fields are not unique, resulting in GF (2 P ) The inverse of any non-0 polynomial integer of the field is also not unique.
For example:if GF (2) 8 ) Domain primitive polynomial->ThenI.e. < ->If GF (2) 8 ) Domain primitive polynomial->ThenI.e. < ->
Definition 6 (GF (2) P ) Domain division operation): recording P-order polynomial integerAndthe division operation can be converted into a multiplication operation, i.e +.>
Known from definition 4 and definition 5: from the following componentsIt is known that: />As known from definition 6: />GF (2) P ) Domain division operations have a closure.
GF(2 P ) The matrix operation of the field is similar to that of the real number field, except that the corresponding addition, multiplication and division operations are replaced by GF (2 P ) Domain addition, multiplication, and division operations.
Definition 7 (GF (2) P ) Matrix addition of domains): recording GF (2) P ) The m x n dimensional matrices of the domains are respectively And->Respectively->And->The element at the (i, j) position is GF (2) P ) Polynomial integer of field->And->Then->Equivalent of->And->Corresponding position element->And->At GF (2) P ) Domain addition.
Definition 8 (GF (2) P ) Matrix subtraction of domains): recording GF (2) P ) The m x n dimensional matrices of the domains are respectively Then->Equivalent of->And->Corresponding position element->And->At GF (2) P ) Domain subtraction. Due to GF (2) P ) The domain subtraction operation is equivalent to GF (2 P ) Domain addition, thus->
Definition 9 (GF (2) P ) Matrix multiplication of domains): recording GF (2) P ) The m×n and n×l dimensional matrices of the domain are respectively Record->Record->Then->The satisfied operation rule is shown in the formula (24), namely:
Definition 9 (GF (2) P ) Inverse matrix of domain): recording GF (2) P ) N x n dimensional matrix of domainsAnd->In mould->Lower determinant->Record->For GF (2) P ) N x n-dimensional unit array of domain, if I is n x n-dimensional unit array, ifThen call->Is->In primitive polynomial integer +.>The lower inverse matrix.
Definition 10 (GF (2) P ) Matrix division of domains): recording GF (2) P ) The m x n dimensional matrices of the domains are respectivelyGF(2 P ) N x n dimensional matrix of domains->And->GF (2) P ) Matrix division of the field->
Definition 11 (GF (2) P ) Upper triangular matrix of domains): if GF (2) P ) Domain matrixThe elements below and not including the main diagonal are all 0, then the term +.>For GF (2) P ) Upper triangular matrix of domains.
Definition 12 (GF (2) P ) Lower triangular matrix of domains): if GF (2) P ) Domain matrix The elements above and not including the main diagonal are all 0, then the term +.>For GF (2) P ) Lower triangular arrays of domains.
Definition 13 (GF (2) P ) Determinant corresponding to the upper triangular square matrix of the domain), if GF (2 P ) Domain matrixFor the upper triangle n x n dimension square matrix, +.>
Definition 14 (GF (2) P ) Determinant corresponding to the lower triangular matrix of the domain), if GF (2 P ) Domain matrixFor the lower triangle n x n dimension square matrix +.>
If it isFor GF (2) P ) Upper triangular matrix of domains and +.>The following procedure is followed to obtain +.>In primitive polynomial integer +.>Lower inverse matrix->
For example: if GF (2) 8 ) Upper triangular square matrix of domainGF(2 8 ) Primitive polynomials of a domainThen it is possible to obtain: />And->
If it isFor GF (2) P ) Lower triangular matrix of domains and +.>The following procedure is followed to obtain +.>In primitive polynomial integer +.>Lower inverse matrix->
For example: if GF (2) 8 ) Lower triangular matrix of domainsGF(2 8 ) Primitive polynomials of a domainThen it is possible to obtain: />And->
If it isFor GF (2) P ) Square matrix of domains->Can press GF (2) P ) Domain Gaussian elimination method>In primitive polynomial integer +. >Lower inverse matrix->
the following binds GF (2) P ) The specific implementation steps of the domain polynomial integer addition, subtraction, multiplication and division and the corresponding matrix operation rules for encrypting the image are described as follows:
step 1: a P-order grayscale image a= (a) with an input resolution of mxn i,j ) m×n ,a i,j ∈{0,1,…,2 P -1, generating a round random number sequence ks= (K) of length Q from the plaintext attribute of a and the user key and the number of round iterations Q 0 ,K 1 ,…,K Q-1 ) Input GF (2) P ) Primitive polynomials of a domainInitializing encryption wheel parameters qc=0;
the plaintext attribute of A may be any one or more hash values of A, such as MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 ) The user key can be obtained by random parameters dynamically generated by a random process or mapping values of the random parameters, or can be obtained by mapping proprietary objects and biological features of the user, for example, a random number kk epsilon (0, 1) is selected as the user key.
Generating a round random number sequence ks= (K) of length Q from plaintext attribute and user key of a and round iteration number Q 0 ,K 1 ,…,K Q-1 ) There are several ways in which the plaintext attribute of A is defined as being defined by the MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 ) Defining the user key as kk E (0, 1), then the MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 ) And user key kk e (0, 1) and number of round iterations Q to produce a sequence of round random numbers ks= (K) for a range of (0, 1) of length Q 0 ,K 1 ,…,K Q-1 ) There are also various ways, one of which is an alternativeThe mapping mode of (a) is as follows:
inputting a user key kk epsilon (0, 1), and taking kk epsilon (0, 1) as an initial value x 0 Mapping to 1 10 decimal G ε (0, 1) according to formula (1); then G is taken as a system parameter alpha of the formula (2), and x is taken as 0 Substituting formula (2), driving formula (2) generates a random number sequence ks= (K) in the (0, 1) range of length Q 0 ,K 1 ,…,K Q-1 );
Wherein ms is i Is to S MD5 And S is SHA-1 A 16-system element sequence ms= (ms) obtained by concatenating elements in the sequence i ) 72 I-th element of (a) in the list.
For example: taking m=3, n=3, p=8, there is an 8-gradation image with resolution of 3×3Assume that the MD5 value of a is: the SHA-1 value of 0x9b84f67a3e57ec0f8fd26328c288f004, A is: 0x3ad6a6c45541fd8944b5bde378b0f423420436bc, taking the user key kk=0.5 e (0, 1), taking the number of round iterations q=1, then generating a round random number sequence ks= (K) of length q=1 0 ) The method comprises the steps of carrying out a first treatment on the surface of the GF (2) 8 ) Primitive polynomial in the domain +.>Wherein ks= (K) is generated 0 ) The specific method of (a) is as follows:
the MD5 value of a may be stored as: s is S MD5 =(m 0 ,m 1 ,…,m 31 ) SHA-1 values of = (9, 11, …, 4) and a may be stored as: s is S SHA-1 =(s 0 ,s 1 ,…,s 39 ) = (3, 10, …, 12), so ms= (ms i ) 72 =S MD5 ||S SHA-1 =(9,11,…,4)||(3,10,…,12)=(9,11,…,12);
Kk=0.5 e (0, 1) as the initial value x 0 Substituting formula (1) yields G e (0, 1) assuming here g=0.68, taking g=0.68 as formula (2) system parameter α, and x 0 =0.5 substituted into formula (2), from 0 < x 0 Obtained by =0.5 < α=0.68Then a random number sequence ks= (K) of the (0, 1) range of length q=1 is generated 0 )=(0.7352941176470588)。
Step 2: from the QC random number K in ks QC Generating a random layered matrix s= (S) i,j ) m×n ,s i,j ∈{0,1,…,2 P -1, left random transform arrayAnd right random transformation matrix->And C L And C R Is>And->Mould->Non-zero, its concrete method is:
will K QC As x 0 Generating G according to the formula (1), taking G as a system parameter alpha and x of the formula (2) 0 Substituting formula (2), driving formula (2) to generate (0, 1) range random number sequence k= (k) 0 ,k 1 ,k 2 ,k 3 ,k 4 );
For example: if ks= (0.7352941176470588), qc=0, and the number of random numbers K in ks, qc=0, is taken QC =K 0 = 0.7352941176470588 as x 0 X is then 0 = 0.7352941176470588, substituting formula (1) to obtain G e (0, 1)) Assuming g=0.37, assuming g=0.37 as the system parameter α of formula (2), α=0.37 is defined as α=0.37.ltoreq.x 0 = 0.7352941176470588 < 1 yields:similarly, can obtain x 2 =0.9203681472589035,x 3 =0.12639976625570876,x 4 =0.34162098988029393,x 5 = 0.9232999726494431, a random number sequence k= (k) in the (0, 1) range can be generated 0 ,k 1 ,k 2 ,k 3 ,k 4 )=(x 1 ,x 2 ,x 3 ,x 4 ,x 5 );
Will k 0 As x 0 Generating G according to formula (1), and using G as system parameter alpha, driving formula (2) to generate a random matrix X= (X) with the range of (0, 1) equal to A i,j ) m×n Then quantize X to a random integer matrix s= (S) as equation (3) i,j ) m×n ;
For example: if k 0 =0.420168867268909, m=n=3, will k 0 = 0.4201680672268909 as x 0 G=0.53 is obtained according to the formula (1), and the driving formula (2) generates a random matrix x= (X) having a range equal to a by (0, 1) using g=0.53 as the system parameter α i,j ) m×n Then, X is quantized according to the formula (3), and a random matrix S= (S) can be obtained i,j ) 3×3 Here, it is assumed that
From k 1 And k 2 Generating left random transform arraysAnd C L At GF (2) P ) Determinant of domainsMould->Non-zero, its concrete method is:
step 1, K is taken up 1 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate triangle random matrix under m x m dimension in (0, 1) rangeThen LM is carried out 1 Quantizing the random integer matrix according to (4)>
Step 3, K is taken up 2 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range m×m dimension upper triangle random matrixUM is then processed 1 Quantizing the random integer matrix according to (5)>
Note that: the generation ofOf the steps (2) for ensuring the generated L 1 At GF (2) P ) Determinant of Domain->Mould->Mutual quality; step 4U for ensuring the generation 1 At GF (2) P ) Determinant of Domain->Mould->Mutual quality; thereby further ensuring the C generated in the step 5 L At GF (2) P ) Determinant of Domain->Mould->Non-zero
Will k 1 = 0.9203681472589035 as x 0 Assuming that g=0.49 is obtained according to equation (1), driving equation (2) generates a triangular random matrix under the (0, 1) range m×m=3×3 dimensions, using G as the system parameter αThen LM is carried out 1 Quantizing the random integer matrix according to (4)>Here assume +.>Wherein the method comprises the steps ofThus L is 1 Finishing the generation;
will k 2 = 0.12639976625570876 as x 0 Assuming that g=0.71 is obtained according to equation (1), driving equation (2) generates a (0, 1) range to generate an m×m=3×3-dimensional upper triangular random matrix using G as the system parameter αUM is then processed 1 Quantizing the random integer matrix according to (5)>Suppose that get +.>Wherein the method comprises the steps ofThe result of the dummy design calculation is: (t) 4 +t 3 +t 1 +1), thus->If->Then by->Thus get->/>
From k 3 And k 4 Generating right random transform arraysAnd C R At GF (2) P ) Determinant of Domain->Mould->Non-zero, its concrete method is:
step 1, K is taken up 3 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n-dimensional lower triangular random matrix Then LM is carried out 2 Quantizing the random integer matrix according to (7)>
Step 3, K is taken up 4 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n dimension upper triangle random matrixUM is then processed 2 Quantizing the random integer matrix according to (8)>
If k 3 = 0.34162098988029393, let k 3 = 0.34162098988029393 as x 0 Assuming that g=0.63 is obtained according to equation (1), driving equation (2) generates a triangular random matrix in the (0, 1) range n×n=3×3 dimensions, using g=0.63 as the system parameter αThen LM is carried out 2 Quantizing the random integer matrix according to (7)>Here it is assumed thatDue to->The result of the pseudo design calculation is t 5 +t 4 +t 3 +t 2 +t+1+.0, therefore L 2 Finishing the generation;
will also k 4 = 0.9232999726494431 as x 0 G can be obtained according to formula (1), and the driving formula (2) generates a triangular random matrix in the (0, 1) range n×n=3×3 dimensions with G as the system parameter alphaUM is then processed 2 Quantizing the random integer matrix according to (8)>Here assume +.>Wherein->If->Then by->Is available in the form of
Step 3: performing a difference operation according to (10) from A and S to obtain a difference matrix D= (D) i,j ) m×n Wherein a= (a i,j ) m×n ,S=(s i,j ) m×n ,D=(d i,j ) m×n ;
For example: from the following components And->The difference value is calculated and the difference value is calculated,similarly available-> Thus difference matrix->
Step 4: the difference matrix d= (D) is calculated according to (11) i,j ) m×n And left random transformation matrixGF (2) P ) Domain modulo->Matrix transformation, obtaining transformed matrix D ' = (D ') ' i,j ) m×n ;
For example: taking outThen the difference matrix D is combined with the left random transformation matrix C according to the formula (11) L GF (2) 8 ) Domain modulo->Matrix transformation, assuming that:then->
Step 5: d ' = (D ' according to formula (12) ' i,j ) m×n And right random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D "= (D") i,j ) m×n ;
For example: taking outThen D' is combined with the right random transform array C according to (12) R GF (2) 8 ) Domain modulo->Matrix transformation, assuming thatThen->
Step 6: performing fusion encryption on D 'and S according to a formula (13) to obtain an encrypted image A' of a QC wheel;
Step 7: updating qc=qc+1, if qc=q, outputting a' as the final encrypted image, otherwise executing steps 2 to 6.
The specific implementation steps of the image decryption are as follows:
step 1: an image a ' = (a ' to be decrypted of P-gradation of m×n in input resolution ' ij ) m×n ,a′ i,j ∈{0,1,…,2 P -1, a random number sequence ks= (K) of length Q is generated from the plaintext attribute of the decrypted image a, the user key and the number of round iterations Q 0 ,K 1 ,…,K Q-1 ) Input GF (2) P ) Primitive polynomials of a domainInitializing a decryption wheel parameter qc=qc-1;
where decrypting the plaintext attribute of image A may take any one or more hash values of A, such as the MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 ) The user key can be obtained by random parameters dynamically generated by a random process or mapping values of the random parameters, or can be obtained by mapping proprietary objects and biological features of the user, for example, a random number kk epsilon (0, 1) is selected as the user key.
Generating a round random number sequence ks= (K) of length Q from plaintext attribute and user key of a and round iteration number Q 0 ,K 1 ,…,K Q-1 ) There are several ways in which the plaintext attribute of A is defined as being defined by the MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 ) Defining the user key as kk E (0, 1), then the MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 ) And user key kk e (0, 1) and number of round iterations Q to produce a sequence of round random numbers ks= (K) for a range of (0, 1) of length Q 0 ,K 1 ,…,K Q-1 ) There are also a number of ways, one of which is alternatively a mapping way:
inputting a user key kk epsilon (0, 1), and taking kk epsilon (0, 1) as an initial value x 0 Mapping to 1 10 decimal G ε (0, 1) according to formula (1); then G is taken as a system parameter alpha of the formula (2), and x is taken as 0 Substituting formula (2), driving formula (2) generates a random number sequence ks= (K) in the (0, 1) range of length Q 0 ,K 1 ,…,K Q-1 );
Wherein ms is i Is to S MD5 And S is SHA-1 A 16-system element sequence ms= (ms) obtained by concatenating elements in the sequence i ) 72 I-th element of (a) in the list.
For example: if the p=8-level gray scale image with m×n×3×3 is input, the image is to be decryptedAssume that the MD5 value of a is: the SHA-1 value of 0x9b84f67a3e57ec0f8fd26328c288f004, A is: 0x3ad6a6c45541fd8944b5bde378b0f423420436bc, taking the user key kk=0.5 e (0, 1), taking the number of round iterations q=1, then generating a round random number sequence ks= (K) of length q=1 0 ) The method comprises the steps of carrying out a first treatment on the surface of the GF (2) 8 ) Primitive polynomial in the domain +.>Wherein ks= (K) is generated 0 ) The specific method of (a) is as follows:
the MD5 value of a may be stored as: s is S MD5 =(m 0 ,m 1 ,…,m 31 ) SHA-1 values of = (9, 11, …, 4) and a may be stored as: s is S SHA-1 =(s 0 ,s 1 ,…,s 39 ) = (3, 10, …, 12), so ms= (ms i ) 72 =S MD5 ||S SHA-1 =(9,11,…,4)||(3,10,…,12)=(9,11,…,12);
Kk=0.5 e (0, 1) as the initial value x 0 Substituting formula (1) yields G e (0, 1) assuming here g=0.68, taking g=0.68 as formula (2) system parameter α, and x 0 =0.5 substituted into formula (2), from 0 < x 0 Obtained by =0.5 < α=0.68Then a random number sequence ks= (K) of the (0, 1) range of length q=1 is generated 0 )=(0.7352941176470588)。
Step 2: from the QC random number K in ks QC Generating a random layered matrix s= (S) i,j ) m×n ,s i,j ∈{0,1,…,2 P -1, left random transform array And right random transformation matrix->And C L And C R Is>And->Mould->Non-zero, its concrete method is:
will K QC As x 0 Generating G according to the formula (1), taking G as a system parameter alpha and x of the formula (2) 0 Substituting formula (2), driving formula (2) to generate (0, 1) range random number sequence k= (k) 0 ,k 1 ,k 2 ,k 3 ,k 4 );
For example: if ks= (0.7352941176470588), qc=0, and the number of random numbers K in ks, qc=0, is taken QC =K 0 = 0.7352941176470588 as x 0 X is then 0 0.7352941176470588, substituting formula (1) to obtain G e (0, 1), assuming g=0.37, and g=0.37 as the system parameter α of formula (2), α=0.37, where α=0.37 is equal to or less than x 0 = 0.7352941176470588 < 1 yields:similarly, can obtain x 2 =0.9203681472589035,x 3 =0.12639976625570876,x 4 =0.34162098988029393,x 5 = 0.9232999726494431, a random number sequence k= (k) in the (0, 1) range can be generated 0 ,k 1 ,k 2 ,k 3 ,k 4 )=(x 1 ,x 2 ,x 3 ,x 4 ,x 5 );
Will k 0 As x 0 Generating G according to formula (1), and using G as system parameter alpha, driving formula (2) to generate random matrix X= (X) with the range of (0, 1) and A' equal large i,j ) m×n Then quantize X to a random integer matrix s= (S) as equation (3) i,j ) m×n ;
For example: if k 0 =0.420168867268909, m=n=3, will k 0 = 0.4201680672268909 as x 0 G=0.53 is obtained according to formula (1), and the driving formula (2) generates a random matrix x= (X) having a range equal to a' and larger than (0, 1) using g=0.53 as the system parameter α i,j ) m×n Then, X is quantized according to the formula (3), and a random matrix S= (S) can be obtained i,j ) 3×3 Here, it is assumed that
From k 1 And k 2 Generating left random transform arraysAnd C L At GF (2) P ) Determinant of Domain->Mould->Non-zero, its concrete method is:
step 1, K is taken up 1 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate triangle random matrix under m x m dimension in (0, 1) rangeThen LM is carried out 1 Quantizing the random integer matrix according to (4)>
Step 3, K is taken up 2 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range m×m dimension upper triangle random matrixUM is then processed 1 Quantizing the random integer matrix according to (5)>
Note that: the generation ofOf the steps (2) for ensuring the generated L 1 At GF (2) P ) Determinant of Domain->Mould->Mutual quality; step 4U for ensuring the generation 1 At GF (2) P ) Determinant of Domain->Mould->Mutual quality; thereby further ensuring the C generated in the step 5 L At GF (2) P ) Determinant of Domain->Mould->Non-zero.
Will k 1 = 0.9203681472589035 as x 0 Assuming that g=0.49 is obtained according to equation (1), driving equation (2) generates a triangular random matrix under the (0, 1) range m×m=3×3 dimensions, using G as the system parameter αThen LM is carried out 1 Quantizing the random integer matrix according to (4)>Here assume +.>Wherein the method comprises the steps ofThus L is 1 Finishing the generation;
will k 2 = 0.12639976625570876 as x 0 Assuming that g=0.71 is obtained according to equation (1), driving equation (2) generates a (0, 1) range to generate an m×m=3×3-dimensional upper triangular random matrix using G as the system parameter αUM is then processed 1 Quantizing the random integer matrix according to (5)>Suppose that get +.>Wherein the method comprises the steps ofThe result of the dummy design calculation is: (t) 4 +t 3 +t 1 +1), thus->If->Then by->Thus get->
From k 3 And k 4 Generating right random transform arraysAnd C R At GF (2) P ) Determinant of Domain->Mould->Non-zero;
step 1, K is taken up 3 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n-dimensional lower triangular random matrixThen LM is carried out 2 Quantizing the random integer matrix according to (7)>
Step 3, K is taken up 4 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n dimension upper triangle random matrixUM is then processed 2 Quantizing the random integer matrix according to (8)>
If k 3 = 0.34162098988029393, let k 3 = 0.34162098988029393 as x 0 Assuming that g=0.63 is obtained according to equation (1), driving equation (2) generates a triangular random matrix in the (0, 1) range n×n=3×3 dimensions, using g=0.63 as the system parameter α Then LM is carried out 2 Quantizing the random integer matrix according to (7)>Here it is assumed thatDue to->The result of the pseudo design calculation is t 5 +t 4 +t 3 +t 2 +t+1+.0, therefore L 2 Finishing the generation;
will also k 4 = 0.9232999726494431 as x 0 G can be obtained according to formula (1), and the driving formula (2) generates a triangular random matrix in the (0, 1) range n×n=3×3 dimensions with G as the system parameter alphaUM is then processed 2 Quantizing the random integer matrix according to (8)>Here assume +.>Wherein->If->Then by->Available->
Step 3: performing difference operation on the image A 'to be decrypted and the random layered matrix S according to the formula (14) to obtain a difference matrix D', wherein A '= (a' i,j ) m×n ,S=(s i,j ) m×n ,D″=(d′ i,j );
For example: from the following componentsAnd->The difference value is calculated and the difference value is calculated,similarly available-> Thus, a difference matrix +.>
in the formula (19), the amino acid sequence of the compound,is a mould->A polynomial identity matrix;
Scheme 2: using GF (2) P ) Domain gaussian elimination method
For example:
taking outThen press GF (2) P ) The inversion method of the domain triangular matrix can obtain +.>And->Get-> Then press GF (2) P ) The domain triangular matrix inversion method can be respectively obtained And satisfies equation (19), then it can be calculated according to equation (20): />And->Also using GF (2 P ) Domain Gaussian elimination method can be performed by +.>Directly get->By->Directly get->
Step 5: the difference matrix D' is passed over GF (2) P ) Domain modelInverse matrix->Restoring to the difference matrix D ' = (D ' before transformation ' i,j ) m×n ;
Step 6: the difference matrix D' before transformation is passed through GF (2) P ) Domain modelInverse matrix->Restoring to original difference matrix D= (D) i,j ) m×n ;
Step 7: fusing and decrypting the original difference matrix D and the random layered matrix S according to the formula (17) to obtain a round of decrypted image A= (a) i,j ) m×n Wherein d= (D i,j ) m×n ,S=(s i,j ) m×n ;
For example: matrix of original difference valuesAnd random hierarchical matrixFusion decryption is performed>Is available in the same wayThen->
Step 8: update qc=qc-1, if QC < 0, a is output as the final decrypted image, otherwise step 2 is performed.
FIGS. 3-5 are images to be encrypted, 8-bit grayscale images Lena, face and Man, respectively, having a resolution of 256×256, wherein the MD5 value and SHA-1 value of Lena are 0×1a53b2A5105e27c170a7d2cfb894bc, 0×db8cb49d 6572dce72a15c 72e 022e3dfcc7 efff, respectively; the MD5 and SHA-1 values of Face are 0 xd2966c4b53df82bf37a3aaeeb346b4b2, 0x2312bf55574029ccd53e17ebaf491efb84a6cbf8, respectively; the MD5 and SHA-1 values of Man are 0x45baa9dac85 cecfcfaf 9f4b1d7527ab6e4,0x35fbedc1 c1d 27560f567fb5352e7d 8454, respectively.
Fig. 6, 7 and 8 are sequentially encrypted images corresponding to fig. 3, 4 and 5, in which the user key kk= 0.600003 of fig. 6 to 8, and the number of round iterations q=2.
Fig. 9, 10 and 11 are sequentially decrypted images corresponding to fig. 3, 4 and 5, wherein fig. 9 has mse=0 and psnr= infinity with respect to fig. 3, and the corresponding parameters are set as: the value of MD5 and SHA-1 of the image to be decrypted are respectively 0x11a53b2af5105e27c170a7d2cfb894bc,0x db8cb 49d6572d 72a15c725e022e3dfcc7 efff, the user key kk= 0.600003, the number of round iteration times Q=2, and the secret map is completely recovered; fig. 10 shows that, with respect to mse=0 of fig. 4, psnr= infinity, the corresponding parameters are set as: the value of MD5 and SHA-1 of the image to be decrypted are respectively 0 xd2966c4b53df82bf37a3aeeb346b4b2, 0x2312bf55574029ccd53e17ebaf491efb84a6cbf8, the user key kk= 0.600003, the round iteration number Q=2, and the secret graph is completely recovered; in fig. 11, with respect to mse=0 of fig. 5, psnr= infinity, the corresponding parameters are set as: the MD5 value and SHA-1 value of the image to be encrypted are respectively 0x45baa9 dac85cecfcfaf 9f4b1d 7527aba6 e4,0x35fbedc1ec1d 27560f567fb5352e7d 8454 c, the user key kk= 0.600003, the round iteration number q=2, and the secret map is completely restored.
Fig. 12, 13 and 14 are the gradation histograms of fig. 6, 7 and 8 in order, and the gradation distribution of each gradation of these gradation histograms is balanced and approaches to uniform distribution, indicating that the overall encryption effect is good.
Fig. 15 is a graph of the recovery result of fig. 6, with parameter MD5 modified from 0x11a53b2af5105e 170a7d2cfb894bc to 0x11a43b2af5105e27c170a7d2cfb894bc and SHA-1 value 0xdb cbb49d6572dce a15c725e022e3dfcc7 eff, initial key kk= 0.600003 and number of round iterations q=2 unchanged, and with respect to fig. 3 mse=8.246277, psnr= 8.413811, indicating that the secret map cannot be recovered; fig. 16 is a graph showing that the recovery result of fig. 6 is that the parameter SHA-1 is modified from 0xdb cbb49d6572dce a15c725e022e3dfcc7 eff to 0xdb8cbb49d6572dce a15c725e022e3dfcc7efed, and the MD5 value 0x11a53b2af5105e27c170a7d2cfb894bc, the initial key kk= 0.600003 and the number of round iterations q=2 are unchanged, and the graph is not recovered with respect to mse=8.237651, psnr= 8.407840 of fig. 3; fig. 17 is a graph in which the initial key is modified from kk= 0.600003 to kk= 0.6000032, and the MD5 values 0x11a53b2af5105e27c170a7d2cfb894bc and SHA-1 values 0xdb8cbb49d6572dce a15c725e022e3dfcc7 eff and the number of round iterations q=2 are unchanged, and the recovery result of fig. 6 is that, with respect to fig. 3, the mse=8.236152, psnr= 8.422561, the secret map cannot be recovered; fig. 18 shows that the number of round iterations is modified from q=2 to q=1, while the MD5 values 0x11a53b2af5105e27c170a7d2cfb894bc and SHA-1 values 0xdb c bb49d6572dce a15c725e022e3dfcc7 eff and the initial key kk= 0.600003 are unchanged, and for the recovery result of fig. 6, fig. 18 shows that the secret map cannot be recovered, with respect to the mse=8.232598 and psnr= 8.448841 of fig. 3.
Claims (10)
1. The image encryption method based on GF matrix transformation and random hierarchical fusion is characterized by comprising the following steps:
step 1: a P-order grayscale image a= (a) with an input resolution of mxn i,j ) m×n ,a i,j ∈{0,1,…,2 P -1, generating a round random number sequence ks= (K) of length Q from the plaintext attribute of a and the user key and the number of round iterations Q 0 ,K 1 ,…,K Q-1 ) Input GF (2) P ) Primitive polynomials of a domainInitializing encryption wheel parameters qc=0;
step 2: from the QC random number K in ks QC Generating a random layered matrix s= (S) i,j ) m×n ,s i,j ∈{0,1,…,2 P -1, left random transform arrayAnd right random transformation matrix->And C L And C R At GF (2) P ) Determinant of Domain->And->Mould->Non-zero;
step 3: from APerforming a difference operation with S to obtain a difference matrix d= (D) i,j ) m×n ;
Step 4: matrix d= (D) i,j ) m×n And left random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D '= (D' i,j ) m×n ;
Step 5: let D '= (D' i,j ) m×n And right random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D "= (D") i,j ) m×n
Step 6: carrying out fusion encryption on the D 'and the S to serve as an image A' after encryption of a QC round;
in step 6, the specific method for performing fusion encryption on D' and S is as shown in formula (13):
step 7: updating qc=qc+1, if qc=q, outputting a' as the final encrypted image, otherwise executing steps 2 to 6.
2. The method for encrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 1, wherein:
step 1, selecting MD5 value S with plaintext attribute being A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 );
In step 1, a round random number sequence ks= (K) with the length of Q is generated by plaintext attribute, user key and round iteration number Q 0 ,K 1 ,…,K Q-1 ) The specific method of (a) is as follows:
inputting a user key kk epsilon (0, 1), and taking kk epsilon (0, 1) as an initial value x 0 Mapping to 1 10 decimal G ε (0, 1) according to formula (1); then G is taken as a system parameter alpha of the formula (2), and x is taken as 0 Substituting formula (2), driving formula (2) generates a random number sequence ks= (K) in the (0, 1) range of length Q 0 ,K 1 ,…,K Q-1 );
Wherein ms is i Is to S MD5 And S is SHA-1 A 16-system element sequence ms= (ms) obtained by concatenating elements in the sequence i ) 72 I-th element of (a) in the list.
3. The method for encrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 2, wherein the specific method in step 2 is as follows:
will K QC As x 0 Generating G according to the formula (1), taking G as a system parameter alpha and x of the formula (2) 0 Substituting formula (2), driving formula (2) to generate (0, 1) range random number sequence k= (k) 0 ,k 1 ,k 2 ,k 3 ,k 4 );
Will k 0 As x 0 Generating G according to formula (1), and using G as system parameter alpha, driving formula (2) to generate a random matrix X= (X) with the range of (0, 1) equal to A i,j ) m×n Then quantize X to a random integer matrix s= (S) as equation (3) i,j ) m×n ;
From k 1 And k 2 Generating left random transform arraysAnd C L At GF (2) P ) Determinant of Domain->Mould->The specific method is as follows:
step 1, K is taken up 1 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate triangle random matrix under m x m dimension in (0, 1) rangeThen LM is carried out 1 Quantizing the random integer matrix according to (4)>
Step 3, K is taken up 2 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range m×m dimension upper triangle random matrixUM is then processed 1 Quantizing the random integer matrix according to (5)>
From k 3 And k 4 Generating right random transform arraysAnd C R At GF (2) P ) Determinant of domainsMould->The specific method is as follows:
step 1, K is taken up 3 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n-dimensional lower triangular random matrixThen LM is carried out 2 Quantizing the random integer matrix according to (7)>
Step 3, K is taken up 4 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n dimension upper triangle random matrix UM is then processed 2 Quantizing the random integer matrix according to (8)>
4. The method for encrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 1, wherein:
in step 3, a difference matrix d= (D) is obtained by performing a difference operation between a and S i,j ) m×n The specific method is represented by formula (10):
in the formula (10), a= (a) i,j ) m×n ,S=(s i,j ) m×n ,D=(d i,j ) m×n ;
In step 4, the difference matrix d= (D i,j ) m×n And left random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D '= (D' i,j ) m×n The specific method of (a) is formula (11):
in step 5, D '= (D' i,j ) m×n And right random transformation matrixGF (2) P ) Domain modulo->Matrix transformation results in transformed matrix D "= (D") i,j ) m×n The specific method is represented by formula (12):
5. an image decryption method based on GF matrix transformation and random hierarchical fusion, characterized in that it comprises the following steps:
step 1: an image a ' = (a ' to be decrypted of P-gradation of m×n in input resolution ' ij ) m×n ,a′ i,j ∈{0,1,…,2 P -1, a random number sequence ks= (K) of length Q is generated from the plaintext attribute of the decrypted image a, the user key and the number of round iterations Q 0 ,K 1 ,…,K Q-1 ) Input GF (2) P ) Primitive polynomials of a domainInitializing a decryption wheel parameter qc=q-1;
step 2: from the QC random number K in ks QC Generating a random layered matrix s= (S) i,j ) m×n ,s i,j ∈{0,1,…,2 P -1, left random transform arrayAnd right random transformation matrix->And C L And C R At GF (2) P ) Determinant of Domain->And->Mould->Non-zero;
step 3: performing difference operation on the image A 'to be decrypted and the random hierarchical matrix S to obtain a difference matrix D';
step 4: calculation C L And C R In-mold dieUpper part of the cylinderGF(2 P ) Domain inverse matrix->And->
Step 5: the difference matrix D' is passed through GF (2 P ) Domain modelInverse matrix->Restoring to the difference matrix D ' = (D ' before transformation ' i,j ) m×n ;
Step 6: the difference matrix D' before transformation is passed through GF (2 P ) Domain modelInverse matrix->Restoring to original difference matrix D= (D) i,j ) m×n ;
Step 7: the original difference matrix D and the random layered matrix S are fused and decrypted to obtain a round of decrypted image A= (a) i,j ) m×n ;
Step 8: updating qc=qc-1, if QC is less than 0, outputting a as the final decrypted image, otherwise executing steps 2-7.
6. The method for decrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 5, wherein:
in step 1, the selected plaintext attribute is MD5 value S of A MD5 =(m 0 ,m 1 ,…,m 31 ) And SHA-1 value S SHA-1 =(s 0 ,s 1 ,…,s 39 );
In step 1, a plaintext attribute, a user key and a round iteration number Q are used to generate a code of length Round random number sequence ks= (K) in (0, 1) range of Q 0 ,K 1 ,…,K Q-1 ) The specific method of (a) is as follows:
inputting a user key kk epsilon (0, 1), and taking kk epsilon (0, 1) as an initial value x 0 Mapping to 1 10 decimal G ε (0, 1) according to formula (1); then G is taken as a system parameter alpha of the formula (2), and x is taken as 0 Substituting formula (2), driving formula (2) generates a random number sequence ks= (K) in the (0, 1) range of length Q 0 ,K 1 ,…,K Q-1 );
Wherein ms is i Is to S MD5 And S is SHA-1 A 16-system element sequence ms= (ms) obtained by concatenating elements in the sequence i ) 72 I-th element of (a) in the list.
7. The method for decrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 5, wherein:
the specific method of the step 2 is as follows:
will K QC As x 0 Generating G according to formula (1), using G as system parameter mu of formula (2), and x 0 Substituting formula (2), driving (0, 1) -range random number sequence k= (k) generated by formula (2) 0 ,k 1 ,k 2 ,k 3 ,k 4 );
Will k 0 As x 0 Generating G according to formula (1), and using G as system parameter alpha, driving formula (2) to generate random matrix X= (X) with the range of (0, 1) and A' equal large i,j ) m×n Then quantize X to a random integer matrix s= (S) as equation (3) i,j ) m×n ;
From k 1 And k 2 Generating left random transform arraysAnd C L At GF (2) P ) Determinant of Domain->Mould->The specific method is as follows:
step 1: will k 1 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate triangle random matrix under m x m dimension in (0, 1) range Then LM is carried out 1 Quantizing the random integer matrix according to (4)>
Step 3: will k 2 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range m×m dimension upper triangle random matrixUM is then processed 1 Quantizing the random integer matrix according to (5)>
From k 3 And k 4 Generating right random transform arraysAnd C R At GF (2) P ) Determinant of domainsMould->The specific method is as follows:
step 1: will k 3 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n-dimensional lower triangular random matrixThen LM is carried out 2 Quantizing the random integer matrix according to (7)>
Step 3: will k 4 As x 0 Generating G according to formula (1), using G as system parameter alpha, driving formula (2) to generate (0, 1) range n×n dimension upper triangle random matrixUM is then processed 2 Quantizing the random integer matrix according to (8)>
8. The method for decrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 5, wherein:
In the step 3, the specific method for obtaining the difference matrix D 'by carrying out difference operation on the image A' to be decrypted and the random layered matrix S is represented by the formula (14);
in the formula (14), a '= (a' i,j ) m×n ,S=(s i,j ) m×n ,D″=(d′ i,j );
In step 5, the difference matrix D' is passed through GF (2 P ) Domain modelInverse matrix->Restoring to the difference matrix D ' = (D ' before transformation ' i,j ) m×n The specific method of (a) is formula (15):
in step 6, the difference matrix D' before transformation is passed through GF (2 P ) Domain modelInverse matrix->Restoring to original difference matrix D= (D) i,j ) m×n The specific method of (a) is formula (16):
in step 7, the original difference matrix D and the random layered matrix S are fused and decrypted to obtain the round of decrypted image a= (a) i,j ) m×n The specific method of (a) is formula (17):
in the formula (17), d= (D) i,j ) m×n ,S=(s i,j ) m×n 。
9. The method for decrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 5, characterized in that in step 4, the calculation is performedAnd->In mould->GF (2) P ) Domain inverse matrix->And->The specific method of (a) is as follows:
in the formula (19), the amino acid sequence of the compound,is a mould->A polynomial identity matrix;
10. The method for decrypting the image by combining GF matrix transformation and random hierarchical fusion according to claim 5, characterized in that in step 4, the calculation is performed And->In mould->GF (2) P ) Domain inverse matrix->And->Is carried out by GF (2) P ) Domain gaussian elimination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911097159.9A CN110838908B (en) | 2019-11-11 | 2019-11-11 | Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911097159.9A CN110838908B (en) | 2019-11-11 | 2019-11-11 | Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110838908A CN110838908A (en) | 2020-02-25 |
CN110838908B true CN110838908B (en) | 2023-07-07 |
Family
ID=69574994
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911097159.9A Active CN110838908B (en) | 2019-11-11 | 2019-11-11 | Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110838908B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114091070B (en) * | 2021-11-24 | 2024-08-23 | 中国银行股份有限公司 | Ciphertext generation method, server, medium and device based on Hilbert transform |
CN115952549B (en) * | 2023-03-13 | 2023-05-09 | 北京环球医疗救援有限责任公司 | End-to-end medical image privacy data elimination system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106683053A (en) * | 2016-10-28 | 2017-05-17 | 陕西师范大学 | GF(2<6>) finite-field multi-threshold progressive secrete image sharing and reconstruction methods |
CN106709854A (en) * | 2016-12-20 | 2017-05-24 | 西安电子科技大学 | Cat mapping and chaos based image information fusion and encryption method |
CN108174053A (en) * | 2017-12-27 | 2018-06-15 | 陕西师范大学 | The decryption region of a kind of directed area and playing card mapping limits image encryption method |
CN110086601A (en) * | 2019-04-28 | 2019-08-02 | 郑州轻工业学院 | Based on the associated Josephus traversing of pixel value and hyperchaotic system image encryption method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8670560B2 (en) * | 2008-10-23 | 2014-03-11 | University Of Ulster | Encryption method |
-
2019
- 2019-11-11 CN CN201911097159.9A patent/CN110838908B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106683053A (en) * | 2016-10-28 | 2017-05-17 | 陕西师范大学 | GF(2<6>) finite-field multi-threshold progressive secrete image sharing and reconstruction methods |
CN106709854A (en) * | 2016-12-20 | 2017-05-24 | 西安电子科技大学 | Cat mapping and chaos based image information fusion and encryption method |
CN108174053A (en) * | 2017-12-27 | 2018-06-15 | 陕西师范大学 | The decryption region of a kind of directed area and playing card mapping limits image encryption method |
CN110086601A (en) * | 2019-04-28 | 2019-08-02 | 郑州轻工业学院 | Based on the associated Josephus traversing of pixel value and hyperchaotic system image encryption method |
Non-Patent Citations (3)
Title |
---|
An image encryption scheme based on constructing large permutation with chaotic sequence;Xuanping Zhang等;《Computers & Electrical Engineering》;20140401;全文 * |
Image Encryption through a Novel Permutation-Substitution Scheme Based on Chaotic Standard Map;Vinod Patidar等;《2010 International Workshop on Chaos-Fractal Theories and Applications》;20101217;全文 * |
结合密钥和随机标准正交基的音频伪装方案;邵京津等;《计算机技术与发展》;20190924;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110838908A (en) | 2020-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Man et al. | Double image encryption algorithm based on neural network and chaos | |
Shankar et al. | RGB-based secure share creation in visual cryptography using optimal elliptic curve cryptography technique | |
Patro et al. | A novel multi-dimensional multiple image encryption technique | |
Liu et al. | A multidimensional chaotic image encryption algorithm based on DNA coding | |
CN106023051B (en) | DNA image encryption method and system based on cloud model and hyperchaotic system | |
Dai et al. | Quantum multi-image compression-encryption scheme based on quantum discrete cosine transform and 4D hyper-chaotic Henon map | |
CN107659751B (en) | Multi-image encryption method based on DNA coding and chaos | |
Liang et al. | Medical image encryption algorithm based on a new five-dimensional three-leaf chaotic system and genetic operation | |
CN107220923B (en) | Digital picture feedback encryption method based on image network | |
Wang et al. | An image encryption scheme based on chaotic system and compressed sensing for multiple application scenarios | |
CN101706946A (en) | Digital image encryption method based on DNA sequence and multi-chaotic mapping | |
CN110838908B (en) | Image encryption and decryption method based on GF matrix transformation and random hierarchical fusion | |
CN111031191B (en) | Image encryption method based on controlled alternate quantum walking and DNA sequence operation | |
Rehman et al. | A selective cross-substitution technique for encrypting color images using chaos, DNA rules and SHA-512 | |
CN106604040A (en) | Multi-image encryption method based on mixed primitives and full permutation | |
Devi et al. | Entropy influenced RNA diffused quantum chaos to conserve medical data privacy | |
Wen et al. | Cryptanalyzing a bit-level image encryption algorithm based on chaotic maps | |
Wang et al. | A new hybrid image encryption algorithm based on Gray code transformation and snake-like diffusion | |
CN110879894B (en) | Image encryption and decryption method based on lazy scale transformation and random layered fusion | |
Gao et al. | An Image Encryption Algorithm Based on the Improved Sine‐Tent Map | |
Aditya et al. | Image encryption using dynamic DNA encoding and pixel scrambling using composite chaotic maps | |
CN106373082A (en) | Cellular automata and chaotic mapping-based digital image encryption method and decryption method thereof | |
CN107590843B (en) | The image encryption method of the reversible cellular automata of two dimension based on construction | |
Dehghani et al. | Chaotic-based color image encryption using a hybrid method of reversible cellular automata and DNA sequences | |
Wang et al. | A dynamic image encryption algorithm based on improved ant colony walking path thought |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |