An availability-enhanced frequency domain thumbnail preservation encryption method
By using a frequency domain thumbnail-based encryption method, the AC coefficients of an image are encrypted and space is reserved to record additional information. This solves the problems of JPEG format incompatibility and non-visual usability in existing technologies, and achieves a balance between compatibility and privacy when embedding additional information in encrypted images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2023-04-27
- Publication Date
- 2026-07-10
AI Technical Summary
Existing thumbnail-keeping encryption methods operate in the spatial domain, resulting in incompatibility with the JPEG format, failure to achieve non-visual usability, and inability to embed additional information in encrypted images.
A frequency domain thumbnail-preserving encryption method is adopted. By encrypting the AC coefficients of each 8×8 block and reserving space at fixed positions to record additional information, while keeping the DC coefficients unchanged, visual similarity between the encrypted image and the original image is achieved, and the operation is performed in the frequency domain.
While maintaining compatibility with the JPEG format, it achieves non-visual usability of images, enabling the embedding of additional information in encrypted images, thus balancing privacy and visual usability.
Smart Images

Figure CN116471364B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and privacy protection, specifically to a frequency domain thumbnail preservation encryption method with enhanced usability. Background Technology
[0002] In recent years, the number of images created daily has reached an unprecedented scale. Consequently, more and more people are accustomed to uploading their pictures to cloud platforms such as Baidu Cloud, iCloud, and Google Cloud to save local storage space. However, since these everyday images often contain various sensitive personal information, such as location, appearance, and interpersonal relationships, directly publishing plaintext images in the cloud is insecure. Thumbnail-preserving encryption technology, as a cloud image privacy protection technology that balances visual usability and privacy, has received considerable attention in recent years. Visual usability here refers to the ability of someone with prior knowledge to still visually identify the encrypted image. Privacy refers to the fact that the details of the plaintext image are hidden and cannot be recognized by a person without prior knowledge. In its implementation, thumbnail-preserving encryption aims to preserve the average pixel value of each block to maintain visual usability, while encrypting all remaining information of the plaintext image to protect privacy.
[0003] However, apart from the scheme proposed by Wright et al., other existing schemes operate in the spatial domain and are therefore incompatible with the JPEG format. The scheme proposed by Wright et al. not only displays the entire list of pixels in each block but also fails to achieve non-visual usability. Here, non-visual usability refers to the ability to support the hiding of additional information in the encrypted image. In other words, the encrypted image, even after thumbnail preservation, still has room for information embedding. Non-visual usability is important for improving user experience because it allows users to embed various information, such as timestamps, location, and device information, into the encrypted image for annotation or entertainment. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to address the deficiencies mentioned in the background art by providing a frequency domain thumbnail preservation encryption method with enhanced usability, which achieves non-visual usability, i.e., the ability to embed additional information, while balancing privacy and visual usability.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0006] A usability-enhanced frequency domain thumbnail preservation encryption method includes the following steps:
[0007] Step 1): Preprocess the original image, and then use the existing frequency domain information hiding algorithm to make room for recording additional information later in a fixed position in each 8×8 block.
[0008] Step 2): Encrypt the low bits of all AC coefficients in each 8×8 block according to the preset encryption bits, while keeping the DC coefficients of each block unchanged, so as to achieve a visual effect that is similar to the original image thumbnail in the encrypted image thumbnail.
[0009] Step 3): Record the additional information in the space reserved in each block, and ensure that the amount of information recorded is less than the carrying capacity of the area.
[0010] As a further optimization of the frequency domain thumbnail preservation encryption method for enhanced usability of the present invention, the specific steps for preprocessing the original image in step 1) are as follows:
[0011] If the original image is a PNG image, then first convert the PNG image from RGB space to YCrCb space:
[0012]
[0013] In the formula, R, G, and B represent the red, green, and blue channels of the image, respectively, and Y, Cb, and Cr represent the luminance, blue chrominance, and red chrominance channels of the image, respectively. Then, the three channels of the image converted to the YCrCb space are downsampled according to a 4:2:2 ratio. Next, an 8×8 block DCT transform is performed on the downsampled image:
[0014]
[0015] In the formula, uvv∈{1,2,…,8}, F and f represent the image blocks before and after the DCT transformation, respectively. Finally, the image after the DCT transformation is quantized.
[0016] If the original image is directly in JPEG format, entropy decoding is performed. Entropy decoding is the inverse process of entropy coding. In entropy coding, the coefficients within each 8×8 block are first scanned in zigzag order. Differential pulse modulation (DPWM) coding is used for the DC coefficients, that is, the difference between the DC coefficients of adjacent blocks is encoded to save space. Simultaneously, run-length encoding is performed on the AC coefficients. Subsequently, Huffman coding is performed again on the encoded DC and AC coefficients.
[0017] As a further optimization of the frequency domain thumbnail preservation encryption method for enhanced usability of the present invention, the detailed steps of step 2) are as follows:
[0018] The image after passing through the space is divided into 8×8 blocks. The preset encryption bits are the lower θ bits of the AC coefficients within each block. For any block I, the lower θ bits of its AC coefficients are encrypted using a stream cipher. First, generate the key matrix K:
[0019] K(x,y)=Gen(T,K e (x,y,θ)
[0020] In the formula, Gen(·) represents a pseudo-random integer generator, T is a random number, and T is different for each image, K e Let K be the encryption key, x,y∈{1,2,…,8}. Subsequently, K is used to encrypt the AC coefficients after space-wise processing:
[0021]
[0022] In the formula, {λ1,…,λ p} represents the position where the AC coefficients are left blank. Finally, entropy encoding is performed on the stream-encrypted image block I′, and the ciphertext image is obtained by combining all the processed image blocks.
[0023] As a further optimization of the frequency domain thumbnail preservation encryption method for enhanced usability of the present invention, the detailed steps of step 3) are as follows:
[0024] First, entropy decoding is performed on the encrypted image. Then, the additional information to be embedded is encrypted and overwritten into the previously freed-up space. Here, the capacity `cap` available for recording the additional information is:
[0025]
[0026] In the formula, M and N are the height and width of the original image, respectively, and p represents the number of coefficients reserved in each block for recording additional information. Finally, entropy encoding is performed on the image after information embedding to obtain the labeled ciphertext image.
[0027] The advantages of this invention compared to existing technologies are as follows:
[0028] While balancing image privacy and visual usability, it retains the non-visual usability of the original image, allowing additional information to be hidden; it is compatible with the JPEG image format and operates in the frequency domain. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the image encryption and embedding process in this invention;
[0030] Figure 2 This is a schematic diagram of the image restoration process in this invention;
[0031] Figure 3 This is the schematic representation of Y-channel quantization in this invention;
[0032] Figure 4 This is the intended representation of the Cb and Cr channels in this invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. To make the above-mentioned objectives, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] like Figure 1 As shown, this invention discloses a usability-enhanced frequency domain thumbnail preservation encryption method, comprising the following steps:
[0035] Step 1): Preprocess the original image, and then use the existing frequency domain information hiding algorithm to make room for recording additional information later in a fixed position in each 8×8 block.
[0036] Step 2): Encrypt the low bits of all AC coefficients in each 8×8 block according to the preset encryption bits, while keeping the DC coefficients of each block unchanged, so as to achieve a visual effect that is similar to the original image thumbnail in the encrypted image thumbnail.
[0037] Step 3): Record the additional information in the space reserved in each block, and ensure that the amount of information recorded is less than the carrying capacity of the area.
[0038] The specific steps for preprocessing the original image in step 1) are as follows:
[0039] If the original image is a PNG image, then first convert the PNG image from RGB space to YCrCb space:
[0040]
[0041] In the formula, R, G, and B represent the red, green, and blue channels of the image, respectively, and Y, Cb, and Cr represent the luminance, blue chrominance, and red chrominance channels of the image, respectively. Then, the three channels of the image converted to the YCrCb space are downsampled according to a 4:2:2 ratio. Next, an 8×8 block DCT transform is performed on the downsampled image:
[0042]
[0043] In the formula, u,v∈{1,2,…,8}, F and f represent the image blocks before and after the DCT transformation, respectively. Finally, the image after the DCT transformation is quantized. During the quantization process, the Y channel uses... Figure 3 The quantization matrix shown uses Cb and Cr channels. Figure 4 The quantization matrix shown.
[0044] If the original image is directly in JPEG format, entropy decoding is performed. Entropy decoding is the inverse process of entropy coding. In entropy coding, the coefficients within each 8×8 block are first scanned in zigzag order. Differential pulse modulation (DPWM) coding is used for the DC coefficients, that is, the difference between the DC coefficients of adjacent blocks is encoded to save space. Simultaneously, run-length encoding is performed on the AC coefficients. Subsequently, Huffman coding is performed again on the encoded DC and AC coefficients.
[0045] The detailed steps for step 2) are as follows:
[0046] The image after passing through the space is divided into 8×8 blocks. The preset encryption bits are the lower θ bits of the AC coefficients within each block. For any block I, the lower θ bits of its AC coefficients are encrypted using a stream cipher. First, generate the key matrix K:
[0047] K(x,y)=Gen(T,K e (x,y,θ)
[0048] In the formula, Gen(·) represents a pseudo-random integer generator, T is a random number, and T is different for each image, K e Let x,y∈{1,2,…,8} be the encryption key.
[0049] K is used to encrypt the AC coefficients after space-saving processing:
[0050]
[0051] In the formula, {λ1,…,λ p} represents the position of the left blank AC coefficient.
[0052] Finally, entropy encoding is performed on the image block I′ that has been stream encrypted, and the ciphertext image is obtained by combining all the processed image blocks.
[0053] The detailed steps for step 3) are as follows:
[0054] First, entropy decoding is performed on the encrypted image. Then, the additional information to be embedded is encrypted and overwritten into the previously freed-up space. Here, the capacity `cap` available for recording the additional information is:
[0055]
[0056] In the formula, M and N are the height and width of the original image, respectively, and p represents the number of coefficients reserved in each block for recording additional information. Finally, entropy encoding is performed on the image after information embedding to obtain the labeled ciphertext image.
[0057] The image decryption diagram of the present invention is shown below. Figure 2As shown, the specific steps include:
[0058] First, entropy decoding is performed on the image, followed by additional information extraction and original image restoration steps. The additional information extraction step simply extracts the information placed in the reserved space within each block. The original image restoration step first requires decrypting the image to obtain Ω from the reserved space, and then performing the inverse process of frequency domain information hiding based on histogram shift to restore the image.
[0059] This invention combines existing research in visual psychology with the core idea of information embedding based on the frequency domain. It frees up space for additional information recording operations and balances image privacy and visual usability by retaining the DC coefficients within the block and encrypting the remaining AC coefficients.
[0060] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0061] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A frequency domain thumbnail preservation encryption method with enhanced usability, characterized in that, Includes the following steps: Step 1) Preprocess the original image, then use existing frequency domain information hiding algorithms to create space in each... Space is reserved at fixed locations within the block to allow for the recording of additional information later. The specific steps for preprocessing the original image are as follows: Step 1.1), if the original image is a PNG format image, then process it as follows: Step 1.1.1), convert the PNG image from RGB space to YCrCb space: ; In the formula, , and These represent the red, green, and blue channels of the image, respectively. , Cb and These represent the image's brightness, blue chroma, and red chroma channels, respectively. Step 1.1.2), perform the conversion of the image to YCrCb space according to a 4:2:2 ratio. Cb The channel is downsampled; Step 1.1.3), perform the following steps on the downsampled image: Block-based DCT transform: ; In the formula, , , and These represent image blocks before and after the DCT transformation, respectively. Step 1.1.4): Quantize the image after DCT transformation; Step 1.2): If the original image is directly in JPEG format, then perform entropy decoding on it. Entropy decoding is the inverse process of entropy coding. The detailed steps of entropy coding are as follows: Step 1.2.1), for each The coefficients within a block are scanned in zigzag order. Differential pulse modulation coding is used for the DC coefficients, that is, the difference between the DC coefficients of adjacent blocks is encoded to save space, while run-length coding is used for the AC coefficients. Step 1.2.2), perform Huffman coding again on the encoded DC and AC coefficients; Step 2), according to the preset encryption bits, for each The low bits of all AC coefficients in the block are encrypted, while the DC coefficients of each block remain unchanged, so as to achieve a visual effect that the encrypted image thumbnail is similar to the original image thumbnail. Step 3) Record the additional information in the space reserved in each block, and ensure that the amount of information recorded is less than the carrying capacity of the area.
2. The usability-enhanced frequency domain thumbnail preservation encryption method as described in claim 1, characterized in that, The detailed steps of step 2) are as follows: Step 2.1), the image after the space is cleared is... The data is divided into blocks of a certain size, with the preset encryption bits being the lower of the AC coefficients within each block. For any block of it, the bit Using stream ciphers to adjust the low AC coefficients within them The encryption process involves the following steps: Step 2.1.1), generate the key matrix. : ; In the formula, This represents a pseudo-random integer generator. For each image, the corresponding random number is... different, For encryption key, ; Step 2.1.2), using The AC coefficients after encryption and space-saving processing: ; In the formula, The position of the left blank AC coefficient; Step 2.2), segment the stream-encrypted image into blocks. Entropy coding is performed, and the ciphertext image is obtained by combining all the processed image blocks.
3. The usability-enhanced frequency domain thumbnail preservation encryption method as described in claim 1, characterized in that, The detailed steps of step 3) are as follows: Step 3.1) Perform entropy decoding on the ciphertext image; Step 3.2) Encrypt the additional information to be embedded and overwrite the previously freed-up space with the capacity available for recording additional information. for: ; In the formula, and These are the height and width of the original image, respectively. This represents the number of coefficients freed up in each block for recording additional information; Step 3.3) performs entropy encoding on the image after information embedding to obtain the labeled ciphertext image.