I'm trying to get up to speed on how to get some code that uses OpenSSL for cryptography, to play nice with another program that I'm writing in C#, using the Microsoft cryptography providers available in .NET.
More to the point, I'm trying to have the C# program verify an RSA message signature generated by the OpenSSL code. The code tha...
Hi,
I've been developing an ASP.NET site on an older machine running XP home. I recently got a new Win 7 PC and moved all my project files across. When I try and run the project, I get this error message:
"Failed to decrypt using provider 'MyRsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container cou...
I'm using the following code in an attempt to programatically allow the NetworkService account to have access to a key:
var RSA = new RSACryptoServiceProvider(
new CspParameters() {
KeyContainerName = "MyEncryptionKey",
Flags = CspProviderFlags.UseExistingKey | CspProviderFlags.UseMachineKeyStore
});
RSA.CspKeyContainer...
I'm trying to encrypt and decrypt data using RSA in C#. I have the following MSTest unit test:
const string rawPassword = "mypass";
// Encrypt
string publicKey, privateKey;
string encryptedPassword = RSAUtils.Encrypt(rawPassword, out publicKey, out privateKey);
Assert.AreNotEqual(rawPassword, encryptedPassword,
"Raw password and e...
Hi!
I have an webservice that performs many RSA-signature operations. I use the CryptograhyProvider from .net. This uses the unmanaged CyptoAPI from Windows.
I often have this error:
System.Security.Cryptography.CryptographicException: Der RPC-Server ist für diesen Vorgang zu stark ausgelastet. [=The rpc server is too busy to complet...
I am using RSACryptoServiceProvider to generate public/private key pair and using cspParameters object to store it in a key container.
My problem is that after i store the private key in a key container, can another application access the key container and retrieve the private key i generated?
If yes, the security of the key is compro...
I need to encrypt/decrypt files (type pdf,txt,doc) by using RSA algorithm in c#
I import keys from XMl file
I use this method
public byte[] DecryptData(byte[] encrypted)
{
int nBytes = encrypted.Length;
byte[] ByteArray = new byte[nBytes];
RSACryptoServiceProvider rsa=new RSACryptoServiceProvider();
StreamReader read...
private readonly string KeyContainerName = "MyKeyContainer";
public void GenerateKeyPair()
{
Debug.WriteLine("Generating Key Pair");
CspParameters cp = new CspParameters();
cp.KeyContainerName = KeyContainerName;
cp.Flags = CspProviderFlags.UseDefaultKeyContainer;
...
I am using the RSACryptoServiceProvider like this...
private byte[] RSAEncrypt(byte[] DataToEncrypt, string ContainerName, bool DoOAEPPadding)
{
try
{
byte[] encryptedData;
// Create a new instance of CspParameters. Pass
// 13 to specify a DSA container or 1 to specify
...
Hello everybody.
I need to sign an xml-doc with digital signature. I know that there is a way to do this in .NET but i cannot understand how to specify my own puplic key in RSACryptoServiceProvider. I need for the public key based on the special keyword. How can i do this? Help me please.
...