# High-Capacity Data Hiding Method Based on Two Subgroup Pixels-Value Adjustment Using Encoding Function

Authors: Jie Sun; ZhaoFang Yang; Yu Zhang; Teng Li; Sha Wang
Journal: Security and Communication Networks
 (2022)

---

## Abstract

Confidential information can be hidden in digital images through data hiding technology. This has practical application value for copyright, intellectual property protection, public information protection, and so on. In recent years, researchers have proposed many schemes of data hiding. However, existed data hiding schemes suffer from low hiding capacity or poor stego-image quality. This paper uses a new method of multiple pixels-value adjustment with encoding function (MPA) to further improve the comprehensive performance, which is well in both hiding capacity and stego-image quality. The main idea is to dividen adjacent cover pixels into two sub-groups and implement multi-bit-based modulus operations in each group, respectively. The efficacy of this proposed is evaluated by peak signal-to-noise ratio (PSNR), embedding payload, structural similarity index (SSIM), and quality index (QI). The recorded PSNR value is 30.01 dB, and embedding payload is 5 bpp (bits per pixel). In addition, the steganalysis tests do not detect this steganography technique.


---

## Body

## 1. Introduction

With the rapid development of the Internet, more and more people transmit messages through the network. But at the same time, they also face the risk of information leakage. Hence, information security is getting high attention. In recent years, many techniques for information security have been researched such as cryptography and data hiding. Cryptography transforms secret information into an incomprehensible form, and the encrypted message looks messy and meaningless. The shortcoming of cryptography is that it is easily detected and then destroyed by the attacker. Unlike cryptography, data hiding ensures that there is no easily detectable change in the carrier of the hidden secret message. This technology can ensure the security of confidential information. One method of data hiding is to embed secret information in the cover image and then generate a stego-image that prevents attackers from stealing it [1]. There are various ways to classify data hiding, which can be divided into spatial domain and frequency domain. In spatial domain-based techniques, the pixel values of the image are directly modified to embed secret information, whereas in frequency domain-based techniques, pixels are transformed into coefficients after changes (e.g., Fourier transform, Laplace transform, and Z-transform). These coefficients are modified to embed secret data. Among these two domains, the spatial domain-based techniques are simple and less time consuming. In this domain, according to whether the stego-image can be recovered after embedding secret data, data hiding can be divided into reversible data hiding [2–6] and irreversible data hiding. Extracting secret data in stego-images also allow recovery of the cover image without distortion, and this method is suitable for some fields with high image requirements, such as medical and military. In contrast, irreversible data hiding cannot restore the cover image, but this method can embed more secret data and is easy to understand and implement.In this paper, we focus on irreversible data hiding. In the past decades, many data hiding methods have been proposed. These methods can be divided into three categories, LSB-based, PVD-based, and EMD-based. Firstly, least significant bit (LSB)-based method embeds secret data through the least significant bits of cover pixels, which is the simplest and most direct approach. LSB is simple to implement, but the generated stego-images may draw suspicion or be easily detected. In an image, the texture region can hide more secret data compared to the smooth region. Therefore, the goal of the pixel value difference (PVD)-based method is to hide less secret data in the smooth region and embed more secret data in the texture region. For this target, scholars have proposed many variants of PVD [7, 8] or combined PVD with methods such as LSB [9, 10] or modulus functions. The last type is exploiting modified direction (EMD)-based method, using special equations or modulus functions to embed secret data. In 2006, Zhang and Wang [11] proposed EMD by making full use of the modulus function to change the directional characteristics. The EMD method uses a function to embed secret data transformed in the (2n + 1)-ary notational system in n cover pixels. When n = 2, EMD can achieve the maximum embedding payload of 1.16 bpp. To improve the embedding capability, many data hiding techniques based on EMD methods have been proposed [12]. In 2007, Lee et al. [13] proposed the improved EMD (IEMD) method to embed secret data using modulus function. The embedding payload of IEMD is improved from 1.16 bpp to 1.5 bpp. However, the fixed number of cover pixels and weights in each group leads to this scheme being less flexible, which is weak against steganalysis. In 2009, Jung [14] proposed JY, which uses function to embed n secret data transformed in the (2n + 1)-ary notational system into 1 cover pixel, increasing the single-pixel embedding payload to 2 bpp. In 2013, Kuo and Wang [15] proposed generalized exploiting modification direction (GEMD) method. The scheme is an extension of IEMD. Extending the fixed weights to vary with n, the method has an embedding payload of 2 bpp. In 2015, Kuo et al. [16] proposed the KKWW scheme to optimize the parameters and modulus function of GEMD. The simulation results showed that the scheme is feasible. In 2019, Sairam and Boopathybagan [17] proposed SB algorithm to carry secret data using other notational system. The maximum embedding payload of this method is 4 bpp. To improve the embedding capacity, in 2020, Zhang et al. [18] proposed the modulus calculations on prime number algorithm (MOPNA). This method is based on the modulo operation of prime numbers. The embedding payload of this algorithm is increased to 3.5 bpp.To further increase the embedding payload of per pixel while ensuring the quality of stego-image, this paper proposes a high-capacity data hiding scheme MPA. The main contributions of this paper are summarized as follows.(1)
In this paper, we propose a new scheme that adopts the grouping technique of cover pixel groups and uses modulus function for secret data embedding which improves the capacity of data hiding. With this method, the embedding payload can reach 5 bpp, while the quality of the stego-image is still acceptable (PSNR > 30 dB).(2)
The correctness of the MPA scheme was demonstrated with mathematical and the experimental results which proved the performance and safety of the MPA scheme.(3)
To make it easier for other scholars to verify the work, we have uploaded all the code and other materials athttps://github.com/SunJie0916/MPA.The rest of this paper is organized as follows. Section2 will show the related work. The new algorithm MPA and its math proofs are presented in Section 3. Section 4 provides the experimental details and results of MPA. Finally, a conclusion is given in Section 5.


## 2. Related Work

### 2.1. Exploiting Modified Direction (EMD) Algorithm

Zhang et al. proposed EMD, which embeds the secret digitS2n+1 transformed in the (2n + 1)-ary notational system into n cover pixels. The payload of EMD is log22n+1/n, up to 1.16 bpp when n = 2. There is room to improve. And the algorithm is as follows. The inputs of EMD are n cover pixels Gg1,g2,…,gn and S2n+1. The output is G′g1′,g2′,…,gn′.Step 1. Calculate the extraction function in fEMDG=∑i=1ni×gimod2n+1.Step 2.G′ is obtained as follows.G′=GD=S2n+1−fEMDGmod2n+1ifD>0 and D≤n, then gD′=gD+1elsegD′=g2n+1−D−1Step 3. Calculate fEMDG′ to get the secret data.


### 2.2. Improved EMD (IEMD) Algorithm

In 2007, Lee et al. proposed a data hiding algorithm IEMD. Its embedding payload of IEMD is 3 bpp. More detailed steps are shown below. The inputs of IEMD are a pixel pairGg1,g2 and decimal digit S10 which is transformed from 3 binary bit secret data. The output is G′g1′,g2′.Step 1. Calculate using fIEMDG=1×g1+3×g2mod8.Step 2.G′g1′,g2′ is obtained as follows.ifS10=fIEMDg1,g2, then g1′=g1 and g2′=g2else ifS10=fIEMDg1+1,g2, then g1′=g1+1 and g2′=g2else ifS10=fIEMDg1−1,g2then g1′=g1−1 and g2′=g2else ifS10=fIEMDg1,g2+1, then g1′=g1 and g2′=g2+1else ifS10=fIEMDg1,g2−1, then g1′=g1 and g2′=g2−1else ifS10=fIEMDg1+1,g2−1, then g1′=g1+1 and g2′=g2−1else ifS10=fIEMDg1−1,g2+1, then g1′=g1−1 and g2′=g2+1Step 3. Calculate fIEMDG′ to get the secret data.


### 2.3. JY

Jung et al. proposed the JY algorithm. The payload of the algorithm is up to 2 bpp. The details of JY are shown as follows. The inputs of JY are 1 cover pixelGg and n binary bit secret data. The output is stego-pixel G′g′.Step 1. Calculate fJYG=gmod2n+1.Step 2. Based on the value of gchoose the range of x that satisfies the requirements of the following equation and bring it in order to calculate d=g+xmod2n+1. And choose the x that satisfies fJYG=d, and then g′=g+x.if0≤g≤1then xε0,2n+1else if254≤g≤255, xε−2n+1,0elsexε−2n+1,2n+1Step 3. Calculate fJYG′ to get the secret data.


### 2.4. Generalized Exploiting Modification Direction (GEMD) Algorithm

In 2013, Kuo and Wang proposed the GEMD algorithm, which is an extended version of the IEMD scheme. The embedding payload of GEMD can reach 1.5 bpp. The inputs of GEMD aren adjacent pixels Gg1,g2,…,gn and decimal digit S10 which is transformed from n + 1 binary bit secret data. The output is n stego-pixels G′g1′,g2′,…,gn′.Step 1. Calculate fGEMDG=∑i=1n2i−1×gimod2n+1.Step 2.G′g1′,g2′,…,gn′ is obtained as follows.G′=G, D=S10−fGEMDGmod2n+1.ifD==2n, then g1′=g1+1, gn′=gn+1else if0<D<2n, transform D to dn…d1d02 and for i = n down to 1 doifdi==0 and di−1==1, then gi′=gi+1ifdi==1 and di−1==0, then gi′=gi−1else if2n<D<2n+1, transform 2n+1−D to dn…d1d02, for i = n down to 1 doifdi==0 and di−1==1, then gi′=gi−1ifdi==1 and di−1==0, then gi′=gi+1Step 3. Calculate fGEMDG′ to get the secret data.


### 2.5. KKWW

KKWW was proposed by Kuo et al. in 2015. It is a high-capacity data hiding scheme based on multi-bit encoding function. The embedding payload of this scheme is up to 4.25 bpp. The details of KKWW are shown as follows. The inputs of KKWW aren adjacent pixels Gg1,g2,…,gn and decimal data S10 which is transformed from nk + 1 binary bit secret data. The output is n stego-pixels G′g1′,g2′,…,gn′.Step 1. Calculate fKKWWG=∑i=1nci×gimod2nk+1, whereci=1,i=12kci−1+1,i≠1andi>0.Step 2.G′g1′,g2′,…,gn′ is obtained as follows.G′=G, D=S10−fKKWWGmod2nk+1ifD=0, G′=GifD=2nk, gn′=gn+2k−1, g1′=g1+1ifD<2nktransformD to dn−1…d1d02k and for each i in nn−1,n−2,…,0 dogi+1′=gi+1+di; gi′=gi−di, if i>0ifD＞2nktransform2nk+1−D to dn−1…d1d02k and for each i in nn−1,n−2,…,0 dogi+1′=gi+1−di; gi′=gi+di, if i>0Step 3. Calculate fKKWWG′ to get the secret data.


### 2.6. SB

In 2019, Sairam proposed a high-capacity information hiding scheme SB. The embedding payload of SB can reach 3 bpp. More detailed steps are shown below. The inputs of SB are pixelGg and n2-ary notational system digit Sn2 which is transformed from n binary bit secret data. The output is stego-pixels G′g′.Step 1. By the steps below to find the variable x and obtain g′ for −⌊n2/2⌋≤x≤⌊n2/2⌋ {f=g+xmodn2if (f==Sn2){g′=g+xbreak}}Step 2. Calculate Sn2=g′modn2 to get the secret data.


### 2.7. Modulus Calculations on Prime Number (MOPNA) Algorithm

In 2020, Zhang et al. proposed MOPNA, a method for modulo computation using prime numbersCc0,c1. This method uses a function (changes in pixel values, CPV) to measure the effect of embedding. The maximum embedding payload of MOPNA is 3.5 bpp. More details are shown as follows. The inputs of MOPNA are a pixel pair Gg1,g2 and decimal digit data S10 which is transformed from 2n + 1 binary bit secret data. The output is stego-pixels G′g1′,g2′.Step 1. Calculate fMOPNAG=C∗GTmod22n+1.Step 2. Choose the variable X that satisfies the following equation and G′=G+X:X=x0,x1|d=fG+Xand∀X′,X′≠X:CPVG+X,G≥CPVG+X′,Gandx0,x1ϵ−255,255Step 3. Calculate fMOPNAG′ to get the secret data.


## 2.1. Exploiting Modified Direction (EMD) Algorithm

Zhang et al. proposed EMD, which embeds the secret digitS2n+1 transformed in the (2n + 1)-ary notational system into n cover pixels. The payload of EMD is log22n+1/n, up to 1.16 bpp when n = 2. There is room to improve. And the algorithm is as follows. The inputs of EMD are n cover pixels Gg1,g2,…,gn and S2n+1. The output is G′g1′,g2′,…,gn′.Step 1. Calculate the extraction function in fEMDG=∑i=1ni×gimod2n+1.Step 2.G′ is obtained as follows.G′=GD=S2n+1−fEMDGmod2n+1ifD>0 and D≤n, then gD′=gD+1elsegD′=g2n+1−D−1Step 3. Calculate fEMDG′ to get the secret data.


## 2.2. Improved EMD (IEMD) Algorithm

In 2007, Lee et al. proposed a data hiding algorithm IEMD. Its embedding payload of IEMD is 3 bpp. More detailed steps are shown below. The inputs of IEMD are a pixel pairGg1,g2 and decimal digit S10 which is transformed from 3 binary bit secret data. The output is G′g1′,g2′.Step 1. Calculate using fIEMDG=1×g1+3×g2mod8.Step 2.G′g1′,g2′ is obtained as follows.ifS10=fIEMDg1,g2, then g1′=g1 and g2′=g2else ifS10=fIEMDg1+1,g2, then g1′=g1+1 and g2′=g2else ifS10=fIEMDg1−1,g2then g1′=g1−1 and g2′=g2else ifS10=fIEMDg1,g2+1, then g1′=g1 and g2′=g2+1else ifS10=fIEMDg1,g2−1, then g1′=g1 and g2′=g2−1else ifS10=fIEMDg1+1,g2−1, then g1′=g1+1 and g2′=g2−1else ifS10=fIEMDg1−1,g2+1, then g1′=g1−1 and g2′=g2+1Step 3. Calculate fIEMDG′ to get the secret data.


## 2.3. JY

Jung et al. proposed the JY algorithm. The payload of the algorithm is up to 2 bpp. The details of JY are shown as follows. The inputs of JY are 1 cover pixelGg and n binary bit secret data. The output is stego-pixel G′g′.Step 1. Calculate fJYG=gmod2n+1.Step 2. Based on the value of gchoose the range of x that satisfies the requirements of the following equation and bring it in order to calculate d=g+xmod2n+1. And choose the x that satisfies fJYG=d, and then g′=g+x.if0≤g≤1then xε0,2n+1else if254≤g≤255, xε−2n+1,0elsexε−2n+1,2n+1Step 3. Calculate fJYG′ to get the secret data.


## 2.4. Generalized Exploiting Modification Direction (GEMD) Algorithm

In 2013, Kuo and Wang proposed the GEMD algorithm, which is an extended version of the IEMD scheme. The embedding payload of GEMD can reach 1.5 bpp. The inputs of GEMD aren adjacent pixels Gg1,g2,…,gn and decimal digit S10 which is transformed from n + 1 binary bit secret data. The output is n stego-pixels G′g1′,g2′,…,gn′.Step 1. Calculate fGEMDG=∑i=1n2i−1×gimod2n+1.Step 2.G′g1′,g2′,…,gn′ is obtained as follows.G′=G, D=S10−fGEMDGmod2n+1.ifD==2n, then g1′=g1+1, gn′=gn+1else if0<D<2n, transform D to dn…d1d02 and for i = n down to 1 doifdi==0 and di−1==1, then gi′=gi+1ifdi==1 and di−1==0, then gi′=gi−1else if2n<D<2n+1, transform 2n+1−D to dn…d1d02, for i = n down to 1 doifdi==0 and di−1==1, then gi′=gi−1ifdi==1 and di−1==0, then gi′=gi+1Step 3. Calculate fGEMDG′ to get the secret data.


## 2.5. KKWW

KKWW was proposed by Kuo et al. in 2015. It is a high-capacity data hiding scheme based on multi-bit encoding function. The embedding payload of this scheme is up to 4.25 bpp. The details of KKWW are shown as follows. The inputs of KKWW aren adjacent pixels Gg1,g2,…,gn and decimal data S10 which is transformed from nk + 1 binary bit secret data. The output is n stego-pixels G′g1′,g2′,…,gn′.Step 1. Calculate fKKWWG=∑i=1nci×gimod2nk+1, whereci=1,i=12kci−1+1,i≠1andi>0.Step 2.G′g1′,g2′,…,gn′ is obtained as follows.G′=G, D=S10−fKKWWGmod2nk+1ifD=0, G′=GifD=2nk, gn′=gn+2k−1, g1′=g1+1ifD<2nktransformD to dn−1…d1d02k and for each i in nn−1,n−2,…,0 dogi+1′=gi+1+di; gi′=gi−di, if i>0ifD＞2nktransform2nk+1−D to dn−1…d1d02k and for each i in nn−1,n−2,…,0 dogi+1′=gi+1−di; gi′=gi+di, if i>0Step 3. Calculate fKKWWG′ to get the secret data.


## 2.6. SB

In 2019, Sairam proposed a high-capacity information hiding scheme SB. The embedding payload of SB can reach 3 bpp. More detailed steps are shown below. The inputs of SB are pixelGg and n2-ary notational system digit Sn2 which is transformed from n binary bit secret data. The output is stego-pixels G′g′.Step 1. By the steps below to find the variable x and obtain g′ for −⌊n2/2⌋≤x≤⌊n2/2⌋ {f=g+xmodn2if (f==Sn2){g′=g+xbreak}}Step 2. Calculate Sn2=g′modn2 to get the secret data.


## 2.7. Modulus Calculations on Prime Number (MOPNA) Algorithm

In 2020, Zhang et al. proposed MOPNA, a method for modulo computation using prime numbersCc0,c1. This method uses a function (changes in pixel values, CPV) to measure the effect of embedding. The maximum embedding payload of MOPNA is 3.5 bpp. More details are shown as follows. The inputs of MOPNA are a pixel pair Gg1,g2 and decimal digit data S10 which is transformed from 2n + 1 binary bit secret data. The output is stego-pixels G′g1′,g2′.Step 1. Calculate fMOPNAG=C∗GTmod22n+1.Step 2. Choose the variable X that satisfies the following equation and G′=G+X:X=x0,x1|d=fG+Xand∀X′,X′≠X:CPVG+X,G≥CPVG+X′,Gandx0,x1ϵ−255,255Step 3. Calculate fMOPNAG′ to get the secret data.


## 3. Proposed Method

### 3.1. Multiple Pixels-Value Adjustment with Encoding Function (MPA) Algorithm

Inspired by EMD, IEMD, and KKWW, we design a new scheme MPA to embed secret data into cover images. MPA divides cover image into pixel groups that includen pixels. In the specific embedding process, n pixels are regrouped to get two sub-groups. After that, nk + 2 bits of secret data converted to decimal are grouped accordingly using (1) and embedded into the subgroups. The MPA algorithm can embed up to 5-bit secret data in each pixel and ensure the quality of the stego-image. The detail of the algorithm is described as follows. Figure 1 shows the flowchart of the proposed Algorithm 1 for embedding process. The inputs of MPA are n adjacent pixels Gg1,g2,…,gn and decimal data S10 which is transformed from nk + 2 binary bit secret data s, where n is the number of pixels in a group and k is used to adjust the degree of secret data embedding. The output is n stego-pixels G′g1′,g2′,…,gn′.Figure 1
Flowchart of the proposed algorithm for data embedding process.Algorithm 1: Embedding algorithm of MPA.
Step 1. Divide n adjacent pixels into two groups G1g1,g2,…,gm1 and G2I1,I2,…,Im2, where m1+m2=n.Step 2. Transform s into decimal S10 by formula S10=2nk+1×snk+1+2nk×snk+⋯+21×s1+s0.Step 3. Construct the Algorithm 1, where α, β are integers and β＜2m1k+1.S10=α×2m1k+1+βStep 4. Bring G1 into Algorithm 1 and obtain fG1fG1=∑i=1m1ci×gimod2m1k+1Whereci=1,i=12kci−1+1,i≠1andi>0Step 5. Calculate the difference D between β into fG1 by Algorithm 1.D=β−fG1mod2m1k+1Step 6.G1′g1′,g2′,…,gm1′ is obtained by embedding β into G1 in the following steps.G1′=G1ifD=0G1′=G1′ifD=2m1kgm1′=gm1+2k−1, g1′=g1+1ifD<2m1ktransformD to dm1−1…d1d02k, for each i in m1−1,m2−2,…,0 dogi+1′=gi+1+digi′=gi−di, if i>0ifD＞2m1ktransform2m1k+1−D to dm1−1…d1d02k, for each i in m1−1,m2−2,…,0gi+1′=gi+1−digi′=gi+di, if i>0Step 7. Bring G2 into Algorithm 1 to calculate fG2 and get the difference D between α and fG2 by D=α−fG2mod2m2k+1. Finally, repeat step 6 to obtain G2′i1′,i2′,…,im2′.Step 8. Merge G1′ and G2′ to get G′.Step 9. Repeat from steps 20 to 27 until all secret data are embedded.According to embedding algorithm, the secret data are embedded in the cover image to get the stego-image. Stego-image is transmitted from the sender to the receiver. The receiver extracts the secret information from the stego-image by the following extraction process. Figure2 shows flowchart of data extracting process.Figure 2
Flowchart of the proposed algorithm for data extracting process.The inputs aren stego-pixels G1′g1′,g2′,…,gm1′ and G2′i1′,i2′,…,im2′. And the output is secret data s.Step 1. Compute the secret β′=fG1′=fg1′,g2′,…,gm1′ and α′=fG2′=fi1′,i2′,…,im2′.Step 2. Convert the value of β′ and α′ to binary and combine them to get s.Step 3. Repeat from steps 30 to step 31 until all secret data are extracted.We use an example to illustrate the embedding process and the extraction process. The specific process is described below (Algorithms 2 and 3).Algorithm 2: Embedding example of MPA.
Input 4 adjacent pixelsG10,19,5,9 and nk+2 = 14 binary secret data s101010110110112.Output 4 stego-pixelsG′12,23,4,9.Step 1. Divide 4 adjacent pixels into two groups G110,19 and G25,9.Step 2. Transform s into decimal S10=10971.Step 3. Construct the 10971=85×27+91 to get α=85 and β=91.Step 4. Bring G1 and G2 into Equation 2 to calculate fG1=f10,19=1×10+19×9mod27=53, fG2=f5,9=1×5+9×9mod27=86.Step 5. Calculate D=β−fG1=91−53mod27=38 by Algorithm 1.Step 6.G1′12,23 is obtained by embedding β into G1 in the following steps.D=38<2m1k=64,transform38 to 468, d1,d0=4,6,ford1=4, g2′=g2+d1=19+4=23, g1′=g1−d1=10−4=6, g2,g1=23,6,ford0=6, g1′=g1+d0=6+6=12,getG1′12,23.Step 7. Bring G2 into Algorithm 1 to calculate fG2=127 and get the difference D between α and fG2 by D=α−fG2=85−86mod27=127.D=127>2m1k=64,transform2m1k+1−D=128−127=1 to 18, d1,d0=0,1,ford1=0, i2′=9, i1′=5,ford0=1, i1′=4,getG2′4,9.Step 8. Merge G1′ and G2′ to get G′12,23,4,9.Algorithm 3: Extraction example of MPA.
Input Stego-pixelsG1′12,23 and G2′9,4.Output Secret datas10101011011011.Step 1. Compute the secret β′=fG1′=f12,23=91 and α′=fG2′=f4,9=85.Step 2. Convert the value of β′ and α′ to binary and combine them to get s10101011011011.


### 3.2. Math Proof: The MPA Can Embednk + 2-Bit Secret Data into n Cover Pixels

In this section, we prove thatnk + 2-bit secret data can be split according to the grouping of n cover pixels. In our scheme, the n cover pixels are divided into two groups G1g1,g2,…,gm1, G2i1,i2,…,im2, and m1+m2=n.∵ When s has nk + 2 secret data, the decimal S10∈0,2nk+2.∵2nk+2=2m1+m2k+2=2m1k+1+2m2k+1, α<2m2k+1.∴ It is easy to know that S10 can be uniquely represented, S10=α×2m1k+1+β, where α, β are integers, and β<2m1k+1.∴α, β can be embedded into m2k+1 and m1k+1 cover pixels, respectively.


### 3.3. Math Proof: MPA Can Embed Secret Data into Cover Image Correctly

In this section, we need to prove that regardless of the values ofβ and G1, the values of D must satisfy the four embedding conditions in Step 6. When m1=2 and k=3, the secret data s∈0000000,11111112 and convert to decimal β∈0,12710.∵ With the modulus operator, a+bmodc=amodc+bmodcmodc.∴D=β−fG1mod2m1k+1=βmod128−fG1mod128mod128.∴ Let y=βmod128 and z=fG1mod128, and the original equation can be changed to D=y−zmod128.∵β∈0,127.∴y∈0,127, which is an uncertain variable.∵fG1=∑i=1nci×gimod2m1k+1=1×g1+9×g2mod128, where g1, g2∈0,255, and they are two pixels with definite values.∴fG1 is a constant value and fG1∈0,127.∴z∈0,127, and z is a definite fixed value. ∵D=y−zmod128, y is an uncertain variable taking values from [0, 127], and z is a definite fixed value taking values in the range [0, 127]. D must take values in the range [0, 127]. The range of D must satisfy the four embedding conditions in step 6, so all the secret data must be able to be embedded in the cover image.


### 3.4. Math Proof: MPA Can Extract Secret Data from Stego-Image Correctly

In the previous subsection, we have proved that the range ofD must satisfy the four embedding conditions in step 6. In this section, it is proved that the secret data extracted β′ from the equation must be equal to the embedded secret data β. That is, β′=fG1′=fg1′,g2′,…,gm1′=β. When m1=2 and k=3, (1)
ifD=0, then gi′=gi(1)∴β′=fG1′=fg1,g2=β,(2)
ifD=2m1k=64, then g2′=g2+23−1, g1′=g1+1(2)∴β′=fG1′=1×g1′+9×g2′mod27=1×g1+1+9×g2+23−1mod27=1×g1+9×g2mod27+64mod27mod27=fG1mod27+64mod27∵fG1∈0,127∴β′=fG1′=fG1+64=fG+D=fG+β−fG=β,(3)
ifD<2m1k, then transform D to d1d08, and g1′=g1−d1+d0, g2′=g2+d1(3)∴β′=fG1′=1×g1′+9×g2′mod27=1×g1−d1+d0+9×g2+d1mod27=1×g1+9×g2mod27+8d1+d0mod27,∵8d1+d0 is to convert d1d0 from octal to decimal, and fG1′∈0,127(4)∴β′=fG1′=fG1+Dmod27=fG1+β−fG=β,(4)
ifD>2m1k, then transform D′=2m1k+1−D to d1d08 and g1′=g1+d1−d0, g2′=g2−d1(5)∴β′=fG1′=fg1′,g2′=1×g1′+9×g2′mod27=1×g1+d1−d0+9×g2−d1mod27=1×g1+9×g2mod27−8d1+d0mod27∴β′=fG1′=fG1−D′mod27=fG1−27+Dmod27=fG1+Dmod27−27mod27mod27=fG1+Dmod27=fG1+β−fG1mod27=β.Therefore, the algorithm can recover the secret data from stego-images.


### 3.5. Experimental Results and Security Analysis

In this section, we test the proposed algorithm and present the results. Our method and other algorithms are implemented in Python. And the hardware conditions for the experiments are based on a personal PC with Intel(R) Core(TM) i7-10700 CPU @ 2.90 GHz and 16-GB RAM. The operating system is Windows 10 Professional 64 bits, and the experiment software is PyCharm. The images used for the experiments are a series of grayscale images of standard size256∗256 (Baboon, Barbara, Boat, F-16, Goldhill, Lena, Pepper, and Tiffany) [19], which are shown in Figure 3.Figure 3
Eight256∗256 grayscale images (Baboon, Barbara, Boat, F-16, Goldhill, Lena, Pepper, and Tiffany).The performance of method in this paper includes stego-image quality, payload, PSNR, SSIM, QI, and several steganalysis test.


### 3.6. The Quality of Stego-Image

In this experiment, the number of secret data (NCD) bits is set as 262144 bits and 327680 bits. Whenn = 2 and k = 3, the payload of MPA is 4 bpp. There are 256 × 256 = 65536 pixels available for embedding secret data. The largest number of secret data bits that can be embedded on a cover image is 65536×4=262144. Another set of NCD data is chosen with bpp = 5. Figure 4 shows the stego-images when the length of secret data is 262144 bits. Figure 5 shows the stego-images when the length of secret data is 327680 bits.Figure 4
The eight stego-images under the numbers of secret data bits are 262144 bits (bpp = 4).Figure 5
The eight stego-images under the numbers of secret data bits are 327680 bits (bpp = 5).It is clearly shown that it is difficult to detect the difference between the cover images and the stego-images with the human visual system. Hiding the information in the image to ensure that it will not be detected by the attacker is exactly what data hiding techniques do.


### 3.7. Payload

Payload is the number of secret data bits that can be embedded into per pixel (bpp). The straightforward formula is defined in(6)Payload=allsecredatabitsallcoverpixelsbpp.A higher bpp represents more secret data that can be embedded in a pixel. On the contrary, a low bpp represents poor embedding efficiency. The embedding scheme’s characteristics including adjacent pixel in a group, number of embedding bits for each group, and payload (bpp) are summarized in Table1. In this table, n is the number of pixels in a group and k is used to adjust the degree of secret data embedding. For MPA, n = 2, k = 2,3,4, and n = 4, k = 2,3,4 in experiments.Table 1
Eight algorithms’ payload.
Number of adjacent pixels in a groupEmbedding bits for each groupPayload (bpp)EMDnlog22n+1log22n+1/nIEMD231.5JY122GEMDnn + 1n+1/nKKWWnnk + 1nk+1/nSB1KkMOPNA22k + 12k+1/2MPAnnk + 2nk+2/nThe number of adjacent pixels in a group is different for each data hiding scheme. Three aren, 2, 1, n, n, 1, 2, n adjacent pixels in a group of EMD, IEMD, JY, GEMD, KKWW, SB, MOPNA, and MPA, respectively. EMD, IEMD, JY, GEMD, KKWW, SB, MOPNA, and MPA can carry log22n+1, 3, 2, n + 1, nk + 1, k, 2k + 1, and nk + 2 bits. And then, the specific payload of the above algorithm is shown in Table 1.We calculate their specific values and express them in Figure6. In Figure 6, it can be observed that the bpp of the algorithms tends to increase as n or k decreases. And we can find that the MPA algorithm can achieve a maximum embedding payload of 5 bpp.Figure 6
Compare eight algorithms’ payload.


### 3.8. PSNR, SSIM, and QI

PSNR is a major metric in the field of information security, and many studies use it to evaluate the performance of information hiding methods. PSNR> 40 dB means the difference between cover image and stego-image is small and the secret information hidden in it is not easily detected. 40 dB > PSNR > 30 dB means that the quality of stego-image is acceptable. PSNR < 30 dB means that the quality of stego-image is poor and the secret information hidden in it has been detected and attacked. In the field of information hiding, the secret data hidden in the stego-image is not perceived by the human visual system when PSNR > 30 dB. The equation of PSNR is shown in equations (5) and (6).(7)PSNR=10log102552MSEdBMSE=1M×N∑i=1N∑j=1Mgij−gij′,where PSNR is measured in dB, M and N represent the length and width of the image, gij represents the pixel value at position i,j of the cover image, and gij′ represents the pixel value at position i,j of the stego-image. SSIM is another metric used to show the similarity between the cover image and the stego-image. The value of SSIM is between 0 and 1. The closer to 1 means that the stego-image is similar to the cover image. Its calculation is presented in equation (7).(8)SSIMx,y=2μoμs+c12σos+c2μo2+μs2+c1σo2+σs2+c2,where o and s represent the cover image and the stego-image. c1 and c2 are the constants. μo and μs are the mean. σos is the covariance. μo2 and μs2 are variances, and σo2 and σs2 are the standard deviations for the corresponding o and s. QI is used to measure the equivalence of the stego-image with the cover image, and its value is estimated using equation (8) [20].(9)QI=4×P¯×Q¯×∑i=1m∑j=1ngij−P¯×gij′−Q¯∑i=1m∑j=1ngij−P¯2+∑i=1m∑j=1ngij′−Q¯2×P¯2+Q¯2,where P¯ represents the average pixel value of the cover image and Q¯ represents the average pixel value of the stego-image.In order to compare and analyze the comprehensive performance of the algorithms proposed, we compare MPA with a total of seven other algorithms. In our experiments, the NCD is set as 49000 bits and 98305 bits, respectively. Among all the compared algorithms, EMD has the lowest embedding capacity. The payload of the EMD is 0.79 bpp when there are 4 adjacent pixels in each group (n = 4). There are 256 × 256 = 65536 pixels available for embedding secret data. The maximal number of bits of secret data which can be embedded is ⌊65536/2⌋×⌊0.79×4⌋=49152. For comparison with EMD, NCD = 49000 is selected for comparison.When NCD = 49000 bits, the PSNR, SSIM, and QI of the eight algorithms are shown in Table2. It is obvious that when n = 4, EMD has the highest PSNR = 54.66 dB, but it has the lowest payload. IEMD (1.5 bpp), JY (2 bpp), and GEMD (highest payload 1.5 bpp) have better PSNR performance, but the highest payload is lower than MPA. For methods such as KKWW, SB, MOPNA, and MPA, lower k values bring lower embedded payload but good PSNR performance; on the contrary, higher k values bring higher embedded payload but poor PSNR performance. When n = 1, k = 3, SB has the highest payload of 3 bpp, but PSNR = 39.89 dB performs less than MPA (3 bpp, PSNR = 42.54 dB). When n = 2, k = 2, MOPNA has a payload of 2.5 bpp, but PSNR = 42.79 dB performs less than MPA (2.5 bpp, PSNR = 43.15 dB). When n = 2, k = 3, the highest payload of MOPNA is 3.5 bpp and PSNR = 37.93 dB. MPA performs slightly lower than MOPNA and KKWW (PSNR = 36.58 dB), but the highest payload of MPA is higher than MOPNA. The payload of KKWW is different from MPA when n is different from k. For a more intuitive comparison, we plot Figure 7. It can be observed that the PSNR curve of MPA generally performs better than that of KKWW from Figure 7. And only when MPA reaches the highest payload of 5 bpp, it still has good stego-image quality (PSNR = 30.01 dB). In conclusion, MPA does better when the embedded payload and stego-image quality metrics are combined.Table 2
Experimental results when NCD = 49000 bits.
MethodBaboonBarbaraBoatF-16GoldhillLenaPepperTiffanyAverageSSIMQI(Average)(Average)EMDn = 252.1252.1252.1152.1052.1052.1052.1052.1252.110.99990.9999EMDn = 454.6754.6454.6554.6454.6454.6854.6554.6754.660.99990.9999IEMD50.1650.2150.1750.1750.1550.2050.1850.1950.180.99990.9999JY41.4341.4541.4241.4341.4641.4641.4441.4541.440.99930.9992GEMD50.9951.0151.0250.9951.0451.0151.0250.9951.010.99820.9999KKWWn = 2 k = 243.1543.1543.1643.0943.1443.2343.1143.1643.150.99930.9997KKWWn = 2 k = 337.2937.2737.2037.2937.1837.1837.2537.2237.240.99740.9992KKWWn = 4 k = 243.7943.7843.7343.6843.7343.7943.7143.7343.740.99910.9997KKWWn = 4 k = 337.2937.2737.237.2937.1837.1837.2537.2237.240.99730.9993KKWWn = 4 k = 430.9931.0731.0331.0331.0631.0230.9230.9831.010.98770.9977SBn = 1 k = 246.3346.3646.3646.3946.4146.3646.3146.3446.360.99700.9998SBn = 1 k = 339.9039.939.8239.9239.8339.8639.9639.9139.890.98980.9996MOPNAn = 2 k = 243.9443.9743.8943.9343.9643.9534.9434.7642.790.99500.9998MOPNAn = 2 k = 337.9837.9437.9337.9537.9737.9937.9837.7237.930.98680.9994MPAn = 2 k = 242.5742.5542.5242.5442.5442.5142.5742.4942.540.99440.9998MPAn = 2 k = 335.7035.6835.7435.6535.7435.6035.6435.6735.800.98190.9992MPAn = 2 k = 430.0130.0530.0229.9930.0030.0130.0130.0230.010.95800.9972MPAn = 4 k = 243.1543.1543.1643.0943.1442.2343.1143.1643.150.99410.9998MPAn = 4 k = 336.6036.6136.6336.5536.6036.5936.5536.5336.580.98270.9993MPAn = 4 k = 430.3830.3630.2730.3130.3030.2630.2930.3030.310.95970.9976Figure 7
Compare PSNR of stego-image when NCD = 49000 bits.In addition to PSNR, the performance of MPA on SSIM and QI metrics also indicates that the quality of stego-images seems to be acceptable even though a large amount of secret data is hidden in the cover images. Whenn = 2, the SSIM values are 0.9944, 0.9819, and 0.9580 for k = 2 to 4, respectively, and the QI values are all around 0.99, which indicate that the quality of the stego-images is good. When n = 4, the SSIM values are 0.9941, 0.9827, and 0.9597 for k = 2 to 4, respectively, and the values of QI are around 0.99, so the stego-images of MPA are imperceptible in nature. No change can be found in the cover image and the stego-image.When NCD = 98305 bits, the simulation results are shown in Table3. In this case, 98305 bits of secret data cannot be embedded by IEMD, GEMD, and EMD. Only the scheme with a payload of at least 2bpp can embed 98305-bit secret data. As observed in Table 3, the highest payload of JY is 2 bpp with PSNR = 37.73 dB lower than the performance of MPA (when 2.5 bpp, PSNR = 43.25 dB). When k = 2,3, the PSNR of SB is lower than that of MPA. The PSNR of MOPNA is slightly higher than MPA when k = 2,3, but the maximum payload of this scheme is 3.5 bpp, which is lower than MPA (5 bpp). To compare KKWW and MPA more intuitively, we plot Figure 8. From the figure, it can be observed that the PSNR curve of MPA performs better than KKWW in general. And only the MPA payload can reach 5 bpp, the quality of the stego-image is still good (PSNR = 30.31 dB). In summary, MPA does better when both payload and stego-image quality are considered.Table 3
Experimental results when NCD = 98305 bits.
MethodBaboonBarbaraBoatF-16GoldhillLenaPepperTiffanyAverageSSIMQI(Average)(Average)JY37.7037.7237.7637.7337.7237.7137.7337.7337.730.99940.9990KKWWn = 2 k = 243.1343.1643.1543.1143.1643.1943.1143.1243.140.99940.9995KKWWn = 4 k = 337.2237.2537.2037.2237.1937.2237.2337.2237.220.99760.9986KKWWn = 4 k = 430.9931.0731.0331.0331.0631.0230.9230.9831.010.98910.9956SBn = 1 k = 246.3646.3846.3846.3946.3746.3646.3446.3446.370.99510.9997SBn = 1 k = 339.8839.8939.8139.9139.8739.8839.9739.8839.890.98190.9992MOPNAn = 2 k = 243.9243.9443.9343.9443.9743.9543.9343.9243.940.99150.9996MOPNAn = 2 k = 337.9637.9337.9537.9637.9537.9837.9537.5537.900.97690.9989MPAn = 2 k = 242.5742.5542.5242.5442.5442.5142.5742.4942.540.98990.9996MPAn = 2 k = 335.7035.6835.7435.6535.7435.6035.6435.6735.680.96550.9984MPAn = 2 k = 430.5030.4930.5130.2030.4530.5630.5030.5230.460.94370.9944MPAn = 4 k = 243.1543.1543.1643.0943.1443.2443.1143.1643.250.98980.9996MPAn = 4 k = 336.5936.6236.6036.5736.6136.5736.5636.5636.590.95360.9991MPAn = 4 k = 430.3630.3730.2530.3330.3130.2830.3030.2930.310.94320.9937Figure 8
Compare PSNR of stego-image when NCD = 98305 bits.Whenn = 2, the SSIM values of MPA are 0.9899, 0.9655,and 0.9437 fork = 2 to 4, respectively, and the values of QI are all around 0.99. Whenn = 4, the SSIM values of MPA were 0.9898, 0.9763,and 0.9567 fork = 2 to 4, respectively, and the values of QI were around 0.99. These indicate that it is difficult to find artificial traces in thestego-images generated by MPA.


### 3.9. Steganalysis

To further illustrate the security of the MPA scheme, we apply a bit-plane attack for testing. Bit-plane attack is a visual attack method to steal information by extracting the bit-plane of an image. In this section, bit-plane attack experiments are performed on cover image Lena and stego-image Lena embedded with 49000-bit secret data.Comparing Figures9 and 10, there is no difference between each bit plane of the stego-image and cover image after the bit-plane attack. That is, the attacker cannot steal the secret data through the bit-plane attack, which shows that the MPA scheme ensures the security of information hiding.Figure 9
Bit-plane attack for cover image. (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.
(a)(b)(c)(d)(e)(f)(g)(h)Figure 10
Bit-plane attack for stego-image when the number of secret data is 49000 bits. (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.
(a)(b)(c)(d)(e)(f)(g)(h)In RS steganalysis,n adjacent pixels (g1,g2,…,gn) are as a group. Then, the discrimination function F, defined as Fg1,g2,…,gn=∑i=1ngi+1−gi, is used to quantify the smoothness or regularity of each pixel group. Finally, the flip function is applied to define three types of pixel groups: regular, singular, and unusable, represented by R, S, and U, respectively. The percentages of all groups of regular and singular with masks M = [1 0 0 1] and –M = [−1 0 0 −1] are represented as Rm, R−m, Sm, and S−m. According the RS attack principle, if R−m−S−m>Rm−Sm, then steganography is detected. If Rm≈R−m>Sm≈S−m, then RS test fails to detect the steganography. Figure 11(a) depicts RS cures for F-16 image (n = 2, k = 2), Figure 11(b) depicts RS cures for Barbara image (n = 2, k = 3), Figure 11(c) depicts RS cures for Boat image (n = 2, k = 4), Figure 11(d) depicts RS cures for Pepper image (n = 4, k = 2), Figure 11(e) depicts RS cures for Lena image (n = 4, k = 3), and Figure 11(f) depicts RS cures for Tiffany image (n = 4, k = 4). The x-axis represents the rate of the total amount of data that MPA can embed under different conditions. For example, when n = 4, k = 2, and bpp = 2.5, the total amount of data that MPA can embed is NCD=⌊256×256/2⌋×⌊2.5×2⌋=163840.Figure 11
RS test to MPA withn = 2,4 and k = 2, 3, 4. (a) F-16 (n = 2, k = 2). (b) Barbara (n = 2, k = 3). (c) Boat (n = 2, k = 4). (d) Pepper (n = 4, k = 2). (e) Lena (n = 4, k = 3). (f).Tiffany (n = 4, k = 4).
(a)(b)(c)(d)(e)(f)They-axis represents the percentage of regular (Rm and R−m) and singular (Sm and S−m) groups. It can be observed from all the subfigures that Rm≈R−m>Sm≈S−m. Thus, the conclusion can be drawn that the RS attack fails to break the proposed scheme.PDH analysis is performed by plotting the PDH graphs. As shown in Figure12, PDH is a two-dimensional curve, where the x-axis represents the difference between two adjacent pixels in each group and the y-axis represents the incidence (frequency) of difference values. In general, the PDH plot of the cover image is kept smooth. If the PDH image of the stego-image has any zigzag shape, then steganography is detected; if not, steganography is not detected. Figure 12 depicts the PDH test of MPA on six cover images, (a) Airplane, (b) Barbara, (c) Boat, (d) Pepper, (e) Lena, and (f) Tiffany. In each of the six images, there are two curves. The blue curve is the cover image, and the orange curve is the stego-image. It can be seen from all the images that the orange curve does not have any zigzag nature. Therefore, the PDH test failed to reveal this proposed technique.Figure 12
The PDH test to MPA on different images withn = 2,4 and k = 2, 3, 4. (a) F-16 (n = 2, k = 2). (b) Barbara (n = 2, k = 3). (c) Boat (n = 2, k = 4). (d) Pepper (n = 4, k = 2). (e) Lena (n = 4, k = 3). (f) Tiffany (n = 4, k = 4).
(a)(b)(c)(d)(e)(f)


## 3.1. Multiple Pixels-Value Adjustment with Encoding Function (MPA) Algorithm

Inspired by EMD, IEMD, and KKWW, we design a new scheme MPA to embed secret data into cover images. MPA divides cover image into pixel groups that includen pixels. In the specific embedding process, n pixels are regrouped to get two sub-groups. After that, nk + 2 bits of secret data converted to decimal are grouped accordingly using (1) and embedded into the subgroups. The MPA algorithm can embed up to 5-bit secret data in each pixel and ensure the quality of the stego-image. The detail of the algorithm is described as follows. Figure 1 shows the flowchart of the proposed Algorithm 1 for embedding process. The inputs of MPA are n adjacent pixels Gg1,g2,…,gn and decimal data S10 which is transformed from nk + 2 binary bit secret data s, where n is the number of pixels in a group and k is used to adjust the degree of secret data embedding. The output is n stego-pixels G′g1′,g2′,…,gn′.Figure 1
Flowchart of the proposed algorithm for data embedding process.Algorithm 1: Embedding algorithm of MPA.
Step 1. Divide n adjacent pixels into two groups G1g1,g2,…,gm1 and G2I1,I2,…,Im2, where m1+m2=n.Step 2. Transform s into decimal S10 by formula S10=2nk+1×snk+1+2nk×snk+⋯+21×s1+s0.Step 3. Construct the Algorithm 1, where α, β are integers and β＜2m1k+1.S10=α×2m1k+1+βStep 4. Bring G1 into Algorithm 1 and obtain fG1fG1=∑i=1m1ci×gimod2m1k+1Whereci=1,i=12kci−1+1,i≠1andi>0Step 5. Calculate the difference D between β into fG1 by Algorithm 1.D=β−fG1mod2m1k+1Step 6.G1′g1′,g2′,…,gm1′ is obtained by embedding β into G1 in the following steps.G1′=G1ifD=0G1′=G1′ifD=2m1kgm1′=gm1+2k−1, g1′=g1+1ifD<2m1ktransformD to dm1−1…d1d02k, for each i in m1−1,m2−2,…,0 dogi+1′=gi+1+digi′=gi−di, if i>0ifD＞2m1ktransform2m1k+1−D to dm1−1…d1d02k, for each i in m1−1,m2−2,…,0gi+1′=gi+1−digi′=gi+di, if i>0Step 7. Bring G2 into Algorithm 1 to calculate fG2 and get the difference D between α and fG2 by D=α−fG2mod2m2k+1. Finally, repeat step 6 to obtain G2′i1′,i2′,…,im2′.Step 8. Merge G1′ and G2′ to get G′.Step 9. Repeat from steps 20 to 27 until all secret data are embedded.According to embedding algorithm, the secret data are embedded in the cover image to get the stego-image. Stego-image is transmitted from the sender to the receiver. The receiver extracts the secret information from the stego-image by the following extraction process. Figure2 shows flowchart of data extracting process.Figure 2
Flowchart of the proposed algorithm for data extracting process.The inputs aren stego-pixels G1′g1′,g2′,…,gm1′ and G2′i1′,i2′,…,im2′. And the output is secret data s.Step 1. Compute the secret β′=fG1′=fg1′,g2′,…,gm1′ and α′=fG2′=fi1′,i2′,…,im2′.Step 2. Convert the value of β′ and α′ to binary and combine them to get s.Step 3. Repeat from steps 30 to step 31 until all secret data are extracted.We use an example to illustrate the embedding process and the extraction process. The specific process is described below (Algorithms 2 and 3).Algorithm 2: Embedding example of MPA.
Input 4 adjacent pixelsG10,19,5,9 and nk+2 = 14 binary secret data s101010110110112.Output 4 stego-pixelsG′12,23,4,9.Step 1. Divide 4 adjacent pixels into two groups G110,19 and G25,9.Step 2. Transform s into decimal S10=10971.Step 3. Construct the 10971=85×27+91 to get α=85 and β=91.Step 4. Bring G1 and G2 into Equation 2 to calculate fG1=f10,19=1×10+19×9mod27=53, fG2=f5,9=1×5+9×9mod27=86.Step 5. Calculate D=β−fG1=91−53mod27=38 by Algorithm 1.Step 6.G1′12,23 is obtained by embedding β into G1 in the following steps.D=38<2m1k=64,transform38 to 468, d1,d0=4,6,ford1=4, g2′=g2+d1=19+4=23, g1′=g1−d1=10−4=6, g2,g1=23,6,ford0=6, g1′=g1+d0=6+6=12,getG1′12,23.Step 7. Bring G2 into Algorithm 1 to calculate fG2=127 and get the difference D between α and fG2 by D=α−fG2=85−86mod27=127.D=127>2m1k=64,transform2m1k+1−D=128−127=1 to 18, d1,d0=0,1,ford1=0, i2′=9, i1′=5,ford0=1, i1′=4,getG2′4,9.Step 8. Merge G1′ and G2′ to get G′12,23,4,9.Algorithm 3: Extraction example of MPA.
Input Stego-pixelsG1′12,23 and G2′9,4.Output Secret datas10101011011011.Step 1. Compute the secret β′=fG1′=f12,23=91 and α′=fG2′=f4,9=85.Step 2. Convert the value of β′ and α′ to binary and combine them to get s10101011011011.


## 3.2. Math Proof: The MPA Can Embednk + 2-Bit Secret Data into n Cover Pixels

In this section, we prove thatnk + 2-bit secret data can be split according to the grouping of n cover pixels. In our scheme, the n cover pixels are divided into two groups G1g1,g2,…,gm1, G2i1,i2,…,im2, and m1+m2=n.∵ When s has nk + 2 secret data, the decimal S10∈0,2nk+2.∵2nk+2=2m1+m2k+2=2m1k+1+2m2k+1, α<2m2k+1.∴ It is easy to know that S10 can be uniquely represented, S10=α×2m1k+1+β, where α, β are integers, and β<2m1k+1.∴α, β can be embedded into m2k+1 and m1k+1 cover pixels, respectively.


## 3.3. Math Proof: MPA Can Embed Secret Data into Cover Image Correctly

In this section, we need to prove that regardless of the values ofβ and G1, the values of D must satisfy the four embedding conditions in Step 6. When m1=2 and k=3, the secret data s∈0000000,11111112 and convert to decimal β∈0,12710.∵ With the modulus operator, a+bmodc=amodc+bmodcmodc.∴D=β−fG1mod2m1k+1=βmod128−fG1mod128mod128.∴ Let y=βmod128 and z=fG1mod128, and the original equation can be changed to D=y−zmod128.∵β∈0,127.∴y∈0,127, which is an uncertain variable.∵fG1=∑i=1nci×gimod2m1k+1=1×g1+9×g2mod128, where g1, g2∈0,255, and they are two pixels with definite values.∴fG1 is a constant value and fG1∈0,127.∴z∈0,127, and z is a definite fixed value. ∵D=y−zmod128, y is an uncertain variable taking values from [0, 127], and z is a definite fixed value taking values in the range [0, 127]. D must take values in the range [0, 127]. The range of D must satisfy the four embedding conditions in step 6, so all the secret data must be able to be embedded in the cover image.


## 3.4. Math Proof: MPA Can Extract Secret Data from Stego-Image Correctly

In the previous subsection, we have proved that the range ofD must satisfy the four embedding conditions in step 6. In this section, it is proved that the secret data extracted β′ from the equation must be equal to the embedded secret data β. That is, β′=fG1′=fg1′,g2′,…,gm1′=β. When m1=2 and k=3, (1)
ifD=0, then gi′=gi(1)∴β′=fG1′=fg1,g2=β,(2)
ifD=2m1k=64, then g2′=g2+23−1, g1′=g1+1(2)∴β′=fG1′=1×g1′+9×g2′mod27=1×g1+1+9×g2+23−1mod27=1×g1+9×g2mod27+64mod27mod27=fG1mod27+64mod27∵fG1∈0,127∴β′=fG1′=fG1+64=fG+D=fG+β−fG=β,(3)
ifD<2m1k, then transform D to d1d08, and g1′=g1−d1+d0, g2′=g2+d1(3)∴β′=fG1′=1×g1′+9×g2′mod27=1×g1−d1+d0+9×g2+d1mod27=1×g1+9×g2mod27+8d1+d0mod27,∵8d1+d0 is to convert d1d0 from octal to decimal, and fG1′∈0,127(4)∴β′=fG1′=fG1+Dmod27=fG1+β−fG=β,(4)
ifD>2m1k, then transform D′=2m1k+1−D to d1d08 and g1′=g1+d1−d0, g2′=g2−d1(5)∴β′=fG1′=fg1′,g2′=1×g1′+9×g2′mod27=1×g1+d1−d0+9×g2−d1mod27=1×g1+9×g2mod27−8d1+d0mod27∴β′=fG1′=fG1−D′mod27=fG1−27+Dmod27=fG1+Dmod27−27mod27mod27=fG1+Dmod27=fG1+β−fG1mod27=β.Therefore, the algorithm can recover the secret data from stego-images.


## 3.5. Experimental Results and Security Analysis

In this section, we test the proposed algorithm and present the results. Our method and other algorithms are implemented in Python. And the hardware conditions for the experiments are based on a personal PC with Intel(R) Core(TM) i7-10700 CPU @ 2.90 GHz and 16-GB RAM. The operating system is Windows 10 Professional 64 bits, and the experiment software is PyCharm. The images used for the experiments are a series of grayscale images of standard size256∗256 (Baboon, Barbara, Boat, F-16, Goldhill, Lena, Pepper, and Tiffany) [19], which are shown in Figure 3.Figure 3
Eight256∗256 grayscale images (Baboon, Barbara, Boat, F-16, Goldhill, Lena, Pepper, and Tiffany).The performance of method in this paper includes stego-image quality, payload, PSNR, SSIM, QI, and several steganalysis test.


## 3.6. The Quality of Stego-Image

In this experiment, the number of secret data (NCD) bits is set as 262144 bits and 327680 bits. Whenn = 2 and k = 3, the payload of MPA is 4 bpp. There are 256 × 256 = 65536 pixels available for embedding secret data. The largest number of secret data bits that can be embedded on a cover image is 65536×4=262144. Another set of NCD data is chosen with bpp = 5. Figure 4 shows the stego-images when the length of secret data is 262144 bits. Figure 5 shows the stego-images when the length of secret data is 327680 bits.Figure 4
The eight stego-images under the numbers of secret data bits are 262144 bits (bpp = 4).Figure 5
The eight stego-images under the numbers of secret data bits are 327680 bits (bpp = 5).It is clearly shown that it is difficult to detect the difference between the cover images and the stego-images with the human visual system. Hiding the information in the image to ensure that it will not be detected by the attacker is exactly what data hiding techniques do.


## 3.7. Payload

Payload is the number of secret data bits that can be embedded into per pixel (bpp). The straightforward formula is defined in(6)Payload=allsecredatabitsallcoverpixelsbpp.A higher bpp represents more secret data that can be embedded in a pixel. On the contrary, a low bpp represents poor embedding efficiency. The embedding scheme’s characteristics including adjacent pixel in a group, number of embedding bits for each group, and payload (bpp) are summarized in Table1. In this table, n is the number of pixels in a group and k is used to adjust the degree of secret data embedding. For MPA, n = 2, k = 2,3,4, and n = 4, k = 2,3,4 in experiments.Table 1
Eight algorithms’ payload.
Number of adjacent pixels in a groupEmbedding bits for each groupPayload (bpp)EMDnlog22n+1log22n+1/nIEMD231.5JY122GEMDnn + 1n+1/nKKWWnnk + 1nk+1/nSB1KkMOPNA22k + 12k+1/2MPAnnk + 2nk+2/nThe number of adjacent pixels in a group is different for each data hiding scheme. Three aren, 2, 1, n, n, 1, 2, n adjacent pixels in a group of EMD, IEMD, JY, GEMD, KKWW, SB, MOPNA, and MPA, respectively. EMD, IEMD, JY, GEMD, KKWW, SB, MOPNA, and MPA can carry log22n+1, 3, 2, n + 1, nk + 1, k, 2k + 1, and nk + 2 bits. And then, the specific payload of the above algorithm is shown in Table 1.We calculate their specific values and express them in Figure6. In Figure 6, it can be observed that the bpp of the algorithms tends to increase as n or k decreases. And we can find that the MPA algorithm can achieve a maximum embedding payload of 5 bpp.Figure 6
Compare eight algorithms’ payload.


## 3.8. PSNR, SSIM, and QI

PSNR is a major metric in the field of information security, and many studies use it to evaluate the performance of information hiding methods. PSNR> 40 dB means the difference between cover image and stego-image is small and the secret information hidden in it is not easily detected. 40 dB > PSNR > 30 dB means that the quality of stego-image is acceptable. PSNR < 30 dB means that the quality of stego-image is poor and the secret information hidden in it has been detected and attacked. In the field of information hiding, the secret data hidden in the stego-image is not perceived by the human visual system when PSNR > 30 dB. The equation of PSNR is shown in equations (5) and (6).(7)PSNR=10log102552MSEdBMSE=1M×N∑i=1N∑j=1Mgij−gij′,where PSNR is measured in dB, M and N represent the length and width of the image, gij represents the pixel value at position i,j of the cover image, and gij′ represents the pixel value at position i,j of the stego-image. SSIM is another metric used to show the similarity between the cover image and the stego-image. The value of SSIM is between 0 and 1. The closer to 1 means that the stego-image is similar to the cover image. Its calculation is presented in equation (7).(8)SSIMx,y=2μoμs+c12σos+c2μo2+μs2+c1σo2+σs2+c2,where o and s represent the cover image and the stego-image. c1 and c2 are the constants. μo and μs are the mean. σos is the covariance. μo2 and μs2 are variances, and σo2 and σs2 are the standard deviations for the corresponding o and s. QI is used to measure the equivalence of the stego-image with the cover image, and its value is estimated using equation (8) [20].(9)QI=4×P¯×Q¯×∑i=1m∑j=1ngij−P¯×gij′−Q¯∑i=1m∑j=1ngij−P¯2+∑i=1m∑j=1ngij′−Q¯2×P¯2+Q¯2,where P¯ represents the average pixel value of the cover image and Q¯ represents the average pixel value of the stego-image.In order to compare and analyze the comprehensive performance of the algorithms proposed, we compare MPA with a total of seven other algorithms. In our experiments, the NCD is set as 49000 bits and 98305 bits, respectively. Among all the compared algorithms, EMD has the lowest embedding capacity. The payload of the EMD is 0.79 bpp when there are 4 adjacent pixels in each group (n = 4). There are 256 × 256 = 65536 pixels available for embedding secret data. The maximal number of bits of secret data which can be embedded is ⌊65536/2⌋×⌊0.79×4⌋=49152. For comparison with EMD, NCD = 49000 is selected for comparison.When NCD = 49000 bits, the PSNR, SSIM, and QI of the eight algorithms are shown in Table2. It is obvious that when n = 4, EMD has the highest PSNR = 54.66 dB, but it has the lowest payload. IEMD (1.5 bpp), JY (2 bpp), and GEMD (highest payload 1.5 bpp) have better PSNR performance, but the highest payload is lower than MPA. For methods such as KKWW, SB, MOPNA, and MPA, lower k values bring lower embedded payload but good PSNR performance; on the contrary, higher k values bring higher embedded payload but poor PSNR performance. When n = 1, k = 3, SB has the highest payload of 3 bpp, but PSNR = 39.89 dB performs less than MPA (3 bpp, PSNR = 42.54 dB). When n = 2, k = 2, MOPNA has a payload of 2.5 bpp, but PSNR = 42.79 dB performs less than MPA (2.5 bpp, PSNR = 43.15 dB). When n = 2, k = 3, the highest payload of MOPNA is 3.5 bpp and PSNR = 37.93 dB. MPA performs slightly lower than MOPNA and KKWW (PSNR = 36.58 dB), but the highest payload of MPA is higher than MOPNA. The payload of KKWW is different from MPA when n is different from k. For a more intuitive comparison, we plot Figure 7. It can be observed that the PSNR curve of MPA generally performs better than that of KKWW from Figure 7. And only when MPA reaches the highest payload of 5 bpp, it still has good stego-image quality (PSNR = 30.01 dB). In conclusion, MPA does better when the embedded payload and stego-image quality metrics are combined.Table 2
Experimental results when NCD = 49000 bits.
MethodBaboonBarbaraBoatF-16GoldhillLenaPepperTiffanyAverageSSIMQI(Average)(Average)EMDn = 252.1252.1252.1152.1052.1052.1052.1052.1252.110.99990.9999EMDn = 454.6754.6454.6554.6454.6454.6854.6554.6754.660.99990.9999IEMD50.1650.2150.1750.1750.1550.2050.1850.1950.180.99990.9999JY41.4341.4541.4241.4341.4641.4641.4441.4541.440.99930.9992GEMD50.9951.0151.0250.9951.0451.0151.0250.9951.010.99820.9999KKWWn = 2 k = 243.1543.1543.1643.0943.1443.2343.1143.1643.150.99930.9997KKWWn = 2 k = 337.2937.2737.2037.2937.1837.1837.2537.2237.240.99740.9992KKWWn = 4 k = 243.7943.7843.7343.6843.7343.7943.7143.7343.740.99910.9997KKWWn = 4 k = 337.2937.2737.237.2937.1837.1837.2537.2237.240.99730.9993KKWWn = 4 k = 430.9931.0731.0331.0331.0631.0230.9230.9831.010.98770.9977SBn = 1 k = 246.3346.3646.3646.3946.4146.3646.3146.3446.360.99700.9998SBn = 1 k = 339.9039.939.8239.9239.8339.8639.9639.9139.890.98980.9996MOPNAn = 2 k = 243.9443.9743.8943.9343.9643.9534.9434.7642.790.99500.9998MOPNAn = 2 k = 337.9837.9437.9337.9537.9737.9937.9837.7237.930.98680.9994MPAn = 2 k = 242.5742.5542.5242.5442.5442.5142.5742.4942.540.99440.9998MPAn = 2 k = 335.7035.6835.7435.6535.7435.6035.6435.6735.800.98190.9992MPAn = 2 k = 430.0130.0530.0229.9930.0030.0130.0130.0230.010.95800.9972MPAn = 4 k = 243.1543.1543.1643.0943.1442.2343.1143.1643.150.99410.9998MPAn = 4 k = 336.6036.6136.6336.5536.6036.5936.5536.5336.580.98270.9993MPAn = 4 k = 430.3830.3630.2730.3130.3030.2630.2930.3030.310.95970.9976Figure 7
Compare PSNR of stego-image when NCD = 49000 bits.In addition to PSNR, the performance of MPA on SSIM and QI metrics also indicates that the quality of stego-images seems to be acceptable even though a large amount of secret data is hidden in the cover images. Whenn = 2, the SSIM values are 0.9944, 0.9819, and 0.9580 for k = 2 to 4, respectively, and the QI values are all around 0.99, which indicate that the quality of the stego-images is good. When n = 4, the SSIM values are 0.9941, 0.9827, and 0.9597 for k = 2 to 4, respectively, and the values of QI are around 0.99, so the stego-images of MPA are imperceptible in nature. No change can be found in the cover image and the stego-image.When NCD = 98305 bits, the simulation results are shown in Table3. In this case, 98305 bits of secret data cannot be embedded by IEMD, GEMD, and EMD. Only the scheme with a payload of at least 2bpp can embed 98305-bit secret data. As observed in Table 3, the highest payload of JY is 2 bpp with PSNR = 37.73 dB lower than the performance of MPA (when 2.5 bpp, PSNR = 43.25 dB). When k = 2,3, the PSNR of SB is lower than that of MPA. The PSNR of MOPNA is slightly higher than MPA when k = 2,3, but the maximum payload of this scheme is 3.5 bpp, which is lower than MPA (5 bpp). To compare KKWW and MPA more intuitively, we plot Figure 8. From the figure, it can be observed that the PSNR curve of MPA performs better than KKWW in general. And only the MPA payload can reach 5 bpp, the quality of the stego-image is still good (PSNR = 30.31 dB). In summary, MPA does better when both payload and stego-image quality are considered.Table 3
Experimental results when NCD = 98305 bits.
MethodBaboonBarbaraBoatF-16GoldhillLenaPepperTiffanyAverageSSIMQI(Average)(Average)JY37.7037.7237.7637.7337.7237.7137.7337.7337.730.99940.9990KKWWn = 2 k = 243.1343.1643.1543.1143.1643.1943.1143.1243.140.99940.9995KKWWn = 4 k = 337.2237.2537.2037.2237.1937.2237.2337.2237.220.99760.9986KKWWn = 4 k = 430.9931.0731.0331.0331.0631.0230.9230.9831.010.98910.9956SBn = 1 k = 246.3646.3846.3846.3946.3746.3646.3446.3446.370.99510.9997SBn = 1 k = 339.8839.8939.8139.9139.8739.8839.9739.8839.890.98190.9992MOPNAn = 2 k = 243.9243.9443.9343.9443.9743.9543.9343.9243.940.99150.9996MOPNAn = 2 k = 337.9637.9337.9537.9637.9537.9837.9537.5537.900.97690.9989MPAn = 2 k = 242.5742.5542.5242.5442.5442.5142.5742.4942.540.98990.9996MPAn = 2 k = 335.7035.6835.7435.6535.7435.6035.6435.6735.680.96550.9984MPAn = 2 k = 430.5030.4930.5130.2030.4530.5630.5030.5230.460.94370.9944MPAn = 4 k = 243.1543.1543.1643.0943.1443.2443.1143.1643.250.98980.9996MPAn = 4 k = 336.5936.6236.6036.5736.6136.5736.5636.5636.590.95360.9991MPAn = 4 k = 430.3630.3730.2530.3330.3130.2830.3030.2930.310.94320.9937Figure 8
Compare PSNR of stego-image when NCD = 98305 bits.Whenn = 2, the SSIM values of MPA are 0.9899, 0.9655,and 0.9437 fork = 2 to 4, respectively, and the values of QI are all around 0.99. Whenn = 4, the SSIM values of MPA were 0.9898, 0.9763,and 0.9567 fork = 2 to 4, respectively, and the values of QI were around 0.99. These indicate that it is difficult to find artificial traces in thestego-images generated by MPA.


## 3.9. Steganalysis

To further illustrate the security of the MPA scheme, we apply a bit-plane attack for testing. Bit-plane attack is a visual attack method to steal information by extracting the bit-plane of an image. In this section, bit-plane attack experiments are performed on cover image Lena and stego-image Lena embedded with 49000-bit secret data.Comparing Figures9 and 10, there is no difference between each bit plane of the stego-image and cover image after the bit-plane attack. That is, the attacker cannot steal the secret data through the bit-plane attack, which shows that the MPA scheme ensures the security of information hiding.Figure 9
Bit-plane attack for cover image. (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.
(a)(b)(c)(d)(e)(f)(g)(h)Figure 10
Bit-plane attack for stego-image when the number of secret data is 49000 bits. (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.
(a)(b)(c)(d)(e)(f)(g)(h)In RS steganalysis,n adjacent pixels (g1,g2,…,gn) are as a group. Then, the discrimination function F, defined as Fg1,g2,…,gn=∑i=1ngi+1−gi, is used to quantify the smoothness or regularity of each pixel group. Finally, the flip function is applied to define three types of pixel groups: regular, singular, and unusable, represented by R, S, and U, respectively. The percentages of all groups of regular and singular with masks M = [1 0 0 1] and –M = [−1 0 0 −1] are represented as Rm, R−m, Sm, and S−m. According the RS attack principle, if R−m−S−m>Rm−Sm, then steganography is detected. If Rm≈R−m>Sm≈S−m, then RS test fails to detect the steganography. Figure 11(a) depicts RS cures for F-16 image (n = 2, k = 2), Figure 11(b) depicts RS cures for Barbara image (n = 2, k = 3), Figure 11(c) depicts RS cures for Boat image (n = 2, k = 4), Figure 11(d) depicts RS cures for Pepper image (n = 4, k = 2), Figure 11(e) depicts RS cures for Lena image (n = 4, k = 3), and Figure 11(f) depicts RS cures for Tiffany image (n = 4, k = 4). The x-axis represents the rate of the total amount of data that MPA can embed under different conditions. For example, when n = 4, k = 2, and bpp = 2.5, the total amount of data that MPA can embed is NCD=⌊256×256/2⌋×⌊2.5×2⌋=163840.Figure 11
RS test to MPA withn = 2,4 and k = 2, 3, 4. (a) F-16 (n = 2, k = 2). (b) Barbara (n = 2, k = 3). (c) Boat (n = 2, k = 4). (d) Pepper (n = 4, k = 2). (e) Lena (n = 4, k = 3). (f).Tiffany (n = 4, k = 4).
(a)(b)(c)(d)(e)(f)They-axis represents the percentage of regular (Rm and R−m) and singular (Sm and S−m) groups. It can be observed from all the subfigures that Rm≈R−m>Sm≈S−m. Thus, the conclusion can be drawn that the RS attack fails to break the proposed scheme.PDH analysis is performed by plotting the PDH graphs. As shown in Figure12, PDH is a two-dimensional curve, where the x-axis represents the difference between two adjacent pixels in each group and the y-axis represents the incidence (frequency) of difference values. In general, the PDH plot of the cover image is kept smooth. If the PDH image of the stego-image has any zigzag shape, then steganography is detected; if not, steganography is not detected. Figure 12 depicts the PDH test of MPA on six cover images, (a) Airplane, (b) Barbara, (c) Boat, (d) Pepper, (e) Lena, and (f) Tiffany. In each of the six images, there are two curves. The blue curve is the cover image, and the orange curve is the stego-image. It can be seen from all the images that the orange curve does not have any zigzag nature. Therefore, the PDH test failed to reveal this proposed technique.Figure 12
The PDH test to MPA on different images withn = 2,4 and k = 2, 3, 4. (a) F-16 (n = 2, k = 2). (b) Barbara (n = 2, k = 3). (c) Boat (n = 2, k = 4). (d) Pepper (n = 4, k = 2). (e) Lena (n = 4, k = 3). (f) Tiffany (n = 4, k = 4).
(a)(b)(c)(d)(e)(f)


## 4. Conclusions

In this paper, a new data hiding algorithm MPA is proposed. It groupsn adjacent pixels and completes the secret data grouping accordingly. The secret data are embedded into the pixels using a multi-bit encoding function in each group to achieve high embedding payload and high-quality stego-images. It can be observed from the experiments that the payload and PSNR perform better than the compared techniques. The SSIM and QI are acceptable, which implies that the stego-image generated by MPA is similar to the cover image. This does not make the attacker suspicious of the stego-image. From the results of the bit-plane attack, it is not possible to detect the secret information. 4 curves from the RS test fit the conditions of the attack. Similarly, the PDH curves of the stego-image do not appear zigzag and are consistent with the cover image, which does not disclose the steganographic technique. In the future, we will try to use this algorithm to investigate more applications such as watermarking and image authentication.



---

*Source: 4336526-2022-07-22.xml*