[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN108810555B - Thumbnail image privacy protection method based on image compression and elastic resolution - Google Patents

Thumbnail image privacy protection method based on image compression and elastic resolution Download PDF

Info

Publication number
CN108810555B
CN108810555B CN201810617319.7A CN201810617319A CN108810555B CN 108810555 B CN108810555 B CN 108810555B CN 201810617319 A CN201810617319 A CN 201810617319A CN 108810555 B CN108810555 B CN 108810555B
Authority
CN
China
Prior art keywords
image
block
thumbnail
scrambling
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810617319.7A
Other languages
Chinese (zh)
Other versions
CN108810555A (en
Inventor
杜如飞
苏明
刘晓光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nankai University
Original Assignee
Nankai University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nankai University filed Critical Nankai University
Priority to CN201810617319.7A priority Critical patent/CN108810555B/en
Publication of CN108810555A publication Critical patent/CN108810555A/en
Application granted granted Critical
Publication of CN108810555B publication Critical patent/CN108810555B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00095Systems or arrangements for the transmission of the picture signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Facsimile Transmission Control (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

一种基于图像压缩与弹性分辨率的缩略图图像隐私保护方法;通过对原始图像分块,并对每个块进行二次划分子块,根据缩略图分辨率的需求,在每个块内对子块进行相应程度的随机置乱;结合JPEG压缩和密码学技术,对进行DCT变换的8×8块中的DC和AC系数进行不同程度的加密处理,得到公共部分的缩略图及私密部分的完全加密数据;本发明中的公共部分缩略图可以用于网络应用的图片预览,并同时提供一定程度的隐私保护。利用图像压缩技术降低加密图像总体尤其是公共部分的存储开销,可以大幅度节省带宽。本发明还提供弹性分辨率的缩略图隐私保护,图像的安全性受到分辨率的影响,分辨率被控制的越低,图像的安全性就越高。

Figure 201810617319

A thumbnail image privacy protection method based on image compression and elastic resolution; by dividing the original image into blocks, and subdividing each block into sub-blocks, according to the requirements of thumbnail resolution, each block is divided into sub-blocks. The sub-blocks are randomly scrambled to a corresponding degree; combined with JPEG compression and cryptography, the DC and AC coefficients in the 8 × 8 blocks subjected to DCT transform are encrypted to different degrees, and the thumbnails of the public part and the private parts are obtained. The data is completely encrypted; the thumbnail image of the public part in the present invention can be used for the picture preview of the network application, and at the same time, a certain degree of privacy protection is provided. Using image compression technology to reduce the storage overhead of the encrypted image as a whole, especially the public part, can greatly save the bandwidth. The invention also provides thumbnail privacy protection of elastic resolution, the security of the image is affected by the resolution, and the lower the resolution is controlled, the higher the security of the image.

Figure 201810617319

Description

基于图像压缩与弹性分辨率的缩略图图像隐私保护方法Thumbnail image privacy protection method based on image compression and elastic resolution

【技术领域】【Technical field】

本发明属于数字图像加密、数字图像隐私保护及信息安全技术领域,具体涉及一种基于图像压缩与弹性分辨率的缩略图图像隐私保护方法。The invention belongs to the technical fields of digital image encryption, digital image privacy protection and information security, and in particular relates to a thumbnail image privacy protection method based on image compression and elastic resolution.

【背景技术】【Background technique】

数字图像因其内容生动、形象,相较于声音、文本信息,克服了存储空间大的困难,并可以传达更多的信息,从而成为传播信息最重要的方式之一[1]。随着互联网应用的快速发展,各种各样的云存储设备开始作为数字图像的管理工具,它可以异步轻松共享大文件,而不需点对点传输,即使丢失或者损坏了移动设备,也可以从云上访问和恢复,而且成本低,为用户传输和管理数据节约了大量费用,因此,每周几乎近十亿的新照片被上传至云应用上。Compared with sound and text information, digital image overcomes the difficulty of large storage space and can convey more information because of its vivid content and image, thus becoming one of the most important ways to spread information [1]. With the rapid development of Internet applications, various cloud storage devices have begun to be used as management tools for digital images. It can easily share large files asynchronously without point-to-point transfer. Even if the mobile device is lost or damaged, it can be downloaded from the cloud. The low cost of accessing and restoring data on the cloud saves users a lot of money for transferring and managing data. As a result, almost one billion new photos are uploaded to the cloud application every week.

但云存储带来便利的同时也对用户的隐私带来了威胁,因为任何有意义的图像上传至云应用上,都相当于在不可信的第三方服务器上做了备份,那么用户的隐私很可能遭到泄露,这种隐患的原因在于:一是服务提供商会因某些商业利益将用户的照片泄露给合作方;二是用户的账户可能会遭到攻击者的攻击,这会使得用户的照片流落到攻击者的手中,导致用户的人脸信息、生活信息等遭到泄露。However, the convenience brought by cloud storage also poses a threat to the privacy of users, because uploading any meaningful image to a cloud application is equivalent to making a backup on an untrusted third-party server, so the privacy of the user is very important. may be leaked. The reasons for this hidden danger are: first, the service provider will leak the user's photo to the partner for some commercial interests; second, the user's account may be attacked by attackers, which will make the user's photo The photos fell into the hands of the attackers, resulting in the disclosure of the user's face information, life information, etc.

解决这一问题的方法就是实行“端到端”的加密,即在发送端需要在图像上传到服务器之前就对其进行加密,这样服务器端获得的图像就是经过加密的图像,没有授权的第三方在没有密钥的情况下无法将密文图像还原到原始图像,这样便大大提高了图像内容不被窃取的安全性,对涉及到个人隐私的数字图像起到了很好的保护作用。这方面的技术包括基于矩阵变换像素置换的图像加密技术、基于秘密分割与共享的图像加密技术和基于现代密码体制的图像加密技术等[2]。The solution to this problem is to implement "end-to-end" encryption, that is, the sender needs to encrypt the image before uploading it to the server, so that the image obtained by the server is the encrypted image, and there is no authorized third party. Without the key, the ciphertext image cannot be restored to the original image, which greatly improves the security of the image content from being stolen, and plays a good role in protecting the digital image involving personal privacy. Technologies in this area include image encryption technology based on matrix transformation pixel replacement, image encryption technology based on secret segmentation and sharing, and image encryption technology based on modern cryptosystems [2].

然而传统的经典图像加密算法虽然已经很好地解决了图像隐私保护问题,但却因格式不兼容或加密后的图像极度混乱,用户无法对图像进行在线预览等,使得图像检索起来非常困难。参考文献[3]、[4]中解决了格式不兼容的问题,但仍没有解决图像预览的问题,[5]中Wright等人在信息隐藏和多媒体安全会议上提出了缩略图图像隐私保护算法(TPE),选择为每个图像提供一个低分辨率的JPEG缩略图,这样提供了可兼容的图像格式,又隐藏了图像的细节内容,能够在一定程度上保护用户的隐私,又可以在线预览。However, although the traditional classic image encryption algorithm has solved the problem of image privacy protection well, it is very difficult to retrieve images due to incompatible formats or extremely confusing encrypted images, and users cannot preview images online. References [3], [4] solved the problem of format incompatibility, but still did not solve the problem of image preview. In [5], Wright et al proposed a thumbnail image privacy protection algorithm at the Information Hiding and Multimedia Security Conference (TPE), choose to provide a low-resolution JPEG thumbnail for each image, which provides a compatible image format, hides the details of the image, protects the user's privacy to a certain extent, and can preview online .

但无论是传统的图像加密算法还是最新的缩略图图像隐私保护算法,都改变了图像的空间相关性,使得加密后的图像文件存储开销大大增加,并且TPE算法的图像重建之后有明显的块效应,视觉质量并不能达到人眼接受的效果。参考文献[6]中提出的缩略图隐私保护算法在图像安全性、文件大小和图像重建质量上都有所提高,但总体效果还是差强人意。However, whether it is the traditional image encryption algorithm or the latest thumbnail image privacy protection algorithm, the spatial correlation of the image is changed, which greatly increases the storage cost of the encrypted image file, and there is obvious block effect after the image reconstruction of the TPE algorithm. , the visual quality cannot reach the effect accepted by the human eye. The thumbnail privacy protection algorithm proposed in Reference [6] has improved image security, file size and image reconstruction quality, but the overall effect is still unsatisfactory.

参考文献references

[1]Gonzalez,Rafael C.,and Richard E.Woods."Digital image processing."(2012).[1] Gonzalez, Rafael C., and Richard E. Woods. "Digital image processing." (2012).

[2]李昌刚,韩正之,and张浩然."图像加密技术综述."计算机研究与发展39.10(2002):1317-1324.[2] Li Changgang, Han Zhengzhi, and Zhang Haoran. "Overview of Image Encryption Technology." Computer Research and Development 39.10 (2002): 1317-1324.

[3]Tierney,Matt,et al."Cryptagram:Photo privacy for online socialmedia."Proceedings of the firstACM conference on Online social networks.ACM,2013.[3] Tierney, Matt, et al. "Cryptagram: Photo privacy for online socialmedia." Proceedings of the first ACM conference on Online social networks. ACM, 2013.

[4]Ra,Moo-Ryong,Ramesh Govindan,and Antonio Ortega."P3:TowardPrivacy-Preserving Photo Sharing."Nsdi.2013.[4] Ra, Moo-Ryong, Ramesh Govindan, and Antonio Ortega. "P3: TowardPrivacy-Preserving Photo Sharing."Nsdi.2013.

[5]Wright,Charles V.,Wu-chi Feng,and Feng Liu."Thumbnail-preservingencryption for JPEG."Proceedings of the 3rd ACM Workshop on InformationHiding and Multimedia Security.ACM,2015.[5]Wright,Charles V.,Wu-chi Feng,and Feng Liu."Thumbnail-preserving encryption for JPEG."Proceedings of the 3rd ACM Workshop on InformationHiding and Multimedia Security.ACM,2015.

[6]Marohn,Byron,et al."Approximate Thumbnail Preserving Encryption."Proceedings of the 2017on MultimediaPrivacy and Security.ACM,2017.[6] Marohn, Byron, et al. "Approximate Thumbnail Preserving Encryption." Proceedings of the 2017on MultimediaPrivacy and Security.ACM,2017.

【发明内容】[Content of the invention]

本发明目的是解决如下的关键技术问题:The purpose of the invention is to solve the following key technical problems:

第一、提出一种保存原始图像格式的图像加密方法,解决加密图像格式不兼容的问题。First, an image encryption method for saving the original image format is proposed to solve the problem of incompatible encrypted image formats.

第二、提出一种缩略图图像隐私保护方法,加密图像不仅能够保护用户的隐私,也能通过缩略图进行在线预览。Second, a method for privacy protection of thumbnail images is proposed. Encrypted images can not only protect the privacy of users, but also can be previewed online through thumbnail images.

第三、提出一种基于图像压缩的图像加密方法,使得加密后的图像尽可能地节省文件存储空间和传输带宽。Thirdly, an image encryption method based on image compression is proposed, so that the encrypted image can save the file storage space and transmission bandwidth as much as possible.

第四、提出一种弹性分辨率的缩略图图像加密方法,图像的缩略图分辨率可以通过用户控制。Fourth, an elastic resolution thumbnail image encryption method is proposed, and the thumbnail resolution of the image can be controlled by the user.

为了解决上述问题,本发明读取原始图像的格式,在进行图像加密处理后依然存储为原始图像的格式,使得加密后的图像可用性更强。In order to solve the above problem, the present invention reads the format of the original image, and still stores the format of the original image after performing the image encryption process, so that the usability of the encrypted image is stronger.

为了解决上述问题,本发明提出了建立原始图像的低分辨缩略图。缩略图中丢弃了图像的细节部分,只保留图像的大致轮廓,并且从缩略图中很难恢复到近似的原始图像。这种方式既保护了图像中的隐私信息,又可以通过加密图像进行在线预览。In order to solve the above problem, the present invention proposes to create a low-resolution thumbnail of the original image. The details of the image are discarded in the thumbnail, and only the rough outline of the image is preserved, and it is difficult to restore the approximate original image from the thumbnail. This method not only protects the private information in the image, but also enables online preview by encrypting the image.

为了解决上述问题,本发明使用图像压缩技术,控制图像加密后带来的额外存储开销,并通过合理的图像量化,去除图像的冗余,尽可能地降低原始文件的大小。并且结合图像压缩技术的特点,将加密后的图像分为公共部分和私密部分。公共部分为体积很小的缩略图,通过缩略图进行在线预览时仅仅加载公共部分,可以大幅度节省带宽。In order to solve the above problem, the present invention uses image compression technology to control the extra storage overhead brought by image encryption, and removes image redundancy through reasonable image quantization to reduce the size of the original file as much as possible. And combined with the characteristics of image compression technology, the encrypted image is divided into public part and private part. The public part is a small thumbnail, and only the public part is loaded when previewing online through the thumbnail, which can greatly save bandwidth.

为了解决上述问题,本发明提供了一种弹性分辨率的缩略图图像加密技术,图像的细节暴露程度由用户自己控制。与此同时,图像的安全性不仅依赖算法的安全性,同样依赖缩略图分辨率的大小。图像的分辨率越高,图像的细节暴露程度就越少,图像的安全性就越高。In order to solve the above problem, the present invention provides a thumbnail image encryption technology with elastic resolution, and the detail exposure degree of the image is controlled by the user. At the same time, the security of images depends not only on the security of the algorithm, but also on the size of the thumbnail resolution. The higher the resolution of the image, the less detail is exposed in the image, and the higher the security of the image.

为了解决上述问题,本发明还提供了一种原型系统,用于缩略图加密的图片存储。支持弹性选择图片加密等级及相应分辨率等级的图片上传,下载时将在终端解密为高清图像。In order to solve the above problems, the present invention also provides a prototype system for image storage with thumbnail encryption. Supports flexible selection of image encryption levels and corresponding resolution levels for uploading images, which will be decrypted into high-definition images on the terminal during download.

本发明的技术方案:Technical scheme of the present invention:

一种基于图像压缩与弹性分辨率的缩略图图像隐私保护方法,该方法包括缩略图加密方法和缩略图解密方法两部分;A thumbnail image privacy protection method based on image compression and elastic resolution, the method includes a thumbnail encryption method and a thumbnail decryption method;

一、缩略图加密方法1. Thumbnail encryption method

第1、在空间域上将图像分块:先读取位图图像文件中的图像信息,假设该图像的图像大小为N×N,对原始图像按照n×n进行分块,n<N,下同;1. Divide the image into blocks in the spatial domain: first read the image information in the bitmap image file, assuming that the image size of the image is N×N, divide the original image according to n×n, n<N, The same below;

第1.1、对每个n×n的块进行二次划分块,每个子块的大小为b×b,b<n,下同;1.1. Divide each n×n block twice, the size of each sub-block is b×b, b<n, the same below;

第1.2、对每n×n块中若干个子块进行随机置乱,考虑到JPEG压缩的性质,为了更好地获得图像恢复质量,采取n mod8≡0,b mod8≡0,参与置乱的b×b子块的个数由子密钥k0决定,以此来弹性地控制缩略图图像的分辨率,而参与置乱的子块的随机位置由伪随机数发生器产生;1.2. Randomly scramble several sub-blocks in each n×n block. Considering the nature of JPEG compression, in order to better obtain image restoration quality, n mod8≡0, b mod8≡0, and b involved in scrambling are adopted. The number of ×b sub-blocks is determined by the sub-key k 0 , so as to flexibly control the resolution of the thumbnail image, and the random positions of the sub-blocks involved in scrambling are generated by a pseudo-random number generator;

假设每个N×M的块中包含m个b×b的子块,那么图像的置乱程度分为5个等级:level=0时,图像不置乱也不压缩,完全保留原图;level=1,m/4子块参与置乱;level=2,m/2的子块参与置乱;level=3,3m/4的子块参与置乱;level=4,m个子块都参与置乱;level将作为伪随机数发生器的“种子”,决定子块的随机置乱位置;Assuming that each N×M block contains m sub-blocks of b×b, the scrambling degree of the image is divided into 5 levels: when level=0, the image is neither scrambled nor compressed, and the original image is completely preserved; level= 1, m/4 sub-blocks participate in scrambling; level=2, m/2 sub-blocks participate in scrambling; level=3, 3m/4 sub-blocks participate in scrambling; level=4, m sub-blocks participate in scrambling ; level will be used as the "seed" of the pseudo-random number generator to determine the random scrambling position of the sub-block;

第2、借鉴JPEG压缩方法将图像通过正向离散余弦变换(DCT)变换至频域,这里对图像进行DCT变换应遵循如下规则:2. Using the JPEG compression method to transform the image into the frequency domain through the forward discrete cosine transform (DCT), the following rules should be followed for the DCT transformation of the image here:

第2.1、将图像每个像素数据减去128,使得像素值的范围落入-128至127之间的范围,这样可以大大降低DCT变换后十进制数为3位的概率,便于使用VIL编码时,降低编码的位数;2.1. Subtract 128 from each pixel data of the image, so that the range of pixel values falls within the range of -128 to 127, which can greatly reduce the probability that the decimal number after DCT transformation is 3 bits, which is convenient when using VIL encoding, reduce the number of bits encoded;

第2.2、结合JPEG压缩的性质,对每个8×8的图像块应用DCT变换,得到1个DC系数和63个AC系数,同时将DC系数称为低频系数,AC系数称作高频系数;2.2. Combined with the nature of JPEG compression, apply DCT transform to each 8×8 image block to obtain 1 DC coefficient and 63 AC coefficients, and at the same time, the DC coefficients are called low-frequency coefficients, and the AC coefficients are called high-frequency coefficients;

`3、对第2步中的DCT变换结果进行量化,即将图像每8×8的块除以JPEG压缩中的缺省量化表,结果四舍五入保留整数;这样DCT系数中的大部分高频系数变为“0”,一些没有被置为“0”的系数也会在精度上有些损失;量化的目的在于过滤图像中的高频系数,图像的主要信息集中在图像的低频部分,这样可以起到压缩的作用,又不会对图像的主要信息产生大的影响。`3. Quantize the DCT transform result in step 2, that is, divide every 8×8 block of the image by the default quantization table in JPEG compression, and the result is rounded to the nearest integer; in this way, most of the high-frequency coefficients in the DCT coefficients change. If it is "0", some coefficients that are not set to "0" will also lose some accuracy; the purpose of quantization is to filter the high-frequency coefficients in the image, and the main information of the image is concentrated in the low-frequency part of the image, which can play a role in The effect of compression will not have a large impact on the main information of the image.

第4、对第3步量化后的每8×8的DCT系数进行zigzag扫描,这样对于8×8块的DCT系数将得到1×64的一维序列;4. Perform zigzag scanning on every 8×8 DCT coefficients quantized in step 3, so that a 1×64 one-dimensional sequence will be obtained for the 8×8 blocks of DCT coefficients;

第4.1、将高频系数AC与低频系数DC分离,高频系数作为私密部分存储,并将高频系数的位置替换为“0”;4.1. Separate the high-frequency coefficient AC from the low-frequency coefficient DC, store the high-frequency coefficient as a private part, and replace the position of the high-frequency coefficient with "0";

第4.2、对分离的高频系数进行零游程编码和哈夫曼编码,进一步压缩数据的序列编码长度,得到二进制序列w0,w1,...,wi4.2. Perform zero-run coding and Huffman coding on the separated high-frequency coefficients, further compress the sequence coding length of the data, and obtain binary sequences w 0 , w 1 , . . . , wi ;

第4.3、对经过第4.2步的高频系数进行流密码加密;4.3. Perform stream cipher encryption on the high-frequency coefficients after step 4.2;

流密码加密的具体方法为:使用子密钥k1通过流密码发生器产生二进制的密钥流r0,r1,...,ri,并对第4.2步中的二进制wi序列按如下公式得到加密后的wi′序列:The specific method of stream cipher encryption is: use the subkey k 1 to generate a binary key stream r 0 , r 1 ,..., ri through the stream cipher generator, and press the binary wi sequence in step 4.2 according to The encrypted w i ' sequence is obtained by the following formula:

Figure BDA0001697210200000041
Figure BDA0001697210200000041

wi′将作为私密部分保存;w i ' will be saved as a private part;

第5、由此对高频系数置“0”后的系数进行izigzag扫描并反量化,反量化的结果丢弃了图像的细节部分,只保留了图像粗糙特征;Fifth, the coefficients after the high-frequency coefficients are set to "0" are subjected to izigzag scanning and inverse quantization. The result of inverse quantization discards the details of the image and only retains the rough features of the image;

第6、对经过第5步处理的DCT系数进行逆向离散余弦变换(IDCT)变换至空间域;6. Inverse discrete cosine transform (IDCT) is performed on the DCT coefficients processed in step 5 to the spatial domain;

第7、在第2.1步中将所有的像素值减去128,在此将会加上128,将像素值恢复到0-255的范围,这样便得到了相应置乱等级的缩略图;7. In step 2.1, subtract 128 from all pixel values, and add 128 here to restore the pixel values to the range of 0-255, so that the corresponding scrambling level thumbnails are obtained;

第8、再次将第7步中的缩略图进行分块加密,每个块大小为8×8;8. Encrypt the thumbnail image in step 7 again in blocks, and the size of each block is 8×8;

第8.1、此时缩略图的每个块中的像素值都是该块的平均值,因而需要对每个块中的像素低六位进行随机置乱,使得该块的像素值不是精确的平均值,但却接近于平均值;8.1. At this time, the pixel value in each block of the thumbnail is the average value of the block, so it is necessary to randomly scramble the lower six bits of the pixel in each block, so that the pixel value of the block is not an exact average value, but close to the average;

第8.2、为了保证图像的压缩效果,对于同一个块内的64个像素使用同一子密钥k2进行像素值低六位置乱;8.2. In order to ensure the compression effect of the image, the same sub-key k 2 is used for the 64 pixels in the same block to scrambling the pixel values by six positions lower;

虽然在第1步中对每个块中的子块进行了一定程度的置乱,给攻击者暴力破解图像带来了一定的难度。但是在第3-第4.1步中,对每8×8的块进行DCT变换,并将所有的AC置“0”,由于DCT变换的特性,使得图像进行IDCT变换后,每个8×8块中像素点的值都是该块的平均值,这样便精确地暴露了块间置乱后的每个8×8块的平均值。因而在第8.2步中采取子密钥k2作为随机数生成器的“种子”,对每个8×8块中的每个像素值的低六位进行随机置乱;为了保持块中像素的相关性,便于压缩,每个块中的子密钥相同,这样不仅在一定程度上隐藏了块的平均值,而且使得每个块都跟原图有一定的相似度。Although the sub-blocks in each block are scrambled to a certain extent in step 1, it brings a certain degree of difficulty for the attacker to brute force the image. However, in steps 3-4.1, DCT transform is performed on each 8×8 block, and all ACs are set to “0”. Due to the characteristics of DCT transform, after the image undergoes IDCT transform, each 8×8 block is The value of the middle pixel is the average value of the block, which accurately exposes the average value of each 8x8 block after inter-block scrambling. Therefore, in step 8.2, the subkey k 2 is taken as the "seed" of the random number generator, and the lower six bits of each pixel value in each 8×8 block are randomly scrambled; Correlation, easy to compress, the subkey in each block is the same, which not only hides the average value of the block to a certain extent, but also makes each block have a certain degree of similarity with the original image.

二、缩略图解密方法2. Thumbnail decryption method

第9、将加密后的缩略图图像按照8×8进行分块,并使用子密钥k2对每个块中的像素值进行低六位还原解密操作;9. Divide the encrypted thumbnail image into 8×8 blocks, and use the sub-key k 2 to restore and decrypt the lower six bits of the pixel value in each block;

第10、根据子密钥k1按如下公式解密出第4步中分离的高频系数AC;10. Decrypt the high frequency coefficient AC separated in step 4 according to the following formula according to the subkey k 1 ;

Figure BDA0001697210200000051
Figure BDA0001697210200000051

第11、对缩略图进行如第2-第3步中的DCT变换并量化;11. Perform DCT transformation and quantization on the thumbnail as in steps 2-3;

第11.1、DCT系数中的高频系数由第10步中解密的高频系数替换;11.1. The high-frequency coefficients in the DCT coefficients are replaced by the high-frequency coefficients decrypted in step 10;

第11.2、对缩略图进行反量化和IDCT变换得到稍高分辨率的缩略图;11.2. Perform inverse quantization and IDCT transformation on the thumbnails to obtain slightly higher resolution thumbnails;

第12、使用子密钥k0将置乱的块恢复到原始图像的位置,还原到高清的原始图像。12. Use the subkey k 0 to restore the scrambled block to the position of the original image, and restore it to the original high-definition image.

可以发现,最终恢复的图像不是原始图像,是因为在本发明的加密算法中压缩算法中的有损模式,对变换后的系数进行了量化操作,换句话说本发明的算法是有损的,但最终的图像恢复质量是可以接受的。It can be found that the finally restored image is not the original image, because the lossy mode in the compression algorithm in the encryption algorithm of the present invention performs a quantization operation on the transformed coefficients, in other words, the algorithm of the present invention is lossy, But the final image restoration quality is acceptable.

本发明的优点和有益效果:Advantages and beneficial effects of the present invention:

1、本发明提供了弹性分辨率的隐私保护方案,在实际应用中可以由用户自己控制图像的分辨率。同时弹性的分辨率也伸缩性地控制了缩略图的安全性,对于安全性要求不是很高的图像可以采取较高的分辨率,便于在线预览;安全性要求很强的图像采用低分辨率,便于图像隐私保护;1. The present invention provides an elastic resolution privacy protection scheme, and in practical applications, the user can control the resolution of the image by himself. At the same time, the flexible resolution also flexibly controls the security of thumbnails. For images that do not require very high security, a higher resolution can be used to facilitate online preview; images with strong security requirements use a lower resolution. Facilitate image privacy protection;

2、除此之外,将图像的公共部分和私密部分分开保存,保存这两部分的任何一方都无法独自解密图像,这给攻击者破解加密图像增加了难度;2. In addition, the public part and the private part of the image are stored separately, and neither party who saves the two parts can decrypt the image alone, which makes it more difficult for the attacker to crack the encrypted image;

3、比起之前的缩略图图像隐私保护方案,本发明结合JPEG图像压缩算法,不仅去除了图像中的细节信息部分,而且更高效率地降低了图像加密后的存储开销,又因为本发明方案中的分辨率是弹性的,因而当选择的分辨率较高时,节省加密后图像的存储开销的优势会更明显,不论是高分辨率还是低分辨率加密后的图像大小都明显小于原图,这是以前的方案都没有做到的;3. Compared with the previous thumbnail image privacy protection scheme, the present invention combines the JPEG image compression algorithm, which not only removes the detailed information part in the image, but also reduces the storage overhead after image encryption more efficiently. The resolution is flexible, so when the selected resolution is higher, the advantage of saving the storage overhead of the encrypted image will be more obvious, and the size of the encrypted image in both high resolution and low resolution is significantly smaller than the original image. , which was not achieved by previous schemes;

4、在本发明的算法中,为了降低存储开销,使用了DCT变换,并对系数进行量化,这使得原始图像不可恢复地丢失了一些信息,换句话说,本发明的方案是有损的,但却在保证图像安全及压缩效率的前提下,提供了可以接受的图像恢复质量。4. In the algorithm of the present invention, in order to reduce the storage overhead, DCT transform is used, and the coefficients are quantized, which makes the original image irretrievably lose some information, in other words, the solution of the present invention is lossy, However, on the premise of ensuring image security and compression efficiency, it provides acceptable image restoration quality.

以下结合附图说明以及具体实施方式对本发明的最佳实施例进行详细说明,本发明的这些以及其他优点将更加明显。The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, and these and other advantages of the present invention will be more apparent.

【附图说明】【Description of drawings】

图1给出了本发明中对于N×N大小的图像分块的示例图;Fig. 1 provides the example diagram for the image block of N*N size in the present invention;

图2是根据本发明的实施例,对图像进行弹性分辨率缩略图加密的M200流程图;2 is a flow chart of M200 for performing elastic resolution thumbnail encryption on an image according to an embodiment of the present invention;

图3给出了本发明中分块并对子块进行置乱的M300流程图。FIG. 3 shows the M300 flow chart for dividing and scrambling sub-blocks in the present invention.

图4是根据本发明的一个实施例中32×32分块,置乱等级为1-4时,子块间随机置乱的示例;4 is an example of random scrambling between sub-blocks when the scrambling level is 1-4 in 32×32 blocks according to an embodiment of the present invention;

图5给出了不同置乱等级下图像子块间置乱的效果图;Figure 5 shows the effect of scrambling between image sub-blocks under different scrambling levels;

图6中展示了对DCT变换后AC系数置0的示意图,其中最小单位的块代表一个像素。Figure 6 shows a schematic diagram of setting the AC coefficients to 0 after DCT transformation, where the minimum unit block represents one pixel.

图7是块间置乱后DCT变换后AC系数置0的一个具体实例;Fig. 7 is a specific example in which AC coefficients are set to 0 after DCT transformation after inter-block scrambling;

图8给出了本发明中像素值低六位随机置乱的示意图;Fig. 8 provides the schematic diagram of the random scrambling of pixel values in the present invention by the lower six bits;

图9给出了加密图像公共部分与原始图像文件大小的对比,数据单位为KB;Figure 9 shows the comparison between the public part of the encrypted image and the size of the original image file, and the data unit is KB;

图10给出了加密图像整体与原始图像文件大小的对比,数据单位为KB;Figure 10 shows the comparison of the size of the encrypted image as a whole and the original image file, the data unit is KB;

图11列出了不同置乱级别时,对缩略图进行边缘检测的结果;Figure 11 lists the results of edge detection on thumbnails at different scrambling levels;

图12为缩略图图像解密算法M1200流程图;Figure 12 is a flowchart of the thumbnail image decryption algorithm M1200;

图13使用PSNR值衡量解密后图像的重建质量,数据单位为db;Figure 13 uses the PSNR value to measure the reconstruction quality of the decrypted image, and the data unit is db;

图14给出了3种不同分辨率图像的图像重建效果图。Figure 14 shows the image reconstruction effects of three different resolution images.

【具体实施方式】【Detailed ways】

下面将结合附图介绍本发明的具体实施方式。Specific embodiments of the present invention will be described below with reference to the accompanying drawings.

为了方便起见,图1给出了本发明中分块的示例图,对于N×N大小的图像分成若干个n×n的块,并对每个n×n的块进行二次划分,分成b×b个子块的示例图。For the sake of convenience, FIG. 1 shows an example diagram of the block in the present invention. For an N×N image, it is divided into several n×n blocks, and each n×n block is divided twice, and divided into b Example diagram of ×b sub-blocks.

实施例1:Example 1:

图2给出了本发明算法加密过程的一个M200实施例的流程图。Figure 2 shows a flow chart of an M200 embodiment of the algorithm encryption process of the present invention.

如图2所示,缩略图加密过程在步骤S210开始。As shown in FIG. 2, the thumbnail encryption process starts at step S210.

S220将图像进行分块,对于图像大小为256×256的图像分成64个32×32的块,对每个32×32的块划分8×8的子块,S230对每个块中的子块进行随机置乱,在此过程中子块间置乱的程度由置乱等级level决定,level不同,子块间置乱程度不同,这直接决定了最终图像的分辨率的高低,子块的随机置乱位置由子密钥k0决定(详细的子块间置乱过程参见M300)。S220 divides the image into 64 blocks of 32×32 for an image with an image size of 256×256, and divides each 32×32 block into 8×8 sub-blocks, and S230 divides the sub-blocks in each block Random scrambling is performed. In this process, the degree of scrambling between sub-blocks is determined by the level of scrambling. Different levels have different scrambling degrees between sub-blocks, which directly determines the resolution of the final image. The randomness of the sub-blocks The scrambling position is determined by the subkey k 0 (for the detailed inter-subblock scrambling process, see M300).

图4给出了块间随机置乱具体示例图,对于32×32的图像块,进行二次划分,每个子块的大小为8×8,因而32×32的块中包含16个子块,图4中每一个单元中左图为原始块,右图则是左图子块经过随机置乱后的结果,带阴影的块为随机挑选的需要置乱的块。根据缩略图加密算法第1.2步中的定义,当置乱等级为0时,不进行置乱,置乱等级为1时随机选择4个需要置乱的块,…,以此类推置乱等级为4时,所有的16个子块中都进行随机置乱,如图4所示。Figure 4 shows a specific example of random scrambling between blocks. For a 32×32 image block, it is divided twice, and the size of each sub-block is 8×8, so the 32×32 block contains 16 sub-blocks. In each unit in 4, the left picture is the original block, the right picture is the result of random scrambling of the left picture sub-block, and the shaded block is the randomly selected block that needs to be scrambled. According to the definition in step 1.2 of the thumbnail encryption algorithm, when the scrambling level is 0, no scrambling is performed, and when the scrambling level is 1, 4 blocks that need to be scrambled are randomly selected, ..., and so on, the scrambling level is 4, all 16 sub-blocks are randomly scrambled, as shown in Figure 4.

图5中依次给出了不同置乱等级下图像子块间置乱效果图,可以看出这种局部块置乱的效果依然可以看出图像的大致轮廓。当level=0时图像保持原图,随着置乱等级的增加,图像会变得越来越模糊,这为本发明算法中弹性分辨率缩略图奠定了基础。Figure 5 shows the scrambling effect diagrams between image sub-blocks under different scrambling levels in turn. It can be seen that the effect of this local block scrambling still shows the general outline of the image. When level=0, the image remains the original image, and as the scrambling level increases, the image becomes more and more blurred, which lays the foundation for the elastic resolution thumbnail in the algorithm of the present invention.

图2中的S240是根据JPEG压缩中的方法对图像每8×8的块进行DCT变换,并量化,得到高频系数DC和低频系数AC,并将DC保留下来,AC分离出去。S240 in FIG. 2 is to perform DCT transformation on every 8×8 block of the image according to the method in JPEG compression, and quantize it to obtain high-frequency coefficients DC and low-frequency coefficients AC, and keep DC and separate AC.

图2中的S250则将S240中原始AC系数的部分置0,并实施反量化和IDCT变换,得到分辨率更低的缩略图图像。S250 in FIG. 2 sets the part of the original AC coefficient in S240 to 0, and performs inverse quantization and IDCT transformation to obtain a thumbnail image with a lower resolution.

图6中展示了对每8×8块做DCT变换后AC系数置0的示意图,左图中左上角为DC系数,剩下的为AC系数,右图中显示了AC被分离后其原来的位置被置为0。Figure 6 shows a schematic diagram of setting the AC coefficients to 0 after DCT transformation for each 8×8 block. The upper left corner of the left picture is the DC coefficient, and the rest are AC coefficients. The right picture shows the original AC coefficient after the AC is separated. position is set to 0.

图7是根据置乱等级为3,将置乱后的图像进行DCT变换并AC置0后的一个图像示意图,DC集中图像中最重要的能量,因而当AC被分离后,图像的大部分信息被保存下来,细节部分更少,所以图像的分辨率将会更低。Figure 7 is a schematic diagram of an image after DCT transformation is performed on the scrambled image and AC is set to 0 according to the scrambling level of 3. DC concentrates the most important energy in the image, so when AC is separated, most of the information in the image is saved with less detail, so the resolution of the image will be lower.

图2中的S260是使用zigzag扫描S240的DCT系数得到一维的块序列,并将其中的AC系数分离出来,并使用子密钥k1进行流密码加密,作为私密部分保存。S260 in Figure 2 is to use zigzag to scan the DCT coefficients of S240 to obtain a one-dimensional block sequence, separate the AC coefficients, and use the subkey k 1 to perform stream cipher encryption and save it as a private part.

图2中的S270则对于S250生成的缩略图重新划分块,每个块的大小为8×8,对每一个块中的像素值低六位使用同一种子密钥进行置乱,该部分作为公共部分保存。S270 in Fig. 2 re-divides the thumbnail image generated by S250 into blocks, the size of each block is 8×8, and the lower six bits of the pixel value in each block are scrambled using the same seed key, and this part is used as the public key. Partially saved.

图8给出了256个灰度级的像素值进行低六位置乱的示意图,置乱后像素值不再是原始图像精确的平均值,但因为高2位没有发生变化,因而像素值还是接近于平均值。Figure 8 shows a schematic diagram of scrambling the pixel values of 256 gray levels in the lower six positions. After scrambling, the pixel value is no longer the exact average value of the original image, but because the upper 2 bits have not changed, the pixel value is still close to on average.

缩略图加密过程至S280结束;The thumbnail encryption process ends at S280;

由此得到了公共部分的弹性分辨率缩略图加密图像及私密部分的加密序列,为了衡量图像加密后消耗存储空间的成本,本发明比较了密文和明文消耗的存储空间。Thus, the encrypted image of the elastic resolution thumbnail of the public part and the encrypted sequence of the private part are obtained. In order to measure the cost of consuming storage space after image encryption, the invention compares the storage space consumed by ciphertext and plaintext.

图9比较了不同置乱级别下,加密后图像公共部分与明文之间的文件大小(单位:KB)。其中level=0时表示原图,其文件大小为39.7KB,当置乱级别为1以上时,公共部分则在0.5KB左右,也就是说,本发明保存在服务器上提供图片管理和预览的缩略图部分相比于原始图像大大减小了,这样会大幅度节省公共部分服务器的存储开销,同时能更大程度地节省带宽,提高服务器工作的性能。Figure 9 compares the file size (unit: KB) between the public part of the encrypted image and the plaintext under different scrambling levels. When level=0, it means the original image, and its file size is 39.7KB. When the scrambling level is above 1, the public part is about 0.5KB. Compared with the original image, the thumbnail part is greatly reduced, which will greatly save the storage overhead of the public part of the server, and at the same time, it can save the bandwidth to a greater extent and improve the performance of the server.

图10给出了加密后文件总体(公共部分+私密部分)与原图的文件大小对比,从图中可以看出,本发明的方案不仅没有额外的开销,反而比原始图像的存储空间降低了很多,这相比于之前的缩略图图像隐私保护算法有了很大的提升。Figure 10 shows the comparison of the file size of the encrypted file (public part + private part) and the original image. It can be seen from the figure that the solution of the present invention not only has no additional overhead, but also reduces the storage space of the original image. A lot, which is a big improvement over the previous thumbnail image privacy protection algorithm.

边缘检测是现今攻击隐私的一种常用方法,因为在图像的边界部分包含了图像中最重要的信息。本发明使用MATLAB工具箱中最常用的Canny算子边缘检测方法来评估缩略图图像的安全性。Edge detection is a common method for attacking privacy nowadays, because the most important information in the image is contained in the boundary part of the image. The invention uses the most commonly used Canny operator edge detection method in the MATLAB toolbox to evaluate the security of thumbnail images.

图11显示了原图及level0-level4不同级别下,使用边缘检测可以检测到一些特征点,其中level0和level1-level4分别表示对原图和不同分辨率缩略图进行边缘检测的结果。可见随着置乱级别的增加,图像边缘检测的效果越来越差,对于计算机视觉领域或者信号处理方面的专家来说,因为他们也收集了各种各样的数据集,也许能够从这些暴露的特征点分析一些信息,但是如果图片不在任何数据集中,那么是无法辨别图像中的内容的,或者对一个外行人来说,无法从图中的结果中获取任何的信息。Figure 11 shows the original image and different levels of level0-level4, some feature points can be detected using edge detection, where level0 and level1-level4 represent the results of edge detection on the original image and thumbnails of different resolutions, respectively. It can be seen that with the increase of the scrambling level, the effect of image edge detection is getting worse and worse. For experts in the field of computer vision or signal processing, because they also collect various data sets, they may be able to learn from these exposures. The feature points analyze some information, but if the picture is not in any dataset, then it is impossible to discern what is in the image, or for a layman, no information can be obtained from the results in the picture.

图12是缩略图图像的解密方法M1200的流程图,方法从S1210开始,S1220步中会通过子密钥k2将所有像素值的低六位还原。S1230将使用子密钥k1解密私密部分数据,得到解密AC序列。FIG. 12 is a flowchart of a method M1200 for decrypting a thumbnail image. The method starts from S1210, and in step S1220, the lower six bits of all pixel values are restored through the subkey k2. S1230 will use the subkey k 1 to decrypt the private part data to obtain the decrypted AC sequence.

S1240步中根据JPEG压缩对缩略图应用DCT变换并量化,步骤S1250使用S1230中解密的AC系数替换步骤S1240中得到的AC系数,并进行反量化和IDCT变换得到恢复的图像。In step S1240, DCT transform and quantization are applied to the thumbnails according to JPEG compression. In step S1250, the AC coefficients decrypted in S1230 are used to replace the AC coefficients obtained in step S1240, and inverse quantization and IDCT transformation are performed to obtain the restored image.

S1260根据子密钥k0对图像实施逆置乱操作,得到恢复的高清原始图像,缩略图图像解密算法在S1270结束。S1260 performs an inverse scrambling operation on the image according to the subkey k 0 to obtain a restored high-definition original image, and the thumbnail image decryption algorithm ends at S1270.

需要注意的是,最终恢复的图像不是原始图像,是因为在加密算法中使用了JPEG压缩中的有损模式,对DCT变换后的系数进行了量化操作,丢失了一部分原始图像的信息,换句话说本发明的算法是有损的,但最终的图像恢复质量是可以接受的。It should be noted that the final restored image is not the original image, because the lossy mode in JPEG compression is used in the encryption algorithm, and the coefficients after DCT transformation are quantized, which loses part of the information of the original image, in other words In other words, the algorithm of the present invention is lossy, but the final image restoration quality is acceptable.

图13中列出了本发明图像的恢复质量数据,有研究表明,当重建后图像与原图的PSNR值在28db以上时,达到人眼可以接受的图像质量。Figure 13 lists the restoration quality data of the image of the present invention. Studies have shown that when the PSNR value of the reconstructed image and the original image is above 28db, the image quality acceptable to the human eye is achieved.

从图13中可以看出,图像的恢复质量都在人眼可以接受的范围内,并且图像的重建质量几乎不会因分块的大小和置乱级别的变化而变化,这是因为图像的损失仅仅体现在DCT变换后量化的过程中,虽然本发明划分了不同的块,但每个块中的子块都为8×8的倍数,每个子块中的像素点位置并没有改变,因而图像分块的大小和子块间置乱程度都不是图像质量的影响因素。It can be seen from Figure 13 that the restoration quality of the image is within the acceptable range for human eyes, and the reconstruction quality of the image hardly changes due to the change of the block size and scrambling level, which is due to the loss of the image It is only reflected in the process of quantization after DCT transformation. Although the present invention divides different blocks, the sub-blocks in each block are multiples of 8×8, and the pixel position in each sub-block does not change, so the image Neither the size of the block nor the degree of scrambling between sub-blocks is a factor in image quality.

图14给出了不同分辨率的图像在置乱级别level=4时图像重建后的示意图。其中第一列至第三列的图像分辨率分别为256×256,512×512和1024×1024。不难发现,当图像的分辨率越高时,从人眼的角度发现不了任何图像损失的痕迹。因而本发明算法的重建质量效果是非常可观的。FIG. 14 is a schematic diagram of the image after image reconstruction when the scrambling level level=4 for images of different resolutions. The image resolutions of the first to third columns are 256×256, 512×512 and 1024×1024, respectively. It is not difficult to find that when the resolution of the image is higher, no trace of image loss can be found from the perspective of the human eye. Therefore, the reconstruction quality effect of the algorithm of the present invention is very considerable.

Claims (1)

1. A thumbnail image privacy protection method based on image compression and elastic resolution comprises a thumbnail encryption method and a thumbnail decryption method;
first part, thumbnail encryption method
In the thumbnail image encryption process, the image is finally divided into a public part and a private part, the public part is a low-resolution thumbnail, and the private part is a fully encrypted binary sequence, and the specific contents are as follows:
1, partitioning an image in a spatial domain: reading image information in a bitmap image file, and partitioning an original image according to N multiplied by N, wherein N is less than N, and the image size of the image is assumed to be N multiplied by N;
1.1, dividing each block with the size of n multiplied by n for the second time, wherein the size of each sub-block is b multiplied by b, and b is less than n;
1.2, randomly scrambling a plurality of sub-blocks in each n × n block, taking the properties of JPEG compression into consideration, and adopting n mod8 ≡ 0 and b mod8 ≡ 0 in order to better obtain the image recovery quality, wherein the number of the sub-blocks b × b participating in scrambling is determined by a sub-key k0Deciding to elastically control a resolution of the thumbnail image, and a random position of the sub-block participating in the scrambling is generated by a pseudo random number generator;
assuming that each N × N block contains m b × b sub-blocks, the scrambling level of the image is divided into 5 levels: when the level is 0, the image is not scrambled and is not compressed, and the original image is completely reserved; level is 1, and m/4 subblocks participate in scrambling; 2, m/2 subblocks participate in scrambling; sub-blocks with the level of 3, 3m/4 participate in scrambling; level is 4, and m subblocks participate in scrambling; the level is used as the seed of a pseudo-random number generator to determine the random scrambling position of the subblocks;
2, taking reference to the JPEG compression method, the image is DCT-transformed into the frequency domain through forward discrete cosine transform, wherein the DCT-transformation of the image follows the following rules:
2.1, subtracting 128 from each pixel data of the image to make the range of the pixel value fall into the range between-128 and 127, thus greatly reducing the probability that the decimal number is 3 bits after DCT conversion and being convenient for reducing the coded digit when VIL coding is used;
2.2, by combining the properties of JPEG compression, applying DCT (discrete cosine transformation) to each 8 x 8 image block to obtain 1 DC coefficient and 63 AC coefficients, and simultaneously, calling the DC coefficient as a low-frequency coefficient and the AC coefficient as a high-frequency coefficient;
3, quantizing the DCT transform result in the step 2, namely dividing each 8 multiplied by 8 block of the image by a default quantization table in JPEG compression, and rounding the result to a reserved integer; thus, most of the high frequency coefficients in the DCT coefficients become "0", and some of the coefficients that are not set to "0" will also suffer some loss in accuracy; the quantization aims at filtering high-frequency coefficients in the image, and the main information of the image is concentrated in the low-frequency part of the image, so that the compression effect can be achieved, and the main information of the image cannot be greatly influenced;
4, zigzag scanning is carried out on each 8 × 8 DCT coefficient quantized in the step 3, so that a 1 × 64 one-dimensional sequence is obtained for the 8 × 8 DCT coefficients;
4.1, separating a high-frequency coefficient AC from a low-frequency coefficient DC, storing the high-frequency coefficient as a private part, and replacing the position of the high-frequency coefficient with '0';
4.2, carrying out zero run coding and Huffman coding on the separated high-frequency coefficient, further compressing the sequence coding length of the data to obtain a binary sequence w0,w1,...,wi
4.3, carrying out stream cipher encryption on the high-frequency coefficient in the step 4.2;
the specific method for encrypting the stream cipher comprises the following steps: using subkey k1Generating a binary keystream r by a stream cipher generator0,r1,...,riAnd for the binary value w in the 4.2 stepiThe sequence is encrypted as follows to obtain wi' sequence:
Figure FDA0002538284270000021
wi' will be saved as a private part;
5, carrying out the alizgzag scanning and inverse quantization on the coefficient with the high-frequency coefficient set to be 0, discarding the detailed part of the image as the result of inverse quantization, and only keeping the rough characteristic of the image;
6, carrying out Inverse Discrete Cosine Transform (IDCT) on the DCT coefficient processed in the step 5 to transform the DCT coefficient into a spatial domain;
step 7, subtracting 128 from all pixel values in step 2.1, adding 128, and restoring the pixel values to the range of 0-255, thus obtaining the thumbnail of the corresponding scrambling level;
8, carrying out block encryption on the thumbnail in the step 7 again, wherein the size of each block is 8 multiplied by 8;
8.1, when the pixel value in each block of the thumbnail is the average value of the block, the lower six bits of the pixel in each block need to be randomly scrambled, so that the pixel value of the block is not the exact average value but is close to the average value;
8.2, to ensure the compression effect of the image, the same sub-key k is used for 64 pixels in the same block2Carrying out pixel value lower six-position scrambling;
although the sub-blocks in each block are scrambled to a certain degree in the step 1, which brings a certain difficulty for an attacker to violently crack the image, in the steps 2 to 4.1, DCT transformation is carried out on each 8 × 8 block, all ACs are set to be 0, and due to the characteristic of DCT transformation, after the IDCT transformation is carried out on the image, the value of each pixel point in each 8 × 8 block is the average value of the block, so that the average value of each 8 × 8 block after the block is scrambled is accurately exposed, and therefore, a sub-key k is adopted in the step 8.22In order to keep the correlation of the pixels in the blocks and facilitate compression, the subkeys in each block are the same, thus hiding the average value of the blocks to a certain extent and ensuring that each block has certain similarity with the original image;
second part, abbreviated diagram encryption method
9 th, the encrypted thumbnail image is blocked as 8 × 8 and a subkey k is used2Carrying out lower six-bit reduction decryption operation on the pixel value in each block;
10 th, according to the subkey k1Decrypting the high-frequency coefficient AC separated in the step 4 according to the following formula;
Figure FDA0002538284270000031
11, performing DCT transformation and quantization on the thumbnail as in steps 2-3;
11.1, replacing the high-frequency coefficient in the DCT coefficient by the decrypted high-frequency coefficient in the step 10;
11.2, carrying out inverse quantization and IDCT transformation on the thumbnail to obtain the thumbnail with higher resolution than the thumbnail in the step 8.2;
12 th, use of subkey k0And restoring the scrambled blocks to the position of the original image, and restoring the original image with high definition.
CN201810617319.7A 2018-06-15 2018-06-15 Thumbnail image privacy protection method based on image compression and elastic resolution Active CN108810555B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810617319.7A CN108810555B (en) 2018-06-15 2018-06-15 Thumbnail image privacy protection method based on image compression and elastic resolution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810617319.7A CN108810555B (en) 2018-06-15 2018-06-15 Thumbnail image privacy protection method based on image compression and elastic resolution

Publications (2)

Publication Number Publication Date
CN108810555A CN108810555A (en) 2018-11-13
CN108810555B true CN108810555B (en) 2020-09-22

Family

ID=64086635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810617319.7A Active CN108810555B (en) 2018-06-15 2018-06-15 Thumbnail image privacy protection method based on image compression and elastic resolution

Country Status (1)

Country Link
CN (1) CN108810555B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298363A (en) * 2019-06-27 2019-10-01 西安电子科技大学 A kind of secret protection LBP feature extracting method on encrypted image
CN113254680B (en) * 2020-02-10 2023-07-25 北京百度网讯科技有限公司 Cover map processing method of multimedia information, client and electronic equipment
CN111538997A (en) * 2020-03-31 2020-08-14 宇龙计算机通信科技(深圳)有限公司 Image processing method, image processing device, storage medium and terminal
CN113507546B (en) * 2021-06-01 2023-07-18 暨南大学 Image encryption method based on DCT-64
CN114553499B (en) * 2022-01-28 2024-02-13 中国银联股份有限公司 Image encryption and image processing method, device, equipment and medium
CN115002293B (en) * 2022-08-01 2022-10-25 江西财经大学 Privacy-preserving method, system and storage medium based on thumbnail format retention
CN117077187B (en) * 2023-10-18 2024-01-09 江西财经大学 A multi-level visual privacy protection method, system, device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101717441B1 (en) * 2015-06-12 2017-03-17 숭실대학교산학협력단 Apparatus and method for protecting privacy in character image
CN104851072A (en) * 2015-06-18 2015-08-19 海南大学 Robust watermarking method for medical image in cloud environment based on DFT encryption
CN107845055B (en) * 2017-07-17 2020-10-16 安徽大学 Image encryption method for resisting Facebook compression
CN107578452B (en) * 2017-07-31 2020-08-18 华南理工大学 JPEG image encryption method with compatible format and invariable size

Also Published As

Publication number Publication date
CN108810555A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108810555B (en) Thumbnail image privacy protection method based on image compression and elastic resolution
Wahab et al. Hiding data using efficient combination of RSA cryptography, and compression steganography techniques
Sirichotedumrong et al. Grayscale-based block scrambling image encryption using ycbcr color space for encryption-then-compression systems
Wright et al. Thumbnail-preserving encryption for JPEG
Mao et al. A joint signal processing and cryptographic approach to multimedia encryption
Zhang Separable reversible data hiding in encrypted image
CN106600518A (en) Image encryption method and image decryption method with visual security and data security based on compressed sensing
EP2791855A1 (en) Preserving image privacy when manipulated by cloud services
Chuman et al. Image manipulation on social media for encryption-then-compression systems
CN117077187B (en) A multi-level visual privacy protection method, system, device and storage medium
Chuman et al. Image manipulation specifications on social networking services for encryption-then-compression systems
Chai et al. TPE-ADE: Thumbnail-preserving encryption based on adaptive deviation embedding for JPEG images
Das et al. An image secret sharing technique with block based image coding
Ullah et al. Selective region based images encryption
Yang et al. Verifiable visually meaningful image encryption algorithm based on compressive sensing and (t, n)-threshold secret sharing
Jiang et al. An improved selective encryption for H. 264 video based on intra prediction mode scrambling
Sakr et al. A steganographic method based on DCT and new quantization technique
Ahmed et al. A perceptually scalable and jpeg compression tolerant image encryption scheme
Xiang et al. Degradative encryption: An efficient way to protect SPIHT compressed images
Pooranakala et al. Securing medical images using compression techniques with encryption and image steganography
CN114782563B (en) A secret image sharing method and system for JPEG images
CN115131253B (en) A Secret Image Sharing Method and System Against JPEG Heavy Compression
CN107845055B (en) Image encryption method for resisting Facebook compression
Hegde et al. An optimal modified matrix encoding technique for secret writing in MPEG video using ECC
CN115442492A (en) A visually secure image encryption method based on a newly designed one-dimensional sinusoidal chaotic map and discrete U-transform embedding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
OL01 Intention to license declared
OL01 Intention to license declared