Implementation of LSB Steganography and Its Evaluation for Various File Formats (LSB, JSTEG)
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 2 Issue 6, June - 2013 Implementation of LSB Steganography and its Evaluation for Various File Formats (LSB, JSTEG) Vivek Kumar, Sandesh Kumar, Lavalee Singh, Prateek Yadav MANGALAYATAN UNIVERSITY1, 2,3,4 ALIGARH Keywords: Steganography, Least ABSTRACT: Significant Bit (LSB), GIF, PNG, BMP. Steganography is derived from the Greek word steganos which literally means 1. INTRODUCTION “Covered” and graphy means “Writing”, In the current trends of the world, the i.e. covered writing. Steganography refers technologies have advanced so much that to the science of “invisible” Most of the individuals prefer using the communication. For hiding secret internet as the primary medium to transfer information in various file formats, there data from one end to another across the exists a large variety of steganographic IJERTIJERTworld. There are many possible ways to techniques some are more complex than transmit data using the internet: via e-mails, others and all of them have respective chats, etc. The data transition is made very strong and weak points. The Least simple, fast and accurate using the internet. Significant Bit (LSB) embedding However, one of the main problems with technique suggests that data can be sending data over the internet is the security hidden in the least significant bits of the threat it poses i.e. the personal or cover image and the human eye would be confidential data can be stolen or hacked in unable to notice the hidden image in the many ways. Therefore it becomes very cover file. This technique can be used for important to take data security into hiding images in 24-Bit, 8- Bit, Gray scale consideration, as it is one of the most format. This paper explains the LSB essential factors that need attention during Embedding technique and Presents the the process of data transferring. evaluation for various file formats. IJERTV2IS60823 www.ijert.org 2987 International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 2 Issue 6, June - 2013 Data security basically means protection of compression formats are GIF[3] and BMP data from unauthorized users or hackers and formats. providing high security to prevent data We have used an 8-bit image size for modification. This area of data security has implementation of our steganography. gained more attention over the recent period Improvement in stegnographic techniques is of time due to the massive increase in data make it possible to apply the Detecting LSB transfer rate over the internet. Steganography in Colour and Gray- Scale In order to improve the security features in Images which were confined to gray scale data transfers over the internet, many images in the initial stages The difficulty in techniques have been developed like: colour images control is solved later on in Cryptography, Steganography and digital many techniques such as the analysis of the watermarking. While Cryptography is a variation of the gradient energy. The secret method to conceal information by message embedded in the target image is encrypting it to cipher texts and transmitting detected in both gray and colour images, and it to the intended receiver using an unknown the length of the embedded message is key, Steganography provides further estimated [5, 6]. security by hiding the cipher text into a 2.3 HIDING METHODS IN IMAGE seemingly invisible image or otherIJERT IJERT STEGANOGRAPHY formats. In Image Steganography, There are a variety of methods using which information can be 2.1. IMAGE STEGANOGRAPHY Image compression techniques are hidden in images. extensively used in steganography. Among Least Significant Bit Replacement the two types of image compressions, lossy Technique: In image steganography almost compression and loss less compression; all data hiding techniques try to alter lossless compression formats offer more insignificant information in the cover image. promises. Lossy compression may not Least significant bit (LSB) insertion is a maintain the original image’s integrity. common, simple approach to embedding Lossless compression maintains the original information in a cover image. For instance, a image data exactly, hence it is prefered. simple scheme proposed, is to place the Example of Lossy compression format is embedding data at the least significant bit JPEG format files. Examples of Lossless (LSB) of each pixel in the cover IJERTV2IS60823 www.ijert.org 2988 International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 2 Issue 6, June - 2013 image[7,8,9] . The altered image is called message. For 24 bit image, the colours of stego-image. Altering LSB doesn’t change each component like RGB (red, green and the quality of image to human perception blue) are changed. LSB is effective in using but this scheme is sensitive a variety of BMP images since the compression in BMP image processing attacks like compression, is lossless. But for hiding the secret message cropping etc. We will be emphasizing more inside an image of BMP file using LSB on this technique for the various image algorithm it requires a large image which is formats. used as a cover. Consider an 8-bit grayscale bitmap image 2.4 MODERATE SIGNIFICANT BIT where each pixel is stored as a byte REPLACEMENT TECHNIQUE: representing a grayscale value. Suppose the The moderate significant bits of each pixel first eight pixels of the original image have in the cover image can be used to embed the the following grayscale values secret message. This method improves 11010010 sensitivity to modification, but it degrades 01001010 the quality of stego-image. 10010111 Experiments have shown that the length of 10001100 hidden messages embedded in the leastIJERT IJERT00010101 significant bits of signal samples can be 01010111 estimated with relatively high precision. 00100110 2.5 LEAST SIGNIFICANT BIT 01000011 SUBSTITUTION To hide the letter C whose binary value is LSB (Least Significant Bit) substitution is 10000011, we would replace the LSBs of the process of adjusting the least significant these pixels to have the following new bit pixels of the carrier image. It is a simple grayscale values: approach for embedding message into the 11010011 image. The Least Significant Bit insertion 01001010 varies according to number of bits in an 10010110 image. For an 8 bit image, the least 10001100 significant bit i.e., the 8th bit of each byte of 00010100 the image is changed to the bit of secret IJERTV2IS60823 www.ijert.org 2989 International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 2 Issue 6, June - 2013 01010110 ensuring the a legal range of data values is 00100111 preserved. The difference being that the 01000011 choice of whether to add or subtract one Note that, on average, only half the LSBs from the cover image pixel is random. This need to change. The difference between the will have the same effect as LSB cover (i.e. original) image and the stego replacement in terms of not being able to image will be hardly noticeable to the perceive the existence of the hidden human eye. Figure 2.5 that show a cover message. This steganographic technique is image and a stego image (with data is called LSB matching. Both LSB embedded); there is no visible difference replacement and LSB matching leave the between the two images. LSB unchanged if the message bit matches the LSB. When the message bit does not match the LSB, LSB replacement replaces the LSB with the message bit; LSB matching randomly increments or decrements the data value by one. LSB matching is also known as ±1 embedding. IJERTIJERT Fig.1 Block Diagram for implemented Logic of LSB embedding. 2.6 DESIGN DETAILS Above, replaces the LSBs of data values to This section focuses on algorithms of LSB match bits of the message. It can equally Steganography and Steganalysis[10] alter the data value by a small amount IJERTV2IS60823 www.ijert.org 2990 International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 2 Issue 6, June - 2013 A. ALGORITHM FOR HIDING bitmap digital images. Since BMP is not (STEGANOGRAPHY) widely used the suspicion might arise, if it is 1. Read the original image and the image transmitted with an LSB stego. When image which is to be hidden in the original are used as the carrier in Steganography they image are generally manipulated by changing one 2. Shift the image to hide in the cover or more of the bits of the byte or bytes that image by X bits. make up the pixels of an image. The 3. And the original image or cover image. message can be stored in the LSB of one 4. The shifted hidden image and the colour of the RGB value or in the parity bit result of step 3 are bitored. This makes of the entire RGB value. A BMP is capable changes only in the X LSB bits so that of hiding quite a large message. LSB in the image is hidden in the original BMP is most suitable for applications, image. where the focus is on the amount of In MATLAB we convert it to unit8 format. information to be transmitted and not on the This image can be called as the stego image secrecy of that information. If more number of bits is altered, it may result in a larger B. ALGORITHM FOR STEGANALYSIS possibility that the altered bits can be seen 1.The stego image is bit shifted by 4 bitsIJERT IJERTwith the human eye. But with the LSB the since it was shifted by 4 bits to insert it main objective of Steganography is to pass a into the original image. message to a receiver without an intruder 2.The image is the ANDED with 255 i.e., even knowing that a message is being 11111111, which gives the original passed is being achieved.