ImageCrypto is a Python package for secure image encryption using various symmetric ciphers with asymmetric Elliptic Curve Cryptography (ECC) for key generation.
Project description
🔐 ImageCrypto
ImageCrypto is a powerful and easy-to-use Python package for secure image encryption using various symmetric ciphers with asymmetric Elliptic Curve Cryptography (ECC) for key generation.
🌟 Features & Available Modules
ImageCrypto offers multiple symmetric encryption algorithms, each implemented as a separate module:
aes_gcm_128
: AES-128 in GCM modeaes_ccm_128
: AES-128 in CCM modeaes_gcm_256
: AES-256 in GCM modeaes_eax_128
: AES-128 in EAX modechacha20_poly1305
: ChaCha20-Poly1305salsa20
: Salsa20
Key features:
- Secure key generation using asymmetric ECC (SECP256R1 curve)
- Fast symmetric encryption
- Easy-to-use API
- Performance metrics (encryption time)
- Visualization of original and encrypted images
Each module provides the same API:
get_encrypted_image(image_path)
: Encrypts the image and returns the encrypted image dataget_encryption_time(image_path)
: Returns encryption timedisplay_images(original_path, encrypted_image)
: Displays the original and encrypted 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 Example
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 path for your original image
original_image = "path/to/your/image.jpg"
# Encrypt an image
encrypted_image = aes_gcm_256.get_encrypted_image(original_image)
# Get encryption time
encrypt_time = aes_gcm_256.get_encryption_time(original_image)
print(f"Encryption time: {encrypt_time:.2f} ms")
# Display the original and encrypted images
aes_gcm_256.display_images(original_image, encrypted_image)
Inputs
- Path to an original image file (JPEG, PNG, etc.)
Outputs
- Encrypted image data
- Encryption time (in milliseconds)
- Visual display of original and encrypted 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file imagecrypto-0.4.0.tar.gz
.
File metadata
- Download URL: imagecrypto-0.4.0.tar.gz
- Upload date:
- Size: 6.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050f4fa4a9e036fe945d1a1db0833152dfbf49b0ac5939acba30cdc7b592d378 |
|
MD5 | 18aaf1a4d820cee602a4012338a1380b |
|
BLAKE2b-256 | d0cada6f27b4dc831d07a512614f4bb017d2abe80c9badd11b1f2f7d32e605fa |
File details
Details for the file imagecrypto-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: imagecrypto-0.4.0-py3-none-any.whl
- Upload date:
- Size: 10.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33654f46292f559c5a0fa0d62a3c6aa16dd5631ab16df09fe9132f4e29a8c134 |
|
MD5 | a7d445b03d808123519f7745cb47fee8 |
|
BLAKE2b-256 | fbef13a3c6a6b6c2805cc44e301302f1015b6b695d3bdd4dbd0a1010a6b8bce3 |