各个平台对 SHA-2 的支持情况如何?

发布于 2024-08-24 07:40:30 字数 415 浏览 8 评论 0原文

我读到 SHA-1 即将从 FIPS 180-2 标准中退役。

显然 SHA-1 存在缺陷导致了这一决定。谁能详细说明该决定的依据吗?在商业应用中使用 SHA-1 是否有影响?

我真正的问题是:

  • 各种类库和平台对 SHA-2 支持的状态如何?
  • 我应该尝试迁移到 SHA-2吗?

对主流平台感兴趣:.NET、Java、C/C++、Python、Javascript等。

I read that SHA-1 is being retired from the FIPS 180-2 standard.

Apparently there are weaknesses in SHA-1 that led to this decision. Can anyone elaborate on the basis for that decision? Are there implications for the use of SHA-1 in commercial applications?

My real questions are:

  • What is the state of SHA-2 support in various class libraries and platforms?
  • Should I attempt to move to SHA-2?

Interested in mainstream platforms: .NET, Java, C/C++, Python, Javascript, etc.

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

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

发布评论

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

评论(3

临风闻羌笛 2024-08-31 07:40:30

Sha1、Sha0、md4 和 md5 在过去几年中都被发现不安全。问题是,如果攻击者可以生成 2 条不同的消息,并产生相同的结果哈希,则称为冲突。这会给 PKI、密码管理、文件完整性检查等带来很多问题。目前 sha1 仅提供 2^52 位的安全性,这对于攻击者来说是可以达到的。其中 SHA-256(sha2 系列的最小成员)提供 2^256 位。

所有平台都应该有 SHA-256 实现,尽管并非所有平台都是本机的。在 PHP 中,您必须使用 mhash 扩展。令人困惑的是,某些平台不提供安全哈希函数,我真的相信这是因为他们不关心安全性。就 PHP 而言,我知道 他们不这样做不关心安全性

目前SHA-2没有任何问题,并且有非常大的安全边际。如果您真的很偏执,可以使用 SHA-512。 Sha-3 将于 2012 年推出,您应该尽可能使用 sha-2 修补您的密码,然后在可能的情况下转移到 SHA-3,但 SHA-512 对于非常有用很久。

Sha1, Sha0, md4 and md5 have all been found to be insecure over the past few years. The problem is that if an attacker can generate 2 different messages that produce the same resulting hash, this is called a collision. This causes a lot of problems for PKI's, password management, file integrity checks and more. Currently sha1 only provides 2^52 bits of security which is within reach of attackers. Where as SHA-256 (smallest member of the sha2 family) is provides 2^256 bits.

All platforms should have a SHA-256 implementation, although not all of them are native. In PHP you have to use the mhash extension. Its rather baffling that some platforms don't provide secure hash functions, I honestly believe its because they don't care about secuirty. In the case of PHP I know for a fact that they don't care about secuirty.

Currently there is nothing wrong with SHA-2 and it has a very large margin of safety. You can use SHA-512 if you are really paranoid. Sha-3 will be out in 2012, you should patch whatever you can with sha-2 like your PASSWORDS, and then move to SHA-3 when you can but SHA-512 will be good for a VERY long time.

梦情居士 2024-08-31 07:40:30

Windows Vista 及更高版本在 Microsoft 增强型 RSA 和 AES Cryptographic Provider for CryptoAPI 中支持 SHA-2,.NET Framework 自 .NET 1.1 起也支持 SHA-2。

Windows Vista and later supports SHA-2 in the Microsoft Enhanced RSA and AES Cryptographic Provider for CryptoAPI, and the .NET Framework has supported SHA-2 since .NET 1.1.

我乃一代侩神 2024-08-31 07:40:30

大多数平台现在都支持 SHA-2 系列。然而,SHA-1 仍然在许多应用程序中使用,例如 SSL,并且还会使用一段时间。

“SHA-3”竞赛正在顺利进行。当新的 SHA-3 标准到来时,从 SHA-1 跳转到它可能是合理的。

Most platforms now support the SHA-2 family. However, SHA-1 is still used in many applications, like SSL, and will be in use for a while.

A competition for "SHA-3" is well underway. It might be reasonable to jump from SHA-1 to the new SHA-3 standard when it arrives.

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