CN109831596B - Image encryption method and device and electronic equipment - Google Patents

Image encryption method and device and electronic equipment Download PDF

Info

Publication number
CN109831596B
CN109831596B CN201910008840.5A CN201910008840A CN109831596B CN 109831596 B CN109831596 B CN 109831596B CN 201910008840 A CN201910008840 A CN 201910008840A CN 109831596 B CN109831596 B CN 109831596B
Authority
CN
China
Prior art keywords
image
discrete wavelet
map
wavelet map
spliced
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
Application number
CN201910008840.5A
Other languages
Chinese (zh)
Other versions
CN109831596A (en
Inventor
李丽香
王紫琪
彭海朋
杨义先
李思颖
闫谨
李冲霄
王琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201910008840.5A priority Critical patent/CN109831596B/en
Publication of CN109831596A publication Critical patent/CN109831596A/en
Application granted granted Critical
Publication of CN109831596B publication Critical patent/CN109831596B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Transmission Control (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The embodiment of the invention provides an image encryption method, an image encryption device and electronic equipment, wherein the method comprises the following steps: determining a carrier image and an image to be encrypted; carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; carrying out discrete wavelet transform on an image to be encrypted to obtain a second discrete wavelet map; splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map; and encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image. In the embodiment of the invention, even if the encryption key used in the chaotic compression perception encryption algorithm and the chaotic matrix generation system are all stolen by an attacker, the attacker carries out chaotic compression decryption and carries out inverse discrete wavelet transformation on the discrete wavelet image obtained by decryption to obtain a visually meaningful covert image, so that the probability of further cracking the encrypted image by the attacker is reduced, and the attacker cannot obtain the encrypted image, thereby improving the security of image encryption.

Description

Image encryption method and device and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image encryption method and apparatus, and an electronic device.
Background
To improve information security, the image may be encrypted. In the field of image encryption technology, image information hiding algorithms can be divided into spatial information hiding algorithms and transform domain information hiding algorithms. The former implements information embedding by changing pixel values of some pixel points in an image, and has a large capacity, cannot be predicted, but has low security. The latter implements information embedding by changing some image transform domain coefficients. Compared with the spatial domain information hiding algorithm, the transform domain information hiding algorithm can effectively improve the safety.
The existing transform domain information hiding method adopts discrete Fourier transform and discrete wavelet transform. For example, in the image encryption process, discrete wavelet transform may be performed on an image to be encrypted to obtain a discrete wavelet map, and then the discrete wavelet map is encrypted by using a chaotic compressed sensing algorithm to obtain an encrypted noise map. However, the encryption key used in the chaotic compressed sensing algorithm and the chaotic matrix generation system are easily stolen by attackers. Once the encryption key used in the chaotic compression perception algorithm and the chaotic matrix generation system are stolen by an attacker, the attacker can carry out chaotic compression decryption and carry out inverse discrete wavelet transformation on a discrete wavelet image obtained by decryption, so that the encrypted image is stolen.
Therefore, the existing image encryption method is not high in safety.
Disclosure of Invention
The embodiment of the invention aims to provide an image encryption method, an image encryption device and electronic equipment, so as to improve the security of image encryption. The specific technical scheme is as follows:
in order to achieve the above object, an embodiment of the present invention provides an image encryption method, where the method includes:
determining a carrier image and an image to be encrypted;
carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; performing discrete wavelet transform on the image to be encrypted to obtain a second discrete wavelet map;
splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map;
and encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image.
Optionally, before the splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map, the method further includes:
and reducing the gray value of each pixel point in the second discrete wavelet map by a first preset multiple.
Optionally, the step of splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map includes:
intercepting the upper left corner area of the first discrete wavelet map;
rotating the second discrete wavelet map based on the principle that the sparsity of energy of each column is the same;
and splicing the rotated second discrete wavelet map with the upper left corner region of the first discrete wavelet map to obtain a spliced wavelet map.
Optionally, the step of encrypting the merged wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image includes:
encrypting the spliced wavelet image S according to the following formula to obtain an encrypted image Y:
Figure BDA0001936461080000021
wherein the content of the first and second substances,in order to measure the matrix of the measurements,
Figure BDA0001936461080000023
andare all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos.
Corresponding to the image encryption method, the embodiment of the invention also provides an image decryption method, which comprises the following steps:
decrypting the image to be decrypted by using a chaotic compressed sensing reconstruction algorithm to obtain a spliced wavelet map;
separating the spliced wavelet map to obtain a discrete wavelet map to be decrypted;
and carrying out inverse discrete wavelet transform on the discrete wavelet image to be decrypted to obtain a decrypted image.
Optionally, the step of decrypting the image to be decrypted by using a chaotic compressed sensing reconstruction algorithm to obtain a combined wavelet map includes:
decrypting the image Y 'to be decrypted according to the following formula to obtain a spliced wavelet image S':
wherein the content of the first and second substances,in order to measure the matrix of the measurements,
Figure BDA0001936461080000033
and
Figure BDA0001936461080000034
are all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos.
Optionally, the step of separating the merged wavelet map to obtain a discrete wavelet map to be decrypted includes:
and separating the spliced wavelet map based on the splicing rule of the spliced wavelet map in the image encryption process to obtain the discrete wavelet map to be decrypted.
Optionally, before performing inverse discrete wavelet transform on the discrete wavelet map to be decrypted to obtain a decrypted image, the method further includes:
and expanding a second preset multiple to the gray value of each pixel point in the discrete wavelet map to be decrypted.
In order to achieve the above object, an embodiment of the present invention further provides an image encryption apparatus, including:
the determining module is used for determining the carrier image and the image to be encrypted;
the conversion module is used for carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet image; performing discrete wavelet transform on the image to be encrypted to obtain a second discrete wavelet map;
the splicing module is used for splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map;
and the encryption module is used for encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image.
In order to achieve the above object, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any method step when executing the program stored in the memory.
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the above method steps.
In the image encryption method, the image encryption device and the electronic equipment provided by the embodiment of the invention, the carrier image and the image to be encrypted can be determined; carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; carrying out discrete wavelet transform on an image to be encrypted to obtain a second discrete wavelet map; splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map; and encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image. In the embodiment of the invention, even if the encryption key used in the chaotic compression perception encryption algorithm and the chaotic matrix generation system are stolen by an attacker, the attacker conducts chaotic compression decryption and performs inverse discrete wavelet transformation on the discrete wavelet image obtained by decryption to obtain a visually meaningful covert image, but cannot obtain the image to be encrypted, so that the probability of further cracking the encrypted image by the attacker is reduced, and the security of image encryption is improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an image encryption method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating image encryption according to an embodiment of the present invention;
fig. 3 is a schematic diagram of image decryption performed by an attacker according to an embodiment of the present invention;
FIG. 4 is a flowchart of an image decryption method according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating image decryption according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an image encryption apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an image decryption apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an image encryption method according to an embodiment of the present invention, where the method includes the following steps:
s101: the carrier image and the image to be encrypted are determined.
In the embodiment of the invention, the carrier image is not an image needing to be kept secret, and is a carrier of the image to be encrypted. The carrier image can be selected at will, and even if an attacker decrypts the carrier image, the attacker does not need to worry about secret information leakage. The image to be encrypted is an image which really needs to be kept secret, and if the image is decrypted by an attacker, secret information can be leaked. Referring to fig. 2, fig. 2 is a schematic diagram of image encryption according to an embodiment of the present invention. As shown in fig. 2, only one carrier image is required, and one or more images to be encrypted may be used.
S102: carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; and carrying out discrete wavelet transformation on the image to be encrypted to obtain a second discrete wavelet image.
Referring to fig. 2, in the embodiment of the present invention, a discrete wavelet transform may be performed on a carrier image to obtain a first discrete wavelet map. And carrying out discrete wavelet transformation on the image to be encrypted to obtain a second discrete wavelet image.
In the embodiment of the invention, after the discrete wavelet transform is carried out on the image, the obtained discrete wavelet image is in the form of a matrix, each element in the matrix represents one pixel point, and the value of the element in the matrix represents the gray value of the pixel point. And the energy of the discrete wavelet map is concentrated in a fixed area at the upper left corner, namely the gray value of a pixel point in the fixed area at the upper left corner in the matrix is non-zero, and the gray values of the pixel points in other areas are all zero.
For example, as shown in fig. 2, a first discrete wavelet map is obtained after one carrier image is subjected to discrete wavelet transform, and three second discrete wavelet maps are obtained after three images to be encrypted are subjected to discrete wavelet transform, wherein the energy of each discrete wavelet map is concentrated in the upper left corner region, and the discrete wavelet maps are represented by shading in fig. 2, that is, the gray values of the pixels of the non-shaded portions are all 0.
S103: and splicing the first discrete wavelet image and the second discrete wavelet image to obtain a spliced wavelet image.
In the embodiment of the invention, the first discrete wavelet map and the second discrete wavelet map can be spliced to obtain a spliced wavelet map.
In an embodiment of the present invention, the step S103 may specifically include the following steps:
step 11: the upper left corner region of the first discrete wavelet map is truncated.
In one embodiment, the upper left corner region of the first discrete wavelet map may be truncated according to the number of the second discrete wavelet maps and the size ratio of the first discrete wavelet map and the second discrete wavelet map.
For example, if the number of the second discrete wavelet maps is 3, the ratio of the length of the first discrete wavelet map to the length of the second discrete wavelet map is 2:1, and the ratio of the height of the first discrete wavelet map to the height of the second discrete wavelet map is 2:1, then the quarter region of the first discrete wavelet map located at the upper left corner can be truncated, as shown in fig. 2.
For another example, if the number of the second discrete wavelet maps is 8, the ratio of the length of the first discrete wavelet map to the length of the second discrete wavelet map is 3:1, and the ratio of the height of the first discrete wavelet map to the height of the second discrete wavelet map is 3:1, then a ninth region of the first discrete wavelet map located at the upper left corner can be truncated.
In the embodiment of the invention, the upper left corner region of the first discrete wavelet map can be intercepted in other modes, and only the intercepted upper left corner region and the second discrete wavelet map need to be ensured to form a rectangular image.
Step 12: and rotating the second discrete wavelet map based on the same principle of energy sparsity of each column.
Step 13: and splicing the rotated second discrete wavelet map with the upper left corner region of the first discrete wavelet map to obtain a spliced wavelet map.
For convenience of description, the above steps 12 and 13 are collectively explained.
In the embodiment of the invention, in order to achieve a better encryption effect, the first discrete wavelet map and the second discrete wavelet map can be spliced based on the principle that the sparsity of energy in each row is the same. The fact that the energy sparsity of each column is the same means that the number of nonzero elements in each column in the spliced wavelet map is approximately the same.
Since the non-zero elements in the first discrete wavelet map and the second discrete wavelet map are concentrated in the upper left corner region, in order to make the number of non-zero elements in each column of the spliced wavelet map substantially the same, the second discrete wavelet map may be rotated and spliced with the upper left corner region of the first discrete wavelet map after rotation.
Referring to fig. 2, the three second discrete wavelet maps may be rotated clockwise by 270 °, 90 ° and 180 °, respectively, and spliced to the upper-right corner region, the lower-left corner region, and the lower-right corner region, respectively. It can be seen that the energy sparsity of each column in the wavelet map after splicing is the same. It can be understood that the method shown in fig. 2 is not the only way to split the energy into two rows, as long as the sparsity of the energy in each row is ensured to be the same.
In addition, only one first discrete wavelet map and three second discrete wavelet maps are shown in fig. 2 as an example, and it should be understood by those skilled in the art that when there are more second discrete wavelet maps, the second discrete wavelet maps can be merged based on the same method of energy sparsity of each column.
S104: and encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image.
In the embodiment of the invention, after the spliced wavelet map is obtained, the spliced wavelet map can be encrypted by using a chaotic compressed sensing algorithm to obtain an encrypted image.
In one embodiment, the stitched wavelet map S' may be encrypted according to the following formula to obtain an encrypted image Y:
Figure BDA0001936461080000071
wherein the content of the first and second substances,
Figure BDA0001936461080000072
in order to measure the matrix of the measurements,and
Figure BDA0001936461080000074
are all mask matrixes,α、β1、β2Scrambling the encryption parameters for chaos. The measurement matrix, the mask matrix, and the chaotic scrambling encryption parameter may all be generated according to related technologies, which is not specifically limited in the embodiment of the present invention.
At this point, the encryption of the image is completed, and the encrypted image is a noise image, see fig. 2.
Referring to fig. 3, fig. 3 is a schematic diagram of image decryption performed by an attacker based on fig. 2 according to an embodiment of the present invention. As shown in fig. 3, if the encryption key used in the chaotic compressed sensing encryption algorithm and the chaotic matrix generation system are both stolen by an attacker, the attacker performs chaotic compression decryption to obtain a spliced wavelet map, but the attacker does not know the splicing rule of the spliced wavelet map. If an attacker directly carries out inverse discrete wavelet transform on the spliced wavelet image, a carrier image containing a ciphertext is obtained and is marked as a secret image. Because the attacker obtains the visually meaningful covert image, the attacker thinks that the decryption is successful, and the probability of further decryption by the attacker is reduced. Therefore, by adopting the image encryption method provided by the embodiment of the invention, an attacker cannot acquire the decrypted image, namely the image to be encrypted, so that the security of image encryption is improved.
Because the spliced wavelet map is obtained by splicing the first discrete wavelet map and the second discrete wavelet map, an attacker cracks to obtain a visual meaningful secret image, and can see partial pixels of the image to be encrypted, the imperceptibility of the image to be encrypted in the secret image cracked by the attacker is improved as much as possible. Generally, the clearer the covert image cracked by an attacker is, the less easily a part of pixels of the image to be encrypted can be seen from the covert image.
In an embodiment of the present invention, experiments show that, in order to improve the imperceptibility of an image to be encrypted in a covert image obtained by cracking by an attacker, when the first discrete wavelet map is intercepted, a quarter region at the upper left corner of the first discrete wavelet map may be intercepted.
In an embodiment of the present invention, in order to improve the imperceptibility of an image to be encrypted in a covert image obtained by cracking by an attacker, the following steps may be added between step S102 and step S103 in the encryption process: and reducing the gray value of each pixel point in the second discrete wavelet image by a first preset multiple.
In the embodiment of the invention, the larger the preset multiple is, the higher the definition of the covert image obtained by the attacker through the above process is, that is, the more difficult the covert image cracked by the attacker is to perceive the image to be encrypted, so that the attacker has a higher probability to stop further cracking, however, the definition of the image to be encrypted decrypted by the user is reduced due to the excessively large preset multiple. On the contrary, the smaller the preset multiple is, the lower the definition of the covert image obtained by the attacker through the above process is, the further the image is possibly cracked by the attacker, but when the preset multiple is smaller, the definition of the image to be encrypted decrypted by the user is higher. The first preset multiple can be usually set between 10 and 20, and can be adjusted according to actual requirements such as the recovery precision of the encryption map during specific implementation.
An embodiment of the present invention further provides an image decryption method, referring to fig. 4, where fig. 4 is a flowchart of the image decryption method provided in the embodiment of the present invention, and the method may include the following steps:
s401: and decrypting the image to be decrypted by using a chaotic compressed sensing reconstruction algorithm to obtain a spliced wavelet map.
In the embodiment of the invention, the encrypted image can be decrypted according to the chaotic compressed sensing reconstruction algorithm, wherein the chaotic compressed sensing reconstruction algorithm is the existing decryption algorithm and can decrypt the image encrypted by the chaotic compressed sensing algorithm.
In one embodiment of the invention, the image to be decrypted Y 'can be decrypted according to the following formula to obtain a spliced wavelet image S',
wherein the content of the first and second substances,
Figure BDA0001936461080000082
in order to measure the matrix of the measurements,
Figure BDA0001936461080000083
and
Figure BDA0001936461080000084
are all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos. The measurement matrix, the mask matrix, and the chaotic scrambling encryption parameters are the same as those used in the encryption process, and are not described herein again.
S402: and separating the spliced wavelet map to obtain the discrete wavelet map to be decrypted.
Referring to fig. 5, fig. 5 is a schematic diagram of image decryption according to an embodiment of the present invention, in which after obtaining the spliced wavelet map, the spliced wavelet map may be separated to obtain each discrete wavelet map to be decrypted.
In the embodiment of the invention, the spliced wavelet map can be separated based on the splicing rule of the spliced wavelet map in the encryption process to obtain the discrete wavelet map to be decrypted.
In the image decryption process, the spliced wavelet map can be decomposed according to the inverse process of generating the spliced wavelet map in the image encryption process, so as to obtain the discrete wavelet map to be decrypted. For example, referring to fig. 5, if in the image encryption process, the three second discrete wavelet maps are rotated clockwise by 270 °, 90 °, and 180 ° and are respectively spliced to the upper-right corner region, the lower-left corner region, and the lower-right corner region, in the decryption process, the spliced wavelet maps may be intercepted to obtain the upper-left corner region, the upper-right corner region, the lower-left corner region, and the lower-right corner region, the upper-right corner region is rotated counterclockwise by 270 °, the lower-left corner region is rotated counterclockwise by 90 °, the lower-right corner region is rotated counterclockwise by 180 °, and then the three discrete wavelet maps to be decrypted are obtained. While the upper left region corresponds to the discrete wavelet map of the carrier image, the decryption of the carrier image may not be necessary since the decryption process is to recover the encrypted image.
S403: and carrying out inverse discrete wavelet transform on the discrete wavelet image to be decrypted to obtain a decrypted image.
After the discrete wavelet image to be decrypted is obtained, the discrete wavelet image can be subjected to inverse discrete wavelet transform respectively, and the decrypted image can be obtained. The inverse discrete wavelet transform is an inverse process of the discrete wavelet transform, and can convert a discrete wavelet image in a matrix form into a gray image.
Therefore, the image decryption method provided by the embodiment of the invention can decrypt the image encrypted by the image encryption method provided by the embodiment of the invention, can effectively prevent the attack from cracking, and has high safety.
In an embodiment of the present invention, before performing inverse discrete wavelet transform on a discrete wavelet map to be decrypted to obtain a decrypted image, the method may further include:
and expanding the gray value of each pixel point in the discrete wavelet image to be decrypted by a second preset multiple.
In an embodiment of the present invention, in the image encryption process, the gray value of each pixel point in the second discrete wavelet map may be reduced by a first preset multiple, and in the image decryption process, after the split wavelet map is separated to obtain the discrete wavelet map to be decrypted, the gray value of each pixel point in the discrete wavelet map to be decrypted may be expanded by a second preset multiple, and then inverse discrete wavelet transform is performed, where the second preset multiple is the same as the first preset multiple.
Corresponding to the image encryption method provided by the embodiment of the present invention, the embodiment of the present invention provides an image encryption apparatus, referring to fig. 6, which may include the following modules:
the determining module 601 is configured to determine a carrier image and an image to be encrypted.
A conversion module 602, configured to perform discrete wavelet transform on a carrier image to obtain a first discrete wavelet map; and carrying out discrete wavelet transformation on the image to be encrypted to obtain a second discrete wavelet image.
A splicing module 603, configured to splice the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map.
And the encryption module 604 is configured to encrypt the stitched wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image.
In an embodiment of the present invention, on the basis of the image encryption apparatus shown in fig. 6, the image encryption apparatus may further include: and the reduction module is used for reducing the gray value of each pixel point in the second discrete wavelet map by a first preset multiple.
In an embodiment of the present invention, the splicing module 603 is specifically configured to: intercepting the upper left corner area of the first discrete wavelet map;
rotating the second discrete wavelet map based on the same principle of energy sparsity of each row;
and splicing the rotated second discrete wavelet map with the upper left corner region of the first discrete wavelet map to obtain a spliced wavelet map.
In an embodiment of the present invention, the encryption module 604 is specifically configured to:
the method comprises the following steps of encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image, wherein the steps comprise:
encrypting the spliced wavelet image S according to the following formula to obtain an encrypted image Y:
Figure BDA0001936461080000101
wherein the content of the first and second substances,
Figure BDA0001936461080000102
in order to measure the matrix of the measurements,
Figure BDA0001936461080000103
and
Figure BDA0001936461080000104
are all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos.
Therefore, the image encryption device provided by the embodiment of the invention can determine the carrier image and the image to be encrypted; carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; carrying out discrete wavelet transform on an image to be encrypted to obtain a second discrete wavelet map; splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map; and encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image. In the embodiment of the invention, even if the encryption key used in the chaotic compression perception encryption algorithm and the chaotic matrix generation system are all stolen by an attacker, the attacker carries out chaotic compression decryption and carries out inverse discrete wavelet transformation on the discrete wavelet image obtained by decryption to obtain a visually meaningful covert image, so that the probability of further cracking the encrypted image by the attacker is reduced, and the attacker cannot obtain the encrypted image, thereby improving the security of image encryption.
Corresponding to the image decryption method provided in the embodiment of the present invention, an embodiment of the present invention provides an image decryption apparatus, and referring to fig. 7, the image decryption apparatus may include the following modules:
and the decryption module 701 is used for decrypting the image to be decrypted by using a chaotic compressed sensing reconstruction algorithm to obtain a spliced wavelet map.
And the separation module 702 is configured to separate the spliced wavelet map to obtain a discrete wavelet map to be decrypted.
And the inverse transformation module 703 is configured to perform inverse discrete wavelet transformation on the discrete wavelet map to be decrypted to obtain a decrypted image.
In this embodiment of the present invention, the decryption module 701 may be specifically configured to decrypt the image to be decrypted Y 'according to the following formula, so as to obtain a spliced wavelet map S':
Figure BDA0001936461080000111
wherein the content of the first and second substances,
Figure BDA0001936461080000112
in order to measure the matrix of the measurements,
Figure BDA0001936461080000113
and
Figure BDA0001936461080000114
are all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos.
In this embodiment of the present invention, the separation module 702 may be specifically configured to:
and separating the spliced wavelet map based on the splicing rule of the spliced wavelet map in the image encryption process to obtain the discrete wavelet map to be decrypted.
In the embodiment of the present invention, on the basis of the graph decryption device shown in fig. 7, the graph decryption device may further include an expansion module, configured to expand the gray value of each pixel in the discrete wavelet graph to be decrypted by a second preset multiple.
Therefore, the image decryption device provided by the embodiment of the invention can decrypt the image encrypted by the image encryption method provided by the embodiment of the invention, can effectively prevent the attack from cracking, and has high safety.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
determining a carrier image and an image to be encrypted;
carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; carrying out discrete wavelet transform on an image to be encrypted to obtain a second discrete wavelet map;
splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map;
and encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is used for realizing any one of the method steps when being executed by a processor.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the apparatus and the electronic device, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to only in the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. An image encryption method, characterized in that the method comprises:
determining a carrier image and an image to be encrypted;
carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet map; performing discrete wavelet transform on the image to be encrypted to obtain a second discrete wavelet map;
splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map;
encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image;
the step of obtaining a spliced wavelet map by splicing the first discrete wavelet map and the second discrete wavelet map comprises:
intercepting the upper left corner area of the first discrete wavelet map;
rotating the second discrete wavelet map based on the principle that the sparsity of energy of each column is the same;
and splicing the rotated second discrete wavelet map with the upper left corner region of the first discrete wavelet map to obtain a spliced wavelet map.
2. The method according to claim 1, wherein before said stitching said first discrete wavelet map and said second discrete wavelet map to obtain a stitched wavelet map, further comprising:
and reducing the gray value of each pixel point in the second discrete wavelet map by a first preset multiple.
3. The method according to claim 1, wherein the step of encrypting the stitched wavelet map using the chaotic compressed sensing algorithm to obtain an encrypted image comprises:
encrypting the spliced wavelet image S according to the following formula to obtain an encrypted image Y:
wherein the content of the first and second substances,
Figure FDA0002219206000000012
in order to measure the matrix of the measurements,and
Figure FDA0002219206000000014
are all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos.
4. An image decryption method, characterized in that the method comprises:
decrypting the image to be decrypted by using a chaotic compressed sensing reconstruction algorithm to obtain a spliced wavelet map;
separating the spliced wavelet map to obtain a discrete wavelet map to be decrypted;
performing inverse discrete wavelet transform on the discrete wavelet image to be decrypted to obtain a decrypted image;
the step of separating the spliced wavelet map to obtain the discrete wavelet map to be decrypted comprises the following steps:
separating the spliced wavelet map based on the splicing rule of the spliced wavelet map in the image encryption process to obtain a discrete wavelet map to be decrypted;
the splicing rule is as follows:
intercepting the upper left corner area of the first discrete wavelet map;
rotating the second discrete wavelet map based on the same principle of energy sparsity of each row;
and splicing the rotated second discrete wavelet map with the upper left region of the first discrete wavelet map to obtain a spliced wavelet map.
5. The method according to claim 4, wherein the step of decrypting the image to be decrypted by using the chaotic compressed sensing reconstruction algorithm to obtain a spliced wavelet map comprises:
decrypting the image Y 'to be decrypted according to the following formula to obtain a spliced wavelet image S':
Figure FDA0002219206000000021
wherein the content of the first and second substances,
Figure FDA0002219206000000022
in order to measure the matrix of the measurements,
Figure FDA0002219206000000023
and
Figure FDA0002219206000000024
are all a mask matrix, α, β1、β2Scrambling the encryption parameters for chaos.
6. The method according to claim 4, before said inverse discrete wavelet transform of the discrete wavelet map to be decrypted to obtain a decrypted image, further comprising:
and expanding a second preset multiple to the gray value of each pixel point in the discrete wavelet map to be decrypted.
7. An image encryption apparatus, characterized in that the apparatus comprises:
the determining module is used for determining the carrier image and the image to be encrypted;
the conversion module is used for carrying out discrete wavelet transform on the carrier image to obtain a first discrete wavelet image; performing discrete wavelet transform on the image to be encrypted to obtain a second discrete wavelet map;
the splicing module is used for splicing the first discrete wavelet map and the second discrete wavelet map to obtain a spliced wavelet map;
the encryption module is used for encrypting the spliced wavelet map by using a chaotic compressed sensing algorithm to obtain an encrypted image;
the splicing module is specifically used for:
intercepting the upper left corner area of the first discrete wavelet map;
rotating the second discrete wavelet map based on the principle that the sparsity of energy of each column is the same;
and splicing the rotated second discrete wavelet map with the upper left corner region of the first discrete wavelet map to obtain a spliced wavelet map.
8. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
CN201910008840.5A 2019-01-04 2019-01-04 Image encryption method and device and electronic equipment Active CN109831596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008840.5A CN109831596B (en) 2019-01-04 2019-01-04 Image encryption method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008840.5A CN109831596B (en) 2019-01-04 2019-01-04 Image encryption method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109831596A CN109831596A (en) 2019-05-31
CN109831596B true CN109831596B (en) 2020-01-17

Family

ID=66859996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008840.5A Active CN109831596B (en) 2019-01-04 2019-01-04 Image encryption method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109831596B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100389857B1 (en) * 1998-07-01 2003-07-04 삼성전자주식회사 Digital image coding/decoding apparatus and method for recording and restoring signature image using watermarking
CN104217390B (en) * 2014-07-15 2017-10-20 河南师范大学 A kind of Zero watermarking method, device and watermark extracting method, device
CN106023056B (en) * 2016-05-24 2019-08-16 河南师范大学 Zero watermarking insertion, extracting method and the device compressed based on DWT and principal component analysis
CN107770407B (en) * 2017-11-01 2019-07-19 湖北工程学院 The image encryption method and device of joint zero watermarking insertion

Also Published As

Publication number Publication date
CN109831596A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
Gao et al. Bessel-Fourier moment-based robust image zero-watermarking
Singh et al. Reversible data hiding based on Shamir’s secret sharing for color images over cloud
CN109102452B (en) Image encryption method based on Latin square array scrambling and bidirectional diffusion
Kannammal et al. Two level security for medical images using watermarking/encryption algorithms
CN111988492B (en) Gabor-DCT-based medical image robust watermarking method
US7587063B2 (en) Asymmetric subspace watermarking
CN110139105B (en) Multi-stereo image encryption method, multi-stereo image decryption method, multi-stereo image encryption device and multi-stereo image decryption device
CN112910656B (en) Compressed sensing data transmission method based on digital signcryption
CN112800395B (en) Copyright authentication and verification method for multiple images based on zero watermark technology
Li et al. Commutative fragile zero-watermarking and encryption for image integrity protection
Kukreja et al. Copyright protection scheme for color images using extended visual cryptography
Kukreja et al. Curvelet transform based robust copyright protection scheme for color images using extended visual cryptography
Xiao et al. A joint image encryption and watermarking algorithm based on compressive sensing and chaotic map
CN113392381A (en) Watermark generation method, watermark decoding method, storage medium, and electronic device
CN109831596B (en) Image encryption method and device and electronic equipment
US11276138B2 (en) Image data encryption and rendering system
CN111651775A (en) Image encryption and decryption method and device, electronic equipment and storage medium
Devi et al. A copyright protection scheme for digital images based on shuffled singular value decomposition and visual cryptography
CN109064381B (en) Multi-dimensional digital watermark encryption method based on secret key
Habbouli et al. A secure, self-recovery, and high capacity blind digital image information hiding and authentication scheme using DCT moments
Alam et al. A Novel Hybrid Watermarking scheme with Image authentication based on frequency domain, 2-Level SVD using chaotic map
CN115225771B (en) Method and device for hiding reversible information of encrypted image and computer equipment
Chang et al. A robust public watermarking scheme based on DWT
Oussama et al. A blind robust watermarking scheme based on SVD and circulant matrices
CN112907427B (en) Encrypted medical image robust watermarking method based on DWT-Gabor

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