简体   繁体   中英

Reading RSA Private Key in PEM format And Reading public Key from certificate

I'm trying to use a PEM(X.509) certificate (stored in a privateKey.pem file on disk) to sign messages.After that i need to verify signature by using certificate (sent to the receiver). Help with this, especially example code in c# and RSA algorithm

You may find the Bouncycastle C# library to be of value in your problem. There is a PEMReader class that should be able to read in your PEM file and convert the contents to Bouncycastle cryptography objects. And there is a DotNetUtilities class to provide a bridge between Bouncycastle and .NET cryptography objects.

http://msdn.microsoft.com/en-us/library/ms819963.aspx

This is how you can sign message using x509 certificate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM