# Reversible Data Hiding Scheme in Homomorphic Encrypted Image Based on EC-EG
## 4 Simulation Experiment and Theoretical Analysis
### Analysis of Security
#### 4.3.3 Information Entropy Analysis  
If there is \(L\) kinds of gray values \(m_{i}(i=0,1,\cdots,L-1)\) in an image, and the probability of occurrence of each gray value is \(p(m_{i})(i=0,1,\cdots,L-1)\), according to the theorem of [PERSON], the information amount of the image is  
\[H(m)=-\sum_{i=0}^{L-1}p(m_{i})\text{log}_{2}p(m_{i}),\sum_{i=0}^{L-1}p(m_{i})=1 \tag{27}\]  
where \(H\) is the information entropy of an image. When the probability of occurrence of each gray value in the image is equal, the information entropy of the image is the largest, and the information entropy indicates how much information is contained in one image.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Image**} & \multicolumn{2}{c}{**Adjacent Pixel Correlation Coefficients**} \\ \cline{2-4}  & **Horizontal** & **Vertical** & **Diagonal** \\ \hline \multirow{4}{*}{(a) Original image} & 0.962 & 0.975 & 0.947 \\  & 0.972 & 0.974 & 0.942 \\  & 0.959 & 0.972 & 0.94 \\  & 0.96 & 0.98 & 0.941 \\ \hline \multirow{4}{*}{(b) Encrypted image} & 0.056 & \(-\)0.041 & \(-\)0.012 \\  & \(-\)0.019 & \(-\)0.034 & \(-\)0.089 \\ \cline{1-1}  & \(-\)0.05 & \(-\)0.006 & 0.02 \\ \cline{1-1}  & \(-\)0.009 & \(-\)0.042 & 0.023 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Adjacent pixel correlation coefficients of the images in Figure 6a,b.  
The information entropy of the image can measure the distribution of the gray value. The result shows that the larger is the information entropy, the more consistent is the gray distribution. For an ideal random image, the information entropy is equal to 8. In Table 6, the experimental results confirm the conclusion of theoretical analysis. Below, we briefly prove it.  
**Theorem 2**.: _For information entropy \(H\), there is \(H(m)\leq 8\)._  
Figure 9: Horizontal adjacent pixel correlation scatter plot of the images in Figure 6a,b,f,g,k,l,p,q.  
Proof of Theorem 2.: The known power mean inequality is  
\[a_{0}^{p_{0}}a_{1}^{p_{1}}\cdots a_{L-1}^{p_{L-1}}\leq p_{0}a_{0}+p_{1}a_{1}+ \cdots+p_{L-1}a_{L-1} \tag{28}\]  
In the inequality in Equation (28), the range of \(p_{i}\) is \(0<p_{i}<1(i=0,1,\cdots,L-1)\), and satisfies Equation (29).  
\[\sum\limits_{i=0}^{L-1}p(m_{i})=1 \tag{29}\]  
If and only if \(a_{0}=a_{1}=\cdots=a_{L-1}\) is established, the equal sign in the inequality in Equation (28) is established. When \(p_{i}=1/L(i=0,1,\cdots,L-1)\), the following geometric-arithmetic mean inequality is obtained from Equation (28).  
\[\sqrt[]{a_{0}a_{1}\cdots a_{L-1}}\leq\frac{a_{0}+a_{1}+\cdots+a_{L-1}}{L} \tag{30}\]  
According to the logarithmic nature of Equation (27), we can calculate the following.  
\[\begin{split} H(m)&=\sum\limits_{i=0}^{L-1}\log_{2 }(\frac{1}{p(m_{i})})^{p(m_{i})}\\ &=\log_{2}\left[(\frac{1}{p(m_{0})})^{p(m_{0})}\log_{2}(\frac{1} {p(m_{1})})^{p(m_{1})}\cdots\log_{2}(\frac{1}{p(m_{L-1})})^{p(m_{L-1})}\right] \end{split} \tag{31}\]  
Then, we apply Equation (28) to Equation (31).  
\[H(m)\leq\log_{2}\left[p(m_{0})\times\frac{1}{p(m_{0})}+p(m_{1})\times\frac{1} {p(m_{1})}+\cdots+p(m_{L-1})\times\frac{1}{p(m_{L-1})}\right]=\log_{2}L \tag{32}\]  
When the gray level \(L=256=2^{8}\), Theorem 2 is established. According to \(\sum\limits_{i=0}^{L-1}p(m_{i})=1\) and \(a_{0}=a_{1}=\cdots=a_{L-1}\), the equal sign in Theorem 2 is established at \(p(m_{i})=1/256(i=0,1,\cdots,255)\).