Skip to content

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.

License

Notifications You must be signed in to change notification settings

yashokuu/ImgCrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation


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:

    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:
    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

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

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 file for details.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages