Encryption and Compression Schemes Based on JPEG: History
Please note this is an old version of this entry, which may differ significantly from the current revision.
Contributor: , , , ,

Due to the excellent compression performance of JPEG, many schemes based on JPEG have been developed for the encryption and compression of digital images. According to the positioning of the encryption within the compression process, they can be classified into three categories: encryption before compression, joint compression and encryption, and compression before encryption. Encryption before compression means that the image is encrypted before JPEG compression. Typical methods include permutation encryption and some chaos-based encryption schemes that directly operate on the original image

  • remote sensing image transmission
  • image encryption
  • JPEG

1. Introduction

Image encryption is an important method to ensure the security of image transmission. Currently, a wide range of image encryption methods have been developed and are available. These methods use various encryption technologies to ensure security and privacy, such as multimedia scrambling [1], wave perturbation [2], reversible cellular automata [3], bitplane-based image encryption [4], and chaos-based image encryption algorithms [5][6][7][8]. These image encryption algorithms can transform the original image into an incomprehensible distortion form, ensuring the security of the image during storage and transmission. However, with the continuous growth of the size of image files, the method of directly encrypting images will consume extensive computing resources. This problem will become more obvious when encrypting remote sensing images because of their larger amount of data. Since the countries along the “Belt and Road” are developing countries with limited computing resources, it is necessary to design a joint encryption and compression scheme to reduce the computational burden of these countries.

To encrypt and compress the transmitted images, the traditional joint encryption and compression scheme adopts the compression-then-encryption (CtE) system. This system compresses and encrypts data at the sender level first, and then decrypts and decompresses the data after transmission to the receiver. However, Zhou et al. pointed out that the CtE system gives all the tasks of encryption and compression to the sender; thus, it requires high computing resources of the sender, and the practical application scenarios are limited [9]. According to Zhou et al., in many scenarios, the primary concern of senders is typically the security of the image, while the efficient utilization of bandwidth may not be a significant consideration. Channel providers, on the other hand, are more concerned about how to reduce the amount of data transmitted and are less concerned about security. Therefore, they proposed an encryption-then-compression (EtC) system, which entrusted the compression task to the channel provider, saving the computing resources of the sender.
Although many existing EtC systems help the sender to save the cost of compression tasks, the sender still undertakes all encryption tasks, which will still bring problems in practical applications. In this case, all keys are generated by the sender; therefore, once the key is leaked at the sender level, the data will be at risk of being completely decrypted by the attacker. Moreover, most countries along the “Belt and Road” are developing countries with very limited computing resources. As the sender, it may be difficult for them to complete all encryption tasks.

2. Encryption and Compression Schemes Based on JPEG

2.1. JPEG

JPEG (Joint Photographic Experts Group) [10] is the most common digital image compression method, which is the most commonly used format for storing and transmitting photo images on the Internet [11].
For an input image, JPEG is mainly compressed through five steps: preprocessing, discrete cosine transform, quantization, zigzag scanning, and entropy encoding.

2.1.1. Preprocessing

In the preprocessing step, the input image is converted from the RGB color space to the YCbCr color space. Y is the brightness part of the image, while Cb and Cr are the offsets of the blue and red chromaticity of the image, respectively. Then, to ensure the quality of the compressed image and the speed of data processing, it is necessary to divide the image after color space transformation into 8 × 8 blocks. Subsequent compression processes are carried out in blocks.

2.1.2. Discrete Cosine Transform, Quantization, and Zigzag Scanning

Discrete cosine transform (DCT) uses a set of cosine functions with different frequencies and amplitudes to fit data. Its essence is the real part of the Fourier transform. It has the characteristics of energy concentration to concentrate important information together; thus, it is often used for image compression.
After the DCT of each block, the transform coefficients are concentrated in a small range in the upper left corner. The first coefficient in the upper left corner is called the DC coefficient, which has a large value and represents the low-frequency component in the block. The remaining 63 coefficients are called AC coefficients, which are small in amplitude and represent the high-frequency components of image information. The information of each block is concentrated in the low-frequency region; a higher-frequency region has a smaller coefficient. Therefore, the subsequent quantization operation can quantize these high-frequency components with small amplitude to 0, so as to exchange for higher compression performance at the expense of losing some accuracy.
Figure 1 shows the standard luminance quantization table and the standard chrominance quantization table provided by JPEG.
Figure 1. Standard quantization table provided by JPEG: (a) standard luminance quantization table; (b) standard chrominance quantization table.
Since the quantized block is an 8 × 8 matrix, it should be converted into a one-dimensional vector by zigzag scanning, as shown in Figure 2. It can concentrate zero values as much as possible, which is convenient for subsequent entropy coding.
Figure 2. Zigzag scanning.

2.1.3. Entropy Encoding

The last step of JPEG is to encode DC and AC coefficients into binary bitstreams. For quantized DC coefficients, the prediction error is calculated by taking the difference between the current DC coefficient and the DC coefficient of the previous adjacent block. For quantized AC coefficients, run-length encoding (RLE) is used to compress them. Then, the Huffman algorithm is used to encode the prediction error of the DC coefficient and the AC coefficient bitstreams after RLE. Finally, the compressed binary bitstreams are obtained.

2.2. Encryption and Compression Schemes Based on JPEG

Due to the excellent compression performance of JPEG, many schemes based on JPEG have been developed for the encryption and compression of digital images. According to the positioning of the encryption within the compression process, they can be classified into three categories: encryption before compression, joint compression and encryption, and compression before encryption [12]. Encryption before compression means that the image is encrypted before JPEG compression. Typical methods include permutation encryption [13] and some chaos-based encryption schemes that directly operate on the original image [14]. Kurihara et al. introduced a block scrambling-based encryption scheme [15]. Before compression, the input image is divided into blocks of equal size. Subsequently, various transformations are applied to these blocks, including scrambling, rotation, pixel flipping, and shuffling of color channels. Following the block-level encryption process, JPEG is applied to the transformed image. This method conforms to JPEG compression format and can ensure compression efficiency similar to JPEG. On this basis, Chuman et al. proposed an encryption scheme specifically designed for grayscale images [16]. In their approach, grayscale images are utilized as the input data for encryption. They used smaller block sizes and more block numbers in the encryption module, and then spliced the encryption results into grayscale images as the input of JPEG compression. This encryption scheme effectively reduces color information and gains stronger resistance to various attacks. The joint compression encryption algorithm combines compression and encryption techniques by incorporating encryption methods into one or more stages of the underlying compression process, such as encrypting DC and AC coefficients in the transformation stage [17][18][19][20][21][22], encrypting the quantization table in the quantization stage [23], and modifying bitstreams in the entropy coding stage [11][21]. Compression before encryption is to directly encrypt the JPEG compressed bitstreams. This method is usually compression-friendly; it will generate lower costs to send encryption keys [24][25][26]. However, Socek et al. pointed out that such systems are essentially non-format-compatible because the encryption methods of these systems usually directly process the compressed bitstreams, which is likely to destroy the compressed format [27].
Although the above schemes can ensure the good efficiency and security of data transmission, these methods cannot be directly applied to multiband remote sensing images because JPEG can only process three-channel digital images. To solve this problem, an algorithm preprocesses the input remote sensing images and merges them into gray images, effectively solving the limitation of JPEG regarding the number of image channels [28].

This entry is adapted from the peer-reviewed paper 10.3390/s23177600

References

  1. Li, C.; Lin, D.; Feng, B.; Lu, J.; Hao, F. Cryptanalysis of a Chaotic Image Encryption Algorithm Based on Information Entropy. IEEE Access 2018, 6, 75834–75842.
  2. Wu, Y.; Zhou, Y.; Agaian, S.; Noonan, J.P. A symmetric image cipher using wave perturbations. Signal Process. 2014, 102, 122–131.
  3. Wang, X.; Luan, D. A novel image encryption algorithm using chaos and reversible cellular automata. Commun. Nonlinear Sci. Numer. Simul. 2013, 18, 3075–3085.
  4. Cao, W.; Zhou, Y.; Chen, C.L.P.; Xia, L. Medical image encryption using edge maps. Signal Process. 2017, 132, 96–109.
  5. Zhu, H.; Zhao, Y.; Song, Y. 2D Logistic-modulated-Sine-coupling-Logistic chaotic map For Image Encryption. IEEE Access 2019, 7, 14081–14098.
  6. Zhu, H.; Qi, W.; Ge, J.; Liu, Y. Analyzing Devaney Chaos of a Sine–Cosine Compound Function System. Int. J. Bifurc. Chaos 2018, 28, 1850176.
  7. Zhu, H.; Zhang, X.; Yu, H.; Zhao, C.; Zhu, Z. An image encryption algorithm based on compound homogeneous hyper-chaotic system. Nonlinear Dyn. 2017, 89, 61–79.
  8. Hanif, M.; Iqbal, N.; Ur Rahman, F.; Khan, M.A.; Ghazal, T.M.; Abbas, S.; Ahmad, M.; Al Hamadi, H.; Yeun, C.Y. A Novel Grayscale Image Encryption Scheme Based on the Block-Level Swapping of Pixels and the Chaotic System. Sensors 2022, 22, 6243.
  9. Zhou, J.; Liu, X.; Au, O.C. On the design of an efficient encryption-then-compression system. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 2872–2876.
  10. Wallace, G.K. The JPEG still picture compression standard. Commun. ACM 1991, 34, 30–44.
  11. He, J.; Huang, S.; Tang, S.; Huang, J. JPEG Image Encryption with Improved Format Compatibility and File Size Preservation. IEEE Trans. Multimedia 2018, 20, 2645–2658.
  12. Li, P.; Lo, K.T. Survey on JPEG compatible joint image compression and encryption algorithms. IET Signal Process. 2020, 14, 475–488.
  13. Gan, Z.; Chai, X.; Han, D.; Chen, Y. A chaotic image encryption algorithm based on 3-D bit-plane permutation. Neural Comput. Appl. 2018, 31, 7111–7130.
  14. Chai, X.; Gan, Z.; Yuan, K.; Chen, Y.; Liu, X. A novel image encryption scheme based on DNA sequence operations and chaotic systems. Neural Comput. Appl. 2019, 31, 219–237.
  15. Kurihara, K.; Shiota, S.; Kiya, H. An encryption-then-compression system for JPEG standard. In Proceedings of the 2015 Picture Coding Symposium (PCS), Cairns, Australia, 31 May–3 June 2015; pp. 119–123.
  16. Chuman, T.; Sirichotedumrong, W.; Kiya, H. Encryption-then-Compression Systems using Grayscale-based Image Encryption for JPEG Images. IEEE Trans. Inf. Forensics Secur. 2018, 14, 1515–1525.
  17. Korshunov, P.; Ebrahimi, T. Scrambling-based tool for secure protection of JPEG images. In Proceedings of the IEEE International Conference on Image Processing (ICIP), Paris, France, 27–30 October 2014; pp. 3423–3425.
  18. Li, S.; Zhang, Y. Quantized DCT coefficient category address encryption for JPEG image. KSII Trans. Internet Inf. Syst. (TIIS) 2016, 10, 1790–1806.
  19. Puteaux, P.; Wang, Z.; Zhang, X.; Puech, W. Hierarchical High Capacity Data Hiding in JPEG Crypto-compressed Images. In Proceedings of the 2020 28th European Signal Processing Conference (EUSIPCO), Amsterdam, The Netherlands, 18–21 January 2021; pp. 725–729.
  20. Ong, S.; Wong, K.; Qi, X.; Tanaka, K. Beyond format-compliant encryption for JPEG image. Signal Process. Image Commun. 2015, 31, 47–60.
  21. Qian, Z.; Zhou, H.; Zhang, X.; Zhang, W. Separable Reversible Data Hiding in Encrypted JPEG Bitstreams. IEEE Trans. Dependable Secur. Comput. 2016, 15, 1055–1067.
  22. Liang, H.; Zhang, X.; Cheng, H. Huffman-code based retrieval for encrypted JPEG images. J. Vis. Commun. Image Represent. 2019, 61, 149–156.
  23. He, K.; Bidan, C.; Le Guelvouit, G.; Feron, C. Robust and secure image encryption schemes during JPEG compression process. Electron. Imaging 2016, 28, 1–7.
  24. Cheng, H.; Zhang, X.; Yu, J.; Zhang, Y. Encrypted JPEG image retrieval using block-wise feature comparison. J. Vis. Commun. Image Represent. 2016, 40, 111–117.
  25. Zhang, D.; Zhang, F. Chaotic encryption and decryption of JPEG image. Opt. —Int. J. Light Electron Opt. 2014, 125, 717–720.
  26. Zhang, X.; Cheng, H. Histogram-based retrieval for encrypted JPEG images. In Proceedings of the 2014 IEEE China Summit & International Conference on Signal and Information Processing (ChinaSIP), Xi’an, China, 9–13 July 2014; pp. 446–449.
  27. Socek, D.; Kalva, H.; Magliveras, S.S.; Marques, O.; Culibrk, D.; Furht, B. New approaches to encryption and steganography for digital videos. Multimed. Syst. 2007, 13, 191–204.
  28. Cao, W.; Leng, X.; Yu, T.; Gu, X.; Liu, Q. A Joint Encryption and Compression Algorithm for Multiband Remote Sensing Image Transmission. Sensors 2023, 23, 7600. https://doi.org/10.3390/s23177600
More
This entry is offline, you can click here to edit this entry!
Video Production Service