Skip to content

Latest commit

 

History

History
95 lines (64 loc) · 3.12 KB

README.md

File metadata and controls

95 lines (64 loc) · 3.12 KB

Photocrypt

A steganography program that hides text in image. It has both a graphical (gtkmm) and a command-line interface. It is a cross-platform application written in C++.

It implements a modified LSB (least significant bit) substitution algorithm with password protection. Every bit of secret data is stored in the less significant bits (not always least) of the image pixel color values. This makes the stego-image practically identical to the original image. The algorithm depends on the key so it is unfeasible to extract data without the key.

The algorithm used in this program can be explained briefly as:

  • The 1st row of image is used to store the SHA1 digest of the password. The bits used to hide the data depends on the key itself. This is required to add password-verification feature.

  • The secret data starts from the beginning of the 2nd row. The bits used to hide the data depends on the key itself. The \0 character is appended at last to mark the end of text.

Note: You cannot extract text from a JPEG image because the JPEG compression algorithm modifies some pixels to reduce file size and quality.

Dependencies

It depends on following packages only to build. Built package is independent.

Package Task
GNU gcc with C++11 To compile the sources
GNU make To build
pkg-config To get compiler and linker flags
OpenCV 4 library For image processing
gtkmm 3 library For GUI
OpenSSL library For security
HDF5
VTK

Installation

Photocrypt is available for Arch Linux via AUR:

yay -S photocrypt-git

Manual installation

To install to system:

make
sudo make install

To list available make targets:

make help

Usage

To open the GUI front-end, run:

photocrypt

But if you're a terminal-person like me, you can use the CLI front-ends (steg and unsteg) which are equally (probably more?) powerful. For example, to hide the contents of text.txt in image.jpg:

steg image.jpg -f text.txt

Similarly, to decrypt the text hidden in stego.png:

unsteg stego.png

For more info, see steg -h and unsteg -h.