CN112019701B - Method for realizing image encryption by adopting nonlinear low-pass filtering - Google Patents
Method for realizing image encryption by adopting nonlinear low-pass filtering Download PDFInfo
- Publication number
- CN112019701B CN112019701B CN202010936222.XA CN202010936222A CN112019701B CN 112019701 B CN112019701 B CN 112019701B CN 202010936222 A CN202010936222 A CN 202010936222A CN 112019701 B CN112019701 B CN 112019701B
- Authority
- CN
- China
- Prior art keywords
- matrix
- low
- data
- pass filtering
- 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.)
- Expired - Fee Related
Links
- 238000001914 filtration Methods 0.000 title claims abstract description 94
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000009466 transformation Effects 0.000 claims abstract description 77
- 230000008569 process Effects 0.000 claims abstract description 19
- 238000010606 normalization Methods 0.000 claims abstract description 9
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 239000011159 matrix material Substances 0.000 claims description 210
- 238000006243 chemical reaction Methods 0.000 claims description 17
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 12
- 238000012545 processing Methods 0.000 claims description 7
- 230000006798 recombination Effects 0.000 claims description 6
- 238000005215 recombination Methods 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 abstract description 4
- 230000000694 effects Effects 0.000 description 8
- 230000006978 adaptation Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 210000001503 joint Anatomy 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000008521 reorganization Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/44—Secrecy systems
- H04N1/448—Rendering the image unintelligible, e.g. scrambling
- H04N1/4486—Rendering the image unintelligible, e.g. scrambling using digital data encryption
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Facsimile Transmission Control (AREA)
- Image Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a method for realizing image encryption by adopting nonlinear low-pass filtering, which is suitable for image data encryption and decryption transmission. The method mainly comprises the steps of carrying out normalization preprocessing on image data, firstly carrying out extensible first low-pass filtering transformation, and taking transformation parameters as a first secret key; then, second low-pass filtering transformation is carried out, the transformation parameters are used as second keys, nonlinear symmetric transformation is carried out to finish image encryption, the transformation parameters are used as third keys to be informed to a receiving party, then the receiving party adopts the three keys to carry out corresponding inverse transformation in sequence, and decryption of image data is finished. The method has the advantages that the expansion is very easy to carry out no matter low-pass filtering transformation or nonlinear symmetrical transformation, the multiple encryption is realized, and the safety of the file is improved. Meanwhile, the distortion degree in the decryption process is small, the decryption mode is basically similar to the encryption mode, only the parameters are different, and engineering application is very convenient.
Description
Technical Field
The invention relates to the field of image encryption and restoration, in particular to a method for realizing image encryption by adopting nonlinear low-pass filtering.
Background
With the development of society and networks, more and more images are spread on the internet. In some important financial and military fields, security of image dissemination has raised concerns for more and more researchers. Image encryption and decryption techniques have been rapidly developed in recent decades. Low pass filters are commonly applied with digital signal processing for filtering noisy signals. It can also be applied to encryption and decryption of image signals. At present, few researches on encryption and decryption by applying low-pass filtering are carried out, and the main reason is that the encryption is easy and the decryption is difficult. Since the decryption process inevitably carries out differential operation, signal distortion is easily caused, and therefore the restored image cannot be ensured to be completely consistent with the original image.
Based on the background reasons, the invention provides a method combining extensible low-pass filtering and nonlinear symmetrical transformation, and decryption without singularity completely and seamlessly enables an image to be free of distortion, so that multi-layer transformation encryption and decryption can be performed, high-security transmission of the image is realized, and the method has high practical application value.
It is to be noted that the information invented in the above background section is only for enhancing the understanding of the background of the present invention, and therefore, may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide a method for realizing image encryption by adopting nonlinear low-pass filtering, and further solves the problems of difficult expansion and low-pass transformation distortion in the traditional image encryption and decryption algorithm to a certain extent.
Step S10, reading the file to be encrypted by a computer, storing the file as a matrix array, and then performing data conversion processing;
step S20, performing extensible first low-pass filtering transformation on the data to obtain a first low-pass filtering matrix, and taking a first low-pass filtering parameter as a first secret key;
step S30, carrying out secondary low-pass filtering transformation on the primary low-pass filtering matrix data to obtain a secondary low-pass filtering matrix, and taking secondary low-pass filtering parameters as a second key;
step S40, carrying out nonlinear symmetric transformation on the quadratic low-pass filter matrix to obtain nonlinear symmetric matrix data, and taking nonlinear symmetric transformation parameters as a third key;
step S50, image data conversion is carried out on the nonlinear symmetric matrix data and then the nonlinear symmetric matrix data is stored as an image file, the encryption process is completed, and the encrypted data file is sent out;
step S60, receiving the sending file at the receiving end and storing the file as matrix data, and carrying out data preprocessing to obtain a receiving end data matrix;
step S70, according to the third key, carrying out nonlinear symmetric inverse transformation on the receiving end data matrix to obtain nonlinear symmetric inverse transformation matrix data;
step S80, according to the second key, carrying out secondary low-pass filtering inverse transformation on the nonlinear symmetric inverse transformation matrix to obtain an inverse secondary low-pass filtering matrix;
step S90, according to the first key, the inverse quadratic low-pass filtering matrix is inversely transformed by the first low-pass filtering to obtain an inverse matrix of the first low-pass filtering;
and S100, performing data conversion aiming at the first low-pass filtering inverse matrix, storing the converted data as picture data, obtaining a decrypted file, and finishing the decryption process.
In an exemplary embodiment of the present invention, reading a file to be encrypted by using a computer, storing the file as a matrix array, and then performing data conversion processing includes: firstly, selecting a gray picture file to be encrypted, and naming the gray picture file as rain. Then stored as data matrix A1Then, the dimension is calculated and recorded as m rows and n columns. Then, for the matrix A1Carrying out data recombination to obtain a row matrix A with 1 row m × n columns2. Finally, for A2Simple normalization pretreatment is carried out to obtain a normalization matrix A of matrix element numbers in an interval (0,1)3。
In an exemplary embodiment of the present invention, performing an extensible first low-pass filtering transformation on the data to obtain a first low-pass filtering matrix comprises:
wherein T is1,T2,T3,T4The first key is used to inform the receiving party that the first low-pass filtering transformation parameters are all positive constant value parameters, which are selected in detail in the embodiments described later. T is0The discrete time constants are chosen in detail as will be described later in the examples. A. the4The dimension of the obtained first low-pass filter matrix is 1 row m x n column. And A is4(i) I is more than or equal to 1 and less than or equal to mn. The subsequent matrix definitions are the same and are not repeated.Is a matrix A3Is determined by the velocity vector of (a),is a matrix A4Velocity vector of A3The input matrix is an input matrix of the first low-pass filtering transformation, namely a normalized row matrix obtained after data conversion processing is carried out on the file to be encrypted.
In an exemplary embodiment of the present invention, performing a second low-pass filtering transformation on the first low-pass filtering matrix data to obtain a second low-pass filtering matrix includes:
wherein W1,W2,W3,W4The second key is used to inform the receiver that the second low-pass filter transformation parameters are all positive constant value parameters, which are selected in detail in the embodiments described later. T is0Are discrete time constants.Is a matrix A4The velocity vector whose value does not need to be recalculated, has been defined or calculated previously.
A5The dimension of the quadratic low-pass filter matrix is 1 row m x n column. And A is5(i) I is more than or equal to 1 and less than or equal to mn.Is a matrix A5Velocity vector of A4The input matrix of the second low-pass filtering transformation is the first low-pass filtering matrix.
In an exemplary embodiment of the present invention, performing a non-linear symmetric transformation on the quadratic low-pass filter matrix to obtain non-linear symmetric matrix data includes:
wherein F1,F2,F3,F4The non-linear symmetric transformation parameter is a constant value, which is informed to the receiver as a third key. A. the5Is a quadratic low-pass filter matrix, A6The obtained nonlinear symmetric matrix is obtained.
In an exemplary embodiment of the present invention, converting the nonlinear symmetric matrix data into image data and then storing the image data as an image file includes:
imax=max(A6);imin=min(A6);
If imax=imin>0;A7(i)=1;
If imax=imin≤0;A7(i)=0;
Wherein A is6For said non-linear symmetric matrix data, A7For normalizing the transformation matrix, where max (A)6) Representation pair matrix A6All elements of (2) are maximized and are denoted as imax。min(A6) Representation pair matrix A6All elements of (2) are minimized and are denoted as imin。
Then to A7Performing data recombination, converting the data into an m-row-n-column matrix A from a 1-row-m-n-column matrix8And stored as an image data file, which is recorded as rain1. png. And the image encryption process is finished, and the encrypted image file rain1.png is sent to the remote receiving end.
In an exemplary embodiment of the present invention, receiving a transmission file at a receiving end and storing the transmission file as matrix data, and performing data preprocessing to obtain a receiving end data matrix includes: firstly, the sent encrypted image file is received at a remote receiving end and stored as rain2. png. Secondly, after reading the image file by adopting a computer, storing the data into a matrix A with m rows and n columns9. Then the matrix A is formed9Carrying out data recombination to obtain a matrix A with 1 row m x n10. Finally, according to iminAnd imaxTo A10Inverse normalized transformation is carried out to obtain a receiving end data matrix A11The inverse normalized transformation process is as follows:
if imax≠imin;A11(i)=imin+A10(i)(imax-imin);
If imax=imin>0;A11(i)=imax;
If imax=imin≤0;A11(i)=imin。
In an exemplary embodiment of the present invention, performing a nonlinear symmetric inverse transform on a receiving-end data matrix to obtain nonlinear symmetric inverse transform matrix data includes:
wherein F1,F2,F3,F4Is said third key, A11For the receiving end data matrix, A12I.e. the resulting nonlinear symmetric inverse transform matrix data.
In an exemplary embodiment of the invention, performing an inverse quadratic low-pass filtering on the inverse nonlinear symmetric transform matrix to obtain an inverse quadratic low-pass filtering matrix comprises:
wherein W1,W2,W3,W4Is a second key parameter, T0With a discrete time constant, A12For the non-linear symmetric inverse transformation of the matrix data,is a matrix A12Is determined by the velocity vector of (a),is a matrix A13Velocity vector of A13The dimension of the obtained inverse quadratic low pass filter matrix is 1 row m x n column.
In an exemplary embodiment of the invention, performing a first inverse low-pass filtering on the inverse quadratic low-pass filtering matrix, and obtaining the first inverse low-pass filtering matrix comprises:
whereinWithout recalculation, the last step value, T, can be used1,T2,T3,T4Is a first key parameter, T0With a discrete time constant, A13In order to be an inverse quadratic low pass filter matrix,is a matrix A14Velocity vector of A14The first inverse low-pass filter matrix is finally obtained, and the dimension of the first inverse low-pass filter matrix is 1 row m x n column.
In an exemplary embodiment of the present invention, performing data conversion on the first low-pass filtered inverse matrix, and storing the converted data as picture data, to obtain a decrypted file includes: according to the first low-pass filtering inverse matrix A14Converting into image matrix format, i.e. converting from 1 row m × n column to m rows n columns, and recording the obtained matrix as A15. Then A is mixed15Stored as an image file, noted rain2. png. Finally, the decrypted file is obtained.
Advantageous effects
The method for realizing image encryption by adopting nonlinear low-pass filtering has the advantages of three, firstly, the method adopts a novel low-pass filtering transformation mode, can realize the consistency of encryption and decryption modes, ensures that the decryption process has no distortion, and avoids the problem of image distortion caused by differential realization in decryption and reduction of the traditional low-pass filtering transformation. And secondly, a novel nonlinear symmetrical transformation mode is adopted, so that the encryption and decryption are very convenient, the free transformation of all the number domains can be realized, the decryption is more difficult, and in the decryption process, the complete restoration of the image can be realized without distortion due to seamless butt joint. And thirdly, the mode of combining the low-pass filtering and the nonlinear symmetric transformation can be expanded infinitely to form a multi-layer encryption and decryption measure, and the security of encrypted image data is improved through a plurality of layers of keys. Therefore, the method provided by the invention has high engineering application value and great innovation.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a flow chart of a method for implementing image encryption by using nonlinear low-pass filtering according to the present invention;
fig. 2 is an original image of a section of text to be encrypted according to the method provided in the embodiment of the present invention;
FIG. 3 is an encrypted image of a method provided by an embodiment of the invention;
FIG. 4 is an image decrypted with a correct key according to a method provided by an embodiment of the present invention;
FIG. 5 shows a method of using T in accordance with an embodiment of the present invention2An image decrypted by an inaccurate key of 3;
FIG. 6 shows an embodiment of the present inventionUse of the provided method T3An image decrypted by an inaccurate key of 3;
FIG. 7 shows a method of using F in accordance with an embodiment of the present invention4-5, an inaccurate key decrypted image;
FIG. 8 shows a flowchart of a method F provided by an embodiment of the invention3An inaccurate key of 50.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the invention.
The invention provides a method for realizing image encryption by adopting nonlinear low-pass filtering, which forms multilayer encryption by combining multilayer low-pass filtering transformation and multilayer nonlinear symmetrical transformation to protect an encrypted image. And meanwhile, a multi-layer key is formed through parameters in a conversion mode, so that correct parameters are provided for image decryption. It should be noted that, in the embodiment of the present invention, only two layers of low-pass filtering and one layer of nonlinear symmetric transformation are used for description, but actually, the low-pass filtering method and the nonlinear symmetric transformation method provided by the present invention can be flexibly combined many times, as long as the computer memory allows, hundreds of layers of encryption can be implemented, and meanwhile, it can be ensured that the decryption process is basically distortion-free. Therefore, the method has very flexible and free expansibility and high safety. Particularly, the low-pass filtering form is adopted, so that the problem of differential distortion generated in decryption engineering by the traditional low-pass filtering is avoided, and the traditional low-pass filtering is difficult to carry out multilayer expansion application.
The following further explains and explains a method for realizing image encryption by using nonlinear low-pass filtering according to the present invention with reference to the drawings. Referring to fig. 1, the method for implementing image encryption by using nonlinear low-pass filtering may include the following steps:
step S10, reading the file to be encrypted by a computer, storing the file as a matrix array, and then performing data conversion processing;
specifically, a file to be encrypted is first selected, named rain. In the case of a color picture, it is first converted to a gray picture.
Secondly, reading the gray picture data, storing the gray picture data as a data matrix, and recording the data matrix as A1Then, the dimension is obtained, which is a two-dimensional matrix and is recorded as m rows and n columns.
Then, for the matrix A1Performing data reorganization to obtain a row matrix, and recording the row matrix as A2Which is a one-dimensional matrix with 1 row m x n columns.
Finally, for A2Performing simple normalization pretreatment to obtain a normalization matrix, and recording the normalization matrix as A3. The normalization process is to ensure A3The middle matrix element number is within the interval (0, 1).
Step S20, performing extensible first low-pass filtering transformation on the data to obtain a first low-pass filtering matrix, and taking a first low-pass filtering parameter as a first secret key;
specifically, first, the first low-pass filter transformation parameter T is set1,T2,T3,T4The parameter is a positive constant value parameter, which is selected in detail in the following embodiment and the above four parameters are used as the first key to inform the receiving party.
Secondly, a discrete time constant T is set0And sets the initial value of the first low-pass filter matrix. Namely is provided withThe first low-pass filter matrix obtained finally is A4The dimension is 1 row m x n column. And A is4(i) I is more than or equal to 1 and less than or equal to mn. The subsequent matrix definitions are the same and are not repeated. Setting an initial value A of a matrix4(1)=A3(1)。
finally, according to the velocity vectorCalculating a first low-pass filter matrix A4The element values of (a) are as follows:
step S30, carrying out secondary low-pass filtering transformation on the primary low-pass filtering matrix data to obtain a secondary low-pass filtering matrix, and taking secondary low-pass filtering parameters as a second key;
specifically, firstly, a quadratic low-pass filter transformation parameter W is set1,W2,W3,W4The parameters are positive constant values, which are detailed in the following embodiments and are reported to the receiver as the second key.
Secondly, a discrete time constant T is set0And sets the initial value of the quadratic low-pass filter matrix. Namely, the finally obtained quadratic low-pass filter matrix is set as A5The dimension is 1 row m x n column. Setting an initial value A of a matrix5(1)=A4(1)。
Finally, according to the velocity vectorCalculating a quadratic low-pass filter matrix A5The element values of (a) are as follows:
although the above-described low-pass filtering conversion is performed only twice, it is actually possible to perform a larger number of low-pass filtering conversions more conveniently and to realize a plurality of encryptions. And the transformation has no singular point, and is very convenient for multiple times of expansion.
Step S40, carrying out nonlinear symmetric transformation on the quadratic low-pass filter matrix to obtain nonlinear symmetric matrix data, and taking nonlinear symmetric transformation parameters as a third key;
specifically, first, a nonlinear symmetric transformation parameter F is set1,F2,F3,F4It is a common value, and its detailed design is described laterThe case is implemented and informed to the recipient as the third key.
Secondly, aiming at the quadratic low-pass filtering matrix A5Then, nonlinear symmetric transformation is performed to obtain a nonlinear symmetric matrix, which is denoted as A6The transformation relationship among the elements is as follows:
step S50, image data conversion is carried out on the nonlinear symmetric matrix data and then the nonlinear symmetric matrix data is stored as an image file, the encryption process is completed, and the encrypted data file is sent out;
specifically, the nonlinear symmetric matrix a is first obtained6The data is normalized and transformed to obtain a normalized matrix, which is recorded as A7The transformation is as follows:
imax=max(A6);imin=min(A6);
If imax=imin>0;A7(i)=1;
If imax=imin≤0;A7(i)=0;
Wherein max (A)6) Representation pair matrix A6All elements of (2) are maximized and are denoted as imax。min(A6) Representation pair matrix A6All elements of (2) are minimizedIs recorded as imin。
Secondly, for A7Performing data recombination, converting the data from a matrix with 1 row m × n columns into a matrix with m rows and n columns, and recording the matrix as A8。
Finally, converting the obtained A8Stored as an image data file, and recorded as rain1. png. And the image encryption process is finished, and the encrypted image file rain1.png is sent to the remote receiving end.
Step S60, receiving the sending file at the receiving end and storing the file as matrix data, and carrying out data preprocessing to obtain a receiving end data matrix;
specifically, the sent encrypted image file is received at the remote receiving end and stored as rain2. png. Secondly, after reading the image file by adopting a computer, storing the data as a matrix, and recording the matrix as A9. The matrix is m rows and n columns.
Then the matrix A is formed9Recombining data, converting into one-dimensional row vector to obtain 1 row m × n column matrix, and recording as A10. Finally, according to iminAnd imaxTo A10Inverse normalized transformation is carried out to obtain a receiving end data matrix A11The inverse normalized transformation process is as follows:
if imax≠imin;A11(i)=imin+A10(i)(imax-imin);
If imax=imin>0;A11(i)=imax;
If imax=imin≤0;A11(i)=imin。
Step S70, according to the third key, carrying out nonlinear symmetric inverse transformation on the receiving end data matrix to obtain nonlinear symmetric inverse transformation matrix data;
in particular, according to said third key F1,F2,F3,F4To the receiving end data matrix A11Performing nonlinear symmetric inverse transformation to obtain nonlinear symmetric inverse transformation matrix data denoted by A12Element conversion between themThe method comprises the following steps:
step S80, according to the second key, carrying out secondary low-pass filtering inverse transformation on the nonlinear symmetric inverse transformation matrix to obtain an inverse secondary low-pass filtering matrix;
specifically, according to the second key parameter W1,W2,W3,W4And a discrete time constant T0And setting the initial value of the quadratic low-pass filter inverse matrix. Namely, the finally obtained inverse quadratic low pass filter matrix is set as A13The dimension is 1 row m x n column. Setting an initial value A of a matrix13(1)=A12(1)。
finally, according to the velocity vectorCalculating an inverse quadratic low pass filter matrix A13The element values of (a) are as follows:
step S90, according to the first key, the inverse quadratic low-pass filtering matrix is inversely transformed by the first low-pass filtering to obtain an inverse matrix of the first low-pass filtering;
specifically, according to the first key parameter T1,T2,T3,T4And a discrete time constant T0And setting an initial value of the first low-pass filtering inverse matrix. Namely, the finally obtained first low-pass filter inverse matrix is set as A14The dimension is 1 row m x n column. Setting an initial value A of a matrix14(1)=A13(1)。
Finally, according to the velocity vectorCalculating a first low-pass filter inverse matrix A14The element values of (a) are as follows:
and S100, performing data conversion aiming at the first low-pass filtering inverse matrix, storing the converted data as picture data, obtaining a decrypted file, and finishing the decryption process.
Specifically, according to the first low-pass filtering inverse matrix A14Converting into image matrix format, i.e. converting from 1 row m × n column to m rows n columns, and recording the obtained matrix as A15. Then A is mixed15Stored as an image file, noted rain2. png. Finally, the decrypted file is obtained. It can be seen by comparison that there is almost no difference from the original file, the distortion degree is very small, but if the decryption parameter is not correct, the image information cannot be identified.
Case implementation and computer processing result analysis
In step S10, the image file is selected as a screenshot of a segment of text. Since it is a color image, it is converted into a black-and-white image, and then it is shown in fig. 2. It contains m 159 rows and n 698 columns.
In step S20, the first low-pass filter transformation parameter T is set1=0.01,T2=1,T3=0.02,T4=1,T0=0.001;
In step S30, a quadratic low-pass filtering conversion parameter W is set1=0.03,W2=2,W3=0.05,W4=3;
In step S40, a nonlinear-symmetric transformation parameter F is set1=1,F2=100,F3=1,F4=-100;
The encrypted data is stored as an encrypted image and transmitted in step S50, as shown in fig. 3.
In steps S60 and S100, the operation may be performed as described in the embodiment.
In steps S70, S80, and S90, the picture is decrypted by using the accurate first key, second key, and third key parameters, and the effect after decryption is shown in fig. 4.
When the first key takes the decryption parameter T1=0.01,T2=3,T3=0.02,T4When 1, the decryption effect is as shown in fig. 5.
When the first key takes the decryption parameter T1=0.01,T2=3,T3=3,T4When 1, the decryption effect is as shown in fig. 6.
When the third key takes the decryption parameter F1=1,F2=100,F3=1,F4When-5, the decryption effect is as shown in fig. 7.
When the third key takes the decryption parameter F1=1,F2=100,F3=50,F4The decryption effect is shown in fig. 8 when-100.
It can be seen from the above cases that the encryption method provided by the present invention, when the picture is intercepted by the other party, the picture is black, as shown in fig. 3, the text information is completely hidden. Under the protection of three keys, the error of any one key will bring about bad decryption effect and distortion of graphics. Of course, the key parameters are somewhat less distorted, e.g., F in the third key parameter4However, some key parameters have a great influence on the decryption effect. Therefore, through three-layer encryption, the security of the picture is greatly improved. Particularly, the nonlinear low-pass filtering encryption method provided by the invention has the advantages that each key is very convenient to expand, the decryption and encryption modes are similar, the operation is convenient and simple, and the nonlinear low-pass filtering encryption method can be expanded into a multilayer encryption mode such as four layers and five layers if needed. Therefore, the invention has high engineering application value.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
Claims (1)
1. A method for realizing image encryption by adopting nonlinear low-pass filtering is characterized by comprising the following steps:
step S10, reading the file to be encrypted by using a computer, storing the file as a matrix array, and performing data conversion as follows:
firstly, selecting a gray picture file to be encrypted, and naming the gray picture file as rain.png; then stored as data matrix A1Then, the dimension is calculated and recorded as m rows and n columns; then, for the matrix A1Carrying out data recombination to obtain a row matrix A with 1 row m × n columns2(ii) a Finally, for A2Simple normalization pretreatment is carried out to obtain a normalization matrix A of matrix element numbers in an interval (0,1)3;
Step S20, performing extensible first low-pass filtering transformation on the data to obtain a first low-pass filtering matrix, and using the first low-pass filtering parameters as a first key as follows:
wherein T is1,T2,T3,T4Informing a receiver of the first low-pass filtering transformation parameter as a first secret key, wherein the first secret key is a positive constant value parameter which can be selected randomly; t is0Is a discrete time constant; a. the3The input matrix is an input matrix of the first low-pass filtering transformation, namely a normalized row matrix obtained after data conversion processing is carried out on the file to be encrypted;is a matrix A3Is determined by the velocity vector of (a),is a matrix A4Velocity vector of A4The obtained initial low-pass filter matrix is the final low-pass filter matrix, and the dimension of the initial low-pass filter matrix is 1 row m x n column; and A is4(i) I is not less than 1 and not more than m x n;
step S30, performing a second low-pass filtering transformation on the first low-pass filtering matrix data to obtain a second low-pass filtering matrix, and using a second low-pass filtering parameter as a second key, which specifically includes the following steps:
wherein W1,W2,W3,W4The second key is used for informing the receiver that the second key is a secondary low-pass filtering transformation parameter which is selected as a positive constant value parameter and can be selected randomly; t is0In order to be a discrete time constant,is a matrix A4The calculation process of the velocity vector is as the previous step; a. the5Obtaining a final secondary low-pass filter matrix with dimension of 1 row m x n; and A is5(i) I is not less than 1 and not more than m x n;is a matrix A5Velocity vector of A4The input matrix is the second low-pass filter transformation and is also the first low-pass filter matrix;
step S40, performing nonlinear symmetric transformation on the quadratic low-pass filter matrix to obtain nonlinear symmetric matrix data, and using a nonlinear symmetric transformation parameter as a third key, which specifically includes the following steps:
wherein F1,F2,F3,F4A nonlinear symmetric transformation parameter, which is a constant value, that is notified to the receiver as a third key; a. the5Is a quadratic low-pass filter matrix, A6Obtaining a nonlinear symmetric matrix;
step S50, converting the image data of the non-linear symmetric matrix data and then storing the converted image data as an image file, completing the encryption process, and sending out the encrypted data file, which specifically includes the following steps:
firstly, the nonlinear symmetric matrix A is6The data is normalized and transformed to obtain a normalized matrix, which is recorded as A7The transformation is as follows:
imax=max(A6);imin=min(A6);
If imax=imin>0;A7(i)=1;
If imax=imin≤0;A7(i)=0;
Wherein max (A)6) Representation pair matrix A6All elements of (2) are maximized and are denoted as imax;min(A6) Representation pair matrix A6All elements of (2) are minimized and are denoted as imin(ii) a Secondly, for A7Performing data recombination, converting the data from a matrix with 1 row m × n columns into a matrix with m rows and n columns, and recording the matrix as A8(ii) a Finally, converting the obtained A8Storing as an image data file, and recording as rain1. png; when the image encryption process is finished, sending the encrypted image file rain1.png to a remote receiving end;
step S60, receiving the sending file at the receiving end and storing the file as matrix data, and performing data preprocessing to obtain a receiving end data matrix, which specifically includes the following steps:
firstly, receiving a sent encrypted image file at a remote receiving end, and storing the encrypted image file as rain2. png; secondly, after reading the image file by adopting a computer, storing the data as a matrix, and recording the matrix as A9(ii) a The matrix is m rows and n columns; then the matrix A is formed9Recombining data, converting into one-dimensional row vector to obtain 1 row m × n column matrix, and recording as A10(ii) a Finally, according to iminAnd imaxTo A10Inverse normalized transformation is carried out to obtain a receiving end data matrix A11The inverse normalized transformation process is as follows:
if imax≠imin;A11(i)=imin+A10(i)(imax-imin);
If imax=imin>0;A11(i)=imax;
If imax=imin≤0;A11(i)=imin;
Step S70, according to the third key, carrying out nonlinear symmetric inverse transformation on the receiving end data matrix to obtain nonlinear symmetric inverse transformation matrix data, which specifically comprises the following steps;
wherein F1,F2,F3,F4Is said third key, A11For the receiving end data matrix, A12Obtaining nonlinear symmetric inverse transformation matrix data;
step S80, performing a second inverse low-pass filtering on the nonlinear symmetric inverse transform matrix according to the second key, to obtain an inverse second inverse low-pass filtering matrix, which specifically includes the following steps:
wherein W1,W2,W3,W4Is a second key parameter, T0With a discrete time constant, A12For the non-linear symmetric inverse transformation of the matrix data,is a matrix A12Is determined by the velocity vector of (a),is a matrix A13Velocity vector of A13The obtained inverse quadratic low pass filter matrix is obtained, and the dimension of the inverse quadratic low pass filter matrix is 1 row m x n column;
step S90, according to the first key, the inverse quadratic low-pass filtering matrix is inversely transformed by the first low-pass filtering to obtain an inverse matrix of the first low-pass filtering;
whereinWithout recalculation, the last step value, T, can be used1,T2,T3,T4Is a first key parameter, T0With a discrete time constant, A13In order to be an inverse quadratic low pass filter matrix,is a matrix A14Velocity vector of A14The obtained initial low-pass filtering inverse matrix is the final solved initial low-pass filtering inverse matrix, and the dimension of the initial low-pass filtering inverse matrix is 1 row m x n column;
step S100, performing data conversion on the first low-pass filtered inverse matrix, storing the converted data as picture data, obtaining a decrypted file, and completing a decryption process, which specifically includes:
firstly, according to the first low-pass filtering inverse matrix A14Converting into image matrix format, i.e. converting from 1 row m × n column to m rows n columns, and recording the obtained matrix as A15(ii) a Then A is mixed15And storing the file as an image file, and recording the image file as rain2.png, thus obtaining the final decrypted file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010936222.XA CN112019701B (en) | 2020-09-08 | 2020-09-08 | Method for realizing image encryption by adopting nonlinear low-pass filtering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010936222.XA CN112019701B (en) | 2020-09-08 | 2020-09-08 | Method for realizing image encryption by adopting nonlinear low-pass filtering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112019701A CN112019701A (en) | 2020-12-01 |
CN112019701B true CN112019701B (en) | 2021-09-21 |
Family
ID=73521208
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010936222.XA Expired - Fee Related CN112019701B (en) | 2020-09-08 | 2020-09-08 | Method for realizing image encryption by adopting nonlinear low-pass filtering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112019701B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915519A (en) * | 2012-09-12 | 2013-02-06 | 东北林业大学 | Algorithm for encrypting image on basis of chaotic mapping and series changing |
CN111581658A (en) * | 2020-05-13 | 2020-08-25 | 中国人民解放军海军航空大学 | Method for encrypting image by adopting bilinear Fourier transform |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8505108B2 (en) * | 1993-11-18 | 2013-08-06 | Digimarc Corporation | Authentication using a digital watermark |
EP1527551A2 (en) * | 2002-07-27 | 2005-05-04 | XStream Security Solutions Ltd., LLC | Apparatus and method for encryption and decryption |
JP5590133B2 (en) * | 2010-09-30 | 2014-09-17 | 富士通株式会社 | Moving picture coding apparatus, moving picture coding method, moving picture coding computer program, moving picture decoding apparatus, moving picture decoding method, and moving picture decoding computer program |
CN104050623A (en) * | 2014-06-06 | 2014-09-17 | 西安理工大学 | Asymmetric double-image encryption and decryption method based on chaos and cascade DFrRT |
-
2020
- 2020-09-08 CN CN202010936222.XA patent/CN112019701B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915519A (en) * | 2012-09-12 | 2013-02-06 | 东北林业大学 | Algorithm for encrypting image on basis of chaotic mapping and series changing |
CN111581658A (en) * | 2020-05-13 | 2020-08-25 | 中国人民解放军海军航空大学 | Method for encrypting image by adopting bilinear Fourier transform |
Non-Patent Citations (2)
Title |
---|
Repeated filtering in consecutive fractional Fourier domains and its application to signal restoration.;M. Fatih Erden等;《IEEE Transactions on Signal Processing》;19991231;第1458-1462页 * |
基于分数阶傅里叶变换的数字水印与图像加密研究;郑蕾;《中国优秀硕士学位论文全文数据库 信息科技辑》;20151015;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112019701A (en) | 2020-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Malik et al. | Recovery based high capacity reversible data hiding scheme using even-odd embedding | |
Selva Mary et al. | Secure grayscale image communication using significant visual cryptography scheme in real time applications | |
CN112016112B (en) | Method for encrypting image by compounding Fourier transform and differential transform | |
Houssein et al. | An image steganography algorithm using haar discrete wavelet transform with advanced encryption system | |
KR101797030B1 (en) | Apparatus and method for processing image steganography using random permutation and difference of image | |
CN112019701B (en) | Method for realizing image encryption by adopting nonlinear low-pass filtering | |
CN111581658B (en) | Method for encrypting image by adopting bilinear Fourier transform | |
Sanam et al. | Non-Associative Algebra Redesigning Block Cipher with Color Image Encryption. | |
CN103220455A (en) | Apparatus and method for hiding secret information, and secret information restoring device and method | |
Wang et al. | A dynamic image encryption algorithm based on improved ant colony walking path thought | |
CN112529974B (en) | Color visual password sharing method and device for binary image | |
Cao et al. | A chaotic image encryption algorithm based on sliding window and pseudo-random stack shuffling | |
Solak et al. | A new approach for Steganography: Bit shifting operation of encrypted data in LSB (SED-LSB) | |
Punia et al. | Innovative image interpolation based reversible data hiding for secure communication | |
Kim et al. | Dual efficient reversible data hiding using Hamming code and OPAP | |
CN111246047B (en) | Method for realizing image encryption by differential advance and then realizing image restoration by inertial lag | |
Chiu et al. | An XOR-based progressive visual cryptography with meaningful shares | |
Hussein et al. | Linear Feedback Shift Registers-Based Randomization for Image Steganography | |
CN111159747B (en) | Method for realizing image encryption and restoration by adopting sine doubling and translation | |
Zou et al. | A meaningful image encryption algorithm based on prediction error and wavelet transform | |
Selvakumari et al. | Using visible and invisible watermarking algorithms for indexing medical images | |
Ye et al. | Color image encryption scheme based on quaternion discrete multi-fractional random transform and compressive sensing | |
Zhang et al. | Adaptive reversible data hiding scheme based on difference division interpolation | |
Bekkouche et al. | Hybrid image encryption based on digital pre-encryption and optical single random phase encoding | |
Li et al. | A novel extended secret image sharing scheme based on sharing matrix |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210921 |
|
CF01 | Termination of patent right due to non-payment of annual fee |