windows - winapi 的 bcrypt.h 实际上支持 bcrypt 哈希吗?

标签 windows winapi windows-vista cng

这听起来像是一个奇怪的问题,我实际上不得不问这个感觉有点奇怪,但是在花了几个小时查看 MSDN 文档以了解添加的 bcrypt 例程之后在 Vista 中,我几乎得出结论,没有实际的 bcrypt 支持!

根据维基百科:

bcrypt is an adaptive cryptographic hash function for passwords ... based on the Blowfish cipher ... Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive hash: over time it can be made slower and slower so it remains resistant to specific brute-force search attacks against the hash and the salt.

但是,根据 MSDN 上的文档,“bcrypt”库显然实际上是用于加密和散列的通用接口(interface)。您必须通过 BCryptOpenAlgorithmProvider function 获得“算法提供者”的句柄。 ,它有多种内置算法可供选择。但是“河豚”这个词没有出现在列表中的任何地方。

所以我错过了什么吗?我读错了吗?还是 Windows 的“bcrypt”库实际上根本不支持 bcrypt

最佳答案

在 MSDN 的上下文中,BCrypt 是 “BestCrypt” 的缩写,但它的 PR 名称是:

Cryptography API: Next Generation (Cng)

它在bcrypt.dll 中实现。

BestCrypt/BCrypt/Cng 是旧版 CryptoAPI 的继承者.

Microsoft 正在慢慢从他们的站点中删除对 “BestCrypt” 的引用,但您仍然可以在某些页面中看到它,例如:

SHA256Cng Class

This algorithm is for hashing only and does not provide any encryption or decryption. It uses the BCrypt (BestCrypt) layer CNG.

有趣的是(无论如何对我来说).NET 框架通常可以为每种加密算法提供三种实现。例如,对于 SHA2 哈希,有:

精简版

不,bcryptbestcrypt 的缩写。而且,不,它不支持 bcrypt(河豚密码)密码散列。

关于windows - winapi 的 bcrypt.h 实际上支持 bcrypt 哈希吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9711568/

相关文章:

javascript - 如何通过 navigator.plugins 使 ActiveX 对象可发现?

windows - 如何在链中运行 Windows 命令

c++ - 使用 GetLogicalProcessorInformation() 查询系统缓存信息的结果无效

c++ - 通过 Win32 应用程序从 C/C++ 中的 UDP 端口读取

.net - WPF Aero Glass DPI 设置不匹配

windows - Set-AuthenticodeSignature 不会执行 SHA256 时间戳?

windows - 如何获得计算机的平均 CPU/处理器使用率?

c# - 使用 Windows API 从富文本控件检索文本的正确方法是什么?

java - Microsoft Intellimouse 滚轮不适用于 Vista 上的 Netbeans 6.5

.net - 在 Vista 而不是 XP 中开发 .Net 解决方案的优缺点