J
James Chou
Hi,
I saw several posts asking for reverse encryption (encrypt with
private key instead of public key) in .NET. I am having the same
question and wonder anybody has a good solution to it.
Basically, my client application generates a key pair and exports the
public key to server. The client application needs to encrypt a string
with the private key and send it to server. Server authenticates the
client after decrypts the stirng with the public key. It looks like a
very simple procedure but it seems impossible with the RSA encryption
provided by .NET. The Encrypt() method of RSACryptoServiceProvider
seems to do encryption with public key ONLY. It does use private key
to encrypt content when generating a signature though.
Does anybody have a solution to it? If .NET doesn't support it, is
there any way I can do it through Win32 CryptoAPI?
Thanks
James
I saw several posts asking for reverse encryption (encrypt with
private key instead of public key) in .NET. I am having the same
question and wonder anybody has a good solution to it.
Basically, my client application generates a key pair and exports the
public key to server. The client application needs to encrypt a string
with the private key and send it to server. Server authenticates the
client after decrypts the stirng with the public key. It looks like a
very simple procedure but it seems impossible with the RSA encryption
provided by .NET. The Encrypt() method of RSACryptoServiceProvider
seems to do encryption with public key ONLY. It does use private key
to encrypt content when generating a signature though.
Does anybody have a solution to it? If .NET doesn't support it, is
there any way I can do it through Win32 CryptoAPI?
Thanks
James