Compression Performance of Grayscale-based Image Encryption for Encryption-then-Compression Systems
This paper considers a new grayscale-based image encryption for Encryption-then-Compression (EtC) systems with JPEG compression. Firstly, generation methods of grayscale-based images are discussed in terms of the selection of color space. In addition, a new JPEG quantization table for the grayscale-based images is proposed to provide a better compression performance. Moreover, the quality of both images uploaded to Social Network Services (SNS) and downloaded from SNS, are discussed and evaluated. In the experiments, encrypted images are compressed using various compression parameters and quantization tables, and uploaded to Twitter and Facebook. The results proved that the selection of color space and the proposed quantization table can improve the compression performances of not only uploaded images but also downloaded ones.
💡 Research Summary
The paper addresses the challenge of integrating image encryption with standard JPEG compression in an Encryption‑then‑Compression (EtC) framework, especially when images are uploaded to and downloaded from social networking services (SNS) such as Twitter and Facebook. Traditional EtC schemes either encrypt the full‑color RGB image or rely on proprietary compression, which leads to poor compression efficiency, limited key space, and vulnerability to color subsampling performed by SNS.
To overcome these limitations, the authors propose two complementary innovations: (1) a color‑space‑aware generation of “grayscale‑based” images and (2) a new image‑dependent quantization table (G‑table) tailored for those images.
Color‑space transformation
Instead of concatenating the three RGB channels directly, the original image is first converted to the YCbCr color space. The luminance (Y) and the two chrominance components (Cb, Cr) are then concatenated horizontally or vertically, producing a single‑channel image whose pixel count is three times the original. Although the resulting image is technically a single channel, it retains the statistical characteristics of the YCbCr components, which are more suitable for JPEG’s DCT‑based compression. This step eliminates the need for explicit color‑space conversion during JPEG encoding and reduces the impact of color subsampling.
Block‑level encryption
The generated grayscale‑based image is divided into non‑overlapping 8 × 8 blocks (the smallest block size allowed by JPEG). Three secret keys (K1, K2, K3) are used to (i) permute the blocks, (ii) rotate/flip each block, and (iii) apply a negative‑positive transformation to every pixel. Because the block size is halved compared with conventional EtC (16 × 16), the number of blocks quadruples, expanding the key space by a factor of 12 and making jigsaw‑puzzle attacks far more difficult.
G‑table design
Standard JPEG uses a luminance table (Y‑table) and a chrominance table (CbCr‑table). These tables are not optimal for the grayscale‑based images, which contain a mixture of Y, Cb, and Cr data. The authors collect DCT coefficients from a large set of such images (R = 1338) and compute the average Euclidean distance c(i,j) for each DCT position (i,j). The quantization step q(i,j) is then defined as
q(i,j) = ε · c(1,1) / c(i,j) with ε = 16,
producing the G‑table. This table adapts the quantization step to the actual energy distribution of the encrypted image, reducing quantization error while preserving JPEG compatibility.
Experimental evaluation
Two datasets were used: (a) 20 images from the MIT dataset (672 × 480) and (b) 1,338 images from UCID. All images were encrypted with the proposed scheme (B = 8) and compressed with JPEG quality factors Q = 70–100 under 4:4:4 sampling. Three quantization tables were tested: the standard Y‑table, the CbCr‑table, and the proposed G‑table. The compressed JPEG files were uploaded to Twitter and Facebook, which automatically recompress the images (Twitter: Q = 85, 4:2:0; Facebook: fixed Q, 4:2:0). After download, images were decoded, decrypted, and compared to the originals using PSNR and bits‑per‑pixel (bpp).
Key findings:
-
Color‑space impact – Images generated from YCbCr required fewer bits per pixel for the same PSNR than those generated directly from RGB, confirming that preserving the YCbCr statistics benefits compression.
-
Quantization table performance – The G‑table consistently outperformed both the Y‑table and CbCr‑table, especially at lower quality factors (Q ≤ 80). At high Q (≥ 90) the differences narrowed because quantization steps become very small.
-
Robustness to SNS recompression – Because the grayscale‑based image contains only one channel, SNS‑induced color subsampling (4:2:0) does not degrade visual quality, unlike full‑color images. Consequently, encrypted grayscale‑based images achieved higher PSNR after download than even unencrypted full‑color images.
-
Low‑bitrate advantage – In the low‑bpp region, the G‑table provided the best PSNR, confirming its suitability for bandwidth‑constrained scenarios.
Conclusion
The study demonstrates that (i) selecting YCbCr as the source color space for generating grayscale‑based images and (ii) employing a data‑driven G‑table significantly improve compression efficiency and image quality in EtC systems, while preserving strong security (large key space, resistance to jigsaw attacks). Moreover, the approach remains fully compatible with standard JPEG decoders and survives the mandatory recompression performed by major SNS platforms. These results suggest that the proposed method is ready for deployment in real‑world multimedia services such as cloud photo storage, social media, and mobile messaging, where both privacy and bandwidth efficiency are critical.
Comments & Academic Discussion
Loading comments...
Leave a Comment