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.

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.0.tar.gz (695.3 kB view hashes)

Uploaded Source

Built Distribution

gif_steganography-0.1.0-py3-none-any.whl (12.9 kB view hashes)

Uploaded Python 3

Supported by

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