# Enhanced Joint and Separable Reversible Data Hiding in Encrypted Images with High Payload

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

_{0}and S

_{1}, pseudo-randomly. Each block is capable of carrying one bit. If the bit to be inserted is 0, then the three least significant bits (LSBs) of each pixel in set S

_{0}are flipped. On the other hand, if the bit to be inserted is 1 then the three LSBs of each pixel in set S

_{1}are flipped. Thus, the embedding process is done. For data extraction and image recovery, the receiver first decrypts the embedded encrypted image. Then, the decrypted image is partitioned into non-overlapping blocks sized s × s. According to the data-hiding key, the pixels of each block are divided into two sets, S

_{0}and S

_{1}, pseudo-randomly in the same way as before. For each decrypted block, two new blocks, B

_{0}and B

_{1}, are obtained. In B

_{0}, all three LSBs of each pixel in S

_{0}are flipped, and in B

_{1}, all three LSBs of the pixels in S

_{1}are flipped. One of B

_{0}and B

_{1}is the original block, and the other is the three LSBs flipped block. To determine which one is the original block, Zhang [15] proposed a fluctuation function f

_{Z}to calculate the smoothness of B

_{0}and B

_{1}as follows:

_{c}for c = 0, 1.

_{Qual}and T

_{Forb}, according to the data-hiding key. Then, only pixels in T

_{Qual}, which are about half of the encrypted image, are used for data embedding. For inserting information in data hiding, pixels in T

_{Qual}are divided into groups, and each group is composed of m pixels. One bit of information can be embedded in one group. For data extraction and image recovery, the receiver first decrypts the embedded encrypted image. Then, the decrypted image is divided into two sets: T

_{Qual}and T

_{Forb}. The pixels in T

_{Qual}are retrieved and divided into groups, and the d-th group contains m pixels, denoted as P(u,d) for u = 1, 2,…, m. For each pixel, an estimated pixel, P

_{Est}(u,d), is calculated by using four neighboring pixels and a flipped pixel, P

_{Flip}(u,d), is determined by flipping the t-th bit of P(u,d). Then, for the smoothness calculation, the prediction error PE and flipped prediction error PE

_{Flip}, respectively, are calculated by using the following equations:

## 3. The Proposed Joint Data Hiding System

#### 3.1. Procedures of Proposed Method

#### 3.1.1. Image Encryption

_{i,j}be a pixel at position (i,j), where I

_{i,j}belongs to [0, 255] and 1 ≤ i ≤ X, 1 ≤ j ≤ Y. I

_{i,j,k}denotes eight-bit binary digits of each pixel with a gray value, where k = [1, 8]. The relation between bits in a pixel and pixels with a gray value is denoted by

_{i}

_{,j,k}is generated according to the encryption key using a standard stream cipher. Then, bits of pixel I

_{i,j,k}can be encrypted by a bitwise exclusive-or (XOR) of I and R:

#### 3.1.2. Data Hiding

_{B}+ Q

_{W}, where Q

_{B}and Q

_{W}are nonnegative integers for the number of embedded information bits in the two sets. In the data hiding phase, according to the data-hiding key, the pixels except the border pixels in the encrypted image, are divided into four sets, B

_{1}, B

_{2}, W

_{1}, and W

_{2}, where pixels in B

_{1}and W

_{1}can be used for embedding Q

_{B}and Q

_{W}information bits, respectively, and pixels in B

_{2}and W

_{2}can be used for data extraction. Border pixels can be the elements of B

_{2}or W

_{2}but cannot be the elements of B

_{1}or W

_{1}, i.e., border pixels can be used for data extraction but cannot be used for data embedding. To embed one information bit, it is assumed that G pixels are considered. Therefore, the elements of B

_{1}and W

_{1}are Q

_{B}G and Q

_{W}G, respectively.

_{1}and B

_{2}can be located at position (i,j), where (i + j) mod 2 = 0. Similarly, the elements of W

_{1}and W

_{2}can be located at position (i + j), where (i + j) mod 2 = 1 as shown in Figure 3. In the first round, according to the data-hiding key, pixel I’

_{i}

_{,j}is selected, and pixel I’

_{i}

_{,j}is assigned to B

_{1}or W

_{1}, if (i + j) mod 2 is 0 or 1, respectively. Then, neighboring pixels I’

_{i}

_{+1,j}, I’

_{i}

_{−1,j}, I’

_{i}

_{,j+1}, and I’

_{i}

_{,j-1}are assigned to W

_{2}or B

_{2}, respectively. For the next round, we choose a new pixel I’

_{i}

_{,j}with i and j that are different from i and j in the previous round. If (i + j) mod 2 is 0, then the chosen pixel I’

_{i}

_{,j}becomes an element in B

_{1}, regardless of whether the chosen pixel I’

_{i}

_{,j}is an element of B

_{2}or not, and neighboring pixels I’

_{i}

_{+1,j}, I’

_{i}

_{−1,j}, I’

_{i}

_{,j+1}, and I’

_{i}

_{,j−1}are elements of W

_{1}or W

_{2}or not. However, the neighboring pixels that are not in W

_{2}become elements in W

_{2}. The neighboring pixels in W

_{1}or W

_{2}are not changed. Similarly, if (i + j) mod 2 = 1, then the chosen pixel I’

_{i}

_{,j}is assigned to set W

_{1}, and the neighboring pixels not in set B

_{2}, become elements of B

_{2}. For example, as shown in Figure 3, we choose a pixel at position (2, 2) where i = 2 and j = 2. Since (2 + 2) mod 2 = 0, the first chosen pixel belongs to set B

_{1}and neighboring pixels will be the elements in set W

_{2}. If the second selected pixel is located at the (3, 3) position, the chosen pixel belongs to set B

_{1}since (3 + 3) mod 2 = 0. Since the top and left pixels are already in set W

_{2}, only the bottom and right pixels will be the elements in set W

_{2}. The third chosen pixel at position (5, 2) will belong to set W

_{1}as (5 + 2) mod 2 = 1 and adjacent pixels will be the elements in B

_{2}. The next pixel can be selected at position (4, 3) and will belong to set W

_{1}. Though this pixel was already an element of set W

_{2}, the pixel can belong to W

_{1}and the neighboring pixels that are not in B

_{2}become the elements of B

_{2}. The selection process terminates when the elements of B

_{1}and W

_{1}become Q

_{B}G and Q

_{W}G.

_{1}and W

_{1}, and the number in C is QG. The set C can be divided into Q groups: Q

_{1}, Q

_{2},…, Q

_{Q}, sequentially. Then, the d th group, Q

_{d}, can be written as {(i

_{1,d}, j

_{1,d}), (i

_{2,d}, j

_{2,d}), …, (i

_{G,d}, j

_{G,d})}, where d = 1, 2,…, Q. The d th group can embed the d th permuted information bit A(d). If an information bit to be embedded is 1, that is A(d) = 1, one bit of G pixels where positions are in Q

_{d}will be flipped. It is assumed that the t th bit can be flipped, where t is 4, 5, or 6. Here, the t th bit is flipped instead of the three LSBs to make the pixels more fluctuated. If an information bit to be embedded is 0, that is A(d) = 0, the t th bit of G pixels where the positions are in Q

_{d}will remain the same. When all the bits, A(1), A(2),…, A(Q) are embedded, an embedded encrypted image, I”, will be constructed and sent to the receiver.

#### 3.1.3. Joint Data Extraction and Image Restoration

_{i,j,k}according to the encryption key using a standard stream cipher. Then, a bitwise XOR of I” and R is performed using the following equations:

_{d}and its flipped group $\overline{{Q}_{d}}$, the following functions are defined:

_{i,j}(x,d) represents the chosen pixels in the d th group, Q

_{d}and ${\overline{D}}_{i,j}(x,d)$ is the flipped pixels, which are achieved by flipping the t th bit of D

_{i,j}(x,d) and f

_{0}(d) and f

_{1}(d) are fluctuation functions of Q

_{d}and $\overline{{Q}_{d}}$, respectively. For the fluctuation calculation, we use the actual value of the pixels, instead of the estimated value. Besides, we have considered the absolute difference between neighboring pixels rather than the prediction error, as used in (3) and (4), to reduce the bit error rate.

_{0}(d) and f

_{1}(d), data extraction and image restoration can be performed. If f

_{0}(d) < f

_{1}(d), then Q

_{d}will be the original group, and 0 will be the extracted hidden bit, that is E(d) = 0. Otherwise, $\overline{{Q}_{d}}$ will be the original group, and 1 will be the extracted hidden bit, that is E(d) = 1. Eventually, extracted hidden bits E(1), E(2),…, E(Q) are concatenated to get the permuted information bits. Then, using the data-hiding key, hidden bits E(1), E(2),…, E(Q) are inversely permuted, and the original information bits are extracted. The restored groups are collected to make the original image. As the information bits are further permuted using the data-hiding key, it is impossible for attackers to get the original message without the data-hiding key.

#### 3.2. Feasibilty of the Proposed Data Hiding System

_{1}and W

_{1}. Since the fluctuation calculation is based on the smoothness of natural images, the difference of the chosen pixel and its neighboring pixels is usually used to measure the fluctuation. For example, let us consider two adjacent pixels, i.e., the chosen pixel and one of its neighboring pixels. Assume that the flip operation is performed randomly on all the pixels of the encrypted image. There are a total of four cases of two adjacent pixels, as shown in Figure 4 where c and $\overline{c}$ represent the original and the flipped chosen pixels, n and $\overline{n}$ represent the original and the flipped neighboring pixels, respectively.

#### 3.3. An Example of the Proposed Joint Data Hiding System

_{B}= 2 and Q

_{W}= 2. Let G = 2, i.e., two pixels are required to embed one bit. I’ is divided into four sets B

_{1}, B

_{2}, W

_{1}, and W

_{2}. Border pixels can be the elements of B

_{2}or W

_{2}but cannot be the elements of B

_{1}or W

_{1}. Let the first chosen pixel be 186 at position (2, 2) where i = 2 and j = 2. Since (2 + 2) mod 2 = 0, this pixel will belong to set B

_{1}and neighboring pixels {186,183,160,183} will be the elements in set W

_{2}. The second pixel, 189 at (3, 3), will belong to set B

_{1}as (3 + 3) mod 2 = 0, and as top and left pixels {183,160} are already in set W

_{2}, only bottom and right pixels {189,160} will be the elements in set W

_{2}. The third pixel, 183 at position (3, 2), will belong to set W

_{1}as (3 + 2) mod 2 = 1, and neighboring pixels {183,186,189,186} will be elements in B

_{2}. The process is continued until number of pixels in B

_{1}and W

_{1}exceeds 4. Let B

_{1}and W

_{1}be B

_{1}= {186,189,160,183} and W

_{1}= {183,160,189,186},respectively.Therefore, C is determined as C = {186,189,160,183,183,160,189,186}. These pixels are divided into four groups and each group contains two pixels. If it is assumed that the first group is {186,189} and first bit to be embedded is 0, the pixels in this group will be the same. If the second group is {160,183} and bit to be embedded is 1, then t th bit of all pixels in this group is flipped. Thus, after embedding all the bits, embedded encrypted image is shown in Figure 5c.

_{0}= 40 and f

_{1}= 60. As f

_{0}< f

_{1}, {8,15} is the original group and the extracted bit is 0. The last group is {7,0} and its flipped group is {15,8}. Let f

_{0}= 96 and f

_{1}= 42. As f

_{1}< f

_{0}, {15,8} is the original group and the extracted bit is 1. After extracting all information bits, a recovered image is shown in Figure 5e.

## 4. The Proposed Separable Data Hiding System

#### 4.1. Image Encryption

#### 4.2. Data Hiding

#### 4.3. Data Extraction

#### 4.4. Image Restoration

_{i,j,k}according to the encryption key using a standard stream cipher. Then, a bitwise XOR of I” and R is performed to decrypt the encrypted image. Since some most significant bits or second-most significant bits are modified in the separable method, it introduces salt-and-pepper noise on the directly decrypted image. Then, a median filtering is applied to the directly decrypted image to suppress the noise, and a filtered decrypted image is obtained.

_{i,j,k}is obtained according to the encryption key using a standard stream cipher. These bits are utilized to decrypt the encrypted image and directly decrypted image, D is obtained. In the directly decrypted image, only the t th bits of the Q specific pixels may differ from the original.

_{0}(d) and D

_{1}(d) be the two possible values of D(d), respectively.

_{0}(d) and D

_{1}(d) are calculated as follows

_{0}(d) and f

_{1}(d), image restoration can be performed. If f

_{0}(d) < f

_{1}(d), then D

_{0}(d) will be the original pixel. Otherwise, D

_{1}(d) will be the original pixel. When Q original pixels are obtained, the original image is restored.

#### 4.5. An Example of the Proposed Separable Data Hiding System

_{0}= 8 and t = 1, D

_{1}= 136. The fluctuation of D

_{0}and D

_{1}is calculated from (15) and (16), respectively. After calculation, we get f

_{0}= 16 and f

_{1}= 508. As f

_{0}< f

_{1}, then D

_{0}= 8 will be the original pixel. Therefore, we will restore the original pixels and collect them to restore the original image, as demonstrate in Figure 7e.

## 5. Experimental Results and Discussion

#### 5.1. Joint System

#### 5.2. Separable System

## 6. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Hong, W.; Chen, T. A novel data embedding method using adaptive pixel pair matching. IEEE Trans. Inf. Forensics Secur.
**2012**, 7, 176–184. [Google Scholar] [CrossRef] - Hussain, M.; Wahab, A.W.A.; Javed, N.; Jung, K.H. Hybrid data Hiding Scheme Using Right-Most Digit Replacement and Adaptive Least Significant Bit for Digital Images. Symmetry
**2016**, 8, 1–21. [Google Scholar] [CrossRef] - Hong, W.; Chen, T.S.; Yin, Z.; Luo, B.; Ma, Y. Data hiding in AMBTC images using quantization level modification and perturbation technique. J. Vis. Commun. Image Represent.
**2017**, 76, 3761–3782. [Google Scholar] [CrossRef] - Tian, J. Reversible data embedding using a difference expansion. IEEE Trans. Circuits Syst. Video Technol.
**2003**, 13, 890–896. [Google Scholar] [CrossRef] - Ni, Z.; Shi, Y.Q.; Ansari, N.; Su, W. Reversible data hiding. IEEE Trans. Circuits Syst. Video Technol.
**2006**, 16, 354–362. [Google Scholar] - Thodi, D.M.; Rodriguez, J.J. Expansion embedding techniques for reversible watermarking. IEEE Trans. Image Process.
**2007**, 16, 721–730. [Google Scholar] [CrossRef] [PubMed] - Luo, L.; Chen, Z.; Chen, M.; Zeng, X.; Xiong, H. Reversible image watermarking using interpolation technique. IEEE Trans. Circuits Syst. Video Technol.
**2010**, 5, 187–193. [Google Scholar] - Hong, W.; Chen, T.S. Reversible data embedding for high quality images using interpolation and reference pixel distribution mechanism. J. Vis. Commun. Image Represent.
**2011**, 22, 131–140. [Google Scholar] [CrossRef] - Hong, W.; Chen, T.S.; Chen, J. Reversible data hiding using delaunay triangulation and selective embedment. Inf. Sci.
**2015**, 308, 140–154. [Google Scholar] [CrossRef] - Kumar, M.; Agarwal, S. Reversible data hiding based on prediction error and expansion using adjacent pixels. Secur. Commun. Netw.
**2016**, 9, 3703–3712. [Google Scholar] [CrossRef] - Lian, S.; Liu, Z.; Ren, Z.; Wang, H. Commutative encryption and watermarking in video compression. IEEE Trans. Circuits Syst. Video Technol.
**2007**, 17, 774–778. [Google Scholar] [CrossRef] - Cancellaro, M.; Battisti, F.; Carli, M.; Boato, G.; Natale, F.G.B.; Neri, A. A commutative digital image watermarking and encryption method in the tree structured haar transform domain. Signal Process. Image Commun.
**2011**, 26, 1–12. [Google Scholar] [CrossRef] - Ma, K.; Zhang, W.; Zhao, X.; Yu, N.; Li, F. Reversible data Hiding in encrypted images reserving room before encryption. IEEE Trans. Inf. Forensics Secur.
**2013**, 8, 553–562. [Google Scholar] [CrossRef] - Cao, X.; Du, L.; Wei, X.; Meng, D.; Guo, X. High capacity reversible data hiding in encrypted images by patch-level sparse representation. IEEE Trans. Cybern.
**2016**, 46, 1132–1143. [Google Scholar] [CrossRef] [PubMed] - Zhang, X. Reversible data hiding in encrypted images. IEEE Signal Process. Lett.
**2011**, 18, 255–258. [Google Scholar] [CrossRef] - Hong, W.; Chen, T.; Wu, H. An improved reversible data hiding in encrypted images using side match. IEEE Signal Process. Lett.
**2012**, 19, 199–202. [Google Scholar] [CrossRef] - Liao, X.; Shu, C. Reversible data hiding in encrypted images based on absolute mean difference of multiple neighboring pixels. Vis. Commun. Image Represent.
**2015**, 28, 21–27. [Google Scholar] [CrossRef] - Pan, Z.; Wang, L.; Hu, S.; Ma, X. Reversible data hiding in encrypted image using new embedding pattern and multiple judgements. Multimed. Tools Appl.
**2016**, 75, 8595–8607. [Google Scholar] [CrossRef] - Li, M.; Xiao, D.; Peng, Z.; Nan, H. A modified reversible data hiding in encrypted images using random diffusion and accurate prediction. ETRI J.
**2014**, 36, 325–328. [Google Scholar] [CrossRef] - Wu, X.; Sun, W. High-capacity reversible data hiding in encrypted images by prediction error. Signal Process.
**2014**, 104, 387–400. [Google Scholar] [CrossRef] - Zhang, X. Separable reversible data hiding in encrypted image. IEEE Trans. Inf. Forensics Secur.
**2012**, 7, 826–832. [Google Scholar] [CrossRef] - Qian, Z.; Zhang, X. Reversible data hiding in encrypted images with distributed source encoding. IEEE Trans. Circuits Syst. Video Technol.
**2016**, 26, 636–646. [Google Scholar] [CrossRef] - Xiao, D.; Xiang, Y.; Zheng, H.; Wang, Y. Separable reversible data hiding in encrypted image based on pixel value ordering and additive homomorphism. J. Vis. Commun. Image Represent.
**2017**. [Google Scholar] [CrossRef] - USC-SIPI Image Database. Available online: http//sipi.usc.edu/database/ (accessed on 2 March 2016).

**Figure 5.**Example of the proposed joint data hiding system. (

**a**) Original image; (

**b**) encrypted image; (

**c**) encrypted image containing information bits; (

**d**) decrypted image containing information bits; and (

**e**) recovered image.

**Figure 7.**Example of the proposed separable data hiding system. (

**a**) Original image; (

**b**) encrypted image; (

**c**) encrypted image containing information bits; (

**d**) decrypted image containing information bits; and (

**e**) recovered image.

**Figure 8.**Test images used for the simulation (

**a**) Lena; (

**b**) Jet; (

**c**) Peppers; and (

**d**) Sailboat [24].

**Figure 9.**Experiment by joint system. (

**a**) Original Lena; (

**b**) encrypted Lena; (

**c**) decrypted Lena containing information bits; and (

**d**) recovered Lena.

**Figure 11.**BER comparison between the proposed system and the referenced systems for the test image Lena. (

**a**) Comparison of systems mentioned. (

**b**) Comparison of proposed system and Wu and Sun.

**Figure 12.**BER comparison between the proposed system and the referenced systems for the test image Jet. (

**a**) Comparison of systems mentioned. (

**b**) Comparison of proposed system and Wu and Sun.

**Figure 13.**BER comparison between the proposed system and the referenced systems for the test image Peppers. (

**a**) Comparison of systems mentioned. (

**b**) Comparison of proposed system and Wu and Sun.

**Figure 14.**BER comparison between the proposed system and the referenced systems for the test image Sailboat. (

**a**) Comparison of systems mentioned. (

**b**) Comparison of proposed system and Wu and Sun.

**Figure 15.**Experiment by separable system. (

**a**) Original Jet; (

**b**) encrypted Jet containing information bits; (

**c**) filtered decrypted Jet containing information bits; and (

**d**) recovered Jet.

G | t | Embedded Bits | Embedding Rate (bpp) | Bit Error Rate |
---|---|---|---|---|

10 | 5 | 4096 | 0.0156 | 0 |

4 | 6 | 4096 | 0.0156 | 0 |

15 | 5 | 7225 | 0.0275 | 0 |

4 | 6 | 7225 | 0.0275 | 0 |

4 | 6 | 16,384 | 0.0625 | 0 |

4 | 6 | 24,576 | 0.0938 | 0.008 |

4 | 6 | 28,900 | 0.1100 | 0.010 |

G | t | Embedded Bits | Embedding Rate (bpp) | Bit Error Rate |
---|---|---|---|---|

10 | 5 | 4096 | 0.0156 | 0 |

4 | 6 | 4096 | 0.0156 | 0 |

15 | 5 | 7225 | 0.0275 | 0 |

4 | 6 | 7225 | 0.0275 | 0 |

4 | 6 | 16,384 | 0.0625 | 0.04 |

4 | 6 | 24,576 | 0.0938 | 0.05 |

4 | 6 | 28,900 | 0.1100 | 0.07 |

G | t | Embedded Bits | Embedding Rate (bpp) | Bit Error Rate |
---|---|---|---|---|

10 | 5 | 4096 | 0.0156 | 0 |

4 | 6 | 4096 | 0.0156 | 0 |

15 | 5 | 7225 | 0.0275 | 0 |

4 | 6 | 7225 | 0.0275 | 0 |

4 | 6 | 16,384 | 0.0625 | 0.006 |

4 | 6 | 24,576 | 0.0938 | 0.007 |

4 | 6 | 28,900 | 0.1100 | 0.008 |

G | t | Embedded Bits | Embedding Rate (bpp) | Bit Error Rate |
---|---|---|---|---|

10 | 5 | 4096 | 0.0156 | 0.21 |

4 | 6 | 4096 | 0.0156 | 0.16 |

15 | 5 | 7225 | 0.0275 | 0.26 |

4 | 6 | 7225 | 0.0275 | 0.23 |

4 | 6 | 16,384 | 0.0625 | 0.35 |

4 | 6 | 24,576 | 0.0938 | 0.41 |

4 | 6 | 28,900 | 0.1100 | 0.43 |

**Table 5.**PSNR (dB) comparison between the proposed system and the referenced systems for the test images.

Test Images | Embedded Bits | Embedding Rate (bpp) | Zhang’s System [21] | Wu’s System [20] | Proposed Sytem |
---|---|---|---|---|---|

Lena | 4096 | 0.0156 | 65.89 | +∞ | +∞ |

16,384 | 0.0625 | 55.63 | +∞ | +∞ | |

40,960 | 0.1563 | 44.65 | +∞ | +∞ | |

Jet | 4096 | 0.0156 | 60.14 | 60.17 | +∞ |

16,384 | 0.0625 | 48.66 | 60.17 | +∞ | |

40,960 | 0.1563 | 42.08 | 60.17 | +∞ | |

Peppers | 4096 | 0.0156 | 56.14 | 51.14 | +∞ |

16,384 | 0.0625 | 41.01 | 45.17 | +∞ | |

40,960 | 0.1563 | 39.17 | 41.14 | +∞ | |

Sailboat | 4096 | 0.0156 | 56.32 | 59.39 | +∞ |

16,384 | 0.0625 | 42.63 | 58.32 | +∞ | |

40,960 | 0.1563 | 39.88 | 54.84 | 57.16 |

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Khanam, F.-T.-Z.; Kim, S.
Enhanced Joint and Separable Reversible Data Hiding in Encrypted Images with High Payload. *Symmetry* **2017**, *9*, 50.
https://doi.org/10.3390/sym9040050

**AMA Style**

Khanam F-T-Z, Kim S.
Enhanced Joint and Separable Reversible Data Hiding in Encrypted Images with High Payload. *Symmetry*. 2017; 9(4):50.
https://doi.org/10.3390/sym9040050

**Chicago/Turabian Style**

Khanam, Fatema-Tuz-Zohra, and Sunghwan Kim.
2017. "Enhanced Joint and Separable Reversible Data Hiding in Encrypted Images with High Payload" *Symmetry* 9, no. 4: 50.
https://doi.org/10.3390/sym9040050