What is Steganography?
Steganography is the practice of concealing one piece of information within another to hide its existence. It typically involves embedding secret data, such as text or images, within a seemingly innocuous carrier medium, like an image or audio file, in a way that is difficult to detect without specific knowledge or tools. Steganography is often used for covert communication or data protection, where the goal is to hide the presence of the hidden information rather than encrypting it.
How this page work?
Because we really really care about security here, this web page does both steganography and encryption. Given a image, a message and a password we encrypt the message according to the password and hide the encrypted message inside the image. To read the hidden message inside the image, just upload the image that contains the hidden message and provide the password used to encrypt it.
The encryption algorithm we use is the Advanced Encryption Standard (AES). After encryption, we then break the encrypted message into its bits (yes, bits not bytes). Then we hide each bit in the least significant bit of the color channels of the image. For example, if the first bit is 0, we turn off the last bit of the top-left red pixel. If its value is 127, it becomes 126. If it is 52, it remains as 52 (least significant bit is already off). This way the image remains unchanged to the naked eye. Due to the lossy nature of converting to and from premultiplied alpha color values we only use pixels with alpha value equal to 255, as all other values may lead to loss of data. Of course we could send your image, message and password to the site's server, do all the processing outside of the web browser (where we wouldn't have to deal with this bs) and then return your desired image back. We don't do that because of the following:
- By doing everything client-side you don't have to trust me that I am not saving your message, password (which you probably use elsewhere, dumbass) and image in my server.
- I don't want to waste my server storage, processing time and bandwith with your data, sorry.
If you don't care about encryption and just wanna hide the message inside the image file just leave the password field empty. Enjoy this code I provided you: