是更好的加密消息,然后压缩它或其他方式?哪个提供更多的安全性? [英] Is it better to encrypt a message and then compress it or the other way around? Which provides more security?

查看:161
本文介绍了是更好的加密消息,然后压缩它或其他方式?哪个提供更多的安全性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我假设没有额外的保护。

I have the assumption there is no added protection at all.

推荐答案

提供的安全没有区别,因为压缩算法的工作方式,你可能会得到更好的压缩,如果你先压缩然后加密。

There is no difference in the security provided, but because of the way compression algorithms work, you are probably going to get better compression if you compress first then encrypt.

压缩算法利用统计冗余(如那些存在自然语言或许多文件格式)在加密时应删除的数据,因此加密的消息不应该能够被完全压缩。

Compression algorithms exploit statistical redundancies (such as those that exist in natural language or in many file formats) in the data which should be eliminated when you encrypt it, therefore an encrypted message shouldn't be able to be compressed all that well.

维基百科文章


然而,无损数据压缩算法总是无法压缩一些文件;事实上,任何压缩算法将必然不能压缩包含没有可辨别模式的任何数据。尝试压缩已经被压缩的数据将因此通常导致扩展,因为将尝试压缩除了最简单加密的数据之外的所有数据。

However, lossless data compression algorithms will always fail to compress some files; indeed, any compression algorithm will necessarily fail to compress any data containing no discernible patterns. Attempts to compress data that has been compressed already will therefore usually result in an expansion, as will attempts to compress all but the most trivially encrypted data.

这篇关于是更好的加密消息,然后压缩它或其他方式?哪个提供更多的安全性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆