Re: CryptImportKey() & CryptExportPublicKeyInfo()
From: Petar Popara (my.fake_at_mail.net)
Date: 04/18/05
- Previous message: Doug: "Code Signing Clarification"
- In reply to: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- Next in thread: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- Reply: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 18 Apr 2005 16:10:57 +0200
To advanced for me. :( I'll need to ask additional questions here (see
below).
> You need to first ANS.1 encode the PublicKey, from the PUBLICKEYBLOB
> data, using CryptEncodeObject with lpszStructType = RSA_CSP_PUBLICKEYBLOB
I couldn't figure out what structure CryptEncodeObject() returns for
lpszStructType=RSA_CSP_PUBLICKEYBLOB? It returns CRYPT_BIT_BLOB with
different encoding (e.g. PKCS1) then it was on input?
> Then you construct a CERT_PUBLIC_KEY_INFO with that returned
> encoded public key:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cert_public_key_info.asp
How?
CERT_PUBLIC_KEY_INFO pki;
pki.Algorithm = szOID_RSA; //???
pki.PublicKey = stucure returned from CryptEncodeObject().
Something like this?
> See also:
> http://www.jensign.com/JavaScience/dotnet/JKeyNet/index.html
There are 3 links and first is broken.
Thank you very very much. :)
- Previous message: Doug: "Code Signing Clarification"
- In reply to: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- Next in thread: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- Reply: Michel Gallant: "Re: CryptImportKey() & CryptExportPublicKeyInfo()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]