Skip to content

Command line tool to perform steganography on an image

Notifications You must be signed in to change notification settings

Car-byte/Steganography

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Steganography

Steganography in C# and C++

Steganography is the process of hiding data within data.

In this small project I use LSB steganograhy.

Other methods including DCT coming soon aka when I get a chance.

Dependecys

For C# I used the System.Drawing.Common for the Bitmap class to read images, the ShellProgressBar for the progress bar, and Microsoft.AspNetCore.Cryptography.KeyDerivation for the key derivative function all available wiht NuGet

For C++ I used CryptoPP for the encryption and OpenCV for image input and output as well as my own Base64 implementation.

Usage

You can type --help as a command line argument in order for an in app help menu to display

The first arguemnt must be either --e, --d, or --xor

following --e must be the image you wish to encode followed by the text file name you want to encode followed by the output file name and an option --p for encryption

following --d must be the name of the image you want to decoded and then the output file name and the option --p if the file was encrypted

following --xor must be two image file names and then the output file name

Examples:

--e image.png secret.txt output.png

--d output.png secret.txt

--xor image.png output.png xored.png

--e image.png secret.txt output.png --p

--d output.png secret.txt --p

What is LSB or least significant bit?

Least significant bit is the last bit of a byte example: 10110101 the LSB is the very last one 1011010(1)

The reason being that the last place of a bit changes the byte the least of any position

10110101 converted to a number is 181 but 10110100 converted to a number is 180 the last bit only changes the numbers value by 1! because changing the last bit only changes the byte by a tiny amount that means we can change it to whatever we want and it will have barly and impact on the image.

We can go through an image byte by byte and change all of the last bits to our secrete message and therfore encoding our message into the image.

take a look at these two images:

alt text alt text

Can you tell wich one has a message encoded in it whith just your eyes? Im willing to bet you cannot. Thats the whole goal while the goal of encyption is to make sure no one can read your message, steganography is all about concealment, trying to make sure no one knows a message is whithin another message.

About

Command line tool to perform steganography on an image

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published