# 🔐 ImageCrypto
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/pypi/pyversions/imagecrypto.svg)](https://pypi.org/project/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 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`: 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 data
* `get_encryption_time(image_path)`: Returns encryption time
* `display_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:
```bash
pip install imagecrypto
```
## 📝 Usage Example
Here's an example of how to use ImageCrypto and display the results:
```python
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](https://github.com/nidhi-bhatt/imagecrypto)
---
Made with ❤️ by Nidhi
Raw data
{
"_id": null,
"home_page": "https://github.com/nidhi-bhatt/imagecrypto",
"name": "imagecrypto",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "cryptography, image encryption, ECC, AES, ChaCha20, Salsa20",
"author": "Nidhi Bhatt",
"author_email": "itsnibhatt@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d0/ca/da6f27b4dc831d07a512614f4bb017d2abe80c9badd11b1f2f7d32e605fa/imagecrypto-0.4.0.tar.gz",
"platform": null,
"description": "# \ud83d\udd10 ImageCrypto\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python Versions](https://img.shields.io/pypi/pyversions/imagecrypto.svg)](https://pypi.org/project/imagecrypto/)\n\nImageCrypto 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.\n\n## \ud83c\udf1f Features & Available Modules\n\nImageCrypto offers multiple symmetric encryption algorithms, each implemented as a separate module:\n\n* `aes_gcm_128`: AES-128 in GCM mode\n* `aes_ccm_128`: AES-128 in CCM mode\n* `aes_gcm_256`: AES-256 in GCM mode\n* `aes_eax_128`: AES-128 in EAX mode\n* `chacha20_poly1305`: ChaCha20-Poly1305\n* `salsa20`: Salsa20\n\nKey features:\n\n* Secure key generation using asymmetric ECC (SECP256R1 curve)\n* Fast symmetric encryption\n* Easy-to-use API\n* Performance metrics (encryption time)\n* Visualization of original and encrypted images\n\nEach module provides the same API:\n\n* `get_encrypted_image(image_path)`: Encrypts the image and returns the encrypted image data\n* `get_encryption_time(image_path)`: Returns encryption time\n* `display_images(original_path, encrypted_image)`: Displays the original and encrypted images\n\nThis consistent API across all encryption algorithms allows for easy comparison and flexibility in choosing the most suitable method for your needs.\n\n## \ud83d\ude80 Installation\nInstall ImageCrypto using pip:\n```bash\npip install imagecrypto\n```\n## \ud83d\udcdd Usage Example\n\nHere's an example of how to use ImageCrypto and display the results:\n\n```python\nfrom imagecrypto import aes_gcm_256\nimport matplotlib.pyplot as plt\n\n# Define the path for your original image\noriginal_image = \"path/to/your/image.jpg\"\n\n# Encrypt an image\nencrypted_image = aes_gcm_256.get_encrypted_image(original_image)\n\n# Get encryption time\nencrypt_time = aes_gcm_256.get_encryption_time(original_image)\nprint(f\"Encryption time: {encrypt_time:.2f} ms\")\n\n# Display the original and encrypted images\naes_gcm_256.display_images(original_image, encrypted_image)\n```\n\n### Inputs\n* Path to an original image file (JPEG, PNG, etc.)\n\n### Outputs\n* Encrypted image data\n* Encryption time (in milliseconds)\n* Visual display of original and encrypted images\n\n## \ud83d\udee0\ufe0f Dependencies\n* OpenCV (cv2)\n* cryptography\n* pycryptodome\n* numpy\n* matplotlib\n\n## \ud83d\udcc4 License\nImageCrypto is released under the MIT License.\n\n## \ud83d\udce7 Contact\nProject Link: [https://github.com/nidhi-bhatt/imagecrypto](https://github.com/nidhi-bhatt/imagecrypto)\n\n---\nMade with \u2764\ufe0f by Nidhi",
"bugtrack_url": null,
"license": "MIT",
"summary": "ImageCrypto is a Python package for secure image encryption using various symmetric ciphers with asymmetric Elliptic Curve Cryptography (ECC) for key generation.",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/nidhi-bhatt/imagecrypto",
"Repository": "https://github.com/nidhi-bhatt/imagecrypto"
},
"split_keywords": [
"cryptography",
" image encryption",
" ecc",
" aes",
" chacha20",
" salsa20"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fbef13a3c6a6b6c2805cc44e301302f1015b6b695d3bdd4dbd0a1010a6b8bce3",
"md5": "a7d445b03d808123519f7745cb47fee8",
"sha256": "33654f46292f559c5a0fa0d62a3c6aa16dd5631ab16df09fe9132f4e29a8c134"
},
"downloads": -1,
"filename": "imagecrypto-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a7d445b03d808123519f7745cb47fee8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 10522,
"upload_time": "2024-07-23T22:00:00",
"upload_time_iso_8601": "2024-07-23T22:00:00.026072Z",
"url": "https://files.pythonhosted.org/packages/fb/ef/13a3c6a6b6c2805cc44e301302f1015b6b695d3bdd4dbd0a1010a6b8bce3/imagecrypto-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d0cada6f27b4dc831d07a512614f4bb017d2abe80c9badd11b1f2f7d32e605fa",
"md5": "18aaf1a4d820cee602a4012338a1380b",
"sha256": "050f4fa4a9e036fe945d1a1db0833152dfbf49b0ac5939acba30cdc7b592d378"
},
"downloads": -1,
"filename": "imagecrypto-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "18aaf1a4d820cee602a4012338a1380b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 6018,
"upload_time": "2024-07-23T22:00:01",
"upload_time_iso_8601": "2024-07-23T22:00:01.131387Z",
"url": "https://files.pythonhosted.org/packages/d0/ca/da6f27b4dc831d07a512614f4bb017d2abe80c9badd11b1f2f7d32e605fa/imagecrypto-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-23 22:00:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nidhi-bhatt",
"github_project": "imagecrypto",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "imagecrypto"
}