Skip to content

user163/image-encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-encryption

Encryption / decryption of images with AES in Python 3 (CBC and ECB mode supported)

Dependencies

Configuration

The following settings are possible in PyImgEnc.py:

  • Set the mode in section '# Set mode': AES.MODE_CBC or AES.MODE_ECB.

  • Set the file path of the image to be encrypted in section '# Load original image': If the image is in the same directory as PyImgEnc.py, only the filename is required, e.g. topsecret.jpg.

Image formats

  • The images to be encrypted can be in one of the common formats (jpg, bmp, etc.).

  • Encrypted images can also be saved. For this purpose a lossless format like bmp must be used.

Program execution and flow

  • Start the program under Windows in the comand prompt with: py pyimgenc.py

  • Once the program is started, the original image is displayed first. A click on any key displays the encrypted image. A further click displays the decrypted image. Another click deletes all images and exits the program.

Example

Original image

Alt text

Encrypted image (CBC mode)

Alt text

Encrypted image (ECB mode)

Alt text

Decrypted image

Alt text

Releases

No releases published

Packages

No packages published

Languages