Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

mdbct/photocrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 2 library For image processing
gtkmm 2 library For GUI
OpenSSL library For security

Installation

Photocrypt is available for Arch Linux via AUR:

yaourt 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.

Authors

  • Manish Munikar, 070-BCT-520
  • Dipesh Pandey, 070-BCT-514
  • Brihat Ratna Bajracharya, 070-BCT-513