Reversible watermarking method on fully encrypted image using pixel shuffling technique

By combining pixel shuffling technology with reversible watermarking, the problems of insufficient embedding amount and difficulty in guaranteeing visual quality in existing technologies are solved, achieving the effect of efficiently embedding watermark data on fully encrypted images, thereby improving image security and visual quality.

CN116205780BActive Publication Date: 2026-05-12HANGZHOU DIANZI UNIVERSITY SHANGYU INSTITUTE OF SCIENCE & ENGINEERING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIVERSITY SHANGYU INSTITUTE OF SCIENCE & ENGINEERING CO LTD
Filing Date
2023-03-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies for embedding watermarks after image encryption suffer from insufficient embedding depth and difficulty in guaranteeing the visual quality of plaintext images, thus failing to effectively protect user privacy and security.

Method used

By combining pixel shuffling technology with reversible watermarking, the image is divided into blocks and classified into usable and unusable blocks according to the pixel characteristics within each block. Watermark data is embedded in the usable blocks, and pixel shuffling technology is used for embedding and extraction to ensure image security and visual quality.

Benefits of technology

It enables efficient embedding of watermark data into fully encrypted images while maintaining the visual quality of plaintext images, thereby increasing the embedding capacity and enhancing image security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116205780B_ABST
    Figure CN116205780B_ABST
Patent Text Reader

Abstract

The application discloses a reversible watermarking method on fully encrypted images using pixel shuffle technology. First, the image owner fully encrypts the plaintext image using a stream encryption algorithm to generate an original encrypted image and upload it to the cloud; second, the watermark embedder downloads the encrypted image from the cloud and divides it into continuous 2x2 size blocks; then the watermark embedder divides each block into available blocks and unavailable blocks according to the characteristics of the pixels in the block, and uses the pixel shuffle technology to embed the encrypted watermark data into the available blocks to generate an encrypted image containing watermark data and send it to the receiver. For the receiver, the watermark data can be extracted or the plaintext image can be recovered according to different secret keys. The application combines a pixel shuffle technology with reversible watermarking, realizes efficient watermark embedding in the encrypted domain, not only inherits the high security characteristics based on fully encrypted images, but also ensures the visual quality of the recovered image while greatly improving the embedding capacity compared with other similar methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image content security in information security, and specifically relates to a reversible watermarking algorithm for fully encrypted images using pixel shuffling technology. Background Technology

[0002] With advancements in internet communication and transmission, cloud storage technology is rapidly developing. More and more users are processing their private data (such as images, videos, and text files) through cloud-based applications. However, malicious attackers may intercept and leak this private data during transmission. Therefore, how to effectively protect user privacy in the cloud has become a growing concern for scholars. Watermarking is an important cybersecurity technology that can embed watermarks or private data by utilizing the redundancy of the overlay medium. Taking images as an example, the combination of image encryption and reversible watermarking technology can be an effective solution for protecting user privacy while ensuring that transmitted data can only be extracted by legitimate recipients using specific techniques.

[0003] Reversible watermarking embedding techniques in the cryptographic domain are mainly divided into two types: pre-encryption watermarking embedding and post-encryption watermarking embedding. The difference between these two types lies in the fact that pre-encryption watermarking embedding methods require the image owner to perform complex preprocessing on the original image before encryption, which places excessive demands on the image owner, making this type of method impractical. Post-encryption watermarking embedding can be further subdivided into two types: block-based reversible watermarking embedding methods and fully encrypted reversible watermarking embedding methods. With the development of modern communication technology, fully encrypted reversible watermarking embedding methods have become a popular research direction. Besides being able to extract the embedded watermark information losslessly, fully encrypted images provide extremely high security for the original image, effectively preventing malicious users from reading or analyzing the image content. Summary of the Invention

[0004] The purpose of this invention is to provide a reversible watermarking method for fully encrypted images using pixel shuffling technology, thereby increasing the watermark embedding amount while maintaining the security of the fully encrypted image and ensuring the visual quality of the restored plaintext image.

[0005] The inventive concept of this invention is as follows: First, the image owner fully encrypts the plaintext image using a stream encryption algorithm, generating an original encrypted image which is then uploaded to the cloud. Second, the watermark embedder downloads the encrypted image from the cloud and divides it into continuous 2×2 blocks. Next, based on the characteristics of the pixels within each block, the watermark embedder divides each block into usable and unusable blocks. Then, using pixel shuffling technology, the encrypted watermark data is embedded into the usable blocks to generate an encrypted image containing the watermark data, which is then sent to the recipient. The recipient can extract the watermark data or recover the plaintext image using different keys. This invention combines a pixel shuffling technique with reversible watermarking, achieving highly efficient watermark embedding in the encrypted domain. It not only inherits the high security features of fully encrypted images but also significantly surpasses other similar methods in terms of embedding capacity while ensuring the visual quality of the recovered image.

[0006] The technical solution steps of this invention are as follows:

[0007] A method for reversible watermarking on a fully encrypted image using pixel shuffling technology, characterized by the following specific steps:

[0008] S1: The image owner uses the watermark encryption key to fully encrypt the original image to which the encrypted information is to be embedded using the stream encryption algorithm to obtain the encrypted image, and then uploads the encrypted image to the cloud;

[0009] S2: After downloading the encrypted image from the cloud, the watermark embedder first divides the encrypted image into blocks; then, it divides all blocks into two categories: usable blocks and unusable blocks, with the usable blocks further subdivided according to the characteristics of the pixels within the block.

[0010] S3: The watermark embedder, based on the segmentation results of the available blocks by block type, embeds the encrypted watermark data into each available block using pixel shuffling technology to obtain an encrypted image containing watermark data, and sends the encrypted image containing watermark data to the receiver.

[0011] S4: After receiving the encrypted image containing the watermark data, the receiver extracts the watermark data according to the pixel shuffling rules and the watermark encryption key.

[0012] S5: When the receiver needs to recover the content of the plaintext image, a complexity algorithm is used to guess the original pixel arrangement in each block of the encrypted image, and the image decryption key is used to recover the plaintext image.

[0013] Preferably, in step S1, the method by which the image owner obtains the encrypted image is as follows:

[0014] S11: The image owner uses the watermark encryption key k e Generate a random sequence S = {s} of the same size as the original image. i |s i∈[0,255], i=1,2,…,W×H}, where s i Let W represent the i-th value in the random sequence, and let W and H be the width and height of the original image, respectively.

[0015] S12: The image owner converts each value of the original image and the random sequence into binary, using the following conversion formula:

[0016]

[0017]

[0018] Where τ = 1, 2, ..., 8; p i and s i These represent the value of the i-th pixel in the original image and the i-th value in the random sequence, respectively.

[0019] S13: Perform an XOR operation on the binary values ​​of the original image and the random sequence. Then convert it back to octal, thus mapping the original image to an encrypted image, using the following formula:

[0020]

[0021]

[0022] in e represents the result of the XOR operation. i Represents the pixels converted back to octal after encryption, i = 1, 2, ..., W × H; the encrypted image consists of all e i constitute.

[0023] Preferably, in step S2, the method by which the watermark embedder segments and classifies image blocks is as follows:

[0024] S21: The watermark embedder downloads the encrypted image from the cloud and cuts the encrypted image into 2×2 non-overlapping blocks;

[0025] S22: Using the bottom right pixel of each block obtained after segmentation in S21 as the reference pixel, and the other three pixels as the pixels to be embedded, if the three pixels to be embedded are equal, the block is classified as an unusable block; otherwise, the block is classified as a usable block.

[0026] S23: Sort the three pixels to be embedded in each available block obtained in S22, and subdivide each available block into three categories according to the characteristics of the three pixels to be embedded in the block. The first type of available block satisfies the characteristic that the three pixels to be embedded are all different. The second type of available block satisfies the characteristic that the two largest pixels to be embedded are the same. The third type of available block satisfies the characteristic that the two smallest pixels to be embedded are the same.

[0027] Preferably, in step S3, the watermark embedder performs watermark embedding using pixel shuffling based on the block type subdivision results of available blocks, as follows:

[0028] S31: The watermark embedder uses the watermark key k h Encryption requires embedded watermark data to form encrypted watermark data;

[0029] S32: Based on the different types of available blocks obtained in S2, the watermark embedder uses pixel shuffling technology to sequentially embed encrypted watermark data of different lengths into the available blocks. The pixel shuffling rule used when embedding watermark data into each available block is as follows:

[0030] Based on the block type of the currently available blocks, keep the pixel within the block (excluding the bottom right reference pixel) unchanged, and perform the embedding of encrypted watermark data on the first three pixel positions within the block (excluding the bottom right reference pixel):

[0031] If the current available block belongs to the first available block type, the watermark embedder first selects the largest pixel to be embedded and fills it into one of the first three positions in the block. The three positions that the largest pixel to be embedded can choose correspond to the watermark data to be embedded as 0, 10, and 11, respectively. Then, the watermark embedder selects the smallest pixel to be embedded and fills it into one of the remaining two positions in the block. The two positions that the smallest pixel to be embedded can choose correspond to the watermark data to be embedded as 0 and 1, respectively. Finally, the watermark embedder fills the second largest pixel to be embedded into the last position in the block.

[0032] If the current available block belongs to the second or third available block type, then two of the three pixels to be embedded in the current block are the same; the watermark embedder takes out the pixel to be embedded that is different from the other two and fills it into one of the first three positions in the block. The three optional filling positions represent the watermark data to be embedded as 0, 10, and 11, respectively; then, the watermark embedder fills the remaining two identical pixels to be embedded into the remaining two positions in the block.

[0033] S33: After embedding the watermark data of all blocks in the encrypted image, the encrypted image containing the watermark data is obtained. The watermark embedder sends the encrypted image containing the watermark to the receiver.

[0034] Preferably, in step S4, the receiver extracts the watermark data according to the pixel shuffling rules and the watermark encryption key as follows:

[0035] S41: After the receiver receives the encrypted image containing watermarked data, it first cuts the image into 2×2 blocks that do not overlap.

[0036] S42: Based on the first three pixels in each block excluding the bottom right corner, classify each block using the classification rules in S22 and S23 to obtain the block type subdivision result for each available block;

[0037] S43: Traverse each block in the encrypted image and extract the watermark data within each block according to the block type of the currently available blocks:

[0038] If the current available block is an available block belonging to the first available block type, the receiver extracts the watermark data in the block according to the position of the largest and smallest pixels among the first three pixels in the block, based on the pixel shuffling rules used in S32.

[0039] If the current available block is an available block of the second or third available block type, the receiver extracts the watermark data embedded in the block based on the pixel shuffling rules used in S32 and the position of the pixel that is different from the other two in the first three pixels.

[0040] S44: After the receiver extracts all the watermark data from the encrypted image, it uses the watermark key k h Restore the original watermark data.

[0041] Preferably, in step S5, the receiver recovers the plaintext image using the following method:

[0042] S51: The receiver cuts both the encrypted image and the random sequence into 2×2 blocks that do not overlap.

[0043] S52: For each unusable block obtained in S51, the current block is directly restored to a plaintext block using a random sequence. The restoration formula is as follows:

[0044]

[0045]

[0046] in This represents the λth decrypted pixel within the block. This represents the value of the λ-th pixel in the block with position index (i,j) in the encrypted image. Represents the random sequence with The corresponding random sequence value, D i,j This represents the decrypted block with block position index (i,j);

[0047] S53: For each available block obtained in S51, the receiver lists all possible arrangements of the first three pixels within the block and restores them using formula (6) or formula (7) respectively. Finally, the complexity of each arrangement is calculated, and the formula is as follows:

[0048]

[0049]

[0050] in This is the complexity formula for the first row and first column block of the encrypted image. This is the complexity formula for all remaining blocks;

[0051] After restoring all the positions in the currently available block and calculating the complexity of each arrangement, the receiver selects the arrangement with the lowest complexity as the final restoration result of the block.

[0052] S55: After restoring all the blocks in the encrypted image, the receiver can obtain the restored plaintext image.

[0053] Preferably, the original image is a grayscale image.

[0054] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows:

[0055] Under the premise of ensuring the security of encrypted images, this invention proposes a reversible watermarking method on fully encrypted images using pixel shuffling technology. The main beneficial effects are as follows: (1) Using fully encrypted images as carriers fully guarantees the security of images and has higher practical value; (2) Compared with other existing related works, the solution of this invention has superior performance, far exceeding other existing technical methods in terms of embedding capacity, and can also provide high visual quality of restored plaintext images. Attached Figure Description

[0056] Figure 1 This is a flowchart of the present invention.

[0057] Figure 2 The effect of embedding a watermark in an image.

[0058] Figure 3 The images show the effects of this invention in two databases.

[0059] Figure 4 This is a safety analysis diagram of the present invention. Detailed Implementation

[0060] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0061] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings:

[0062] In a preferred embodiment of the present invention, a reversible watermarking method for fully encrypted images using pixel shuffling technology is provided, which enables direct communication between the image owner, the watermark embedder, and the receiver. The specific steps are as follows:

[0063] S1: The image owner uses the watermark encryption key to fully encrypt the original image to which the encrypted information is to be embedded using a stream encryption algorithm to obtain an encrypted image, and then uploads the encrypted image to the cloud.

[0064] In this embodiment, the original image used as the encryption carrier is selected as a grayscale image with a size of 512×512 pixels.

[0065] In this embodiment, the method by which the image owner obtains the encrypted image is as follows:

[0066] S11: The image owner uses the watermark encryption key k e Generate a random sequence S = {s} of the same size as the original image. i |s i ∈[0,255], i=1,2,…,W×H}, where s i Let W represent the i-th value in the random sequence, and let W and H be the width and height of the original image, respectively.

[0067] S12: The image owner converts each value of the original image and the random sequence into binary, using the following conversion formula:

[0068]

[0069]

[0070] Where τ = 1, 2, ..., 8; p i and s i These represent the value of the i-th pixel in the original image and the i-th value in the random sequence, respectively.

[0071] S13: Perform an XOR operation on the binary values ​​of the original image and the random sequence. Then convert it back to octal, thus mapping the original image to an encrypted image, using the following formula:

[0072]

[0073]

[0074] in e represents the result of the XOR operation. i Represents the pixels converted back to octal after encryption, i = 1, 2, ..., W × H; the encrypted image consists of all e i constitute.

[0075] S2: After downloading the encrypted image from the cloud, the watermark embedder first divides the encrypted image into blocks; then it divides all blocks into two categories: usable blocks and unusable blocks. The usable blocks are further subdivided into three types based on the characteristics of the pixels within the block.

[0076] In this embodiment, the watermark embedder uses the following method to segment and classify image blocks:

[0077] S21: The watermark embedder downloads the encrypted image from the cloud and cuts the encrypted image into 2×2 non-overlapping blocks;

[0078] S22: Using the bottom right pixel of each block obtained after the segmentation in S21 as the reference pixel, the remaining three pixels (top left pixel, top right pixel, bottom left pixel) are the pixels to be embedded. If the three pixels to be embedded are equal, the block is classified as an unusable block; otherwise, the block is classified as a usable block.

[0079] S23: Sort the three pixels to be embedded in each available block obtained in S22 in ascending order (sorting is to facilitate the determination of the size of the three), and subdivide each available block into three categories according to the characteristics of the three pixels to be embedded in the block. The first type of available block satisfies the characteristic that the three pixels to be embedded are all different. The second type of available block satisfies the characteristic that the two largest pixels to be embedded are the same. The third type of available block satisfies the characteristic that the two smallest pixels to be embedded are the same.

[0080] S3: The watermark embedder, based on the segmentation results of the available blocks by block type, embeds the encrypted watermark data into each available block using pixel shuffling technology to obtain an encrypted image containing the watermark data, and sends the encrypted image containing the watermark data to the receiver.

[0081] In this embodiment, the watermark embedder performs watermark embedding using pixel shuffling based on the segmentation results of available blocks according to block type.

[0082] S31: The watermark embedder uses the watermark key k h Encryption requires embedded watermark data to form encrypted watermark data.

[0083] S32: Based on the different types of available blocks obtained in S2, the watermark embedder uses pixel shuffling technology to sequentially embed encrypted watermark data of different lengths into the available blocks. The pixel shuffling rule used when embedding watermark data into each available block is as follows:

[0084] Based on the block type of the currently available blocks, keeping the bottom right reference pixel within the block unchanged, embed the encrypted watermark data into the first three pixel positions (top left, top right, and bottom left pixels, from front to back):

[0085] If the current available block belongs to the first available block type, the watermark embedder first selects the largest pixel to be embedded and fills it into one of the first three positions in the block. The three positions that the largest pixel to be embedded can choose correspond to the watermark data to be embedded as 0, 10, and 11, respectively. Then, the watermark embedder selects the smallest pixel to be embedded and fills it into one of the remaining two positions in the block. The two positions that the smallest pixel to be embedded can choose correspond to the watermark data to be embedded as 0 and 1, respectively. Finally, the watermark embedder fills the second largest pixel to be embedded into the last position in the block.

[0086] If the current available block belongs to the second or third available block type, then two of the three pixels to be embedded in the current block are the same; the watermark embedder takes out the pixel to be embedded that is different from the other two and fills it into one of the first three positions in the block. The three optional filling positions represent the watermark data to be embedded as 0, 10, and 11, respectively; then, the watermark embedder fills the remaining two identical pixels to be embedded into the remaining two positions in the block.

[0087] It should be noted that when performing watermark embedding, the specific position of the three available positions for the largest pixel to be embedded—which corresponds to 0, which to 10, and which to 11—can be selected based on the actual situation, ensuring a unique mapping result. Similarly, the specific position of the two available positions for the smallest pixel to be embedded—which corresponds to 0 and which to 1—can also be selected based on the actual situation, ensuring a unique mapping result. In this embodiment, among the three available positions for the largest pixel to be embedded, the top-left, top-right, and bottom-left pixels can correspond to 0, 10, and 11 respectively, while among the two available positions for the smallest pixel to be embedded, the earlier position represents 0, and the later position represents 1. Thus, within a usable block, the positions of the largest and smallest pixels to be embedded can be used to embed watermark data of their respective bit lengths.

[0088] S33: After embedding the watermark data of all blocks in the encrypted image, the encrypted image containing the watermark data is obtained. The watermark embedder sends the encrypted image containing the watermark to the receiver.

[0089] S4: After receiving the encrypted image containing the watermark data, the receiver extracts the watermark data according to the pixel shuffling rules and the watermark encryption key.

[0090] In this embodiment, the receiver extracts the watermark data according to the pixel shuffling rules and the watermark encryption key as follows:

[0091] S41: After the receiver receives the encrypted image containing watermarked data, it first cuts the image into 2×2 blocks that do not overlap.

[0092] S42: Based on the first three pixels of each block excluding the bottom right corner, classify each block using the classification rules in S22 and S23 to obtain the block type subdivision result for each available block.

[0093] It should be noted that in the watermark data embedding process of step S3 mentioned above, it is equivalent to only moving the position of the first three pixels in the available block, but without introducing new pixel values. Therefore, each block can still be classified as available and unavailable blocks according to step S22, and the available blocks can be further subdivided according to step S23.

[0094] S43: Traverse each block in the encrypted image and extract the watermark data within each block according to the block type of the currently available blocks:

[0095] If the current available block is an available block of the first available block type, the receiver extracts the watermark data in the block according to the position of the largest and smallest pixels among the first three pixels in the block, based on the pixel shuffling rules used in S32.

[0096] If the current available block is an available block of the second or third available block type, the receiver extracts the watermark data embedded in the block based on the pixel shuffling rules used in S32, according to the position of the first three pixels that are different from the other two.

[0097] S44: After the receiver extracts all the watermark data from the encrypted image, it uses the watermark key k h Restore the original watermark data.

[0098] It should be noted that the process by which the receiver extracts the watermark data within a block based on the positions of the largest and smallest pixels is actually the reverse process of embedding watermark data in step S3 mentioned above. The receiver only needs to know the pixel shuffling rules used by the watermark embedder when embedding watermark data in each available block to re-extract the embedded watermark data.

[0099] S5: When the receiver needs to recover the content of the plaintext image, a complexity algorithm is used to guess the original pixel arrangement in each block of the encrypted image, and the image decryption key is used to recover the plaintext image.

[0100] In this embodiment, the method for the receiver to recover the plaintext image is as follows:

[0101] S51: The receiver cuts both the encrypted image and the random sequence into 2×2 blocks that do not overlap.

[0102] S52: For each unusable block obtained in S51, the current block is directly restored to a plaintext block using a random sequence. The restoration formula is as follows:

[0103]

[0104]

[0105] in This represents the λth decrypted pixel within the block. This represents the value of the λ-th pixel in the block with position index (i,j) in the encrypted image. Represents the random sequence with The corresponding random sequence value, D i,j This represents the decrypted block with block position index (i,j);

[0106] S53: For each usable block obtained in S51, the receiver lists all possible arrangements of the first three pixels within the block. Specifically: For the first usable block type, the first three pixels (top-left pixel, top-right pixel, bottom-left pixel) have a total of... There are several arrangement methods; for the second and third available block types, the first three pixels (top left pixel, top right pixel, bottom left pixel) have a total of There are several arrangement methods. After obtaining all the possible arrangements of the first three pixels within the block, they can be restored using formula (6) or formula (7) respectively. Finally, the complexity of each arrangement method is calculated, and the formula is as follows:

[0107]

[0108]

[0109] in This is the complexity formula for the first row and first column block of the encrypted image. This is the complexity formula for all remaining blocks;

[0110] After restoring all the positions in the currently available block and calculating the complexity of each arrangement, the receiver selects the arrangement with the lowest complexity as the final restoration result of the block.

[0111] S55: After restoring all the blocks in the encrypted image, the receiver can obtain the restored plaintext image.

[0112] It should be noted that in the process of restoring the plaintext image based on the complexity algorithm described above, the reference pixel in the lower right corner of each block is used. Since the value of the reference pixel in the encrypted image is unchanged relative to the original image, introducing the reference pixel into the calculation during the restoration process can improve the accuracy of the restoration.

[0113] In this embodiment, following the aforementioned steps S1-S5, the image owner encrypts the image, the watermark embedder obtains the encrypted image, and the receiver receives the encrypted image containing watermark information, extracts the watermark information, and recovers the plaintext image. The specific results are shown below:

[0114] i. Performance Analysis

[0115] Figure 2 Using a teddy bear as an example, the results are shown after embedding a 0.34bpp confidential QR code watermark. Figure 2 (a) is the binary watermark image to be embedded. Figure 2 (b) is the original image, (c) is the encrypted image, (d) is the encrypted image with the embedded watermark, and (e) and (f) are the extracted lossless watermark and the restored plaintext image, respectively. Clearly, the encrypted image does not retain any useful information from the plaintext image, and the encrypted image with the watermark does not expose any watermark information, making it impossible for attackers to decipher any useful information. Table 1 shows a comparison of the embedding amount between this invention and some recent similar methods; it can be seen that the embedding amount of this invention far surpasses that of other methods.

[0116] Table 1 Comparison results of the present invention with other methods

[0117]

[0118] The methods described above [1] to [4] are existing technologies. For details, please refer to the following existing technology documents:

[0119] [1]H.Ge, Y.Chen, Z.Qian, J.Wang, "A high capacity multi-level approach for reversible data hiding in encrypted images." IEEE Transactions on Circuitsand Systems for Video Technology, vol.29, no.8, pp.2285–2295, 2018.

[0120] [2] R.Bhardwaj, A.Aggarwal, "An improved block based joint reversibledata hiding in encrypted images by symmetric cryptosystem." PatternRecognition Letters, vol.139, pp.60-68, 2020.

[0121] [3]

[0122] [4] MJYu, H.Yao, and C.Qin "Reversible data hiding in encrypted images without additional information transmission." Signal Processing: ImageCommunication, vol.105, pp.116696, 2022.

[0123] Figure 3 Table 2 shows the test results of this invention on 100 randomly selected images from two publicly available databases. As can be seen from the figures, the quality of the restored plaintext images is very high (greater than 35dB), indicating that this invention can still recover extremely high-quality plaintext images even after embedding a large amount of watermark information. Finally, Table 2 lists the average embedding rate of this invention in the test images of the two databases. It can be seen that the average embedding rate of this invention is higher than 0.642bpp. These results fully demonstrate the practicality of this invention and its superiority compared to other methods.

[0124] Table 2 Embedding rate of the invention on two databases

[0125]

[0126] ii. Security Analysis

[0127] Figure 4 Taking an airplane as an example, the pixel histogram distribution of this invention at different stages is illustrated. (a1) is the original image, (b1) is the encrypted image, (c1) is the encrypted image with watermark information, (d1) is the plaintext image restored after watermark extraction, (a2-d2) are the pixel histograms of a1-d1, and (a3-d3) are the pixel distribution maps of a1-d1. The pixel values ​​of the original image and the restored plaintext image are continuously distributed, while the pixel distribution in the encrypted image and the watermarked encrypted image is disordered and uniform, which enhances security.

[0128] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. A method for reversible watermarking on a fully encrypted image using pixel shuffling technology, characterized in that, The specific steps are as follows: S1: The image owner uses the watermark encryption key to fully encrypt the original image to which the encrypted information is to be embedded using the stream encryption algorithm to obtain the encrypted image, and then uploads the encrypted image to the cloud; S2: After downloading the encrypted image from the cloud, the watermark embedder first divides the encrypted image into blocks; then, all blocks are divided into two categories: usable blocks and unusable blocks, with the usable blocks further subdivided according to the characteristics of the pixels within the block. S3: The watermark embedder, based on the block type subdivision results of the available blocks, embeds the encrypted watermark data into each available block using pixel shuffling technology to obtain an encrypted image containing the watermark data, and sends the encrypted image containing the watermark data to the receiver; wherein, the method by which the watermark embedder performs watermark embedding using pixel shuffling technology based on the block type subdivision results of the available blocks is as follows: S31: The watermark embedder uses the watermark key Encryption requires embedded watermark data to form encrypted watermark data; S32: Based on the different types of available blocks obtained in S2, the watermark embedder uses pixel shuffling technology to sequentially embed encrypted watermark data of different lengths into the available blocks. The pixel shuffling rule used when embedding watermark data into each available block is as follows: Based on the block type of the currently available blocks, keep the pixel within the block (excluding the bottom right reference pixel) unchanged, and perform the embedding of encrypted watermark data on the first three pixel positions within the block (excluding the bottom right reference pixel): If the current available block belongs to the first available block type, the watermark embedder first selects the largest pixel to be embedded and fills it into one of the first three positions in the block. The three positions that the largest pixel to be embedded can choose correspond to the watermark data to be embedded as 0, 10, and 11, respectively. Then, the watermark embedder selects the smallest pixel to be embedded and fills it into one of the remaining two positions in the block. The two positions that the smallest pixel to be embedded can choose correspond to the watermark data to be embedded as 0 and 1, respectively. Finally, the watermark embedder fills the second largest pixel to be embedded into the last position in the block. If the current available block belongs to the second or third available block type, then two of the three pixels to be embedded in the current block are the same; the watermark embedder takes out the pixel to be embedded that is different from the other two and fills it into one of the first three positions in the block. The three optional filling positions represent the watermark data to be embedded as 0, 10, and 11 respectively; then, the watermark embedder fills the remaining two identical pixels to be embedded into the remaining two positions in the block. S33: After embedding the watermark data of all blocks in the encrypted image, the encrypted image containing the watermark data is obtained. The watermark embedder sends the encrypted image containing the watermark to the receiver. S4: After receiving the encrypted image containing the watermark data, the receiver extracts the watermark data according to the pixel shuffling rules and the watermark encryption key. S5: When the receiver needs to recover the content of the plaintext image, a complexity algorithm is used to guess the original pixel arrangement in each block of the encrypted image, and the image decryption key is used to recover the plaintext image.

2. The reversible watermarking method for fully encrypted images using pixel shuffling technology according to claim 1, characterized in that, In step S1, the method by which the image owner obtains the encrypted image is as follows: S11: The image owner uses the watermark encryption key. Generate a random sequence of the same size as the original image. ,in Let W represent the i-th value in the random sequence, and let W and H be the width and height of the original image, respectively. S12: The image owner converts each value of the original image and the random sequence into binary, using the following conversion formula: in ; and They represent the first two digits in the original image. The pixel value and the th pixel in the random sequence One value; S13: Perform an XOR operation on the binary values ​​of the original image and the random sequence. Then convert it back to octal, thus mapping the original image to an encrypted image, using the following formula: in This represents the result of the XOR operation. Represents pixels converted back to octal after encryption. ; Encrypted images are from all constitute.

3. The reversible watermarking method for a fully encrypted image using pixel shuffling technology according to claim 2, characterized in that, In step S2, the watermark embedder performs image block segmentation and classification using the following method: S21: The watermark embedder downloads an encrypted image from the cloud and cuts the encrypted image into... Blocks of a certain size that do not overlap; S22: Using the bottom right pixel of each block obtained after segmentation in S21 as the reference pixel, and the other three pixels as the pixels to be embedded, if the three pixels to be embedded are equal, the block is classified as an unusable block; otherwise, the block is classified as a usable block. S23: Sort the three pixels to be embedded in each available block obtained in S22, and subdivide each available block into three categories according to the characteristics of the three pixels to be embedded in the block. The first type of available block satisfies the characteristic that the three pixels to be embedded are all different. The second type of available block satisfies the characteristic that the two largest pixels to be embedded are the same. The third type of available block satisfies the characteristic that the two smallest pixels to be embedded are the same.

4. The reversible watermarking method for a fully encrypted image using pixel shuffling technology according to claim 1, characterized in that, In step S4, the receiver extracts the watermark data according to the pixel shuffling rules and the watermark encryption key as follows: S41: After the receiver receives the encrypted image containing the watermarked data, it first cuts the image into... Blocks of a certain size that do not overlap; S42: Based on the first three pixels in each block excluding the bottom right corner, classify each block using the classification rules in S22 and S23 to obtain the block type subdivision result for each available block; S43: Traverse each block in the encrypted image and extract the watermark data within each block according to the block type of the currently available blocks: If the current available block is an available block belonging to the first available block type, the receiver extracts the watermark data in the block according to the position of the largest and smallest pixels among the first three pixels in the block, based on the pixel shuffling rules used in S32. If the current available block is an available block of the second or third available block type, the receiver extracts the watermark data embedded in the block based on the pixel shuffling rules used in S32 and the position of the pixel that is different from the other two in the first three pixels. S44: After the receiver extracts all the watermark data from the encrypted image, they use the watermark key. Restore the original watermark data.

5. The reversible watermarking method for a fully encrypted image using pixel shuffling technology according to claim 4, characterized in that, In step S5, the method by which the receiver recovers the plaintext image is as follows: S51: The receiver cuts both the encrypted image and the random sequence into... Blocks of a certain size that do not overlap; S52: For each unusable block obtained in S51, the current block is directly restored to a plaintext block using a random sequence. The restoration formula is as follows: in Represents the first in the block Each decrypted pixel, The location index in the encrypted image is The first block pixel value, Represents the random sequence with The corresponding random sequence value, The representative block location index is The decryption block; S53: For each available block obtained in S51, the receiver lists all possible arrangements of the first three pixels within the block and restores them using formula (7) or formula (8) respectively. Finally, the complexity of each arrangement is calculated, and the formula is as follows: in This is the complexity formula for the first row and first column block of the encrypted image. This is the complexity formula for all remaining blocks; After restoring all the positions in the currently available block and calculating the complexity of each arrangement, the receiver selects the arrangement with the lowest complexity as the final restoration result of the block. S55: After restoring all the blocks in the encrypted image, the receiver can obtain the restored plaintext image.

6. The reversible watermarking method for a fully encrypted image using pixel shuffling technology according to claim 1, characterized in that, The original image is a grayscale image.