1. Introduction
Images require metadata that describe their existence and summarize the underlying image data. That is, details on the author, creation date, modification date, file size, etc. The purpose of this paper was to support image security by encrypting the compressed image with AMBTC, one of the compression methods of gray images, and creating a model that supports Data Hiding (DH) [
1,
2,
3]. DH can be used for covert communication, authentication and copyright based on a variety of digital media (e.g., digital content such as images, video, audio, etc.). The receiving end is used to extract data from the encrypted image and support the recovery of the original cover image. The data hidden in the image should not be detectable by an attacker.
Reversible DH(RDH) [
4,
5] is a kind of DH. It is possible to recover the original image after extracting data from the marked image, and various RDHs have been proposed so far. RDH can be classified into three specialities. That is, pixel extension (DE) [
5,
6,
7] histogram shift (HS) [
8], prediction error extension (PE) [
9]. DE is a method of first doubling the difference between two adjacent pixels, and then hiding one bit in the LSB (least significant bit). In HS, the zero and peak points in the histogram of the cover image are used to hide secret metadata. PE is a method of hiding data by using the difference in the prediction error between the original pixel and the predicted pixel.
On the other hand, image encryption [
10,
11] is a method used to protect digital information by encrypting the image so that only the user who knows the encryption key can restore the image, thereby protecting the privacy of the image. In particular, in order to share secret images, owners, assistants, and administrators must encrypt the image and then distribute it using a trusted service provider (SP). For example, hospital administrators can embed personal information, authentication, and diagnostic opinion data into encrypted X-ray, CT, or MRI images. In this case, encrypted image-based RDH combines the advantages of RDH and image encryption. It can be useful as it is a compromise between advantages.
If the original image is encrypted and delivered to the SP, the SP cannot estimate the image before it is encrypted. Because the SP does not have the encryption key, it cannot recover this image. The role of the SP is to hide additional data in the encrypted image and transmit the encrypted image to the receiver. After decoding the image on the receiver side, the recovered cover image is lossless, and metadata can also be extracted on the receiver side. Since Zhang [
12] introduced an RDH encrypted image (RDH-EI)-based RDH using the fluctuation principle, the extended RDH-EI has been actively studied. RDH-EI has a similar process to RDH, except that the cover image is encrypted before hiding the metadata. In fact, RDH-EI can be utilized for various applications such as authentication, copyright and personal security protection [
13,
14,
15,
16,
17,
18].
Zhang [
19] demonstrated that data extraction and image recovery are separable and that hidden metadata can be extracted without errors. The process is called Separable RDHEI (SRDH-EI) [
19,
20,
21]. That is, the receiving side can use EK (encryption key) and DK (data secret key) to decrypt and extract the encrypted image regardless of the application order. In [
20], Qian et al. proposed n-ary SRDH-EI using HS and solved the original image recovery problem, which is the problem of Zhang’s method. Yin et al. [
21] proposed SRDH-EI with a general payload and error-free data extraction by introducing multi-granularity permutation.
Yin et al. (2018) [
22] first proposed an AMBTC-based RDH-EI method. The first step is to encrypt the upper and lower averages of triples in the AMBTC-compressed video using a stream cipher. The prediction error histogram correction technique can then be used to insert additional data into the redundant space.
Wang et al. (2019) [
23] proposed an embedding method based on an AMBTC (absolute moment block truncation coding) compressed image. They used an adaptive variable N-bit bit-plane truncated image embedding method to embed secret data in each block. Here, the secret data are extracted from the receiver side, and the stored peaks and zeros are retrieved to restore the original AMBTC image. Since the histogram of the image is used for data hiding, the amount of hidden data can vary greatly depending on the characteristics of the image. Su et al. (2022) [
24] utilized the redundant space derived from the quantization level to insert a secret message. Data hiding was then performed using a labeling strategy. It achieved a higher embedding capacity than most existing methods.
Meanwhile, Block Truncation Coding (BTC) [
25] is one of the available compression methods, and the configuration of the BTC is very simple compared to conventional JPEG. Thus, the computation time of BTC is much shorter than that of JPEG, and the quality of an image based on BTC is not significantly deteriorated compared to that of the original image. For this reason, it seems that many researchers are interested in DH based on Absolute Moment BTC (AMBTC) [
26], which was developed from BTC recently.
Chuang and Chang [
27] proposed a DH method in which each block of the bitmap is divided into a smooth block and a complex block, and then the bitmap of the smooth block is replaced with a secret bit. A block is divided into a smooth block and a complex block with the difference value (threshold value:
T) between the two quantization levels representing the block, thereby controlling the quality of the image. That is, if the threshold value
T is lowered, the image quality is improved, but the data hiding capacity is reduced. If the size of the threshold value increases, the image quality can be lowered and the hidden data capacity can be increased. Ou and Sun [
28] proposed a method by which to adjust image distortion by adjusting two quantization levels, but the original image is required for recomputation. Chen et al. [
29] proposed a lossless DH method using two quantization level orders.
In this paper, we proposed the SRDH-EI method for AMBTC. AMBTC has the advantage of not having a high computational complexity, which can be useful for real-time video and non-critical image/video processing. In addition, low-resolution compressed images are suitable for efficient use in low-power communication based on WSN (Wireless Sensor Networks). The proposed SRDH-EI method consists of the following three steps: image encryption, data hiding, data extraction, and image recovery. AMBTC consists of a bitmap and two quantization levels and is encrypted with a bitmap and a stream cipher with random bits for the two quantization levels. Here, the bit operation, such as XOR, is often used as the encryption/decryption operation. The goal of the proposed model was to achieve the scenario of SRDH-EI. Data hiding uses a Hamming code to hide the message in an encrypted bitmap. Data hiding using the Hamming code has the advantage of good data hiding efficiency and can minimize errors occurring in the cover image. As a result, the image quality of the decrypted image is very good. By conducting simulations, we demonstrated that this method achieves high embedding capacity, good image quality, and error-free hidden bit restoration.
The remainder of this paper is structured as follows.
Section 2 describes related studies.
Section 3 describes and discusses SRDH-EI.
Section 4 presents the experimental results. Finally,
Section 5 provides the conclusion.
4. Experimental Results and Discussion
In
Section 3, we proposed AMBTC-based SRDH-EI, and in this section, we describe in detail the comparison and analysis of the simulation results to verify the performance of the proposed method. The computing platform used in the experiment has a Core i5-8250U processor, 1.60 GHz speed, 8 GB RAM, and the software for the simulation is MATLAB R2019b. The standard USC-SIPI image database [
32] was used for experiments on the proposed model. Among them, some of the original
grayscale images were used for the experiment.
Figure 4 shows a series of test images (e.g., Lena, Pepper, Airplane, Boat, Goldhill, Couple, Baboon, Zelda) used in the experiment.
SSIM (Structural Similarity Index Metric) and PSNR (Peak Signal-to-Noise Ratio) were used for evaluation. The quality of the reconstructed image with data was measured as PSNR and defined as
PSNR is calculated as
(signal power/noise power), and signal power and noise power are calculated using peak power. Here,
is the allowable pixel intensity. The MSE used for PSNR is the difference in mean intensity between the marked image and the reference image, and the lower the MSE value, the better the image quality can be evaluated. That is, MSE is the mean of squared errors
, where
and
are the reference image and the distorted image, respectively. MSE is calculated as follows:
In addition, another measurement introduced for performance evaluation is SSIM, which is a formula (Equation (
20)) that measures the similarity between the original image and the marked image.
where
and
are the mean values of
g and
, respectively, and
is the stabilization constant and
, and
are the variances and covariances of the cover image and the stego image.
and
are constant values to avoid division by zero problems.
Table 1 compares the PSNR and SSIM measurements for the cover image, the encrypted image, and the encrypted image when the difference between the two quantization levels is
. First, it shows the PSNR and SSIM measurements between AMBTC-compressed images for the original image. The PSNRs of Baboon and Barbara are 26.9765 and 27.0756, which are measured below 30 dB. Baboon is a high-frequency image, and when compressed with AMBTC, the SSIM is z 0.8872 image, which is not classified as bad for the human visual system. It can be seen that the Zelda image has the highest PSNR of 36.6537. The PSNR and SSIM of the encrypted AMBTC are 10 or less and 0.0159 or less, respectively. For this reason, it can be seen that the encrypted image is encrypted to such a level that it is difficult to infer the original image from the encrypted image. For the encrypted image, data were hidden by the proposed method with two quantization levels
. When looking at the PSNR and SSIM measurements of the decoded AMBTC including the data, it can be confirmed that it is almost similar to the cover AMBTC. That is, PSNR and SSIM are acceptable even if enough data is concealed.
Figure 5 shows the encrypted image mentioned in
Table 1, and data hiding is applied to the encrypted image and transmitted to the receiver. The receiver cannot know the existence of the data and the form of the image from this encrypted image. This is the advantage of encryption RDH. Encryption for AMBTC was performed for bitmap and two quantization levels, respectively. If only one of the bitmaps or the two quantization levels is encrypted, a part of the original image may remain in the encrypted image.
Table 2 compares EC and PSNR according to the difference
T between the two quantization levels. As the value of
T decreases, EC decreases while PSNR increases. While, as the value of
T increases, EC increases while PSNR deteriorates. In
Table 2, it can be seen that EC and PSNR were measured while increasing from
to
. When
, the average EC is 21,295 and the PSNR is 32.2393, which is high with an average of 32 dB. When
, the average EC is 36,657 and the PSNR remains above 32 dB. When
, the average EC was measured to be 48,336 and the PSNR was 29 dB, which can be seen to drop to less than 30 dB, but it shows a similar performance to the human visual system. In conclusion, if a block with a small difference between the two quantization levels is sufficient, not only can a large amount of data be hidden, but also the PSNR is excellent. This is affected by the characteristics of the image.
Table 2 shows that it is difficult to hide a sufficient amount of data in the case of high-frequency images such as Baboon. In the case of a low-frequency image such as Pepper, since the difference between the two quantization levels in many blocks is relatively small, it is possible to hide a large amount of data while maintaining a high PSNR.
Table 3 compares Yin et al.’s method of an AMBTC-based model with existing methods and our proposed method. Cover AMBTC is a criterion for evaluating performance, and a comparison of the PSNR can be conducted based on this criterion. PSNR
1 and PSNR
2 were obtained from the decrypted images and recovered images, respectively. Here, we measure PSNR
1 and PSNR
2 when
. When hiding message bits in a bitmap, flip the bitmap from ‘0’ to ‘1’ or ‘1’ to ‘0’. That is, when the difference between the two quantization levels is 1, the error occurring in this block is 1. If
, the error is 2. In the end, if the value of
T has increased, the amount of data to be hidden can be sufficiently increased, but the error will increase, the PSNR will deteriorate, and image damage will be large.
Table 2 shows the EC and PSNR for the image while increasing the
T value.
Table 3 shows the simulation results for
, where PSNR and EC were judged to be at appropriate levels.
was selected under the judgment that EC was at an appropriate level while minimizing PSNR. Comparing the payload of Yin et al.’s with the payload of our proposed method, we demonstrated that the average payload of our proposed method is 20 times better. In addition, if the image is restored, it shows the advantage of being able to restore the original cover image.
When implementing Yin et al.’s method [
22], it is necessary to record some auxiliary information and embed it into the bitmap of the first several triples by sacrificing some embedding space. Thus, their scheme does not fully excavate and make full use of the characteristic of the AMBTC compression codes. In Wang et al’s method [
23], each block records a pair of peak and zero points. Since the histogram modification method proposed here was first devised for gray images, it does not provide a sufficient amount of redundant bits for data hiding the compressed images, so the data hiding capacity is relatively small. Su et al.’s method [
24] considers the natural correlation of quantization levels within a block and had an improved embedding capacity compared to the Yin et al.’s scheme. The method we proposed is a method that can modify 1 pixel for each block and hide 4 bits, and is an optimized method to ensure data hiding efficiency and a high image quality. As shown in
Table 4, it can be seen that the EC of our proposed method has the best performance.
Figure 6 shows the results of decryption after hiding data in the encrypted image when the difference between the two quantization levels is
. The quality of the decoded image including the data can be visually compared to the original. When looking at
Figure 6a,b, which are the decoded images, the PSNR is clearly not high below 30 dB, which shows the image quality. Since the original image of (a) and (b) was also less than 30 dB, the PSNR of the decoded image was measured to be less than 30 dB. Except for this, the performance is over 30 dB. When compressing the original image with AMBTC, since compression representing two quantization levels per block was used, the same level of performance as the original image was not observable, but as shown in
Table 1, the SSIM was 0.9 or higher except for the case of Barboon. It can be seen that the characteristics of the original image are sufficiently reflected.
In the case of restoring the original image by removing the error occurring for each block in the decoded image, it can be restored with the cover AMBTC shown in
Table 1. In this way, it is expected that it is suitable for various applications because not only is the quality of the image sufficiently similar to that of the original image, but the compression can also be performed at a high level.
Table 5 summarizes and compares the performance of the proposed method and the existing method. Zhang [
12] proposed a method capable of extracting data without errors from the encrypted image, but there is a problem in the complete restoration of the original cover image. Ma et al.’s method [
13] and Zhang et al.’s method [
19] achieved data extraction and complete restoration of the original cover image. However, both approaches require reserve space before hiding data. The method of Yin et al. [
22] maintained the block correlation of the image by using the histogram of the prediction error in the data embedding step and used the method of utilizing the extra space. This method also recovers the original image without errors using both keys. In Wang et al.’s method [
23], the RDH is based on the histogram modified embedding method, which is utilized for obtaining a high payload and low storage memory. Su et al.’s method [
24] means that secret messages can be embedded by exploiting the redundant room derived from the quantization levels. Data hiding is then performed with the use of a labelling strategy. This method is an RDH method, which has already been verified. Therefore, there is no problem with restoring the original image. The method we proposed is a method that uses a Hamming code, has excellent data hiding performance and restored image quality, and it is also possible to restore the original cover image using this method.