Proceedings of 2014 RAECS UIET Panjab University Chandigarh, 06 – 08 March, 2014 Improved Detection of Least Significant Bit SteganographyAlgorithms in Color and Gray Scale Images Manu Devi Department of Computer Engineering The Technological Institute of Textile & Sciences Bhiwani, Haryana, India manughanghas26@gmail.com Abstract— This paper proposes an improved LSB (least Significant bit) based Steganography technique for images imparting better information security for hiding secret information in images. There is a large variety of steganography techniques some are more complex than others and all of them have respective strong and weak points. It ensures that the eavesdroppers will not have any suspicion that message bits are hidden in the image and standard steganography detection methods can not estimate the length of the secret message correctly. In this paper we present improved steganalysis methods, based on the most reliable detectors of thinly-spread LSB steganography presently known, focusing on the case when grayscale Bitmaps are used as cover images. Keywords—LSB; Steganography; Steganalysis; Gray Images; RGB. I. INTRODUCTION An important aspect of the way of life is communication. A lot of devices present today have the ability to transmit various information between them using different ways of communication, like in secure public networks, different types of wireless networks and the most used is the Internet. In some cases it is needed to keep the information travelling through discrete kinds of channels secret. Steganography is the art of thrashing information in ways that prevent the detection of hidden messages. Steganography is a technique that involves hiding a message in an suitable carrier e.g., an image, an audio or video file. The carrier can then be sent to a receiver without anyone else knowing that it contains a hidden message [1]. Literally meaning “covered writing”, it includes a broad collection of secret communication methods like undetectable inks, microdots, character organization, digital signatures, covert networks, spread spectrum etc. that conceal the very existence of message. An image steganographic scheme is one kind of steganographic systems, where the confidential message is hidden in a digital image with some hiding method. Someone can then use a suitable embedding procedure to recover the hidden message from the image. The unique image is called a cover image in steganography, and the messageimplanted image is called a stego image [2]. The basic structure of Steganography is made up of three constituent: the carrier, the message, and the key. Steganos means covered or secret, and graphy, means writing or drawing. In this paper we present improved steganalysis methods, based on the most reliable detectors of thinly-spread LSB steganography 978-1-4799-2291-8/14/$31.00 ©2014 IEEE Nidhi Sharma Department of Computer Engineering The Technological Institute of Textile & Sciences Bhiwani, Haryana, India Nidhisharma1725@gmail.com presently known, focusing on the case when grayscale Bitmaps are used as cover images. In an efficient steganographic system, a normal cover medium should not be noticeable from a stego-object. The aims of this paper are a) to suggest improved steganalysis statistics for LSB steganography, b) to use huge image libraries to give experimental evidence of the improvement, and c) to observe closely the upper limits on bit rate which keep LSB steganography undetectable. II. IMAGE BASED STEGANOGRAPHY Embedding a message into an image needs two files. The first is the innocent-looking image that will grip the hidden information, called the cover picture . The second file is the message in which the information to be hidden. A memorandum may be plain-text, cipher-text, other images, or something that can be embedded in a bit stream. When shared, the cover image and the embedded message make a stegoimage. A stego-key (a type of password) may also be used to hide then later decode the message. Most steganography software recommends the use of lossless 24-bit images such as BMP. The next- best complementary to 24-bit images is 256color gray-scale images. The most frequent of these are BMP files. Embedding data using Modified LSB (Least Significant bit) Insertion: A. Embed data in Least Significant Byte of each pixel across Edge areas: LSB insertion is a common, simple approach in embedding information in a cover [13] file. But in this improved LSB technique we will insert the data only in last significant byte i.e. blue component of a pixel as that having lowest contribution to the color image according to Human Visual System investigation. To hide a message in a 24-bit image, the B component of each pixel of RGB color image is modified. For example, the letter A can be hidden in a pixel with original data as: (00100111 11101001 11001000) The binary value for A is 01000001. Inserting the binary value for A in the given pixel would result in (00100110 11101001 01000001) These bits are the only actually changed in the bytes used. On average, LSB requires that only half the bits in an image be changed. To hide more data, the cover image should have enough edge pixels to hide the data. B. Embedding data using 1-3-4 LSB Insertion across Smooth areas. To embed the data in smooth areas 1-3-4 LSBs Insertion technique has been utilized which hides data in 1-bit in 1 least significant bit of Red component (Most significant byte),3-bits in 3 least significant bits of Green component and 4 bits in 4 least significant bits of Blue component(Least significant byte) of each selected pixel .This ratio 1:3:4 has been taken depending on their relevant contribution of each red, green and blue component to the colors of RGB image. C. Selecting the Edge Pixels Randomly To select the edge pixel randomly, a pseudorandom number generator (PRNG) will be used. Pseudorandom number generator is an algorithm that generates a sequence of numbers, the elements of which are around free of each other. The production of pseudorandom number generators is not truly random - they only approximate some of the properties of arbitrary numbers. To make use of a PRNG, it first demands a seed. Seeding is the technical term for giving it an initial value, from which it can shoot out a sequence. If a PRNG is given the similar beginning, then it will give the same set of numbers every time and the elements of which are approximately independent of each other. The outputs of pseudorandom number generators are not truly random - they only approximate some of the properties of random numbers. To use a PRNG, it first need a seed. Seeding is the technical term for giving it an initial value, from which it can shoot out a sequence. If a PRNG is given the similar seed, then it will give the same set of numbers every time. III. LSB STEGANOGRAPHY LSB insertion is a simple approach for embedding information in a protect file. It is vulnerable to even a slight image manipulation. Image translation from a format like GIF or BMP which reconstructs the original message exactly (i.e., lossless compression in which bits are compressed without losing any bits during compression and exactly recovered during decompression) to a JPEG which does not(i.e., lossy compression in which some bits are lost during compression resulting in some loss in fidelity) and then back could destroy the information hidden in the LSBs. LSB placing can be performed in 24-bit, 8-bit or gray-scale images. Here we consider simple Least Significant Bit (LSB) steganography, long-known to steganographers, in which the hidden message is transformed to a stream of bits which replace the LSBs of pixel values in the cover image. When the hidden message contains fewer bits than the cover image has pixels, we assume that the modifications are spread randomly around the cover image according to a secret key shared with the intended recipient of the stego image. This sort of steganography is only suitable for images stored in bitmap form or losslessly compressed. One should clearly distinguish this method (perhaps best called LSB replacement) from an alternative, where the cover pixel values are randomly incremented or decremented so that the least significant bits match the hidden message (this should perhaps be called LSB matching). In the latter case the message is still conveyed using the LSBs of the pixel values of the image, but the simple variation to the embedding algorithm makes it much unbreakable to detect. None of the methods discussed here will detect this alternative form of steganography, and definitely it is a much more difficult task to do so: a detector for LSB matching in full colour bitmaps but it is ineffective for grayscale covers; another detector which works for full colour images but it is only reliable for very large embedded messages and barely effective for grayscale covers. Least significant bit (LSB) insertion is a simple approach to embedding information in image file. The straightforward steganography techniques embed the bits of the message directly into least significant bit plane of the cover-image in a deterministic sequence. The advantage of LSB-based method is easy to implement and high message pay-load. Although LSB secretes the message in such way that the humans do not identify it, it is still possible for the opponent to recover the message due to the simplicity of the technique Therefore; a system named Secure Information Hiding System (SIHS) is proposed to improve the LSB scheme. It rises above the sequence-mapping problem by embedding the massage into a set of arbitrary pixels, which are scattered on the cover-image. IV. PROPOSED WORK Least Significant Bit Insertion Method One of the most common techniques used in steganography today is called least significant bit (LSB) insertion. This method is just what it sounds like; the least significant bits of the cover-image are altered so that they form the insert information. The following example explains how the letter A can be hidden in the first eight bytes of three pixels in a 24-bit image. Pixels: (00100111 11101001 11001000) (00100111 11001000 11101001) (11001000 00100111 11101001) A: 01000001 Result: (00100110 11101001 11001000) (00100110 11001000 11101000) (11001000 00100111 11101001) A. Algorithm to insert text message using Grayscale Image Step 1: Study the cover image & text message, which is to be secreted in the cover image. Step 2: Change text message into binary. Step 3: Compute LSB of each pixel of cover image. Step 4: Put back LSB of cover image with each bit of secret message one by one. Step 5: Write stego image. B.Algorithm to regain text message using Grayscale Image Step 1: Read the stego image. Step 2: Determine LSB of each pixel of stego image. Step 3: Recover bits & convert each 8 bit into character. Step 4: Determine MSE & PSNR. For example, using a cover byte 11001000 to hide 3 bit of information (111), with a simple LSB results in 11001111, this has a difference of 7 values with respect to the original. Applying the method proposed here to the above example (in th this case, decreasing the 4 least Significant Bit, which have been used 3 bits LSB to hide information) results in 11000111, with a distance of 1 from the original byte but with the same hidden information. V.RESULTS The experimental results presented in this section describe the performance of our proposed technique. For steganography we use LSB based well known embedding methods. The LSB insertion was used to embed the message in to the cover image. The selection of pixel to embed was crucial, since the LSB insertion modifies the pixels. Modified pixels in areas of the image where there are pixels that are most like their neighbors were much more noticeable to the normal eye. To solve this problem edge pixel were randomly selected to embed the message. The benefit of LSB is its ease to embed the bits of the message directly into the LSB plane of cover image. Also its perceptual transparency where the changes made to the cover-image cannot be draw by human being eye. On the opposing, the LSB is very perceptive to any kind of filtering or manipulation of the stego-image. Fig. 1. Flow diagram of proposed work In theory the three least significant bits of the pixel have changed, introducing a small alteration, but the difference between the old and new color represents a leap of 65793 colors in the scale of colors. One method that would introduce more efficiency and less distortion would store the 3 bits of information to hide in the same color. Using the same example, the 3 bits of information will be introduced in the 3 LSB bits of green color (1010100010101111-10101000). LSB match adaption Following the method LSB Match (designed to work with a single LSB bit) has been adapted to allow an LSB Match with any number of LSB bits. This method calculates the distance between the original color and the steganographic color. Should the distance is greater than a certain threshold (determined by the number of bits to hide) the color is decremented to get a final color closest to the original, Simplying a further reduction in the alteration caused by the hidden information. Fig. 2. Image Set For Experiments standard RS statistic of [4]. The experiment has been repeated with the cover images first resembled down to a number of different sizes, and it is instructive to see what a difference this makes to the reliability of the RS statistic. Fig. 3: Stego Image Result Of LSB Embedding Technique Fig. 5: ROC curves for a set of 1200 uncompressed images, originally 1024×768 but resembled down to a variety of smaller sizes. In each case 10% steganography successful used, and tested against the regular RS statistic. Accuracy Calculation Generally, stego-image quality is considered from two aspects. First, we use the Peak Signal-to-Noise Ratio (PSNR) measurement to evaluate the difference between the stego and cover images. Second, we judge against the quality of the stego image with the cover image as seen by the Human Visual System (HVS). Mean Square Error (MSE) is between the cover and stego images. For a cover image thickness and height are m and n, where I denote the cover-image and K denotes the stego-image MSE is defined as: The general PSNR formula is defined as: Fig. 4: Stego Images Result of Proposed Method Figure shows some of the results from the database. The chart displayed shows the ROC curves for a small set of 1200 uncompressed images, when 10% LSB steganography (i.e. 0.1 bits per pixel) is used and the images are tested with the The maximum value of a pixel in grayscale image is 255. A higher PSNR indicates that the quality of the stego image is batter and more similar to the cover image. This approach hides the text in selected dark places but the data is not put directly in those pixels and put in low bits of each eight bit pixel. It uses the 3 helpful approaches, which are: 1. Least significant bit insertion 2. Grey level approach with edge exposure 3. Randomization .The LSB insertion was used to embed the message in to the cover image. The selection of pixel to embed was crucial, since the LSB insertion modifies the pixels. Modified pixels in areas of the image where there are pixels that are most like their neighbors were much more noticeable to the normal eye. The advantage of LSB is its simplicity to embed the bits of the message directly into the LSB plane of cover image. Also its perceptual transparency where the changes made to the cover-image cannot be traced by human eye. On the contrary, the LSB is very perceptive to any kind of filtering or manipulation of the stego-image. CONCLUSION In conclusion, we have suggested a number of improved methods for deciding whether a grayscale bitmap contains LSB steganography or not. The paper proposed a new technique for information security. It presents an improved steganography method for embedding secret message bit in least significant byte of non adjacent and random pixel locations in edges of images and 1-3-4 LSBs of red, green and blue components of randomly selected pixels across soft areas. No inventive cover image is required for the extraction of the secret message. The research was aimed towards the evaluation and development of a new and enhanced data hiding technique based on LSB. The chief objective of this paper is to propose a solution that is robust, effective and to make it very unbreakable for human eye to predict and detect the existence of any secret data inside the host image. In most cases, however, we have not undertaken to give a theoretical explanation of why the improvement occurs – our new methods are heuristic and there is no claim of optimality. The security of the hidden message is very high by using the password when compared to the additional methods. The image feature is also superior The Entropy, MSE and capabilities are improved with acceptable PSNR compared to the existing algorithm. In future the algorithm be able to be tested with the transform methods. The proposed solution has not only achieved what was required but has also increased the data hiding capacity of the host image by utilizing all the pixels. We hope that the results presented here will stimulate research to this end. REFERENCES [1] [2] [3] [4] [5] [6] Mamta Juneja and Parvinder S. Sandhu”An Improved LSB Based Steganography Technique for RGB Color Images” International Journal of Computer and Communication Engineering, Vol. 2, No. 4, July 2013. Westfeld, A., Pfitzmann, A.: Attacks on steganographic systems. In: Proc. Information Hiding Workshop. Volume 1768 of Springer LNCS. (1999) 61–76. Westfeld, A.: Detecting low embedding rates. In: Proc. Information Hiding Workshop. Volume 2578 of Springer LNCS. (2002) 324–339. Chandramouli, R., Memon, N.: Analysis of LSB based image steganography. In: Proc. IEEE International Conference on Image Processing. (2001) 1019–1022 Fridrich, J., Goljan, M., Du, R.: Reliable detection of LSB steganography in color and grayscale images. Proc. ACM Workshop on Multimedia and Security (2001) 27–30. Fridrich, J., Goljan, M., Soukal, D.: Higher-order statistical steganalysis of palette images. In Delp III, E.J., Wong, P.W., eds.: Security and Watermarking of Multimedia Contents V. Volume 5020 of Proc. SPIE. (2003) 178–190. [7] [8] [9] [10] [11] [12] [13] [14] [15] Dumitrescu, S., Wu, X., Wang, Z.: Detection of LSB steganography via sample pair analysis. In: Proc. Information Hiding Workshop. Volume 2578 of Springer LNCS. (2002) 355–372. Morkel.T, J.H.P. Eloff, M.S. Olivier, “An Overview of Image Steganography”, Proceedings of the Fifth Annual Information Security South Africa Conference , Sandton, South Africa, (2005). Ker, A.: Quantitive evaluation of Pairs and RS steganalysis. In Delp III, E.J., Wong, P.W., eds.: Security, Steganography, andWatermarking of Multimedia Contents VI. Volume 5306 of Proc. SPIE. (2004) 83–97. Fridrich, J., Goljan, M.: Practical steganalysis of digital images – state of the art. In Delp III, E.J., Wong, P.W., eds.: Security and Watermarking of Multimedia Contents IV. Volume 4675 of Proc. SPIE. (2013) 1–13 Sharp, T.: An implementation of key-based digital signal steganography. In: Proc. Information Hiding Workshop. Volume 2137 of Springer LNCS. (2001) 13–26 Harmsen, J., Pearlman, W.: Higher-order statistical steganalysis of palette images. In Delp III, E.J., Wong, P.W., eds.: Security and Watermarking of Multimedia Contents V. Volume 5020 of Proc. SPIE. (2003) 131–142 Fridrich, J., Goljan, M., Du, R.: Steganalysis based on JPEG compatability. In Tescher, A.G., Vasudev, B., Bove, Jr, V.M., eds.: Multimedia Systems and Applications IV. Volume 4518 of Proc. SPIE. (2002) 275–280 Felzenszwalb, P.F., Huttenlocher, D.P.: Image segmentation using local variation. In: Proc. IEEE Computer Society Conference on Computer Vision and Pattern Recognition. (1998) 98–104 C.-K. Chan and M. Cheng, “Hiding data in images by simple LSB substitution,” Pattern Recognition, vol. 37, no. 3, pp. 469-474, 2004.