开发者

Window CryptoAPI: Can I choose the public exponent when generating an RSA key pair?

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 RSACryptoServiceP开发者_运维知识库rovider?

EDIT: My guess is that the answer is "No", but I would like to get confirmation.


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)


I think this answers your second question:

EncryptTo/DecryptTo: Encryption in .NET with CryptoAPI Certificate Stores

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜