c# RSA extract public key from private key

前端 未结 3 706
忘了有多久
忘了有多久 2020-12-21 10:28

Is there a way to extract public key from private key in c#? Becouse if i do ToXMLString() then i can set if i want public key information saved with the privat

3条回答
  •  -上瘾入骨i
    2020-12-21 11:08

    If you can save it, and include the private key, then what you're saving is not just the private key.

    However, if you really do have only the private key, then no, you can't "extract" the public key from it. If you could do that, you would render most of todays security obsolete.

    So basically, I don't believe you have only the private key, you have a key pair, and you should be able to extract the public key from that.

    Whether that is easily doable in C# or .NET, I have no idea.

提交回复
热议问题