Skip to main content

The simplest Python Steganography with crypto out there!

Project description

Steganocryptopy - The simplest Python Steganography with crypto out there!

Usage

In the following paragraphs, I am going to describe how you can get and use Steganocryptopy for your own projects.

Getting it

To download steganocryptopy, either fork this github repo or simply use Pypi via pip.

$ pip install steganocryptopy

Using it

Steganocryptopy was programmed with ease-of-use in mind. First, import Steganography from Steganocryptopy

from steganocryptopy.steganography import Steganography

And you are ready to go!

Example Code

# https://github.com/kvvignesh/steganocryptopy

#Import the module
from steganocryptopy.steganography import Steganography

key = 'key.key'             # Key file name
input_image = 'input.png'   # Image name
input_file = 'LICENSE'      # File that needs to be encrypted
output_image = 'output.png' # Output image name
output_file = 'output.txt'  # Output file name

# Generate key
Steganography.generate_key(key)

# Encrypt the data and store in the image
encrypted_image = Steganography.encrypt(key, input_image, input_file)
encrypted_image.save(output_image)

# Decrypt the data from image
decrypted_text = Steganography.decrypt(key, output_image)

print(decrypted_text)

Steganography.write_file(output_file, decrypted_text)

Steganography

Let’s understand what is steganography, digital images, pixels, and color models.

What is steganography?

Steganography is the practice of concealing a file, message, image, or video within another file, message, image, or video.

What is the advantage of steganography over cryptography?

The advantage of steganography over cryptography alone is that the intended secret message does not attract attention to itself as an object of scrutiny. Plainly visible encrypted messages, no matter how unbreakable they are, arouse interest and may in themselves be incriminating in countries in which encryption is illegal.

In other words, steganography is more discreet than cryptography when we want to send a secret information. On the other hand, the hidden message is easier to extract.

You can check out the result in the following image:

The below image is the original image used for the encrypting the data and storing into it

Below is the image where the data is stored in its pixel

As you can see in the image above, you can't find any difference between the both the images

Limitations

  • This program will ONLY work with PNG images. JPEG images have a specific compression issue that screws with the encryption algorithim.
  • You can only encrypt a specific amount of characters within an image. The exact amount is based off the size of the image (one pixel is dedicated to each character).

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

steganocryptopy-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file steganocryptopy-0.1.2.tar.gz.

File metadata

  • Download URL: steganocryptopy-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.0

File hashes

Hashes for steganocryptopy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bd508429708c4d723865ecf6b31917101401000b574ecf0a67e9dc9af5393798
MD5 f74c7fe0e1aebac38f82cb273cd9de39
BLAKE2b-256 ddd6065daf98893e333a7ab2ec80a5d8d61214535c792a9cf4fe8dbccbd702a7

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