Next Article in Journal
Research on Rockburst Risk Level Prediction Method Based on LightGBM−TCN−RF
Next Article in Special Issue
Few-Shot Continuous Authentication for Mobile-Based Biometrics
Previous Article in Journal
Production Optimization in a Grain Facility through Mixed-Integer Linear Programming
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Separable Reversible Data Hiding in Encrypted AMBTC Images Using Hamming Code

Department of Computer Engineering, Sejong University, Seoul 05006, Korea
Appl. Sci. 2022, 12(16), 8225; https://doi.org/10.3390/app12168225
Submission received: 23 July 2022 / Revised: 8 August 2022 / Accepted: 12 August 2022 / Published: 17 August 2022
(This article belongs to the Collection Trends and Prospects in Multimedia)

Abstract

:
Data hiding is a field widely used in copyright, annotation, and secret communication for digital content, and has been continuously studied for more than 20 years. In general, data hiding uses the original image as a cover image to hide data, but recently, the research area has expanded to research on improving the security and privacy protection of image contents by encrypting the image. This research is called separable reversible data hiding in an encrypted image (SRDH-EI). In this paper, we proposed a more efficient SRDH-EI method based on AMBTC. AMBTC can guarantee very good network transmission efficiency for applications that do not require a particularly high image quality because the compression time is short and calculation is simple compared to other existing compression methods. The SRDH-EI method presented here divides AMBTC into non-overlapping 4 × 4 blocks and then performs image encryption on them. Thereafter, data can be hidden using a Hamming code for each block. The proposed method has an advantage in that the quality of the cover image and the hiding capacity can be adjusted by appropriately using the value T of the difference between the two quantization levels. The experimental results proved the efficiency and superiority of our proposed model.

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.

2. Related Works

2.1. Absolute Moment Block Truncation Coding

AMBTC (Absolute Moment Block Truncation Coding) [26] is a type of BTC [25] that provides a faster compression processing speed and better image quality. A block consists of two quantization levels and a bitmap, and one block is compressed by preserving the moment. The two quantization values represent a high mean and a low mean for the pixel values of each block. Before the gray image is compressed with AMBTC, the image is first divided into non-overlapping sized blocks. That is, assuming that the variable corresponding to the block size set is k × k , the block size may be (2 × 2), (4 × 4), (6 × 6), and (8 × 8). The mean of each block is as follows.
g ¯ = 1 k × k i = 1 k 2 g i
In Equation (1), g i is the i-th pixel in the block. Pixels constituting each block are compressed into a bitmap. That is, the pixels in the block are replaced by a ‘1’ if the pixel is greater than the mean value g ¯ , and a ‘0’ otherwise. Bitmap blocks are divided into the following two groups: ‘1’ and ‘0’. Bitmap b i = { b i 1 , b i 2 , , b i k × k } is generated as a result of Equation (2).
b i = 1 , i f ( g i g ¯ ) , 0 , otherwise
In order to recover a bit-plane compressed into a bitmap into a gray image, two quantization levels representing each block are needed. The method of obtaining two quantization levels in each block is provided in Equations (3) and (4), where t and k 2 t represent the number of ‘0’ and the number of ‘1’, respectively.
Q 1 = 1 t g i < g ¯ k 2 g i
Q 2 = 1 k 2 t g i g ¯ k 2 g i
Here, Q 1 and Q 2 may be used for decoding AMBTC. An image block can be compressed into two quantization levels Q 1 , Q 2 and a bitmap M and cab be expressed as a t r i o ( Q 1 , Q 2 , b). According to the value of the bitmap, Q 1 and Q 2 values are decoded by applying Equation (5). Finally, the compressed image can be decoded into a gray image.
g i = Q 1 , if ( b i = 0 ) , Q 2 , otherwise
The size of the block is inversely proportional to the image quality and compression ratio. If the block size increases, the compression rate increases but the image quality deteriorates. If the block size decreases, the compression rate decreases, and the image quality improves. We used a block size of 4 × 4 in this study. The reason is that it is considered as a size that complies with the appropriate level of compression ratio and PSNR. If the block size is increased to ( 8 × 8 ), the PSNR will decrease. If we reduce the block size to ( 2 × 2 ), PSNR will increase, but the number of pixels required to apply our proposed RDH will be insufficient.
Example 1.
As shown in Figure 1a is a block of the original image and the process is explained using this. If a block of gray images g = {176, 171, 188, 169, 179, 157, 167, 187, 189, 179, 197, 184, 182, 172, 159, 159}, the mean of this block is 106. Applying Equations (1)–(4), the t r i o of this block becomes t r i o ( Q 1 , Q 2 , M ) = (165, 185, 1010100111111000). Here, the mean ( g ¯ ) is 106, the low mean ( Q 1 ) is 165, and the high mean ( Q 2 ) is 185. A bitmap (b) is constructed by assigning ‘1’ to those values that are greater than the average and ‘0’ to those that are not. Decoding using Equation (5) results in g = { 185 , 165 , 185 , 165 , 185 , 165 , 165 , 185 , 185 , 185 , 185 , 185 , 185 , 165 , 165 , 165 } . (c) is generated by the decoding process.

2.2. Hamming Code

Hamming codes [30,31] have been widely used for error control in digital communications and data storage. It has interesting properties that make encoding and decoding tasks easier. When r is a non-negative integer that is a parity space dimension, the length of the codeword becomes N = 2 r 1 and the data bits become K = N r . A single error-correcting linear block code with a minimum distance of 3 for all codewords was selected. Let x be a K -bit information word. An N -bit codeword y is generated using y = x G , where G is a K -by- N generator matrix.
It is in fact the space of vectors y F 2 n such that H y = 0 for the parity check matrix H. The parity check matrix for the HC(7,4) Hamming code is as follows
H = 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1
Let us assume that the codeword y has an error such as e = ( y y ) . In this case, we could correct one error ( e = y y ) from the codeword y by using the syndrome η = y · H T , where the syndrome denotes the position of the error in the codeword. As show in Equation (7), the error e can be obtained.
y ˜ · H T = ( e y ) · H T = e · H T + y · H T ( y · H T ) = ( x · G ) · H T = x · ( G · H T ) = 0 ) = e · H T + 0 = e · H T
The following are check matrices for HC(15, 11) binary Hamming codes (Equation (8)).
H = 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Example 2.
Suppose Alice wants to send codeword r = [ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ] to Bob. Here, the codeword r contains an error in the second bit. That is, Bob receives codeword r ˜ = [ 1 1 1 0 1 0 1 0 1 0 1 0 1 0 ] with an error. Bob computes the syndrome η and finds the error e. As a result, he obtains the codeword r = [ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ] which has repaired the error.

2.3. Yin et al.’s Scheme

Yin et al. (2018) [22] proposed a prediction error-based RDH technique in encrypted AMBTC compressed images. In this technique, for each trio, the two quantization levels Q 1 and Q 2 are encrypted with a bit-based XOR operation using the same random binary code. Bitmap b is encrypted in a similar way. Then, we can obtain the prediction error values by calculating the difference between the encrypted Q 1 and Q 2 . The RDH procedure is as follows: First, the 16-bit secret message is replaced directly with the bitmap in the i-th block when Q 2 equals Q 1 , and f i is set to ‘1’ at the same time. Otherwise f i is set to ‘0’. Assume here that the two peak bins are P 1 and P 2 , the two zero bins are Z 1 and Z 2 , and Z 1 < P 1 < P 2 < Z 2 . The secret message s can be embedded into Q 1 by changing Q 1 to Q 1 according to Equation (9):
Q 1 = Q 1 + 1 , if ( Z 1 < P E < P 1 ) , Q 1 + s , if ( P E = P 1 and f Q 1 ) , Q 1 s , if ( P E = P 2 and f Q 1 ) , Q 1 1 , if ( P 2 < P E < Z 2 ) ,
where P E is the prediction error value between two quantization levels in the i-th block. Here, some auxiliary data including two zero-bins, two peak-bins, and a location map are embedded together with the messages.

3. Proposed Scheme

In this section, we provide detailed step-by-step methods for the AMBTC-based SRDH-EI model. This model is broadly divided into the following three phases: image encryption, data hiding, data extraction, and image recovery. The diagram of the proposed model is briefly sketched in Figure 2. The image owner uses AMBTC and the image encryption key to transform AMBTC into an encrypted image. SP uses the encrypted AMBTC and data secret key to hide additional (meta)data in the encrypted image. The recipient who receives the image can extract data or recover the image from the encrypted image by using the data secret key and the image encryption key. In addition, two keys can be used to manage data extraction and image recovery (Figure 2).

3.1. AMBTC Image Encryption

In this section, we provide a detailed step-by-step explanation of the encryption process for the compressed image AMBTC. The method of compressing the original image with AMBTC is based on Section 2.1. It is assumed that the size of the image is N × N and the size of one block is 4 × 4 .
Input: 
An AMBTC cover image I and key EK.
Output: 
An encrypted cover image I’ with size N × N .
Step 1: 
Read a t r i o ( Q 1 , Q 2 , M ) from the cover image I, where Q1 and Q2 are the quantization levels and M is a bitmap M = (m1, m2, … , m15, m16).
Step 2: 
The quantization levels are Q 1 = ( a 8 , a 7 a 1 ) and Q 2 = ( b 8 , b 7 b 1 ) , where a 8 is the Most Significant Bit (MSB) of Q 1 and a 1 is the LSB of Q 1 . Similarly, b 8 is MSB of Q 2 and b 1 is the LSB of Q 2 . r = ( r 8 , r 7 r 1 ) is pseudo-random binary generated by the encryption key EK. Encryption for two quantization levels Q 1 and Q 2 is obtained by using Equations (10) and (11).
a ˜ i , j = a i , j r i , j , j = 0 7 b ˜ i , j = b i , j r i , j , j = 0 7
Q 1 i = j = 0 7 a ˜ i , j × 2 j Q 2 i = j = 0 7 b ˜ i , j × 2 j
Here, i is the index of the block and j is the subscript for the two quantization levels Q 1 and Q 2 converted into binary numbers.
Step 3: 
For a bitmap M = ( m 1 , m 2 , , m 16 ) of t r i o i , a pseudo-random binary number r is generated by the image encryption key EK. An encrypted bitmap block M is obtained by applying the XOR operation between the bitmap and the pseudo random bits r (Equation (12)).
M = m j r j , j = 1 16
Step 4: 
If i is not the last block, it moves to Step 1 and repeats the given process. When the given procedure is completed, the encrypted AMBTC is finally generated.
When this process is completed, an encrypted cover image is finally created. Data hiding is then applied to the bitmap of each block of this encrypted cover image.

3.2. Data Embedding

In this section, we provide a detailed step-by-step description of the process of hiding data in the encrypted AMBTC image.
Input: 
An encrypted AMBTC cover image I and secret data S = ( s 1 , s 2 , , s n ) .
Output: 
An encrypted marked image I .
Step 1: 
Read a t r i o ( Q 1 , Q 2 , M ) from the encrypted AMBTC image I , where Q 1 and Q 2 are the quantization levels and M is a bitmap M = ( m 1 , m 2 , , m 15 , m 16 ) .
Step 2: 
The exclusive-or operation between the secret message bits s i and the pseudorandom bits r i are calculated using Equation (13), where r is determined via DK using a standard stream cipher.
s i = s i r i
Step 3: 
A bitmap M = { m 1 , m 2 , , m 15 } is assigned to codeword c. For codeword c, the syndrome η is obtained by employing Equation (14).
η = ( c · H T ) mod 2
Step 4: 
Exclusive-or operation is performed on the syndrome and the encrypted bits. That is, η ^ = η s i + 4 . If syndrome η ^ = 0 , this means no operation. Otherwise, flip the η ^ -th coordinate c η ^ of c. For image restoration, the rows and columns of the changed location c η ^ are obtained using Equation (15), where r c is the value of the row and column, and 4 bit information of r c is added to the last bit of M . The r c needs to be converted to binary before it is added last to M . In the formula, c n t is first initialized to 0 and then the formula is applied.
r c = i = 1 4 j = 1 4 ( i | | j ) , i f ( η ^ = c n t ) , + + c n t
Step 5: 
After the operation, the codeword c is assigned to M 1 15 , i.e., M 1 15 = c . Add payload coordinates r c after bitmap M . That is, M = M | | r c .
Step 6: 
Go to Step 1 to continue the embedding processes until all messages have been embedded in the encrypted cover image.
If this process is repeatedly applied as often as the size of the image, marked images I are obtained. Using Example 3 below, we briefly reviewed the data hiding process.
Example 3.
As given in Figure 3, when the bitmap block M = (1010010110100101) and the secret bit s = (1010), codeword c = (1010010110100101) is first constructed for data hiding. Next, the syndrome η is calculated. That is, η = H · c T = (0000). Then, an exclusive-or operation is performed on the syndrome and the secret bit. The result is the decimal number 10. 4-bit data hiding is completed by inverting the number at position 10 of the bitmap. To restore the block, it is necessary to store the payload for the 10th position. The data hiding process is completed by adding (0110) at the end of the bitmap M .

3.3. Data Extraction and Recovering Procedure

In this section, we introduce the process of data extraction and image restoration from the proposed model. If the receiving side has only the encryption key EK or data secret key DK, image restoration or extraction is possible. If both keys are present, image restoration and data extraction are possible. If we do not have the encryption key and data secret key, image restoration and data extraction cannot be performed. These features can not only protect images from attackers, but also hide data. We describe the process of extracting hidden information from the marked images I created in Section 3.2 and restoring the original image. The detailed process is described in stages.
Input: 
An encrypted AMBTC cover image I sized N × N , and both keys EK and DK.
Output: 
A secret message and the cover image I sized N × N and S = ( s 1 , s 2 , , s n ) .
Step 1: 
Read the i-th t r i o ( Q 1 , Q 2 , M ) from the encrypted cover image I , where Q 1 and Q 2 are the quantization levels and M is a bitmap M = ( m 1 , m 2 , , m 15 , m 16 ) .
Step 2: 
Assign the bitmap M 1 15 to codeword c, i.e., c = M 1 15 .
Step 3: 
Calculate the syndrome η ^ = H · c T for codeword c, and then assign the syndrome value η ^ T to the secret bits s i + 4 , i.e., s i + 4 = η ^ T , i = i + 4 . For the extracted 4-bit data, decoding is performed using r created by DK using a standard stream cipher. That is, s i + 4 = s i + 4 r i .
Step 4: 
Repeat Steps 1 and 3 for all blocks. Then, the secret data are recovered completely.
Step 5: 
The original bitmap containing hidden bits can be recovered from the encrypted image by the EK. For decryption, the exclusive-or results of the encrypted bits and pseudo-random bits are calculated via Equation (16). This restores the bitmap M = ( m 1 , m 2 , , m 16 ) .
m j = j = 1 16 m j r j
Step 6: 
In the data hiding process, the location η ^ of the codeword was changed, and to restore it during the image restoration process, the payload was attached to the back of M and recorded. In this was, the bitmap M is restored. That is, after obtaining the changed matrix position(row, column) from the bitmap, the restored bitmap M is obtained using Equation (17), where r c ( 1 ) is the row and r c ( 2 ) is the column position of the location η ^ .
M = u = 1 4 v = 1 4 flip ( M u , v ) , i f ( u = r c ( 1 ) and v = r c ( 2 ) ) , M u , v , otherwise .
Step 7: 
Repeat Steps 1 and 6 for all blocks. Then, all bitmaps are recovered completely.
The image I restored by this process is the cover image and becomes the original AMBTC image.

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 512 × 512 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
P S N R = 10 l o g 10 255 2 M S E .
PSNR is calculated as 10 l o g 10 (signal power/noise power), and signal power and noise power are calculated using peak power. Here, 255 2 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 ( g i g i ) 2 , where g i and g i are the reference image and the distorted image, respectively. MSE is calculated as follows:
M S E = 1 N × N i = 1 N 2 ( g i g i ) 2
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.
S S I M ( g , g ) = ( 2 μ g μ g + c 1 ) ( 2 σ g g + c 2 ) ( μ g 2 + μ g 2 + c 1 ) ( σ g 2 + σ g 2 + c 2 )
where μ g and μ g are the mean values of g and g , respectively, and c 1 is the stabilization constant and σ g 2 , σ g 2 , and σ g g are the variances and covariances of the cover image and the stego image. c 1 and c 2 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 T = 5 . 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 T = 5 . 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 T = 5 to T = 20 . When T = 5 , the average EC is 21,295 and the PSNR is 32.2393, which is high with an average of 32 dB. When T = 10 , the average EC is 36,657 and the PSNR remains above 32 dB. When T = 20 , 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. PSNR1 and PSNR2 were obtained from the decrypted images and recovered images, respectively. Here, we measure PSNR1 and PSNR2 when T = 5 . 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 T = 2 , 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 T = 5 , where PSNR and EC were judged to be at appropriate levels. T = 5 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 T = 5 . 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.

5. Conclusions

In this paper, we proposed an AMBTC-based SRDH-EI model. This model consists of the encryption of the AMBTC cover image, data hiding of the encrypted AMBTC cover image, recovery of the encrypted AMBTC and data extraction. As a result of the simulation, the proposed method demonstrated twice the EC performance of the method proposed by Su et al. [24], which displayed the best performance among the existing methods. In addition, as shown in Table 3, the high image quality was maintained with an average of 31.93 dB when T = 5 . In the future, we plan to conduct further research on effective ways to hide larger amounts of data while maintaining high image quality.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The author declares no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AMBTCAbsolute Moment Block Truncation Coding
BTCBlock Truncation Coding
DHData Hiding
RDHReversible Data Hiding
SRDH-EISeparable RDH in an Encrypted Image
HCHamming Code
ICover Image
I′Encrypted Cover Image
I″Marked Image
gpixel of grascale image
Qquantization levels
Mbitmap
ccodeword
Hparity check matrix
mhidden bits
η syndrome
ECEmbedding capacity
PSNRPeak Signal-to-Noise Ratio
MSEMean-Squared Error
DEDifference Expansion
HSHistogram Shift

References

  1. Bender, W.; Gruhl, D.; Morimote, N.; Lu, A. Techniques for data hiding. IBM Syst. J. 1996, 35, 313–336. [Google Scholar] [CrossRef]
  2. Kim, C.; Shin, D.-K.; Yang, C.-N.; Leng, L. Hybrid Data Hiding Based on AMBTC Using Enhanced Hamming Code. Appl. Sci. 2020, 10, 5336. [Google Scholar] [CrossRef]
  3. Yang, C.N.; Wu, S.Y.; Chou, Y.S.; Kim, C. Enhanced stego-image quality and embedding capacity for the partial reversible data hiding scheme. Multimed. Tools Appl. 2019, 78, 18595–18616. [Google Scholar] [CrossRef]
  4. Shi, Y.Q.; Li, X.; Zhang, X.; Wu, H.-T.; Ma, B. Reversible data hiding: Advances in the past two decades. IEEE Access 2016, 4, 3210–3237. [Google Scholar] [CrossRef]
  5. Tian, J. Reversible data embedding using a difference expansion. IEEE Trans. Circuits Syst. Video Technol. 2003, 13, 890–896. [Google Scholar] [CrossRef]
  6. Wu, D.C.; Tsai, W.H. A steganographic method for images by pixel-value differencing. Pattern Recognit. Lett. 2013, 24, 1613–1626. [Google Scholar] [CrossRef]
  7. Alattar, A.M. Reversible watermark using the difference expansion of a generalized integer transform. IEEE Trans. Image Process. 2004, 13, 1147–1156. [Google Scholar] [CrossRef]
  8. Ni, Z.; Shi, Y.Q.; Ansari, N.; Su, W. Reversible data hiding. IEEE Trans. Circuits Syst. Video Technol. 2006, 16, 354–362. [Google Scholar]
  9. Tsai, P.Y.; Hu, Y.C.; Yeh, H.L. Reversible image hiding scheme using predictive coding and histogram shifting. Signal Process. 2009, 89, 1129–1143. [Google Scholar] [CrossRef]
  10. Abanda, Y.; Tiedeu, A. Image encryption by chaos mixing. IET Image Process. 2016, 10, 742–750. [Google Scholar] [CrossRef]
  11. Li, C.; Lin, D.; Lü, J. Cryptanalyzing an image-scrambling encryption algorithm of pixel bits. IEEE Trans. Multimed. 2017, 24, 64–71. [Google Scholar] [CrossRef]
  12. Zhang, X. Reversible data hiding in encrypted image. IEEE Signal Process. Lett. 2011, 18, 255–258. [Google Scholar] [CrossRef]
  13. Ma, K.; Zhang, W.; Zhao, X.; Yu, N.; Li, F. Reversible data hiding in encrypted images by reserving room before encryption. IEEE Trans. Inf. Forensics Secur. 2013, 8, 553–562. [Google Scholar] [CrossRef]
  14. Zhang, W.; Ma, K.; Yu, N. Reversibility improved data hiding in encrypted images. Signal Process. 2014, 94, 118–127. [Google Scholar] [CrossRef]
  15. Hong, W.; Chen, T.S.; Wu, H.Y. An improved reversible data hiding in encrypted images using side match. IEEE Signal Process. Lett. 2012, 19, 199–202. [Google Scholar] [CrossRef]
  16. Liao, X.; Shu, C. Reversible data hiding in encrypted images based on absolute mean difference of multiple neighboring pixels. J. Vis. Commun. Image Represent. 2015, 28, 21–27. [Google Scholar] [CrossRef]
  17. Wu, X.; Sun, W. High-capacity reversible data hiding in encrypted images by prediction error. Signal Process. 2014, 104, 387–400. [Google Scholar] [CrossRef]
  18. Yin, Z.; Abel, A.; Zhang, X.; Luo, B. Reversible data hiding encrypted image based on block histogram shifting. In Proceedings of the 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Shanghai, China, 20–25 March 2016; pp. 2129–2133. [Google Scholar]
  19. Zhang, X. Separable reversible data hiding in encrypted image. IEEE Trans. Inf. Forensics Secur. 2012, 7, 826–832. [Google Scholar] [CrossRef]
  20. Qian, Z.; Han, X.; Zhang, X. Separable reversible data hiding in encrypted images by n-nary histogram modification. In Proceedings of the 3rd International Conference on Multimedia Technology (ICMT-13), Guangzhou, China, 29 November–1 December 2013; pp. 869–876. [Google Scholar]
  21. Yin, Z.; Luo, B.; Hong, W. Separable and error-free reversible data hiding in encrypted image with high payload. Sci. World J. 2014, 2014, 604876. [Google Scholar] [CrossRef]
  22. Yin, Z.; Niu, X.; Zhang, X.; Tang, J.; Luo, B. Reversible data hiding in encrypted AMBTC images. Multimed. Tools Appl. 2018, 77, 18067–18083. [Google Scholar] [CrossRef]
  23. Wang, H.Y.; Lin, H.J.; Gao, X.Y.; Cheng, W.H.; Chen, Y.Y. Reversible AMBTC-based data hiding with security improvement by chaotic encryption. IEEE Access 2019, 7, 38337–38347. [Google Scholar] [CrossRef]
  24. Su, G.; Chang, C.; Lin, C. A high capacity reversible data hiding in encrypted AMBTC-compressed images. IEEE Access 2020, 8, 26984–27000. [Google Scholar] [CrossRef]
  25. Delp, E.; Mitchell, O. Image compression using block truncation coding. IEEE Trans. Commun. 1979, 27, 1335–1342. [Google Scholar] [CrossRef]
  26. Lema, M.D.; Mitchell, O.R. Absolute moment block truncation coding and its application to color images. IEEE Trans. Commun. 1984, 32, 1148–1157. [Google Scholar] [CrossRef]
  27. Chuang, J.C.; Chang, C.C. Using a simple and fast image compression algorithm to hide secret information. Int. J. Comput. Appl. 2006, 28, 329–333. [Google Scholar]
  28. Ou, D.; Sun, W. High payload image steganography with minimum distortion based on absolute moment block truncation coding. Multimed. Tools Appl. 2015, 74, 9117–9139. [Google Scholar] [CrossRef]
  29. Chen, J.; Hong, W.; Chen, T.S.; Shiu, C.W. Steganography for BTC compressed images using no distortion technique. Imaging Sci. J. 2013, 58, 177–185. [Google Scholar] [CrossRef]
  30. Rurik, W.; Mazumdar, A. Hamming codes as error-reducing codes. In Proceedings of the 2016 IEEE Information Theory Workshop (ITW), Cambridge, UK, 11–14 September 2016; pp. 404–408. [Google Scholar]
  31. Moon, T.K. Error Correction Coding–Mathematical Methods and Algorithms; John Wiley and Sons: Hoboken, NJ, USA, 2005; pp. 2001–2006. [Google Scholar]
  32. Image Databases. Available online: https://www.imageprocessingplace.com/root_files_V3/image_databases.htm (accessed on 10 August 2022).
Figure 1. An example of AMBTC: (a) an original block; (b) a bitmap block; (c) a reconstruction block.
Figure 1. An example of AMBTC: (a) an original block; (b) a bitmap block; (c) a reconstruction block.
Applsci 12 08225 g001
Figure 2. Block diagram of the proposed scheme.
Figure 2. Block diagram of the proposed scheme.
Applsci 12 08225 g002
Figure 3. Block diagram of the data embedding example.
Figure 3. Block diagram of the data embedding example.
Applsci 12 08225 g003
Figure 4. Nine test images: (a) Baboon, (b) Barbara, (c) Boat, (d) Goldhill, (e) Airplane, (f) Lena, (g) Peppers, (h) Tiffany, (i) Zelda ( 512 × 512 ).
Figure 4. Nine test images: (a) Baboon, (b) Barbara, (c) Boat, (d) Goldhill, (e) Airplane, (f) Lena, (g) Peppers, (h) Tiffany, (i) Zelda ( 512 × 512 ).
Applsci 12 08225 g004
Figure 5. Encryption results of the cover images: (a) Baboon, (b) Barbara, (c) Boat, (d) Goldhill, (e) Airplane, (f) Lena, (g) Peppers, (h) Tiffany, (i) Zelda.
Figure 5. Encryption results of the cover images: (a) Baboon, (b) Barbara, (c) Boat, (d) Goldhill, (e) Airplane, (f) Lena, (g) Peppers, (h) Tiffany, (i) Zelda.
Applsci 12 08225 g005
Figure 6. Comparison of quality of images recovered from encrypted images: (a) Baboon, (b) Barbara, (c) Boat, (d) Goldhill, (e) Airplane, (f) Lena, (g) Peppers, (h) Tiffany, (i) Zelda.
Figure 6. Comparison of quality of images recovered from encrypted images: (a) Baboon, (b) Barbara, (c) Boat, (d) Goldhill, (e) Airplane, (f) Lena, (g) Peppers, (h) Tiffany, (i) Zelda.
Applsci 12 08225 g006
Table 1. The PSNR and SSIM of the encrypted images and decrypted images when T = 5 .
Table 1. The PSNR and SSIM of the encrypted images and decrypted images when T = 5 .
ImagesCover AMBTCEncrypted AMBTCDecrypted AMBTC
PSNRSSIMPSNRSSIMPSNRSSIM
Barboon26.97650.88729.50380.014726.97570.887
Barbara27.07560.92487.88470.014027.07020.923
Boat31.57000.93888.99320.014631.54440.9355
Goldhill32.83600.92089.06950.015932.82070.9196
Airplane32.03720.95048.70700.015032.00170.9462
Lena33.65560.94689.30580.016733.5990.9423
Pepper34.09680.93959.15500.014734.03970.9356
Tiffany35.65760.94736.86590.014035.56510.9426
Zelda36.65370.94768.87160.014036.53780.9432
Average32.37360.93378.64210.015332.23940.9306
Table 2. Comparison of EC and PSNR performance according to the difference between the two quantization levels.
Table 2. Comparison of EC and PSNR performance according to the difference between the two quantization levels.
ImagesT = 5T = 10T = 15T = 20
EC (Bits)PSNREC (Bits)PSNREC (Bits)PSNREC (Bits)PSNR
Baboon111326.97571012126.957118,64926.916124,55726.8607
Barbara14,88927.070226,49327.048532,12527.020835,15326.9922
Boat28,21731.544436,13331.503442,31331.416147,35731.2857
Goldhill938532.820727,76932.685141,44532.442948,96532.1992
Airplane34,54932.001744,63731.948549,46931.870552,65731.7764
Lena29,67733.59944,21733.486150,63733.350354,32933.2079
Pepper21,14934.039745,99733.831952,92133.676456,14933.5425
Tiffany29,38135.565145,45735.373452,60935.141656,49734.9002
Zelda23,30136.537849,09336.160755,85735.913959,36535.6629
Average21,29532.239336,65732.110544,00231.972048,33629.0427
Table 3. Comparison of the performance between Yin et al.’s method and the proposed method.
Table 3. Comparison of the performance between Yin et al.’s method and the proposed method.
ImagesCover ImagesYin et al.’s [22]Proposed Method
PSNRPayloadPSNR 1 PSNR2PayloadPSNR1PSNR2
Baboon26.976514123.66 + 111326.9757 +
Boat31.5755430.32 + 28,21731.5444 +
Airplane32.0372145830.40 + 34,54932.0017 +
Lena33.6556121333.00 + 29,67733.5990 +
Tiffany35.6576168729.81 + 29,38135.5651 +
Average31.9793101027.93 + 24,58731.9371 +
Table 4. Comparison of maximum EC between our scheme and previous schemes.
Table 4. Comparison of maximum EC between our scheme and previous schemes.
ImagesYin et al.’s (2018) [22]Wang et al. (2019) [23]Su et al.’s (2020) [24]Proposed
Baboon273-14,97664,881
Boat93222,05029,38265,369
Airplane136523,61034,56465,013
Lena127022,28736,41865,329
Barbara524-13,64462,945
Peppers92622,14241,08064,929
Average88122,52228,34464,744
Table 5. Performance comparison among previous schemes and proposed scheme.
Table 5. Performance comparison among previous schemes and proposed scheme.
MethodCriterion
SeparableError in Extracted DataError in Reconstructed Cover ImageEmbedding Efficiency
Ma et al.’s [13]OXXMid
Zhang’s [12]XXOLow
Zhang et al.’s [19]OXXLow
Yin et al.’s [22]OXOHigh
Wang et al.’s [23]OXOHigh
Su et al.’s [24]OXOHigh
ProposedOXOHigh
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Kim, C. Separable Reversible Data Hiding in Encrypted AMBTC Images Using Hamming Code. Appl. Sci. 2022, 12, 8225. https://doi.org/10.3390/app12168225

AMA Style

Kim C. Separable Reversible Data Hiding in Encrypted AMBTC Images Using Hamming Code. Applied Sciences. 2022; 12(16):8225. https://doi.org/10.3390/app12168225

Chicago/Turabian Style

Kim, Cheonshik. 2022. "Separable Reversible Data Hiding in Encrypted AMBTC Images Using Hamming Code" Applied Sciences 12, no. 16: 8225. https://doi.org/10.3390/app12168225

APA Style

Kim, C. (2022). Separable Reversible Data Hiding in Encrypted AMBTC Images Using Hamming Code. Applied Sciences, 12(16), 8225. https://doi.org/10.3390/app12168225

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