PPP 压缩和加密:先发生哪一个?

网络工程 公私合营
2022-02-13 12:40:21

如果为压缩和加密都启用了 PPP,在 PPP 通过物理链路发送数据之前,先发生压缩还是加密哪一个?

1个回答

压缩技术依赖于数据具有可以“编码”的模式这一事实。这是一个简单的(简单的?)示例:

Instead of repeating long strings of 1s or 0s, use the string "00" 
followed by the number of 0s.  So a string of 20 0s could be
represented by "0014" (hex 14 = 20).  This would shorten the stream by
16 bytes.

但是如果你加密数据,那么它看起来是随机的——即不应该有可辨别的模式。这将使压缩变得不可能。

因此,对您的问题的简短回答是:先压缩,然后加密。