Re: CryptExport private key only

From: Michel Gallant (neutron_at_nspxistar.ca)
Date: 10/26/03


Date: Sun, 26 Oct 2003 11:38:16 -0500


"Anatoly" <wiretransfers@yahoo.com> wrote in message news:eHO88H4mDHA.3612@TK2MSFTNGP11.phx.gbl...
> do I understand correctly, that when using RSA public/private key pair
> encryption, CryptExport's PRIVATEKEYBLOB flag will export both private and
> public keys together?

Yes, that is correct:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/private_key_blobs.asp

> from conventional use of Public/Private key pairs, it seems that one is
> supposed to use the public key to encrypt data and private key to always
> decrypt data.

With RSA asymmetric cipher supports encrypting limited amount of data
(a hash or a secret key) with one key and decrypting with the other key:

 (1) using public key to encrypt is typically used to encrypt a secret session key
 to a recipient whose public key/certificate you have
 (2) you can use your private key to encrypt a hash (your digital signature)
  or you can use your private key to decrypt something encrypted as in (1)

> Is it legitimate to interchange the private/public keys in their purpose?
> that is can I use the public key to decrypt and private to encrypt and
> benefit from the same level of protection as the conventional scenario?
 See comments above

 - Michel Gallant
    Visual Security MVP



Relevant Pages

  • Re: private to public decrypt now working
    ... If you switch it to use the public key to encrypt and private to decrypt it works. ...
    (microsoft.public.dotnet.security)
  • Re: More on learning "Public Key Authentication"
    ... let me say that in public key ... >> encrypt the result with Alice's public key. ... >> is sent to Alice who decrypts the message with her private key (which ... > encrypted with my private key and they can then decrypt it with the ...
    (comp.sys.mac.system)
  • Re: More on learning "Public Key Authentication" [correction]
    ... As the person who created that private ... How do I "specify" the file? ... > transfer the long 2048 digit public key to the other computer. ... specific keyfile you want to use to encrypt or sign a specific data ...
    (comp.sys.mac.system)
  • 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)
  • [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)