/stany

Steganography library written in python

Primary LanguagePython

stany

Steganography library written in python

You can use Stany to encode any text message or binary file inside an arbitrary RGB/RGBA image. The payload will be encrypted with AES and embedded inside the pixels' least significant bits.

A Streamlit app is also provided to facilitate the use of Stany.

A possible use is to encode a book you just wrote or confidential documents inside any image. This way your documents will always stay with you and go unnoticed by everyone.

Features

  • Encode plain texts messages
  • Encode compressed files
  • Encrypt messages with AES
  • Use dynamic number of least significant bits

How to use

Installation

Creave virtual env with 3.7 >= python <= 3.9 (untested for other versions), then run:

pip install -r requirements.txt

Api

from PIL import Image

from stany import encode, decode

img = Image.open("path-to-my-img.png")

message = "Hello world"

encoded_img, secret_key = encode(img, message)

decoded_message = decode(encoded_img, secret_key)

App

streamlit run app/main.py

To do's

  • Add tests
  • Hide message inside high entropy locations