Security and Communication Networks

Volume 2018, Article ID 9103418, 13 pages

https://doi.org/10.1155/2018/9103418

## Reversible Data Hiding with Pixel Prediction and Additive Homomorphism for Encrypted Image

^{1}Network Information Center, Guangxi Normal University, Guilin 541004, China^{2}Guangxi Colleges and Universities Key Laboratory of Cloud Computing and Complex Systems, Guilin University of Electronic Technology, Guilin 541004, China^{3}Guangxi Key Lab of Multi-Source Information Mining & Security, Guangxi Normal University, Guilin 541004, China^{4}Fangchenggang College, Guangxi University of Finance and Economic, Fangchenggang 538000, China

Correspondence should be addressed to Xianquan Zhang; moc.361@2266qxz and Zhenjun Tang; moc.361@032jzgnat

Received 1 May 2018; Revised 27 June 2018; Accepted 17 July 2018; Published 4 September 2018

Academic Editor: David Megias

Copyright © 2018 Chunqiang Yu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Data hiding in encrypted image is a recent popular topic of data security. In this paper, we propose a reversible data hiding algorithm with pixel prediction and additive homomorphism for encrypted image. Specifically, the proposed algorithm applies pixel prediction to the input image for generating a cover image for data embedding, referred to as the preprocessed image. The preprocessed image is then encrypted by additive homomorphism. Secret data is finally embedded into the encrypted image via modular 256 addition. During secret data extraction and image recovery, addition homomorphism and pixel prediction are jointly used. Experimental results demonstrate that the proposed algorithm can accurately recover original image and reach high embedding capacity and good visual quality. Comparisons show that the proposed algorithm outperforms some recent algorithms in embedding capacity and visual quality.

#### 1. Introduction

Data hiding is an important technology for embedding secret data into a meaningful cover medium (such as an image or a video) to generate a stego-medium with a small distortion [1, 2]. Reversible data hiding (RDH) is a branch of data hiding, which can restore the original image from the stego-image after extraction of the embedded data. This restoration property of RDH plays an important role in those data-sensitive applications, such as medical imagery, military imagery, and law forensics, in which the cover image must be accurately restored.

In the past years, various RDH algorithms have been proposed. Generally, these RDH algorithms can be classified into three categories: lossless compression based algorithms, difference expansion (DE) based algorithms, and histogram shifting (HS) based algorithms. Lossless compression based algorithms vacate space for embedding secret message by losslessly compressing the least significant bit (LSB) planes or quantization residuals [3, 4]. They can be applied to image authentication and watermarking, but their embedding capacities are limited. DE based algorithms usually shift the difference of neighboring pixels for creating a vacant least significant bit (LSB) and append one secret bit to the vacated LSB [5, 6]. The HS based algorithms firstly shift the bins of histogram of gray values [7] or the predicted errors [8–12] for generating vacated space and then embed secret data into the vacated space. This kind of algorithms can provide a good trade-off between embedding capacity and visual quality.

Image encryption is a useful technique for protecting image content [13, 14]. It can convert an original image, known as plaintext image, into a meaningless image called the encrypted image. Since it cannot observe any useful information from the encrypted image, image content security is achieved. In some application scenarios, such as cloud storage, there are many encrypted images and people would like to embed secret message into encrypted images for privacy protection. These applications require efficient RDH algorithms for encrypted images.

Recently, many researchers have developed various RDH algorithms in encrypted images since the encrypted images are widely generated and stored in cyberspace. For example, Zhang [15] proposed a famous RDH algorithm in encrypted image. This RDH algorithm divides the encrypted image into several blocks and embeds a secret bit into a block by flipping 3 LSBs of a half of pixels in the block. This algorithm extracts secret data by exploiting a fluctuation function in terms of spatial correlation in natural images. Zhang’ algorithm is the preliminary research of RDH algorithms in encrypted images, but this algorithm will cause bit errors in the recovered image and the extracted data for some cases. Hong et al. [16] exploited the spatial correlation using a different estimation equation and side match technique to achieve a low error rate. To reduce error rate, Liao and Shu [17] designed a useful metric for measuring block complexity by considering neighbor pixels in terms of the locations. In another work, Qin and Zhang [18] presented an RDH scheme with capability of image content protection. This scheme only alters three LSBs of selected pixels of encrypted image for secret bit embedding. The above-mentioned algorithms rely on spatial correlation of original image when extracting data, and their procedures of image recovery and data extraction are similar. For the encrypted JPEG images, Qian et al. [19] exploited the coding/decoding principle of the JPEG image to design a reversible data hiding scheme.

To separate data extraction from image decryption, Zhang [20] proposed to compress the encrypted images to vacate room for data hiding. In [21], Qian and Zhang exploited distributed source coding to improve the embedding capacity of the RDH algorithm [20]. However, their encryption disorganizes spatial correlation of pixels and thus it is difficult to vacate space for data hiding. In another study, Yi et al. [22] exploited block permutation conduct image encryption for preserving spatial redundancy and used adaptive block-level based prediction-error expansion to conceal secret bits in the encrypted image blocks. Tang et al. [23] proposed a reversible data hiding algorithm in encrypted domain by exploiting alpha channel of portable network graphics (PNG) image. In this RDH algorithm, secret data is divided into some segments. For each segment, one bit is embedded into the LSB of encrypted pixel and other bits are hidden in the corresponding element of the alpha channel. A common feature of the above RDH algorithms is that they all embed secret data after image encryption.

Some researchers [24–27] have proposed the idea of preprocessing image before encryption for data embedding. For example, Ma et al. [24] provided an RDH algorithm in encrypted images by reserving room before encryption. This algorithm first empties out room by embedding LSBs of some pixels into other pixels with a traditional RDH method, then encrypts the image, and finally uses the positions of these LSBs in the encrypted image to conceal secret data. Xu et al. [25] designed a specific encryption mode to encrypt interpolation-error of nonsample pixels and embedded secret data into interpolation-error using a modified version of histogram shifting and difference expansion technique. In another work, Nguyen et al. [26] used half of the pixels to classify the rest of the pixels into smooth and complex regions to provide room for embedding additional data. Agrawal and Kumar [27] divided original image into several consecutive sets, calculated mean of each set, stored it at the first element of its set before encryption, and finally embedded a secret bit into the encrypted pixels of one set except for the pixel holding the mean value in the set.

Recently, homomorphic encryption is introduced to RDH algorithms in encrypted images [28–32]. In [28], the exclusive-or values of two neighboring pixels are reserved after image encryption so as to carry the additional data to be embedded. This is done by using the same pseudorandom bits to encrypt two neighboring pixels. Actually, the homomorphic property is equipped in the scheme [28]. Chen et al. [29] used Paillier encryption [33] to encrypt each pixel and embedded a secret bit into a pair of adjacent encrypted pixels. Shiu et al. [30] proceed a pair of adjacent original pixels using difference expansion to obtain a pair of odd or even pixels and then used Paillier encryption to encrypt the proceeded pixels. Similar to [29], this algorithm also embeds a secret bit into a pair of adjacent encrypted pixels. A common weakness of the use of Paillier encryption in [29, 30] is data expansion. In another study, Li et al. [31] divided image into several crosses, adopted the same key to encrypt pixels in each cross, and accommodated for data hiding by using the difference histogram of the encrypted image. Xiao et al. [32] divided image into several blocks and conducted data hiding in each block via additive homomorphism and pixel value ordering strategy. Zhang et al. [34] proposed a lossless and reversible data hiding algorithm for ciphertext images encrypted by public key cryptography with probabilistic and homomorphic properties. This algorithm shows better performances than some previous algorithms [15, 16, 20] in terms of PSNR in directly decrypted image.

Although some useful homomorphism encryption-based RDH algorithms [29–31] for encrypted image have been reported. Their embedding capacity and visual quality are not desirable yet. For example, Chen’s method [29] and Shiu’s method [30] can only reach 0.5 bpp, and Li’ scheme [31] cannot reach 0.8 bpp for most test images. Aiming at these problems, we propose an error-free RDH algorithm in encrypted domain. Our algorithm not only perfectly recovers original images but also reaches high embedding capacity and good visual quality. Many experiments are conducted to validate our efficiency and the results demonstrate that our algorithm outperforms some recent algorithms. The remainder of this paper is organized as follows. Section 2 explains our algorithm and Section 3 discusses experimental results. Conclusions are finally drawn in Section 4.

#### 2. Proposed Reversible Data Hiding

Our proposed algorithm consists of four components: image encryption with homomorphism, data embedding with additive homomorphism, data extraction, and image recovery. Details of these components will be explained in the following sections.

##### 2.1. Image Encryption with Homomorphism

This component can be divided into two parts: the preprocessed image generation with prediction and homomorphism encryption. In our RDH algorithm, secret data will be embedded into the encrypted image by using additive homomorphism.

###### 2.1.1. Preprocessed Image Generation with Prediction

Predictors [35–38] are widely used in RDH algorithms for plaintext image. In this paper, we select an accurate gradient selective prediction (AGSP) predictor [38] to determine the original pixel predictions, which are used to construct preprocessed pixels. The reason of our selection of AGSP predictor is that it can reach a good balance between predictor performance and computational cost. The AGSP predictor operates on the nine neighboring pixels (i.e.*, x*_{1},* x*_{2},* x*_{3},* x*_{4},* x*_{5},* x*_{6},* x*_{7},* x*_{8}, and* x*_{9}) of the current pixel* x*, as shown in Figure 1. The estimated gradients of four directions (i.e., horizontal, vertical, 45 degrees, and -45 degrees) are denoted by* D*_{1},* D*_{2},* D*_{3,} and* D*_{4}. The corresponding pixels of these gradients* D*_{1},* D*_{2},* D*_{3,} and* D*_{4} are* x*_{6},* x*_{9},* x*_{7}, and* x*_{5}, respectively. Suppose that and are two smallest gradients among* D*_{1},* D*_{2},* D*_{3}, and* D*_{4} and their corresponding pixels are and . The prediction of* x* can be calculated as follows: