I am working on a remote backup project in C…
I want to send data and compress as well as encrypt the data.
However I am confused whether to compress first or encrypt first!
What will be better?:
- Compress the data and then encrypt it
- Encrypt the data and then compress it
Also I am going to use zlib for compression.
And I am wondering which encryption lib to use…
Some people say libgcrypt is good.
Suggestion for good encryption libraries(very easy to use) will be appreciated… 🙂
or is there anything that does both of the jobs?
Thanks!
You should compress before encrypting.
Any good encryption algorithm will produce random-like data that will not compress well.