In the digital age, data is constantly traveling through the internet, making privacy and security vital. As cybersecurity threats evolve, so do the methods to counter them. One method is called steganography: a method that dates back centuries, but has found a use in modern times. This post will be taking a look at this subsect of cryptography, and how it can be used to hide text within an image by changing the least significant bits.
What is Steganography?
Steganography refers to the practice of hiding a message within another medium, ensuring that only the sender and intended recipient know of its existence. Unlike encryption, which indicates that a message has been concealed, steganography attempts to hide the fact that any communication has taken place.
The Least Significant Bit
The technique that allows the hiding of text within an image relies on the concept of the least significant bit. In digital images, each pixel is represented by a series of bits. The least significant bit is the bit with the lowest value and impact on the overall color of the pixel. By altering the least significant bit, hidden information can be embedded without significantly changing the appearance of the image.
How It Works
-
Step 1: Preparing Your Canvas
- The first step in the process is selecting an image to act as the carrier of the hidden message. The image must be detailed enough to mask the subtle changes that will be made to its pixels.
-
Step 2: Translating Text to Binary
- Next, the text intended for hiding needs to be converted into a binary format. This is done by translating each character into its ASCII representation, followed by converting that into binary. A picture illustrating this process will be included below the post. Once the message has been converted into binary, it will be planted into the code of the image.
-
Step 3: Hiding the Message
- With the message converted to binary, it can be embedded into the image. This involves replacing the least significant bit of one or more color components in each pixel’s RGB value with bits from the binary message. Since the least significant bit has the smallest impact on the color’s appearance, altering it causes negligible changes that are generally hidden to the human eye.
-
Step 4: Extracting the Hidden Text
- To uncover the hidden message, the recipient must reverse the embedding process. By extracting the least significant bits from the modified pixels and converting them back into text, the original message can be discovered.
Simple Concealment
What makes the least significant bit strategy of steganography popular is its simplicity and effectiveness. The changes made to the image are minimal, often requiring statistical analysis to detect even just the presence of a hidden message. This method capitalizes on the human visual system’s inability to perceive slight variations in color, allowing for information to be hidden in plain sight.
Applications and Considerations
While the concept is straightforward, the applications of least significant bit steganography are large, ranging from watermarking digital media to secure communications in environments where encryption might raise suspicion. However, it’s crucial to use this technique responsibly. The strength of steganography lies in its secrecy, so awareness and discretion are key to its effectiveness.
Links and References:
https://www.youtube.com/watch?v=TWEXCYQKyDc&ab_channel=Computerphile
Proof read: OpenAI. ChatGPT. 2023, https://openai.com. Accessed 03/31/2024.
This post was inspired by insights from ChatGPT, OpenAI’s language model, detailing steganography through bit manipulation in images. OpenAI. ChatGPT. 2023, https://openai.com. Accessed 03/31/2024.
AI Content Prediction: I estimate that about 20% (Primarily the How It Works section) of the above post was created with the assistance of AI. Remaining information was referenced from class notes and previous experience with Cryptography coursework as apart of my major.
The bit-level process of steganography.
Original ChatGPT 4.0 Prompt
Continued GPT4.0 Prompts