all groups > dotnet security > june 2006 >
You're in the

dotnet security

group:

Check if a key exists in a CSP with a specific containerName


Check if a key exists in a CSP with a specific containerName Vincent RICHOMME
6/19/2006 4:26:33 PM
dotnet security: Hi,

I am trying to developp an admin application permitting me to rerieve
passwords from users. (their password is encrypted by a public key and
they send me the file)
First time the application starts, I have to generate a key pair.
So my question is how can I know if a key already exists ?



the following doesn't work since the key is created everytime


private void CheckRSAKey()
{
string ContainerName = "K_ADMIN_TEST";
CspParameters cp = new CspParameters();
cp.KeyContainerName = ContainerName;
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
Re: Check if a key exists in a CSP with a specific containerName Vincent RICHOMME
6/19/2006 4:48:01 PM
Actually I am wondering if my archiecture is good.
What I want is :

1)generate a RSA key pair and store it somewhere
2)Be able to export the key-pair in a secured manner (pkcs12 ?)
3)Export the public key
4)Use the private key-pair to decrypt a password.

How can I dot that ?






Vincent RICHOMME a écrit :
[quoted text, click to view]
AddThis Social Bookmark Button