压缩和加密...哪个首先应用? [英] Compression and Encryption... Which to apply first?
问题描述
我正在开发一个远程备份项目在C ...
我想发送数据和压缩以及加密数据。
但是我很困惑首先压缩还是先加密!
什么会更好?:
- 压缩数据,然后对其加密 。
- 加密数据,然后压缩
另外,我将使用zlib进行压缩。
我想知道使用哪个加密库...
有些人说libgcrypt是好的。
建议使用好的加密库(非常容易使用)...):
或者这两个作业都有什么? / p>
谢谢!
>
任何良好的加密算法都会产生类似于压缩效果的随机数据。
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.
这篇关于压缩和加密...哪个首先应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!