I am trying to port a UNIX code using OpenSSL (PKCS#5 & PKCS#7) to windows.
In the case of OpenSSL, all the encoding/decoding (certificates or passwords) is done transparently to the caller in the function CMS_Encrypt, as it should be.
CAPI does the same thing in the case of certificate based encryption inside the function CryptEncryptMessage (no ASN details are revealed to the caller). After some googling, I found out the following key generation implementation. Now how am I supposed to use it in CAPI ?
Because CAPI does not support PBE encryption at the high level (PBKDF2) my guess is that the encoding has to be done (somehow?) manually. And by manually I mean writing (and reading) the binary representations of various ASN tags. How am I supposed to do this ?
I cannot access the msasn1.h API since msasn1.lib is never distributed. Has anyone been able to use CAPI interface for doing anything else other than certificates based encryption ?
BCryptDeriveKeyPBKDF2
, msdn.microsoft.com/en-us/library/windows/desktop/dd433795.aspx – Currish