|Intelligent Automation & Soft Computing
Compression of Grayscale Images in DRPE-based Encrypted Domain
1Department of Information Technology, College of Computers and Information Technology, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia
2Department of Electrical, Faculty of Technology and Education, Suez University, Suez 43527, Egypt
3Department of Electrical Engineering, Faculty of Engineering, Menoufia University, Shebin El-Kom 32511, Egypt
4Department of Electronics and Electrical Communications Engineering, Faculty of Electronic Engineering, Menoufia University, Menouf 32952, Egypt
*Corresponding Author: Osama S. Faragallah. Email: email@example.com
Received: 04 April 2021; Accepted: 05 May 2021
Abstract: Compressing the encrypted images is considered an important issue in many applications such as cloud computing. From this perspective, this paper introduces an efficient approach for compression processing of images in the encrypted domain. The images are optically encrypted using the Double Random Phase Encoding (DRPE). The Joint Photographic Experts Group (JPEG) and the Set Partitioning in Hierarchical Trees (SPIHT) compression schemes have been used to compress the encrypted images. The process starts by converting the original image into an optical signal by an optical emitter like an optical source and encrypting it with DRPE. The DRPE applies two-phase modulations on both time and frequency domains to get the encrypted image. The JPEG and SPIHT compression techniques are utilized with different bit rates. The effect of compressing encrypted images with the DRPE is studied. Security analysis results show that the encrypted images using the DRPE are adequately compressed by SPIHT at a low bit rate, and can be adequately compressed by JPEG at a high bit rate. Also, experimental outcomes and security study prove that the multipurpose encryption and SPIHT compression scheme is more secure and effective.
Keywords: DRPE; image compression; JPEG; SPIHT
Nowadays, multimedia are around us everywhere, on the Internet, in military applications, in medical images, and multimedia transmission is a daily routine. It is a challenge to find a secure way to transmit them over networks. Encryption is the primary technique for image protection. It transforms the image to ensure security during transmission and storage. Optical encryption and security schemes have witnessed many advantages because of their features of fast processors and parallelism. Optics provides many strategies for optical encryption according to the used encoding method for the optical beam, like polarization-encoding encryption, full phase and amplitude-based encryption . The full phase encryption is the superior one due to its non-linearity and its high security. The DRPE was suggested by Refregier and Javidi . It can be considered as an efficient and vastly utilized optical ciphering scheme. In Faragallah et al. [3–4], the fractional Fourier transform (FrFT) is viewed as a generalization of the Fourier transform. In Castro et al. [5–6], the lenses in the DRPE are employed for performing the optical Fourier transform (OFT) of an object. The main issue of lenses is suffering from aberration, which results in errors for estimating the FT. To improve encryption, the compression can be combined with encryption. Furthermore, the processing time is decreased. Traditionally, in the transmission of images, the images are often subjected to compression followed by encryption at the transmitter. For recovering the image data at the receiver, the received images are often subjected to decryption before decompression. However, with some applications, traditional treatment has to be reversed, and the encryption is followed by compression. This may be known as conducting a compression process at an encryption domain, and at the compressor, there is no need for the secret encryption key. The processing of images after encryption in the encrypted domain has obtained much attention. Image processing, such as image compression, has many benefits; it facilitates storage and speeds up data transmission. There exist two compression types: lossy compression, which does not conserve the quality of the image, and lossless compression, which is reversible and does not cause any visual problem. Suppose the compressed image is subjected to encryption. In that case, it may have good security and a faster transmission rate through the network than just only image encryption and transmitting the uncompressed image. However, compressing the image may increase the image overhead size and processing time with certain scenarios. Wavelet transform  became common and powerful in the past few decades in digital signal processing due to its efficiency in analyzing signals according to different scales or resolutions and representing data or other functions. One of the typical applications of wavelet transform in digital signal processing is wavelet-based image compression. Wavelet-based image compression techniques like embedded zero-tree wavelet transform (EZW) are appropriate and very quick in execution and they produce an excellent subjective human understanding of the retrieved images. The authors in  improved the EZW performance by introducing a superior and speedy implementation termed SPIHT. The SPIHT may be considered an effective method in terms of execution time and visual quality compared to other algorithms. The SPIHT can give an excellent distortion rate, while maintaining lower encoding complexity. A block-based image compression algorithm like JPEG produces characteristic blocking artifacts in the images and blurs fine details when working at low bit rates .
In this paper, compression of encrypted optical images based on DRPE is employed. The lossy JPEG compression and lossless SPIHT compression are executed on the encrypted images. A comparative study of compressing DRPE encrypted images using JPEG or SPIHT techniques is presented. The original images are encrypted at the transmitter by the content owner with DRPE-based image encryption method. The encrypted images are effectively compressed using JPEG or SPIHT compression techniques without revealing the original content. At the receiver, the original images are recovered using the secret keys. The performance of the proposed encryption-compression schemes is evaluated experimentally on a group of test images and compared to the theoretically realizable compression rates.
The remaining sections of this paper are subdivided as follows. Section 2 summarizes some of the related works. Section 3 displays a background about DRPE as an optical encryption technique, JPEG and SPIHT as compression techniques. In Section 4, the design of the proposed encryption-compression approach is given in details. Section 5 presents simulation analysis and results. The effect of noise on the decryption process is discussed in Section 6. Finally, in Section 7, the concluding remarks are given.
2 Related Works
There have been some related works on image security in the compressed encrypted domain over the past few years. The authors of  proposed an encryption-compression method using multiple chaotic maps to enhance the encrypted data security. The authors of  introduced a partial or selective encryption scheme for JPEG images to completely dissimulate the visual image information and produce lower resolution images. The authors in  proposed the compression of encrypted images when the underlying resource information is obscure in advance. In Lazzeretti et al. , the authors presented several frameworks to compress encrypted grayscale and color images. The type of compression is lossless compression using LDPC codes.
Furthermore, the authors of  developed a pixel permutation-based image encryption scheme, and deduced that the cipherimage might be, compressed by dismissing the excessive rough information. With this scheme, most information is transformed into a group of coefficients via the orthogonal transformation. After that, unwanted information in coefficients is eliminated and the amount of data is decreased. In recent days in , Zhang et al. proposed a compression technique for encrypted images using multilayer decomposition. Methods of blind encryption of videos were proposed with much effort, but they face poor performance compared with the systems that work on unencrypted output. In Maniccam et al. , the authors presented a binary/grayscale lossless compression and encryption scheme depending on SCAN methodology. In You et al. , the authors have proposed a compression encryption approach that employs the discrete wavelet transform (DWT) and the advanced encryption standard (AES). In Ito et al. , the authors proposed an encryption and compression scheme using the discrete cosine transform (DCT) and independent component analysis (ICA). In Cheng et al. , the authors have proposed a Quadtree compression algorithm, and a partial encryption algorithm. In Maheswari et al. , the authors have proposed combining Shuffle Encryption Algorithm (SEA) and lossless compression by using XML and JPEG compression. In Keat et al. , the authors have proposed a method combining RC4 and wavelet compression by using embedded zero-tree wavelet (EZW) encoder. In Thakur et al. , the authors have presented a method combining fractal coding and spiral architecture for lossy compression and encryption. In Kesavaraja et al. , the authors have performed a comparative survey of three conventional image compression techniques and their assortment of different features to select the most preferable one for cluster processing. The distributed intrusion detection system (DIDS) is used for cluster node monitoring, and robust intrusion control (RIC) prevention system is used. In Celikel et al. , the authors have presented text file compression and encryption schemes based on arithmetic coding, Huffman coding, Lempel-Ziv compression and symmetric key encryption. The prediction process is performed using partial matching and burrows-wheeler.
The DRPE was presented by Refregier and Javidi . The optical DRPE encryption technique uses two 2D random phase masks (RPMs) and both encryption and decryption processes use the same Fourier RPMs. Let
The following equation can achieve the DRPE encryption process:
The following equation can achieve the DRPE decryption process:
3.2 JPEG – Joint Picture Expert Group
Fig. 1 shows the JPEG lossy compression scheme. The image is firstly divided into 8×8 blocks with 8-bit values. After that, we apply the 2-D DCT for each block individually, which leads to the transformed matrix F. The element in the upper left represents the DC coefficient, and the others are 63 AC coefficients [25–26]. The next step is the quantization process. We select a quantization matrix Q with items qij according to JPEG recommendation and quantify DCT coefficients using the following equation :
where F(u,v) and Q(u,v) are the transformed and the quantization matrices.
The reverse process is represented as :
The Q matrix is defined in Eq. 3
The DC quantized coefficients may be encoded based on the former block DC term, as shown in Fig. 2.
where DC0 = 0. The first coefficient, which is the difference of DC coefficients, and the AC coefficients are encoded with the Huffman coding algorithm. After quantization and zigzag scanning for AC coefficients, the zero run-length coding is applied on the obtained vectors using the Huffman table for encoding coefficients, and finally, we get the bitstream.
3.3 SPIHT – Set Partitioning In Hierarchical Trees
The SPIHT was presented in Mitra et al. [27–28]. It may be considered a simple, fast wavelet-based image compression and an efficient refinement of EZW coding. It gives a better image quality with lower bit rates and a higher PSNR than the conventional image compressing schemes such as JPEG.
In SPIHT, the coefficients are ordered by magnitude, and the most significant bits are transmitted first. The SPIHT encoder consists of a DWT transformation, two passes of quantization, the sorting and the refinement passes, and a coder. There are three linked lists (LIP, LIS and LSP) that are used in the sorting pass. The LSP represents a list of significant pixels with coefficients of magnitudes above or equal to some threshold. The LIP represents a list of insignificant pixels, which has coefficients of magnitudes below the threshold. This list maintains the pixels that have to be estimated. The LIS is the list of insignificant sets. The pixels in those sets are below some certain threshold. The enhancement pass provides additional quantization precision bit entries in the LSP, excluding those generated in the sorting pass of this iteration. Better quality of reconstructed images is obtained by iterating the quantization process, and bisectioning the threshold every time. The encoding procedure creates a completely scalable bitstream and can be blocked if a target bit rate or a quality demand is achieved.
4 The Proposed Encryption-Compression Scheme
For encrypting an image, it is split into equivalent segments and transformed into an optical signal using an optical emitter like an optical source. Then, it is encrypted by the DRPE, which employs two phases modulation; one in the spatial domain and one in the FT. Finally, the optical encrypted image is revealed by the CCD digital camera, which converts it back to a digital format.
The decryption process works by applying the conjugate of the two random phase modulations to decrypt the encrypted image. After that, the optical encrypted image is converted to an electrical signal by an optical detector. Finally, the blocks are collected to obtain the original image. Fig. 3 depicts the proposed encryption-compression scheme. The process is as follows:
1- Apply the DRPE on different images.
2- Apply JPEG or SPIHT compression on the encrypted images with different bitrates.
5 Simulation Results
The 512×512 grayscale Lena and 512×512 grayscale Cameraman images, shown in Tab. 1, are used to evaluate the proposed scheme. Evaluation of the obtained results depends on the visual quality of decrypted images, entropy values, histogram graphs, encryption quality, differential analysis, and noise immunity.
5.1 Visual Inspection
The decrypted images are shown in Tab. 2 for JPEG and SPIHT compression. The visual appearance of the decrypted images ensures the superiority of the proposed encryption-compression scheme. In addition, the decrypted Lena and Cameraman images for JPEG and SPIHT compression schemes indicate that the SPIHT is more appropriate for a low bit rate than the JPEG.
5.2 Entropy Analysis
An efficient cryptosystem must conceal all structural features of the source plainimage. Concealing structural features ensures the unpredictability of the information included in the plainimage. The unpredictability can be computed using the entropy measure. The entropy E(x) of a cipherimage x can be calculated by [29–30]:
From these results, it can be seen that the entropy estimates of SPIHT compressed images are close to the standard value of 8, which indicates that the information leakage in the encryption and SPIHT compression may be neglected. Hence, the proposed scheme is secure for entropy attacks.
5.3 Histograms Analysis
Image histogram demonstrates pixels distribution within the image. The histogram is represented by graphing the number of pixels for every gray level. The histograms of the compressed and encrypted images and their corresponding original images are estimated and analyzed. The original plainimages histograms are illustrated in Tab. 4. The histograms of encrypted JPEG and SPHIT compressed images at different bitrates are shown in Tab. 5. The results show that the histograms of the encrypted images after compression are distinguishable from their corresponding original plainimages histograms and significantly different from those of the encrypted images without compression.
5.4 Compression/Encryption Quality
The proposed compression encryption module quality is studied and evaluated in terms of the correlation coefficient rxy among the plainimages and the cipherimages, histogram deviation DH, and irregular deviation DI. The correlation coefficient rxy can be evaluated among the plainimage x and cipherimage y as follows :
The histogram deviation is utilized to measure encryption quality by calculating the deviation amount between the original plainimage and its corresponding cipherimage . The histogram deviation DH is determined by estimating the area under the curve of histogram differences :
where d(i) defines the absolute difference amplitude among the plainimage and cipherimage histograms at pixel intensity value i. W and H represent image dimensions.
The irregular deviation is utilized as a measure of encryption quality through calculating the irregular deviation amount on the cipherimage . The irregular deviation DI is can be expressed as :
where h(i) and MH denote the cipherimage histogram at pixel intensity value i and the uniform histogram mean for an ideal cipherimage.
The correlation coefficient results for compressed images at different bit rate are given in Tab. 6, and the correlation coefficient results for decrypted images at different bit rates are given in Tab. 7. All results indicate a good performance of encryption with SPIHT compared to JPEG, where the correlation is low among the plainimage and the cipherimage pixels. The histogram deviation results for compressed images at different bit rates are given in Tab. 8. All results indicate a good performance of the encryption algorithm with SPIHT and JPEG, where the correlation is low among the plainimage and the cipherimage pixels. Finally, the irregular deviation results for compressed images at different bit rates are given in Tab. 9. All results indicate a good performance of the encryption with SPIHT and JPEG, where the correlation is low among the plainimage and the cipherimage pixels.
6 Effect of Noise
The robustness of the proposed encryption-compression module against noise in the decryption process is a significant factor for the success of our module. Therefore, the PSNR can be used to evaluate the decrypted images visual quality in the existence of noise. The effectiveness of the decryption procedure is computed using the PSNR. It can be defined as :
where f1(i, j) and f2(i, j) represent the pixels grayscale level at position (i, j) of the plainimage and decrypted cipherimage, respectively.
As the PSNR value becomes high, the algorithm becomes better for noise immunity. The PSNR is increased as the bit rate is increased at a specific SNR for JPEG and SPIHT compression schemes. The decrypted images and the PSNR results for JPEG compared with SPIHT compression at different compression rates and different SNR are tabulated in Tabs 10, 11, 12 and 13. The obtained results prove that the SPIHT compression is more efficient than JPEG, particularly at all bit rates.
This paper introduced a superior compression processing approach in the DRPE-based encrypted domain. First, the image is optically encrypted with the DRPE. Then, either the JPEG or the SPIHT compression technique is employed for compressing the encrypted image. Both simulation results and security analysis show that the decrypted images for JPEG and SPIHT compression schemes indicate that the SPIHT is more appropriate for all bit rates than the JPEG. Furthermore, the SPIHT compression of encrypted images is not significantly affected by noise. So, it can work efficiently in a noisy environment.
Acknowledgement: This study was funded by the Deanship of Scientific Research, Taif University Researchers Supporting Project number (TURSP-2020/08), Taif University, Taif, Saudi Arabia.
Funding Statement: This study was funded by the Deanship of Scientific Research, Taif University Researchers Supporting Project number (TURSP-2020/08), Taif University, Taif, Saudi Arabia.
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.
|This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.