Reversible data hiding method and device for encrypted image, medium and product
By working collaboratively with the data owner, the hidden party, and the receiver, and combining methods such as block scrambling, secret sharing, and Hamming coding, the single point of failure risk and low embedding rate of the single hidden party model are solved, achieving high-capacity information transmission and storage security and high recovery accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-03-18
- Publication Date
- 2026-04-17
AI Technical Summary
Most existing encrypted image reversible data hiding technologies adopt a single hider model, which has the risk of single point of failure, low embedding rate, high computational complexity, and the image restoration accuracy is greatly affected by the embedding capacity, and cannot meet the high-capacity information transmission and storage needs of the big data era.
By employing a three-terminal collaboration among the data owner, multiple data hiders, and the data receiver, combined with block scrambling, secret sharing, and Hamming encoding, we ensure data security and image integrity when a single data hider is attacked or malfunctions. Furthermore, we improve the embedding rate and reduce computational complexity by embedding secret data three times.
In the event of an attack or malfunction on a single data hider end, the system ensures data security and image integrity, improves the embedding rate, meets the needs of high-capacity information transmission and storage, reduces computational complexity, and improves image restoration accuracy.
Smart Images

Figure CN121887933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of reversible data hiding technology, and in particular to a method, device, medium and product for reversibly hiding data in encrypted images. Background Technology
[0002] Reversible data hiding is a technology that embeds additional information into digital media and completely restores the original media after the information is extracted. With the widespread adoption of cloud computing, the storage and sharing of more and more sensitive data is moving to the cloud, making privacy protection a critical issue. However, reversible data hiding technology itself does not inherently provide privacy protection. To prevent unauthorized access to data in the cloud, the combination of encryption and data hiding technologies is particularly important. Therefore, reversible data hiding technology for encrypted images has emerged, allowing information to be embedded in encrypted images without decryption, thus achieving the dual goals of privacy protection and data hiding. This technology typically involves three roles: the data owner is responsible for encrypting the original image, the data hider is responsible for embedding information in the encrypted image, and the data receiver is responsible for extracting the information and restoring the original image.
[0003] Most existing reversible data hiding technologies for encrypted images employ a single-hider model, meaning the data hiding process is completed by a single participant. However, this model carries the risk of a single point of failure; if the data hider is attacked or malfunctions, the security of the embedded data and the integrity of the image may be compromised. Furthermore, existing reversible data hiding technologies for encrypted images generally have low embedding rates, failing to meet the demands of high-capacity information transmission and storage in today's big data era. Additionally, some algorithms suffer from high computational complexity and the image restoration accuracy is significantly affected by the embedding capacity. These shortcomings limit the application of this technology in fields with stringent security and practical requirements. Summary of the Invention
[0004] This invention provides a method, device, medium, and product for reversible data hiding of encrypted images. It addresses the problem that most existing reversible data hiding technologies for encrypted images employ a single-hider model, where the data hiding process is completed by a single participant. However, this model carries the risk of a single point of failure; if the data hider is attacked or malfunctions, the security of the embedded data and the integrity of the image may be compromised. Furthermore, existing reversible data hiding technologies for encrypted images generally have low embedding rates, failing to meet the demands of high-capacity information transmission and storage in the current era of big data. Additionally, some algorithms suffer from high computational complexity and the image recovery accuracy being greatly affected by the embedding capacity. This invention's solution achieves reversible data hiding of encrypted images through the collaboration of the data owner, multiple data hider ends, and the data receiver end, combining block scrambling, secret sharing, and Hamming encoding. This ensures data security and image integrity even if a single data hider is attacked or malfunctions. Moreover, by embedding secret data three times, the embedding rate is improved, meeting the needs of high-capacity information transmission and storage, reducing computational complexity, and improving image recovery accuracy.
[0005] This invention provides a reversible data hiding method for encrypted images, applied to the data owner, and includes the following steps.
[0006] The original grayscale image is scrambled into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image; For each image block in the encrypted image, perform polynomial secret sharing over a preset finite field on the pixel pairs in the image block to obtain multiple share images; Each of the aforementioned share images is sent to its respective data hider.
[0007] According to the present invention, a reversible data hiding method for encrypted images, wherein the step of scrambling the original grayscale image into blocks based on a preset key to obtain the encrypted image corresponding to the original grayscale image includes: The original grayscale image is divided into blocks to obtain multiple initial blocks; A scrambled table is generated based on the preset key, and all the initial blocks are reordered based on the scrambled table to obtain the encrypted image; the encrypted image includes multiple image blocks.
[0008] According to the present invention, a reversible data hiding method for encrypted images is provided, wherein the preset finite field is The first and second low-order coefficients of the polynomial secretly shared by the polynomial are determined based on pixel pairs in the corresponding image block.
[0009] This invention provides a reversible data hiding method for encrypted images, applicable to various data hiding endpoints, comprising the following steps.
[0010] Acquire the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; The pixel values of the image share are converted into a binary sequence, and if all elements of the binary sequence are the same, the last bit of the binary sequence is modified to obtain a first sequence. A second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data. Perform Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence; Based on the type of the second secret data, the target bit in the third sequence is flipped to obtain the fourth sequence corresponding to the third sequence; The fourth sequence is expanded based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the tag values of the binary sequences of all the data hider ends; the tag values are determined based on the binary sequences; The fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs to sequentially convert the pixel values of the share image into the new pixel value pairs to obtain the marked share image; The marked share image is sent to the data receiver.
[0011] According to the reversible data hiding method for encrypted images provided by the present invention, the step of performing Hamming encoding on the second sequence to obtain a third sequence corresponding to the second sequence includes: The first check bit, the second check bit, the third check bit, and the fourth check bit are determined based on the second sequence and the Hamming code; The first check bit, the second check bit, the third check bit, and the fourth check bit are respectively determined as the first, second, fourth, and eighth bits of the third sequence, and the remaining bits of the third sequence are determined based on the second sequence to obtain the third sequence.
[0012] According to the present invention, a reversible data hiding method for encrypted images, wherein the target bit in the third sequence is flipped based on the type of the second secret data to obtain a fourth sequence corresponding to the third sequence, includes: When the second secret data is 1, the element with the first 1 in the third sequence is taken as the target bit and flipped to 0 to obtain the fourth sequence; When the second secret data is 0, the element with the first 0 in the third sequence is taken as the target bit and flipped to 1 to obtain the fourth sequence.
[0013] This invention provides a reversible data hiding method for encrypted images, applied to the data receiver end, comprising the following steps.
[0014] Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first subsequence and the second subsequence are determined by the data hiders based on the share images; For each of the labeled share images, the first subsequence and the second subsequence corresponding to the labeled share image are merged to obtain the first target sequence corresponding to the labeled share image; Based on the last digit of the first target sequence, auxiliary information and the length information corresponding to the auxiliary information are determined, and a position map is determined based on the auxiliary information and the length information; the last digit of the first target sequence is removed to obtain the second target sequence corresponding to the first target sequence; The second target sequence is corrected by deleting the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence. Delete the last three digits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; Based on the location map, the last position of the fourth target sequence is modified to obtain the sequence to be recovered; The sequence to be recovered is reconstructed by Lagrange interpolation to obtain the original pixel values corresponding to the share image; The recovered encrypted image is determined based on the original pixel values corresponding to all the aforementioned share images; Based on the recovered encrypted image and the preset key, the image is reverse-scrambled to obtain the recovered grayscale image.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the reversible data hiding method for encrypted images as described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a reversible data hiding method for encrypted images as described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a reversible data hiding method for encrypted images as described above.
[0018] The present invention provides a reversible data hiding method, device, medium and product for encrypted images. The data receiver scrambles the original grayscale image into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image. For each image block in the encrypted image, a polynomial secret sharing over a preset finite field is performed on the pixel pairs in the image block to obtain multiple share images. Each share image is sent to each data hider end. Each data hider acquires the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; the pixel values of the share image are converted into binary sequences, and the last bit of the binary sequence is modified when all elements of the binary sequence are the same, to obtain the first sequence; the second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data; Hamming encoding is performed on the second sequence to obtain the third sequence corresponding to the second sequence; the target bit in the third sequence is flipped based on the type of the second secret data to obtain the fourth sequence corresponding to the third sequence; the fourth sequence is extended based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes the third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the marker values of all data hiders; the marker values are determined based on the binary sequence; the fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs, and the pixel values of the share image are converted into new pixel value pairs in sequence to obtain the marked share image; the marked share image is sent to the data receiver. Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first and second subsequences are determined by the data hiders based on the share images; for each labeled share image, merge the first and second subsequences corresponding to the labeled share image to obtain a first target sequence corresponding to the labeled share image; determine auxiliary information and the length information corresponding to the auxiliary information based on the last bit of the first target sequence, and determine the position map based on the auxiliary information and the length information; Remove the last bit of the first target sequence to obtain the second target sequence corresponding to the first target sequence; perform error correction on the second target sequence and delete the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence; delete the last three bits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; modify the last bit of the fourth target sequence based on the position map to obtain the sequence to be recovered; reconstruct the sequence to be recovered using Lagrange interpolation to obtain the original pixel values corresponding to the share images; determine the recovered encrypted image based on the original pixel values corresponding to all share images; perform inverse scrambling based on the recovered encrypted image and the preset key to obtain the recovered grayscale image.The technical solution of this invention achieves reversible data hiding of encrypted images through the collaboration of three ends: the data owner end, multiple data hider ends, and the data receiver end. It combines block scrambling, secret sharing, and Hamming encoding. It ensures data security and image integrity even if a single data hider end is attacked or malfunctions. Furthermore, it improves the embedding rate by embedding secret data three times, which can meet the needs of high-capacity information transmission and storage, reduce computational complexity, and improve image recovery accuracy. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts illustrating the reversible data hiding method for encrypted images provided by the present invention.
[0021] Figure 2 This is the second flowchart illustrating the reversible data hiding method for encrypted images provided by the present invention.
[0022] Figure 3 This is the third flowchart of the reversible data hiding method for encrypted images provided by the present invention.
[0023] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] To address the aforementioned problems in the prior art, this invention provides a reversible data hiding method for encrypted images. Figure 1 This is one of the flowcharts illustrating the reversible data hiding method for encrypted images provided by the present invention, such as... Figure 1 As shown, the method is applied to the data owner's side and includes the following steps 110 to 130.
[0026] Step 110: Based on a preset key, the original grayscale image is scrambled into blocks to obtain the encrypted image corresponding to the original grayscale image.
[0027] Specifically, the original grayscale image can be scrambled into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image. Block scrambling involves dividing the original grayscale image into blocks and then shuffling the original order of each block to obtain a newly ordered encrypted image. The size of the original image is... For example, it can be .
[0028] In one embodiment, the step of scrambling the original grayscale image into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image includes: The original grayscale image is divided into blocks to obtain multiple initial blocks; A scrambled table is generated based on the preset key, and all the initial blocks are reordered based on the scrambled table to obtain the encrypted image; the encrypted image includes multiple image blocks.
[0029] Specifically, the original grayscale image can be divided into blocks, which can be done in row priority order from top to bottom and from left to right, thus obtaining multiple initial blocks. Each initial block contains a pair of pixels, and the pixels in the initial blocks remain unchanged.
[0030] Furthermore, it can be based on a preset key. A scrambled table is generated, and all initial blocks are reordered based on the scrambled table, that is, the initial blocks are placed in new positions according to the scrambled table to obtain the encrypted image. .
[0031] In the above embodiments, the encryption of the original grayscale image is achieved by scrambling the original grayscale image into blocks, thus realizing privacy protection of the reversible data hiding process.
[0032] Step 120: For each image block in the encrypted image, perform polynomial secret sharing over a preset finite field on the pixel pairs in the image block to obtain multiple share images.
[0033] Specifically, for each image block in the encrypted image, a polynomial secret sharing over a preset finite field can be performed on the pixel pairs in the image block to obtain multiple share images.
[0034] In one embodiment, the preset finite field is The first and second low-order coefficients of the polynomial secretly shared by the polynomial are determined based on pixel pairs in the corresponding image block.
[0035] Specifically, the finite field is presupposed as For example, a preset finite field can be applied to pixel pairs in an image block. On - Polynomial secret sharing, in which... It can take the value 3. The value can be 4, and the rules for constructing the polynomial coefficients are as follows: Among them, the first low-order coefficients Second lower order coefficients Replace the corresponding pixel pairs of the image blocks, and take random numbers for the remaining coefficients, with the values ranging within a preset finite domain. superior. Since it is an irreducible polynomial, we can take... . and thus obtain Individual image .
[0036] In the above embodiments, by performing polynomial secret sharing over a preset finite domain on pixel pairs in the image block, multiple share images can be obtained, laying the foundation for subsequent reversible data hiding by multiple data hiders. The multiple data hiders end ensures data integrity even if the data hiding process fails due to a single participant failure.
[0037] Step 130: Send each of the aforementioned share images to the respective data hider terminals.
[0038] Specifically, after obtaining multiple share images, each share image can be sent separately to each data hider terminal. It's easy to understand that each data hider terminal only receives one share image; that is, the number of data hider terminals can also be set to... indivual.
[0039] This invention also provides a reversible data hiding method for encrypted images. Figure 2 This is the second flowchart illustrating the reversible data hiding method for encrypted images provided by this invention, as shown below. Figure 2 As shown, the method is applied to each data hider end, including the following steps 210 to 280.
[0040] Step 210: Obtain the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image.
[0041] Specifically, the data hider can obtain the share image sent by the data owner, which is determined by the data owner based on the original grayscale image (see steps 110 to 130 for details).
[0042] Step 220: Convert the pixel values of the share image into a binary sequence, and modify the last bit of the binary sequence if all elements of the binary sequence are the same to obtain the first sequence.
[0043] Specifically, this share of the image can be... pixel values Convert to 8-bit binary sequence , This process can also determine the tag value of the binary sequence. , tag value It can be expressed by the following formula: It is easy to understand that if a binary sequence is all 1s or all 0s, the label value is 1; otherwise, the label value of the binary sequence is 0.
[0044] Since the probability of all 1s or all 0s appearing is very small, therefore... Location map The sparsity of 0 is very large, for Arithmetic coding is used to encode the results. This serves as supplementary information for subsequent recovery.
[0045] Furthermore, when all elements of the binary sequence are identical (i.e., the flag value is 1), the last bit of the binary sequence is modified to obtain the first sequence. That is, when the binary sequence is all 1s, the last bit is changed to 0; when the binary sequence is all 0s, the last bit is changed to 1. Modified to , It can be expressed by the following formula: It's easy to understand that if not all elements of the binary sequence are the same, then the last bit is not... Make the necessary modifications.
[0046] Step 230: Determine a second sequence based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data.
[0047] Specifically, the preset extension bits can be set to , Used to embed the first secret data, with preset extension bits Added to the first sequence, resulting in an 11-digit second sequence. .
[0048] Step 240: Perform Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence.
[0049] Specifically, (15,11) Hamming encoding can be performed on the second sequence to extend the 11-bit second sequence into a 15-bit third sequence.
[0050] In one embodiment, performing Hamming encoding on the second sequence to obtain a third sequence corresponding to the second sequence includes: The first check bit, the second check bit, the third check bit, and the fourth check bit are determined based on the second sequence and the Hamming code; The first check bit, the second check bit, the third check bit, and the fourth check bit are respectively determined as the first, second, fourth, and eighth bits of the third sequence, and the remaining bits of the third sequence are determined based on the second sequence to obtain the third sequence.
[0051] Specifically, when expanding the second sequence, it is first necessary to determine the first check bit. Second check bit Third check bit and the fourth check bit Each check digit can be represented by the following formula: Furthermore, the first, second, third, and fourth check bits are determined as the first, second, fourth, and eighth bits of the third sequence, respectively. Based on the second sequence, the remaining bits of the third sequence are determined, resulting in a 15-bit third sequence. .
[0052] In the above embodiments, Hamming coding is used to achieve reversible data hiding while reducing computational complexity.
[0053] Step 250: Based on the type of the second secret data, flip the target bit in the third sequence to obtain the fourth sequence corresponding to the third sequence.
[0054] Specifically, based on the error correction characteristics of (15,11) Hamming coding, the third sequence needs to be flipped by 1 bit to embed the second secret data. The target bit to be flipped is determined based on the type of the second secret data. After flipping, the fourth sequence can be obtained.
[0055] In one embodiment, flipping the target bit in the third sequence based on the type of the second secret data to obtain the fourth sequence corresponding to the third sequence includes: When the second secret data is 1, the element with the first 1 in the third sequence is taken as the target bit and flipped to 0 to obtain the fourth sequence; When the second secret data is 0, the element with the first 0 in the third sequence is taken as the target bit and flipped to 1 to obtain the fourth sequence.
[0056] Specifically, when the second secret data is 1, the element starting with 1 in the third sequence is used as the target bit and flipped to 0 to obtain the fourth sequence. When the second secret data is 0, the element starting with 0 in the third sequence is used as the target bit and flipped to 1 to obtain the fourth sequence. This process can be represented as: in, The result of flipping the target bit. express The target bit in the middle needs to satisfy , This represents the second secret data. The value can be 0 or 1.
[0057] The fourth sequence obtained It can be represented as .
[0058] In the above embodiments, the target bit in the third sequence is flipped based on the type of the second secret data, which further ensures the data security of reversible data hiding.
[0059] Step 260: Expand the fourth sequence based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes third secret data, auxiliary information and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the tag values of the binary sequences of all the data hider ends; the tag values are determined based on the binary sequences.
[0060] Specifically, it can be based on the data to be embedded. The fourth sequence is extended, that is... Add it to the end of the fourth sequence to obtain the fifth sequence. Data to be embedded This includes third-party secret data, auxiliary information, and the length information corresponding to the auxiliary information. The process for determining the auxiliary information can be found in step 220. The length information corresponding to the auxiliary information can be represented as follows: .
[0061] Step 270: Divide the fifth sequence into a first subsequence and a second subsequence; and use the first subsequence and the second subsequence as new pixel value pairs to sequentially convert the pixel values of the share image into the new pixel value pairs to obtain the marked share image.
[0062] Specifically, the fifth sequence can be divided into two groups, namely the first subsequence. and the second subsequence . , Then, the first and second subsequences are used as new pixel value pairs, and the pixel values of the share image are converted into new pixel value pairs in sequence to obtain the labeled share image.
[0063] Step 280: Send the marked share image to the data receiver.
[0064] Specifically, the marked share image can be sent to the data receiver.
[0065] This invention also provides a reversible data hiding method for encrypted images. Figure 3 This is the third flowchart illustrating the reversible data hiding method for encrypted images provided by this invention, as shown below. Figure 3 As shown, the method is applied to the data receiver end and includes the following steps 310 to 390.
[0066] Step 310: Obtain the marked share images sent by multiple data hider terminals respectively; the marked share images are determined by the data hider terminals based on the share images; the share images are determined by the data owner terminals based on the original grayscale images; the marked share images correspond to a first subsequence and a second subsequence; the first subsequence and the second subsequence are determined by the data hider terminals based on the share images.
[0067] Specifically, it should be noted that the data receiver does not need to obtain all the marked share images sent by the data hider, but only needs to obtain... A single labeled share of the image is sufficient to restore the original grayscale image.
[0068] Step 320: For each of the labeled share images, merge the first subsequence and the second subsequence corresponding to the labeled share image to obtain the first target sequence corresponding to the labeled share image.
[0069] Specifically, for each labeled share image, the first subsequence and the second subsequence corresponding to that labeled share image are merged, that is... and The merging process yields the first target sequence. It is easy to understand that the first target subsequence corresponding to the marked share image is the same as the fifth sequence of the corresponding share image.
[0070] Step 330: Determine auxiliary information and length information corresponding to the auxiliary information based on the last digit of the first target sequence, and determine the position map based on the auxiliary information and the length information; remove the last digit of the first target sequence to obtain the second target sequence corresponding to the first target sequence.
[0071] Specifically, auxiliary information can be determined based on the last bit of the first target sequence. The length information corresponding to the auxiliary information is used to determine the location map. .
[0072] Step 340: Correct the error in the second target sequence by deleting the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence.
[0073] Specifically, the syndrome can be determined based on the second target sequence. , It can be expressed by the following formula: The adjoint Converting to decimal allows us to find the erroneous 1 bit. By flipping and correcting the erroneous 1 bit and deleting the 1st, 2nd, 4th, and 8th check bits, we can obtain the third target sequence. It is easy to understand that the third target subsequence corresponding to the marked share image is the same as the second sequence of the corresponding share image.
[0074] Step 350: Delete the last three digits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence.
[0075] Specifically, the last three digits of the third target sequence can be deleted (i.e., ), and obtain the fourth target sequence corresponding to the third target sequence. It is easy to understand that the fourth target sequence corresponding to the marked share image is the same as the first sequence of the corresponding share image.
[0076] Step 360: Modify the last position of the fourth target sequence based on the location map to obtain the sequence to be recovered.
[0077] Specifically, the last position of the fourth target sequence is modified based on the position map to obtain the sequence to be recovered. The modification of the last position can be expressed as: in, This indicates the last digit after modification. This represents the pixel value corresponding to the fourth target sequence. It's easy to understand that the sequence to be recovered corresponding to the marked share image is the same as the binary sequence of the corresponding share image.
[0078] Step 370: Perform Lagrange interpolation reconstruction on the sequence to be recovered to obtain the original pixel values corresponding to the share image.
[0079] Specifically, the sequence to be restored can be reconstructed using Lagrange interpolation to obtain the original pixel values corresponding to that share of the image.
[0080] Step 380: Determine the recovered encrypted image based on the original pixel values corresponding to all the said share images.
[0081] Specifically, by combining the original pixel values corresponding to all share images, the recovered encrypted image (i.e., the corresponding encrypted image) can be obtained.
[0082] Step 390: Based on the recovered encrypted image and the preset key, reverse scrambling is performed to obtain the recovered grayscale image.
[0083] Specifically, based on the recovered encrypted image and the preset key, reverse scrambling is performed (reverse scrambling is the reverse operation of block scrambling in step 110) to obtain the recovered grayscale image (i.e., the corresponding original grayscale image).
[0084] The reversible data hiding method for encrypted images provided by the present invention involves the data receiver dividing the original grayscale image into blocks and scrambling it based on a preset key to obtain the encrypted image corresponding to the original grayscale image; for each image block in the encrypted image, a polynomial secret sharing over a preset finite field is performed on the pixel pairs in the image block to obtain multiple share images; and each share image is sent to each data hider end. Each data hider acquires the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; the pixel values of the share image are converted into binary sequences, and the last bit of the binary sequence is modified when all elements of the binary sequence are the same, to obtain the first sequence; the second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data; Hamming encoding is performed on the second sequence to obtain the third sequence corresponding to the second sequence; the target bit in the third sequence is flipped based on the type of the second secret data to obtain the fourth sequence corresponding to the third sequence; the fourth sequence is extended based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes the third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the marker values of all data hiders; the marker values are determined based on the binary sequence; the fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs, and the pixel values of the share image are converted into new pixel value pairs in sequence to obtain the marked share image; the marked share image is sent to the data receiver. Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first and second subsequences are determined by the data hiders based on the share images; for each labeled share image, merge the first and second subsequences corresponding to the labeled share image to obtain a first target sequence corresponding to the labeled share image; determine auxiliary information and the length information corresponding to the auxiliary information based on the last bit of the first target sequence, and determine the position map based on the auxiliary information and the length information; Remove the last bit of the first target sequence to obtain the second target sequence corresponding to the first target sequence; perform error correction on the second target sequence and delete the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence; delete the last three bits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; modify the last bit of the fourth target sequence based on the position map to obtain the sequence to be recovered; reconstruct the sequence to be recovered using Lagrange interpolation to obtain the original pixel values corresponding to the share images; determine the recovered encrypted image based on the original pixel values corresponding to all share images; perform inverse scrambling based on the recovered encrypted image and the preset key to obtain the recovered grayscale image.The technical solution of this invention achieves reversible data hiding of encrypted images through the collaboration of three ends: the data owner end, multiple data hider ends, and the data receiver end. It combines block scrambling, secret sharing, and Hamming encoding. It ensures data security and image integrity even if a single data hider end is attacked or malfunctions. Furthermore, it improves the embedding rate by embedding secret data three times, which can meet the needs of high-capacity information transmission and storage, reduce computational complexity, and improve image recovery accuracy.
[0085] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a reversible data hiding method for encrypted images, the method including: The original grayscale image is scrambled into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image; For each image block in the encrypted image, perform polynomial secret sharing over a preset finite field on the pixel pairs in the image block to obtain multiple share images; Each of the aforementioned share images is sent to its respective data hider.
[0086] or, Acquire the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; The pixel values of the image share are converted into a binary sequence, and if all elements of the binary sequence are the same, the last bit of the binary sequence is modified to obtain a first sequence. A second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data. Perform Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence; Based on the type of the second secret data, the target bit in the third sequence is flipped to obtain the fourth sequence corresponding to the third sequence; The fourth sequence is expanded based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the tag values of the binary sequences of all the data hider ends; the tag values are determined based on the binary sequences; The fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs to sequentially convert the pixel values of the share image into the new pixel value pairs to obtain the marked share image; The marked share image is sent to the data receiver.
[0087] or, Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first subsequence and the second subsequence are determined by the data hiders based on the share images; For each of the labeled share images, the first subsequence and the second subsequence corresponding to the labeled share image are merged to obtain the first target sequence corresponding to the labeled share image; Based on the last digit of the first target sequence, auxiliary information and the length information corresponding to the auxiliary information are determined, and a position map is determined based on the auxiliary information and the length information; the last digit of the first target sequence is removed to obtain the second target sequence corresponding to the first target sequence; The second target sequence is corrected by deleting the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence. Delete the last three digits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; Based on the location map, the last position of the fourth target sequence is modified to obtain the sequence to be recovered; The sequence to be recovered is reconstructed by Lagrange interpolation to obtain the original pixel values corresponding to the share image; The recovered encrypted image is determined based on the original pixel values corresponding to all the aforementioned share images; Based on the recovered encrypted image and the preset key, the image is reverse-scrambled to obtain the recovered grayscale image.
[0088] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0089] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing the reversible data hiding method for encrypted images provided by the above methods, the method comprising: The original grayscale image is scrambled into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image; For each image block in the encrypted image, perform polynomial secret sharing over a preset finite field on the pixel pairs in the image block to obtain multiple share images; Each of the aforementioned share images is sent to its respective data hider.
[0090] or, Acquire the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; The pixel values of the image share are converted into a binary sequence, and if all elements of the binary sequence are the same, the last bit of the binary sequence is modified to obtain a first sequence. A second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data. Perform Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence; Based on the type of the second secret data, the target bit in the third sequence is flipped to obtain the fourth sequence corresponding to the third sequence; The fourth sequence is expanded based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the tag values of the binary sequences of all the data hider ends; the tag values are determined based on the binary sequences; The fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs to sequentially convert the pixel values of the share image into the new pixel value pairs to obtain the marked share image; The marked share image is sent to the data receiver.
[0091] or, Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first subsequence and the second subsequence are determined by the data hiders based on the share images; For each of the labeled share images, the first subsequence and the second subsequence corresponding to the labeled share image are merged to obtain the first target sequence corresponding to the labeled share image; Based on the last digit of the first target sequence, auxiliary information and the length information corresponding to the auxiliary information are determined, and a position map is determined based on the auxiliary information and the length information; the last digit of the first target sequence is removed to obtain the second target sequence corresponding to the first target sequence; The second target sequence is corrected by deleting the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence. Delete the last three digits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; Based on the location map, the last position of the fourth target sequence is modified to obtain the sequence to be recovered; The sequence to be recovered is reconstructed by Lagrange interpolation to obtain the original pixel values corresponding to the share image; The recovered encrypted image is determined based on the original pixel values corresponding to all the aforementioned share images; Based on the recovered encrypted image and the preset key, the image is reverse-scrambled to obtain the recovered grayscale image.
[0092] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a reversible data hiding method for encrypted images provided by the methods described above, the method comprising: The original grayscale image is scrambled into blocks based on a preset key to obtain an encrypted image corresponding to the original grayscale image; For each image block in the encrypted image, perform polynomial secret sharing over a preset finite field on the pixel pairs in the image block to obtain multiple share images; Each of the aforementioned share images is sent to its respective data hider.
[0093] or, Acquire the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; The pixel values of the image share are converted into a binary sequence, and if all elements of the binary sequence are the same, the last bit of the binary sequence is modified to obtain a first sequence. A second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data. Perform Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence; Based on the type of the second secret data, the target bit in the third sequence is flipped to obtain the fourth sequence corresponding to the third sequence; The fourth sequence is expanded based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the tag values of the binary sequences of all the data hider ends; the tag values are determined based on the binary sequences; The fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs to sequentially convert the pixel values of the share image into the new pixel value pairs to obtain the marked share image; The marked share image is sent to the data receiver.
[0094] or, Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first subsequence and the second subsequence are determined by the data hiders based on the share images; For each of the labeled share images, the first subsequence and the second subsequence corresponding to the labeled share image are merged to obtain the first target sequence corresponding to the labeled share image; Based on the last digit of the first target sequence, auxiliary information and the length information corresponding to the auxiliary information are determined, and a position map is determined based on the auxiliary information and the length information; the last digit of the first target sequence is removed to obtain the second target sequence corresponding to the first target sequence; The second target sequence is corrected by deleting the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence. Delete the last three digits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; Based on the location map, the last position of the fourth target sequence is modified to obtain the sequence to be recovered; The sequence to be recovered is reconstructed by Lagrange interpolation to obtain the original pixel values corresponding to the share image; The recovered encrypted image is determined based on the original pixel values corresponding to all the aforementioned share images; Based on the recovered encrypted image and the preset key, the image is reverse-scrambled to obtain the recovered grayscale image.
[0095] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for reversibly hiding data in encrypted images, characterized in that, Applied to various data hider endpoints, including: Acquire the share image sent by the data owner; the share image is determined by the data owner based on the original grayscale image; The pixel values of the image share are converted into a binary sequence, and if all elements of the binary sequence are the same, the last bit of the binary sequence is modified to obtain a first sequence. A second sequence is determined based on the first sequence and a preset extension bit; the preset extension bit is used to embed the first secret data. Perform Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence; Based on the type of the second secret data, the target bit in the third sequence is flipped to obtain the fourth sequence corresponding to the third sequence; The fourth sequence is expanded based on the data to be embedded to obtain the fifth sequence corresponding to the fourth sequence; the data to be embedded includes third secret data, auxiliary information, and length information corresponding to the auxiliary information; the auxiliary information is obtained by arithmetic encoding of the position map; the position map is determined based on the tag values of the binary sequences of all the data hider ends; the tag values are determined based on the binary sequences; The fifth sequence is divided into a first subsequence and a second subsequence; and the first subsequence and the second subsequence are used as new pixel value pairs to sequentially convert the pixel values of the share image into the new pixel value pairs to obtain the marked share image; The marked share image is sent to the data receiver.
2. The reversible data hiding method for encrypted images according to claim 1, characterized in that, The step of performing Hamming encoding on the second sequence to obtain the third sequence corresponding to the second sequence includes: The first check bit, the second check bit, the third check bit, and the fourth check bit are determined based on the second sequence and the Hamming code; The first check bit, the second check bit, the third check bit, and the fourth check bit are respectively determined as the first, second, fourth, and eighth bits of the third sequence, and the remaining bits of the third sequence are determined based on the second sequence to obtain the third sequence.
3. The reversible data hiding method for encrypted images according to claim 1, characterized in that, The step of flipping the target bit in the third sequence based on the type of the second secret data to obtain the fourth sequence corresponding to the third sequence includes: When the second secret data is 1, the element with the first 1 in the third sequence is taken as the target bit and flipped to 0 to obtain the fourth sequence; When the second secret data is 0, the element with the first 0 in the third sequence is taken as the target bit and flipped to 1 to obtain the fourth sequence.
4. A method for reversibly hiding data in encrypted images, characterized in that, Applied to the data receiver end, including: Acquire labeled share images sent by multiple data hiders respectively; the labeled share images are determined by the data hiders based on the share images; the share images are determined by the data owners based on the original grayscale images; the labeled share images correspond to a first subsequence and a second subsequence; the first subsequence and the second subsequence are determined by the data hiders based on the share images; For each of the labeled share images, the first subsequence and the second subsequence corresponding to the labeled share image are merged to obtain the first target sequence corresponding to the labeled share image; Based on the last digit of the first target sequence, auxiliary information and the length information corresponding to the auxiliary information are determined, and a position map is determined based on the auxiliary information and the length information; the last digit of the first target sequence is removed to obtain the second target sequence corresponding to the first target sequence; The second target sequence is corrected by deleting the check bits in the second target sequence to obtain the third target sequence corresponding to the second target sequence. Delete the last three digits of the third target sequence to obtain the fourth target sequence corresponding to the third target sequence; Based on the location map, the last position of the fourth target sequence is modified to obtain the sequence to be recovered; The sequence to be recovered is reconstructed by Lagrange interpolation to obtain the original pixel values corresponding to the share image; The recovered encrypted image is determined based on the original pixel values corresponding to all the aforementioned share images; Based on the recovered encrypted image and the preset key, the image is reverse-scrambled to obtain the recovered grayscale image.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the reversible data hiding method for encrypted images as described in any one of claims 1 to 4.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the reversible data hiding method for encrypted images as described in any one of claims 1 to 4.
7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the reversible data hiding method for encrypted images as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Dual encryption type reversible data hiding method of encryption domain image
CN107809644A
Encrypted image reversible data hiding method based on hybrid prediction and Huffman coding
CN115103081A
High-capacity ciphertext domain reversible information hiding method and related equipment
CN117278685A
Ciphertext domain reversible hiding method based on image secret sharing and hierarchical embedding
CN117294799A
Ciphertext domain reversible information hiding method and device based on secret image sharing
CN121531075A