Window CryptoAPI:生成 RSA 密钥对时可以选择公共指数吗?
使用 Windows CryptoAPI,有没有办法指定生成新密钥对时使用哪个公共指数(即 3 而不是 65537)?
作为一个额外的问题:我如何使用 .NET RSACryptoServiceProvider
访问此功能?
编辑:我的猜测是答案是“否”,但我想得到确认。
Using the Windows CryptoAPI, is there any way to specify which public exponent to use when generating a new key-pair (ie. 3 instead of 65537)?
As a bonus question: how would I access this functionality using .NET RSACryptoServiceProvider
?
EDIT: My guess is that the answer is "No", but I would like to get confirmation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不 - 我们开始:)更认真地CryptGenKey 您可以发送到 CryptGenKey 的唯一参数在 CryptSetKeyParam。您可以从文档中看到,您只能为每种密钥类型设置有限数量的属性,并且对于 RSA 密钥只能设置一个属性。
(另外,我相信你知道,小指数无论如何都是危险的)
No - there we go :) More seriously CryptGenKey The only parameters you can send to CryptGenKey are set in CryptSetKeyParam. You can see from the documentation you can only set a limited number of properties for each key type, and only one for RSA keys.
(Plus, as I'm sure you're aware, small exponents are dangerous anyway)
我认为这回答了您的第二个问题:
EncryptTo/DecryptTo: Encryption in .NET with CryptoAPI证书存储
I think this answers your second question:
EncryptTo/DecryptTo: Encryption in .NET with CryptoAPI Certificate Stores