An open API service indexing awesome lists of open source software.

https://github.com/yashokuu/ImgCrypt

This tool allows you to encrypt and decrypt images using a keyword-based encryption method. The encryption adds random noise to the image and embeds text into the noise, while the decryption restores the image using the same keyword.
https://github.com/yashokuu/ImgCrypt

encrypter encryption hide image image-encryption locker private

Last synced: 8 months ago
JSON representation

This tool allows you to encrypt and decrypt images using a keyword-based encryption method. The encryption adds random noise to the image and embeds text into the noise, while the decryption restores the image using the same keyword.

Awesome Lists containing this project

README

          



---

This tool allows you to encrypt and decrypt images using a keyword-based encryption method. The encryption adds random noise to the image and embeds text into the noise, while the decryption restores the image using the same keyword.



---
- Encrypt images with a password/keyword.
- Embed custom text into the encrypted image.
- Decrypt encrypted images using the same keyword.



---
- Python 3.x
- OpenCV (`cv2`)
- NumPy
- Cryptography library (`cryptography`)



---

1. Clone or download the repository.
2. Install the required dependencies:
```bash
pip install opencv-python numpy cryptography
```

3. Make sure you have an image file (e.g., `.png`, `.jpg`) to encrypt.



---



---

1. Open a terminal and navigate to the folder containing the `imgCrypt.py` file.
2. Run the script:
```bash
python imgCrypt.py
```



---
- **Encrypt Image:**
- Provide the path of the image to encrypt.
- Enter a password/keyword to encrypt the image.
- The tool will generate an encrypted image file and a noise image with embedded text.

- **Decrypt Image:**
- Provide the path of the encrypted file (not the noise image).
- Enter the same password/keyword used during encryption.
- The tool will decrypt and save the original image.



---

#### Encrypting an Image
```bash
Enter input image path: /path/to/image.jpg
Enter encryption keyword: mysecretkey
Enter output file path (without extension): /path/to/encrypted_image
Enter text to embed in encrypted image: Any text you want
```

#### Decrypting an Image
```bash
Enter encrypted file path (without _noise.png): /path/to/encrypted_image
Enter decryption keyword: mysecretkey
Enter output image path: /path/to/decrypted_image.png
```



---
- Always remember the keyword used for encryption; it's required for decryption.
- The noise image (`_noise.png`) is generated for visual effect and contains embedded text.



---
This project is licensed under the YASL License - see the [License](License.md) file for details.