Next Article in Journal
Large Language Models for Predictive Maintenance in the Leather Tanning Industry: Multimodal Anomaly Detection in Compressors
Previous Article in Journal
A Multi-Feature Stock Index Forecasting Approach Based on LASSO Feature Selection and Non-Stationary Autoformer
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Lossless Thumbnail Preservation Encryption Based on Reversible Information Hiding

1
School of Computer Science and Engineering, Hunan University of Science and Technology, Xiangtan 411201, China
2
Software Engineering Institute, Hunan Software Vocational and Technical University, Xiangtan 411100, China
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(10), 2060; https://doi.org/10.3390/electronics14102060
Submission received: 7 April 2025 / Revised: 13 May 2025 / Accepted: 16 May 2025 / Published: 19 May 2025

Abstract

:
With the proliferation of multi-camera smartphones, image generation has proliferated and cloud storage services have become the primary tool for storing and sharing photos. However, this also poses privacy and security risks. Traditional image encryption techniques, while protecting privacy, also lead to loss of image availability in the cloud. To balance security and availability, TPE (Thumbnail Preserving Encryption) is proposed. However, the decryption effect of the existing schemes is generally unsatisfactory, and many existing schemes are unable to achieve perfect restoration in practical applications. Meanwhile, a few fully reversible schemes are limited by the proposed algorithms, which makes it difficult to be extended to a wider range of applications. To solve this contradiction, this paper proposes a TPE scheme based on reversible information hiding. Specifically, the scheme preserves the DC coefficients of the image during the encryption process and encrypts the AC coefficients to enhance the security of the image, thus obtaining the intermediate encrypted image. Then, the intermediate encrypted image is pre-decrypted, and the subtle error between the original image and the intermediate encrypted image is used as the compensation information. In order to achieve lossless decryption, we introduce the reversible information hiding technique to embed the compensation information into the intermediate image, and we finally obtain the encrypted image. This is also applicable to other high-quality TPE schemes and can provide ideas for their optimization direction. The experimental results show that this scheme not only achieves lossless decryption but also outperforms other TPE schemes in terms of visual effect, while the file extension size is kept at a low level. The research in this paper provides new ideas for balancing image privacy protection and usability, which has important theoretical and practical significance.

1. Introduction

Today, with the widespread availability of smartphones with multiple cameras, having a mobile phone is almost the same as having a camera. In addition, people use a variety of image capture devices such as drones, tablets, pinhole cameras, and webcams to take high-resolution images anytime, anywhere. Around 1.4 trillion images were taken in 2023, and this number is growing rapidly every year. Cloud services have become the primary tool for storing and sharing photos because they offer many advantages over earlier methods, including low cost, global availability, built-in redundancy to handle hardware or network failures, and virtually unlimited storage capacity. These images often document people’s daily lives, and they also include a large amount of personal information [1,2]. At the same time, cloud services will automatically synchronize the images on the local device, making it easier for users to organize, preview, and control their images. They no longer have to worry about accidentally damaging images and can view and download them from any internet-connected device. However, once images are stored in the cloud, users lose complete control over them. This undoubtedly makes it more difficult for users to protect the privacy of their images. Users must trust the operators of the cloud infrastructure to protect their data from malicious outsiders looking to steal confidential information, such as the 2014 Apple iCloud account leak [3,4], in which private images from hundreds of Hollywood stars were leaked by hackers. In 2019, Facebook was exposed for using users’ images to train its own AI models for automatic image recognition [5], and this is not the first time Facebook has been accused of stealing users’ images [6,7]. Users must also trust that the cloud service itself (or its employees) will not abuse their access for their own purposes. A survey found that all 112 respondents believed that their images contained various types of private personal information [8]. Although traditional image encryption techniques can solve the problem of image privacy, traditional image encryption algorithms [9,10,11] with confusion structures are a common method for protecting image privacy. However, this usually makes images unusable and invisible in the cloud environment. Users cannot preview, select, organize, or manage images in the cloud, and all operations can only be performed after the entire image has been downloaded and decrypted, which obviously does not meet the actual needs of users. Traditional image encryption techniques deprive images of content-based usability, which is crucial for users of cloud storage. To be successful for users, mechanisms for protecting image privacy should not come in the form of sacrificing the usability of cloud services. Some research in visual psychology about image degradation (i.e., low-resolution versions or visually inferior versions of the original image) and visual memory has made it possible to protect privacy while maintaining some usability of encrypted images.
Gregory’s research [12] showed that subjects were able to recognize degraded versions of images they had previously viewed, which was particularly pronounced in portrait images. In addition, Snodgrass’s research [13] further shows that if the image is created by the subject themselves (photographed or painted), the recognition ability is even stronger. This information obtained by the subject by browsing the original image is called prior knowledge. Denning et al.’s research [14] shows that subjects can recognize degraded versions of images based on their prior knowledge. The above studies show that image recognition not only depends on people’s visual input but is also strongly influenced by prior knowledge. In other words, image recognition is an inference process based on a mixture of human visual input and prior knowledge, as demonstrated by Peter et al. [15]. Rousselet et al. [16] showed that the human visual system can process multiple images in parallel and remember visual information (i.e., prior knowledge) by simply browsing images. In general, people can distinguish between images after seeing one of them, even if it is distorted or blurred, and this ability is further enhanced, especially when the image is self-made or taken.
Therefore, as shown in Figure 1, when the pictures uploaded to the cloud are all in plaintext, they can not only be viewed by the user but also potentially obtained by an illegal third party. When encrypted using a traditional encryption scheme, although it can prevent an illegal third party from learning the privacy of the picture, the user cannot learn the information either. If the TPE scheme is used to encrypt the picture to prevent an illegal third party from learning the privacy of the picture, the user can also determine the information in the picture based on prior knowledge by previewing the encrypted picture. TPE cleverly uses a new dimension to achieve a tunable balance between image privacy and usability. Its excellent characteristics have attracted the attention of more and more researchers in recent years. Wright et al. [17] first proposed a new image encryption concept, namely thumbnail-preserving encryption (TPE). This scheme includes the BS and RBS methods, and the ciphertext image and the downgraded version of the original image (i.e., the thumbnail) are very similar. However, in the encrypted image generated by this scheme, the exact thumbnail is retained based on only permutation operations. Many studies [18,19,20,21] have shown that only permutation encryption is not resistant to statistical attacks.
Subsequently, Marohn et al. [22] proposed a format-preserving encryption scheme based on permutation operations, which can achieve the effect of thumbnail preservation. However, permutation alone does not change the pixel values, image privacy is not well protected, security is low, and the permutation operation makes image compression difficult. Tajik et al. [23] proposed preservation encryption between two pixels within an encryption block. Although this scheme can achieve lossless decryption and maintain high thumbnail quality, the Markov chain has poor connectivity. To address this problem, Zhao et al. [24] conducted a more in-depth study of the TPE scheme, increasing the number of pixels designed for saturation encryption, and they proposed using effective substitution encryption to enhance the connectivity of the Markov chain. The image is encrypted in groups of three pixels, but due to the large number of iterations and the use of random numbers, the complexity of the scheme is high. In order to reduce the computational complexity, Zhang et al. [25] proposed an approximate TPE, but the decrypted image and thumbnail may not exactly match the original version. In addition, Chai et al. [26] proposed a TPE scheme based on genetic algorithms. Zhang et al. [27] combined chaotic systems with substitution–permutation encryption. Since Zhang et al.’s permutation encryption is vulnerable to attacks, Zhao et al. [28] advocated a permutation–substitution framework. References [29,30,31,32] all implement lossless decryption based on approximate TPE. Although this scheme achieves a small file size expansion, DC coefficients may overflow and it is poorly resistant to attacks. In addition, An et al. [33] achieved a balance between usability and privacy by removing texture and color from the original image through cross-plane thumbnail protection while retaining necessary semantic information. Ma et al. [34] proposed a average DC coefficient (ADCC) method, which achieves thumbnail preservation by replacing the values of all DC coefficients in the encrypted block with the average value. The auxiliary information used to recover the DC information directly replaces the last two AC coefficients, and loss of the last two AC coefficients prevents lossless decryption. Wang et al. [35] proposed an efficient scheme for generating images with preserved thumbnails with high visual naturalness while ensuring the reversibility of the process. Yuan et al. [36], based on ADCC, achieved lossless decryption by performing reversible permutations and mappings on the DC difference and AC coefficients.
In summary, the existing TPE algorithms are facing performance defects such as insufficient security, poor retention of ciphertext image thumbnails, poor decrypted image quality, high ciphertext file expansion rate, poor format compatibility, the inability of lossless decryption, etc. It is urgent for new design algorithms to solve these problems in order to expand the scope of application and practicality of TPE. From Table 1,where × stands for very poor or negative, ✓ means positive, and the number of + indicates how good or bad the effect is. It can be seen that the proposed scheme has obvious advantages in visual effect, decryption effect, and format compatibility compared to other schemes.
The main contributions of the work in this paper are as follows:
(1)
This TPE scheme is based on the DCT transform, which preserves its DC coefficients and encrypts its AC coefficients. The retained DC coefficients are the average values of pixels within an image block, which can satisfy the core points of thumbnail images: pixels within a block and invariant. Compared with the traditional TPE scheme that performs an encryption operation in the null domain and transforms the image to the frequency domain, it is more secure.
(2)
A compensated information embedding scheme based on reversible information hiding is proposed. By calculating the gap between the pre-decrypted image and the original image, the final encrypted image is obtained by compressing it and embedding it into the intermediate image with reversible information hiding. After downloading the encrypted image from the cloud, the compensation information is extracted and used for restoration, then lossless decryption can be achieved.
(3)
The compensation information embedding scheme has better generality than other lossless decryption schemes. Theoretically, other high-fidelity TPE schemes can optimize the algorithm through the idea of compensation information embedding to achieve the effect of lossless decryption.
This paper is structured as follows:
(1)
Section 1: The background and research significance of the topic of TPE and our contribution are given.
(2)
Section 2: The encryption process, core algorithms, and techniques of the proposed scheme are introduced.
(3)
Section 3: The design objectives of the scheme are introduced, as well as the experiments and analysis based on it.
(4)
Section 4: Summary and Outlook. This chapter summarizes the main research work of the thesis and the superiority of the scheme.

2. Proposed TPE Scheme

The encryption object of this scheme is a color image, including three channels, Y, U, and V. The same encryption method is used to encrypt the three channels, respectively. We take one channel as an example to introduce the specific process of encryption. We parse the image, divide it into 8 × 8 image blocks, convert it to the frequency domain via DCT transform, and obtain DC coefficients and AC coefficients.
As shown in Figure 2, the proposed TPE scheme includes AC coefficient encryption to form intermediate encrypted images, pre-recovery to compute the compensation information, and embedding the compensation information to obtain the final encrypted image.

2.1. Encryption Key Generation

In order to balance the resources and security of encryption key management, a common approach involves generating an adaptive encryption key by hashing and inputting the initial encryption key Key (the key used should be a 512-bit value in order to resist brute force attacks) and the content of the image. Therefore, an adaptive encryption key is used in this paper. Specifically, when the encryption block size is u, the encryption key K e y d n is generated as follows:
K e y d n = SHA ( a 1 a 2 a u u 1 ) Key
In Equation (1), where a represents the AC coefficients in the TPE block. SHA denotes SHA3-512.
Due to its longer output and higher security, we choose SHA3-512, which is especially effective in resisting collision attacks and pre-image front attacks.

2.2. DCT Transform Encryption

The DCT is a mathematical tool widely used in signal processing and image compression. The standardization and popularization of the DCT is attributed to N. Ahmed, T. Natarajan, and K. R. Rao [37], who systematically described the DCT.
The formula for DCT transformation is as follows:
Y ( u , v ) = 2 M N C ( u ) C ( v ) m = 0 M 1 n = 0 N 1 X ( m , n ) cos ( 2 m + 1 ) u π 2 M cos ( 2 n + 1 ) ν 2 N
In Equation (2), where u = 0 , 1 , , N 1 ; v = 0 , 1 , , M 1 ;
C ( u ) = 1 2 , u = 0 1 , u 0
C ( v ) = 1 2 , v = 0 1 , v 0
For example, we perform 8 × 8 chunking of the image and perform DCT transform on it. Then, according to Equations (2)–(4), the DCT change Equation (5) is given as follows:
Y ( u , v ) = 1 4 C ( u ) C ( v ) m = 0 7 n = 0 7 X (   m , n ) cos ( 2   m + 1 ) u π 16 cos ( 2 n + 1 ) v 16

2.2.1. Direct Current Coefficient

It is a common and effective method to divide the image into 8 × 8 blocks, and this division provides a structured basis for subsequent signal processing. The first of these coefficients is the DC coefficient. This coefficient is the most important; it provides information about the average brightness of the image block and its overall low frequency characteristics, which is essential for realizing thumbnail encryption. And, the AC coefficients are opposite to the DC coefficients and are mainly used to characterize the details and variations of the image. By performing a series of encryption processes on these AC coefficients, we are actually blurring the details and variations of the image. This blurring not only effectively protects the image content but also safeguards the user’s privacy to a certain extent and ensures that sensitive information is not easily recognized. At the same time, this processing also maintains the usability of the image so that the corresponding visual information can still be accessed when needed. Therefore, by cleverly combining the processing of DC and AC coefficients, we are able to achieve a balance between privacy protection and information availability in thumbnail encryption for the purpose of optimizing image security.

2.2.2. Alternating Current Coefficient

There are many ways to encrypt the AC coefficients, such as substitution encryption, XOR encryption, adding random noise, or exchanging coefficients between different blocks. We performed many experiments on it and finally used the replacement encryption.
It is worth noting that the random seed assigned to each block is unique, which leads to a different order of AC coefficient upset for each block. This differentiated encryption not only enhances the privacy protection but also increases the difficulty for attackers to crack the data. Using this method, we are able to effectively prevent unauthorized access to the data, thus safeguarding the user’s privacy to a large extent.
The experimental results are shown in Figure 3, where the visual visibility of the data is maintained after using disambiguation encryption. This property makes our encryption scheme well suited to the goal of thumbnail encryption.

2.3. Computation and Compression of Compensation Information

After the above operation, we successfully obtained the intermediate encrypted image f w . This process is a key step in image encryption technology, which ensures the security and privacy of the data. However, through experimental analysis, we found that the rounding operation has a significant effect on the frequency domain coefficients, which is the main source of the decrypted image distortion. This means that during the conversion process, certain subtle image information may be lost due to rounding, which leads to differences between the final decrypted image and the original image.
In order to minimize this distortion, we perform a pre-decryption operation on the rounded intermediate encrypted image f w to generate the pre-decrypted image f . This operation not only helps to recover some of the details of the image but also creates conditions for subsequent lossless decryption. In this process, we need to introduce the concept of distortion measure, using D to represent the degree of distortion between the pre-decrypted image f and the original image f. By accurately calculating this distortion value, we are able to better understand the effectiveness of the pre-decryption process and compensate for possible errors. The Equation (6) for calculating the compensation information is as follows:
D = f f
Obviously, the amount of information generated by the simple computation of the difference is so huge that the recovery information cannot be reversibly embedded into the intermediate encrypted image f w . In our study, after careful experimentation and analysis, we found that the error introduced due to the rounding process was not really significant. Specifically, the difference in most of the pixels was calculated to be zero, and only a small number of pixels had their values changed, but the effect of this error on the overall image was minimal. Therefore, we believe that the method of block compression is a relatively appropriate choice. This method not only effectively reduces data redundancy but also achieves secure embedding of information while maintaining image quality.
Block compression records the block number where non-zero elements exist, then compresses these blocks. As shown in Figure 4, the row number, column number, and corresponding value of the non-zero elements in the block are recorded.

2.4. Reversible Embedding of Compensation Information

Consider the difference between neighboring pixels rather than simple pixel values [38] to propose an efficient extension of the histogram modification technique. And, an auxiliary binary tree is proposed: suppose the number of peak points for embedding a message is 2 L , then L is the level of its binary tree. The tree predetermines the multiple peak points used to embed the message.

2.4.1. Embedding Process

For an N-pixel 8-bit grayscale image h with pixel value x i , where x i denotes the grayscale value of the ith pixel, 0 i N 1 ,   x i Z ,   x i 0 ,   255 .

2.4.2. Extraction Process

This process extracts the information and payload from the watermarked image and recovers the original image non-destructively. Let L be the level of the binary tree.
For an n-pixel 8-bit watermark map W with pixel value y i , where y i denotes the gray value of ith pixel, 0 i N 1 ,   y i Z ,   y i 0 ,   255 .

2.5. Thumbnail Generation

After delivering an image to the cloud for saving, the cloud usually generates thumbnails for users to quickly preview it online because of its small file size and transfer speed block. The original image is divided into μ × μ sizes, and the average pixel value in the block is represented by a pixel in the thumbnail S ς . The Equation (7) is as follows:
S ς = χ 1 = 1 μ χ 2 = 1 μ E ς χ 1 , χ 2 μ × μ
where ς 1 ς n μ × μ denotes the one-dimensional location of the thumbnail, and E ς denotes the pixel block of size μ × μ generated from the original image E.

2.6. Encryption Process

We have given the core technique of the encryption process. Based on this, the specific encryption process of the scheme is as follows:
  • The original image is transformed by DCT, the AC coefficients are encrypted by substitution according to the key generated by Equation (1), and the intermediate encrypted image is obtained.
  • Pre-decryption: according to the key, the AC coefficients are reduced to obtain the pre-decrypted image.
  • According to Equation (6), the compensation information is obtained by making a difference between the original image and the pre-decrypted image.
  • Compensation information is compressed by using block compression.
  • According to Algorithm 1, the compensation information is embedded into the intermediate encrypted image to get its final encrypted image.
Algorithm 1 Embedding Process
Input: Greyscale image h, binary tree level L, watermark bitstream b
Output: Watermarked image h
  1:
Histogram Shifting:
  • Shift histogram by 2 L units on both sides
  • Record shifted pixel ranges as auxiliary data
  2:
Reverse Image Scanning:
  3:
for  i = N 1  downto 1 do
  4:
      Calculate pixel difference d i = x i x i 1
  5:
Watermark Generation:
  6:
for  i = N 1  downto 0 do
  7:
      if  d i 2 L  then
  8:
           if  i = 0  then
  9:
         y i x i
10:
           else
11:
        if  x i < x i 1  then
12:
              y i x i 2 L
13:
        else
14:
              y i x i + 2 L
15:
      else
16:
           if  x i < x i 1  then
17:
         y i x i ( d i + b i )
18:
           else
19:
         y i x i + ( d i + b i )
20:
      Update h with y i
21:
return  h

2.7. Lossless Image Decryption

In the decryption stage, since the methods of the encryption process are all fully reversible, the encryption steps can be followed in reverse and reconstructed into the original image according to the key. The decryption steps are as follows:
  • The received encrypted image is labeled as f, and the compensation information is extracted from the received image f according to Algorithm 2. From this, the intermediate encrypted image f w can be isolated.
  • The DCT transform is performed on f w , the key-generated disambiguation sequence is used to restore the alignment of the AC coefficients, and an inverse DCT transform is performed to obtain the pre-decrypted image f .
  • By adding the compensation information D to the pre-decrypted image f , a lossless restore to the original image is obtained.
Algorithm 2 Extraction Process
Input: Watermarked image h , binary tree level L
Output: Original image h, watermark bitstream b
  1:
Move histogram and record transfer information:
  2:
a. Shift histogram 2 L units on both sides
  3:
b. Record shifted pixel range as auxiliary data
  4:
Reverse scan image:
  5:
for  i = N 1  down to 1 do
  6:
      if  | y i x i 1 | < 2 L + 1  then
  7:
            if  y i < x i 1  then
  8:
               x i y i + y i x i 1 2
  9:
            else if  y i > x i 1  then
10:
               x i y i y i x i 1 2
11:
            else
12:
               x i y i
13:
            if  y i x i 1 is even then
14:
               b i 1
15:
            else
16:
               b i 0
17:
      else
18:
            if  y i < x i 1  then
19:
               x i y i + 2 L
20:
            else if  y i > x i 1  then
21:
               x i y i 2 L
22:
            else
23:
               x i y i
24:
      if overhead information marked as 1 then
25:
            Shift x i by 2 L units
26:
return  h , b

3. Experimental Results and Analysis

3.1. Design Objective

The goals of our proposed scheme include:
  • Visualization: Ciphertext images need to retain a certain amount of visual information. Therefore, the thumbnail generated from a cipher image should be similar or identical to the thumbnail of the original image, which is important to maintain usability.
  • Lossless Decryption: Lossless decryption ensures that the original image information is not lost throughout the encryption and decryption process, thus preserving the integrity of the original data. Even if the loss is minimal with each encryption, the overall image quality can be significantly degraded after multiple encryption and decryption processes. Data integrity ensures that in IoT devices containing critical information and control commands, data can be evaluated correctly and commands can be executed efficiently. Lossless decryption ensures that the image is accurate and thus the instructions given are reliable, avoiding the unforeseen consequences of even the smallest error.
  • Privacy security: In the TPE field, the focus is on the balance between privacy and usability of the image, not confidentiality. Images should not reveal any details beyond the thumbnail.
  • Low File Extension: Ciphertext images cannot generate too large a file extension. In application areas where excessive information may be generated by uploading a large number of images at the same time, a small file extension size can result in a huge difference in storage space.
  • Compatibility: The proposed TPE solution has good compatibility, which means that it can seamlessly work in harmony with all kinds of cloud storage services that are widely used in the market today. Users can easily utilize this solution without having to make any kind of modifications or adjustments to their existing cloud systems.
Based on this, this section will demonstrate the superiority and effectiveness of the proposed scheme in terms of the following: 1. visual quality, 2. decryption effect, 3. security analysis, 4. user evaluation, 5. file extension, 6. format compatibility, etc. The test image dataset is the Inria Holidays dataset (a total of 1491 images), and all the images are resized to 512 × 512. Comparison schemes are BS and RBS [17], DRPE [23], ADCC [34], and JPEG-TPE [36].

3.2. Visual Quality

  • Encrypted image quality:
    In this paper, we generate TPE encryption maps with different accuracies based on different encryption fast sizes. As shown in Figure 5, for different encryption block sizes from 4 to 128, as the encryption block size increases, the visibility decreases, the privacy becomes higher, and the usable information that can be obtained from the image becomes less and less. Specifically, when the encryption block is 4, the encrypted image is extremely similar to the original image, while when the encryption block reaches 64 and 128, the encrypted image usability has been reduced to such a low level that no usable information can be obtained from image analysis.
  • Quantitative analysis of encrypted images:
    In order to better illustrate the encryption effect of this algorithm, the Peak Signal to Noise Ratio (PSNR) and Structural Similarity (SSIM) will be used to qualitatively assess the effectiveness of the abbreviated encryption.
    Figure 6 and Figure 7 show the encryption results tested on the Inria Holidays dataset. The experimental results show that the PSNR of this scheme is higher than all other schemes, and SSIM also performs better when the encryption blocks are from 2 to 16, and it is only countered by the DRPE scheme when the encryption blocks are greater than or equal to 32. Note that this TPE scheme is not a guarantee that illegal third parties cannot obtain any information from the ciphertext image. In fact, the scheme can expose less unimportant information to gain some usability, so that illegal third parties cannot learn more information from the encrypted thumbnail image. The specific encryption effect can be chosen according to different encryption block sizes.
  • Encrypted thumbnail image quality:
    It is more reasonable to compare the quality of thumbnails generated from encrypted images with the quality of the original image because the thumbnails provide the user with a quick preview to recognize the original image content. We have taken the thumbnails generated from encrypted images based on different encryption block sizes and reduced them to 512 × 512, as shown in Figure 8. The experimental results show that as the encryption block size increases, the thumbnail contains less and less meaningful content and the original image becomes more and more difficult to recognize. And, when the proper encryption block is chosen, the difference between the thumbnail of the encrypted image and the thumbnail of the original image is not very big, and the legitimate users are able to utilize the visibility to distinguish the images they need.
  • Quantitative analysis of encrypted thumbnails:
    The thumbnail generated from the encrypted image is compared with the thumbnail generated from the original image, which is more in line with the practical application scenarios, as shown in Figure 9 and Figure 10. The PSNR and SSIM values of this scheme are higher than other schemes, indicating that it is more in line with practical application requirements. Legitimate users are able to browse quickly in the cloud to recognize the desired image. The higher PSNR and SSIM values indicate that the thumbnail images have high preservation capability.

3.3. Decryption Effects

The PSNR and SSIM values of the decrypted images are listed as shown in Table 2 and Table 3, where μ is the encrypted block size. For the ADCC scheme, the quality of the decrypted image does not vary with the block size due to the fixed sacrifice of the last two ACs to embed the DC information. In the DRPE scheme, there may bean inconsistent dynamic range of DC coefficients in the TPE block during the decryption process; the larger the block, the more limited the dynamic range and the better the quality of the decrypted image. In the BS and RBS schemes, since the encryption involves YUV before compression, there is some loss of image data during compression. In addition, the sub-block size of RBS is 88, and the substitution does not change the value of the data in the block, so the PSNR and SSIM remain unchanged for different encrypted block sizes. Although the JPEG-TPE scheme proposed by Yuan also realizes lossless restoration, it is based on their algorithms only, and it has a low reference.

3.4. Security Analysis

  • Information entropy:
    Information entropy can be used to measure the uncertainty of the image information; the closer the information entropy of the image is to 8, the greater the uncertainty and the more effective the algorithm is. Table 4 shows the information entropy of the original and encrypted images, where the information entropy of all channels increases and is closer to 8.
  • Correlation coefficient analysis:
    5000 pairs of neighboring pixels are randomly selected from the horizontal, vertical, and diagonal directions of the image, and the correlation coefficients between these pixels are calculated. The correlation coefficients obtained are shown in Table 5 and Figure 11, where red, green, and blue represent the horizontal, vertical, and diagonal random selection, respectively; the x-axis and y-axis denote the gray values; and the dots represent the relationship of gray values between a pair of neighboring pixels. The results show that this scheme can greatly reduce the correlation between pixels.

3.5. User Evaluation

We selected multiple photos of Jay Chou and various strangers from Visual China, and we encrypted these photos with encryption blocks of different sizes in the proposed encryption scheme, as shown in Figure 12. Then, 100 random participants in universities and shopping malls were tested by selecting Jay Chou out of nine random encrypted person images, as shown in Figure 13. Compared with other schemes, the usability of this scheme is better while guaranteeing privacy, which indicates that it will provide a better experience for users in real application scenarios.

3.6. Document Extension

Any encryption operation inevitably leads to an increase in file size. This phenomenon is fully verified in Figure 14, which is experimentally tested based on the Inria Holidays dataset. The experiments show that as the encryption block size increases and the quality factor decreases, the average expansion of the image shows a certain increasing trend. However, although the encryption operation leads to an increase in file size, this increase is always maintained at a relatively low level, which is manifested in the following: when different sizes of encryption blocks are used, the magnitude of the change in the expansion rate is more limited, and in the process of adjusting the quality factor to a lower value, the overall effect is still maintained in an acceptable range, although the compression efficiency is affected to a certain extent. More importantly, this degree of file size growth does not significantly affect the actual user experience, and the negative impact is at a negligible level, both from the perspective of visual perception and data transfer efficiency.

3.7. Format Compatibility

In this scenario, the performance of the AC (alternating current) and DC (direct current) coefficients has been analyzed in detail, and the results show good format compatibility between them. This compatibility is one of the key factors in ensuring efficient and accurate data processing. It is worth noting that the DC coefficients remain constant throughout the process, and this stability allows the data to maintain consistency during conversion and transmission without any loss or distortion of information due to changes.
Meanwhile, the AC coefficients are processed using substitution encryption. This approach not only enhances the security of the data but also ensures that the operation is within the valid range and avoids possible overflow problems. This design concept makes the processing of AC and DC coefficients applicable regardless of the image format, ensuring broad compatibility with different types of image files. This flexibility and reliability make this solution more advantageous in practical applications, meeting the needs of various application scenarios and providing users with a safer and more efficient data processing solution. With this design, users can confidently process data without worrying about problems caused by incompatible formats.

4. Conclusions

We propose a visual privacy preserving scheme, LD-TPE, which aims to balance usability and privacy of user images in cloud usage scenarios. Our proposed scheme achieves this goal without losing image information, and its solution can provide a reference for other high-quality decryption schemes with high applicability. All the coefficients are adjusted within the effective range without overflow, which ensures the format compatibility. The experimental results show that the solution not only achieves lossless decryption but also outperforms other TPE solutions in terms of visual effect while the file extension size is kept at a low level.

Author Contributions

Each author discussed the details of the manuscript. T.S. designed and wrote the manuscript. T.S. implemented the proposed technique and provided the experimental results. J.O. reviewed and revised the article. J.O., T.S., and R.W. drafted and revised the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Social Science Foundation of China under grant number 21BXW077.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author. The data are not publicly available due to privacy issues.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Milian, M. Digital Photos can reveal your location raise privacy fears. CNN.Com, 15 October 2010. [Google Scholar]
  2. Fan, L. A demonstration of image obfuscation with provable privacy. In Proceedings of the 2019 IEEE International Conference on Multimedia & Expo Workshops (ICMEW), Shanghai, China, 8–12 July 2019; IEEE: New York, NY, USA, 2019; p. 608. [Google Scholar]
  3. Greenberg, A. The police tool that pervs use to steal nude pics from Apple’s iCloud. Wired, 2 September 2014. [Google Scholar]
  4. Fallon, R. Celebgate: Two methodological approaches to the 2014 celebrity photo hacks. In Proceedings of the International Conference on Internet Science; Springer: Cham, Switzerland, 2015; pp. 49–60. [Google Scholar]
  5. Sengupta, S.; O’Brien, K.J. Facebook can ID faces, but using them grows tricky. New York Times, 21 September 2012. [Google Scholar]
  6. Schiffer, Z. The Big Facebook oUtage Offers a Behind-the-Scenes Look at How the Social Network’s AI “Sees” Your Photos and Interprets Them for Blind Users. 2019. Available online: https://www.businessinsider.com/facebooks-photo-outage-reveals-how-ai-sees-your-photos-2019-7 (accessed on 30 June 2024).
  7. Dance, G.J.; LaForgia, M.; Confessore, N. As Facebook raised a privacy wall, it carved an opening for tech giants. N. Y. Times 2018, 18, 1–9. [Google Scholar]
  8. Li, A.; Darling, D.; Li, Q. PhotoSafer: Content-based and context-aware private photo protection for smartphones. In Proceedings of the 2018 IEEE Symposium on Privacy-Aware Computing (PAC), Washington, DC, USA, 26–28 September 2018; IEEE: New York, NY, USA, 2018; pp. 10–18. [Google Scholar]
  9. Kang, X.; Tao, R. Color image encryption using pixel scrambling operator and reality-preserving MPFRHT. IEEE Trans. Circuits Syst. Video Technol. 2018, 29, 1919–1932. [Google Scholar] [CrossRef]
  10. Qin, C.; Zhou, Q.; Cao, F.; Dong, J.; Zhang, X. Flexible lossy compression for selective encrypted image with image inpainting. IEEE Trans. Circuits Syst. Video Technol. 2018, 29, 3341–3355. [Google Scholar] [CrossRef]
  11. Puteaux, P.; Puech, W. CFB-then-ECB mode-based image encryption for an efficient correction of noisy encrypted images. IEEE Trans. Circuits Syst. Video Technol. 2020, 31, 3338–3351. [Google Scholar] [CrossRef]
  12. Gregory, R.L. Knowledge in perception and illusion. Philos. Trans. R. Soc. Lond. Ser. B Biol. Sci. 1997, 352, 1121–1127. [Google Scholar] [CrossRef]
  13. Kinjo, H.; Snodgrass, J.G. Does the generation effect occur for pictures? Am. J. Psychol. 2000, 113, 95. [Google Scholar] [CrossRef]
  14. Denning, T.; Bowers, K.; Van Dijk, M.; Juels, A. Exploring implicit memory for painless password recovery. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, Vancouver, BC, Canada, 7–12 May 2011; pp. 2615–2618. [Google Scholar]
  15. Kok, P.; Brouwer, G.J.; van Gerven, M.A.; de Lange, F.P. Prior expectations bias sensory representations in visual cortex. J. Neurosci. 2013, 33, 16275–16284. [Google Scholar] [CrossRef]
  16. Rousselet, G.A.; Thorpe, S.J.; Fabre-Thorpe, M. Processing of one, two or four natural scenes in humans: The limits of parallelism. Vis. Res. 2004, 44, 877–894. [Google Scholar] [CrossRef]
  17. Wright, C.V.; Feng, W.c.; Liu, F. Thumbnail-preserving encryption for JPEG. In Proceedings of the 3rd ACM Workshop on Information Hiding and Multimedia Security, Portland, OR, USA, 17–19 June 2015; pp. 141–146. [Google Scholar]
  18. Chen, J.; Chen, L.; Zhou, Y. Universal chosen-ciphertext attack for a family of image encryption schemes. IEEE Trans. Multimed. 2020, 23, 2372–2385. [Google Scholar] [CrossRef]
  19. Zhang, L.Y.; Liu, Y.; Wang, C.; Zhou, J.; Zhang, Y.; Chen, G. Improved known-plaintext attack to permutation-only multimedia ciphers. Inf. Sci. 2018, 430, 228–239. [Google Scholar] [CrossRef]
  20. Chen, J.; Chen, L.; Zhou, Y. Cryptanalysis of image ciphers with permutation-substitution network and chaos. IEEE Trans. Circuits Syst. Video Technol. 2020, 31, 2494–2508. [Google Scholar] [CrossRef]
  21. Jolfaei, A.; Wu, X.W.; Muthukkumarasamy, V. On the security of permutation-only image encryption schemes. IEEE Trans. Inf. Forensics Secur. 2015, 11, 235–246. [Google Scholar] [CrossRef]
  22. Marohn, B.; Wright, C.V.; Feng, W.c.; Rosulek, M.; Bobba, R.B. Approximate thumbnail preserving encryption. In Proceedings of the 2017 on Multimedia Privacy and Security, Dallas, TX, USA, 30 October 2017; pp. 33–43. [Google Scholar]
  23. Tajik, K.; Gunasekaran, A.; Dutta, R.; Ellis, B.; Bobba, R.B.; Rosulek, M.; Wright, C.V.; Feng, W.c. Balancing image privacy and usability with thumbnail-preserving encryption. IACR Cryptol. EPrint Arch. 2019, 2019, 295. [Google Scholar]
  24. Zhao, R.; Zhang, Y.; Xiao, X.; Ye, X.; Lan, R. TPE2: Three-pixel exact thumbnail-preserving image encryption. Signal Process. 2021, 183, 108019. [Google Scholar] [CrossRef]
  25. Zhang, Y.; Zhao, R.; Xiao, X.; Lan, R.; Liu, Z.; Zhang, X. HF-TPE: High-fidelity thumbnail-preserving encryption. IEEE Trans. Circuits Syst. Video Technol. 2021, 32, 947–961. [Google Scholar] [CrossRef]
  26. Chai, X.; Wang, Y.; Gan, Z.; Chen, X.; Zhang, Y. Preserving privacy while revealing thumbnail for content-based encrypted image retrieval in the cloud. Inf. Sci. 2022, 604, 115–141. [Google Scholar] [CrossRef]
  27. Zhang, Y.; Zhao, R.; Zhang, Y.; Lan, R.; Chai, X. High-efficiency and visual-usability image encryption based on thumbnail preserving and chaotic system. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 2993–3010. [Google Scholar] [CrossRef]
  28. Zhao, R.; Zhang, Y.; Nan, Y.; Wen, W.; Chai, X.; Lan, R. Primitively visually meaningful image encryption: A new paradigm. Inf. Sci. 2022, 613, 628–648. [Google Scholar] [CrossRef]
  29. Zhang, Y.; Ye, X.; Xiao, X.; Xiang, T.; Li, H.; Cao, X. A reversible framework for efficient and secure visual privacy protection. IEEE Trans. Inf. Forensics Secur. 2023, 18, 3334–3349. [Google Scholar] [CrossRef]
  30. Yang, C.H.; Weng, C.Y.; Yang, Y.Z. TPEIP: Thumbnail preserving encryption based on sum preserving for image privacy. J. Inf. Secur. Appl. 2022, 70, 103352. [Google Scholar] [CrossRef]
  31. Ye, Z.; Zhao, R.; Zhang, Y.; Xiao, X.; Lan, R.; Xiang, Y. Noise-free thumbnail-preserving image encryption based on MSB prediction. Inf. Sci. 2022, 617, 395–415. [Google Scholar] [CrossRef]
  32. Ye, X.; Zhang, Y.; Zhao, R.; Lan, R.; Xiang, Y. PRA-TPE: Perfectly recoverable approximate thumbnail-preserving image encryption. J. Vis. Commun. Image Represent. 2022, 87, 103589. [Google Scholar] [CrossRef]
  33. An, D.; Hao, D.; Zhao, R.; Zhang, S.; Lu, J.; Zhang, Y. Visually semantic-preserving and people-oriented color image encryption based on cross-plane thumbnail preservation. Expert Syst. Appl. 2023, 233, 120931. [Google Scholar] [CrossRef]
  34. Ma, Y.; Chai, X.; Gan, Z.; Zhang, Y. Privacy-preserving TPE-based JPEG image retrieval in cloud-assisted internet of things. IEEE Internet Things J. 2023, 11, 4842–4856. [Google Scholar] [CrossRef]
  35. Wang, X.; Qu, L.; Wu, H.T.; Han, Y.; Tian, Z. Reversible image thumbnail preservation with high visual naturalness. IEEE Internet Things J. 2024, 11, 18739–18752. [Google Scholar] [CrossRef]
  36. Yuan, Y.; He, H.; Amirpour, H.; Qu, L.; Timmerer, C.; Chen, F. IoT privacy protection: JPEG-TPE with lower file size expansion and lossless decryption. IEEE Internet Things J. 2024, 11, 23485–23496. [Google Scholar] [CrossRef]
  37. Ahmed, N.; Natarajan, T.; Rao, K.R. Discrete cosine transform. IEEE Trans. Comput. 2006, 100, 90–93. [Google Scholar] [CrossRef]
  38. Ouyang, J.; Huang, J.; Wen, X. A semi-fragile reversible watermarking method based on qdft and tamper ranking. Multimed. Tools Appl. 2024, 83, 41555–41578. [Google Scholar] [CrossRef]
Figure 1. Examples of different encryption schemes when uploading images to the cloud.
Figure 1. Examples of different encryption schemes when uploading images to the cloud.
Electronics 14 02060 g001
Figure 2. The framework of this TPE program.
Figure 2. The framework of this TPE program.
Electronics 14 02060 g002
Figure 3. (Left) AC coefficients are exchanged between different blocks; (Center) random noise is added; (Right) scrambled encryption.
Figure 3. (Left) AC coefficients are exchanged between different blocks; (Center) random noise is added; (Right) scrambled encryption.
Electronics 14 02060 g003
Figure 4. Block compression.
Figure 4. Block compression.
Electronics 14 02060 g004
Figure 5. LD-TPE encryption using different block sizes (4 × 4, 8 × 8, 16 × 16, 32 × 32, 64 × 64, and 128 × 128).
Figure 5. LD-TPE encryption using different block sizes (4 × 4, 8 × 8, 16 × 16, 32 × 32, 64 × 64, and 128 × 128).
Electronics 14 02060 g005
Figure 6. Average PSNR of cryptograms based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Figure 6. Average PSNR of cryptograms based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Electronics 14 02060 g006
Figure 7. Average SSIM of cryptograms based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Figure 7. Average SSIM of cryptograms based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Electronics 14 02060 g007
Figure 8. (a) Thumbnails of the original image; (bg) thumbnails with different encrypted block sizes µ; (b) µ = 4; (c) µ = 8; (d) µ = 16; (e) µ = 32; (f) µ = 64; (g) µ = 128.
Figure 8. (a) Thumbnails of the original image; (bg) thumbnails with different encrypted block sizes µ; (b) µ = 4; (c) µ = 8; (d) µ = 16; (e) µ = 32; (f) µ = 64; (g) µ = 128.
Electronics 14 02060 g008
Figure 9. Average PSNR of encrypted thumbnails based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Figure 9. Average PSNR of encrypted thumbnails based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Electronics 14 02060 g009
Figure 10. Average SSIM of encrypted thumbnails based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Figure 10. Average SSIM of encrypted thumbnails based on different encrypted block sizes of the Inria Holidays dataset. (ad) The quality factors are 90, 80, 70, and 60, respectively.
Electronics 14 02060 g010
Figure 11. Correlation coefficient analysis. Left side: results of the encrypted image. Right side: results of the original image.
Figure 11. Correlation coefficient analysis. Left side: results of the encrypted image. Right side: results of the original image.
Electronics 14 02060 g011
Figure 12. (left) original image; (right) encrypted image. One of them is Jay.
Figure 12. (left) original image; (right) encrypted image. One of them is Jay.
Electronics 14 02060 g012
Figure 13. Success rate of participants in recognizing cryptograms with different encryption sizes.
Figure 13. Success rate of participants in recognizing cryptograms with different encryption sizes.
Electronics 14 02060 g013
Figure 14. Average expansion rates with different quality factors for each encrypted block size. (left) Encrypted image; (right) encrypted thumbnail.
Figure 14. Average expansion rates with different quality factors for each encrypted block size. (left) Encrypted image; (right) encrypted thumbnail.
Electronics 14 02060 g014
Table 1. Comparison between the proposed program and existing programs.
Table 1. Comparison between the proposed program and existing programs.
SchemesBS [17]RBS [17]DRPE [23]ADCC [34]JPEG-TPE [36]Proposed
Frequency domain×××
Decryption quality×××++++++++
Visual quality+++++++++++++
File size expansion++++++++++
Format compatibility×××+++++++
Security++×+++++++
Table 2. Average PSNR of decrypted images.
Table 2. Average PSNR of decrypted images.
DatasetµPSNR
ProposedADCCDRPEBSRBSJPEG-TPE
Inria Holiday2Inf68.1422.6839.7640.32Inf
4Inf68.1422.2939.2440.32Inf
8Inf68.1426.0538.8240.32Inf
16Inf68.1429.9738.4740.32Inf
32Inf68.1431.3838.4240.32Inf
Table 3. Average SSIM of decrypted images.
Table 3. Average SSIM of decrypted images.
DatasetµSSIM
ProposedADCCDRPEBSRBSJPEG-TPE
Inria Holiday210.990.730.920.941
410.990.820.900.941
810.990.890.870.941
1610.990.930.850.941
3210.990.920.850.941
Table 4. Information entropy.
Table 4. Information entropy.
OriginalProposed
R7.277.37
G7.587.69
B7.007.38
Table 5. Correlation coefficients.
Table 5. Correlation coefficients.
Original Image Encrypted Image
HorizontalVerticalDiagonal HorizontalVerticalDiagonal
R0.97690.98700.9637 0.49930.46790.4540
G0.97860.99020.9676 0.48560.49140.4721
B0.95310.97760.9307 0.47320.47280.4707
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ouyang, J.; Shi, T.; Wang, R. Lossless Thumbnail Preservation Encryption Based on Reversible Information Hiding. Electronics 2025, 14, 2060. https://doi.org/10.3390/electronics14102060

AMA Style

Ouyang J, Shi T, Wang R. Lossless Thumbnail Preservation Encryption Based on Reversible Information Hiding. Electronics. 2025; 14(10):2060. https://doi.org/10.3390/electronics14102060

Chicago/Turabian Style

Ouyang, Junlin, Tingjian Shi, and Ruijie Wang. 2025. "Lossless Thumbnail Preservation Encryption Based on Reversible Information Hiding" Electronics 14, no. 10: 2060. https://doi.org/10.3390/electronics14102060

APA Style

Ouyang, J., Shi, T., & Wang, R. (2025). Lossless Thumbnail Preservation Encryption Based on Reversible Information Hiding. Electronics, 14(10), 2060. https://doi.org/10.3390/electronics14102060

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop