电子邮件解密 - outlook 如何显示 CAPI 密钥的 KSP PIN 输入对话框?

Email decryption - How does outlook display a KSP PIN entry dialog for a CAPI key?

尝试在 Outlook 中打开加密电子邮件时,即使电子邮件是使用 CAPI (CryptoApi) 密钥加密的,它也会显示标准 CNG(下一代加密技术)密钥存储提供商 PIN 输入对话框。

当我尝试在同一环境中使用第三方库(redemption.dll,一种 Outlook 对象模型替代品)解密同一封电子邮件时,会显示较旧的 CAPI PIN 输入对话框。

请有人解释一下 outlook 如何能够将新的 CNG PIN 输入对话框用于 CAPI 密钥,因为我们正在寻求在我们的产品中实施使用新对话框的解决方案。

谢谢

如果您描述的一切都正确,我不确定您的问题是什么。我只是改写你的描述...

Outlook 使用 CNG ( Cryptography API: Next Generation) and you get you "modern" looking dialog when trying to decrypt the message / accessing private key with BCryptDecrypt function.

第 3 方库 (redemption.dll) 可能使用 Microsoft Cryptography API when decrypting SMIME message / accessing key with CryptMsgControl function (CMSG_CTRL_DECRYPT parameter),您会看到旧式对话框。

如果您尝试自己实施解决方案,请使用 CNG 库,您将获得新样式的对话框。您可以在此博客 post:What is a strong key protection in Windows?

中阅读有关不同提供商实施的更多信息