Search

CN-116205780-B - Reversible watermarking method on fully encrypted images using pixel shuffling technique

CN116205780BCN 116205780 BCN116205780 BCN 116205780BCN-116205780-B

Abstract

The invention discloses a reversible watermarking method on a fully encrypted image using pixel shuffling technology. Firstly, the image owner carries out complete encryption on a plaintext image by using a stream encryption algorithm to generate an original encrypted image and uploads the original encrypted image to a cloud end, secondly, the watermark embedder downloads the encrypted image from the cloud end and divides the encrypted image into blocks with the size of 2 multiplied by 2 continuously, then the watermark embedder divides each block into usable blocks and unusable blocks according to the characteristics of pixels in the blocks, and then the pixel shuffling technology is used for embedding the encrypted watermark data into the usable blocks to generate an encrypted image containing the watermark data and transmitting the encrypted image to a receiver. For the receiver, watermark data may be extracted or the plaintext image may be recovered from different keys. The invention combines a pixel shuffling technology and reversible watermarking, realizes the efficient watermark embedding of an encryption domain, inherits the characteristic of high security based on a completely encrypted image, and ensures the visual quality of a recovered image and is far higher than other similar methods in embedding quantity.

Inventors

  • GAO JIE
  • ZHANG JINGQUN
  • ZHANG ZHENCHENG
  • YUAN WENQIANG

Assignees

  • 杭州电子科技大学上虞科学与工程研究院有限公司

Dates

Publication Date
20260512
Application Date
20230310

Claims (6)

  1. 1. A reversible watermarking method on a fully encrypted image using pixel shuffling technology, characterized by the specific steps of: S1, an image owner uses a watermark encryption key to completely encrypt an original image to be embedded with encryption information by using a stream encryption algorithm to obtain an encryption image, and uploads the encryption image to a cloud; S2, after the watermark embedder downloads the encrypted image from the cloud, firstly dividing the encrypted image into blocks, and then dividing all the blocks into usable blocks and unusable blocks, wherein the usable blocks are further subdivided according to the characteristics of pixels in the blocks; And S3, embedding the encrypted watermark data into each available block by the watermark embedder according to the block type subdivision result of the available block by using a pixel shuffling technology to obtain an encrypted image containing the watermark data, and sending the encrypted image containing the watermark data to a receiver, wherein the watermark embedder carries out watermark embedding by using the pixel shuffling technology according to the block type subdivision result of the available block as follows: S31, watermark embedder uses watermark key Encrypting watermark data to be embedded to form encrypted watermark data; S32, according to the available blocks of different types obtained in the S2, sequentially embedding the encrypted watermark data of different lengths into the available blocks by a watermark embedder by using a pixel shuffling technology, wherein a pixel shuffling rule adopted when embedding the watermark data into each available block is as follows: according to the block type of the currently available block, keeping the reference pixels except for the lower right corner in the block motionless, and embedding the encrypted watermark data in the first three pixel positions except for the reference pixels in the lower right corner in the block: If the current available block belongs to the first available block type, the watermark embedder firstly selects the largest pixel to be embedded and fills the pixel to be embedded into one of the first three positions in the block, wherein the three selectable filling positions of the largest pixel to be embedded respectively represent 0, 10 and 11 of watermark data to be embedded in a one-to-one correspondence manner; if the current available block belongs to the second available block type or the third available block type, two of the three pixels to be embedded in the current block are identical, the watermark embedder takes out the pixels to be embedded which are different from the other two pixels and fills the pixels to be embedded into one of the first three positions in the block, and the three optional filling positions respectively represent that watermark data to be embedded is 0,10,11; S33, obtaining an encrypted image containing watermark data after watermark data of all blocks in the encrypted image are embedded, and sending the encrypted image containing the watermark to a receiver by a watermark embedder; s4, after receiving the encrypted image containing watermark data, the receiver extracts the watermark data according to the rule of pixel shuffling and the watermark encryption key; And S5, when the receiver needs to recover the content of the plaintext image, using a complexity algorithm to guess the original pixel arrangement mode in each block of the encrypted image, and using the image decryption key to recover the plaintext image.
  2. 2. The reversible watermarking method on fully encrypted images using pixel shuffling technique according to claim 1, wherein in S1 the image owner gets the encrypted image as follows: S11, image owner uses watermark encryption key Generating random sequences of the same size as the original Wherein Representing the ith value in the random sequence, W and H are the width and height of the original image respectively; S12, converting each value of the original image and the random sequence into binary by the image owner, wherein the conversion formula is as follows: Wherein the method comprises the steps of ; And Respectively represent the first in the original picture The pixel value and the first in the random sequence A value; s13, performing exclusive OR operation on the original image and the binary values of the random sequence And converted back to 8-ary, thereby mapping the original image to an encrypted image, the formula of which is as follows: Wherein the method comprises the steps of Representing the result of the exclusive-or operation, Representing pixels converted back to 8-ary after encryption The encrypted image is composed of all The composition is formed.
  3. 3. The reversible watermarking method on fully encrypted images using pixel shuffling technique according to claim 2, wherein in S2 the method of blocking and classifying image blocks by the watermark embedder is as follows: S21, the watermark embedder downloads the encrypted image from the cloud and cuts the encrypted image into pieces Blocks of size and non-overlapping each other; s22, taking the pixel at the right lower corner of each block obtained by segmentation in S21 as a reference pixel, taking the other three pixels as pixels to be embedded, and classifying the block as an unavailable block if the three pixels to be embedded are equal; s23, sorting three pixels to be embedded of each available block obtained in S22, subdividing each available block into three classes according to characteristics of three pixels to be embedded in the block, wherein the characteristics met by the first available block type are different from each other, the characteristics met by the second available block type are the same as the two largest pixels to be embedded, and the characteristics met by the third available block type are the same as the two smallest pixels to be embedded.
  4. 4. The reversible watermarking method on fully encrypted images using pixel shuffling technique according to claim 1, wherein in S4, the method for extracting watermark data by the receiver according to the rules of pixel shuffling and watermark encryption key is as follows: S41, after the receiver receives the encrypted image containing watermark data, the image is cut into pieces Blocks of size and non-overlapping each other; s42, classifying each block according to the first three pixels except for the right lower corner position in each block by using the classification rules in S22 and S23 to obtain a block type subdivision result of each available block; S43, traversing each block in the encrypted image, and performing extraction of the intra-block watermark data according to the block type of the currently available block in a classified manner: if the current available block is an available block belonging to the first available block type, the receiver extracts watermark data in the block according to the positions of the maximum and minimum pixels in the first three pixels in the block based on the pixel shuffling rule adopted in S32; If the current available block is an available block belonging to the second available block type or the third available block type, the receiver extracts watermark data embedded in the block according to the positions of pixels different from the other two pixels in the first three pixels based on the pixel shuffling rule adopted in S32; S44, after the receiver extracts all watermark data in the encrypted image, the watermark key is used The original watermark data is restored.
  5. 5. The reversible watermarking method on fully encrypted images using pixel shuffling technique according to claim 4, wherein in S5 the method for recipient recovery of plaintext images is as follows: S51, the receiver cuts the encrypted image and the random sequence into pieces Blocks of size and non-overlapping each other; s52, for each unavailable block obtained in S51, directly recovering the current block into a plaintext block by using a random sequence, wherein the recovery formula is as follows: Wherein the method comprises the steps of Representing the first in a block The number of the pixels to be decrypted, Representing position index in encrypted image as In block (f) The value of the pixel is determined by the pixel value, Representing the sum in the random sequence The value of the corresponding random sequence is chosen, Representing block position index as Is a decryption block of (a); S53, for each available block obtained in S51, the receiver lists all the arrangement modes of the first three pixels in the block, and respectively restores the arrangement modes by using a formula (7) or a formula (8), and finally calculates the complexity of each arrangement mode, wherein the formula is as follows: Wherein the method comprises the steps of Is for the complexity formula located at the first row and first column of blocks of the encrypted image, Complexity formulas for all the remaining blocks; the method comprises the steps that all position arrangement modes in a currently available block are restored, after the complexity of each arrangement mode is calculated, a receiver selects an arrangement mode with the minimum complexity to be directly used as a final restoration result of the block; and S55, after all the blocks in the encrypted image are restored, the receiver can obtain the restored plaintext image.
  6. 6. The reversible watermarking method on fully encrypted images using pixel shuffling technique according to claim 1, wherein the artwork is a greyscale image.

Description

Reversible watermarking method on fully encrypted images using pixel shuffling technique Technical Field The invention belongs to the field of image content security of information security, and particularly relates to a reversible watermarking algorithm of a pixel shuffling technology on a completely encrypted image. Background With the progress of internet communication and transmission, cloud storage technology is rapidly developing. More and more users handle their private data (e.g., images, video, text files) through cloud-based applications. However, some malicious attackers may intercept and reveal these private data during transmission. Therefore, how to effectively protect the privacy of users in the cloud has become a concern for more and more students. Watermark embedding is an important network security technique that can embed watermarks or private data by exploiting the redundancy of the overlay medium. Taking an image as an example, the combination of image encryption and reversible watermarking techniques can be an effective solution to protect user privacy while enabling the transmission of data that can only be extracted by the legitimate recipient through a specific technique. The reversible watermark embedding technology in the encryption domain is mainly divided into two types, namely watermark embedding before encryption and watermark embedding after encryption. The two types differ in that the method of watermark embedding before encryption requires a complex pre-processing of the original image by the image owner before encryption, which is too demanding for the image owner, so that such a method is not practical. The watermark embedding after encryption can be subdivided into two types, namely a reversible watermark embedding method based on block encryption and a reversible watermark embedding method based on complete encryption. With the development of modern communication technology, a reversible watermark embedding method based on complete encryption becomes a popular research direction. Besides the capability of nondestructively extracting the embedded watermark information, the fully encrypted image provides extremely high security for original pictures, and can effectively prevent malicious users from reading or analyzing the content of the image. Disclosure of Invention The invention aims to provide a reversible watermarking method on a fully encrypted image by using a pixel shuffling technology, so that the embedding amount of the watermark is improved while the visual quality of a restored plaintext image is ensured under the condition of keeping the safety of the fully encrypted image. The invention is characterized in that firstly, an image owner completely encrypts a plaintext image by using a stream encryption algorithm to generate an original encrypted image and uploads the original encrypted image to a cloud end, secondly, a watermark embedder downloads the encrypted image from the cloud end and divides the encrypted image into blocks with the size of 2 multiplied by 2, then the watermark embedder divides each block into usable blocks and unusable blocks according to the characteristics of pixels in the blocks, and then the encrypted watermark data is embedded into the usable blocks by using a pixel shuffling technology to generate an encrypted image containing watermark data and sent to a receiver. For the receiver, watermark data may be extracted or the plaintext image may be recovered from different keys. The invention combines a pixel shuffling technology and reversible watermarking, realizes the efficient watermark embedding of an encryption domain, inherits the characteristic of high security based on a completely encrypted image, and ensures the visual quality of a recovered image and is far higher than other similar methods in embedding quantity. The technical scheme of the invention comprises the following steps: a reversible watermarking method on a fully encrypted image using pixel shuffling technology, characterized by the specific steps of: S1, an image owner uses a watermark encryption key to completely encrypt an original image to be embedded with encryption information by using a stream encryption algorithm to obtain an encryption image, and uploads the encryption image to a cloud; S2, after the watermark embedder downloads the encrypted image from the cloud, firstly dividing the encrypted image into blocks, and then dividing all the blocks into usable blocks and unusable blocks, wherein the usable blocks are further subdivided according to the characteristics of pixels in the blocks; S3, embedding the encrypted watermark data into each available block by the watermark embedder according to the block type subdivision result of the available block through a pixel shuffling technology to obtain an encrypted image containing the watermark data, and sending the encrypted image containing the watermark data to a receiver; s4, after receiving the encrypted