Below code generates Exception thrown: 'System.Security.Cryptography.CryptographicException' in mscorlib.dll.
I am using .NET 4.6.1 with 4096 bits RSA private key
string pkey = File.ReadAllText(@"C:\Temp\private.key");
IOpenSSLPrivateKeyDecoder privateKeyDecode = new OpenSSLPrivateKeyDecoder();
var rsa = privateKeyDecode.DecodeParameters(pkey);
RSACryptoServiceProvider provider = new RSACryptoServiceProvider();
provider.ImportParameters(rsa);
Below code generates Exception thrown: 'System.Security.Cryptography.CryptographicException' in mscorlib.dll. I am using .NET 4.6.1 with 4096 bits RSA private key