Reverse Encryption in .NET

From: James Chou (jameschou2000_at_yahoo.com)
Date: 02/26/04


Date: 25 Feb 2004 16:24:48 -0800

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



Relevant Pages

  • Re: TIPS FOR THE NEWCOMER
    ... As long as the private key is readable by the ssh client when it comes ... When the ssh client connects to the server, ... private key which matches the public key. ...
    (SSH)
  • Re: DECRYPT with PUBLIC key (how to?)
    ... values in my application which would be decoded with my own public key which ... This is a very stupid thing to think that you can encrypt with private ... Private key operations often uses CRT ... Signature schemes and Encryption schemes have completely different ...
    (microsoft.public.dotnet.security)
  • Re: private to public decrypt now working
    ... would have the private key, all vice presidents would have a public key. ... All vice's could encrypt and only president could decrypt. ...
    (microsoft.public.dotnet.security)
  • [OT] Re: Basic question about Public Private Key Pairs
    ... > and private keys allow me to decrypt, but vice versa is not possible (or ... a public key and a corresponding private key. ... You can encrypt something with each key; ...
    (microsoft.public.dotnet.security)
  • Re: CryptImportKey
    ... Whan you "encrypt" your server-generated session key your parameter is ... AT_KEYEXCHANGE - but CAPI will use the PUBLIC key portion of that key pair ... The client and server communicating over TCP/IP. ...
    (microsoft.public.platformsdk.security)