DES、三重 DES、AES、河豚数据加密的比较

发布于 2024-10-29 19:29:33 字数 23 浏览 7 评论 0原文

有人比较这些加密算法的优缺点吗?

Does anyone have pros and cons together for comparing these encryption algorithms ?

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

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

发布评论

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

评论(9

伤痕我心 2024-11-05 19:29:33

使用 AES。

更详细地说:

  • DES 是七十年代的旧“数据加密标准”。它的密钥大小对于适当的安全性而言太短(56 个有效位;这可以是暴力破解的,正如已经证明的十多年前)。此外,DES 使用 64 位块,这在使用相同密钥加密几 GB 数据时会引发一些潜在问题(现在 1 GB 并没有那么大)。
  • 3DES 是一种通过级联 DES 的三个实例(具有不同密钥)来重用 DES 实现的技巧。据信 3DES 的安全性至少达到“2112”(这是相当多的安全性,并且远远达到“用当今的技术无法破解”的境界) )。但它很慢,尤其是在软件方面(DES 是为高效的硬件实现而设计的,但它在软件方面很糟糕;3DES 的糟糕程度是它的三倍)。
  • Blowfish 是 Bruce Schneier 提出的一种分组密码,并部署在一些软件中。 Blowfish 可以使用巨大的密钥,并且被认为是安全的,除了其块大小(与 DES 和 3DES 一样,为 64 位)之外。 Blowfish 在软件方面是高效的,至少在某些软件平台上(它使用依赖于键的查找表,因此性能取决于平台如何处理内存和缓存)。
  • AES 是 DES 的继承者,作为美国联邦组织的标准对称加密算法(也作为几乎其他所有人的标准)。 AES 接受 128、192 或 256 位密钥(128 位已经非常牢不可破),使用 128 位块(因此没有问题),并且在软件和硬件方面都很高效。它是通过几年来数百名密码学家参与的公开竞赛选出的。基本上,你没有比这更好的了。

因此,如有疑问,请使用 AES。

请注意,分组密码是一个加密“块”(使用 AES 的 128 位数据块)的盒子。当加密可能长于 128 位的“消息”时,必须将消息分割成块,而进行分割的实际方式称为 操作模式 或“链接”。朴素模式(简单拆分)称为 ECB,存在问题。正确使用分组密码并不容易,它比在 AES 或 3DES 等之间进行选择更重要。

Use AES.

In more details:

  • DES is the old "data encryption standard" from the seventies. Its key size is too short for proper security (56 effective bits; this can be brute-forced, as has been demonstrated more than ten years ago). Also, DES uses 64-bit blocks, which raises some potential issues when encrypting several gigabytes of data with the same key (a gigabyte is not that big nowadays).
  • 3DES is a trick to reuse DES implementations, by cascading three instances of DES (with distinct keys). 3DES is believed to be secure up to at least "2112" security (which is quite a lot, and quite far in the realm of "not breakable with today's technology"). But it is slow, especially in software (DES was designed for efficient hardware implementation, but it sucks in software; and 3DES sucks three times as much).
  • Blowfish is a block cipher proposed by Bruce Schneier, and deployed in some softwares. Blowfish can use huge keys and is believed secure, except with regards to its block size, which is 64 bits, just like DES and 3DES. Blowfish is efficient in software, at least on some software platforms (it uses key-dependent lookup tables, hence performance depends on how the platform handles memory and caches).
  • AES is the successor of DES as standard symmetric encryption algorithm for US federal organizations (and as standard for pretty much everybody else, too). AES accepts keys of 128, 192 or 256 bits (128 bits is already very unbreakable), uses 128-bit blocks (so no issue there), and is efficient in both software and hardware. It was selected through an open competition involving hundreds of cryptographers during several years. Basically, you cannot have better than that.

So, when in doubt, use AES.

Note that a block cipher is a box which encrypts "blocks" (128-bit chunks of data with AES). When encrypting a "message" which may be longer than 128 bits, the message must be split into blocks, and the actual way you do the split is called the mode of operation or "chaining". The naive mode (simple split) is called ECB and has issues. Using a block cipher properly is not easy, and it is more important than selecting between, e.g., AES or 3DES.

墨落成白 2024-11-05 19:29:33

除 AES 和 Blowfish 之外,所有这些方案都存在已知漏洞,不应使用。
不过,Blowfish 已被 Twofish 取代。

All of these schemes, except AES and Blowfish, have known vulnerabilities and should not be used.
However, Blowfish has been replaced by Twofish.

把人绕傻吧 2024-11-05 19:29:33

所描述的加密方法是对称密钥分组密码。

数据加密标准 (DES) 是其前身,使用 56 位密钥对 64 位块中的数据进行加密。每个块都是单独加密的,这是一个安全漏洞。

三重 DES 通过在每个块上应用三个 DES 操作来扩展 DES 的密钥长度:使用密钥 0 进行加密、使用密钥 1 进行解密以及使用密钥 2 进行加密。这些密钥可能是相关的。

与传统商业产品和服务交互时通常会遇到 DES 和 3DES。

AES 被认为是后继者和现代标准。 http://en.wikipedia.org/wiki/Advanced_Encryption_Standard

我认为不鼓励使用 Blowfish。

强烈建议您不要尝试实现自己的加密技术,而是使用高级实现,例如针对静态数据的 GPG 或针对传输中的数据的 SSL/TLS。这是一个关于加密漏洞的精彩而发人深省的视频 http:// /rdist.root.org/2009/08/06/google-tech-talk-on-common-crypto-flaws/

The encryption methods described are symmetric key block ciphers.

Data Encryption Standard (DES) is the predecessor, encrypting data in 64-bit blocks using a 56 bit key. Each block is encrypted in isolation, which is a security vulnerability.

Triple DES extends the key length of DES by applying three DES operations on each block: an encryption with key 0, a decryption with key 1 and an encryption with key 2. These keys may be related.

DES and 3DES are usually encountered when interfacing with legacy commercial products and services.

AES is considered the successor and modern standard. http://en.wikipedia.org/wiki/Advanced_Encryption_Standard

I believe the use of Blowfish is discouraged.

It is highly recommended that you do not attempt to implement your own cryptography and instead use a high-level implementation such as GPG for data at rest or SSL/TLS for data in transit. Here is an excellent and sobering video on encryption vulnerabilities http://rdist.root.org/2009/08/06/google-tech-talk-on-common-crypto-flaws/

唯憾梦倾城 2024-11-05 19:29:33

AES 是一种对称加密算法,而 RSA 是一种非对称(或公钥)加密算法。 AES 中的加密和解密是使用单个密钥完成的,而 RSA 中则使用单独的密钥(公钥和私钥)。 128 位 AES 密钥的强度大致相当于 2600 位 RSA 密钥。

AES is a symmetric cryptographic algorithm, while RSA is an asymmetric (or public key) cryptographic algorithm. Encryption and decryption is done with a single key in AES, while you use separate keys (public and private keys) in RSA. The strength of a 128-bit AES key is roughly equivalent to 2600-bits RSA key.

画▽骨i 2024-11-05 19:29:33

尽管三倍的cryptoserviceProvider是一种安全且良好的方法,但它太慢了。如果您想参考MSDN,您会建议您使用AES而不是三倍。请检查下面的链接:
http://msdn.microsoft.com/en-en-us /library/system.security.cryptography.tripledescryptoserviceprovider.aspx
您将在评论部分中看到此关注:

注意
较新的对称加密算法,高级加密
标准(AES)可用。考虑使用
AescryptoserviceProvider类,而不是
三倍的CryptoServiceProvider类。使用
三倍的CryptoServiceProvider仅用于与遗产的兼容性
应用和数据。

祝你好运

Although TripleDESCryptoServiceProvider is a safe and good method but it's too slow. If you want to refer to MSDN you will get that advise you to use AES rather TripleDES. Please check below link:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.tripledescryptoserviceprovider.aspx
you will see this attention in the remark section:

Note
A newer symmetric encryption algorithm, Advanced Encryption
Standard (AES), is available. Consider using the
AesCryptoServiceProvider class instead of the
TripleDESCryptoServiceProvider class. Use
TripleDESCryptoServiceProvider only for compatibility with legacy
applications and data.

Good luck

恋你朝朝暮暮 2024-11-05 19:29:33

输入图片这里的描述

DES 是七十年代的旧“数据加密标准”。

enter image description here

DES is the old "data encryption standard" from the seventies.

北风几吹夏 2024-11-05 19:29:33

除 AES 和 Blowfish 之外,所有这些方案都存在已知漏洞,不应使用。

如果包装好,所有这些实际上都可以安全使用。

这里是 AES 包装的示例。

All of these schemes, except AES and Blowfish, have known vulnerabilities and should not be used.

All of them can actually be securely used if wrapped.

Here is an example of AES wrapping.

君勿笑 2024-11-05 19:29:33
DESAES
开发于19772000
密钥长度56 位128、192 或 256 位
密码类型对称对称
块大小64 位128 位
安全性不足安全
性能
DESAES
Developed19772000
Key Length56 bits128, 192, or 256 bits
Cipher TypeSymmetricSymmetric
Block Size64 bits128 bits
Securityinadequatesecure
PerformanceFastSlow
短叹 2024-11-05 19:29:33

AES 是目前公认的标准算法(因此称为高级加密标准)。

其余的则不然。

AES is the currently accepted standard algorithm to use (hence the name Advanced Encryption Standard).

The rest are not.

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