Skip to main content

A Python GIF steganography library supporting encryption to embed and extract secure messages within GIF images.

Project description

GIF Steganography

Tests PyPI version Dependencies License Python version

Overview

This project implements GIF steganography using various techniques, coupled with additional layers of security and integrity verification. It enables the encoding of secret messages into GIF images and the decoding of these messages from the images, ensuring the message's secrecy and integrity through encryption, compression, and error correction.

Input GIF Output GIF

One of these GIFs contains a dragon. Can you find it? (Hint: the passphrase is "dragon".)

Installation

pip install gif-steganography

Requires Python >= 3.10. Installs the package and all necessary dependencies.

Usage

Encode a Message

gif-steganography encode <input.gif> <output.gif> "Secret Message" "Passphrase" [--nsym 10]
  • --nsym (optional): Sets the Reed-Solomon error correction level. Default is 10.

Decode a Message

gif-steganography decode <encoded.gif> "Passphrase" [--nsym 10]
  • --nsym must match the encoding setting for successful decryption.

Programmatic Usage

Beyond the command-line interface, gif-steganography also provides direct API access for integrating steganographic functionalities into Python scripts.

Basic Encoding and Decoding

Embed and retrieve messages programmatically:

from gif_steganography import SteganographyMethod, decode, encode

# Embed a message
encode("input.gif", "output.gif", "Hello, world!", mode=SteganographyMethod.LSB)

# Retrieve a message
message, _ = decode("output.gif")
print(message)  # Output: Hello, world!

Secure Encoding and Decoding

For added security, use encryption with your messages:

from gif_steganography import SteganographyMethod, decode, encode

# Securely embed a message
encode("input.gif", "output.gif", "Hello, world!", passphrase="password", mode=SteganographyMethod.CSHIFT)

# Securely retrieve a message
message, _ = decode("output.gif", passphrase="password")
print(message)  # Output: Hello, world!

Project Structure

  • src/: Core project files.
  • cli.py: Command-line interface.
  • encode.py/decode.py: Encoding and decoding scripts.
  • lib/: Compression, encryption, and utility modules.
  • modes/: Core steganography logic.

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gif-steganography-0.1.1.tar.gz (13.5 MB view details)

Uploaded Source

Built Distribution

gif_steganography-0.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file gif-steganography-0.1.1.tar.gz.

File metadata

  • Download URL: gif-steganography-0.1.1.tar.gz
  • Upload date:
  • Size: 13.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for gif-steganography-0.1.1.tar.gz
Algorithm Hash digest
SHA256 260cabb658caa899517a6f8bfbc8e00e9896c71855e278902c7e89f42e5c3024
MD5 21349267c8447fb9f04a98df98c24aef
BLAKE2b-256 ae84d62c4b58a90fd54fc1f2a759c26d01635bbc9bdcb8d15cf936a543dc2530

See more details on using hashes here.

File details

Details for the file gif_steganography-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gif_steganography-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65b59744c364aa77a0f4adf682dfb5d640ff6680dc5af470f7948e3b84900cfa
MD5 19d03e6dafe8502425ef93c11fbdf7ab
BLAKE2b-256 63a370cfe16761f2f7a164020e1990bc58cfe9723054c7bbeda35c648691ca95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page