Introduction
Steganography, the art of hiding information in plain sight, has intrigued cryptographers and curious minds alike. In this blog post, we’ll delve into the fascinating world of LSB (Least Significant Bit) steganography, where secrets are hidden between pixels.
The LSB
Imagine a digital image, a canvas of pixels, each harboring a secret. Grayscale or color, it matters not. Our focus lies on the eighth bit—the Least Significant Bit. Why? There’s something unnoticed about it, as if it’s hiding in the background.
Bit Manipulation
Each pixel in an image is a trio of Red, Green, and Blue (RGB) intensities. These values range from 0 to 255. But let’s zoom in on the red channel. The leftmost bit carries the most weight, while the rightmost bit—the LSB—barely uses 1 bit. By tweaking the LSB, we alter the pixel’s value ever so slightly. The human eye remains blissfully ignorant. This technique, known as dithering, can be used to add subtle nuances to an image, giving it a depth and texture that would otherwise be lost. It also allows for greater flexibility in manipulating an image, as small changes can have a big effect.
Hiding Secrets
Take a message that you want hidden. Convert it into a sequence of bits. Now, for each pixel, replace its red channel’s LSB with a corresponding bit from your message. The image remains virtually unchanged. Yet, your secret message dances within those seemingly innocent pixels. This is done by incorporating binary code into the image itself, taking a bit and altering it to letters that correspond with the colors red, green and blue. Image below shows an example of this being used.
This image shows three different colors of bits being corresponded with different series of codes. Red is 00111010, green is 11101010, and blue is 11100101. If you were to hide the letter m for instance in this image, you would need to add the code for m which is 1001101, to the red bit, and the last number in the series is then swapped with the last number for the red code, in this case the last number in the red would be switched with the last number in the blue.
Detecting Whispers
To discover the hidden message, compare the original image with the modified one. The difference lies in the subtle shifts. Using a Steganography decoder you can reveal the whispers. Decode the altered LSBs, and your secret emerges. These are a really smart way to hide secret information, and is what people have done to hide secrets from people that they don’t want seeing, usually with illegal intent involved.
Your Turn!
Download an image, practice the LSB waltz, and send me your results. Let’s dance with bits and weave secrets into pixels! Let me know how it goes. Have fun!
(Copilot/ChatGPT.4.0 was used for about 70% of this post.)