Extending Multi-MSB Prediction and Huffman Coding for Reversible Data Hiding in Encrypted HDR Images

Reversible data hiding in encrypted images can simultaneously enhance the image privacy and preserve the message security for the purpose of covert communication and cloud data management. The algorithm extends the multi-MSB prediction and Huffman coding to propose the first reversible data hiding in encrypted HDR images in the Radiance RGBE format. Because of the high similarity among the exponent channel values of neighboring pixels, we directly applied multi-MSB prediction in our proposed preprocessing procedure, yielding considerably increased embedding capacity. We also proposed a novel image encryption method to maintain the characteristics of the images. Subsequently, a distortion-free data hiding algorithm, namely the homogeneity index modification algorithm, was added to further increase embedding capacity. The experimental results demonstrate the feasibility of the proposed algorithm and its ability to increase embedding capacity, embedding rate, and image privacy, support two data hiders, and enable reversibility and separability.


I. INTRODUCTION
Reversible data hiding can recover data-embedded distorted media to its original state after secret messages are extracted. This approach is commonly used in medical and military applications because distorted media may lead to poor decision-making. Most reversible data hiding algorithms involve the use of histogram modification [17], difference expansion [22], and image interpolation [7,23] to achieve a higher embedding capacity, reduce the size of the location map, improve image quality, enhance the robustness of secret messages, and support different kinds of input media.
In response to urgent privacy protection requirements, reversible data hiding algorithms have been applied to encrypted media and have attracted the attention of researchers. Reversible data hiding algorithms in encrypted images (RDHEI) can be divided into two categories: vacating room after encryption (VRAE) and reserving room before encryption (RRBE). Fig. 1 presents the details of these processes. Specifically, the performance of RDHEI can be evaluated through the compromise of embedding capacity, error rate of the extracted message, and image quality of reconstructed image.
High-dynamic-range (HDR) images [20] represent a new image format with a larger range of color representation than that of low-dynamic-range (LDR) images, which enhances bright and dark areas that do not appear clearly in LDR images. Each pixel value is divided into three channels: red, green, and blue. The storage space of each channel is much higher than the 8-bit integer value: a 32-bit floating point value. However, displaying HDR images is difficult. In addition to using a device that supports HDR images, or displaying HDR images with different exposure levels, the last way is to use a tone mapping algorithm. Tone-mapped LDR images can be displayed on LCD or CRT screens. In the example in Fig. 2, the traditional LDR image may cause the pixels to become white or black because of the high and low brightness of the real scene. The tone-mapped image (Fig. 2b) is similar to the real scene seen by the human eye.  Although HDR images can record colors realistically, they require 96-bit storage space. Therefore, HDR images should be re-encoded to reduce the required storage space while retaining their superior quality. Common HDR image formats include Radiance RGBE [27], LogLUV [9,10], and OpenEXR [8,13]. Although HDR images represent next generation technology, few advanced multimedia security algorithms [1,4,5,10,13,24,26,31] have been applied to them, and no algorithms have been applied to encrypted HDR images. In this study, we utilized the high similarity of the channel values of neighboring pixels in the Radiance RGBE image format. Applying multi-MSB prediction [30] to channel values can increase embedding capacity considerably; the proposed preprocessing procedure achieves this goal. We used self-defined image encryption to preserve the characteristics of the Radiance RGBE image format and enable two-tier data embedding. The experimental results indicate that the proposed algorithm increases embedding capacity, embedding rate, and image privacy and offers two data hiders, reversibility, and separability. This study is the first to propose a reversible data hiding algorithm for encrypted HDR images. This remainder of this paper is organized as follows. Section II examines existing reversible data hiding algorithms for encrypted images, and multimedia security algorithms based on homogeneous index modification are also introduced. Section III presents the proposed technique. Section IV describes the experimental results. Finally, Section V provides the conclusion and recommendations for future research.

II. RELATED WORK
This section first reviews the reversible data hiding algorithms for encrypted images. We also introduce existing multimedia security algorithms based on homogeneous index modification.

A. REVERSIBLE DATA HIDING ALGORITHMS FOR ENCRYPTED IMAGES
Zhang [32] proposed a block-based VRAE reversible data hiding algorithm for encrypted images. The data hider subdivides the encrypted image into nonoverlapping blocks and divides the pixels in the same block into two sets. The secret message is embedded by flipping several least significant bits of the pixels in one set. Liao and Shu [12] design a new more precise function to obtain the complexity of image blocks. The correctness of data extraction and image recovery can then be enhanced. Experiments show that the average error rate can be effectively reduced with the appropriate block size. Liao et al. [11] proposed a new separable data hiding based on compressive sensing and discrete fourier transform. All the real and imaginary VOLUME XX, 2017 3 coefficients are utilized to achieve better performance with great recovery and flexible embedding capacity. Yin et al. [30] proposed an RRBE reversible data hiding in encrypted images method based on multi-MSB prediction and Huffman coding. The image owner first uses the median edge detection (MED) predictor to obtain the prediction value of the processing pixel by using the neighboring pixels and then calculates its embedding length for secret messages through multi-MSB prediction. This generates a label map, which records the embedding length of each embeddable pixel. Finally, the image owner encodes the label map through Huffman coding and embeds the encoding results and Huffman tree structure into the encrypted image through simple bit substitution. After the data hider obtains the encrypted image with the embedded label map, they first extract the embedding capacity of each pixel from the label map and then use bit substitution to embed a secret message into the remaining substitutable bits. The extensive experimental results indicated that the proposed algorithm yields high embedding capacity, high image privacy, reversibility, and separability. Yin et al. [29] later used multi-MSB planes rearrangement scheme to increase embedding capacity. The signs of prediction errors are represented by one bit plane and the absolute value of prediction error is represented by other bit planes. The authors then divided bit planes into uniform and nonuniform blocks and rearranged them. Additional data of various sizes was embedded adaptively for each pixel prediction scheme. The experimental results indicated that the embedding capacity increased by approximately 4%. Wu et al. [28] proposed a high-capacity and secure RDHEI method based on adaptive prediction error labeling. To increase the reserved room before encryption, the authors exposed the shuffled labels in encrypted images and encrypted the labels to increase security both in terms of image content and secret messages, yielding an embedding capacity higher than those of other algorithms. Qiu et al. [19] introduced dual data embedding in the encrypted domain based on generalized integer transformation. The image owner can vacate embedding room and perform data embedding before image encryption. The remote server can embed additional data through LSBplane replacement after image encryption. Malik et al. [15] introduced multilayer embedding to high-capacity reversible data hiding in encrypted images. The data hider in their proposed algorithm can perform data hiding in multiple layers by using even-odd value embedding. Once embedding is complete, the permutation operation is applied to the dataembedded encrypted image to prevent perceptual information leakage. Auxiliary information, consisting of location maps for each layer, the number of layers, and the secret keys, is shared through private channels. The scheme is robust against cropping attacks with some distortion in the directly decrypted image. Wang et al. [25] used prediction error and block classification to increase the embedding rate. The image owner calculates a prediction error matrix and divides it into nonoverlapping blocks. Redundant room for data embedding is created through bit plane encoding in each block. According to the experimental results, the embedding capacity reached 0.5641 bits per pixel on average. Liu et al. [14] proposed a new RDHEI method based on multi-MSB prediction and hierarchical quadtree coding. The maximum embedding capacity of the prediction error image was explored through hierarchical quadtree coding with a high compression ratio. The experimental result revealed that the embedding capacity was approximately 2%-4% higher than that of the algorithm of Yin et al. [30]

B. MULTIMEDIA SECURITY ALGORITHMS BASED ON HOMOGENEOUS INDEX MODIFICATION
Yu et al. [31] applied homogeneous index modification on the HDR images in Radiance RGBE format to achieve distortion-free data hiding. The main characteristic is that the original and data-embedded HDR images can generate the "same" tone-mapped LDR images. The number of homogeneous representations for each pixel is first calculated and an index is assigned to some conversion states, referring to the homogeneity index for message embedding. The secret message is then embedded by modifying the homogeneity index of the processing pixel. Wang et al. [26] calculated the product of the number of homogeneous representations of all pixels in each embeddable segment. The embedding capacity can be raised up to 6%. Chang et al. [1] integrated a treecoding structure to encode the unencoded homogeneous representation; the embedding capacity was approximately 13% higher than the method proposed by Yu et al. Finally, Tsai et al. [24] proposed the first high-capacity HDR image authentication algorithm. With one given revision threshold, the embedding capacity can be significantly enhanced and the data-embedded images with embedded messages are of good quality.

III. PROPOSED ALGORITHM
This section introduces how multi-MSB prediction and Huffman coding can be applied to encrypted HDR images. By utilizing the high degree of similarity in the channel value among neighboring pixels in the Radiance RGBE image format, we considerably increase the embedding capacity. To further increase embedding capacity, we perform multi-MSB prediction on the absolute pixel difference between the original and predicted channel values. Through the self-defined image encryption mechanism, we reserve the MSB of three color channel values. The second data hider can use homogeneous index modification [1,26,24,31] to embed more secret messages. Fig. 3   close, the embedding capacity when multi-MSB prediction is used may be low. For the example in Fig. 4, original channel value , is 127, and predicted value � , based on the MED predictor in (1) is 128. The two values can be converted into binary forms 01111111 and 10000000 separately. Through multi-MSB prediction, the label for , becomes 0, and its embedding capacity becomes 1 because the first bits of , and � , differ. To increase embedding capacity, absolute prediction error � , − � , � for each pixel, except those in the first column and the first row, must be obtained, and , = � , − � , � is substituted as the original value to create an intermediate prediction error image.
Channel Value Binary Representation

B. LABEL MAP GENERATION PROCESS
After the intermediate prediction error image is obtained from the preprocessing process, the label and embedding capacity for each channel value can be obtained. Label , for pixel , located in the th row and th column is determined by the number of consecutive zeros, represented by , 0 , from the MSB to LSB for , in binary representation. However, to recover the original value of , , the label must have a plus or minus sign. If the original value of , is greater than or equal to the predicted value, � , , its corresponding label is , 0 and − , 0 otherwise. The embedding capacity for , is � , 0 + 1, 8�. For the example in Fig. 4, the absolute prediction error , between , and � , is calculated in Fig. 5. The label for , is −7 because the number of consecutive zeros in the absolute prediction error in binary representations is 7 and , is less than � , . The embedding capacity for this value is 8 because the last bit can be recovered to 1 with prior knowledge of the label.
Channel Value Binary Representation

C. IMAGE ENCRYPTION PROCESS
After the label map from the channel of the input HDR image is obtained, the image encryption process can begin. For HDR images in the Radiance RGBE format, to ensure the color channels and exponent channel integer values have the unique converted result from the original floating channel values, at least one of the three channels must be greater than or equal to 128. This restriction ensures that distortion-free data hiding based on homogeneous index modification proceeds normally. During this process, different image encryption schemes for color channels and exponent channels are used to both maintain the characteristic of the images and enable the second data hider to embed additional secret messages.
First, a series of random binary digits is generated by encryption key , and channel value , for each pixel is encrypted by the simple exclusive-or operation in (3), where , is the 8-bit binary representation of , and , is the 8-bit random string continuously derived from . For the other three channel values, namely , , and , their MSBs are retained, and the exclusive-or operation in (4) is performed on the remaining seven bits, where = , , . Thus, one channel must have a value above 128. However, because the MSBs of each pixel are preserved, the outline of the original image can still be observed in the encrypted result. Therefore, by integrating pixel permutation key , the pixel order of the three channels can be randomly permuted to prevent content leakage from the encrypted image.

D. LABEL MAP EMBEDDING PROCESS
Because the label map represents critical information for the data hider to perform data embedding, to avoid auxiliary information transmission over public channels, the image owner compresses and embeds the map into the encrypted image, as in other studies [29,30]. This process involves using Huffman coding to construct a Huffman coding tree based on the frequencies of the labels for all channel values and generating the corresponding encoding codes for each label. The Huffman code tree and partial encoding results are sequentially embedded in the reference pixels of the encrypted image through simple bit substitution, and residual encoding results are embedded in multiple MSBs of the embeddable pixels. To restore the original image, the reference pixel values must be included in the auxiliary information and embedded into the encrypted image.

E. DATA EMBEDDING PROCESS
The proposed algorithm supports two data hiders. The first data hider embeds the secret message into the exponent channel on the basis of the label map derived from the encrypted image, and the second data hider uses the distortion-free data hiding algorithm to increase the embedding capacity. After receiving the encrypted image with the label map embedded, the first data hider extracts the Huffman tree and partial information of the label map from the exponent channel of the reference pixels and then sequentially decodes the complete label map to obtain the embedding capacity for each pixel. The secret message encrypted using data hiding key 1 can be embedded into the remaining substitutable bits. After receiving the encrypted image with the label map and encrypted message embedded by the first data hider, the second data hider can embed the message again through homogeneous index modification in the three color channels. To increase the security of the secret message, the second data hider can encrypt the secret message by using data hiding key 2 and then perform data embedding.

F. DATA EXTRACTION AND IMAGE RECOVERY PROCESS
The receiver of the encrypted HDR image with the label map and the secret message embedded by the two data hiders can perform data extraction or image decryption by using the secret key. If the receiver holds image encryption key and pixel permutation , they can restore the index value of the homogeneous representation to original state 0. The original pixel sequence can be recovered using pixel permutation . By using the embedded auxiliary information, namely the encoded label map and binary digits of the reference pixels, the receiver can restore the original value of the reference pixels and extract label , for , . The prediction error image without the embedded message can be completely recovered after the exclusive-or operation is performed by using the random binary sequence generated by image encryption key and by setting the first � , �-bit digits of , in the binary representation to 0. Original channel value , can be calculated using the MED predictor and (5). If the receiver holds data hiding key 1 , the index value of the homogeneous pixel representation must be restored to original state 0. The label map can then be extracted to obtain the embedding capacity of each pixel. The embedded encrypted message can be recovered from , and then decrypted with data hiding key 1 . If the receiver holds data hiding key 2 , the encrypted message can be extracted using the index value of the homogeneous representation and decrypted using data hiding key 2 . If the receiver has all four keys, all secret messages can be retrieved and the images restored.

IV. EXPERIMENTAL RESULTS
This section describes the feasibility of multi-MSB prediction and Huffman coding for encrypted HDR images. Fig. 6 presents the 20 tone-mapped HDR images using the algorithm of Mantiuk et al. [16]. These images are obtained from the Anyhere Software website [6] created by the inventor of the Radiance RGBE format [27]. The proposed algorithm was implemented using Java on a personal computer with an Intel Core i7-6700 3.40 GHz processor and 32 GB of memory. We examined the embedding capacity for each test image under various processes in the proposed algorithm, namely multi-MSB prediction and Huffman coding, and the increased embedding capacity after the proposed preprocessing procedure. We also provided the size of the necessary auxiliary information for Huffman code tree reconstruction and presented the visual effects of encryption on each test image after the MSB-preserving exclusive-or operation and pixel permutation processes. In addition, we analyzed state-of-the-art multimedia security applications for HDR images in the Radiance RGBE format to demonstrate the superiority of the proposed algorithm. Fig. 7 presents the visual effects of the prediction of channel values on each HDR image. When , was 0, we made the corresponding pixel white and black otherwise. Most pixels were white. This indicates that the channel values of the neighboring pixels in the images were more similar than are those in traditional images. Table I presents the relative information after multi-MSB prediction and Huffman coding. After deducting the size of the auxiliary information, namely the Huffman tree structure and encoding results of the label map, the pure embedding capacity was 5.69 bits for the StillLife image and 6.85 bits for the Montreal image, which is higher than that of traditional grayscale images. Table II presents the relative information after the proposed preprocessing procedure. Because the channel value was near 128, less auxiliary information was observed, even with increased label categories. Thus, the total pure embedding capacity increased. The minimum increase in embedding capacity across the images was 0.78% for the Montreal image, and the maximum was 8.10% for the Tree image. The channel value with 8-bit storage could be embedded with a 6.73-bit secret message on average. Table III presents the change in embedding capacity for each test image after homogeneous index modification. Because homogeneous index modification involves a distortion-free data hiding algorithm, secrete messages could be embedded in all color channels with even values. Therefore, the embedding capacity was low, which led to an increase in total embedding capacity of approximately 1.86%. Among the images, the minimum increase in embedding capacity was 1.75% for the SpheronSiggraph2001 image, and the maximum was 2.16% for the StillLife image.
In the image encryption step, we reserved the MSBs and performed an exclusive-or operation on the remaining seven bits by using the random binary digits generated by encryption key to ensure at least one of the three color channel values was greater than or equal to 128. Fig. 8 presents the visual effects of encryption; the outlines of the shapes in each image remained visible. We changed the order of the color channels by using secret key to obtain the satisfactory results in Fig. 9; the resulting images could not be deciphered, ensuring image security. Table IV presents a comparison of the proposed algorithm with existing algorithms, all of which are for HDR images in the Radiance RGBE format. The algorithms proposed by Chang et al. [1], Wang et al. [26], and Yu et al. [31] use homogeneity index modification to achieve distortion-free data hiding. However, their embedding ratio and embedding capacity are low because only three color channels, all with even values, can have secret messages embedded. Our previous algorithm used multiple-base notational system [24] and homogeneity index modification to propose the first HDR image authentication algorithm. Introducing the distortion tolerance can increase the embedding ratio to 100% and the embedding capacity to 1.07-2.27 bits per pixel. The proposed algorithm uses multi-MSB prediction for HDR images and increases embedding capacity through homogeneity index modification. In the two prediction error expansion algorithms [4,5], because the embedding capacity is obtained separately from the three color channels, the average embedding ratio is approximately one-third of the embedding capacity. The experimental results indicate that the proposed first reversible data hiding in encrypted HDR images is feasible.

V. CONCLUSIONS AND FUTURE WORK
This study used multi-MSB prediction and Huffman coding to develop a high-capacity reversible data hiding algorithm for encrypted HDR images in the Radiance RGBE format based on similarity in channel values among neighboring pixels. The method can increase embedding capacity considerably. We also increased prediction accuracy by applying multi-MSB prediction to absolute prediction error to increase embedding capacity. With self-defined image encryption, the proposed algorithm can support two data hiders and ensure image privacy. The experimental results indicate the feasibility of the proposed algorithm. Future work involves applying state-of-the-art multimedia security algorithms to images to develop an effective algorithm that increases embedding capacity and robustness and supports additional data hiders. Subsequent studies can also apply multi-MSB prediction to other input media. Finally, steganalysis [21] and security evaluation [3,18] on the proposed algorithms is also a topic worth exploring.