CN113472968A - Encrypted image reversible data hiding method and device and storage medium - Google Patents

Encrypted image reversible data hiding method and device and storage medium Download PDF

Info

Publication number
CN113472968A
CN113472968A CN202110503227.8A CN202110503227A CN113472968A CN 113472968 A CN113472968 A CN 113472968A CN 202110503227 A CN202110503227 A CN 202110503227A CN 113472968 A CN113472968 A CN 113472968A
Authority
CN
China
Prior art keywords
bit
pixel
encrypted
sub
image
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.)
Granted
Application number
CN202110503227.8A
Other languages
Chinese (zh)
Other versions
CN113472968B (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.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
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 Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202110503227.8A priority Critical patent/CN113472968B/en
Publication of CN113472968A publication Critical patent/CN113472968A/en
Application granted granted Critical
Publication of CN113472968B publication Critical patent/CN113472968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • H04N1/4446Hiding of documents or document information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits 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/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, 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/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits 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/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, 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/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32347Reversible embedding, i.e. lossless, invertible, erasable, removable or distorsion-free embedding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention provides a method, a device and a storage medium for hiding reversible data of an encrypted image, wherein the method comprises the steps of partitioning an original image to obtain a plurality of sub-block images, generating cipher streams corresponding to the sub-block images one by one according to an encryption algorithm, and encrypting the sub-block images according to the cipher streams to generate encrypted sub-block images; carrying out position replacement on the encrypted sub-block image to obtain an encrypted image; acquiring bit plane information of the encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of the encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of the encrypted sub-block image according to the classification category; acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into an embedding space to generate a marked encrypted image; and restoring the marked encrypted image according to the secret key to obtain an original image, and extracting the embedded data. The present invention improves the embedding capacity of an encrypted image.

Description

Encrypted image reversible data hiding method and device and storage medium
Technical Field
The invention relates to the technical field of reversible data hiding, in particular to a reversible data hiding method and device for an encrypted image and a storage medium.
Background
In recent years, with the development of cloud computing and cloud storage, and the emergence of requirements for protecting the content of an original Image, Encrypted Data Hiding in Encrypted Image (RDHEI) has received attention from many researchers. At present, there are three main methods according to the differences of the stages and modes of utilizing the pixel correlation: in the first method, a reserved space (RRBE) is reserved Before Encryption, namely, an embedded space is reserved by preprocessing an original image Before Encryption; in the second method, a reserved space (RRAE) is reserved After Encryption, namely, an embedded space is reserved After the encrypted image is processed; in the third method, space (VRBE) is vacated By Encryption, that is, the embedding space of the plaintext field is reserved in the ciphertext field By an Encryption algorithm. Among them, the VRBE-based algorithm can effectively reserve the redundant space from the plaintext domain to the ciphertext domain, and the framework is suitable for practical application scenarios, so that the framework is widely used in various applications.
However, most of the methods based on VRBE use the same method to search for regions with different correlations, which results in a huge difference in the search degree of redundant space for different regions. In the plain text domain, the block whose pixel values float around 128 has a high local correlation, but whose pixel has an MSB value of 0 with 1. Because the difference of pixel values in the type block becomes large after encryption instead of maintaining the original difference due to the encryption method adopted in the VRBE-based method, the high correlation of the part in the plaintext domain is not completely preserved in the ciphertext domain.
Disclosure of Invention
The invention provides a method, a device and a storage medium for hiding reversible data of an encrypted image, and aims to solve the technical problem that the embedding capacity of the encrypted image is insufficient due to the fact that the reversible data hiding method of the encrypted image in the prior art cannot keep high correlation of a plaintext domain to a ciphertext domain.
In one aspect, the present invention provides a method for hiding reversible data of an encrypted image, including:
the method comprises the steps of partitioning an original image to obtain a plurality of sub-block images, generating a plurality of cipher streams in one-to-one correspondence with the plurality of sub-block images according to an encryption algorithm, and encrypting each sub-block image in the plurality of sub-block images according to the plurality of cipher streams to generate an encrypted sub-block image; performing position replacement on the plurality of encrypted sub-block images to obtain encrypted images;
acquiring bit plane information of each encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of each encrypted sub-block image according to the classification category;
acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into the embedding space to generate a marked encrypted image;
and acquiring the mark encrypted image and the secret key, restoring the mark encrypted image according to the secret key to acquire the original image, and extracting the embedded data from the mark encrypted image.
In a possible implementation manner of the present invention, each of the sub-block images includes a plurality of pixels, and each of the plurality of pixels is a binary eight-bit; the encrypting each sub-block image of the plurality of sub-block images according to the plurality of cipher streams specifically includes:
Figure BDA0003056762000000021
Figure BDA0003056762000000022
Figure BDA0003056762000000023
Figure BDA0003056762000000024
wherein ,Ei,jFor each pixel in the encrypted sub-block image; riIs a cipher stream; pi,jFor each pixel in the sub-block image;
Figure BDA0003056762000000025
is an exclusive or operation; m is the number of the sub-block images; n × n is the size of each sub-block image; i is the index of each sub-block image, and j is the index of each pixel position; e.g. of the typei,j,kIs Ei,jThe kth bit plane index of (1); r isi,kIs RiThe kth bit plane index of (1); p is a radical ofi,j,kIs Pi,jIs indexed by the kth bit plane, and pi,j,kIs in binary representation; k is the index of the bit-plane for each pixel,
Figure BDA0003056762000000026
is a floor function.
In a possible implementation manner of the present invention, the determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information includes:
calculating the number of continuous same bit planes in each pixel in each encrypted sub-block image in the order from the highest bit plane to the lowest bit plane;
if the number of the continuous same bit planes is greater than or equal to 3, the classification category of the encrypted sub-block image is a first category;
if the number of the consecutive identical bit planes is 1 or 2, the classification category of the encrypted sub-block image is a second category;
if the number of the continuous same bit planes is 0, the classification category of the encrypted sub-block image is a third category;
the determining an embedding space of each encrypted sub-block image according to the classification category includes:
if the classification type is a first type, the continuous same bit plane is an embedding space of each encrypted sub-block image;
if the classification type is a second type, the continuous same bit plane is a first sub-embedding space of each encrypted sub-block image, a second sub-embedding space of each encrypted sub-block image is determined according to a self-adaptive coding strategy, and the first sub-embedding space and the second sub-embedding space form the embedding space;
and if the classification type is a third type, determining the embedding space of each encrypted sub-block image according to the self-adaptive coding strategy.
In a possible implementation manner of the present invention, each of the pixels includes a 4-bit upper bit plane and a 4-bit lower bit plane; the second sub-embedding space ES is:
Figure BDA0003056762000000031
wherein ,numiIs the number of said consecutive identical bit-planes.
In a possible implementation manner of the present invention, if the classification category is a third category, the determining the embedding space of each encrypted sub-block image according to the adaptive coding policy includes:
defining pixels with pixel values greater than or equal to 128 in each encrypted sub-block image as a first set, and defining pixels with pixel values less than 128 as a second set;
and respectively calculating the continuous same bit planes of the first set and the continuous same bit planes of the second set, and taking the continuous same bit planes of the first set as an embedding space of the first set and taking the continuous same bit planes of the second set as an embedding space of the second set.
In a possible implementation manner of the present invention, when the classification category of the encrypted sub-block image is a first category, the auxiliary data includes a number num of consecutive identical bit-planesiSaid embedding said auxiliary data and said embedded data into said embedding space, generating a tagged encrypted image comprising:
assigning the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted sub-block image to the sixth bit, the seventh bit and the eighth bit of the first pixel of the encrypted sub-block image in sequence;
will numiConverting the binary bit into a three-bit binary bit, and sequentially assigning a first zero position, a first bit and a second bit of the binary bit to a first zero position, a second zero position and a third zero position of a first pixel, a second pixel and a third pixel of the encrypted sub-block image;
embedding the embedded data into an embedding space except for the last pixel.
In a possible implementation manner of the present invention, when the classification category of the encrypted sub-block image is the second category, the auxiliary data includes a number num of consecutive identical bit-planesiA first zone bit siFirst sub information M1And second sub information M2Said embedding said auxiliary data and said embedded data into said embedding space, generating a tagged encrypted image comprising:
judgment siWhether the number of the encrypted subblocks is 1 or not, if not, the encrypted subblock image is not processed, and if so, num is judgedi1 or 2;
if numiIf the number of the pixels in the encrypted subblock image is 2, assigning the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted subblock image to the eighth bit of the first pixel, the seventh bit of the first pixel and the eighth bit of the second pixel in sequence; if numiIf the pixel number is 1, sequentially setting the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted sub-block imageAssigning to an eighth bit of a first pixel, an eighth bit of a second pixel, and an eighth bit of a third pixel of the encrypted sub-block image;
will numiConverting the binary three-bit into a binary three-bit, and sequentially assigning a first zero position, a first bit and a second bit of the three-bit to a first zero position, a second zero position and a third zero position of a first pixel, a second pixel and a third pixel of the encrypted sub-block image;
sifor one bit, s isiAssigning a zero bit to a fourth pixel of the encrypted sub-block image;
M1 and M2The bits are the same and are two or three bits, and whether the number of the encrypted sub-block image from the fifth pixel to the last pixel is less than M or not is judged1 and M2If not, then the M is added1 and M2Sequentially assigning a bit-wise value to a zero bit of each pixel after the fourth pixel; if yes, the M is added1 and M2Sequentially assigning values to the fifth pixel to the zero position of the last pixel according to bits, and adding redundant M1 and M2Sequentially assigning the first bit of the first pixel to the first bit of the last pixel;
embedding the embedded data into an embedding space except for the last pixel.
In a possible implementation manner of the invention, when the classification category of the encrypted sub-block image is a third category, the auxiliary data includes the number of consecutive identical bit-planes of the first set
Figure BDA0003056762000000051
Number of consecutive identical bit-planes of the second set
Figure BDA0003056762000000052
Second flag bit s1A third flag s2The fourth flag s3And type information t, said embedding said auxiliary data and said embedded data into said embedding space, generating a mark plusThe secret image includes:
judging the second flag bit s1Whether the image is 1 or not, if not, the encrypted subblock image is not processed, and if yes:
assigning zero to the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted sub-block image;
scanning pixels in each encrypted sub-block image according to a row scanning sequence, recording the highest bit plane of each pixel in each row of pixels, and generating n first highest bit plane arrangements, wherein n is the column number of the encrypted sub-block images;
scanning pixels in each encrypted sub-block image according to a column scanning sequence, recording a highest bit plane of each pixel in each column of pixels, and generating n second highest bit plane arrangements, wherein n is the number of rows of the encrypted sub-block images;
judging whether the number of types of the first highest bit plane arrangement or the number of types of the second highest bit plane arrangement is 1, if the number of types of the first highest bit plane arrangement or the number of types of the second highest bit plane arrangement is 1, s2Is 1, t is the first highest bit plane arrangement or the second highest bit plane arrangement with a type number of 1, s is the first highest bit plane arrangement when the type number is 13Is 0, s is the first highest order bit plane alignment when the type number is 13Is 1; if the number of types arranged on the first highest bit plane or the number of types arranged on the second highest bit plane is not 1, s2Is 0;
judging whether the number of the fourth pixel to the last pixel of the encrypted sub-block image is less than or not
Figure BDA0003056762000000061
s1、s2、s3And the sum of the bit number of t, if not, the sum of s1、s2、s3、t、
Figure BDA0003056762000000062
Sequentially assigned to the third pixel by bitThe zero position of each pixel; if yes, the step s is carried out1、s2、s3、t、
Figure BDA0003056762000000063
Sequentially assigning values to the fourth pixel to the zero position of the last pixel according to bits, and adding the redundant s1、s2、s3、t、
Figure BDA0003056762000000064
Sequentially assigning the first bit of the first pixel to the first bit of the last pixel;
and respectively embedding the embedded data into the embedding space of the first set except the last pixel and the embedding space of the second set except the last pixel.
In another aspect, the present invention provides an encrypted image reversible data hiding apparatus, including:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement any one of the above-described encrypted image reversible data hiding methods.
In another aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to execute the steps in the encrypted image reversible data hiding method according to any one of the above.
According to the method, a classification mechanism based on local correlation is constructed, the classification category of each encrypted sub-block image is determined according to the classification mechanism and bit plane information, the embedding space of each encrypted sub-block image is determined according to the classification category, high correlation of a plaintext field is reserved in a ciphertext field, and the embedding capacity of the encrypted image is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scene of an encrypted image reversible data hiding system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a reversible data hiding method for encrypted images according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of an embodiment of S201 according to the present invention;
fig. 4 is a flowchart illustrating an embodiment of S202 according to the present invention;
fig. 5 is a schematic flow chart of another embodiment of S403 provided by the embodiment of the present invention;
fig. 6 is a schematic flowchart of an embodiment of S203 according to the present invention;
FIG. 7 shows num provided in an embodiment of the present inventioniAn embodiment of the encrypted subblock image of 3 is illustrated;
FIG. 8 shows num provided in an embodiment of the present inventioniAn embodiment of the binary representation of the encrypted sub-block image of 3 is illustrated;
FIG. 9 shows num provided in an embodiment of the present inventioniAn embodiment of encrypted sub-block image auxiliary data embedding of 3 is illustrated;
FIG. 10 shows num provided in an embodiment of the present inventioniAn embodiment of encrypted subblock image embedding data embedding of 3 is illustrated;
fig. 11 is a schematic flow chart of another embodiment of S203 according to the present invention;
FIG. 12 shows num provided in an embodiment of the present inventioniAn embodiment of a binary representation of an encrypted sub-block image of 1 is illustrated;
FIG. 13 shows num provided in an embodiment of the present inventioniAn embodiment of the encrypted subblock image auxiliary data and embedded data embedding of 1 is illustrated;
fig. 14 is a schematic flow chart of a third embodiment of S203 according to the present invention;
FIG. 15 shows num provided in an embodiment of the present inventioniAn embodiment of the encrypted subblock image of 0 is illustrated;
FIG. 16 shows num provided in an embodiment of the present inventioniAn embodiment of the binary representation of the encrypted sub-block image of 0 is illustrated;
FIG. 17 shows num provided in an embodiment of the present inventioniAn embodiment of the encryption subblock image auxiliary data and embedded data embedding of 0 is illustrated.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention provides a method and a device for hiding reversible data of an encrypted image and a storage device, which are respectively explained in detail below.
Fig. 1 is a schematic view of a scene of an encrypted image reversible data hiding system according to an embodiment of the present invention, where the system may include a server 100, and an encrypted image reversible data hiding apparatus, such as the server in fig. 1, is integrated in the server 100.
The server 100 in the embodiment of the present invention is mainly used for:
the method comprises the steps of partitioning an original image to obtain a plurality of sub-block images, generating a plurality of cipher streams in one-to-one correspondence with the plurality of sub-block images according to an encryption algorithm, and encrypting each sub-block image in the plurality of sub-block images according to the plurality of cipher streams to generate an encrypted sub-block image; performing position replacement on the plurality of encrypted sub-block images to obtain encrypted images;
acquiring bit plane information of each encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of each encrypted sub-block image according to the classification category;
acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into the embedding space to generate a marked encrypted image;
and acquiring the mark encrypted image and the secret key, restoring the mark encrypted image according to the secret key to acquire the original image, and extracting the embedded data from the mark encrypted image.
In this embodiment of the present invention, the server 100 may be an independent server, or may be a server network or a server cluster composed of servers, for example, the server 100 described in this embodiment of the present invention includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. Among them, the Cloud server is constituted by a large number of computers or web servers based on Cloud Computing (Cloud Computing).
It is to be understood that the terminal 200 used in the embodiments of the present invention may be a device that includes both receiving and transmitting hardware, i.e., a device having receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific terminal 200 may be a desktop, a laptop, a web server, a Personal Digital Assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, and the like, and the type of the terminal 200 is not limited in this embodiment.
Those skilled in the art will understand that the application environment shown in fig. 1 is only one application scenario of the present invention, and does not constitute a limitation on the application scenario of the present invention, and that other application environments may further include more or fewer terminals than those shown in fig. 1, for example, only 2 terminals are shown in fig. 1, and it is understood that the encrypted image reversible data hiding system may further include one or more other terminals, which is not limited herein.
In addition, as shown in fig. 1, the encrypted image reversible data hiding system may further include a memory 300 for storing data, such as an effective cyclic shift number, a base array, and the like.
It should be noted that the scene schematic diagram of the encrypted image reversible data hiding system shown in fig. 1 is only an example, and the encrypted image reversible data hiding system and the scene described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention.
First, an embodiment of the present invention provides an encrypted image reversible data hiding method, where the encrypted image reversible data hiding method includes: the method comprises the steps of partitioning an original image to obtain a plurality of sub-block images, generating a plurality of cipher streams in one-to-one correspondence with the plurality of sub-block images according to an encryption algorithm, and encrypting each sub-block image in the plurality of sub-block images according to the plurality of cipher streams to generate an encrypted sub-block image; performing position replacement on the plurality of encrypted sub-block images to obtain encrypted images; acquiring bit plane information of each encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of each encrypted sub-block image according to the classification category; acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into the embedding space to generate a marked encrypted image; and acquiring the mark encrypted image and the secret key, restoring the mark encrypted image according to the secret key to acquire the original image, and extracting the embedded data from the mark encrypted image.
As shown in fig. 2, a schematic flowchart of an embodiment of a method for hiding reversible data in an encrypted image according to an embodiment of the present invention is shown, where the method includes:
s201, partitioning an original image to obtain a plurality of sub-block images, generating a plurality of cipher streams corresponding to the plurality of sub-block images one by one according to an encryption algorithm, and encrypting each sub-block image in the plurality of sub-block images according to the plurality of cipher streams to generate an encrypted sub-block image; performing position replacement on the plurality of encrypted sub-block images to obtain encrypted images;
wherein S201 is completed by the image owner.
It should be noted that: the encryption algorithm may be any one of the algorithms RC4, ORYX, SEAL, etc.
S202, obtaining bit plane information of each encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of each encrypted sub-block image according to the classification category;
s203, acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into the embedding space to generate a marked encrypted image;
wherein S202 and S203 are completed by the data hider.
S204, obtaining the mark encrypted image and the secret key, restoring the mark encrypted image according to the secret key to obtain an original image, and extracting embedded data from the mark encrypted image.
Wherein S204 is completed by the data receiver.
According to the reversible data hiding method for the encrypted images, provided by the embodiment of the invention, in the embedding space determining step, bit plane information of each encrypted sub-block image is obtained, a classification mechanism based on local correlation is constructed, the classification category of each encrypted sub-block image is determined according to the classification mechanism and the bit plane information, the embedding space of each encrypted sub-block image is determined according to the classification category, the embedding spaces are respectively determined for the encrypted sub-block images in different classification categories, the high correlation of a plaintext field is reserved in a ciphertext field, and the embedding capacity of the encrypted images is improved.
Further, in some embodiments of the present invention, each of the sub-block images includes a plurality of pixels, each of the plurality of pixels being a binary eight-bit; in S201, encrypting each sub-block image of the plurality of sub-block images according to the plurality of cipher streams specifically includes:
Figure BDA0003056762000000111
Figure BDA0003056762000000112
Figure BDA0003056762000000113
Figure BDA0003056762000000114
wherein ,Ei,jFor each pixel in the encrypted sub-block image; riIs a cipher stream; pi,jFor each pixel in the sub-block image;
Figure BDA0003056762000000115
is an exclusive or operation; m is the number of the sub-block images; n × n is the size of each sub-block image(ii) a i is the index of each sub-block image, and j is the index of each pixel position; e.g. of the typei,j,kIs Ei,jThe kth bit plane index of (1); r isi,kIs RiThe kth bit plane index of (1); p is a radical ofi,j,kIs Pi,jIs indexed by the kth bit plane, and pi,j,kIs in binary representation; k is the index of the bit-plane for each pixel,
Figure BDA0003056762000000116
is a floor function.
The principle of the exclusive-or operation is as follows:
Figure BDA0003056762000000117
further, as shown in fig. 3, the determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information in S201 includes:
s301, calculating the number of continuous identical bit planes in each pixel in each encrypted sub-block image along the sequence from the most significant bit plane (MSB) to the least significant bit plane (LSB);
specifically, for an encrypted sub-block image, the maximum value and the minimum value of the pixels thereof are respectively expressed as
Figure BDA00030567620000001110
AndE i,Xiis that
Figure BDA00030567620000001111
AndE ithe calculation formula of the exclusive or operation result is as follows:
Figure BDA0003056762000000118
Figure BDA0003056762000000119
wherein ,xi,kRepresents XiThe kth bit plane of (a).
If there are consecutive identical bit-planes for all pixels in the encrypted sub-block image, then X is the value of XiFrom the most significant bit plane, there is a continuous sequence of 0's.
From MSB to LSB, f1Indicates the position of the first occurrence of 1, i.e.
Figure BDA00030567620000001112
This means from k 8 to k f1+1,xi,k0. Thus, XiCan be expressed as:
Figure BDA0003056762000000121
in which the number of consecutive identical bit-planes numiIs the number of consecutive 0 occurrences, i.e., the number of consecutive identical bit-planes in the encrypted sub-block image.
Then k-8 to k-f1+1,
Figure BDA0003056762000000122
AndE ithe bitplanes are successively the same as follows:
Figure BDA0003056762000000123
thus, numiComprises the following steps:
numi=8-f1
then the num corresponding to the subblock picture is encryptediAnd (4) determining. A reference to num is given hereiExample of a calculation. If the maximum pixel value in one encrypted sub-block image is 50, the binary is represented as "00110010". The minimum pixel value is 32 and the binary expression is "00100000". The result of the exclusive or operation between the two is "00010010". Starting from the MSB, the bit-plane in which the first 1 occurs is 5, i.e. f15. Hence numi=3。
S302, if the number of the continuous same bit planes is greater than or equal to 3, the classification category of the encrypted sub-block images is a first category;
s303, if the number of the continuous same bit planes is 1 or 2, the classification category of the encrypted sub-block image is a second category;
and S304, if the number of the continuous same bit planes is 0, the classification type of the encrypted sub-block image is a third type.
Further, in some embodiments of the present invention, as shown in fig. 4, S202 includes:
s401, if the classification type is a first type, continuously same bit planes are embedded spaces of each encrypted sub-block image;
s402, if the classification type is a second type, continuously the same bit plane is a first sub-embedding space of each encrypted sub-block image, a second sub-embedding space of each encrypted sub-block image is determined according to a self-adaptive coding strategy, and the first sub-embedding space and the second sub-embedding space form an embedding space;
and S403, if the classification type is the third type, determining the embedding space of each encrypted sub-block image according to the self-adaptive coding strategy.
Through the arrangement, for the area with high local correlation, the primary embedding method is directly used, and the auxiliary information is used as little as possible so as to maximize the embedding space. For the area with low local correlation, a multi-layer processing mechanism is constructed, a primary embedding method and an adaptive coding strategy are respectively used for searching the redundant space, particularly for the area with the local correlation not completely reserved, the adaptive coding strategy is used for processing the special condition to fully search the redundant space, and the capacity of the embedding space can be further improved.
Further, each pixel is binary eight-bit, so that each pixel includes a 4-bit upper bit plane and a 4-bit lower bit plane; the second sub-embedding space ES is:
Figure BDA0003056762000000131
it should be understood that for each encrypted sub-block image:
if numi1, the adaptive coding strategy vacates an embedding space for each pixel to be two layers of bit planes, namely 2 bits, and the whole encrypted subblock image vacates an embedding space to be 2n2A bit is set.
If numi2, the embedding space vacated by the self-adaptive coding strategy for each pixel is a layer of bit plane, namely 1 bit, and the embedding space vacated by the whole encrypted subblock image is n2A bit is set.
Further, as shown in fig. 5, in some embodiments of the present invention, if the classification category is a third category, S403 includes:
s501, defining pixels with pixel values larger than or equal to 128 in each encrypted sub-block image as a first set, and defining pixels with pixel values smaller than 128 as a second set;
s502, respectively calculating continuous same bit planes of the first set and continuous same bit planes of the second set, taking the continuous same bit planes of the first set as an embedding space of the first set, and taking the continuous same bit planes of the second set as an embedding space of the second set.
Further, in some embodiments of the present invention, when the classification category of the encrypted subblock image is a first category, the auxiliary data includes a number num of consecutive identical bitplanesiAs shown in fig. 6, S203 includes:
s601, sequentially assigning a zero position of a first pixel, a zero position of a second pixel and a zero position of a third pixel of the encrypted sub-block image to a sixth bit, a seventh bit and an eighth bit of the first pixel of the encrypted sub-block image;
specifically, the assignment process is shown in the following formula:
Figure BDA0003056762000000132
s602, mixing numiConverting into three-bit binary bits and converting the binary bitsThe first zero position, the first bit and the second bit are sequentially assigned to the first zero position of the first pixel, the second zero position of the second pixel and the third zero position of the third pixel of the encrypted sub-block image;
and S603, embedding the embedded data into an embedding space except the last pixel.
By setting not to embed data into the embedding space of the last pixel, the first num can be maintainediThe original value of each high-order plane ensures reversibility.
Specifically, in one embodiment of the present invention, the encrypted sub-block image is shown in fig. 7, and has a maximum pixel value of 50 and a minimum pixel value of 32, and each pixel in the encrypted sub-block image is converted into a binary representation, as shown in fig. 8, and has a maximum pixel value of "00110010" and a minimum pixel value of "00100000", and the calculated numi3, numiTo be "011", the eighth bit, the seventh bit, and the sixth bit of each pixel are embeddable spaces, and as shown in fig. 9, the zero bit of the first pixel, the zero bit of the second pixel, and the zero bit of the third pixel of the encrypted sub-block image are assigned to the sixth bit, the seventh bit, and the eighth bit of the first pixel of the encrypted sub-block image in this order, num is assignediThe first bit, the second bit, and the third bit of the encrypted sub-block image are sequentially assigned to the zero position of the first pixel, the zero position of the second pixel, and the zero position of the third pixel of the encrypted sub-block image, as shown in fig. 10, and the embedded data is embedded in the embedding space of the other pixels except for the first pixel, thereby completing the data embedding.
Further, in some embodiments of the present invention, when the classification category of the encrypted subblock image is the second category, the auxiliary data includes a number num of consecutive identical bitplanesiA first zone bit siFirst sub information M1And second sub information M2As shown in fig. 11, S203 includes:
s1101, judging SiIf the number of the sub-block images is 1, if not, the sub-block images are not processed, and if so, num is judgedi1 or 2;
wherein ,
Figure BDA0003056762000000141
wherein ,λiIs M1 and M2T is a threshold value.
S1102, number numiIf the pixel number is 2, sequentially assigning the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted subblock image to the eighth bit of the first pixel, the seventh bit of the first pixel and the eighth bit of the second pixel of the encrypted subblock image; if numiIf the pixel number is 1, sequentially assigning the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted subblock image to the eighth bit of the first pixel, the eighth bit of the second pixel and the eighth bit of the third pixel of the encrypted subblock image;
in particular, when numiTo 2, the assignment process is shown in the following equation:
Figure BDA0003056762000000151
when numiTo 1, the assignment process is shown in the following equation:
Figure BDA0003056762000000152
s1103, will numiConverting the binary three-bit into a binary three-bit, and sequentially assigning a first zero position, a first bit and a second bit of the three-bit to a first zero position of a first pixel, a second zero position of a second pixel and a third zero position of a third pixel of the encrypted sub-block image;
S1104、sifor one bit, s isiAssigning a zero bit to a fourth pixel of the encrypted sub-block image;
S1105、M1 and M2The bit positions are the same and are two or three bit positions, whether the number of the encrypted sub-block image from the fifth pixel to the last pixel is less than M or not is judged1 and M2If not, then M is added1 and M2Sequentially assigning a bit-wise value to a zero bit of each pixel after the fourth pixel; if so, then M is added1 and M2Sequentially assigning values to the fifth pixel to the zero position of the last pixel according to bits, and adding redundant M1 and M2Sequentially assigning the bit to the first bit from the first pixel to the last pixel;
wherein ,M1 and M2As shown in the following equation:
Figure BDA0003056762000000153
it should be understood that: when numiWhen 1, M1 and M2Occupying 6 bits in total. When numiWhen 2, M1 and M2Occupying a total of 4 bits.
And S1106, embedding the embedded data into an embedding space except the last pixel.
Similarly, by setting not to embed data into the embedding space of the last pixel, the top num can be maintainediThe original value of each high-order plane ensures reversibility.
Specifically, in one embodiment of the present invention, the binary representation of the encrypted sub-block image is as shown in FIG. 12, and the calculated numiNum if 1iTo '001', the eighth bit of each pixel is a first sub-embedding space, the sixth bit and the fifth bit of each pixel are a second sub-embedding space, as shown in fig. 13, the zero bit of the first pixel, the zero bit of the second pixel and the zero bit of the third pixel of the encrypted sub-block image are sequentially assigned to the eighth bit of the first pixel, the eighth bit of the second pixel and the eighth bit of the third pixel, num is assignediThe first bit, the second bit and the third bit are sequentially assigned to the first bit of the first pixel, the second bit of the second pixel and the third bit of the third pixel of the encrypted sub-block image; will siAssigned to the zero bit of the fourth pixel of the encrypted subblock image, and M1=101,M2010, calculate that: the number of the encrypted sub-block image from the fifth pixel to the last pixel is less than M1 and M2The sum of the number of bits of (c), will be redundant of M1 and M2The bits are sequentially assigned to the first bit of the first pixel to the first bit of the last pixel, so that the auxiliary data are embedded into the embedding space.
Further, in some embodiments of the present invention, the auxiliary data comprises a number of consecutive identical bit-planes of the first set when the classification category of the encrypted sub-block image is a third category
Figure BDA0003056762000000161
Number of consecutive identical bit-planes of the second set
Figure BDA0003056762000000162
Second flag bit s1A third flag s2The fourth flag s3And type information t, as shown in fig. 14, S203 includes:
s1401, judging the second flag bit S1If the pixel value is 1, the encrypted subblock image is not processed, and if the pixel value is zero, the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted subblock image are assigned to be zero;
s1402, scanning pixels in each encrypted sub-block image according to a line scanning sequence, recording the highest bit plane of each pixel in each line of pixels, and generating n first highest bit plane arrangements, wherein n is the column number of the encrypted sub-block images;
s1403, scanning the pixels in each encrypted sub-block image according to a column scanning sequence, recording the highest bit plane of each pixel in each column of pixels, and generating n second highest bit plane arrangements, wherein n is the number of rows of the encrypted sub-block images;
s1404, judging whether the number of types of the first highest bit plane arrangement or the number of types of the second highest bit plane arrangement is 1, if the number of types of the first highest bit plane arrangement or the number of types of the second highest bit plane arrangement is 1, S2Is 1, t is the number of types 1A first highest bit plane arrangement or a second highest bit plane arrangement, and s is the first highest bit plane arrangement when the type number is 13Is 0, s is the first highest order bit plane alignment when the type number is 13Is 1; if the number of types arranged on the first highest bitplane or the number of types arranged on the second highest bitplane is not 1, s2Is 0;
s1405, judging whether the number of the encrypted sub-block image from the fourth pixel to the last pixel is less than or equal to
Figure BDA0003056762000000171
s1、s2、s3And the sum of the bit number of t, if not, s1、s2、s3、t、
Figure BDA0003056762000000172
Sequentially assigning a bit-wise value to a zero bit of each pixel after the third pixel; if so, then s1、s2、s3、t、
Figure BDA0003056762000000173
Sequentially assigning the fourth pixel to the zero position of the last pixel according to bits, and adding the redundant s1、s2、s3、t、
Figure BDA0003056762000000174
Sequentially assigning the bit to the first bit from the first pixel to the last pixel;
and S1406, respectively embedding the embedded data into the embedding space of the first set except the last pixel and the embedding space of the second set except the last pixel.
Similarly, by setting not to embed data into the embedding space of the last pixel of the first set and the second set, the top num can be maintainediThe original value of each high-order plane ensures reversibility.
It should be understood that: when the second flag bit s1When not 1, the auxiliary data includes 4 bits, each numi and s1
Specifically, in one embodiment of the present invention, the encrypted sub-block image is shown in fig. 15, the binary representation of the encrypted sub-block image is shown in fig. 16, and only one sort type among the n first highest bit plane arrangements is "100" by the line scan order. Thus s2=1,s 30 and 100. By using the primary embedding method, it is possible to,
Figure BDA0003056762000000175
is 4 and is coded as 101 and is,
Figure BDA0003056762000000176
is 2 and is coded to 010. Accordingly, the embeddable space and the auxiliary data are determined, and as shown in fig. 17, the auxiliary data and the embedded data are embedded into the embedding space. Specifically, the method comprises the following steps: the embedding spaces in the first set are the eighth through fifth bits of the pixels in the first set, and the embedding spaces in the second set are the eighth and seventh bits of the pixels in the second set. And embedding data in the first set and the second set according to the data embedding step with the classification category as the first category.
It should be noted that: in order to ensure close correlation of each encrypted sub-block image and security of the encrypted image, the size of the encrypted sub-block image should not be excessively large. Accordingly, the size of the encrypted sub-block image is set to 2, 3, 4, 5, whose pairs are encoded to 00, 01, 10, 11, respectively. And the first encrypted sub-block image will not be used for data embedding. This ensures that the size of the encrypted sub-block image can be determined by reading the LSBs of the first two pixels of the first encrypted sub-block image during data extraction and image restoration.
It should also be noted that: the key includes a data extraction key and an image restoration key, and therefore S204 specifically includes: and extracting embedded data from the marked encrypted image according to the data extraction key, and/or restoring the marked encrypted image according to the image restoration key to obtain an original image.
The extracting of the embedded data from the mark encrypted image according to the data extraction key specifically comprises:
determining num by reading LSB of first three pixelsiRepresents and restores its corresponding value, corresponding to a different numiThe value of (2) and the extraction method are also different.
When numiAt > 3, only the primary embedding method is used. Sequentially reading first num of the rest pixels except the last pixeliAnd extracting and collecting the high-level planes. The remaining part except the first 3 bits is embedded data.
When numi1 or numiWhen 2, the LSB of the fourth pixel is read to determine the flag bit siWhether an adaptive coding strategy is used is determined.
If s isi0, only the first embedding method is used, and the first num of the remaining pixels except the last pixel are sequentially readiAnd extracting and collecting the high-level planes. The remaining part except the first 4 bits is embedded data.
If s isiBoth methods are used 1. First, the corresponding embedded data is extracted by the data extraction method in the primary embedding. The remaining embedded data is extracted according to the formula of the second sub-embedding space ES. When numiWhen num is 1, except the first 6 bitsiWhen 2, the rest is the embedded data except the first 4 bits.
When numiWhen 0, by reading the LSB, s of the fourth pixel1Is determined.
If s is1The block is skipped and not used, 0. If s is11, an adaptive coding strategy is used. By reading the LSB, s of the fifth pixel2Is determined. If s is21, by reading the LSB of the sixth pixel to determine s3I.e. the scanning order is determined. Then by reading the LSBs, t of the next three pixels are extracted, followed by the number of consecutive identical bit-planes of the first set
Figure BDA0003056762000000181
Number of consecutive identical bit-planes of the second set
Figure BDA0003056762000000182
Is extracted. Sequentially scanning each pixel if the pixel belongs to SGFront, front
Figure BDA0003056762000000183
A high level plane is extracted, otherwise, front
Figure BDA0003056762000000184
One pixel is extracted. The rest, except the previously determined auxiliary data, is the embedded data.
If s is2By reading the MSB of each pixel, S can be obtained as 0G and SL. If the pixel belongs to SGFront, front
Figure BDA0003056762000000191
A high level plane is extracted, otherwise, front
Figure BDA0003056762000000192
One pixel is extracted. The rest, except the previously determined auxiliary data, is the embedded data.
The method for restoring the marked encrypted image according to the image restoration secret key comprises the following steps of:
obtaining an encrypted image according to the reverse process of the data embedding process;
the original image is obtained by encrypting the image according to the reverse process of image encryption, and the detailed process is not described herein.
The embodiment of the invention also provides a device for hiding the reversible data of the encrypted image, which comprises:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor for performing the steps of the encrypted image reversible data hiding method described in any of the above embodiments of the encrypted image reversible data hiding method.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. Stored thereon, a computer program is loaded by a processor to execute the steps of any one of the methods for hiding reversible data in encrypted images provided by the embodiments of the present invention. For example, the computer program may be loaded by a processor to perform the steps of:
the method comprises the steps of partitioning an original image to obtain a plurality of sub-block images, generating a plurality of cipher streams in one-to-one correspondence with the plurality of sub-block images according to an encryption algorithm, and encrypting each sub-block image in the plurality of sub-block images according to the plurality of cipher streams to generate an encrypted sub-block image; performing position replacement on the plurality of encrypted sub-block images to obtain encrypted images;
acquiring bit plane information of each encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of each encrypted sub-block image according to the classification category;
acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into the embedding space to generate a marked encrypted image;
and acquiring the mark encrypted image and the secret key, restoring the mark encrypted image according to the secret key to acquire the original image, and extracting the embedded data from the mark encrypted image.
The method, the device and the storage medium for hiding the reversible data of the encrypted image provided by the invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An encrypted image reversible data hiding method, comprising:
the method comprises the steps of partitioning an original image to obtain a plurality of sub-block images, generating a plurality of cipher streams in one-to-one correspondence with the plurality of sub-block images according to an encryption algorithm, and encrypting each sub-block image in the plurality of sub-block images according to the plurality of cipher streams to generate an encrypted sub-block image; performing position replacement on the plurality of encrypted sub-block images to obtain encrypted images;
acquiring bit plane information of each encrypted sub-block image, constructing a classification mechanism based on local correlation, determining the classification category of each encrypted sub-block image according to the classification mechanism and the bit plane information, and determining the embedding space of each encrypted sub-block image according to the classification category;
acquiring auxiliary data and embedded data, and embedding the auxiliary data and the embedded data into the embedding space to generate a marked encrypted image;
and acquiring the mark encrypted image and the secret key, restoring the mark encrypted image according to the secret key to acquire the original image, and extracting the embedded data from the mark encrypted image.
2. The encrypted-image reversible data hiding method according to claim 1, wherein each of said sub-block images comprises a plurality of pixels, each of said plurality of pixels being a binary eight-bit; the encrypting each sub-block image of the plurality of sub-block images according to the plurality of cipher streams specifically includes:
Figure FDA0003056761990000011
Figure FDA0003056761990000012
Figure FDA0003056761990000013
Figure FDA0003056761990000014
wherein ,Ei,jFor each pixel in the encrypted sub-block image; riIs a cipher stream; pi,jFor each pixel in the sub-block image;
Figure FDA0003056761990000015
is an exclusive or operation; m is the number of the sub-block images; n × n is the size of each sub-block image; i is the index of each sub-block image, and j is the index of each pixel position; e.g. of the typei,j,kIs Ei,jThe kth bit plane index of (1); r isi,kIs RiThe kth bit plane index of (1); p is a radical ofi,j,kIs Pi,jIs indexed by the kth bit plane, and pi,j,kIs in binary representation; k is the index of the bit-plane for each pixel,
Figure FDA0003056761990000016
is a floor function.
3. The method according to claim 2, wherein said determining the classification category of each of the encrypted sub-block images based on the classification scheme and the bit plane information comprises:
calculating the number of continuous same bit planes in each pixel in each encrypted sub-block image in the order from the highest bit plane to the lowest bit plane;
if the number of the continuous same bit planes is greater than or equal to 3, the classification category of the encrypted sub-block image is a first category;
if the number of the consecutive identical bit planes is 1 or 2, the classification category of the encrypted sub-block image is a second category;
if the number of the continuous same bit planes is 0, the classification category of the encrypted sub-block image is a third category;
the determining an embedding space of each encrypted sub-block image according to the classification category includes:
if the classification type is a first type, the continuous same bit plane is an embedding space of each encrypted sub-block image;
if the classification type is a second type, the continuous same bit plane is a first sub-embedding space of each encrypted sub-block image, a second sub-embedding space of each encrypted sub-block image is determined according to a self-adaptive coding strategy, and the first sub-embedding space and the second sub-embedding space form the embedding space;
and if the classification type is a third type, determining the embedding space of each encrypted sub-block image according to the self-adaptive coding strategy.
4. The encrypted-image reversible data hiding method according to claim 3, wherein each of said pixels includes a 4-bit upper bit plane and a 4-bit lower bit plane; the second sub-embedding space ES is:
Figure FDA0003056761990000021
wherein ,numiIs the number of said consecutive identical bit-planes.
5. The method according to claim 3, wherein if the classification category is a third category, the determining the embedding space of each encrypted sub-block image according to the adaptive coding strategy comprises:
defining pixels with pixel values greater than or equal to 128 in each encrypted sub-block image as a first set, and defining pixels with pixel values less than 128 as a second set;
and respectively calculating the continuous same bit planes of the first set and the continuous same bit planes of the second set, and taking the continuous same bit planes of the first set as an embedding space of the first set and taking the continuous same bit planes of the second set as an embedding space of the second set.
6. The method according to claim 5, wherein when the classification category of the encrypted subblock image is a first category, the auxiliary data includes a number num of consecutive identical bitplanesiSaid embedding said auxiliary data and said embedded data into said embedding space, generating a tagged encrypted image comprising:
assigning the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted sub-block image to the sixth bit, the seventh bit and the eighth bit of the first pixel of the encrypted sub-block image in sequence;
will numiConverting the binary bit into a three-bit binary bit, and sequentially assigning a first zero position, a first bit and a second bit of the binary bit to a first zero position, a second zero position and a third zero position of a first pixel, a second pixel and a third pixel of the encrypted sub-block image;
embedding the embedded data into an embedding space except for the last pixel.
7. The method according to claim 6, wherein when the classification of the encrypted sub-block image is secondClass time, the auxiliary data comprises the number num of consecutive identical bit-planesiA first zone bit siFirst sub information M1And second sub information M2Said embedding said auxiliary data and said embedded data into said embedding space, generating a tagged encrypted image comprising:
judgment siWhether the number of the encrypted subblocks is 1 or not, if not, the encrypted subblock image is not processed, and if so, num is judgedi1 or 2;
if numiIf the number of the pixels in the encrypted subblock image is 2, assigning the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted subblock image to the eighth bit of the first pixel, the seventh bit of the first pixel and the eighth bit of the second pixel in sequence; if numiIf the pixel number of the encrypted subblock image is 1, sequentially assigning a zero bit of a first pixel, a zero bit of a second pixel and a zero bit of a third pixel of the encrypted subblock image to an eighth bit of the first pixel, an eighth bit of the second pixel and an eighth bit of the third pixel;
will numiConverting the binary three-bit into a binary three-bit, and sequentially assigning a first zero position, a first bit and a second bit of the three-bit to a first zero position, a second zero position and a third zero position of a first pixel, a second pixel and a third pixel of the encrypted sub-block image;
sifor one bit, s isiAssigning a zero bit to a fourth pixel of the encrypted sub-block image;
M1 and M2The bits are the same and are two or three bits, and whether the number of the encrypted sub-block image from the fifth pixel to the last pixel is less than M or not is judged1 and M2If not, then the M is added1 and M2Sequentially assigning a bit-wise value to a zero bit of each pixel after the fourth pixel; if yes, the M is added1 and M2Sequentially assigning values to the fifth pixel to the zero position of the last pixel according to bits, and adding redundant M1 and M2Ratio of (A to (B)Assigning the bits to the first bit from the first pixel to the last pixel in sequence;
embedding the embedded data into an embedding space except for the last pixel.
8. The method according to claim 7, wherein the auxiliary data includes the number of consecutive identical bit-planes of the first set when the classification category of the encrypted sub-block image is a third category
Figure FDA0003056761990000041
Number of consecutive identical bit-planes of the second set
Figure FDA0003056761990000042
Second flag bit s1A third flag s2The fourth flag s3And type information t, said embedding said auxiliary data and said embedded data into said embedding space, generating a tagged encrypted image comprising:
judging the second flag bit s1Whether the image is 1 or not, if not, the encrypted subblock image is not processed, and if yes:
assigning zero to the zero position of the first pixel, the zero position of the second pixel and the zero position of the third pixel of the encrypted sub-block image;
scanning pixels in each encrypted sub-block image according to a row scanning sequence, recording the highest bit plane of each pixel in each row of pixels, and generating n first highest bit plane arrangements, wherein n is the column number of the encrypted sub-block images;
scanning pixels in each encrypted sub-block image according to a column scanning sequence, recording a highest bit plane of each pixel in each column of pixels, and generating n second highest bit plane arrangements, wherein n is the number of rows of the encrypted sub-block images;
judging whether the number of types of the first highest bit plane arrangement or the number of types of the second highest bit plane arrangement is 1, if so, judging whether the number of the types of the first highest bit plane arrangement is 1The number of types or the number of types arranged on the second highest bit plane is 1, then s2Is 1, t is the first highest bit plane arrangement or the second highest bit plane arrangement with a type number of 1, s is the first highest bit plane arrangement when the type number is 13Is 0, s is the first highest order bit plane alignment when the type number is 13Is 1; if the number of types arranged on the first highest bit plane or the number of types arranged on the second highest bit plane is not 1, s2Is 0;
judging whether the number of the fourth pixel to the last pixel of the encrypted sub-block image is less than or not
Figure FDA0003056761990000051
s1、s2、s3And the sum of the bit number of t, if not, the sum of s1、s2、s3、t、
Figure FDA0003056761990000052
Sequentially assigning a bit-wise value to a zero bit of each pixel after the third pixel; if yes, the step s is carried out1、s2、s3、t、
Figure FDA0003056761990000053
Sequentially assigning values to the fourth pixel to the zero position of the last pixel according to bits, and adding the redundant s1、s2、s3、t、
Figure FDA0003056761990000054
Sequentially assigning the first bit of the first pixel to the first bit of the last pixel;
and respectively embedding the embedded data into the embedding space of the first set except the last pixel and the embedding space of the second set except the last pixel.
9. An encrypted image reversible data hiding apparatus, comprising:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the encrypted image reversible data hiding method of any one of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program is loaded by a processor to execute the steps in the method for hiding reversible data in encrypted images according to any one of claims 1 to 8.
CN202110503227.8A 2021-05-08 2021-05-08 Method, device and storage medium for hiding reversible data of encrypted image Active CN113472968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110503227.8A CN113472968B (en) 2021-05-08 2021-05-08 Method, device and storage medium for hiding reversible data of encrypted image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110503227.8A CN113472968B (en) 2021-05-08 2021-05-08 Method, device and storage medium for hiding reversible data of encrypted image

Publications (2)

Publication Number Publication Date
CN113472968A true CN113472968A (en) 2021-10-01
CN113472968B CN113472968B (en) 2023-10-13

Family

ID=77870731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110503227.8A Active CN113472968B (en) 2021-05-08 2021-05-08 Method, device and storage medium for hiding reversible data of encrypted image

Country Status (1)

Country Link
CN (1) CN113472968B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106954069A (en) * 2017-05-04 2017-07-14 安徽大学 Towards the reversible data embedded coding method of digital picture secret protection and management
CN108566500A (en) * 2018-03-02 2018-09-21 西南交通大学 The reversible hidden method of adapting to image encrypted domain based on Hybrid Encryption mechanism
CN109462714A (en) * 2018-10-30 2019-03-12 成都优图有真像信息技术有限公司 The small encrypted image Processing of Multi-Bit-Planes reversible data concealing method of cloud storage expense
CN111898138A (en) * 2020-07-06 2020-11-06 西北工业大学 Separable ciphertext domain reversible data hiding method
CN111970507A (en) * 2020-08-26 2020-11-20 安徽大学 Reversible data hiding method of ciphertext domain image based on pixel difference coding
CN112202984A (en) * 2020-09-25 2021-01-08 中国人民武装警察部队工程大学 Ciphertext domain reversible information hiding method based on error correction redundancy
CN112311954A (en) * 2020-10-29 2021-02-02 杭州电子科技大学 Ciphertext domain reversible information hiding method based on complementary code mark and bitmap embedding

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106954069A (en) * 2017-05-04 2017-07-14 安徽大学 Towards the reversible data embedded coding method of digital picture secret protection and management
CN108566500A (en) * 2018-03-02 2018-09-21 西南交通大学 The reversible hidden method of adapting to image encrypted domain based on Hybrid Encryption mechanism
CN109462714A (en) * 2018-10-30 2019-03-12 成都优图有真像信息技术有限公司 The small encrypted image Processing of Multi-Bit-Planes reversible data concealing method of cloud storage expense
CN111898138A (en) * 2020-07-06 2020-11-06 西北工业大学 Separable ciphertext domain reversible data hiding method
CN111970507A (en) * 2020-08-26 2020-11-20 安徽大学 Reversible data hiding method of ciphertext domain image based on pixel difference coding
CN112202984A (en) * 2020-09-25 2021-01-08 中国人民武装警察部队工程大学 Ciphertext domain reversible information hiding method based on error correction redundancy
CN112311954A (en) * 2020-10-29 2021-02-02 杭州电子科技大学 Ciphertext domain reversible information hiding method based on complementary code mark and bitmap embedding

Also Published As

Publication number Publication date
CN113472968B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN108537049B (en) Adaptive steganography algorithm based on binary image
US10853917B2 (en) Color image authentication method based on palette compression technique
Wang et al. An image-hiding method with high hiding capacity based on best-block matching and k-means clustering
CN113032813B (en) Reversible information hiding method based on improved pixel local complexity calculation and multi-peak embedding
Wang et al. Reversible data hiding based on two‐dimensional prediction errors
Lin et al. A real-time dual-image-based reversible data hiding scheme using turtle shells
CN114745475B (en) Robust reversible information hiding method for encrypted image
Lin et al. A new steganography method for dynamic GIF images based on palette sort
Lin et al. Pixel-based fragile image watermarking based on absolute moment block truncation coding
Zhang et al. Semantic image compression based on data hiding
Weng et al. Reversible data hiding based on the local smoothness estimator and optional embedding strategy in four prediction modes
Abbasi et al. Efficient lossless based secure communication in 6G Internet-of-Things environments
CN113472968A (en) Encrypted image reversible data hiding method and device and storage medium
Wang et al. [Retracted] High‐Capacity Reversible Data Hiding in Encrypted Images Based on Prediction Error Compression and Block Selection
Gupta et al. A metaheuristic method to hide MP3 sound in JPEG image
CN115049715B (en) Image steganography method based on texture fusion feature block matching and large embedding rate product code
CN111598766A (en) Reversible information hiding method of three-dimensional model in encrypted domain based on prediction error expansion
Hu et al. A reversible steganography scheme of secret image sharing based on cellular automata and least significant bits construction
Chang et al. An effective image steganographic scheme based on wavelet transformation and pattern-based modification
Wang et al. A novel (n, n) secret image sharing scheme based on Sudoku
CN112614196B (en) Image robustness Hash authentication method based on quaternion convolution neural network
Kuo et al. Secure multi-group data hiding based on gemd map
Yu et al. Reversible data hiding with pixel prediction and additive homomorphism for encrypted image
CN112884632B (en) High-load image steganography method based on reconstruction matrix
Xiang et al. Hybrid Predictor and Field‐Biased Context Pixel Selection Based on PPVO

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