Sep 8, 2016 - a Dept.of Computer Science and Engineering, Amrita School of Engineering, Coimbatore, Amrita Vishwa Vidyapeetham, Amrita University,.
Available online at www.sciencedirect.com
ScienceDirect Procedia Computer Science 93 (2016) 878 – 885
6th International Conference On Advances In Computing & Communications, ICACC 2016, 6-8 September 2016, Cochin, India
Relating the embedding efficiency of LSB Steganography techniques in Spatial and Transform domains P.Malathi*a, T.Gireeshkumarb a
Dept.of Computer Science and Engineering, Amrita School of Engineering, Coimbatore, Amrita Vishwa Vidyapeetham, Amrita University, India b Dept.of Computer Science and Engineering, Amrita School of Engineering, Coimbatore, Amrita Vishwa Vidyapeetham, Amrita University, India
Abstract This paper is based on image steganography that is Least Significant Bits (LSB) techniques on images to enhance the security of the communication. The LSB-based technique is the most challenging one because it is difficult to differentiate between the cover-object and stego-object, if few LSB bits of the cover object are replaced. The LSB approach combined with F5 algorithm and matrix embedding which is applied on both spatial and frequency domain of an image. The Mean squared error (MSE) and Peak signal to noise ratio (PSNR) was used as the performance measure to compare the different LSB techniques. This paper shows that MSE and PSNR of LSB techniques with Matrix embedding yields better results. © 2016 The Authors. Published Elsevier B.V. 2016 Published by Elsevier B.V.by This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the Organizing Committee of ICACC 2016. Peer-review under responsibility of the Organizing Committee of ICACC 2016 Keywords: Steganography; LSB; MSE; PSNR
1. Introduction In this paper the LSB approach is combined with F5 algorithm and matrix embedding which is applied on both spatial and frequency domain of an image [8]. In Spatial domain the message bits are inserted in the LSB of each pixel in an image but in frequency domain the message bits are embedded in the quantized DCT coefficients. Flipping LSBs is an unnatural activity that introduces vivid artifacts into the histogram [3]. An easy modification of LSB embedding is the so-called +/- embedding, also mostly called LSB matching. This embedding algorithm embeds message bits as LSBs of cover elements; all the same, when an LSB needs to be driven, rather of flipping the LSB, the value is randomly added or scaled down, with the evident exception that the values 0 and 255 are only increased or scaled down, respectively. In LSB embedding or +/ - embedding, one pixel communicates precisely one
1877-0509 © 2016 Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the Organizing Committee of ICACC 2016 doi:10.1016/j.procs.2016.07.270
879
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
message bit. This was the situation of LSB embedding in JPEG. Assuming the message bits are arbitrary, each pixel is herewith modified with probability 0.5 because this is the probability that the LSB will not equal the message bit. Thus, on average two bits are embedded via one change or equivalently, the embedding efficiency is 2. Even if the payload is lesser than the embedding capacity of the cover image, it is usable to approximately increase the embedding efficiency and herewith embed the same payload by all of fewer embedding changes which is called as Matrix embedding [7]. Steganalysis [2] is a penetration tool to discover and render the hidden information in the stego-object. The Steganalysis technique used in this paper is Histogram analysis. The survival of a confidential message is identified by analyzing the histogram of cover image and stego image. The objective of this paper is to embed a large payload into the image using different LSB techniques such as +/- embedding, F5 algorithm with and without matrix embedding. The Mean squared error (MSE) and Peak signal to noise ratio (PSNR) was used as the performance measure to compare the different LSB techniques. This paper shows that MSE & PSNR of LSB techniques with Matrix embedding yields better results.
2. Least-Significant Bit (LSB) Insertion It is the simplest steganographic algorithm [4]. Let us assume that x[i] ȯ x= {0,…., 2n-1} is a sequence of integers where n denotes the number of bits and x[i] refers to the pixel or intensity value at the ith pixel in an 8-bit grayscale image (n=8) or a quantized DCT coefficient in a JPEG file. Depending on the image format and the bit depth selected for representing the isolated values, each x[i] can be represented by n bits b[i,1],….,b[i,n], (1) The series (b [i, 1],…….,b[i, n]) is the binary representation of x[i] in big-endian form. LSB embedding as its name suggests, works by replacing the LSBs of x[i] by all of the message bits m[i], obtaining in the behavior the stego image y[i].LSB embedding follow the class of steganographic algorithm that abide each message bit at one cover element. In other words, each bit is situated at an actual element. The embedding proceeds by visiting individual cover elements and applying the embedding operation (flipping the LSB) if imminent, to relate the LSB with the message bit (Fig.1.).The message is inserted sequentially in pixels of an image. The embedding reaction of flipping the LSB can be written mathematically as: (2)
Fig. 1. LSB Insertion Mechanism
Where x could be the light intensity at the ith pixel in an 8-bit grayscale image (n=8) or a quantized DCT coefficient in a JPEG file.
880
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
Fig. 2. LSB Extraction Mechanism
2.1. +/- embedding algorithm A delicate modification of LSB embedding is the so-called +/- embedding, also as is the custom called LSB matching [1]. This embedding algorithm embeds message bits as LSBs of cover elements; nevertheless, when an LSB needs to be displaced, instead of flipping the LSB, the value is randomly added or cut down, by the whole of the actual exception that the values 0 and 255 are only increased or scaled down, respectively. Note that the extraction algorithm of +/- embedding is much the same as for LSB embedding; the message is read by extracting the LSBs of cover elements. 2.2. LSB embedding in DCT Coefficients Images are separated into parts of diverse frequencies by the DCT [6]. The result of DCT conversion is the AC coefficients and DC coefficient. The upper most left element is called the “DC coefficient and the remaining elements are called “AC coefficients. The Quantization is achieved by dividing each element of transformed image matrix by the corresponding element in the quantization matrix and the values of the resultant matrix are then rounded off. In this paper we have used the Q50 (Quantization matrix) and the embedding proceeds by visiting isolated quantized cover elements and applying the embedding activity (flipping the LSB) if imminent, to correlate the LSB with the message bit. 2.3. F5 algorithm The F5 algorithm was originally designed to overcome the histogram attack while still offering a large embedding capacity [9]. The F5 contains two important ingredients: • •
Embedding operation Matrix embedding
2.3.1. F5 Embedding operation The algorithm embeds the message bits in the LSBs of DCT coefficients. If the coefficient’s LSB needs to be displaced, instead of flipping the LSB, the absolute value of the DCT coefficient is reduced by one [1]. To avoid introducing absolutely detectable artifacts, the F5 skips completely the DC terms along with other coefficients equal to 0. Because the embedding operation decreases the absolute value of the coefficient by one, it can happen that a
881
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
coefficient originally approach to 1 or -1 is modified to nothing (a phenomenon called “shrinkage”). Because the recipient will be reading the message bits from LSBs of non-zero AC DCT coefficients along the same path, the bit embedded during shrinkage would be lost. Thus, if shrinkage occurs, the sender need to re-embed the same message bit, which casually, will always be a 0, at the next coefficient.
2.3.2. Matrix Embedding using binary hamming codes If we desire to embed 2 message bits in three pixels, then the relative length would be Į=2/3 by LSB embedding. Therefore a cover image with n pixels, the message contains nĮ = 2n/3 bits [1]. Let us assume that the message bits are represented as msg[1], msg[2] and grayscale values are represented as gy[1], gy[2] ,gy[3]. Usual LSB embedding would embed bit msg[1] at gy[1] and bit msg[2] at gy[2] and gy[3] will be skipped which was resulted with embedding efficiency 2. This can be improved by embedding the bits as (3) (4) If these equations (3) and (4) are satisfied by the cover values, no embedding changes are necessary. If the first equation was satisfied and got executed but not the second one, then the LSB of gy [3] would be flipped. If the second equation was satisfied and got executed but not the first one, then the LSB of gy [1] would be flipped. If neither is satisfied, then the gy [3] would be flipped. Because the probability of each case is 1/4, the proposed number of changes is 0*1/4 1*1/4 1*1/4 1*1/4 =3/4 and the embedding efficiency is e=8/3 > 2. In this paper we used binary hamming codes[1] to express a message with relative length Įp=p/(2p -1), p>=0, which means that p message bits, msg[1],…..,msg[p] , to be embedded in 2p-1 pixels. Let x denote the vectors of LSBs of 2p -1 pixels of the cover image. The sender and recipient share a p * (2p -1) binary matrix G that contains all non-zero binary vectors of k size p as its columns. An illustration of a well-known matrix for p=3 is 0001111 G= 0 1 1 0 0 1 11010101 If the sender modifies the pixel values so that the column vector of their LSBs, y, satisfies (5) We call the vector Gy the “syndrome” of y. If by chance the syndrome of the cover pixels already communicates the correct message, Gx = msg, which happens by all of probability 1/2p, the sender does not require to accommodate whole of the 2p-1 pixels and embeds the next segment of p message bits. When Gx msg, the sender looks up the difference Gx – msg as a column in G . Let us urge that it is the jth column and we devise it as G[j] by flipping the LSB of the jth pixel and keeping the remaining pixels unchanged, (6) (7) the syndrome of y shortly matches the message bits, (8) This is for Gy = Gx + G(y-x) = Gx – msg + G[., j] + msg = msg, because Gx – msg = H[j] and in binary arithmetic z + z = 0 for any z. To complete the testimony of the steganographic algorithm, the recipient follows the same path over the image as the sender and reads p message bits from the LSBs of each block of 2p -1 pixels as the syndrome msg = Gy. Let us shortly compute the embedding efficiency of this embedding method. With probability 1/2p, the sender does not adapt any of the 2p -1 pixel. Furthermore, there might be definitely one change with
882
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
probability 1 – 1/2p. The average number of embedding changes is thus 0 * 1/2p + 1 *(1-1/2p) = 1-1/2p and the embedding efficiency is ep = p / 1 – 2-p
3. Results and Discussion The standard image of the size of 256 × 256 pixels is selected. Both cover and stego image are of same size. The message of length 3096 bits are taken to embed in the image. 3.1. Effect of LSB embedding on histogram LSB embedding encourages 2n-1 disjoint LSB pairs on the set of all possible element values {0,1,………,2n1}, {0, 1},{2,3},…….,{2n-2,2n-1} Note that if x[i] is in LSB pair {2k, 2k+1}, it must stand there after embedding because the pair elements differ only in their LSBs (2kļ2k+1). This simple observation is the starting point of many prevailing attacks on LSB embedding [4]. We charge that LSB embedding has a probability to even out the histogram within each bin.
a
b
Fig. 3. (a) Effect of LSB embedding before embedding; (b) After embedding
3.2. Effect of +/- Embedding algorithm on histogram Flipping LSBs is an unnatural operation that introduces characteristic artifacts into the histogram. An obvious remedy is to use an embedding operation that is symmetrical. The + /- embedding is much more difficult to attack than LSB embedding. While there exist astonishingly accurate attacks on LSB embedding, no attacks on +/embedding with comparable accuracy currently exist.
a
b
Fig. 4. (a) Effect of +/- Embedding algorithm before embedding; (b) After embedding
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
3.3. Effect of LSB embedding in DCT coefficients The histogram of quantized DCT coefficients in a JPEG file is approximately symmetrical. This a prior knowledge can be expressed as h[j]- h[-j] = 0, j=1,2,….. Moreover, the histogram is monotonically increasing for j < 0 and decreasing for j > 0. Because the LSB pairs are…,{-4,-3}, {-2, -1}, {0,1},{2,3},……and because LSB embedding evens out the differences in counts in each LSB pair, h[2k] decrease and h[2k+1] increase with embedding for k>0 and the effect is the opposite for k < 0 ( h[2k] increase and h[2k+1] decrease).
a
b
Fig.5. (a) Effect of LSB embedding in the quantized DCT coefficients before embedding; (b) After embedding
3.4. Effect of F5 embedding algorithm without matrix embedding The F5 algorithm was at the heart of designed to pick up the histogram attack while still offering an ample embedding capacity. The big idea of LSB flipping was replaced by the whole of decrementing the absolute value of the DCT coefficient by one. This dessert the natural shape of the DCT histogram, which looks after embedding as if the cover image was necessarily compressed by a lower quality factor.
a
b
Fig.6. (a) Effect of F5 embedding algorithm without Matrix embedding before embedding; (b) After embedding
883
884
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
3.5. Effect of Matrix embedding in Spatial and Transform domain Assuming the message bits are random, each pixel is thus modified with probability 0.5 because this is the probability that the LSB will not match the message bit.
a
b
Fig. 7. (a) Effect of Matrix embedding algorithm in spatial domain before embedding; (b) After embedding
a
b
Fig. 8. (a) Effect of Matrix embedding algorithm in transform domain before embedding; (b) After embedding
3.6. Performance Analysis The image distortion occurs whenever the secret data is embedded in the LSB of each pixel of the image. The image quality can be determined by different distortion metrics. In this paper the Peak-signal-to noise ratio (PSNR) is used as a performance measure for image distortion. It is defined as:
(9) (10)
P. Malathi and T. Gireeshkumar / Procedia Computer Science 93 (2016) 878 – 885
Where xmax is the maximum value that x[i] can attain. For illustration, the 8-bit grayscale images, x max = 255. If the PSNR value is below 30 dB which indicates that the quality of the image is very low, that is the distortion caused by embedding is very high. In order to obtain a high-quality stego image, the PSNR value should be always greater than the 40 dB [5]. Table 1. Comparison of different Least Significant Bits techniques with MSE and PSNR values. LSB Embedding techniques
MSE
PSNR
Flipping the LSB bit in spatial
0.497130
51.166
+/- embedding algorithm in spatial
0.392538
52.19
F5 algorithm with matrix embedding in spatial
0.123087
56.228
Flipping the LSB bit in Transform
0.185587
55.445
+/- embedding algorithm in transform
0.232462
54.467
F5 algorithm with matrix embedding in transform
0.123724
56.206
The LSB approach combined with F5 algorithm and matrix embedding which is applied on both spatial and frequency domain of an image. The Mean squared error (MSE) and Peak signal to noise ratio (PSNR) was used as the performance measure to compare the different LSB techniques. Table. 1. Shows that MSE & PSNR of LSB techniques of which Matrix embedding yields better results.
4. Conclusion In this paper we have used the LSB embedding along with F5 and matrix embedding on images to obtain secure stego-image. Table. 1. Shows that MSE & PSNR of LSB techniques of which Matrix embedding yields better results. These algorithms can be applied for both 8 bit and 24 bit gray scale and color image. We have used matrix embedding with binary hamming codes to get better embedding efficiency which still can be improved with other codes also. References 1. Fridrich, J., 2009. Steganography in digital media: principles, algorithms, and applications. Cambridge University Press. 2. Anderson, R.J. and Petitcolas, F.A., 1998. On the limits of steganography. Selected Areas in Communications, IEEE Journal on, 16(4), pp.474- 481. 3. Provos, N. and Honeyman, P., 2003. Hide and seek: An introduction to steganography. Security & Privacy, IEEE, 1(3), pp.32-44. 4. Rao, J.B., Kuna, R.K. and Kasi, M.K., 2015, January. LSB matching steganalysis based on feature analysis approach. In Electrical, Electronics, Signals, Communication and Optimization (EESCO), 2015 International Conference on (pp. 1-5). IEEE. 5. Johnson, N.F. and Jajodia, S., 1998. Exploring steganography: Seeing the unseen. Computer, 31(2), pp.26-34. 6. Raid, A.M., Khedr, W.M., El-dosuky, M.A. and Ahmed, W., 2014. Jpeg Image Compression Using Discrete Cosine Transform-A Survey. arXiv preprint arXiv:1405.6147. 7. Fridrich, J. and Soukal, D., 2006, February. Matrix embedding for large payloads. In Electronic Imaging 2006 (pp. 60721W60721W). International Society for Optics and Photonics. 8. Munuera, C., 2013. Steganography from a coding theory point of view.Algebraic Geometry Modeling in Information Theory, 8, p.83. 9. Bierbrauer, J. and Fridrich, J., 2008. Constructing good covering codes for applications in steganography. In Transactions on data hiding and multimedia security III (pp. 1-22). Springer Berlin Heidelberg.
885