Hello Everyone!
Steganography is a system in which a user can hide a message within an image. Now you’re wondering if you are just writing the words in tiny font so it would be hard to notice. No, we are altering the image data to hide the image so you won’t even be able to see a difference after the message has changed. Remember the pixels we talked about last week? I’ll give a quick review, all images are made up of tiny squares called pixels and each pixel contains either an eight-bit string of numbers (gif) or the pixel could contain 3 eight-bit strings (jpg). These bit strings are in binary representing the color the pixel represents.
To start the encoding you first must convert your message into its binary form. To do this you can look up an ASCll to the binary conversion chart. If your first word in the message is Hello you would convert the H to 01001000. To encode this into the picture we must first select a pixel to start at. Once selected we must pull up the red, green, and blue bit strings. This will allow us to encode our message by using the least significant bit method. For a jpg, there are 3 eight-bit strings for red, green, and blue, the last number in each string is the least significant bit. The receiver of the message will have to know where you started but also if you are modifying the red, green, or blue bit string or some combination of the three. If the red string is 00011001 and we need to encode the H(01001000) we would change the last 1 in red string as it’s the 8th bit and change it to H’s first bit which is 0. The red string would then read 00011000. From there you simply continue with the blue and green and only change the least significant bit. Continue this with the next pixel and so on until your message is done. The receiver will have to know the start point and if you were modifying the red, green, or blue bit or some mix for each pixel to decode. So how can we not see the difference if we are changing the color? The 3 eight-bit strings can hold over 16 million colors with a jpg. Our eyes aren’t sharp enough to see the difference between all 16 million and the message will only change the color of the pixel by 1 so the difference in the two colors won’t be noticeable to the human eye. That’s why this message works for hiding messages as no one can know it’s there from simply looking at the image. I hope this explanation taught you guys something new today and I will see you in a new post next week!
Take a look at how chat helped me structure this post but I also identified a few weaknesses of using chat.
User
can you explain how steganography can be used to hide text in an image using the LSB method?
ChatGPT
ChatGPT
Hiding text in an image using steganography involves embedding the message directly into the image data in a way that makes the alterations imperceptible to an observer. This is usually achieved by manipulating the image’s pixels or the properties of those pixels in subtle ways. One of the most popular methods for achieving this is called Least Significant Bit (LSB) insertion, but there are other techniques as well. Let’s explore how theis methods work:
Least Significant Bit (LSB) Insertion
The LSB method takes advantage of the binary representation of an image’s pixels. An image is made up of pixels, and each pixel has a color value represented by bits. In a simple grayscale image, each pixel’s color might be represented by 8 bits (1 byte), meaning there are 256 possible shades of gray (from 0 to 255). In color images, each pixel’s color is usually represented by three values (red, green, and blue), each of which is typically 8 bits, totaling 24 bits per pixel.
The LSB of a byte is the rightmost bit. Altering it changes the byte’s value by at most 1, which is generally imperceptible in an image’s pixel*. Here’s how the process typically works:
Convert the Text to Binary: The message to be hidden is first converted into a binary string. Each character in the text is represented by its ASCII code in binary form**.
Modify the Image’s Pixels: Starting from a selected point in the image, the LSB of one or more of the color values (red, green, blue) of each pixel is replaced with the bits of the binary string. This process continues until the entire message is encoded into the image.
Extracting the Message: To extract the message, the recipient must know the starting point and the method used for encoding (e.g., which color channels were used, and in what order). The recipient then reads the LSBs of the pixels, reconstructing the binary string, which is then converted back into text.
*Chat doesn’t explain why it isn’t seeable due to the vast color range and how the human eye cannot identify the slight shade change.
**No explanation of how to convert the binary string or an example of a letter or word. The user should be able to use this as an example of how to encode and this output by chat doesn’t give the user anything to check their work against.
Overall Chat does not give the user an in-depth explanation with examples unless specified to do so. This means many users will miss out on truly understanding the concepts they look up on AI if they do not understand how to properly enter a proposal for the AI. Hope this taught you a little bit about the weakness of AI.