Image encryption and Decryption based on private-key cryptography
SecureSnaps
---| Enc
---| Dec
---| Temp
max_val(ht,wdth)
: returns max(ht,wdth)get_string_hash()
: returns the hashvalue for the entered passwordgenerate_tuples(H,W)
: generates a list of tuples recursively for the codecyield_chunks(block, iterate_size)
: returns lists of varying size for the hash list
Encodes the image at image_path
as per the entered password
Decodes the image at image_path
as per the entered password
fucntion(x)
: The first function for generating tuplesfunction2(x)
: The second function for generating tuplesswap(ai,aj,bi,bj, image, arr)
: swaps two pixelsarr(ai,aj)
witharr(bi, bj)
efficiency(orig, enco, W, H)
: Finds the efficiency of the encryption by comparing the original image with encoded image, W and H are width ad height respectivelycascade(xy, N, W, H)
: creates a recursively cascaded list (of length N) of tuplesautomate_swap(alpha, beta, N, image, arr)
: swaps pixels automatically for encryptionautomate_swap_dec(alpha, beta, N, image, arr)
: swaps pixels automatically for decryption
Step 1: Start SecureSnaps
Step 2: Select (Encrypt/Decrypt)
Step 3: Input (folder_path, password)
Step 4: Encrypts/Decrypts the images in the directory and removes the original images
Step 5: End
- Add more cascade functions
- Increase the tuple size from 4 elements to 8
- Make the cascade functions non-linear