问题
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
回答1:
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.
回答2:
http://msdn.microsoft.com/en-us/library/ms819963.aspx
This is how you can sign message using x509 certificate.
来源:https://stackoverflow.com/questions/3405016/reading-rsa-private-key-in-pem-format-and-reading-public-key-from-certificate