[go: up one dir, main page]

CN108810555A - Thumbnail image method for secret protection based on compression of images with elastic resolution ratio - Google Patents

Thumbnail image method for secret protection based on compression of images with elastic resolution ratio Download PDF

Info

Publication number
CN108810555A
CN108810555A CN201810617319.7A CN201810617319A CN108810555A CN 108810555 A CN108810555 A CN 108810555A CN 201810617319 A CN201810617319 A CN 201810617319A CN 108810555 A CN108810555 A CN 108810555A
Authority
CN
China
Prior art keywords
image
block
sub
thumbnail
coefficient
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.)
Granted
Application number
CN201810617319.7A
Other languages
Chinese (zh)
Other versions
CN108810555B (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

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系数进行不同程度的加密处理,得到公共部分的缩略图及私密部分的完全加密数据;本发明中的公共部分缩略图可以用于网络应用的图片预览,并同时提供一定程度的隐私保护。利用图像压缩技术降低加密图像总体尤其是公共部分的存储开销,可以大幅度节省带宽。本发明还提供弹性分辨率的缩略图隐私保护,图像的安全性受到分辨率的影响,分辨率被控制的越低,图像的安全性就越高。

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 thumbnail resolution requirements, within each block The sub-blocks are randomly scrambled to a certain degree; combined with JPEG compression and cryptography technology, the DC and AC coefficients in the 8×8 blocks that undergo DCT transformation are encrypted to varying degrees, and the thumbnails of the public part and the private part are obtained. Data is fully encrypted; the thumbnail image of the public part in the present invention can be used for picture preview in network applications, and at the same time provide a certain degree of privacy protection. Using image compression technology to reduce the overall storage overhead of encrypted images, especially the public part, can greatly save bandwidth. The invention also provides thumbnail privacy protection with elastic resolution, the security of the image is affected by the resolution, the lower the resolution is controlled, the higher the security of the image.

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 and vivid content, thus becoming one of the most important ways of disseminating information [1]. With the rapid development of Internet applications, various cloud storage devices have begun to be used as digital image management tools. It can easily share large files asynchronously without point-to-point transmission. Even if the mobile device is lost or damaged, it can also be stored from the cloud. It can be accessed and restored on the Internet, and the cost is low, which saves a lot of costs for users to transfer and manage data. Therefore, nearly one billion new photos are uploaded to cloud applications every week.

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

解决这一问题的方法就是实行“端到端”的加密,即在发送端需要在图像上传到服务器之前就对其进行加密,这样服务器端获得的图像就是经过加密的图像,没有授权的第三方在没有密钥的情况下无法将密文图像还原到原始图像,这样便大大提高了图像内容不被窃取的安全性,对涉及到个人隐私的数字图像起到了很好的保护作用。这方面的技术包括基于矩阵变换像素置换的图像加密技术、基于秘密分割与共享的图像加密技术和基于现代密码体制的图像加密技术等[2]。The solution to this problem is to implement "end-to-end" encryption, that is, the sending end needs to encrypt the image before it is uploaded to the server, so that the image obtained by the server end is an encrypted image, and 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 very good role in protecting digital images involving personal privacy. Technologies in this area include image encryption technology based on matrix transformation pixel replacement, image encryption technology based on secret division and sharing, and image encryption technology based on modern cryptosystem [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 the image due to the incompatible format or the extreme confusion of the encrypted image, and the user cannot preview the image online. References [3] and [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 conference on information hiding and multimedia security. (TPE), choose to provide a low-resolution JPEG thumbnail for each image, which provides a compatible image format and hides the details of the image, which can protect the user's privacy to a certain extent and can be previewed 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 the image reconstruction of the TPE algorithm has obvious block effects. , the visual quality cannot reach the effect accepted by the human eye. The thumbnail privacy-preserving 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. "A Review 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 Information Hiding 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 2017 on Multimedia Privacy and Security. ACM, 2017.

【发明内容】【Content of invention】

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

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

第二、提出一种缩略图图像隐私保护方法,加密图像不仅能够保护用户的隐私,也能通过缩略图进行在线预览。Second, a thumbnail image privacy protection method is proposed. The encrypted image can not only protect the user's privacy, but also preview online through the thumbnail.

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

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

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

为了解决上述问题,本发明提出了建立原始图像的低分辨缩略图。缩略图中丢弃了图像的细节部分,只保留图像的大致轮廓,并且从缩略图中很难恢复到近似的原始图像。这种方式既保护了图像中的隐私信息,又可以通过加密图像进行在线预览。In order to solve the above problems, the present invention proposes to create a low-resolution thumbnail of the original image. The detail part of the image is discarded in the thumbnail, only the rough outline of the image is kept, 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 through encrypted images.

为了解决上述问题,本发明使用图像压缩技术,控制图像加密后带来的额外存储开销,并通过合理的图像量化,去除图像的冗余,尽可能地降低原始文件的大小。并且结合图像压缩技术的特点,将加密后的图像分为公共部分和私密部分。公共部分为体积很小的缩略图,通过缩略图进行在线预览时仅仅加载公共部分,可以大幅度节省带宽。In order to solve the above problems, the present invention uses image compression technology to control the additional storage overhead caused by image encryption, and through reasonable image quantization, image redundancy is removed 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 problems, the present invention provides a thumbnail image encryption technology with elastic resolution, and the exposure degree of image details is controlled by the user himself. At the same time, the security of the image not only depends on the security of the algorithm, but also depends on the size of the thumbnail resolution. The higher the resolution of the image, the less the details of the image are exposed, and the higher the security of the image.

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

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

一种基于图像压缩与弹性分辨率的缩略图图像隐私保护方法,该方法包括缩略图加密方法和缩略图解密方法两部分;A thumbnail image privacy protection method based on image compression and elastic resolution, the method includes two parts: 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 into blocks 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, and 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 obtain better image restoration quality, n mod8≡0, b mod8≡0, and b involved in scrambling The number of ×b sub-blocks is determined by the sub-key k 0 to flexibly control the resolution of the thumbnail image, and the random positions of the sub-blocks participating in the 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 b×b sub-blocks, then the degree of scrambling of the image is divided into 5 levels: when level=0, the image is not scrambled or 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 DCT transformation of the image should follow the following rules:

第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 into the range between -128 and 127, which can greatly reduce the probability that the decimal number is 3 digits after DCT transformation, 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, DCT transformation is applied to each 8×8 image block to obtain 1 DC coefficient and 63 AC coefficients. At the same time, the DC coefficient is called a low-frequency coefficient, and the AC coefficient is called a high-frequency coefficient;

`3、对第2步中的DCT变换结果进行量化,即将图像每8×8的块除以JPEG压缩中的缺省量化表,结果四舍五入保留整数;这样DCT系数中的大部分高频系数变为“0”,一些没有被置为“0”的系数也会在精度上有些损失;量化的目的在于过滤图像中的高频系数,图像的主要信息集中在图像的低频部分,这样可以起到压缩的作用,又不会对图像的主要信息产生大的影响。`3. Quantize the DCT transformation result in step 2, that is, divide each 8×8 block of the image by the default quantization table in JPEG compression, and round the result to an integer; thus most of the high-frequency coefficients in the DCT coefficients become is "0", some coefficients that are not set to "0" will also lose some precision; 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 The effect of compression will not have a big impact on the main information of the image.

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

第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,...,wiStep 4.2. Perform zero-run encoding and Huffman encoding on the separated high-frequency coefficients, further compress the sequence encoding length of the data, and obtain binary sequences w 0 , w 1 ,..., w i ;

第4.3、对经过第4.2步的高频系数进行流密码加密;The 4.3rd, carry out stream cipher encryption to the high-frequency coefficient through the 4.2 step;

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

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 izigzag scanned and dequantized. The result of dequantization discards the details of the image and only retains the rough features of the image;

第6、对经过第5步处理的DCT系数进行逆向离散余弦变换(IDCT)变换至空间域;The 6th, carry out inverse discrete cosine transform (IDCT) transformation to the space domain through the DCT coefficient processed in the 5th step;

第7、在第2.1步中将所有的像素值减去128,在此将会加上128,将像素值恢复到0-255的范围,这样便得到了相应置乱等级的缩略图;Step 7. Subtract 128 from all pixel values in step 2.1, and add 128 here to restore the pixel value to the range of 0-255, thus obtaining a thumbnail image of the corresponding scrambling level;

第8、再次将第7步中的缩略图进行分块加密,每个块大小为8×8;Step 8. Encrypt the thumbnail in step 7 again, each block size 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 accurate average value, but close to the mean;

第8.2、为了保证图像的压缩效果,对于同一个块内的64个像素使用同一子密钥k2进行像素值低六位置乱;Section 8.2, in order to ensure the compression effect of the image, use the same subkey k 2 for 64 pixels in the same block to scramble the lower six positions of the pixel value;

虽然在第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 the first step, it brings a certain degree of difficulty for the attacker to brute-force the image. However, in steps 3-4.1, the DCT transformation is performed on each 8×8 block, and all ACs are set to “0”. Due to the characteristics of DCT transformation, after the image undergoes IDCT transformation, each 8×8 block The value of the pixel in is the average value of the block, thus accurately exposing the average value of each 8×8 block after inter-block scrambling. Therefore, in step 8.2, the subkey k 2 is used 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 subkeys in each block are 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对每个块中的像素值进行低六位还原解密操作;Step 9. Divide the encrypted thumbnail image into 8×8 blocks, and use the subkey k 2 to restore and decrypt the lower six bits of the pixel value in each block;

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

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

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

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

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

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

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

1、本发明提供了弹性分辨率的隐私保护方案,在实际应用中可以由用户自己控制图像的分辨率。同时弹性的分辨率也伸缩性地控制了缩略图的安全性,对于安全性要求不是很高的图像可以采取较高的分辨率,便于在线预览;安全性要求很强的图像采用低分辨率,便于图像隐私保护;1. The present invention provides a privacy protection scheme with flexible resolution, and in practical applications, the resolution of the image can be controlled by the user himself. At the same time, the elastic resolution also flexibly controls the security of the thumbnails. For images with low security requirements, a higher resolution can be used for online preview; for images with strong security requirements, low resolution can be used. 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 these two parts can decrypt the image alone, which makes it more difficult for attackers 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 in the image, but also reduces the storage cost of the encrypted image more efficiently, and because the present invention’s scheme The resolution in the image is flexible, so when the selected resolution is higher, the advantage of saving the storage cost of the encrypted image will be more obvious. Whether it is high resolution or low resolution, the size of the encrypted image 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 transformation is used, and the coefficients are quantized, which makes the original image lose some information irretrievably. In other words, the solution of the present invention is lossy. However, under the premise of ensuring image security and compression efficiency, it provides acceptable image restoration quality.

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

【附图说明】【Description of drawings】

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

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

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

图4是根据本发明的一个实施例中32×32分块,置乱等级为1-4时,子块间随机置乱的示例;FIG. 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 diagram of scrambling between image sub-blocks under different scrambling levels;

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

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

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

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

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

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

图12为缩略图图像解密算法M1200流程图;Fig. 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 renderings of three different resolution images.

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

下面将结合附图介绍本发明的具体实施方式。The specific implementation manners of the present invention will be described below in conjunction with the accompanying drawings.

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

实施例1:Example 1:

图2给出了本发明算法加密过程的一个M200实施例的流程图。FIG. 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 blocks, divides an image with an image size of 256×256 into 64 32×32 blocks, divides each 32×32 block into 8×8 sub-blocks, and S230 divides the sub-blocks in each block Perform random scrambling. In this process, the degree of scrambling between sub-blocks is determined by the level of scrambling. The level is different, and the degree of scrambling between sub-blocks is different, which directly determines the resolution of the final image. The randomness of sub-blocks The scrambling position is determined by the subkey k 0 (see M300 for the detailed inter-subblock scrambling process).

图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, and the right picture is the result of random scrambling of the sub-blocks in the left picture. The shaded blocks are randomly selected blocks that need 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, when the scrambling level is 1, 4 blocks that need to be scrambled are randomly selected, ..., and so on, the scrambling level is 4, random scrambling is performed in all 16 sub-blocks, as shown in FIG. 4 .

图5中依次给出了不同置乱等级下图像子块间置乱效果图,可以看出这种局部块置乱的效果依然可以看出图像的大致轮廓。当level=0时图像保持原图,随着置乱等级的增加,图像会变得越来越模糊,这为本发明算法中弹性分辨率缩略图奠定了基础。Figure 5 shows the effect diagrams of scrambling between image sub-blocks under different scrambling levels in turn. It can be seen that the rough outline of the image can still be seen in the effect of local block scrambling. 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 Figure 2 performs DCT transformation on every 8×8 block of the image according to the method in JPEG compression, and quantizes it to obtain high-frequency coefficient DC and low-frequency coefficient AC, and retains DC and separates AC.

图2中的S250则将S240中原始AC系数的部分置0,并实施反量化和IDCT变换,得到分辨率更低的缩略图图像。S250 in FIG. 2 sets the part of the original AC coefficients in S240 to 0, and performs inverse quantization and IDCT transformation to obtain a thumbnail image with 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 figure is the DC coefficient, and the rest are AC coefficients. The right figure shows the original AC coefficient after it is separated. position is set to 0.

图7是根据置乱等级为3,将置乱后的图像进行DCT变换并AC置0后的一个图像示意图,DC集中图像中最重要的能量,因而当AC被分离后,图像的大部分信息被保存下来,细节部分更少,所以图像的分辨率将会更低。Figure 7 is a schematic diagram of an image after performing DCT transformation on the scrambled image and setting AC 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 are preserved, the details are less, so the resolution of the image will be lower.

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

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

图8给出了256个灰度级的像素值进行低六位置乱的示意图,置乱后像素值不再是原始图像精确的平均值,但因为高2位没有发生变化,因而像素值还是接近于平均值。Figure 8 shows a schematic diagram of 256 gray-level pixel values scrambling 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 the storage space consumed after the image is encrypted, the present invention compares the storage space consumed by the ciphertext and the 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 represents the original picture, 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 server in the public part, and at the same time save bandwidth to a greater extent and improve the performance of the server.

图10给出了加密后文件总体(公共部分+私密部分)与原图的文件大小对比,从图中可以看出,本发明的方案不仅没有额外的开销,反而比原始图像的存储空间降低了很多,这相比于之前的缩略图图像隐私保护算法有了很大的提升。Figure 10 shows the file size comparison between the encrypted file overall (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 great improvement compared to the previous thumbnail image privacy protection algorithm.

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

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

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

S1240步中根据JPEG压缩对缩略图应用DCT变换并量化,步骤S1250使用S1230中解密的AC系数替换步骤S1240中得到的AC系数,并进行反量化和IDCT变换得到恢复的图像。In step S1240, apply DCT transformation and quantization to the thumbnail image according to JPEG compression. In step S1250, replace the AC coefficient obtained in step S1240 with the AC coefficient decrypted in S1230, and perform inverse quantization and IDCT transformation to obtain a 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, and part of the information of the original image is lost. In other words It is said that 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 human eyes can be achieved.

从图13中可以看出,图像的恢复质量都在人眼可以接受的范围内,并且图像的重建质量几乎不会因分块的大小和置乱级别的变化而变化,这是因为图像的损失仅仅体现在DCT变换后量化的过程中,虽然本发明划分了不同的块,但每个块中的子块都为8×8的倍数,每个子块中的像素点位置并没有改变,因而图像分块的大小和子块间置乱程度都不是图像质量的影响因素。It can be seen from Figure 13 that the restoration quality of the image is within the acceptable range of the human eye, and the reconstruction quality of the image will hardly change due to the change of the size of the block and the level of scrambling, because 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 positions in each sub-block have not changed. Therefore, the image Neither the block size nor the degree of scrambling between sub-blocks is an influencing factor of image quality.

图14给出了不同分辨率的图像在置乱级别level=4时图像重建后的示意图。其中第一列至第三列的图像分辨率分别为256×256,512×512和1024×1024。不难发现,当图像的分辨率越高时,从人眼的角度发现不了任何图像损失的痕迹。因而本发明算法的重建质量效果是非常可观的。FIG. 14 shows a schematic diagram of reconstructed images of images with different resolutions when the scrambling level is level=4. The image resolutions of the first column to the third column 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 kind of thumbnail image method for secret protection based on compression of images with elastic resolution ratio, this method includes that thumbnail adds Decryption method and thumbnail decryption method two parts;
First part, thumbnail encryption method
Image is eventually divided into common portion and private part by thumbnail image ciphering process, and common portion contracts for low resolution Sketch map, private part are complete encrypted binary sequence, and particular content is as follows:
1st, by image block in spatial domain:First read the image information in bitmap image file, it is assumed that the image of the image Size be N × N, to original image according to n × n carry out piecemeal, n < N, similarly hereinafter;
1.1st, secondary divided block carried out to the block of each n × n, the size of each sub-block is b × b, b < n, similarly hereinafter;
1.2nd, random scrambling is carried out to several sub-blocks in every n × n blocks, it is contemplated that the property of JPEG compression, in order to preferably Image Quality of recovery is obtained, 8 ≡ 0 of n mod, 8 ≡ 0 of b mod is taken to participate in the number of b × b sub-blocks of scramble by sub-key k0 It determines, the resolution ratio of thumbnail image is flexibly controlled with this, and participate in the random site of the sub-block of scramble by pseudo random number Generator generates;
Assuming that including the sub-block of m b × b in the block of each N × N, then the scramble degree of image is divided into 5 grades:Level= When 0, scramble does not compress image yet, and artwork is fully retained;Level=1, m/4 sub-block participate in scramble;The son of level=2, m/2 Block participates in scramble;The sub-block of level=3,3m/4 participate in scramble;Level=4, m sub-blocks are involved in scramble;Level is by conduct " seed " of pseudorandom number generator determines the random scrambling position of sub-block;
2nd, it uses for reference JPEG compression method and image is converted into frequency domain by Forward Discrete Cosine Transform (DCT), here to image Following rule should be followed by carrying out dct transform:
2.1st, each pixel data of image being subtracted 128 so that the range of pixel value falls into the range between -128 to 127, Decimal number reduces the position of coding for 3 probability when being easy to use VIL codings after dct transform can be substantially reduced in this way Number;
2.2nd, 1 DC coefficient and 63 are obtained to each 8 × 8 image block application dct transform in conjunction with the property of JPEG compression A AC coefficients, while DC coefficients are known as low frequency coefficient, AC coefficients are referred to as high frequency coefficient;
3rd, the dct transform result in the 2nd step is quantified, i.e., it will be default in the block divided by JPEG compression of image every 8 × 8 Quantify table, as a result rounds up and retain integer;Most of high frequency coefficient in this way in DCT coefficient becomes " 0 ", some are not set to It some can also be lost in precision for the coefficient of " 0 ";The purpose of quantization be filter image in high frequency coefficient, image it is main Information concentrates on the low frequency part of image, can play the role of compression in this way, and will not be generated to the main information of image big Influence;
4th, every 8 × 8 DCT coefficient after quantifying to the 3rd step carries out zigzag scannings, the in this way DCT coefficient for 8 × 8 pieces It will obtain 1 × 64 one-dimensional sequence;
4.1st, high frequency coefficient AC is detached with low frequency coefficient DC, high frequency coefficient is stored as private part, and by high frequency coefficient Position replace with " 0 ";
4.2nd, zero RLE and Huffman encoding, the sequential coding of further compressed data are carried out to the high frequency coefficient of separation Length obtains binary sequence w0, w1..., wi
4.3rd, stream cipher encrypting is carried out to the high frequency coefficient of the 4.2nd step;
The specific method of stream cipher encrypting is:Use sub-key k1Binary key stream r is generated by stream cipher generator0, r1..., ri, and to the binary system w in the 4.2nd stepiSequence obtains encrypted w as followsi' sequence:
wi' private part will be used as to preserve;
5th, izigzag scannings thus are carried out to the coefficient after high frequency coefficient reset and inverse quantization, the result of inverse quantization abandons The detail section of image only remains image rough features;
6th, reverse discrete cosine transform (IDCT) is carried out to the DCT coefficient by the processing of the 5th step and is converted into spatial domain;
7th, all pixel values are subtracted 128 in the 2.1st step, 128 will be added herein, pixel value is restored to 0-255 Range, just obtained the thumbnail of corresponding scramble grade in this way;
8th, the thumbnail in the 7th step is subjected to block encryption again, each block size is 8 × 8;
8.1st, each of thumbnail pixel value in the block is the average value of the block at this time, thus needs to each picture in the block The low six progress random scrambling of element so that the pixel value of the block is not accurate average value, but close to average value;
8.2nd, in order to ensure the compression effectiveness of image, same sub-key k is used for 64 pixels in same piece2It carries out Low six position of pixel value is random;
Although having carried out a degree of scramble to each sub-block in the block in step 1, attacker's Brute Force picture strip is given Difficulty centainly is carried out.But in the 4.1st steps of 3-, dct transform is carried out to every 8 × 8 block, and by all AC resets, Due to the characteristic of dct transform so that after image carries out idct transform, the value of pixel is being averaged for the block in each 8 × 8 pieces Value just accurately exposes between block 8 × 8 pieces each of after scramble of average value in this way.Thus sub-key is taken in the 8.2nd step k2As " seed " of random number generator, low six progress random scrambling of each pixel value in the block to each 8 × 8;For The correlation of pixel in maintainance block, convenient for compression, each sub-key in the block is identical, not only hides to a certain extent in this way The average value of block, and each block is made with artwork to have certain similarity;
Second part, thumbnail decryption method
9th, encrypted thumbnail image is subjected to piecemeal according to 8 × 8, and uses sub-key k2To each pixel value in the block Carry out low six reduction decryption oprerations;
10th, according to sub-key k1The high frequency coefficient AC detached in the 4th step is decrypted as follows;
11st, thumbnail is carried out such as the dct transform in the 3rd steps of 2- and quantization;
11.1st, the high frequency coefficient in DCT coefficient is replaced by the high frequency coefficient decrypted in the 10th step;
11.2nd, inverse quantization is carried out to thumbnail and idct transform obtains slightly high-resolution thumbnail;
12nd, sub-key k is used0The block of scramble is restored to the position of original image, reverts to the original image of 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 true CN108810555A (en) 2018-11-13
CN108810555B 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)

Cited By (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
CN111538997A (en) * 2020-03-31 2020-08-14 宇龙计算机通信科技(深圳)有限公司 Image processing method, image processing device, storage medium and terminal
CN113254680A (en) * 2020-02-10 2021-08-13 北京百度网讯科技有限公司 Cover page graph processing method of multimedia information, client and electronic equipment
CN113507546A (en) * 2021-06-01 2021-10-15 暨南大学 Image encryption method based on DCT-64
CN114553499A (en) * 2022-01-28 2022-05-27 中国银联股份有限公司 Image encryption method, image processing method, device, equipment and medium
CN115002293A (en) * 2022-08-01 2022-09-02 江西财经大学 Privacy-preserving method, system and storage medium based on thumbnail format retention
CN117077187A (en) * 2023-10-18 2023-11-17 江西财经大学 Multistage visual privacy protection method, system, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104851072A (en) * 2015-06-18 2015-08-19 海南大学 Robust watermarking method for medical image in cloud environment based on DFT encryption
KR101717441B1 (en) * 2015-06-12 2017-03-17 숭실대학교산학협력단 Apparatus and method for protecting privacy in character image
CN107578452A (en) * 2017-07-31 2018-01-12 华南理工大学 A JPEG Image Encryption Method with Compatible Format and Invariant Size
CN107845055A (en) * 2017-07-17 2018-03-27 安徽大学 The image encryption method of anti-Facebook compressions

Patent Citations (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
CN107845055A (en) * 2017-07-17 2018-03-27 安徽大学 The image encryption method of anti-Facebook compressions
CN107578452A (en) * 2017-07-31 2018-01-12 华南理工大学 A JPEG Image Encryption Method with Compatible Format and Invariant Size

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘九芬等: "基于重复压缩的密文图像可逆数据隐藏方法", 《通信学报》 *
殷赵霞: "面向隐私保护的数字图像隐写方法研究", 《中国博士学位论文全文数据库》 *
程航: "密文JPEG图像检索研究", 《中国博士学位论文全文数据库》 *

Cited By (12)

* 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
CN113254680A (en) * 2020-02-10 2021-08-13 北京百度网讯科技有限公司 Cover page graph processing method of multimedia information, client and electronic equipment
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
CN113507546A (en) * 2021-06-01 2021-10-15 暨南大学 Image encryption method based on DCT-64
CN113507546B (en) * 2021-06-01 2023-07-18 暨南大学 Image encryption method based on DCT-64
CN114553499A (en) * 2022-01-28 2022-05-27 中国银联股份有限公司 Image encryption method, image processing method, device, equipment and medium
CN114553499B (en) * 2022-01-28 2024-02-13 中国银联股份有限公司 Image encryption and image processing method, device, equipment and medium
CN115002293A (en) * 2022-08-01 2022-09-02 江西财经大学 Privacy-preserving method, system and storage medium based on thumbnail format retention
CN115002293B (en) * 2022-08-01 2022-10-25 江西财经大学 Privacy-preserving method, system and storage medium based on thumbnail format retention
CN117077187A (en) * 2023-10-18 2023-11-17 江西财经大学 Multistage visual privacy protection method, system, equipment and storage medium
CN117077187B (en) * 2023-10-18 2024-01-09 江西财经大学 A multi-level visual privacy protection method, system, device and storage medium

Also Published As

Publication number Publication date
CN108810555B (en) 2020-09-22

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
Zhang Separable reversible data hiding in encrypted image
Itier et al. Recompression of JPEG crypto-compressed images without a key
CN112134681B (en) Image compression encryption method and cloud-assisted decryption method
CN106997607B (en) Image bit plane chaotic encryption method based on compressive sensing
Li et al. Survey on JPEG compatible joint image compression and encryption algorithms
Xiao et al. Multi-focus image fusion and robust encryption algorithm based on compressive sensing
Chuman et al. Image manipulation specifications on social networking services for encryption-then-compression systems
Yang et al. Efficient color image encryption by color-grayscale conversion based on steganography
Yang et al. Dual embedding model: a new framework for visually meaningful image encryption
Li et al. Medical images lossless recovery based on POB number system and image compression
Yang et al. Verifiable visually meaningful image encryption algorithm based on compressive sensing and (t, n)-threshold secret sharing
Sakr et al. A steganographic method based on DCT and new quantization technique
Ullah et al. Selective region based images encryption
Xiang et al. Degradative encryption: An efficient way to protect SPIHT compressed images
CN115131253B (en) A Secret Image Sharing Method and System Against JPEG Heavy Compression
CN107845055B (en) Image encryption method for resisting Facebook compression
CN114782563B (en) A secret image sharing method and system for JPEG images
Abed A proposed encoding and hiding text in an image by using fractal image compression
CN115208549A (en) JPEG image reversible information hiding method and system based on Paillier homomorphic encryption
Gupta et al. Effect on reconstruction of images by applying fractal based lossy compression followed by symmetrical encryption techniques
Cao et al. Two-dimensional compressed sensing using two-dimensional random permutation for image Encryption-then-Compression applications

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