Lossless image encryption and decryption algorithms. This project could not have been accomplished without the amazing paper by Yue Wu et al.1 cited in the reference section below.
Block diagram of the proposed image encryption schema1
Flow chart of the Sudoku reference matrix generator1
Original image | Encryption | Decryption |
---|---|---|
- In the same direct as main.py, create 3 folders and name them as follows: images, decrypted, and encrypted.
- images : This is the folder where you put the images you want to encrypt or decrypt.
- decrypted : This is the folder in which decrypted images will be saved to after running the decryption algorithm.
- encrypted : This is the folder in which encrypted images will be saved to after running the encryption algorithm.
- In main.py, change the image_name variable on line 14 to the file name of the image you want to decrypt/encrypt. This image should be in the images folder.
- In main.py, change the encrypting variable on line 13 to False for decryption or to True for encryption
- (OPTIONAL) the x_0 and r variables on lines 11 and 12 are used by the algorithm to determine the initial value of the logistic map, which means that an image can not be decrypted successfully if those variables are not the same values as the values used to encrypt the image.
For more information on the algorithm and its capabilities, please refer to the paper in the reference below.