Skip to content
An image-steganography project
C++ NSIS CSS QMake Shell HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
doxy
src
.appveyor.yml
.gitattributes
.gitignore
.travis.yml
CNAME
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
azure-pipelines.yml

README.md

PictureCrypt

An image-steganography project

Build Status undefined Release Documentation License

About

A simple cross-platform steganography project which hides data in images. This project is built on Qt Platform using MVC pattern and features GUI and console interface. Project repository is available at GitHub

Download

Get stable binary files at latest release page Or download latest POTENTIALY UNSTABLE files:

Links

Frequently used:

Windows:
Linux:

Rarely used

Windows

External use

You can use ModelPC class separately from everything else, but you will need QAESEncryption class as well. So you can just get src/app/model folder

Use API

// Includes
#include "modelpc.h"
#include <QImage>
#include <QByteArray>
#include <QString>
#include <QDebug> // just for showcase

...

// Basic setup
QByteArray data("some_file.txt");
QImage *image = new QImage("some_big_enough_image.jpg");
QString key = "some_password";
int bitsUsed = 3; // must be from 1 to 8

// Encrypting
QString error1, error2;
QImage *normal_resultImage = ModelPC::Encrypt(
    data,
    image,
    1, // normal mode
    key,
    bitsUsed,
    &error1);
QImage *advanced_resultImage = ModelPC::Encrypt(
    data,
    image,
    2, // advanced mode
    key,
    bitsUsed, // not really used here, so put here any number from 1 to 8
    &error2);

// Decrypting with given mode
QString error3, error4, error5, error6;
QByteArray output_normal = ModelPC::Decrypt(
    normal_resultImage,
    key,
    1, // normal
    &error3);
QByteArray output_advanced = ModelPC::Decrypt(
    advanced_resultImage,
    key,
    2, // advanced
    &error4);

// Decrypting without given mode
// PictureCrypt can detect the mode of the image and adapt.
QByteArray output_normal_undefined = ModelPC::Decrypt(
    normal_resultImage,
    key,
    0, // auto-detect mode
    &error5);
QByteArray output_advanced_undefined = ModelPC::Decrypt(
    advanced_resultImage,
    key,
    0, // auto-detect mode
    &error6);

// Check (better testing with running tests [See section 'Run tests'])
bool data_good =
    data == output_normal &&
    data == output_advanced &&
    data == output_normal_undefined &&
    data == output_advanced_undefined;
bool no_errors =
    error1 == "ok" &&
    error2 == "ok" &&
    error3 == "ok" &&
    error4 == "ok" &&
    error5 == "ok" &&
    error6 == "ok";
if(data_good && no_errors)
    qDebug() << "PASS";
else
    qDebug() << "FAIL";

Console use

$ picturecrypt -h
Usage:
  picturecrypt encrypt <image> <input file> <key> <output> [options]
  picturecrypt decrypt <image> <key> <output> [options]
  picturecrypt (-h | --help)
  picturecrypt --version

Options:
  -h --help    Show this screen.
  --version    Show version.
  -m --mode    Mode of cryption.
  -b           Encryption bitsUsed parameter.
$ picturecrypt --version
1.4.1
$ picturecrypt encrypt original.jpg data.txt somekey result.png
$ picturecrypt decrypt result.png somekey output.txt

Tests

PictureCrypt comes with Qt Test project. It can be found at 'src/tests'

Run tests

  • Run them directly from IDE (e.g. Qt Creator) with target tests
  • Run with 'make'
# Go to tests directory
cd src/tests

# Install required packages
bash ../scripts/install.sh

# Build tests
bash ../scripts/build.sh

# Run tests
QT_QPA_PLATFORM=offscreen make check

# Clean (optional)
bash ../scripts/clean.sh

Available modes of encrypting

  • 0 - Auto-detect, used for decryption, so it auto-detects (invalid at encryption as you must select the encryption type).
  • 1 - v1.3, only available on versions 1.3+, not really secure.
  • 2 - v1.4, advanced (preferred) encryption mode, available on versions v1.4+ (works a lot longer than v1.3, can work for >40s on slow machines).
  • 3 - JPHS, requires manually installed JPHS and specified directory (not currently available).

Documentation

Documentation was generated by Doxygen

Continuous integration

Continuous integration is fulfilled via Travis CI for Linux and AppVeyor for Windows.

Internationalization

Languages

This project is available in multiple languages thanks to awesome QT Linguist Platform. Currently we have:

  • English (default)
  • Russian
  • German

Help translating

If you'd like to translate PictureCrypt to your language here are steps to do so:

  • Install QT and QT Linguist with it
  • Clone the project.
  • Go to PictureCrypt/src/app/
  • Add a filename to TRANSLATIONS in src/app/app.pro file. Filename must be 'picturecrypt_{your language}.ts' (e.g. 'picturecrypt_fr.ts')
  • Run lupdate src.pro, it will generate that .ts file. If there is an error: "Maybe you forgot to set your environment?" Go to Project (on the left-hand side) ->(expand) Build environment -> Open terminal and run lupdate src.pro.
  • Go to translations/
  • Run linguist picturecrypt_{your language}.ts. The Qt Linguist will appear, where you can translate given text from English (there are a couple of html entries, just edit its text part). If you don't translate the whole thing, your work will be still appreciated!
  • Either go to 'File -> Compile' or run lrelease picturecrypt_{your language}.ts.
  • Add your picturecrypt_{your language}.ts to src/app/translations.qrc resource file.
  • Create a pull request in GitHub with your work.

If you have any trouble, contact me and I will sincerely try to help you as I really don't think, that anyone will decide to help me translate. 😔

Dependencies

Works of other people used in this project

  • QAESEncryption by bricke (provided under UNLICENSE)
  • 'Circle Icons' by Nick Roach provided under GPL v3.0.
  • 'MS Shell Dlg 2' font used and 'Montserrat' font used under the SIL Open Font License.

Contact

Questions and suggestions are welcome! Email me a.kovrigin0@gmail.com or telegram me at waleko

License

This software is provided under the MIT License.

Copyright © 2019 Alexander Kovrigin

You can’t perform that action at this time.