摘 要 ：目的 现有水印算法大多是基于明文域的，很容易被入侵、窃取。为了保护用户隐私、提高安全性，本文提出了一种用于盗版追踪的基于格雷码加密域的可逆水印方案，该方案支持对密文直接操作。方法 该方案首先提出了基于格雷码的同态加密系统(Homomorphic Encrypted System based on Gray Code, HESGC)，并以此加密载体图像；然后依据整数小波变换(Integer Wavelet Transform, IWT)和人类视觉系统(Human Visual System, HVS)特性，将图像分区并合理分类；再依据新提出的算法完成嵌入、可逆恢复及提取工作；最后利用首次提出的水印追踪联合(Joint Watermarking and Tracing, JWT)策略来进行盗版追踪。结果 为了验证本方案，选取USC-SIPI图像库中的6幅经典图作为标准测试图像，与其他可逆水印算法相比，本文具有更高的PSNR值，PSNR高达50dB，而且SSIM值均为1，实现了可逆功能。此外，本文新提出的HESGC将使原始载体图像膨胀为原来的8倍，故容量较大。理论上，本文最大容量为3.75 bpp，目前大多可逆水印算法的最大容量不足1bpp。同时，本方案不仅实现了盗版追踪功能，而且能够抵抗一些常见的攻击，如随机噪声、中值滤波、图像平滑和JPEG编码、LZW编码和卷积模糊等。通过比较原始追踪证明与攻击后图像的追踪证明可知，相似度在1左右的即为盗版者，其他非盗版者的相似度都远远低于1，大部分在0.6左右。结论 本文提出了一种基于密文域的可逆水印方案，首次提出了HESGC和JWT，实现了密文域可逆水印技术和盗版追踪功能。该方案直接采用灰度图像作为水印图像，解除了以往以二值图像作为水印图像，或者将灰度图像二值化后作为水印图像的限制,而且采用基于级联混沌技术提高了灰度水印图像的安全性。此外，本文成功消除了图像分区分类中纹理/平滑区域中的平滑/纹理孤岛，使分类结果更加准确、合理。实验结果表明，本方案不仅能够抵抗一些常见攻击，而且容量大、安全性高，很好地保护了用户隐私。本文实现了密文域可逆水印技术，适用于隐私保护要求高的医学、军事等领域。
Abstract ： Objective The rapid evolution of cloud technology has provided users with the convenience, but still brought security risks. Once the cloud data is inaccessible or corrupted, it will expose the users" privacy, such as personal photos, corporate user information, electronic notes. In addition, in light of the existence of security vulnerabilities or internal staff illicit activity, data may be tampered, replaced or distributed illegally. In such a case, protecting users" privacy is crucial. Nowadays and in practice, protection of users" privacy is achieved by watermarking technology, especially reversible watermarking technology. Reversible watermarking can not only extract the data correctly, but also can 100% restore the original carrier. It is used in medical, military and other fields. Therefore, reversible watermarking technology plays an important role in the field of privacy protection. Most of the existing reversible watermarking algorithms are based on the plaintext domain, so they are easy to be pirated or tampered. For the sake of enhancing security and protecting privacy, we put forward a reversible watermarking scheme in homomorphic encrypted domain based on Gray code for piracy tracing. And it supports for direct operation in homomorphic encrypted domain. The ultimate goal of the new proposed scheme in encrypted domain is to protect users" privacy. Method First, "Homomorphic Encryption System based on Gray Code" (HESGC) is proposed to encrypt the original carrier image. Gray code encryption converts the grayscale values of the original carrier image into binary values. Then according to integer homomorphic encryption, the binary values are converted to the different decimal grayscale values. Then, according to the "Integer Wavelet Transform" (IWT) and "Human Visual System"(HVS) characteristics, perform region division and classification reasonably. Region division is to avoid conflicts between watermarking and tracing proofs, and region classification is fit well with the human visual characteristics. The human is more sensitive to the smooth regions and less sensitive to the texture regions. Moreover, neighboring quadratic optimization approach is presented to make the same regions become more concentrated and region classification more accurate and reasonable. And then we implement the newly proposed embedding, reversible recovery and extraction operations. Finally, we present the "Joint Watermarking and Tracing" (JWT) strategy and we utilize the newly proposed JWT strategy to achieve piracy tracing. JWT strategy can trace piracy and the first unauthorized person who illegally copy or distribute the image. This paper makes full use of the nonrepudiation of tracing proofs. Result Our experiments are conducted on the commonly used database (USC-SIPI). Six classical images from the USC-SIPI image database are selected for this experiment. The proposed algorithm has higher Peak Signal-to-Noise Ratio (PSNR) values than the existing reversible watermarking algorithms, and the PSNR value can reach 50dB. In addition, the SSIM values are all equal to 1, both the original carrier image and the restored image, and the original watermarking image and the extracted watermarking image. The proposed scheme realizes reversible recovery. Furthermore, the new proposed HESGC expands the original carrier image by 8 times, therefore the capacity is larger. Theoretically, the maximum capacity of this paper is 3.75bpp. Currently, the maximum capacity of most existing reversible watermarking algorithms is less than 1bpp. Moreover, the proposed scheme can not only realize piracy tracing, but can also resist some common attacks, such as random noise attack, median filter attack, image smoothing attack, JPEG coded attack, LZW coded attack and convolutional fuzzy attack etc. For the purpose of identifying the piracy origin, we calculate the similarity value of the extracted tracing proof and the generated tracing proof by the image copyright owner and determine who has the maximum similarity value. If the similarity value is around 1, it is a pirate. For other non-pirates, the similarity value is much lower than 1, most of them are around 0.6. Experimental results confirm the efficient of the proposed scheme. Conclusion In this paper, we present the HESGC and JWT for the first time, obtain piracy tracing and reversible watermarking in encrypted image. Most of the existing reversible watermarking algorithms direct employ the binary sequence as the watermark. Instead, in this scheme, gray image is served as watermark image directly, and it removes the restrictions that the binary image is used as watermark image, or the gray image is binarized as watermark image. Moreover, in order to enhance security of the gray watermark image, Cascade chaotic technology is adopted to encrypt it. In addition, we successfully eliminate the smooth/texture islands in the texture /smooth regions, so the block classification results are more accuracy and reasonable. Especially, security is an important measurement indicator for the privacy protection, only a secure watermarking system is meaningful. This paper holds a triple security protection mechanism and has the stronger security performance. The experimental results demonstrate that this scheme not only realizes privacy protection and piracy tracing, but also holds the characteristics of high security, large capacity and high restoration quality. Besides, it can resist some common attacks, which is good for protecting users" privacy. The proposed algorithm focuses on the reversible watermarking technology in encrypted image, and it is widely applied for the digital images which require high confidentiality, high security and high fidelity, such as military images, medical images, electronic invoice and legal documents, i.e.