Content uploaded by Han-Yan Wu
Author content
All content in this area was uploaded by Han-Yan Wu on Apr 23, 2020
Content may be subject to copyright.
IEEE SIGNAL PROCESSING LETTERS, VOL. 19, NO. 4, APRIL 2012 199
An Improved Reversible Data Hiding in
Encrypted Images Using Side Match
Wien Hong, Tung-Shou Chen, and Han-Yan Wu
Abstract—This letter proposes an improved version of Zhang’s
reversible data hiding method in encrypted images. The original
work partitions an encrypted image into blocks, and each block
carries one bit by flipping three LSBs of a set of pre-defined pixels.
The data extraction and image recovery can be achieved by ex-
amining the block smoothness. Zhang’s work did not fully exploit
the pixels in calculating the smoothness of each block and did not
consider the pixel correlations in the border of neighboring blocks.
These two issues could reduce the correctness of data extraction.
This letter adopts a better scheme for measuring the smoothness
of blocks, and uses the side-match scheme to further decrease
the error rate of extracted-bits. The experimental results reveal
that the proposed method offers better performance over Zhang’s
work. For example, when the block size is set to 8 8, the error
rate of the Lena image of the proposed method is 0. 34%, which is
significantly lower than 1.21% of Zhang’s work.
Index Terms—Encrypted image, reversible data hiding,
side-match.
I. INTRODUCTION
REVERSIBLE data hiding in images is a technique that
embeds data in digital images by altering the pixel values
for secret communication, and the embedded image can be re-
covered to its original state after the extraction of the secret data.
Many reversible data hiding methods have been proposed re-
cently [1]–[5]. [1] embeds data bits by expanding the difference
of two consecutive pixels. [2] uses a lossless compression tech-
nique to create extra spaces for carry data bits. [3] shifts the bins
of image histograms to leave an empty bin for data embedment.
[4] adopts the difference expansion and histogram shifting for
data embedment. [5] embeds data by shifting the histogram of
prediction errors while considering the local activity of pixels
to further enhance the quality of stego image.
Traditionally, data hiding is used for secret communication.
In some applications, the embedded carriers are further en-
crypted to prevent the carrier from being analyzed to reveal
the presence of the embedment [6]–[8]. Other applications
Manuscript received December 19, 2011; revised January 30, 2012; accepted
February 02, 2012. Date of publication February 10, 2012; date of current ver-
sion February 16, 2012. The associate editor coordinating the review of this
manuscript and approving it for publication was Prof. Yong Man Ro.
W. Hong and H.-Y. Wu are with the Department of Information Man-
agement, Yu Da University, Miaoli, Taiwan (e-mail: wienhong@ydu.edu.tw;
hanyan.wu0414@gmail.com).
T.-S. Chen is with the Department of Computer Science and Information En-
gineering, National Taichung University of Science and Technology, Taichung,
Taiwan (e-mail: tschen@nutc.edu.tw).
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org.
Digital Object Identifier 10.1109/LSP.2012.2187334
could be for when the owner of the carrier might not want
the other person, including data hider, to know the content of
the carrier before data hiding is actually performed, such as
military images or confidential medical images. In this case, the
content owner has to encrypt the content before passing to the
data hider for data embedment. The receiver side can extract
the embedded message and recover the original image. For ex-
ample, [9] and [10] encrypt the cover image before embedding
is actually performed. In [9], the cover image is encrypted by
applying bitwise exclusive-or (XOR) operator to every bit of
pixels using an encryption key. Let be an 8-bit cover image
of size ,and be the pixel value at .Wedenote
the 8-bit binary digits of as ,where
(1)
To encrypt the cover image, a random sequence of size
is generated using an encryption key:
(2)
Perform a bitwise XOR on the binary digits of and , we obtain
(3)
where is the XOR operation and . Convert
back to its decimal representation, we
obtain the encrypted image .
To embed data, [9] partitions the stego image into
nonoverlapping blocks of size , and each block is capable
of carry one bit. Let be the block at position of the
partitioned blocks. According to a data-hiding key, data hider
randomly and evenly classifies pixels in each block into sets
and . If the bit to be embedded in this block is “0”, flip3LSBs
of pixels in set .Lettheflipped results be ,where
(4)
On the contrary, if the bit to be embedded is “1,” flip 3 LSBs of
pixels in set and the flipped result is
(5)
In (4) and (5), denotes the bit-flipping result of .and
represent the -th LSB of pixels at position in
blocks and , respectively. Repeat this process until
all the data bits are embedded. The embedded and encrypted
image is defined as .
1070-9908/$31.00 © 2012 IEEE
Authorized licensed use limited to: National Chiao Tung Univ.. Downloaded on April 23,2020 at 07:12:06 UTC from IEEE Xplore. Restrictions apply.
200 IEEE SIGNAL PROCESSING LETTERS, VOL. 19, NO. 4, APRIL 2012
Fig. 1. Four test images. (a) Lena. (b) Baboon. (c) Sailboat. (d) Splash.
To extract the embedded data bits, the random sequence is
generated using the encryption key, and [9] calculates the XOR
of and the binary digits of to decrypt the image. The five
MSBs of each pixel of the decrypted image will be identical
to those of the cover image. According to the data-hiding key,
pixels in sets and of each blocks are obtained. For block
,flip three LSBs of pixels in set and calculate the XOR
of the resultant bit stream and , we obtain a block .Sim-
ilarly, flip three LSBs of pixels of set and calculate the XOR
of the resultant bit stream and , we obtain a block .Ei-
ther or is identical to the original block ,
and the other one will be the block with three LSBs of
every pixels flipped. Because the pixels are de-correlated in the
flipped blocks, the original blocks often exhibit smoother than
those of flipped blocks. By comparing the smoothness of these
two blocks, the embedded bits can be extracted. [9] uses (6) to
calculate the smoothness of blocks and :
(6)
where denotes the pixel value at position ,is the
absolute value of . Let the calculated smoothness of and
be and , respectively. If ,abit
“0” is extracted, and is the original block. Otherwise, a
bit “1” is extracted, and is the original block.
In [9], the border pixels of blocks are not included in the
process of smooth calculation. Moreover, the correlations
between blocks are also ignored in data extraction. However,
these two facts could be exploited to enhance the correctness of
data extraction. This letter proposes a new smooth-evaluation
function that fully exploits the pixels in blocks for evaluating
the pixel fluctuations in images. A side-match mechanism is
also introduced to evaluate the smoothness of those ambiguous
blocks, where the absolute difference between and
are smaller than a predefined threshold. With these sophisti-
cated approaches, the correctness of data extraction will be
further increased.
II. PROPOSED METHOD
In [9], the evaluation of block smoothness is crucial for ob-
taining a correct data extraction. However, the four borders of
each block do not join the calculation of block smoothness. This
may decrease the rate of correctness of data extraction, espe-
cially when the block size is small. For example, for a block of
size 8 8, there are 64 pixels and around 43.75% of them (28
pixels) are located in the four borders. These border pixels are
not employed to calculate the block smoothness, and the per-
centage is increased as the block size decreased. Besides, [9]
Fig. 2. (a) Decrypted image using content owner’s key. (b) Blocks of incorrect
recovery of Zhang’s method. (c) Blocks of incorrect recovery of the proposed
method.
extracts the embedded bits by evaluating the smoothness of a
single block. However, flipping 3 LSBs of these complex blocks
will not cause a significant increase in complexness. Based on
these observations, this letter proposes an improved version for
a better estimation of block smoothness. In the new smoothness
estimation, the summation of the absolute of two neighboring
pixels is employed. Moreover, the extraction and recovery are
performed starting from the most noticeable changes in smooth-
ness to the least ones. Besides, we also adopt the side-match
technique to evaluate the block smoothness by concatenating
the border of recovered blocks to the unrecovered blocks. The
data encryption and data embedding process is the same as [9].
Therefore, we address only the calculation of smoothness and
the process of image recovery.
A. Calculation of Block Smoothness
The smoothness of an image block can be evaluated by calcu-
lating the absolute difference of neighboring pixels. The larger
the summation of absolute differences, the more complex the
image blocks is. Therefore, we estimate the block smoothness
by calculating the summation of the vertical absolute differ-
ences and horizontal absolute differences of pixels in image
blocks using the following equation:
(7)
Authorized licensed use limited to: National Chiao Tung Univ.. Downloaded on April 23,2020 at 07:12:06 UTC from IEEE Xplore. Restrictions apply.
HONG et al.:ANIMPROVEDREVERSIBLEDATAHIDINGINENCRYPTEDIMAGESUSINGSIDEMATCH 201
Fig. 3. The error rate comparison. (a) Lena. (b) Baboon. (c) Sailboat. (d) Splash.
were represents the pixel values located at position of
a given image block of size . Equation (7) fully exploits
the absolute difference between two consecutive pixels in both
vertical and horizontal directions and thus, the smoothness of
blocks can be better estimated.
B. Data Extraction and Image Recovery Using Side Match
Let the cover image be and the encrypted image with mes-
sages embedded be . Firstly, a random sequence is generated
using the encryption key. The XOR of the 5 MSBs of and
are calculated to recover the five MSBs of the cover image.
According to the data hiding key, the pixels in sets and
of block are obtained. Flip the three LSBs of pixels in
set , and calculate the XOR of the resultant bit string and
, we obtain . Similarly, flip the three LSBs of pixels in
set , and calculate the XOR of the resultant bit string and
, we obtained . Equation (7) is then applied to evaluate
the smoothness of and , and to obtain the evaluated
results and , respectively. The difference be-
tween and is obtained by the following equation
(8)
Alarger indicates that is more dissimilar to
, which implies that the block becomes more
complex after flipping three LSBs. Therefore, we calculate
for all blocks, and sort in descending order. The
data extraction and image recovery of blocks is then preformed
using the sorted order of .
Because border pixels between blocks are highly correlated,
the border pixels between two unflipped blocks are smoother
than those flipped blocks. Therefore, we adopt the side match
technique to concatenate the borders of the recovered blocks
to the unrecovered blocks, and perform the smoothness evalu-
ation of the concatenated blocks. To do this, let be the
block to be recovered and , , ,and
be the neighboring blocks of . If none of the
neighboring blocks of are recovered, then the data ex-
traction and block recovery can be done using the sign of .
That is, if , a bit “0” is extracted and is the orig-
inal image block. Otherwise, a bit “1” is extracted and is
the original image block. If the any of the neighboring blocks of
is already recovered, then concatenates the border pixels
of the recovered blocks to and to obtain the con-
catenated blocks and , respectively. Let and
be the smoothness values of and using (7).
If , a bit “0” is extracted and is the original
block. Otherwise, a bit “1” is extracted and is the original
block.
III. EXPERIMENTAL RESULTS
We used four graylevel images of size 512 512, including
Lena, Baboon, Sailboat, and Splash as the test images, as shown
in Fig. 1. These images can be obtained from USC-SIPI image
database [11]. The experimental results are compared with [9].
To demonstrate the performance of the proposed method, we
take Lena image as an example. Fig. 2(a) shows the decrypted
Lena image with 5 MSBs recovered (suppose the block size is 8
8). Figs. 2(b) and (c) show the recovery results using [9] and
the proposed method, respectively, where the incorrect recov-
ered blocks are marked by white. Note that most of the incorrect
recovered blocks are sparsely distributed over the complex re-
gions of the Lena image. Comparing Figs. 2(b) and (c), we see
that the proposed method recovers the image blocks more accu-
rate than that of [9]. Although the experiments were based on
Lena image, experiments on other test images also showed the
Authorized licensed use limited to: National Chiao Tung Univ.. Downloaded on April 23,2020 at 07:12:06 UTC from IEEE Xplore. Restrictions apply.
202 IEEE SIGNAL PROCESSING LETTERS, VOL. 19, NO. 4, APRIL 2012
similar results, which indicates that the proposed method offers
a better performance for data extraction and image recovery.
Fig. 3 plots the block size versus extraction error rate of the
proposed method and [9]. The error rates are calculated by di-
viding the number of total blocks by the number of incorrectly
recovered blocks. Fig. 3 reveals that the proposed method of-
fers lower error rates than that of [9]. For example, for the Lena
image at block size 8 8, the error rate of the proposed method
is 0.34% whereas the error rate of [9] is 1.21%, which is approx-
imately four times less than that of [9]. For the complex image,
such as Baboon, the error rate of [9] at block size 8 8is1.6
times higher than that of the proposed method. Note that, for the
Splash image, the error rate of the proposed method is 0 at block
size 8 8, however, [9] has to choose a block size of 16 16
to achieve a zero error rate.
IV. CONCLUSIONS
This letter proposes improved data extraction and image re-
covery strategies based on Zhang’s work. We used a new algo-
rithm to better estimate the smoothness of image blocks. The ex-
traction and recovery of blocks are performed according to the
descending order of the absolute smoothness difference between
two candidate blocks. The side match technique is employed to
further reduce the error rate. The experimental results show that
the propose method effectively improves Zhang’s method, es-
pecially when the block size is small.
REFERENCES
[1] J. Tian, “Reversible data embedding using a difference expansion,”
IEEE Trans. Circuits Syst. Video Technol., vol. 13, no. 8, pp. 890–896,
2003.
[2] M.U.Celik,G.Sharma,A.M.Tekalp,andE.Saber,“Losslessgen-
eralized-LSB data embedding,” IEEE Trans. Image Process.,vol.14,
no. 2, pp. 253–266, 2005.
[3] Z. Ni, Y. Q. Shi, N. Ansari, and W. Su, “Reversible data hiding,” IEEE
Trans. Circuits Syst. Video Technol., vol. 16, no. 8, pp. 354–362, 2006.
[4] D. M. Thodi and J. J. Rodriguez, “Expansion embedding techniques for
reversible watermarking,” IEEE Trans. Image Process.,vol.16,no.3,
pp. 721–730, 2007.
[5] W. Hong and T. S. Chen, “Reversible data embedding for high quality
images using interpolation and reference pixel distribution mecha-
nism,” J. Vis. Commun. Image Represent., vol. 22, no. 2, pp. 131–140,
2011.
[6] D. Kundur and K. Karthik, “Videofingerp rinting and encryption princi-
ples for digital rights management,” Proc. IEEE, vol. 92, pp. 918–932,
2004.
[7] S. Lian, Z. Liu, Z. Ren, and H. Wang, “Commutative encryption and
watermarking in video compression,” IEEE Trans. Circuits Syst. Video
Technol., vol. 17, no. 6, pp. 774–778, 2007.
[8] M. Cancellaro, F. Battisti, M. Carli, G. Boato, F. G. B. Natale, and
A. Neri, “A commutative digital image watermarking and encryption
method in the tree structured haar transform domain,” Signal Process.:
Image Commun., vol. 26, no. 1, pp. 1–12, 2011.
[9] X. Zhang, “Reversible data hiding in encrypted images,” IEEE Signal
Process. Lett., vol. 18, no. 4, pp. 255–258, 2011.
[10] X. Zhang, “Separable reversible data hiding in encry pted image,” IEEE
Trans. Inf. Forensics Security, 10.1109/TIFS.2011.2176120.
[11] Image database [Online]. Available: http://sipi.use.edu/database/
Authorized licensed use limited to: National Chiao Tung Univ.. Downloaded on April 23,2020 at 07:12:06 UTC from IEEE Xplore. Restrictions apply.