I am trying to export private key from smart card, the key can be exported only by wrapping (encrypted) and not as plaintext.
In Pkcs11 there are Wrap and Unwrap functions that can by used to wrap private key with symmetric temporary key.
So I want to use the same logic with CNG - NCrypt functions.
I thing that I need use NCryptExportKey with NCRYPT_PKCS8_PRIVATE_KEY_BLOB flag, and use the hExportKey parameter.
But I don't know how can I generate symmetric key (like 3DES) on the smart card using CNG.