BacoNG - PNG Steganography with Python
PNG images, compared to BMP or JPEG have transparency as one of their predominant points-of-difference when comparing between the bunch. However, when looking at a PNG on a computer screen, a difference between 255 and 254 would be barely noticeable.

One of the ciphers we covered initially in the course, besides Caesars and Vigenere was the Bacon cipher. The core of a Bacon cipher is using a commonly used medium to encode a message in a non-standard way, either through pictography or contextual cues within the media.
I should also note here, that I have a background in digital marketing and graphic design so am fairly familiar with digital assets and formatting. Knowing this, whilst covering the Bacon Cipher, I tried to think of a way, in a modern context that this could be utilised, and had a realisation...
PNG images, compared to BMP or JPEG have transparency as one of their predominant points-of-difference when comparing between the bunch. However, when looking at a PNG on a computer screen, a difference between 255 and 254 would be barely noticeable. So in theory I should be able to take the binary value for each letter of a word, and then use those 1/0 values to embed my message within the picture itself!
Knowing this, and as an exercise in attempting to improve my Python coding skills I set out to create a python script that could take a simple phrase of text and encode it within the transparency values of a PNG image, unnoticeable to a casual observer and not really detectable using standard steganographic software.
As I write this code i'll be keeping the most up to date version of it here on GitHub as I continue to develop it.
Big Picture
So to create this I first broke down the idea into 3 distinct processes:
- The Encoding and Decoding of Strings into Binary Data, held within an Array
- The reading of transparency values of a PNG file, and subsequent writing of
- Putting it all together into an application with a proper CLI, and testing of restrictions in a real world example.
I'm going to separate this into three future blogs, as we're going into Christmas i'd like to feel more productive by posting more often than saving it all for one big post a year from now.