A simple security tool for basic steganography, useful for CTF challenges.
Steganography is the art of hiding a message inside another message. In our case, we will hide a text message inside an image. An image will most propably go unnotified, most of the people will not suspect a message hidden inside of an image.
The User chooses an image, the image data is then normalized, meaning that each RGB value is decremented by one if it is not even. This is done for every pixel in the image.
Next, the message is encrypted using Caesar Cipher as a layer of security. Then, this cipher is converted to a binary representation, 8 bits per character of the message. This binary representation is then applied to the normalized image, 3 bit per pixel. This concludes, that the maximal length of a message hidden in
an image is:
Image Width * Image Height * 3
------------------------------
8
Since the image was normalized, we now know that an even r, g or b value is 0 and an uneven is a 1. And this is how the cipher is decoded back from the image. We now decrypt the given cipher back to original text.
Steganography is no means of encryption, just a way to hide data from plain sight. But one can, for example, hide a PGP-encrypted message inside an image. So even if the image did not go unnoticed, the message would still only be readable by the person it was addressed to. From our side, we add an extra Caesar cipher to increase security for demonstration purpose.
For encoding:
For decoding:
git clone -b <name-of-branch> https://github.com/arghyadeep99/Stegalysis.git
This project was done as an assignment of our lab course Cryptography & System Security
.