ganlvtech / lua-simple-encrypt

Lua simple XOR encrypt
https://ganlvtech.github.io/lua-simple-encrypt/
MIT License
98 stars 67 forks source link

How to decrease keybyte #6

Closed hichay closed 3 years ago

hichay commented 4 years ago

Im trying to decrease keybyte to make file smaller. it too big for running.

ganlvtech commented 4 years ago

This encryption is really simple. It just do simple XOR and shuffling. The encrpytion is extremely inefficienct. The encrpyted file may cost hundreds times space as the original file, because there is a huge shuffle map.

The shuffle map contains the position of each byte and is written in decimal. So the file size may O(nlogn), where n is the size of original file size. Increase key length won't increase encrypted file size. And decrease won't either.

I'm really sorry that this tool are not friendly with bigger file. If you really need a more efficient encrypt method, please try to find some other tools.

Thanks.

ganlvtech commented 4 years ago

You can try to remove the shuffle part. The file size with decrease significantly. It may require some more work. Welcome for sending a PR.