iMohannad / TinyEncryptionAlgorithm

Implementation of Tiny Encryption Algorithm (TEA) with two modes of operation: CBC and ECB
4 stars 3 forks source link

Working with other images #2

Open mkm09 opened 7 years ago

mkm09 commented 7 years ago

Hey,

Your program works beautifully with the image provided, but I'm having difficulty getting it to work with other images. It definitely doesn't work with all .bmp images. What is even more bizarre is that if I merely edit the image you provided with a photo editor (ex. MS Paint) and then save the changes, the updated image no longer works with the program.

Unless I use the original image you gave here, all I get for an output is an unreadable image, rather than one where the image itself is obscured (which is the behavior I want).

Are you able to get it working with any other images?

iMohannad commented 7 years ago

Hey,

Regarding the constant DELTA, it's used to prevent simple attacks based on the symmetry of the round. For more info about this constant check this site: https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm

I have tried different images in bmp format and all of them worked fine. I am trying now to make the program works for jpg. I have also tried editing the image with a photo editor and the program works perfectly. Would you please attach the picture you have tried and it didn't work with you?

mkm09 commented 7 years ago

Thank you so much for responding! I appreciate the clarification about the delta value, that is very helpful.

I'm still having trouble using different images in bmp format; it's interesting that you aren't having a problem with them.

Here's one I tried (the original image with a red box added in via photo editor): https://www.dropbox.com/s/nxxzgmyvvxg0pow/Input.bmp?dl=0

When I run your program with this image, both the encrypted and decrypted images are unreadable: http://prntscr.com/e810dy