Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, an object of the present invention is to provide an image encryption method based on cascade equimodular decomposition, which can greatly increase the capacity of an image to be transmitted, has high security, and can be applied to security protection of image information.
Another object of the present invention is to provide an image encryption apparatus based on cascade equal modulus decomposition.
In order to achieve the above object, an embodiment of the present invention provides an image encryption method based on cascade equal-modulus decomposition, including the following steps: step S1: encoding an image into a first quaternion matrix; step S2: carrying out modulation quaternion Gyrator transformation on the first quaternion matrix; step S3: extracting first to fourth components of the first quaternion matrix after modulation and transformation, combining the first component and the second component into a first complex matrix, and combining the third component and the fourth component into a second complex matrix; step S4: performing equal-mode decomposition on the second complex matrix to obtain a first matrix and a second matrix; step S5: encoding the first complex matrix and the second matrix into a second quaternion matrix, and repeatedly executing the steps S2 to S4 to obtain a third complex matrix and a third matrix; step S6: encoding the third complex matrix and the third matrix into a fourth complex matrix; step S7: and obtaining a ciphertext by performing truncation coding on the fourth complex matrix.
The image encryption method based on the cascade equimodular decomposition of the embodiment of the invention uses the quaternion matrix to encode a plurality of channel images, thereby having higher transmission efficiency; the cascade quaternion Gyrator transformation and the equimodular decomposition avoid the iterative process and have lower complexity; through decomposition and recombination of the quaternion matrix, the safety is higher, the multi-channel image is encoded into a whole to be processed by adopting quaternion matrix representation, so that the capacity of the image to be transmitted can be greatly improved, and the safety is higher and can be applied to safety protection of image information.
In addition, the image encryption method based on the cascade equimodular decomposition according to the above embodiment of the present invention may further have the following additional technical features:
further, in an embodiment of the present invention, the quaternion Gyrator transform calculation formula is:
wherein, (u, v) represents frequency domain coordinates, (x, y) represents space domain coordinates, α is a rotation angle, and μ is an arbitrary unit pure four-element number.
Further, in an embodiment of the present invention, the first complex matrix and the second complex matrix are calculated by the following formula:
wherein operators S (-), X (-), Y (-), and Z (-), represent the first, second, third, and fourth components.
Further, in an embodiment of the present invention, the calculation formula of the first matrix and the second matrix is:
wherein A is
1、
Respectively represent a matrix C
2Amplitude and phase of (a), theta
1A random matrix is represented.
Further, in one embodiment of the present invention, the formula of the truncation coding is:
E=AT[D],
where the operator AT (-) represents amplitude truncation and D is a fourth complex matrix.
In order to achieve the above object, another embodiment of the present invention provides an image encryption apparatus based on cascade equal modulus decomposition, including: a first encoding module for encoding the image into a first quaternion matrix; the modulation conversion module is used for carrying out modulation quaternion Gyrator conversion on the first quaternion matrix; the extraction module is used for extracting first to fourth components of the first quaternion matrix after modulation and transformation, combining the first component and the second component into a first complex matrix, and combining the third component and the fourth component into a second complex matrix; the equal-mode decomposition module is used for performing equal-mode decomposition on the second complex matrix to obtain a first matrix and a second matrix; a repeating module, configured to encode the first complex matrix and the second matrix into a second quaternion matrix, and repeatedly execute the modulation transformation module, the extraction module, and the equal-modulus decomposition module to obtain a third complex matrix and a third matrix; a second encoding module for encoding the third complex matrix and the third matrix into a fourth complex matrix; and the truncation module is used for performing truncation coding on the fourth complex matrix to obtain a ciphertext.
The image encryption device based on the cascade equimodular decomposition of the embodiment of the invention uses the quaternion matrix to encode a plurality of channel images, thereby having higher transmission efficiency; the cascade quaternion Gyrator transformation and the equimodular decomposition avoid the iterative process and have lower complexity; through decomposition and recombination of the quaternion matrix, the safety is higher, the multi-channel image is encoded into a whole to be processed by adopting quaternion matrix representation, so that the capacity of the image to be transmitted can be greatly improved, and the safety is higher and can be applied to safety protection of image information.
In addition, the image encryption device based on the cascade equal modulus decomposition according to the above embodiment of the present invention may further have the following additional technical features:
further, in an embodiment of the present invention, the quaternion Gyrator transform calculation formula is:
wherein, (u, v) represents frequency domain coordinates, (x, y) represents space domain coordinates, α is a rotation angle, and μ is an arbitrary unit pure four-element number.
Further, in an embodiment of the present invention, the first complex matrix and the second complex matrix are calculated by the following formula:
wherein operators S (-), X (-), Y (-), and Z (-), represent the first, second, third, and fourth components.
Further, in an embodiment of the present invention, the calculation formula of the first matrix and the second matrix is:
wherein A is
1、
Respectively represent a matrix C
2Amplitude and phase ofBit, theta
1A random matrix is represented.
Further, in one embodiment of the present invention, the formula of the truncation coding is:
E=AT[D],
where the operator AT (-) represents amplitude truncation and D is a fourth complex matrix.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The following describes an image encryption method and apparatus based on cascade equal modulus decomposition according to an embodiment of the present invention with reference to the drawings, and first, an image encryption method based on cascade equal modulus decomposition according to an embodiment of the present invention will be described with reference to the drawings.
Fig. 1 is a flowchart of an image encryption method based on cascade equal modulus decomposition according to an embodiment of the present invention.
As shown in fig. 1, the image encryption method based on cascade equal-mode decomposition includes the following steps:
step S1: an image is encoded as a first quaternion matrix.
It should be noted that, the embodiment of the present invention provides an image encryption method based on quaternion Gyrator transformation and equal modulus decomposition, and an encryption flow of the image encryption method is shown in fig. 2. Suppose that the images to be encrypted are respectively f1(x,y)、f2(x,y)、f3(x,y)、f4(x, y) with dimensions of N M, (x, y) representing spatial domain coordinates. The specific process is described as follows:
specifically, in the embodiment of the present invention, four images are first used as four components of a quaternion and encoded into a full quaternion matrix, that is:
G1=f1+if2+jf3+kf4。
step S2: and carrying out modulation quaternion Gyrator transformation on the first quaternion matrix.
Specifically, as shown in fig. 2, the modulation quaternion Gyrator transformation is performed on the full quaternion matrix, that is:
wherein, the formula for calculating the quaternion Gyrator transformation is as follows,
here, (u, v) represents frequency domain coordinates, (x, y) represents spatial domain coordinates, α is a rotation angle, μ is an arbitrary unit pure four-element number, and P represents a randomly generated phase mask.
Step S3: and extracting first to fourth components of the first quaternion matrix after modulation and transformation, combining the first component and the second component into a first complex matrix, and combining the third component and the fourth component into a second complex matrix.
Specifically, as shown in fig. 2, a quaternion matrix Q is extracted1And combine them into two new complex matrices, namely:
wherein: operators S (-), X (-), Y (-), and Z (-), represent the extraction of the first, second, third, and fourth components, respectively, of the quaternion matrix.
Step S4: and performing equal modulus decomposition on the second complex matrix to obtain a first matrix and a second matrix.
Specifically, as shown in FIG. 2, for the complex matrix C2Performing equal mode decomposition to obtain a matrix T11、T12That is to say that,
A
1、
respectively represent a matrix C
2Amplitude and phase of (a), theta
1A random matrix is represented.
Step S5: and encoding the first complex matrix and the second matrix into a second quaternion matrix, and repeatedly executing the steps S2 to S4 to obtain a third complex matrix and a third matrix.
Specifically, as shown in FIG. 2, a complex matrix C is formed1、T12The code is a full quaternion matrix, i.e.:
G2=Re(C1)+iIm(C1)+jRe(T12)+kIm(T12),
wherein: the operators Re (·), Im (·) represent the extraction of the real and imaginary components of the complex matrix, respectively.
Repeating the steps S2 to S4 to obtain a complex matrix C3、T22。
Step S6: and encoding the third complex matrix and the third matrix into a fourth complex matrix.
Specifically, as shown in FIG. 2, a complex matrix C is formed3、T22The coding is combined to obtain a complex matrix, i.e.:
D=[C3 T22],
the plural matrix D is subjected to Gyrator transformation. Wherein, the calculation formula of the Gyrator conversion is as follows,
here, (u, v) represents frequency domain coordinates, (x, y) represents spatial domain coordinates, and β is a rotation angle.
Step S7: and obtaining a ciphertext by performing truncation coding on the fourth complex matrix.
Specifically, as shown in fig. 2, the ciphertext is obtained by truncation coding, that is:
E=AT[D],
wherein: the operator AT (-) represents magnitude truncation.
Further, to verify the effectiveness and feasibility of the method of the present invention, four gray-scale images (as shown in fig. 3) were selected for the experiment, the image size was 256 × 256, the rotation angles of the quaternion Gyrator transformation were 0.5377 and 0.9134, respectively, the rotation angle of the quaternion Gyrator transformation was 0.1548, and the pure quaternion units in the quaternion Gyrator transformation and the phase mask were all pure quaternion units in the phase mask
According to the encryption method, the obtained ciphertext image is shown in fig. 4, so that the information of the ciphertext image is disordered and unordered, and any useful information of the original plaintext image cannot be seen visually; the decryption result using the correct key is shown in fig. 5, and the peak snr is 251.9141dB, 251.4627dB, 251.4705dB and 251.4594dB, respectively, and it can be seen that the decrypted image is identical to the original image.
In summary, the invention provides a multi-image encryption method based on quaternion Gyrator transformation and equal modulus decomposition. The specific process comprises the following steps: (1) encoding the image into a quaternion matrix; (2) carrying out Gyrator transformation on the quaternion matrix; (3) an equivalent complex matrix representation; (4) performing equal-mode decomposition; (5) repeating the steps (1) to (4); (6) combining to obtain a plurality of matrixes and carrying out Gyrator transformation; (7) and cutting off the code to obtain a ciphertext.
According to the image encryption method based on the cascade equimodular decomposition, which is provided by the embodiment of the invention, the quaternion matrix is used for coding the multiple channel images, so that the transmission efficiency is higher; the cascade quaternion Gyrator transformation and the equimodular decomposition avoid the iterative process and have lower complexity; through decomposition and recombination of the quaternion matrix, the safety is higher, the multi-channel image is encoded into a whole to be processed by adopting quaternion matrix representation, so that the capacity of the image to be transmitted can be greatly improved, and the safety is higher and can be applied to safety protection of image information.
Next, an image encryption apparatus based on cascade equal modulus decomposition according to an embodiment of the present invention will be described with reference to the drawings.
Fig. 6 is a schematic structural diagram of an image encryption apparatus based on cascade equal modulus decomposition according to an embodiment of the present invention.
As shown in fig. 6, the image encryption apparatus 10 based on the cascade equal modulus decomposition includes: a first encoding module 100, a modulation transform module 200, an extraction module 300, an equal modulus decomposition module 400, a repetition module 500, a second encoding module 600, and a truncation module 700.
The first encoding module 100 is configured to encode an image into a first quaternion matrix. The modulation conversion module 200 is configured to perform modulation quaternion Gyrator conversion on the first quaternion matrix. The extracting module 300 is configured to extract first to fourth components of the first quaternion matrix after modulation transformation, combine the first component and the second component into a first complex matrix, and combine the third component and the fourth component into a second complex matrix. The equimode decomposition module 400 is configured to equimode decompose the second complex matrix to obtain a first matrix and a second matrix. The repeating module 500 is configured to encode the first complex matrix and the second matrix into a second quaternion matrix, and repeatedly perform the modulation transformation module 200, the extraction module 300, and the equal modulus decomposition module 400 to obtain a third complex matrix and a third matrix. The second encoding module 600 is configured to encode the third complex matrix and the third matrix into a fourth complex matrix. The truncation module 700 is configured to truncate and encode the fourth complex matrix to obtain a ciphertext. The device 10 of the embodiment of the invention can encode the multi-channel image into a whole by adopting quaternion matrix representation for processing, greatly improves the capacity of the image to be transmitted, has higher safety at the same time, and can be applied to the safety protection of image information.
Further, in one embodiment of the present invention, the quaternion Gyrator transform calculation formula is:
where, (u, v) represents frequency domain coordinates, (x, y) represents spatial domain coordinates, α is a rotation angle, μ is an arbitrary unit pure four-element number, and P represents a randomly generated phase mask.
Further, in one embodiment of the present invention, the first complex matrix and the second complex matrix are calculated by the following formula:
wherein operators S (-), X (-), Y (-), and Z (-), represent the first, second, third, and fourth components.
Further, in one embodiment of the present invention, the calculation formula of the first matrix and the second matrix is:
wherein A is
1、
Respectively represent a matrix C
2Amplitude and phase of (a), theta
1A random matrix is represented.
Further, in one embodiment of the present invention, the formula of the truncation coding is:
E=AT[D],
where the operator AT (-) represents amplitude truncation and D is a fourth complex matrix.
It should be noted that the foregoing explanation on the embodiment of the image encryption method based on the cascade equal-modulus decomposition is also applicable to the image encryption apparatus based on the cascade equal-modulus decomposition in this embodiment, and details are not repeated here.
According to the image encryption device based on the cascade equimodular decomposition, which is provided by the embodiment of the invention, the quaternion matrix is used for coding a plurality of channel images, so that the transmission efficiency is higher; the cascade quaternion Gyrator transformation and the equimodular decomposition avoid the iterative process and have lower complexity; through decomposition and recombination of the quaternion matrix, the safety is higher, the multi-channel image is encoded into a whole to be processed by adopting quaternion matrix representation, so that the capacity of the image to be transmitted can be greatly improved, and the safety is higher and can be applied to safety protection of image information.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.