加密时反馈循环(DES)的目的是什么?

发布于 2024-09-28 22:01:15 字数 60 浏览 0 评论 0原文

它会使加密变得更强吗?我认为它是用来确保密文更加“随机”。它并没有真正使它变得更强大,至少我是这么认为的。

Does it make the encryption stronger? I thought it was used to make sure the ciphertext is more "random." It doesn't really make it any stronger, or so I think.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

任性一次 2024-10-05 22:01:15

请参阅此链接:http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_ .28ECB.29

查看下面的图像。 ECB(无反馈)可能会在密文中给出明文的“回显”。反馈循环可以解决这个问题。

See this link: http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29

Check out the images just below. ECB (no feedback) may give an "echo" of the plaintext in the ciphertext. A feedback loop fixes this.

穿越时光隧道 2024-10-05 22:01:15

DES 操作使用 56 位密钥加密 64 位(8 字节)数据。就是这样。

不过,大多数文件的长度都超过 8 个字节,因此我们需要将文件分成块并以某种方式处理每个块。天真地,我们可以通过使用相同的密钥加密每个块来做到这一点,与其余块隔离(所谓的“电子密码本”,或 ECB 模式)。

然而,许多文件格式都包含常见的字节序列(举一个熟悉的例子 - HTML 文档通常包含许多以 开头的链接)。使用 ECB 模式,这些序列的每次出现都会加密为相同密文,为攻击者提供有关明文结构的线索。此外,通常可以从上下文中猜测出原始文本(例如,HTTPS 请求很可能包含一些 HTML),因此攻击者可以在不知道原始密钥和技巧的情况下构造消息收件人接受这些消息是真实的。

有几种方法可以解决这个问题;一种是“密码块链接”(CBC 模式),其中每个块的密文与后续块“混合”,伪装这些重复序列。此外,还使用了强大的初始化向量 (IV) - 这是一个用于“播种”加密的随机值,确保即使使用相同的密钥对同一文件加密两次,密文也会有所不同 - 使攻击者获得的线索更少关于内容。

The DES operation encrypts 64 bits (8 bytes) of data, using a 56-bit key. That's it.

Most files are longer than 8 bytes though, so we need to break the file up into blocks and process each one somehow. Naively we could do this by just encrypting each block with the same key, in isolation from the rest (so-called "electronic code book", or ECB mode).

However, many file formats contain common sequences of bytes (to pick a familiar example - HTML documents often contain many links starting with <a href=). Using ECB mode, every occurrence of these sequences would encrypt to the same ciphertext, giving an attacker clues about the plaintext structure. Furthermore, the original text can often be guessed from the context (chances are fairly good that an HTTPS request contains some HTML, for instance) so the attacker could construct new messages without knowing the original key - and trick the recipient into accepting those messages as genuine.

There are several ways to fix this; one being "cipher-block chaining" (CBC mode) where the ciphertext from each block is "mixed" with the subsequent block, disguising these repeated sequences. Additionally a strong initialisation vector (IV) is used - this is a random value used to 'seed' the encryption, ensuring that even if the same file is encrypted twice with the same key, the ciphertexts will differ - leaving the attacker with fewer clues about the content.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文