最好的通用摘要函数? [英] Best general-purpose digest function?

查看:142
本文介绍了最好的通用摘要函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在2009年编写平均新应用程序时,在安全性和性能方面,最合理的摘要函数是什么? (当条件发生变化时,我怎样才能确定这一点?)



类似的 问题 之前提问,答案包括SHA1,SHA2,SHA-256,SHA-512,MD5 ,bCrypt和Blowfish。

我意识到在很大程度上,如果聪明地使用它们,任何一个都可以工作,但我宁愿不掷骰子,随机挑一个。谢谢。

hash / policy.htmlrel =noreferrer> NIST / FIPS指引:


2006年3月15日:SHA -2系列的
散列函数(即SHA-224,
SHA-256,SHA-384和SHA-512)可能是联邦机构对所有
应用程序使用的
使用安全哈希
算法。联邦机构应该在
实际可用时立即使用SHA-1进行数字b $ b签名,数字时间戳和
其他应用程序的
碰撞抵抗,并且必须使用这些
应用程序的SHA-2
系列散列函数适用于2010年之后的这些
应用程序。2010年以后,
联邦机构可能仅对以下应用程序使用SHA-1

基于散列的消息认证
代码(HMAC);密钥派生
函数(KDFs);和随机数
生成器(RNG)。无论使用什么,
NIST都鼓励应用程序和
协议设计人员为所有新的
应用程序和协议使用SHA-2
系列哈希函数。



When writing an average new app in 2009, what's the most reasonable digest function to use, in terms of security and performance? (And how can I determine this in the future, as conditions change?)

When similar questions were asked previously, answers have included SHA1, SHA2, SHA-256, SHA-512, MD5, bCrypt, and Blowfish.

I realize that to a great extent, any one of these could work, if used intelligently, but I'd rather not roll a dice and pick one randomly. Thanks.

解决方案

I'd follow NIST/FIPS guidelines:

March 15, 2006: The SHA-2 family of hash functions (i.e., SHA-224, SHA-256, SHA-384 and SHA-512) may be used by Federal agencies for all applications using secure hash algorithms. Federal agencies should stop using SHA-1 for digital signatures, digital time stamping and other applications that require collision resistance as soon as practical, and must use the SHA-2 family of hash functions for these applications after 2010. After 2010, Federal agencies may use SHA-1 only for the following applications: hash-based message authentication codes (HMACs); key derivation functions (KDFs); and random number generators (RNGs). Regardless of use, NIST encourages application and protocol designers to use the SHA-2 family of hash functions for all new applications and protocols.

这篇关于最好的通用摘要函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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