Separable Reversible Data Hiding in Encrypted AMBTC Images Using Hamming Code

: Data hiding is a ﬁeld 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 efﬁcient SRDH-EI method based on AMBTC. AMBTC can guarantee very good network transmission efﬁciency 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 efﬁciency and superiority of our proposed model.


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.

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.
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ḡ, and a '0' otherwise. Bitmap blocks are divided into the following two groups: '1' and '0'. Bitmap b i = {b i1 , b i2 , . . . , b ik×k } is generated as a result of Equation (2).
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.
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 trio (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.
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. 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 trio of this block becomes trio(Q 1 , Q 2 , M) = (165, 185, 1010100111111000). Here, the mean (ḡ) 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)

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 It is in fact the space of vectors y ∈ F n 2 such that Hy = 0 for the parity check matrix H . The parity check matrix for the HC(7,4) Hamming code is as follows 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.
The following are check matrices for HC (15,11) binary Hamming codes (Equation (8)).  [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 The secret message s can be embedded into Q 1 by changing Q 1 to Q 1 according to Equation (9): where PE 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.

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).

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 trio(Q 1 , Q 2 , M) from the 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: 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).
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 trio 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 (12) 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.

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 trio(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.
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 thê η-th coordinate cη of c. For image restoration, the rows and columns of the changed location cη are obtained using Equation (15), where rc is the value of the row and column, and 4 bit information of rc is added to the last bit of M . The rc needs to be converted to binary before it is added last to M . In the formula, cnt is first initialized to 0 and then the formula is applied.
Step 5: After the operation, the codeword c is assigned to M 15 1 , i.e., M 15 1 = c. Add payload coordinates rc after bitmap M . That is, M = M || rc.
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. 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 .

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 2: Assign the bitmap M 15 1 to codeword c, i.e., c = M 15 1 .
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 pseudorandom bits are calculated via Equation (16). This restores the bitmap M = (m 1 , m 2 , . . . , m 16 ).
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 rc (1) is the row and rc (2) is the column position of the locationη. (1) and v = rc (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.

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 PSNR is calculated as 10log 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: 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 µ g and µ g are the mean values of g and g , respectively, and c 1 is the stabilization constant and σ 2 g , σ 2 g , and σ gg 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. PSNR 1 and PSNR 2 were obtained from the decrypted images and recovered images, respectively. Here, we measure PSNR 1 and PSNR 2 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.  [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.

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.