Block-Based Steganographic Algorithm Using Modulus Function and Pixel-Value Differencing

The main purpose in developing the steganographic algorithms lies in achieving most of the steganographic objectives which comprise the embedding capacity, imperceptibility, security, robustness and complexity. In this paper, we propose a high quality steganographic algorithm using new block structure which makes a good use of both modulus function and pixel-value differencing, namely, MF-PVD. We have made many experiments with various test images from several galleries, such as USC-SIPI and UWATERLOO-LINK. The performance of our proposed algorithm is verified using three different performance metrics which include peak signal-to-noise ratio (PSNR), structural similarity index measure (SSIM), and embedding capacity (EC). Experimental results and comparisons with six pertinent state-of-art algorithms are given to prove the validation and efficiency of the proposed algorithm.


Introduction
Nowadays, digital communications become an essential part of our daily life [1] [2] [3] [4] [5].A lot of applications are based on the Internet and in some cases it is required that communication have to be secret.The wide proliferation of the Internet and wireless networks makes delivery and exchange the digital data easy [6]- [13].Apart from the problems of the wireless networks which include low bandwidth, insecure links, and high error rate [14]- [22].Security is an important matter when exchange data over the internet and wireless networks [23]- [29].
In security systems, data hiding is a common discipline to protect data.Data hiding, which concerned by concealing a message (a sequence of bits) in a digital object or cover, has two important sub-disciplines: steganography and watermarking [30] [31].Steganography and watermarking are very close to each other and may be correspond but with different requirements and objectives as well, and thus leads to different technical solutions.Watermarking is a technique with a trade-off between the robustness, embedding capacity, and visual quality.Its aim is to obstruct piracy or to prove the proprietorship by imperceptibly modifying the digital media cover.The goal of steganographic techniques is to modify the cover object in imperceptible way, that is, nobody except the intended recipient can be able to identify the modified cover object [32].
The steganography term is not new concept [33].It is believed that steganography was found during the Golden Age in Greece and literally means "concealed/covert writing" which is derived from two Greek words "Stegan Graphien" [34] [35] [36].Ancient Greek history mentioned that how ancient Greeks dig secret messages into the waxed wooden tablets and then the melting wax was reapplied to the wood, giving the appearance of a new and unused tablet.Thus, the resulted tablets could be transported without anyone doubting about the presences of a secret message under the wax [37].An alternate smart method was to shave head of a messenger and tattoo a message or an image on the head of messenger.After the hair grew again, the message would not be discovered till the head was shaved again [38].At the present time, steganographic algorithms obscure secret data as noise in a cover object that is assumed to be harmless [39].
Generally, the algorithms used in steganography are based on the fact that the modifications occurred in texts, images, audio files and video files are not detected by human visual or auditory systems [40].There are several steganographic algorithms that have been proposed for data hiding when the cover media is digital images [41] [42] [43].Since the digital images have a lot of redundant data, there has been an increased interest in using digital images as cover media for steganographic purposes [44] [45].On the other hand, millions of digital images transfer through the internet each second, therefore it is necessary to say that digital image steganography becomes an important topic in IT security field [46] [47].However, the remainder of the paper is organized as follows.In Section 2, a literature review of the most related works in the field is presented.Section 3, detailed extensively the proposed algorithm.Experimental results and discussions are provided in Section 4. Section 5 concludes the work and provides future possible directions.

Related Work
The first pixel-value differencing (PVD) steganographic algorithm was introduced by [41].The embedding algorithm of Wu and Tsai's method uses a cover image I sized by M × N. B i is a sub-block of I, which has two consecutive pixels p i and p i+1 broken down by partitioning I in raster scan order such that . The difference value d i between p i and p i+1 can be derived by using the following equation: On the other hand, in PVD method a range table has been designed with n contiguous sub-ranges R j (i.e.

{ }
 .The main job of the range table is to provide the lower and upper bound values for each i d that follow each B i .The lower and upper bound values are called by j l and j u , so that we have ,  .Each sub-range R j has width W j which is selected to be a power of 2 and can be calculated by using this equation: However, using the width W j of each R j they can obtain the hiding capacity of two consecutive pixels by using: According to the above equation, t i means the number of bits that can be hidden in each B i .Read t i bits from the binary secret bit-stream and it will be transform into its integer value b i .For example, if t i bits = "100", then the converted value of b i = 4. Now, a new difference value i d ′ can be calculated by adding l j and b i together where: ( ) , otherwise You should notice that the calculated i d ′ will replace the original d i .Finally, the secret data can be hidden into B i by modifying its pixel values p i and p i+1 as follows: where: ( ) . However, all the above steps are repeated for each subblock until all secret data bits are hidden into the cover-image.Therefore, the stego-image is obtained.
Maleki, et al in [48] proposed an adaptive scheme based on Human Visual System (HVS), thus the pixels in edge regions can tolerate much more modifications than smooth regions.They use five secret keys, which are R 1 , R 2 , v 1 , v 2 and T, where v 1 ≥ 1, v 2 ≥ 1 and (v 1 + v 2 < 6).First of all, two parameters K r and K c are generated using H r (R 1 , v 1 ) and H c (R 2 , v 2 ), respectively.Then, they calculate the average difference value D of 4-neighborhing pixels in a block as follows: , where : min , , , 3 According to a threshold secret key T, they classify the current block into edge region or smooth region.Pixels in edge regions are embedding with a larger number of bits than that belongs to smooth regions.On the other words, If D ≤ T that means the block belongs to smooth regions and then Q = v 1 bits will be embedded in that block.Otherwise, the block belongs to edge regions and then They have to determine if the current block is an error block or not by using this condition: If that condition is satis-fy, then this block is called an error block and it is not used to embed secret data.
The main goal of the overlapping PVD (OPVD) method is to maximize the embedding capacity of the original PVD while maintaining acceptable image quality [49].OPVD method embeds the secret data bits using singular pixels rather than embedding in pixel pairs using least significant bit (LSB) substitution.
If the difference value of the pixel pair before and after embedding the secret data bits belongs to the same range, then the embedding procedure is implemented.Otherwise, there is no embedding for secret bits and the second pixel is adjusted.Despite the fact that this method conceals more secret data bits than PVD, its embedding capacity is limited since it still has a large number of unused pixels in embedding process.Moreover, using simple LSB approach and the adjustment process distorts the stego-image histogram.Therefore to increase the embedding capacity and improving the security of OPVD method while maintaining the image quality, [50] proposed a novel steganographic method based on OPVD.Like OPVD, the proposed method uses the difference of a two pixel block to recognize the smoothness and contrast in the current block.Then, it hides the secret bits in the second pixel based on the computed difference.After that, the second pixel is employed as first pixel in the next block and the embedding process is repeated.Moreover, a correction procedure is used to reduce the number of unused pixels.
To overcome the limitation of embedding capacity in PVD method, there are some PVD-based steganographic methods used a combination of PVD and LSB to dramatically enlarge the embedding capacity of secret data [13] [51].Khodaei and Faez in [52] have proposed a steganographic method based on the PVD and modified LSB to embed the secret data within a greyscale cover-image.Their proposed method firstly divides all possible differences into lower and higher levels with a number of ranges.Secondly, it partitions the cover-image into non-overlapping blocks of three consecutive pixels and obtains the second pixel of each block as the base pixel.Next, by using LSB substitution followed by optimal pixel adjustment process (OPAP) which will described later, they embed k-bits of secret data in the base pixel.After that, they calculate the differences of pixel values between the base pixel and other two adjacent pixels in each block.
Finally, they apply the modified PVD algorithm to embed secret data into the two pixels.In this method, each pixel embedded by modified PVD will conceal at least 3 bits, while in the original PVD each pixel pair will conceal at least 3 bits.Therefore, this method can embed large amount of secret data with maintaining acceptable visual quality of the stego-image.
Wang, et al in [53] proposed a high quality steganographic method based on PVD and modulus function, which is more secure against the RS detection attack and performs better than the PVD scheme.This scheme increased the peak signal-to-noise ratio (PSNR) values to 44.15 dB while concealed 51,219 bytes.It exploits the remainder of the two consecutive pixels to record the information of the embedded data, which achieves more flexibility, capable of deriving the optimal remainder of the two pixels at the least distortion.This method increased the PSNR (up to 8.9%) more than the simple PVD method.To maintain the difference in the same range before and after embedding process, this method uses readjusting procedure to alter the reminder of the pixel pair.
Joo, et al. in [54] presented an enhancement on [53] method by embedding different amounts of secret data based on pixel-pair complexity.Tests in this method showed that the difference histogram had a shape closer to the cover-image which was hard to be detected by histogram analysis.Although this method improved the problems of the shapes in the difference histogram, its embedding capacity is not higher than Wang et al. method.In Joo et al. method, the embedding order is diverse for the odd and even embedding areas.
Chen in [55] introduced a PVD method using pixel pair matching (PPM).
PPM [56] used two pixels as a unit for embedding a message digit S B in B-ary notational system.In Chen method, the cover-image is partitioned into 2 × 2 embedding cells for embedding by random embedding arrangements.To increase the random embedding characteristic, two reference tables are created.
This random mechanism raises the security of the embedded data from detection and other steganalysis attacks.The major contributions of this approach are that: (1) PPM was utilized thus more data was concealed than original PVD, ( Effectively decreasing the falling-off-boundary problem by manipulating only on Pivot Embedding Unit (PEU).
(3) The secret data was concealed based on two reference tables which raised the random characteristic and the visual quality.
(4) This method is harder to be detected since its difference histogram demonstrates that the values of the stego-image are very close to the values of the cover-image.Comparison this method with [54], Chen scheme significantly had higher capacity and image quality.

Embedding Phase
The embedding phase for our proposed algorithm used the same equations as employed in [41] [48] [52] [57].The nitty gritty embedding steps for inserting secret data bits in a cover-image are described as follows: Input: Cover-image CI, secret data S, and secret keys (R 1 , R 2 , α, β).
Step 1.The cover-image is dividing into non-overlapping two-pixel blocks . In each block, there are two neighboring pixels p i and p i+1 , and their corresponding gray values are g 0 and g 1 , respectively.
Step 2. Transform S into a binary bitstream S'.
Step 3. As explained previously, H r (R 1 , α) and H c (R 2 , β) are used to generate two binary sets K r and K c , respectively.
Step 4. Calculate Q as follows: ( ) Step 5.For the first pixel p i in the block, S Q = Q bits of binary bitstream S'.After that, this S Q is divided into two sub-sets S Q1 and S Q2 , where S Q1 has α bits and S Q2 has β bits.
Step 6. Find the indices i and j using S Q1 = K ri and S Q2 = K cj , where K ri and K cj are ith and jth binary elements in K r and K c sets, respectively.
Step 7. Compute y as follows: ( ) Step 8. Generate a pixel group G which is a subset of the pixel intensity set and is generated as follows: ( ) mod , where 2 Thus, the pixel group G is an ordered set . Then, determine the corresponding stego-pixel from yth element of G where i y p g ′ = .
Step 9.For reducing perceptual distortion between the cover and stego images, we use "error reducing process".Let L ∈ [−1, 0, 1] and n = 2 Q .After that, calculate i p′′ as in the following: Consequently, we get three values for i p′′ .We choose one i p′′ value, which is the closest value for the original value p i .Thus, the final value for the corresponding stego-pixel i p′ after error reducing process will be the chosen i p′′ .
Step 10.Until now, we embed Q bits in the first pixel in the block B i .Now, compute the difference value between i p′ and the second pixel p i+1 in B i as follows: Step 11.Find the corresponding sub-range [ ] for the resulted difference value d i from the dividing range table that is shown in Figure 1.Where l i and u i are the lower and higher bounds for sub-range R i .
Step 12.If R i belongs to the lower-level, then 3 secret data bits will be embedded in the second pixel p i+1 .Unless 4 secret data bits will be embedded in the second pixel p i+1 .By considering t i is the number of embedded secret data bits, then, read t i bits from the binary bitstream S' and convert it into its decimal value s t .
Step 13.Compute the new difference value dd i as follows: .
Step 14. Calculate the stego pixel value ′ for the second pixel p i+1 in the block B i using the following formula: ( ) Figure 1.Dividing range table R.
Step 15.Now, we are getting the stego-block consisting i p′ and that, repeat the steps from 5 to 15 for the next block until all secret data bits are completely embedded and the stego-image SI is obtained.
Figure 2 shows the flowchart of the embedding process in MF-PVD algorithm.
Respect to the side information used in MF-PVD algorithm, they are offline, except the amount of the payload which takes 32 bits from the embedding capacity.
• Embedding Phase: Example An illustration of the data embedding phase is shown in Figures 3(a)-(h).
Suppose that the simple block is comprised by p 1 and p 2 and their corresponding grey values are (47,48) as shown in Figure 3(a), and the bitstream of secret data is "1000011", as shown in Figure 3(b).Also, assume α = 1, β = 3, R 1 = 2 and R 2 = 2020.
 The first pixel is embedded with Q = 4 bits of secret data.Thus, S Q = "1000" will be separated into two sub-strings S Q1 = "1" and S Q2 = "000". After that, we find the indices i and j where S Q1 = K ri and S Q2 = K cj .Therefore, i = 1 and j = 4.  Using the values of i, j and β to compute y = 2 β × (i − 1) + j = 2 3 × (1 − 1) + 4 = 4.  Next, the pixel group G is created as shown in Figure 3(e).Therefore, the stego-pixel 1 p′ can be obtained from the yth element of G (i.e. 1 p′ = g 4 = 35). To reduce the distortion, we use the error reducing process.As shown in Figure 3(f), we will get three values for 1 p′ , thus, we choose the closest one to the original pixel value 47, which is 51 (i.e. 1 p′ = 51). Now, we compute the difference value between 1 p′ and p 2 as follows: where R 1 = [0, 7] and t 1 = 3 bits.Thus, s t = 3.  Next, the new difference value is computed as follows: dd = s t + 0 = 3  Finally, according to step 14, the stego-pixel 2 p′ = 1 p′ + dd = 51 + 3 = 54 Hence, the block after embedding the secret data will be as shown in Figure 3(h).

Extracting Phase
The details of extracting phase to extract the secret data S are described as follows: Input: Stego-image SI, and secret keys (R 1 , R 2 , α, β).Output: Secret data S.
Step 1. Similar to the embedding phase, first of all, partition the SI into two-pixel non-overlapping blocks.In each block, there are two neighboring pixels ( ) .
Step 2. Using H r (R 1 , α) and H c (R 2 , β) to generate two binary sets K r and K c , respectively.
Step 3. Through sets K r and K c , form a Cartesian product K r ⊕ K c .K r ⊕ K c creates an ordered set of combinations of K r and K c with 2 α × 2 β = 2 α+β elements.Each component of the variant Cartesian product K r ⊕ K c is binary string concatenation which includes the two binary strings K ri and K cj jointly to form one string which has the length (α + β) bits
Step 6. Use the Cartesian product of K r and K c (K r ⊕ K c ) to extract the yth element which is the secret embedded bits with Q bits, we called this first piece of secret data by S Q .
Step 7. Find the difference value between the first and second pixels in the block where Step 8. Find the corresponding range [ ] for the resulted difference value i d ′ and compute i t .
Step 9. Extract the second piece of secret data S t by using: Step 10.Transform S t into its binary value.
Step 11.Move to next block and repeat Steps from 5 to 11 until all the pieces of secret data are completely extracted.Then, concatenate all the pieces of secret data sub-bitstreams in order to recover the required hidden secret data S.
The error reducing process in our algorithm can work correctly since it is do not change the hidden secret data.To prove that, remember step 5 in the extracting phase.We mentioned that i p′ = g y where n = 2 Q , if we applying the following equation: All these resulted values have the same reminder to n.Consequently, in the extracting phase, using each of these three values will lead to extract the same secret data correctly.Detection process for secret data in our method is very difficult to any unauthorized users due to existing many permutations (K r has 2 α !), (K c has 2 β !) and (K r ⊕ K c has 2 α !× 2 β !).Thus, an attacker will face more difficult in guessing the secret data.Figure 4 shows the flowchart of the extracting process in MF-PVD algorithm.

Simulation Setup: Simulation Parameters and Performance Metrics
All our experiments are developed using MATLAB 8.2.0.701 (R2013b) software on Windows 7 platform with an Intel Core i7-4600U CPU working at 2.1 GHz with a 4 MB cache and 4 GB RAM.We used different benchmark gray level images with size 512 × 512 from various databases such as (USC-SIPI Image Database) and (UWATERLOO-LINKS Image Repository) [58] [59].Also, we used various formats for images, such as: Tiff, Jpg, Bmp, and Gif.In addition, we use randseq ( ) function to generate random secret message to be embedded in the cover image.
The effectiveness of our proposed algorithm is verified using different performance metrics such as PSNR and structural similarity index measure (SSIM).
In general, PSNR and SSIM are used evaluate the overall image quality.PSNR is computed using the following equation [41] [60]- [68]: ( ) where I max equals to 255 for 8-bit gray level images, which means the maximum intensity value of each pixel.Mean square error (MSE) is calculated using: ( ) Use K r and K c to form the Cartesian product K r ⊕ K c .

Define range table
Find R j for d i ' and obtain t j where MN is the total number of pixels for both cover and stego images.x ij and ij x′ represent the pixels in the cover image and stego image, respectively.SSIM is calculated as follows [69] [70]: where ( ) ( )

Experimental Results and Discussions
The maximum embedding capacity (EC) in our algorithm can be computed by using the following equation: 3 4 where N fp is the number of first pixel blocks, N sp1 is the number of the second pixel blocks that belongs to the lower-level and N sp2 is the number of the second pixel blocks that belongs to the higher-level.
We have implemented using a series of α and β secret keys.The value we got from adding α and β values will be embedded in the first pixel in each block (i.e.α + β bits).Figure 5  Tables 1(a)-1(c) shows the results of our adaptive algorithm in terms of the maximum embedding capacity, SSIM and PSNR values.As shown in Table 1, our proposed algorithm is scalable and flexible, so that larger values for α and β improve the embedding capacity whereas a lower values of α and β improve the stego-image quality.Moreover, it is noteworthy that the complexity time presented by our algorithm almost is O(n 2 ), which is less than or equals to 59 s.Our algorithm outperforms Maleki, et al. scheme [48] since we have not error blocks which is not used to embed secret data.On the other hand, using the PVD method for embedding the secret data in the second pixel according to the specific range table significantly increases the capability of embedding.Therefore, our method is extremely superior Maleki et al. scheme in terms of the embedding capacity.provement ratio (AIR) is about 47%, 20%, 25% and 12% when using (α = 1 and β = 1), (α = 2 and β = 1), (α = 2 and β = 2) and (α = 3 and β = 1), respectively.
Unfortunately, this will be at the cost of decreasing PSNR values.The average degradation ratio (ADR) is about 18%, 10%, 5% and 8%, respectively.Although, there are decreasing in PSNR values, the stego image visual quality does not show any distortion to be suspected by unauthorized observers.
Results shown in Table 3(a), Table 3(b) demonstrates that our algorithm outperforms to [50] and [52] algorithms in terms of the embedding capacity.
The AIR is about 12% and 2%, respectively.Moreover, our algorithm provides better PSNR values in most stego images than El-Alfy and Al-Sadi.Although our    [55] algorithms.In fact, our algorithm is superior to these three approaches in two features, namely embedding capacity and level of security.The AIR in terms of the embedding capacity is about 62%, 61% and 55%, respectively.However, as inevitable result of the increasing in the embedding capacity, the PSNR is decreased.The ADR in terms of the PSNR is about 11%, 11% and 19%, respectively.Our algorithm has higher level of security than these three methods for the same reasons listed previously.

Conclusion and Future Work
We   [55].As a matter of fact, our MF-PVD algorithm is outstanding to these mentioned methods in two main features, the embedding capacity and the security.In fact, the security of our algorithm is high due to generating many permutations and existing the dividing range table.
Many trends can be given for further improvements to the proposed algorithm.The algorithm's framework can be extended to the RGB color images for improving the capability of embedding.Moreover, it can be a good addition to develop an approach that takes into account the hybrid domain.As well, there are future plans to develop modulus function-based schemes for another media such as audios and videos.

2 xσ
constants to stabilize the division when the mean and variance get close to zero.L represents the maximum possible value for image pixel, N bpp is the number of bits per pixel).x µ and denote the mean and variance of x , respectively.

y µ and 2 yσ
denote the mean and variance of y , respectively, xy σ refers to the covariance of x and y.The value of SSIM lies in the interval [zero, one].The value "one" means that both images, cover image and stego image, are precisely the same, and the value "zero" means that they are absolutely unrelated.However, for each image, there are several SSIM indexes where each one is calculated within(11 × 11)  local window using a certain circular-symmetric Gaussian weighting value (between zero and one) and the final SSIM image index is the average of these indexes.
have proposed a new block-based steganographic algirthm using PVD and modulus function techniques, namely, MF-PVD.To evaluate the performance of MF-PVD algorithm, we compare it with six pertinent state-of-art algorithms, A. K. Al-Dhamari, K. A. Darabkh

Table 2
(a), Table 2(b) demonstrates a comparison between our algorithm and Maleki et al. algorithm.As shown in Table2, in all different values of α and β, our method provides the highest embedding capacities.In addition to improve the embedding capacity, our method does not degrade much on the visual quality of the stego-image.The embedding rate and the visual quality of the stego-image in our algorithm can be modified depending on the requirements of the practical applications.In other words, if we need high embedding rate, we have to choose larger values for α and β, but if we need high visual quality, we have to choose smaller values for α and β.Compared Maleki et al. algorithm with our proposed algorithm in terms of the EC, the average im-

Table 3 .
[52](b): Comparison of the results between our MF-PVD algorithm against[50]and[52]methods. does not greatly increase the embedding capacity than Khodaei and Faez, our algorithm does not degrade on the image quality and it provides higher level of security.The level of security in our proposed algorithm is high, due to two reasons, which are: 1) We have two methods to individually embed each pixel in a block, 2) Our algorithm provides hard detection for the hidden secret data bits due to existing: many permutations and dividing range table. algorithm

Table 4 (
a),Table 4(b)shows the comparison of the results between our algorithm against[53] [54]