atl - CryptoAPI - export/import of keys between different versions of Windows -
on win 2003 32 bit, export privatekeyblob
cryptexportkey
call (dwflags=0). attempt import key blob on win server 2008 64 bit 64 bit executable, call cryptimportkey
fails nte_bad_data
.
in both cases crypto provider initialized call
cryptacquirecontext(&hprov, szcontainer, null, prov_rsa_aes, crypt_machine_keyset)
the passwords export/import match. public key based on cryptderivekey
of md5 hash of passwords identical in plain text represetnation. i'm not sure whether public keys end being equal in 2 systems.
are different types of systems (win 2003 32 bit vs win 2008 64 bit) expected cause of failure, , there way of getting work?
as conjectured public keys produced atl's ccryptderivedkey not equal on 2 systems. default settings of ccryptderivedkey must different in 2 versions of atl library.
since had access both source , destination servers, reexported , imported key in consistent manner - specifying algorithm, key size , presence of salt.
it nice know exact settings of ccryptderivedkey::initialize method in earlier version of atl library (visual studio 2005, believe).
Comments
Post a Comment