Skip to main content

ImageCrypto is a powerful and easy-to-use Python package for secure image encryption and decryption.

Reason this release was yanked:

Not working

Project description

🔐 ImageCrypto

License: MIT Python Versions

ImageCrypto is a powerful and easy-to-use Python package for secure image encryption and decryption.

🌟 Features & Available Modules

ImageCrypto offers multiple encryption algorithms, each implemented as a separate module:

  • aes_gcm_128: AES-128 in GCM mode
  • aes_ccm_128: AES-128 in CCM mode
  • aes_gcm_256: AES-256 in GCM mode
  • aes_eax_128: AES-128 in EAX mode
  • chacha20_poly1305: ChaCha20-Poly1305
  • salsa20_hmac: Salsa20 with HMAC

Key features:

  • Secure key exchange using ECDHE
  • Fast encryption and decryption
  • Easy-to-use API
  • Performance metrics (encryption and decryption times)
  • Visualization of original, encrypted, and decrypted images

Each module provides the same API:

  • get_images(image_path, encrypted_path, decrypted_path): Encrypts and decrypts the image, saves the results, and returns the paths
  • get_times(image_path): Returns encryption and decryption times
  • display_images(original_path, encrypted_path, decrypted_path): Displays the original, encrypted, and decrypted images

This consistent API across all encryption algorithms allows for easy comparison and flexibility in choosing the most suitable method for your needs.

🚀 Installation

Install ImageCrypto using pip:

pip install imagecrypto

📚 Usage

Here's an example of how to use ImageCrypto and display the results:

from imagecrypto import aes_gcm_256
import matplotlib.pyplot as plt

# Define the paths for your images
original_image = "path/to/your/image.jpg"
encrypted_image = "path/to/save/encrypted.png"
decrypted_image = "path/to/save/decrypted.png"

# Encrypt and decrypt an image
encrypted_path, decrypted_path = aes_gcm_256.get_images(original_image, encrypted_image, decrypted_image)

# Get encryption and decryption times
encrypt_time, decrypt_time = aes_gcm_256.get_times(original_image)
print(f"Encryption time: {encrypt_time:.2f} ms")
print(f"Decryption time: {decrypt_time:.2f} ms")

# Display the original, encrypted, and decrypted images
aes_gcm_256.display_images(original_image, encrypted_path, decrypted_path)

Inputs

  • Path to an original image file (JPEG, PNG, etc.)
  • Path to save the encrypted image
  • Path to save the decrypted image

Outputs

  • Encrypted image (saved to specified path)
  • Decrypted image (saved to specified path)
  • Encryption time (in milliseconds)
  • Decryption time (in milliseconds)
  • Visual display of original, encrypted, and decrypted images

🛠️ Dependencies

  • OpenCV (cv2)
  • cryptography
  • pycryptodome
  • numpy
  • matplotlib

📄 License

ImageCrypto is released under the MIT License.

📧 Contact

Project Link: https://github.com/nidhi-bhatt/imagecrypto


Made with ❤️ by Nidhi

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

imagecrypto-0.3.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

imagecrypto-0.3.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file imagecrypto-0.3.0.tar.gz.

File metadata

  • Download URL: imagecrypto-0.3.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-38-generic

File hashes

Hashes for imagecrypto-0.3.0.tar.gz
Algorithm Hash digest
SHA256 784497ab391ca198c033d0d487155077e34cfe94284bd4abcf5ccf4d20f87e47
MD5 e125e40c2b65bbdc7899cc0311eaec82
BLAKE2b-256 6e27187eb87eb2737276308eb98625b51f0221dc22a278e6a5e4949b23951c64

See more details on using hashes here.

File details

Details for the file imagecrypto-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: imagecrypto-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-38-generic

File hashes

Hashes for imagecrypto-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 961caccc6ca52b49391d075552b416897eb7e174f7431001acb8969fe6939335
MD5 f35bebbd3f1c6f274668b4f5b2009a45
BLAKE2b-256 3917a4218aed2a7fb3291317288375eaac370a8cc5b9f4f85e02db296473baab

See more details on using hashes here.

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