IMPACT OF SIZE AND BIT
POSITIONING ON THE
PERFORMANCE OF IMAGE
STEGANOGRAPHY
G. S. Gill*
Department of Instrumentation, Kurukshetra University, Kurukshetra, India.
e-mail: [email protected]
N. Jain
Department of Physics, National Institute of Technology, Kurukshetra, India
A. Gaur
Department of Physics, National Institute of Technology, Kurukshetra, India
Abstract:
Steganography is the new trend in hiding data during transmission. Out of its various types, Image steganography has been studied using the technique of Least Significant Bit (LSB) implementation. Message embedding and extraction has been studied and comparison has been done for different sizes of cover image keeping the size of message image constant, for different sizes of message image keeping size of cover image constant and for different bit numbers of the pixel of cover image in which data are to be hidden starting from LSB to MSB on the basis of Mean Square Error (MSE) and Peak Signal to Noise Ratio (PSNR) as these two parameters are most significant in digital transmission.
Keywords- Steganography, Image, LSB, MSE, PSNR
1. Introduction
In today’s digital world of fast growth, new technologies are emerging every day, there is a need of instant communication to send and receive various secret, professional, unprofessional etc. types of messages to support this growth. This communication needs to be free from being hacked and not be falling in the hands where it is not meant to be addressed. There comes the concept of using such methods which should make it difficult for the hackers to retrieve the information from the message that is being sent from one person to another [Akhtar
et.al. (2013)]. Though some researchers might believe that hyper-secured lines of communication can be
developed but it is a relatively costly and difficult to implement such idea. So, there is a need to find a way to support the communication using the pre-existing hardware to minimize the investment of money. For this purpose, two methods can be used: Encryption and Steganography.
Encryption is the method of encrypting the information by sending it in some coded form which may be some extra bits in the starting and the end of the message or any other coding which makes it difficult for the hacker to figure out the exact bits belonging to the real message or information [Cheddad et.al. (2010)]. However, this
method has a drawback that the presence of information in the message is known to be present for sure and hence it always attracts the attention of the hackers towards it [Shahreza (2006)]. Steganography is the method of hiding the information into some other message which is totally irrelevant to the actual information hidden in it. Hiding here specifies embedding the information in such a way that it is imperceptible. It means only sender and receiver party knows that some sort of communication is taking place. Steganography is of three types namely: Text Steganography, Image Steganography and Audio/Video Steganography [Thangadurai and Devi (2014)]. The Steganography presented in this paper is the Image Steganography. Image steganography is broadly categorized into two categories, viz. spatial domain image steganography and frequency domain image
(DWT) or any other frequency transformation mechanism and then the message image is hidden into the coefficients and further inverse is carried out which is to be transmitted.
In this paper focus is given on the spatial domain of the image steganography in which a gray scale message image is hidden into a gray scale cover image using BIT Steganography technique. A message image is the one which is the actual information image and cover image is the image used to hide the message image and the image that is obtained as a result of Steganography is known as a Stego-image. The concept of Image Steganography can be understood by assuming two images (cover image and message image) printed on separate sheets of paper and the cover image sheet is kept over the message image sheet. Hence, the message image is totally invisible and only the cover image is visible which is and must be irrelevant in the context of the message image. It hides the very existence of information in the image being transmitted. In this work hidden process has been done in different bits of the each pixel of cover image starting from LSB to MSB one by one using different sizes of cover and message images and then comparison of the eight different stego images for each size combination of cover and message image is done on the basis of Mean square error (MSE) and Peak signal to noise ratio (PSNR).
MSE is defined as the average of the squares of the errors between the cover image and stego image. More the value of MSE, more will be the amount of error and hence more the degradation of the stego image. Ideal value for MSE is ‘0’. PSNR in simple terms is the ratio between the powers of the signal to the power of the noise which distorted the transmitted signal. As different signals have different dynamic ranges, PSNR is always taken in logarithmic term. In this work PSNR for different stego images has been found out so as to check the amount of distortion. Ideal value of PSNR is Infinity i.e. undefined.
2. Steganography: Application Areas
Steganography is a technique to hide the presence of message which provides high secrecy of message. It has various applications from small offices to big governmental works. Steganography has advantage over cryptography as it hides the very existence of message and provides high level of secrecy to the user. There are various methods for the implementation of image steganography. It can be implemented both in spatial domain and frequency domain. Lather et.al. (2015) presented a detailed comparative analysis of steganography and
cryptography and discussed various methods and uses of image steganography. Cheddad et.al. (2010) made an
attempt to review the important methods for image steganography both in the spatial domain as well as the frequency domain. Thangadurai and Devi (2014) presented the concept of LSB based image steganography and implement it on different file formats.
Different techniques of steganography have different effects on different file formats and main aim of using a technique is to increase the data hiding capacity. Chandramouli and Memon (2001) discussed the LSB steganography and cited the analysis using the mathematical formulations. Tiwari and Shandilya (2010) discussed GIF file format and six different methods for image steganography.
The most widely used method for image steganography is using the LSB. Lot of research is being carried out to enhance the security of data transmission using LSB method and comparison is done between LSB and MSB. Kekre et.al. (2012) presented the LSB based image steganography and an advanced method for LSB
steganography for increasing the performance of the hidden communication system. Garg and Gulati (2012) explained two different algorithms one for each LSB and MSB steganography and compared their results. Rawat and Bhandari (2013) discussed the steganography using LSB method. They presented a new approach steganography for hiding text messages. Akhtar et.al. (2013) discussed the classical LSB based steganography
algorithm and presented a new RC4 algorithm to provide randomization for more security of data. Rao et.al.
(2015) presented a method of steganography in MATLAB (Matrix Laboratory) environment to enhance the security level.
3. Methodology
compulsion as each pixel of the cover image will hide only one single bit of a pixel of a message image so if pixels of both images are converted into 8-bits it can be said that eight pixels of the cover image will hide only one pixel of the message image which implies (size of cover image) >= 8(size of the message image).
3.1. Message Embedding
Step I. Load cover and message images.
Step II. Convert cover and message images from decimal to binary.
Step III. Enter the bit number of the cover image in which bits of message image are to be hidden.
Step IV. Change the entered bit no. of every pixel of cover image with that of the bits of the message image such that 1 pixel of message image is hidden inside 8 pixels of cover image.
Step V. Convert obtained image after changing bits back to decimal form.
Step VI. Obtained image is the stego image. Repeat the process using different bits of cover image and for different size of cover and message image.
Step VII. Compare all the obtained stego images on the basis of MSE and PSNR.
3.2. Message Extraction
Step I. Load stego image.
Step II. Enter a temporary matrix of zeroes of size equal to the size of message image. Step III. Convert stego image and temporary matrix from decimal to binary form. Step IV. Enter the bit no. in which data were hidden in the embedding process.
Step V. Change the bits of the temporary matrix with the entered bit of every pixel of the cover image. Step VI. Convert the temporary matrix back to decimal form. Message image is obtained.
Step VII. Compare the obtained message image with the original message. MSE and PSNR have been calculated using the following relation:
MSE ∗ (1)
Where p is the squared error image and
(2) Where i*j is the size of the cover image, ‘c’ is the cover image and‘s’ is the stego image.
10 ∗ 10 256^2 / (3)
Stego images are compared using the MSE and PSNR. Lesser the value of the MSE more will be the value of PSNR and hence better quality of the stego image. Stego image should be as much similar to the cover image as possible. Extracted message image is to be compared with the original message using the same parameters given above. Extracted message image should be exactly similar to the original message image.
4. Results And Discussion
In the proposed work two cover images of size 512 x 512 (Fig.1) and 256 x 256 (Fig.2) and two message images of size 64 x 64 (Fig.3) and 90 x 90 (Fig.4) have been used.
Four combinations of message and cover images have been obtained. First is Fig.1 (512x512) as cover and Fig.3 (64 x 64) as message. Second is Fig.2 (256x256) as cover and Fig.3 as message. Third is Fig.1 as cover and Fig.4 (90 x 90) as message and fourth is Fig.2 as cover and Fig.4 as message. Eight stego images and extracted message image are obtained for each combination of cover and message image and results are then compared using MSE and PSNR.
Stego images and extracted message image for all the four combinations are shown in Fig.5 to Fig.40. In these combinations Figs.5-13 represents Case I where stego images and extracted message image are obtained using Fig.1 as cover and Fig.3 message image. On similar lines Figs. 14-22, 23-31 and 32-40 represent Case II, III and IV where stego images and extracted message image are obtained using Fig.2, Fig. 1 and Fig.2. as cover images and Fig.3, Fig.4 and Fig. 4 as message images, respectively. It can be observed from the stego images that as one moves from LSB to MSB, the quality of the stego images goes on degrading which can be easily noticed between the stego images for 7th LSB and MSB for all the cases. The stego images using LSB, 2nd LSB and so
on up to 5th LSB look very similar to the cover image and it is very difficult to differentiate these stego images
from their respective cover images. Now, to compare the results of the cover images of different sizes with message image of same size, case I and case II or case III and case IV can be considered. It can be seen that quality of the stego images of case II is poorer than that of the case I. This is because the size of the cover image of the case II is smaller than the cover image of case I which means by changing the same number of the pixels of the cover images of different sizes, the smaller one will give poor quality of the stego images means more will be the values of MSE and lesser will be the PSNR between the cover and stego images for smaller cover image as compared to the larger one should be obtained.
Fig. 5. Using LSB Fig 6. Using 2nd LSB Fig. 7. Using 3rd LSB Fig.8. Using 4th LSB Fig.9. Using 5th LSB
Fig. 10. Using 6th LSB Fig. 11. Using 7th LSB Fig 12. Using MSB Fig. 13. Extracted Image
Fig. 14. Using LSB Fig. 15. Using 2nd LSB Fig. 16. Using 3rd LSB Fig. 17. Using 4th LSB Fig. 18. Using 5th LSB
Fig. 19. Using 6th LSB Fig. 20. Using 7th LSB Fig. 21. Using MSB Fig. 22. Extracted Image
Fig. 23. Using LSB Fig. 24. Using 2nd LSB Fig. 25. Using 3rd LSB. Fig. 26. Using 4th LSB Fig. 27. Using 5th LSB
Fig. 28. Using 6th LSB Fig. 29. Using 7th LSB Fig. 30. Using MSB Fig. 31. Extracted Image
Fig. 32. Using LSB Fig. 33. Using 2nd LSB Fig. 34. Using 3rd LSB Fig. 35. Using 4th LSB Fig. 36. Using 5th LSB
Fig. 37. Using 6th LSB Fig. 38. Using 7th LSB Fig. 39. Using MSB Fig. 40. Extracted Image
To compare the cover images of same size with message images of different size, case I and case III or case II and case IV can be considered. The quality of the stego images of case II is much better than that of the stego images of case IV. This is clear visible in Fig.21 and Fig.39 which are the stego image using MSB for case II and case IV respectively. It implies that by taking same size of the cover image, case in which size of the message is lesser will have better quality of the stego images and hence lesser MSE values and more values of PSNR. Fig.13, Fig.22, Fig.31 and Fig.40 are the extracted message images for case I to case IV and are exactly same as their respective original message image. Due to which the MSE and PSNR between the original and extracted message in all cases is ‘0’ and ‘infinity’ respectively which are the ideal values.MSE and PSNR values for case I to case IV are given in TABLE I to TABLE IV respectively. As one moves from LSB to MSB the value of MSE increases and hence PSNR decreases in all the cases which justify the degradation in the quality of the stego images from LSB towards MSB.
Table 1. MSE and PSNR values for case I
Fig.1 as cover and Fig.3 as message
BIT MSE PSNR
Table 2. MSE and PSNR values for case II
Fig.2 as cover and Fig.3 as message
BIT MSE PSNR
LSB 0.25 54.17 2 1.00 48.17 3 4.02 42.12 4 15.95 36.14 5 64.72 30.05 6 255.08 24.10 7 1045.69 17.97 MSB 4021.00 12.12
Table 3. MSE and PSNR values for case III
Fig.1 as cover and Fig.4 as message
BIT MSE PSNR
LSB 0.12 57.25 2 0.49 51.25 3 1.96 45.23 4 7.94 39.17 5 32.20 33.09 6 124.06 27.23 7 508.38 21.10 MSB 2041.00 15.07
Table 4. MSE and PSNR values for case IV
Fig.2 as cover and Fig.4 as message
BIT MSE PSNR
LSB 0.49 51.24 2 1.98 45.20 3 7.88 39.20 4 31.74 33.15 5 126.07 27.16 6 503.83 21.14 7 2048.13 15.05 MSB 8050.00 9.11
The values of MSE and PSNR for case I are better than that of case II and values of MSE and PSNR for case III are better than that of the case IV due to the same size of the message image but difference in the size of the cover image. Similarly, MSE and PSNR values for case I are better than that of case III and MSE and PSNR values of case II are better than that of the case IV due to the same size of cover but difference in the size of the message image.
5. Conclusion
References
[1]. Akhtar, N.; Johri, P.; Khan, S. (2013). Enhancing the Security and Quality of LSB based Image Steganography, CICN-2013, pp. 385-390.
[2]. Chandramouli, R.; Memon, N. (2001). Analysis of LSB Based Image Steganography Techniques, Proc. Image Processing-2001, pp. 1019-1022.
[3]. Cheddad, A.; Condell, J.; Curran, K.; McKevitt, P. (2010). Digital Image Steganography: Survey and Analysis of Current Methods, Signal Processing, 90(3), pp. 727-752.
[4]. Garg, R.; Gulati, T. (2012). Comparison Of Lsb&Msb Based Steganography In Gray-Scale Images, IJERT, 1(8), pp. 788-799.
[5]. Kekre, H. B.; Mishra, D.; Khanna, R.; Khanna, S.; Hussaini, A. (2012). Comparison between the basic LSB Replacement Technique and Increased Capacity of Information Hiding in LSB’s Method for Images, IJCA, 45(1), pp. 33-38.
[6]. Lather, Y.; Goyal, M.; Lather, V. (2015). Review Paper on Steganography Techniques, IJCSMC, Signal Processing, 4(1), pp.
571 – 576.
[7]. Rao, M.K.; Reddy, K.P.; Saranya, K.E. (2015). Security Enhancement in Image Steganography a MATLAB Approach, MEJSR,
23(2), pp. 357-361.
[8]. Rawat, D. ; Bhandari, V. (2013). Steganography Technique for Hiding Text Information in Color Image using Improved LSB Method, IJCA, 67(1), pp. 22-25.
[9]. Shahreza, M. S. (2006). Stealth Steganography in SMS, Proc. IFIP International Conference on Wireless and Optical Communication Network, pp. 316-321.
[10]. Thangadurai, K.; Devi, G.S. (2014). An analysis of LSB Based Image Steganography Techniques, Proc. ICCCI -2014, pp. 1-4, Coimbatore, India.
[11]. Tiwari, N.; Shandilya, M. (2010). Evaluation of Various LSB based Methods of Image Steganography on GIF File Format, IJCA,