Re: How to Decrypt using Public Key?
From: Sergio Dutra [MS] (sergio_at_online.microsoft.com)
Date: 08/24/04
- Previous message: Sergio Dutra [MS]: "Re: cryptgenrandom sequence retrieval"
- In reply to: Bell Kwong: "Re: How to Decrypt using Public Key?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
key.
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 http://www.microsoft.com/info/cpyright.htm "Bell Kwong" <bell@79cn.com> wrote in message news:O5NMUrQiEHA.3664@TK2MSFTNGP12.phx.gbl... > In general, public key is used for encryption, and private key for > decryption. > > > "Kumar" <anonymous@discussions.microsoft.com> > $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 >> > >
- Previous message: Sergio Dutra [MS]: "Re: cryptgenrandom sequence retrieval"
- In reply to: Bell Kwong: "Re: How to Decrypt using Public Key?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|