[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: Importing & Exporting keys
From:       Harry Whitehouse <harry () ENVMGR ! COM>
Date:       1999-09-28 19:16:08
[Download RAW message or body]


Hello -- I just had the same question #1 and found this very interesting
article:

    http://support.microsoft.com/support/kb/articles/Q228/7/86.ASP

You need some kind of protection key (hExpKey), however one special key
formation will result in NO encryption of your private key during export.

HTH

Harry


-----Original Message-----
From: Microsoft Cryptographic API
[mailto:CryptoAPI@DISCUSS.MICROSOFT.COM]On Behalf Of khalid kamal
Sent: Tuesday, September 28, 1999 1:34 AM
To: CryptoAPI@DISCUSS.MICROSOFT.COM
Subject: Importing & Exporting keys


hi
I have 2 questions:

1-Can I export private key without encrypting it with session key -
handle to hExpkey=NULL !!
2-When I import key blob into CSP , how dose CSP know the type of key
-ie private , public , simple??

The definition of import fn is the following:
BOOL CRYPTFUNC CryptImportKey( HCRYPTPROV hProv,BYTE *pbData,DWORD
wDataLen,
HCRYPTKEY hImpKey, DWORD dwFlags, HCRYPTKEY *phKey );

the definition of dwFlags is :
dwFlags
[in] The flag values. This parameter is currently only used when a
public/private key pair is being imported into the CSP (in the form of a
PRIVATEKEYBLOB). In this case, if the CRYPT_EXPORTABLE flag is set then
subsequent applications will be permitted to export the private key back
out of the CSP.

okey , which parameter  identifies type of blob ?

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic