Abstract
Achievement of high-capacity data hiding with good visual quality is an important research issue in the field of steganography. In this paper, we have introduced RGB color image and bit-plane slicing for data hiding through Hamming code using shared secret key. We partitioned the color image into (3 × 3) pixel blocks and then decomposed into three basic color blocks. Again each color blocks are sliced up to four bit-plane starting from LSB plane. Now, a segment of three bits secret data is embedded within each bit-plane depending on a syndrome calculated using hamming code. As a result, 36 bits secret data can be embedded within (3 × 3) pixel block and achieve a high payload capacity with good visual quality compared with existing schemes.
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Steganography is the art and science of hidden data communication. Many data hiding schemes [1–10] are developed in last few decades. Some of them [6, 9, 10] are better in terms of security and imperceptibility. The data hiding schemes are useful in many application areas to solve the problem of ownership identification, copyright protection, authentication, verification, and more. The main aims of data hiding schemes are to ensure extraction of secret data and recovery of original object from stego media. On the other hand, data should stay hidden in stego image even if the eavesdropper tampered the stego or degrading through natural phenomenon like transmission resampling, compression or filtering, etc. The main drawbacks of data hiding schemes are not to provide a good solution in such cases. The degree of distortion will be high due to increase of data embedding capacity that should be balanced mathematically using spread spectrum. The data embedding in color image is considered to be more unsuspicious and secured, and less exploration has been done till today in this research area using hamming code.
Data hiding through matrix coding has been introduced by Crandall [2], and Westfield [7] implemented F5 algorithm based on matrix encoding using hamming code. Kim and Shin [8] suggested a data embedding procedure for halftone image. The scheme provides good capacity but poor visual quality. Based on matrix encoding, ‘Hamming +1’ method has been developed by Zhang et al. [3]. The embedding capacity is increased in ‘Hamming +1’ scheme by \( \frac{{{\text{k}} + 1}}{{2^{\text{k}} }} \) bpp. Chang [5] suggested an improved data embedding procedure using Hamming code which can hide (k + 1) bits of message in \( 2^{\text{k}} \) pixels with at most one change. Kim and Yang [9] developed ‘Hamming + 3’ data hiding scheme which can embed k + 3 bits within \( 2^{\text{k}} - 1 \) pixels by at most two change. In 2016, Cao et al. [10] proposed their algorithm which can preserve stego image quality under high embedding capacity. The visual quality and data embedding capacity of Cao et al. are 37.90 dB PSNR and payload 3 bpp, respectively. Also Jana et al. [11] proposed reversible data hiding scheme through dual image with 53 dB PSNR and payload 0.14 bpp. After studying this literature, we have found that there is a chance to improve data embedding capacity and visual quality through Hamming code for color images. Here, we have proposed an improved information hiding scheme using (7, 4) Hamming code for color images. We have divided R, G, and B color pixels in bit-plane [12] starting from LSB to LSB-3 (up to four bit-plane) into (3 × 3) blocks and then applied hamming code-based data hiding scheme. In this scheme, 36 bits are embedded within 9 pixels which are more higher than other existing hamming code-based scheme, and in parallel, it maintains high visual quality.
2 Motivation and Objectives
-
1.
Till date, data embedding algorithms are implemented and tested using grayscale images. But, we have implemented hamming code-based data hiding scheme for color images using basic color channel (that is R, G, and B) and their bit-plane.
-
2.
We have introduced the concept of bit-plane. That means each R, G, and B color pixels are divided into four bit-plane starting from LSB to LSB-3.
-
3.
Using Hamming code, Cao et al. [10] achieved data hiding scheme up to 3 bpp payload. But we have implemented our proposed algorithm for 4 bpp where the value of PSNR is always greater than 39 dB.
3 Proposed Method
I is considered as the cover image of size (M × N), and I′ is the marked image with data D = {d1, …, dX} are embedded, where di ∈ {0, 1}, 1 ≤ i ≤ X. Here, H is a parity check matrix of the Hamming code. Let H is
Embedding capacity is an important metric for data embedding. It is measured by how many secret bits can be embedded into a cover image. The embedding capacity is calculated as [10] \( ER = L/M\, \times \,N\,bpp \), where L is the length of the secret message.
Before embedding the secret data, we take 36-bit secret key k1 which is known to both the sender and the receiver, to encrypt the secret data bit using symmetric key encryption. We have taken each pixel block of size (3 × 3), and four bit-plane of each pixel is used to embed the data, which result in (3 × 3) × 4 = 36 bits of data (D1) in one iteration. As an additional security measure, instead of choosing the cover image pixel block serially, we will use pseudo random number generator (PRNG) function with a secret predefined seed k2 (which is only known to the sender and the receiver) to determine the next available block for embedding. Since this seed will be known to the sender and receiver only, the generated unique pattern of pixel block selection can be used in embedding and extraction process securely. The data embedding procedure is enlisted in Algorithm 1, and the data extraction procedure is depicted in Algorithm 2.
Algorithm 1: Data embedding process
Input: Color cover image I (M × N), secret data bits D, Hamming matrix H, secret key k1, and seed value k2
Output: A stego image I′ (M × N).
-
Step 1: Collect random sequence of pixel blocks of size 3 × 3 from IM × N using PRNG (k2). Say the pixel blocks are X1, X2, …, XMN.
-
Step 2: Convert Xi into three separate RGB color blocks XiR, XiG, XiB.
-
Step 3: Convert each Xi ‘s into binary form.
-
Step 4: Perform bit-plane slicing of each Xi ‘s up to four bit-plane starting from LSB that is XiR(LSB), XiR(LSB-1), XiR(LSB-2), XiR(LSB-3).
-
Step 5: Take c = XiR(LSB) and calculate the syndrome S1 = (H × (c)T)T.
-
Step 6: Perform D1′ = (D1 ⊕ k1); k1 = 36 bit length and D1 is also same length
-
Step 7: Take three bits secret data di = {d1, d2, d3} from D1′ where di ∈ {0, 1}.
-
Step 8: Calculate S2 = (di ⊕ S1); if S2 = 0, no change, otherwise flip a bit at the positional value of S2 and generate H′.
-
Step 9: Compute S3 = (H′ ⊕ c) and store the data.
-
Step 10: Replace the matrix(c) with S3 and update XiR(LSB).
-
Step 11: Repeat Step 4–10 using XiR(LSB-1), XiR(LSB-2), and XiR(LSB-3).
-
Step 12: Repeat Step 5–11 to embed secret data on XiG and XiB color blocks.
-
Step 13: Repeat Step 2–12 to embed secret data on each and every random sequence of (Xi′s) of pixel blocks.
-
Step 14: Finally, after combining each stego block, we get stego image (I′) of size (M × N).
-
Step 15: End.
Algorithm 2: Data extraction process
Input: Stego image I′(M × N), Hamming matrix H, secret key k1, and seed value k2
Output: Original secret message D.
-
Step 1: Use PRNG with predetermined seed k2 to determine the stego pixel of random sequence X′i of size [3 × 3] from stego image I′.
-
Step 2: Separate RGB components into X′iR, X′iG, X′iB.
-
Step 3: Convert into binary form of each X′iR, X′iG, X′iB.
-
Step 4: Perform four bit-plane slicing of each X′i ‘s starting from LSB, that is, X′iR(LSB), X′iR(LSB-1), X′iR(LSB-2), X′iR(LSB-3).
-
Step 5: Take c′ = X′iR(LSB) and calculate the syndrome S′ = (H × (c′)T)T.
-
Step 6: Concatenate syndrome S′ with data unit of D′, that is, D′ = D′ || (S′).
-
Step 7: Repeat Step 4–6 using X′iG and X′iB.
-
Step 8: Compute Di = D′ ⊕ k1.
-
Step 9: Repeat Step 2–8 using next random sequence of Xi block.
-
Step 10: Concatenate Di ‘s, we get original secret message D.
-
Step 11: End.
The original color image is divided into R, G, and B color image as shown in Fig. 1. Then every color image is divided into (3 × 3) RGB color pixels. Then the secret bits are embedded within the image pixels. The stego (3 × 3) RGB color pixels are generated. After that, the color pixels are combined and formed the stego image of Lenna which is also (512 × 512) pixels.
3.1 Numerical Illustration
Example 3.1.1: Data embedding
-
1.
Let I be a color image block with (3 × 3) pixel. D = {d1, d2, …, d36} = {0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0}. k1 = {0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1,0, 1, 0, 1, 0, 1, 0} and ER = 36/(3 × 3) = 4 bpp and the cover image pixels are as follows:
and D′ = D ⊕ k1 = {0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
-
2.
Divide into three RGB image pixel blocks as shown below.
-
3.
Take red image pixel block and transform into binary number matrix.
-
4.
Divide it into four bit-plane matrices starting from LSB.
-
5.
Read the LSB matrix and form a 1D matrix. c = [1 1 1 1 0 0 0 1 1]
-
6.
Calculate the syndrome \( S_{1} = H\, \times \,\left( c \right)^{T} = \left| {\begin{array}{*{20}c} 0 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 1 \\ \end{array} } \right|\, \times \,\left| {\begin{array}{*{20}c} 1 & 1 & 1 & 1 & 0 & 0 & 0 & 1 & 1 \\ \end{array} } \right|^{T} = \left| {\begin{array}{*{20}c} 1 \\ 0 \\ 1 \\ \end{array} } \right| \)
-
7.
Transpose the syndrome and XOR with the secret data bit, i.e., [1 0 1] ⊕ [0 1 1] = [1 1 0] which match with the fifth column of Hamming matrix.
-
8.
Generate the code H′ = [0 0 0 0 1 0 0 0 0] and XOR with the original code c.
S3 = [1 1 1 1 0 0 0 1 1] ⊕ [0 0 0 0 1 0 0 0 0] = [1 1 1 1 1 0 0 1 1].
-
9.
Transform into a new LSB matrix.
-
10.
Similarly, compute the LSB-1, LSB-2, and LSB-3 matrices as follows:
-
11.
Update all four modified binary matrices to their corresponding position in original red pixel matrix.
-
12.
Similarly, get updated green and blue pixel matrices.
-
13.
Finally, the stego image block will be \( I^{{\prime }}_{3 \times 3} = \left| {\begin{array}{*{20}c} {9277330} & {9276816} & {9275028} \\ {8753040} & {9408660} & {9213333} \\ {9211794} & {9409179} & {9409179} \\ \end{array} } \right| \)
Example 3.1.2: Data extraction
-
1.
The marked image sized I′ of size 3 × 3 is shown below
-
2.
Divide into three RGB image pixel blocks.
-
3.
Take red image pixel block and transform into binary numbers.
-
4.
Divide it into four bit-plane matrices starting from LSB.
-
5.
Read LSB matrix and form a 1D matrix. c = [1 1 1 1 1 0 0 1 1]
-
6.
Calculate the syndrome S1 = H × (c)T =
-
7.
Transpose the syndrome to get secret data bits d = [0 1 1]
-
8.
Repeat the above steps until we do not get the secret data bits. Concatenate all the data bits to get the data, that is, D′ = {0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0}.
-
9.
XOR the modified secret data with secret key k1 to get the original secret data bits, that is, D = {0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0}
4 Experimental Result and Comparison
The scheme is implemented using NetBeans IDE 8.0 on standard color images to measure the performance. The standard cover images are collected from image database of SIPI [13].
The quality of the stego images is measured using mean square error (MSE) and peak signal to noise ratio (PSNR) [14, 15]. Figure 2 shows the stego image when ER = 4 bpp.
The following tables represent the comparison of PSNR values of stego images generated by different methods with varying payload, and we achieve better PSNR value every time compared to existing methods (Tables 1, 2 and 3).
5 Security Analysis
Security analysis is an important factor of data hiding process. In this paper, we have used two levels of security to enhance our proposition from security perspective. First, we take a 36 bits secret key and encrypt the secret data bits using symmetric key encryption. As it is only known to the sender and receiver, the third party will not be able to decrypt it without knowing the secret key. In second level of security, we have taken a secret seed which is also known to the receiver and sender only. Using this seed, we generate a sequence of unique numbers with the help of PRNG function. We have taken the cover image pixel blocks according to the generated numbers. So without knowing this seed, no one will be able to predict the number sequence.
We also verified our algorithm against some standard measurement like SSIM, standard deviation, RS analysis, histogram analysis. The structural similarity (SSIM) index is a method for measuring the similarity between two images. The SSIM index can be viewed as a quality measure of one of the images being compared, provided the other image is regarded as of perfect quality. From Table 4, it is observed that the SSIM values of all test images are nearer to 1. Standard deviation is used to measure the amount of variation between original and stego images. Here, we achieve SD neared to zero which means that the stego image and cover image are similar in nature. We also analyze our stego image through RS analysis [16]. In Table 5, it is shown that the values of Rm and Rm1, Sm and Sm1 are almost equal and the ratio of R and S lies around 0.05, which is very small, so that we can conclude that our proposed scheme is secure against RS attack. Figure 3 represents the histogram of the original cover image and the stego image. It is shown that the shape of the histogram almost remains same after embedding high-capacity secret data. So we can say that our proposed method is robust against histogram attack.
6 Conclusion
In this paper, we introduced a novel secure data hiding scheme using Hamming code for RGB color image. Bit-plane slicing of the each RGB color cover image block is also introduced to increase data hiding capacity over grayscale image. So the data embedding rate is raised up to 4 bpp which is greater than other existing schemes. In our algorithm, PSNR is also high compared to existing schemes that mean we generate a better visual quality stego image. From security perspective, we introduced a shared secret key to find suitable bit pattern through XOR operation during data embedding as well as data extraction. The cover image block has been chosen in random location through PRNG of shared seed value which also enhances security in our proposed scheme. We have tested our stego image with RS analysis, histogram analysis, SSIM, SD method and observed that the proposed scheme is preferable for data embedding where visual quality and security constraint needs to be maintained for high payload. In future, the scheme has been extended to enhance security, capacity, and quality in different domain for video-based steganography.
References
Wang, R. Z., Lin, C. F., & Lin, J. C. (2000), Hiding data in images by optimal moderately-significant-bit replacement. Electronics Letters, 36(25), 2069–2070.
Crandall R (1998), Some notes on Steganography, Posted on Steganography mailing list. http://os.inf.tudresden.de/westfield/Crandall.pdf.
Zhang, W., Wang, S., & Zhang, X. (2007). Improving embedding efficiency of covering codes for applications in steganography. IEEE Communications Letters, 11(8).
Huffman, W. C., & Pless, V. (2010). Fundamentals of error-correcting codes. Cambridge university press.
Chang, C. C., & Chou, Y. C. (2008, January). Using nearest covering codes to embed secret information in grayscale images. In Proceedings of the 2nd international conference on Ubiquitous information management and communication (pp. 315–320). ACM.
Liu, Y., Chang, C. C., & Chien, T. Y. (2017). A Revisit to LSB Substitution Based Data Hiding for Embedding More Information. In Advances in Intelligent Information Hiding and Multimedia Signal Processing (pp. 11–19). Springer International Publishing.
Westfeld, A. (2001, April). F5—a steganographic algorithm. In International workshop on information hiding (pp. 289–302). Springer Berlin Heidelberg.
Kim, C., Shin, D., & Shin, D. (2011, April). Data hiding in a halftone image using hamming code (15, 11). In Asian Conference on Intelligent Information and Database Systems (pp. 372–381). Springer Berlin Heidelberg..
Kim, C., & Yang, C. N. (2014). Improving data hiding capacity based on hamming code. In Frontier and Innovation in Future Computing and Communications (pp. 697–706). Springer Netherlands.
Cao, Z., Yin, Z., Hu, H., Gao, X., & Wang, L. (2016). High capacity data hiding scheme based on (7, 4) Hamming code. Springer Plus, 5(1), 175.
Jana, B., Giri, D., & Mondal, S. K. (2016). Dual image based reversible data hiding scheme using (7, 4) hamming code. Multimedia Tools and Applications, 1–23.
Banik, B. G., & Bandyopadhyay, S. K. (2017). Image Steganography Using BitPlane Complexity Segmentation and Hessenberg QR Method. In Proceedings of the First International Conference on Intelligent Computing and Communication (pp. 623–633). Springer Singapore..
University of Southern California, The USC-SIPI Image Database, 2015 http://sipi.usc.edu/database/database.php.
P. Gupta, et al., “A Modified PSNR Metric based on HVS for Quality Assessment of Color Images,” Proc. of IEEE International Conference on Communication and Industrial Application (ICCIA-2011), Kolkatta (W.B.), India, no. 23, pp. 96–99, December, 2011.
P. Gupta, et al.,”A New Model for Performance Evaluation of Denoising Algorithms based on Image Quality Assessment,” Proc. of (ACM ICPS) CUBE International Information Technology Conference & Exhibition, Pune, India, pp. 5–10, September, 2012.
Fridrich J, Goljan M, Du R (2001) Invertible authentication. In: Photonics West 2001- Electronic Imaging (pp. 197–208). International Society for Optics and Photonics.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Banerjee, A., Jana, B. (2018). Improving Data Hiding Capacity Using Bit-Plane Slicing of Color Image Through (7, 4) Hamming Code. In: Bhateja, V., Nguyen, B., Nguyen, N., Satapathy, S., Le, DN. (eds) Information Systems Design and Intelligent Applications. Advances in Intelligent Systems and Computing, vol 672. Springer, Singapore. https://doi.org/10.1007/978-981-10-7512-4_36
Download citation
DOI: https://doi.org/10.1007/978-981-10-7512-4_36
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-10-7511-7
Online ISBN: 978-981-10-7512-4
eBook Packages: EngineeringEngineering (R0)