Steganography

Hiding data in images is a really interesting thing to do. Below are two photos of the Toyota GT86. Just looking at them there isn’t any difference between them. However the second one has the first few pages of Alice in Wonderland hidden inside it. If you check out the code on Github (link at the bottom of the page), you will find that the second image has:

Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations….

and much more encoded in the pixels within the image. The code works by taking the plain text data (non-encrypted) and setting the last bit of each (R,G,B) valued pixel to be 1 or 0 to corresponding to the next bit in the text. I would like to add in some more features when I have time including:

  • encrypting the data before it is written into the image
  • adding a signature to the image to detect if there is valid text encoded
  • varying the bit depth (aside from just toggling the last bit) to pack more data into an image
The original photo of the Toyota GT86
The original photo of the Toyota GT86
The image with the first few pages of Alice in Wonderland hidden inside it.
The image with the first few pages of Alice in Wonderland hidden inside it.

Check out the code on Github here: https://github.com/michaelsmith9/ImageEncoder