Re: How to Decrypt using Public Key?

From: Sergio Dutra [MS] (
Date: 08/24/04

  • Next message: sb: "Re: Impersonating user on remote computer (ie. SSPI SQL authentication)"
    Date: Tue, 24 Aug 2004 08:18:54 -0700

    Bell is correct. However, in certain cases - as in a digital signature - one
    encrypts with the private key so anyone can decrypt with the public key and
    verify that the document/data did indeed come from the holder of the private

    To decrypt information encrypted with the private key given a certificate,
    you need to obtain the PCCERT_CONTEXT (from enumerating the store or loading
    the certificate from a file) and then call CryptImportPublicKeyInfo, passing
    in the certificate context's PCERT_PUBLIC_KEY_INFO.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    "Bell Kwong" <> wrote in message 
    > In general, public key is used for encryption, and private key for
    > decryption.
    > "Kumar" <>
    > $b14335c0$a401280a@phx.gbl...
    >> Hi,
    >>   I have generated a certificate in unix/java, exported
    >>   the certificate to a file. The same certificate is
    >>   imported into windows.
    >>   Now, I have a message encrypted using private key on
    >>   unix/java platform with the same certificate generated
    >>   above. The encrypted message is send across to an
    >>   Windows m/c in a file.
    >>   Can any one let me know the process of decrypting the
    >>   encrypted message using the public key that i have
    >>   imported into certificate store.
    >> Thanks & Regards,
    >> -Satish

  • Next message: sb: "Re: Impersonating user on remote computer (ie. SSPI SQL authentication)"

    Relevant Pages

    • Re: DRA is Decrypting Files when it shouldnt be!!!
      ... > EFS is allowing the RA to decrypt 200 files that were encrypted BEFORE an RA ... > encryption to get the RA to decrypt encrypted files. ... the default RA certificate was used. ... certificate and private key only when needed). ...
    • Re: Help please - Can not use/export private key after domain change
      ... You see only one EFS certificate in your private cert store? ... the certificate, also when I view it, it says that I have private key ... Windows XP encrypts the ...
    • RE: Troubles with CAPICOM EnvelopedData.Decrypt
      ... >store and successfully encrypt data. ... As a recipient I used this certificate. ... >To give IIS server privileges to access the private key associated with the ... could I decrypt message after I give privileges to IIS_user? ...
    • Re: EFS On Drive Works With >1 Computer?
      ... >I just went to Help and Support Center to see if it says anything. ... > agent's private key and certificate, ... > certificate, decrypting the file or folder, and then deleting the imported ... Try to decrypt it on a computer that is not and has ...
    • Re: Need help with Windows XP EFS
      ... Because I searched some and on>the Microsoft>>website it says that if you don't have a recovery agent>certificate it's not>>possible to recover anything. ... >>>>I just need a small hint on how to get windows to accept>the master key so>>it can decrypt the private key. ... I assume that letting>Microsoft recover my>>private key will cost me a lot of money too. ...