Re: Encrypting using RSA private Key



Yes, you should definitely encrypt with the server's public key and sign
with the user's private key. If you were using SSL with client cert auth,
it would just do all this for you. WS-Security could also take care of all
of this as well. If you really want to do it by hand, you might want to
consider packaging the encrypted and signed data using an EnvelopedCms
message, as the underlying PKCS#7 format is designed specifically for
exchanging these types of messages.

Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Jeronimo Bertran" <jeronimo.bertran@xxxxxxxxxxxxxxxx> wrote in message
news:Xns9A7AB9741F9F4publicjbbertrancom@xxxxxxxxxxxxxxxx
Thanks Joe,

The data that we are transmitting is encrypted using a 3DES key.. The key
is encrypted by a user and both the encrypted key and data are sent to a
web service that stores the public keys of all users that can send
information to it.

It made sense to encrypt the 3DES key using the private key but we will
now
change the scheme and encrypt the key using the server's public key and
signed with the user's private key.



.



Relevant Pages

  • 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: how to have a gpg public key?
    ... Having just a public key doesn't do you much good. ... You need both a private key and a public key; ... can encrypt and decrypt your messages and you are just ...
    (Debian-User)
  • Re: RSA Encrypt/Decrypt Problems
    ... You can generate a snk for each and replicate the public key part to each ... Then sym encrypt your data with the key and iv and store in the ... You could actually do it with small blocks and only the public rsa key, ... > key) with the symmetric key embedded in the file and encrypted using the ...
    (microsoft.public.dotnet.security)